@schibsted/advertory 3.3.7 → 3.3.9-inv-2613.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/ad-native/cjs/index.js +1 -1
  2. package/ad-native/es/index.js +1 -1
  3. package/aftenposten/cjs/index.js +1 -1
  4. package/aftenposten/es/{_auto-entry_aftenposten-DkYPEgW2.js → _auto-entry_aftenposten-BUpE_VrI.js} +1 -1
  5. package/aftenposten/es/{events-Dxr4Zxls.js → events-im0dWg8r.js} +1 -1
  6. package/aftenposten/es/{index-Cvm9IELq.js → index-C8U7tbLC.js} +1 -1
  7. package/aftenposten/es/{index-DkUoI9A5.js → index-CXBk3fTD.js} +1 -1
  8. package/aftenposten/es/{index-Xu3SlHVR.js → index-CqArj0-n.js} +1 -1
  9. package/aftenposten/es/{index-8Znj_jO9.js → index-D6SBKCRh.js} +1 -1
  10. package/aftenposten/es/index-DMW-RvfF.js +1 -0
  11. package/aftenposten/es/{index-CIH4OMmq.js → index-DiM5pjXO.js} +1 -1
  12. package/aftenposten/es/{index-CbOTAE13.js → index-KQzPqrQu.js} +1 -1
  13. package/aftenposten/es/{index-tQ8Q7qzm.js → index-UFYD0Qnp.js} +1 -1
  14. package/aftenposten/es/index.js +1 -1
  15. package/aftenposten/es/{styles-ChA_ArDs.js → styles-B17cPju-.js} +1 -1
  16. package/aftenposten/es/{styles-xQJFXB7f.js → styles-B5sOUwty.js} +1 -1
  17. package/aftenposten/es/{styles-Dk2CaWsu.js → styles-BYKU4Ggt.js} +1 -1
  18. package/aftenposten/es/{styles-D5fEK0FF.js → styles-BlhAEuSg.js} +1 -1
  19. package/aftenposten/es/{styles-ufU5LTet.js → styles-C8oLLIZl.js} +1 -1
  20. package/aftenposten/es/{styles-Bfypg2Kn.js → styles-CcrqgnU5.js} +1 -1
  21. package/aftenposten/es/{styles-CrG1u8QD.js → styles-DCS3RzGF.js} +1 -1
  22. package/aftenposten/es/{styles-BJxAV-fK.js → styles-DF4yBAzw.js} +1 -1
  23. package/aftenposten/es/{styles-BK_PoyOa.js → styles-Dgm3hjNq.js} +1 -1
  24. package/aftenposten/es/{styles-Ct-fDmhk.js → styles-Kh__UdmX.js} +1 -1
  25. package/aftenpostenv2/es/{_auto-entry_aftenpostenv2-D6tvgX3j.js → _auto-entry_aftenpostenv2-sMM-Gqnp.js} +1 -1
  26. package/aftenpostenv2/es/{events-CHHr4TcS.js → events-CEbsvO7j.js} +1 -1
  27. package/aftenpostenv2/es/{index-VY-LAi4l.js → index-BA_QCs8u.js} +1 -1
  28. package/aftenpostenv2/es/index-BCqs3iI1.js +1 -0
  29. package/aftenpostenv2/es/{index-BNKR8bap.js → index-BYDUzucd.js} +1 -1
  30. package/aftenpostenv2/es/{index-DPfdNRYY.js → index-CXfQHY54.js} +1 -1
  31. package/aftenpostenv2/es/{index-BPAvDSMB.js → index-DDECqQJ5.js} +1 -1
  32. package/aftenpostenv2/es/{index-2u-XKWfy.js → index-DSMiW7G7.js} +1 -1
  33. package/{aftonbladetv2/es/index-BreFmmA_.js → aftenpostenv2/es/index-DVdgVvzk.js} +1 -1
  34. package/aftenpostenv2/es/{index-B6SAtWsd.js → index-DvbB2nDF.js} +1 -1
  35. package/aftenpostenv2/es/index.js +1 -1
  36. package/aftenpostenv2/es/{styles-Cgdn6TRJ.js → styles-BIobIX5_.js} +1 -1
  37. package/aftenpostenv2/es/{styles-BuCYeaZ_.js → styles-BdHZkxd8.js} +1 -1
  38. package/aftenpostenv2/es/{styles-Bb2gz-Yh.js → styles-Btri7NLd.js} +1 -1
  39. package/aftenpostenv2/es/{styles-vV1wphvq.js → styles-CDiwEQkK.js} +1 -1
  40. package/aftenpostenv2/es/{styles-8WXrGBKn.js → styles-CIFO3qUJ.js} +1 -1
  41. package/aftenpostenv2/es/{styles-CxhzerKe.js → styles-CcVPgC1K.js} +1 -1
  42. package/aftenpostenv2/es/{styles-Bv4hK_jf.js → styles-CufY0sN_.js} +1 -1
  43. package/aftenpostenv2/es/{styles-tGcwHrTD.js → styles-DLU7xga-.js} +1 -1
  44. package/aftenpostenv2/es/{styles-DhuYqlNc.js → styles-DU8M8JWW.js} +1 -1
  45. package/aftenpostenv2/es/{styles-YjqTfFKk.js → styles-SAo_MEn-.js} +1 -1
  46. package/aftenpostenv2/styles.css +1 -1
  47. package/aftonbladet/cjs/index.js +1 -1
  48. package/aftonbladet/es/{_auto-entry_aftonbladet-m_AGe-c-.js → _auto-entry_aftonbladet-BTaTOoOd.js} +1 -1
  49. package/aftonbladet/es/{events-iEcZY2KN.js → events-CfWd0vxH.js} +1 -1
  50. package/aftonbladet/es/index-BIKLmzqs.js +1 -0
  51. package/aftonbladet/es/{index-DcMHh97T.js → index-BdDCYUQc.js} +1 -1
  52. package/aftonbladet/es/{index-BfQe9eA8.js → index-Bgm8DDRR.js} +1 -1
  53. package/aftonbladet/es/{index-CkhfyK33.js → index-Bjc6gM52.js} +1 -1
  54. package/aftonbladet/es/{index-BTI79wPe.js → index-CIItLDxa.js} +1 -1
  55. package/aftonbladet/es/{index-C3znPc7c.js → index-CWLbdgPD.js} +1 -1
  56. package/aftonbladet/es/{index-D60x2Lnk.js → index-DH4QbsUe.js} +1 -1
  57. package/aftonbladet/es/{index-BcwfLWij.js → index-miNdzCmG.js} +1 -1
  58. package/aftonbladet/es/index.js +1 -1
  59. package/aftonbladet/es/{styles-B0sikrKB.js → styles-BdkzBPwb.js} +1 -1
  60. package/aftonbladet/es/{styles-CpjkhxZe.js → styles-CIrP-sjh.js} +1 -1
  61. package/aftonbladet/es/{styles-BGQeBz1p.js → styles-CNTlRNHX.js} +1 -1
  62. package/aftonbladet/es/{styles-msNvFfi3.js → styles-CcjRc1U7.js} +1 -1
  63. package/aftonbladet/es/{styles-DXnAbMV5.js → styles-DcfqpRbY.js} +1 -1
  64. package/aftonbladet/es/{styles-n4iWwJmt.js → styles-k64RqSoD.js} +1 -1
  65. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-BHK51esH.js +1 -0
  66. package/aftonbladetv2/es/{events-DwTaddOP.js → events-v2cvTTnN.js} +1 -1
  67. package/aftonbladetv2/es/{index-gcJWFxhL.js → index-B3Lc5MM4.js} +1 -1
  68. package/aftonbladetv2/es/{index-DQ_mo-V1.js → index-BAE7cXNU.js} +1 -1
  69. package/aftonbladetv2/es/{index-Chpa04dq.js → index-BvMDj8U0.js} +1 -1
  70. package/aftonbladetv2/es/{index-LxhLE0ml.js → index-CGGLIA50.js} +1 -1
  71. package/aftonbladetv2/es/{index-BS-Sh66J.js → index-Cn-QRzcE.js} +1 -1
  72. package/aftonbladetv2/es/index-eyVvxViB.js +1 -0
  73. package/{aftenpostenv2/es/index-DWXOSM4F.js → aftonbladetv2/es/index-rX_feLoE.js} +1 -1
  74. package/aftonbladetv2/es/{index-CVij9tO9.js → index-us7QAJUB.js} +1 -1
  75. package/aftonbladetv2/es/index.js +1 -1
  76. package/aftonbladetv2/es/{styles-KBKbmPB9.js → styles-BHGZP_SN.js} +1 -1
  77. package/aftonbladetv2/es/{styles-CAUxU469.js → styles-BhSqPOYR.js} +1 -1
  78. package/aftonbladetv2/es/{styles-CkJKkr9T.js → styles-By5Ke0xq.js} +1 -1
  79. package/aftonbladetv2/es/{styles-D9xcjGKT.js → styles-CWBy5GHY.js} +1 -1
  80. package/aftonbladetv2/es/{styles-DkU29N9_.js → styles-Cvatk62Z.js} +1 -1
  81. package/aftonbladetv2/es/{styles-aEwfw8zd.js → styles-Wx3z7RoB.js} +1 -1
  82. package/aftonbladetv2/styles.css +1 -1
  83. package/bt/cjs/index.js +1 -1
  84. package/bt/es/{_auto-entry_bt-D5UPUKCw.js → _auto-entry_bt-ZInKxMFy.js} +1 -1
  85. package/bt/es/{events-LqB9hlPq.js → events-CHu-WLyc.js} +1 -1
  86. package/bt/es/{index-CVzIX5LB.js → index-8mpCFnv4.js} +1 -1
  87. package/bt/es/{index-D2422Gy2.js → index-B8gY9xmJ.js} +1 -1
  88. package/bt/es/index-BPrvfRRS.js +1 -0
  89. package/bt/es/{index-CGVIDev1.js → index-BYiVD5jT.js} +1 -1
  90. package/{sa/es/index-DGZx2pvx.js → bt/es/index-BjlsTBER.js} +1 -1
  91. package/bt/es/{index-CWMeUXrL.js → index-EYNpTXgp.js} +1 -1
  92. package/bt/es/{index-CxgFGaL5.js → index-rMNjBIuC.js} +1 -1
  93. package/{sa/es/index-Dh1cVUP1.js → bt/es/index-vU-itVzj.js} +1 -1
  94. package/bt/es/index.js +1 -1
  95. package/{sa/es/styles-Crx99CYX.js → bt/es/styles-B0SQwzT9.js} +1 -1
  96. package/{sa/es/styles-CcIJWYWy.js → bt/es/styles-BV5q5rVU.js} +1 -1
  97. package/bt/es/{styles-CBE4gFj5.js → styles-Bns43xdH.js} +1 -1
  98. package/bt/es/{styles-a62-I7WZ.js → styles-BtwMoyYF.js} +1 -1
  99. package/bt/es/{styles-CslxHoro.js → styles-BtxV7cF8.js} +1 -1
  100. package/{vg/es/styles-By5QF5Dw.js → bt/es/styles-C0zfq4pb.js} +1 -1
  101. package/bt/es/{styles-Dm7hNAqs.js → styles-ChfUyVsf.js} +1 -1
  102. package/{vg/es/styles-B4s-niQQ.js → bt/es/styles-DPlCSMCw.js} +1 -1
  103. package/bt/es/{styles-B2H5TaWm.js → styles-Dp8Hv2t_.js} +1 -1
  104. package/btv2/es/{_auto-entry_btv2-CDqjtdoo.js → _auto-entry_btv2-CfBxYtww.js} +1 -1
  105. package/btv2/es/{events-Bwsqx46L.js → events-Cx4ZzvvW.js} +1 -1
  106. package/btv2/es/index-B-gWYb-_.js +1 -0
  107. package/btv2/es/{index-CEho5MKP.js → index-BM83OPO2.js} +1 -1
  108. package/btv2/es/{index-BitUB5G3.js → index-BWJKifQ1.js} +1 -1
  109. package/btv2/es/{index-DGYDpM8W.js → index-BjA-VgfR.js} +1 -1
  110. package/btv2/es/{index-BcQFOEXp.js → index-BjaNodPM.js} +1 -1
  111. package/btv2/es/{index-BaxbkPsE.js → index-CJbH9Nnu.js} +1 -1
  112. package/btv2/es/{index-DPIWBt7x.js → index-CqHZiEo7.js} +1 -1
  113. package/btv2/es/{index-DJc7kQQG.js → index-DClQMn9A.js} +1 -1
  114. package/btv2/es/index.js +1 -1
  115. package/{sav2/es/styles-x2SLloNl.js → btv2/es/styles-BKoNBwis.js} +1 -1
  116. package/btv2/es/{styles-SZie2Hbj.js → styles-BQJNVnPY.js} +1 -1
  117. package/{vgv2/es/styles-BblnlQNQ.js → btv2/es/styles-BZicSflC.js} +1 -1
  118. package/btv2/es/{styles-CUaNIRvi.js → styles-Ba1nH5yh.js} +1 -1
  119. package/{sav2/es/styles-CGCDsrBz.js → btv2/es/styles-CF5Cf6BN.js} +1 -1
  120. package/{sav2/es/styles-B38cC9dG.js → btv2/es/styles-CFM_dL87.js} +1 -1
  121. package/{sav2/es/styles-Bj2HWScI.js → btv2/es/styles-Dw7KGAUZ.js} +1 -1
  122. package/{sav2/es/styles-DBui2dM6.js → btv2/es/styles-riMitYv4.js} +1 -1
  123. package/btv2/styles.css +1 -1
  124. package/e24/es/{_auto-entry_e24-B7wbA4dP.js → _auto-entry_e24-DjK-lwHI.js} +1 -1
  125. package/e24/es/{events-B9Xn4OeD.js → events-loOXbRAt.js} +1 -1
  126. package/e24/es/{index-CcrQY111.js → index-B1Vc735f.js} +1 -1
  127. package/e24/es/index-BInj4Rj-.js +1 -0
  128. package/e24/es/{index-C-uZozpj.js → index-CSDBADr-.js} +1 -1
  129. package/e24/es/{index-CS6UhqMV.js → index-CvXPj5-f.js} +1 -1
  130. package/e24/es/{index-DiHxHPxP.js → index-DI0TIyW1.js} +1 -1
  131. package/e24/es/{index-Hs7YNDrO.js → index-fhkLtYmz.js} +1 -1
  132. package/e24/es/{index-Bl6efMQP.js → index-oAySDF1Z.js} +1 -1
  133. package/e24/es/{index-B7l3Wwsk.js → index-y6zXqlcA.js} +1 -1
  134. package/e24/es/index.js +1 -1
  135. package/e24/es/{styles-B_cUuW1d.js → styles-8uE7v3y2.js} +1 -1
  136. package/e24/es/{styles-DZet4bGa.js → styles-B3JV-QoE.js} +1 -1
  137. package/e24/es/{styles-CA0O5UcW.js → styles-BBWQRmEJ.js} +1 -1
  138. package/e24/es/{styles-rBb8r4CF.js → styles-BKUAzM49.js} +1 -1
  139. package/e24/es/{styles-C75iKOYi.js → styles-Bg2SLIdL.js} +1 -1
  140. package/e24/es/{styles-BFU_tYcL.js → styles-Birf1Bas.js} +1 -1
  141. package/e24/es/{styles-DHRjedJA.js → styles-Bw-yrb9N.js} +1 -1
  142. package/e24/es/{styles-B6yQA5Sp.js → styles-CN5GzdXR.js} +1 -1
  143. package/e24/es/{styles-AuZyv1xt.js → styles-DE_3KeLB.js} +1 -1
  144. package/{tv4/es/styles-B9hoSIHO.js → e24/es/styles-DK2fS-Jq.js} +1 -1
  145. package/e24/es/{styles-BF20ou8W.js → styles-DmlE8zdG.js} +1 -1
  146. package/e24/styles.css +1 -1
  147. package/fotbollskanalen/cjs/index.js +1 -1
  148. package/fotbollskanalen/es/{_auto-entry_fotbollskanalen-DOBYfU37.js → _auto-entry_fotbollskanalen-CI0S9BST.js} +1 -1
  149. package/fotbollskanalen/es/{events-D5YVJePL.js → events-GpxQFZ6L.js} +1 -1
  150. package/fotbollskanalen/es/{index-CvsVC4x6.js → index-BC90G21f.js} +1 -1
  151. package/fotbollskanalen/es/{index-C3TM2kC_.js → index-BCCwiv-F.js} +1 -1
  152. package/fotbollskanalen/es/{index-BZ2aT5i6.js → index-B_hK4QdP.js} +1 -1
  153. package/fotbollskanalen/es/{index-9n73zzXk.js → index-DBBtV8Bh.js} +1 -1
  154. package/fotbollskanalen/es/{index-ZZKW3r6S.js → index-DIRIyFfu.js} +1 -1
  155. package/fotbollskanalen/es/{index-CZ5bl347.js → index-Dr4ubxf3.js} +1 -1
  156. package/fotbollskanalen/es/index-ZsqpFQGj.js +1 -0
  157. package/fotbollskanalen/es/{index-DMArIRIM.js → index-gBd3oXw4.js} +1 -1
  158. package/fotbollskanalen/es/index.js +1 -1
  159. package/fotbollskanalen/es/{styles-CKWxM8SI.js → styles-DA9WaG9N.js} +1 -1
  160. package/godare/cjs/index.js +1 -1
  161. package/godt/cjs/index.js +1 -1
  162. package/klart/cjs/index.js +1 -1
  163. package/koket/cjs/index.js +1 -1
  164. package/koket/es/{_auto-entry_koket-BNdd_09O.js → _auto-entry_koket-DEfmgngI.js} +1 -1
  165. package/koket/es/{events-CAKxhRxL.js → events-D0_5FbQs.js} +1 -1
  166. package/{svdv2/es/index-BfWRL5S9.js → koket/es/index-B7U2EHW4.js} +1 -1
  167. package/koket/es/{index-C6mpN1Yq.js → index-BqOr8r_c.js} +1 -1
  168. package/koket/es/{index-BkpucmKe.js → index-CowdQYI1.js} +1 -1
  169. package/koket/es/{index-X--Y4z2k.js → index-D10Ou5s4.js} +1 -1
  170. package/koket/es/{index-D-i7mp54.js → index-D7s9j4Bb.js} +1 -1
  171. package/koket/es/index-DpvOR_eo.js +1 -0
  172. package/koket/es/{index-_kmajxMt.js → index-DuVxolvH.js} +1 -1
  173. package/koket/es/{index-3VOo4FlV.js → index-w_Nlp66f.js} +1 -1
  174. package/koket/es/index.js +1 -1
  175. package/{svdv2/es/styles-BJEobDcD.js → koket/es/styles-CUMHyqBu.js} +1 -1
  176. package/minmote/cjs/index.js +1 -1
  177. package/package.json +1 -1
  178. package/pent/cjs/index.js +1 -1
  179. package/sa/cjs/index.js +1 -1
  180. package/sa/es/{_auto-entry_sa-DkZ5ZPW7.js → _auto-entry_sa-DQR9xmV3.js} +1 -1
  181. package/sa/es/{events-CJKyD_YF.js → events-Y_Bozuel.js} +1 -1
  182. package/sa/es/{index-JLLWUYXe.js → index-BJRaGX1M.js} +1 -1
  183. package/sa/es/index-BQbkcn4X.js +1 -0
  184. package/sa/es/{index-BPbb7Vip.js → index-ChKoHI-W.js} +1 -1
  185. package/sa/es/{index-DnWHnzJZ.js → index-DC0vWqhE.js} +1 -1
  186. package/sa/es/{index-BmUk_dBA.js → index-DpXnImm2.js} +1 -1
  187. package/{bt/es/index-D1Q0yx7j.js → sa/es/index-YIX8muVS.js} +1 -1
  188. package/sa/es/{index-CNer26AV.js → index-_MLxtc9b.js} +1 -1
  189. package/{bt/es/index-DGX6PEJk.js → sa/es/index-kEZsFFCN.js} +1 -1
  190. package/sa/es/index.js +1 -1
  191. package/{bt/es/styles-ASs0DQ2K.js → sa/es/styles-CATJwlqp.js} +1 -1
  192. package/{bt/es/styles-CQC8_nXv.js → sa/es/styles-CIckse01.js} +1 -1
  193. package/{vg/es/styles-BvAXYG12.js → sa/es/styles-Cauw7MsV.js} +1 -1
  194. package/{bt/es/styles-TOWTeMy7.js → sa/es/styles-CiaZpVRS.js} +1 -1
  195. package/sa/es/{styles-DAn35ncB.js → styles-D3M8kRuP.js} +1 -1
  196. package/sa/es/{styles-fXINsH2s.js → styles-DBp3GGDZ.js} +1 -1
  197. package/sa/es/{styles-D2yzJlco.js → styles-De3H3R71.js} +1 -1
  198. package/sa/es/{styles-DcEXdLsU.js → styles-Dm6HuWAm.js} +1 -1
  199. package/sa/es/{styles-nIgXDX2D.js → styles-HIVG0cQ1.js} +1 -1
  200. package/sav2/es/{_auto-entry_sav2-Y161NviV.js → _auto-entry_sav2-e_rKS28Z.js} +1 -1
  201. package/sav2/es/{events-BRMWarbK.js → events-D6-2pKRN.js} +1 -1
  202. package/sav2/es/{index-GTVAPW66.js → index-BSFfce1C.js} +1 -1
  203. package/sav2/es/{index-fvNOuaIT.js → index-Bho3d6r5.js} +1 -1
  204. package/sav2/es/index-BoqU_wdi.js +1 -0
  205. package/sav2/es/{index-1YVkoX_I.js → index-CA79QRLA.js} +1 -1
  206. package/sav2/es/{index-C-wPSWpj.js → index-ClSRYEbz.js} +1 -1
  207. package/sav2/es/{index-CPH9ZaPM.js → index-DtEzcqKv.js} +1 -1
  208. package/sav2/es/{index-CLwbegSc.js → index-IeE7bdoP.js} +1 -1
  209. package/sav2/es/{index-CahvpeRw.js → index-lHeuOWWL.js} +1 -1
  210. package/sav2/es/index.js +1 -1
  211. package/sav2/es/{styles-STxBQ2uY.js → styles-9VREKa71.js} +1 -1
  212. package/{btv2/es/styles-Bwo3tMjp.js → sav2/es/styles-BgNh2wET.js} +1 -1
  213. package/{btv2/es/styles-DCZzeepX.js → sav2/es/styles-BlrDogR8.js} +1 -1
  214. package/{vgv2/es/styles-Dvj_hoNI.js → sav2/es/styles-CMFnccAH.js} +1 -1
  215. package/sav2/es/{styles-Bs9DlYXz.js → styles-CX7yy8rw.js} +1 -1
  216. package/{vgv2/es/styles-CeUa37fy.js → sav2/es/styles-DlCGuLD2.js} +1 -1
  217. package/{vgv2/es/styles-DwbVipJb.js → sav2/es/styles-Dwe3Fe-E.js} +1 -1
  218. package/{btv2/es/styles-DsUAUbr3.js → sav2/es/styles-YniO2DK0.js} +1 -1
  219. package/sav2/styles.css +1 -1
  220. package/svd/cjs/index.js +1 -1
  221. package/svd/es/{_auto-entry_svd-C85C566P.js → _auto-entry_svd-BfV1AJn8.js} +1 -1
  222. package/svd/es/{events-Cj7h2AWN.js → events-DSnjDHqZ.js} +1 -1
  223. package/svd/es/{index-SdCGos_E.js → index-4_dtd_Nz.js} +1 -1
  224. package/svd/es/{index-DI93DEaG.js → index-BKpifh9L.js} +1 -1
  225. package/svd/es/{index-BfEJBlc4.js → index-BWgqf8l_.js} +1 -1
  226. package/svd/es/{index-DJ1Q70L9.js → index-C8ENINPd.js} +1 -1
  227. package/svd/es/{index-CcLV0roe.js → index-CN4_ZG8z.js} +1 -1
  228. package/svd/es/{index-Keh7fhKB.js → index-CV7ANOIf.js} +1 -1
  229. package/{tv4/es/index-DOh8icM8.js → svd/es/index-Cr7_XbDy.js} +1 -1
  230. package/svd/es/index-DBIEbRpI.js +1 -0
  231. package/svd/es/index.js +1 -1
  232. package/svd/es/{styles-B4a727aw.js → styles-CDmXwdMq.js} +1 -1
  233. package/svd/es/{styles-BCpd7ULy.js → styles-CNF1yxq1.js} +1 -1
  234. package/svd/es/{styles-7aQhwIHc.js → styles-D5jZceNE.js} +1 -1
  235. package/svd/es/{styles-B3v-7fD8.js → styles-D7pwd66S.js} +1 -1
  236. package/svd/es/{styles-CVgG3lZ8.js → styles-dHL9VCRb.js} +1 -1
  237. package/svd/es/{styles-WfnCbM1v.js → styles-icWE_1yW.js} +1 -1
  238. package/svdv2/es/_auto-entry_svdv2-BcUfbBfa.js +1 -0
  239. package/svdv2/es/{events-K_Uu0alU.js → events-OWcqETde.js} +1 -1
  240. package/svdv2/es/{index-CxGc8v2u.js → index-4TuABUNb.js} +1 -1
  241. package/svdv2/es/{index-t8wMJ7VK.js → index-B-5sR3em.js} +1 -1
  242. package/svdv2/es/{index-BRt2vvPh.js → index-B-gZvb1a.js} +1 -1
  243. package/{koket/es/index-C7Tk2Nao.js → svdv2/es/index-CRrt2phk.js} +1 -1
  244. package/svdv2/es/index-CjQS4bIg.js +1 -0
  245. package/svdv2/es/{index-Bea4XElp.js → index-Cp4P0lOh.js} +1 -1
  246. package/svdv2/es/{index-BNppZHzY.js → index-DI-IUV7a.js} +1 -1
  247. package/svdv2/es/{index-C7vrOjJT.js → index-DQhc1A0o.js} +1 -1
  248. package/svdv2/es/index.js +1 -1
  249. package/svdv2/es/{styles-Dg8m2ElM.js → styles-DAQeJGLW.js} +1 -1
  250. package/{koket/es/styles-CxrtvPjn.js → svdv2/es/styles-DU6GKYyS.js} +1 -1
  251. package/svdv2/es/{styles-CIoINXle.js → styles-DV_cS31-.js} +1 -1
  252. package/svdv2/es/{styles-B9UmBt8u.js → styles-q8tjiLiZ.js} +1 -1
  253. package/svdv2/es/{styles-Dtxz9p_F.js → styles-r94k2Ogi.js} +1 -1
  254. package/svdv2/es/{styles-C5se3bgv.js → styles-xbFCPGiP.js} +1 -1
  255. package/svdv2/styles.css +1 -1
  256. package/tek/cjs/index.js +1 -1
  257. package/tv4/cjs/index.js +1 -1
  258. package/tv4/es/{_auto-entry_tv4-BZeOck4r.js → _auto-entry_tv4-G4wXMmGu.js} +1 -1
  259. package/tv4/es/{events-CWaMZwAr.js → events-pcFOEJoT.js} +1 -1
  260. package/{svd/es/index-BSMdy5Jf.js → tv4/es/index-7jZqg9IW.js} +1 -1
  261. package/tv4/es/{index-D6QfhtHr.js → index-B3Zq_zKy.js} +1 -1
  262. package/tv4/es/index-CMVBpcCB.js +1 -0
  263. package/tv4/es/{index-W9cHtjZN.js → index-CldjSu9e.js} +1 -1
  264. package/tv4/es/{index-CkIFlT3U.js → index-Cnt4e3ps.js} +1 -1
  265. package/tv4/es/{index-C_cgLPmE.js → index-DEmtMgai.js} +1 -1
  266. package/tv4/es/{index-CMEx8d-u.js → index-DRa5UnRw.js} +1 -1
  267. package/tv4/es/{index-DjUs2qhC.js → index-DUbz_DM9.js} +1 -1
  268. package/tv4/es/index.js +1 -1
  269. package/{e24/es/styles-mlbSEDIm.js → tv4/es/styles-srtzmott.js} +1 -1
  270. package/tvnu/cjs/index.js +1 -1
  271. package/vg/cjs/index.js +1 -1
  272. package/vg/es/{_auto-entry_vg-DnAq5_xX.js → _auto-entry_vg-CcS60pNc.js} +1 -1
  273. package/vg/es/{events-Dza5yP0D.js → events-DcYJIYgO.js} +1 -1
  274. package/vg/es/index-B5iVsUGd.js +1 -0
  275. package/vg/es/{index-CjlntiG4.js → index-B7XBKxIp.js} +1 -1
  276. package/vg/es/{index-Dmpxwz7z.js → index-B8bbZO8S.js} +1 -1
  277. package/vg/es/{index-CMiuZU50.js → index-BJek5rnH.js} +1 -1
  278. package/vg/es/{index-D5j7yKtX.js → index-BiEklxDI.js} +1 -1
  279. package/vg/es/{index-BaxwQQoE.js → index-CGXdniUF.js} +1 -1
  280. package/vg/es/{index-noq0DJfU.js → index-DSbpVwJC.js} +1 -1
  281. package/vg/es/{index-DXi2UMeX.js → index-Dhs_aBb4.js} +1 -1
  282. package/vg/es/index.js +1 -1
  283. package/vg/es/{styles-D0V45A_9.js → styles-BOmcvLdY.js} +1 -1
  284. package/vg/es/{styles-hl3VRR-n.js → styles-BUnVwRjq.js} +1 -1
  285. package/vg/es/{styles-B8n1cyLQ.js → styles-C-UDzwap.js} +1 -1
  286. package/vg/es/{styles-D4KuAHNb.js → styles-C8WnA5iq.js} +1 -1
  287. package/vg/es/{styles-BIXlzgDD.js → styles-C8rhFDk0.js} +1 -1
  288. package/vg/es/{styles-61EIwArR.js → styles-CY46Woah.js} +1 -1
  289. package/vg/es/{styles-yvoZ0Ayx.js → styles-CYO-qbgo.js} +1 -1
  290. package/vg/es/{styles-CTPU3Wps.js → styles-D6gXCqfA.js} +1 -1
  291. package/vg/es/{styles-DlCOOpx2.js → styles-DTK1ytPI.js} +1 -1
  292. package/vg/es/{styles-DmUbpNWC.js → styles-DThjixCR.js} +1 -1
  293. package/vg/es/{styles-BjP967zl.js → styles-DgBfmIy8.js} +1 -1
  294. package/{bt/es/styles-DzLgkc0h.js → vg/es/styles-DhfX4wty.js} +1 -1
  295. package/{sa/es/styles-BXnup2gy.js → vg/es/styles-WdfGE1vN.js} +1 -1
  296. package/{sa/es/styles-BWp6ibRA.js → vg/es/styles-k7ctIud7.js} +1 -1
  297. package/vg/es/{styles-CJCzLs9M.js → styles-r9CN6Xqb.js} +1 -1
  298. package/vgv2/es/{_auto-entry_vgv2-BYimp0Oa.js → _auto-entry_vgv2-D8xLvWfw.js} +1 -1
  299. package/vgv2/es/{events-Bp7c_ZBX.js → events-BGIokOuX.js} +1 -1
  300. package/vgv2/es/{index-CKBGdXxX.js → index-2x8ZF8_J.js} +1 -1
  301. package/vgv2/es/{index-DhELpN64.js → index-B0YjlIVR.js} +1 -1
  302. package/vgv2/es/{index-ChS9uilK.js → index-BqjERdTT.js} +1 -1
  303. package/vgv2/es/{index-D7m7JAFD.js → index-CXLmKEVK.js} +1 -1
  304. package/vgv2/es/index-DgML9rtP.js +1 -0
  305. package/vgv2/es/{index-BmaivphC.js → index-Djn8Hkcc.js} +1 -1
  306. package/vgv2/es/{index-DcVg-EPX.js → index-Myyh_GsU.js} +1 -1
  307. package/vgv2/es/{index-ChdB1Jcx.js → index-yOblXrl5.js} +1 -1
  308. package/vgv2/es/index.js +1 -1
  309. package/vgv2/es/{styles-DoVRojxP.js → styles-5DjDlCLb.js} +1 -1
  310. package/vgv2/es/{styles-CS3GmKsg.js → styles-B26CdnEm.js} +1 -1
  311. package/{sav2/es/styles-BjHpF-FY.js → vgv2/es/styles-B3TdcdzK.js} +1 -1
  312. package/{btv2/es/styles-BhTl_whd.js → vgv2/es/styles-BiGK2l-c.js} +1 -1
  313. package/vgv2/es/{styles-7Zl3kQOd.js → styles-Cl9HXwz7.js} +1 -1
  314. package/vgv2/es/{styles-CB-M2VFG.js → styles-Ct1gD3PE.js} +1 -1
  315. package/{btv2/es/styles-nHjT7Ut1.js → vgv2/es/styles-DcMCBrIu.js} +1 -1
  316. package/vgv2/es/{styles-2BM4Ub5e.js → styles-DemtalRC.js} +1 -1
  317. package/vgv2/es/{styles-DHQYWlcj.js → styles-DhlApRYo.js} +1 -1
  318. package/vgv2/es/{styles-BRicx3fn.js → styles-DsPGGAm-.js} +1 -1
  319. package/{btv2/es/styles-Dv5vw2Jl.js → vgv2/es/styles-Dw-Sfztt.js} +1 -1
  320. package/vgv2/es/{styles-Ba5UHR8O.js → styles-Dyj-n9Uy.js} +1 -1
  321. package/vgv2/es/{styles-Dd2Q8w3A.js → styles-DzC8qF7z.js} +1 -1
  322. package/vgv2/es/{styles-Bl3de9KZ.js → styles-dZA0NfCO.js} +1 -1
  323. package/vgv2/es/{styles-8CUb-FYo.js → styles-hJi9xXb2.js} +1 -1
  324. package/aftenposten/es/index-BHRoXm_K.js +0 -1
  325. package/aftenpostenv2/es/index-BjuINZLN.js +0 -1
  326. package/aftonbladet/es/index-BnCT_1FR.js +0 -1
  327. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-BSLFIoCP.js +0 -1
  328. package/aftonbladetv2/es/index-Dw5yr3Oh.js +0 -1
  329. package/bt/es/index-Cs3KAm2M.js +0 -1
  330. package/btv2/es/index-DtIAk5ft.js +0 -1
  331. package/e24/es/index-BEvArs-h.js +0 -1
  332. package/fotbollskanalen/es/index-DiiHsKd6.js +0 -1
  333. package/koket/es/index-D8khGTtd.js +0 -1
  334. package/sa/es/index-Da6wJ_B9.js +0 -1
  335. package/sav2/es/index-BedE7ut1.js +0 -1
  336. package/svd/es/index-DX4FWZSz.js +0 -1
  337. package/svdv2/es/_auto-entry_svdv2-CAU0XwEg.js +0 -1
  338. package/svdv2/es/index-DDNWk11c.js +0 -1
  339. package/tv4/es/index-C77Kb6EH.js +0 -1
  340. package/vg/es/index-D03KnNsC.js +0 -1
  341. package/vgv2/es/index-DylrqvOR.js +0 -1
package/godt/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,t,n=require("react/jsx-runtime");function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=i(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function d(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=o(e[t],n)}),a(t).forEach(function(r){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(s(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):i[r]=o(t[r],n))}),i}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):d(e,t,i):o(t,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e=l}());const r=["placements","takeover","refreshConfig","editory"],a={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},s=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},d=(e,t)=>{console.warn("[Advertory WARN]: ",e)},l=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:i,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||d("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||d("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||d("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||d("pageContext.deviceType is required."),n||d("pageOptions is required."),i||d("placements is required."),(null==o?void 0:o.defaultThreshold)||d("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,i,o;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(i=e.fullscreenScroll)||void 0===i?void 0:i.enabled),property:"main",featureName:"fullscreenScroll"},{flag:!!(null===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&d(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},c=6;class u{set(e){l(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of r){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.prototype.hasOwnProperty.call(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=o(u.DEFAULT_SITE_HANDLERS,e)}}u.DEFAULT_SITE_HANDLERS={siteEvents:a,initNativeAd:function(){}};const p=new u,v=p.modifyConfigProperties.bind(p),g={NO:"no",SE:"se"},h=e=>e===g.NO?"no-sno":"se-generic";let m="";const y=new Map,f=e=>{const{pageSetup:{tag:t}={}}=p.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(m!==window.location.pathname&&(y.clear(),m=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=y.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=p.get();return`${e}-${t}`})()}-count`]=i,y.set(n,i+1),e})):e},w=e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e},b="0123456789abcdefghijklmnopqrstuvwxyz",k=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},x=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})}),I="advertory-wallpaper-background",T="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${I}`);e&&e.remove()},A=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${I}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},P=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,O=e=>P.test(e),j=e=>e.startsWith("wallpaper:color:"),$=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundImage=`url(${e})`)},L=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundColor=e)};var _=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(T),n.classList.add(T))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(I),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(A(n),window.addEventListener("scroll",()=>A(n)))})(n),e()},isShortWallpaperColorMessage:j,isShortWallpaperUrlMessage:O,removeWallpaperBackground:S,setWallpaperBackgroundColor:L,setWallpaperBackgroundImage:$});const N=e=>new URLSearchParams(window.location.search).get(e),q="takeover",M="native_override_desc2",D=()=>null!==N("disable_prebid"),F=e=>{if("0"===N("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&S())},B=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))};class R{initialize(){this.DATA=Object.assign({},R.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}R.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const U=new R,V=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},z=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=U.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},H=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{F(e.id),z(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=w(e.id)}),x(()=>window.apntag.clearRequest())},W="noGroupedPlacements",K=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},G=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},J=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,pageContext:{deviceType:o}}=p.get(),r=n[o].filter(G)||[],a=e?document.querySelector(e):document;if(!a)return[];const s=r.reduce((e,t)=>{const n=K(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({targetId:e})=>e.match(t)),s=(null==i?void 0:i.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${o}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,d=a.querySelectorAll(s),l=Array.from(d).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const o=X(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),s=`${e.id}-${k(6)}`;return e.id=s,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&U.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},o),{targetId:s})});return f(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(s)},X=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:r||o},Q=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=p.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=w(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(w(e.targetId)));return n})(e,i),s=Object.keys(r),d=((e,t)=>e.filter(e=>!t.has(w(e.targetId))))(e,new Set([...s,...o]));return Object.assign(Object.assign(Object.assign({},a),r),{[W]:d})},Y="ABSOLUTE_FULLSCREEN",Z="ANY_FULLSCREEN",ee="NINESIXTEEN",te="FULLWIDTH",ne="FULLSQUARE",ie="TAKEOVER",oe="VELVET_TAKEOVER",re="WALLPAPER",ae="COLLAPSE",se={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],NINESIXTEEN:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],FULLSQUARE:[{width:1080,height:1080}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},de={wallpaper:1600,"l-format":1600},le=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Ce(e,Z)},ce=e=>{const{native:t}=e;return!!t},ue=e=>Ce(e,te),pe=e=>{const{targetId:t}=e;return t.includes("takeover")||Ce(e,ie)},ve=e=>Ce(e,ie),ge=e=>Ce(e,re),he=e=>Ce(e,ae),me=e=>e.targetId.includes("sponsorstripe"),ye=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},fe=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),we=e=>e.targetId.startsWith("midboard"),be=e=>e.targetId.includes("widescreen"),ke=e=>e.width>=1260&&e.width<=1280,xe=e=>e.width>=1600&&e.width<=1620,Ce=(e,t)=>{const n=se[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===o,s=!t.height||t.height===r;return a&&s})};function Ee(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function Ie(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Te=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return s("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(s("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{s("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{s("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);s("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),Se="cmp:loaded";let Ae="undefined"!=typeof window?window._tcf_:void 0,Pe=!1;const Oe=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=N("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(s("TCF bypass param detected, returning consent: true"),!0):(s("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(Pe)return null;if(!Ae)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Ae.getConsentedToAllSync();return s(`TCF consented to all is: ${t}`),Ae.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(s("Getting TCF consent manager..."),window._tcf_)return s("TCF consent manager is already available"),Ae=window._tcf_,void e(Ae);s("TCF consent manager is not available");const n=()=>{s("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Ae=window._tcf_,e(Ae)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(Se,n),Pe=!0,t(new Error("Timeout waiting for CMP to load"))},o);s("Listening for CMP loaded event..."),document.addEventListener(Se,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>Ie(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.SE,i=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.NO;if(t||i)return s("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Te(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Ae)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{s("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);Ae.onTcfReady(()=>{s("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Ae.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},je=(e,t,n,...i)=>Ie(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return s(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=Oe(e,0,n);return(yield o())?(s(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(s(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),$e=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Le=e=>Ie(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e,{getConsentAsync:o}=Oe(t,0,i);if(!(yield o()))return;const r=$e("_pulse2data");return r?r.split(",")[9]:void 0}),_e=()=>{const e=$e("_pulse2data");return e?e.split(",")[2]:void 0},Ne="splash",qe="welcomePage",Me="topscroller",De="velvet",Fe=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},Be="takeover-displayed",Re="takeover-visit-count",Ue=14400,Ve=()=>{const e=$e(Re);return e?parseInt(e):0},ze=()=>{const e=Ve(),{takeover:{options:{cookieCapTime:t=Ue}={}}={}}=p.get(),n=document.location.hostname;window.document.cookie=`${Re}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},He=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=p.get();return"0"!==N(q)&&("1"===N(q)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=p.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Be;return"true"===$e(n)})())&&(!t||We()))},We=()=>{const e=Ve();return 0===e?(ze(),!1):1===e},Ke=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ge=()=>{const{takeover:e}=p.get();return Boolean(null==e?void 0:e.topscroller)},Je=e=>{const{width:t,height:n}=e;return Ke(t,n)?Ne:Ce(e,oe)?De:Ge()?Me:qe},Xe=()=>Ie(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Be,cookieCapTime:n=Ue}={}}={},pageContext:{isMobileApp:i,countryCode:o},tcf:r}=p.get(),a=yield je(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Qe=e=>{var t,n;const i=!!(null===(n=null===(t=p.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return pe(e)&&i},Ye=(e,t)=>{var n;if(t===Me){const{topscroller:t}=e;return null!=t?t:{}}if(t===Ne){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ze=(e,t)=>{t!==Ne?(e=>{var t,n;const i=null===(t=p.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=p.get().takeover)||void 0===n?void 0:n.topscroller;if(!i||o)return;const r=document.querySelector(i),a=document.querySelector(".welcome-page-wrapper"),s=document.querySelector(`#${e.targetId}`),d=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&d&&s))return;const l=null==r?void 0:r.offsetHeight,c=ve(e)?"60svh":`calc(100svh - ${l}px)`,u=ve(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),s.style.setProperty("height",c,"important"),d.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=p.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},et=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})});var tt=Object.freeze({__proto__:null,addTakeoverCookie:Xe,adjustTakeoverHeight:Ze,canDisplayTakeover:He,getProperWelcomePageConfig:Ye,getTakeoverVariant:Je,handleTakeoverCookieOnAdNotShown:e=>Ie(void 0,void 0,void 0,function*(){Qe(e)&&(yield Xe())}),incrementArticleVisitCount:ze,isSplashVariant:Ke,isTopscroller:Ge,scaleAd:et,shouldAddTakeoverCookieForNotShownAd:Qe});const nt={nativeAd:e=>ce(e)&&!me(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:ue,fullscreenScroll:le,topscroller:e=>pe(e)&&Ge(),splash:e=>pe(e)&&Ke(e.width,e.height),welcomePage:pe,wallpaper:ge,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:ke,hFormat:xe,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!xe(e)&&!ke(e),topboard:e=>e.targetId.startsWith("topboard")&&!pe(e),widescreen:be,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:me,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!fe(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!we(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:fe,midboard:we},it=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const a=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(o,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,i;for(const[o,r]of Object.entries(nt))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},ot=e=>{var t;return(null===(t=Object.entries(nt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},rt="mobile",at="tablet",st="desktop",dt="web_desktop",lt="web_phone",ct="wde",ut="wph",pt=()=>{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"},vt=e=>e===rt,gt=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},ht=(e,t=window.screen.width,n,i)=>{const o=gt(e,t);if(n&&n(e,o),i)return void i(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${o})`,r.style.transformOrigin="left top")},mt=(e,t)=>{if(e&&t)return t/e},yt=new Map;yt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),yt.set("panorama",{scale:.79,transformOrigin:"center center"}),yt.set("outstream",{scale:.79,transformOrigin:"center center"}),yt.set("integration",{scale:.79,transformOrigin:"center center"}),yt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var ft=Object.freeze({__proto__:null,calculateScaleFactor:gt,getAspectRatio:mt,scaleAd:ht,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=ot(e),o=yt.get(i),r=document.querySelector(`#${e.targetId}`);if(!r||!o)return;if(r.style.transformOrigin=o.transformOrigin,r.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),s=null==r?void 0:r.offsetWidth;a&&"number"==typeof s&&!isNaN(s)&&a.style.setProperty("right",String(-1*s*.2)+"px")},scaleAds:e=>{var t,n,i,o,r,a;const{adScaleConfig:s,pageContext:{deviceType:d}}=p.get();if(!(null==s?void 0:s.enabled))return;if(Ce(e,Z))return;const l=null!==(t=s.adsToBeScaled[d])&&void 0!==t?t:[],c=K(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=s.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),g=null!==(o=null==v?void 0:v.offsetWidth)&&void 0!==o?o:window.screen.width,h=null!==(a=null===(r=null==v?void 0:v.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;ht(e,(g<h?g:h)-u)}});const wt={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&"native"!==e.adType&&((e,t)=>{ht(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=>{}},bt={SVD:"svd",VG:"vg",GODARE:"godare",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen"},kt={publisherClassName:bt.GODT,fullWidthFormatClassName:"netboard"},xt=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,i=xt)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=xt)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return s("Error with parsing localStorage data"),null}}}})(),Et="glimrTags",It=["glwe_","glwet_"],Tt={geofenceTags:[],geoTags:[],weatherTags:[]},St=(...e)=>Ie(void 0,[...e],void 0,function*(e=p.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield je(t,n,i,"glimr")}const{getConsentAsync:o}=Oe(t,0,i);return yield o()}),At=()=>Ie(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield St())||!(null==e?void 0:e.enabled))return void s("No consent for glimr data fetching.");const t=yield(n=500,Ie(void 0,void 0,void 0,function*(){return yield Promise.race([Ie(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{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})}),Pt={svd:"svd",vg:"vg",godare:"godare",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},Ot=e=>It.some(t=>e.startsWith(t)),jt=e=>e.startsWith("glgc_"),$t=e=>!Ot(e)&&!jt(e),Lt=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield St(e);if(!(null==i?void 0:i.enabled)||!r)return s("No consent for getting glimr tags."),{};const a=h(o),d=_t(e,Boolean(n));return{[`${a}-geo`]:d.geoTags,[`${a}-weather`]:d.weatherTags,[`${a}-geofence`]:d.geofenceTags}}),_t=(e,t)=>{const n=Nt();if(!n)return Tt;const i=((e=[])=>e.filter(Ot))(n),o=((e=[])=>e.filter(jt))(n),r=((e=[],t,n)=>{var i;const o=e.filter($t);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=Pt[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},Nt=()=>{const e=Ct.getByTimestamp(Et);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},qt=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),Mt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Dt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},pageContext:{countryCode:o}}=p.get(),r=[`${h(o)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?r:[]],s=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:s}}},d)}},Ft={get:(e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>Ie(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},Bt="advertory:ppids-cache",Rt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},Ut={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Vt={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},zt={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Ht={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Wt={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},Kt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Gt{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const Jt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return Ie(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},Xt=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return Ie(this,void 0,void 0,function*(){var n,i,o,r,a,s,d,l,c,u,p;const v=Ct.get(Bt),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(s=g.idfv)||void 0===s?void 0:s.plain,null===(d=g.anId)||void 0===d?void 0:d.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});Ct.set(Bt,o)}hashPPIDs(e,t){return Ie(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Ft.post(t,n,e)}catch(e){return s("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return Ie(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${Kt[t]}:${n}`:null}))(t,n),o=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),r=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Qt=e=>Ie(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:i,isMobileApp:o}}=e;if(!(yield je(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([Jt.processPPIDs(t,null==n?void 0:n.timeout),Xt.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){s(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Yt=e=>{const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Xt.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]).add(r,Ht[e]).add(a,Wt[e]).buildEids()}]}},Zt=()=>{const{ppid1:e,ppid2:t}=Jt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},en=e=>{const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Xt.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]).add(r,Ht[e]).add(a,Wt[e]).buildRyEids()}}]}}},tn=e=>{const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o}=Xt.getPPIDs();return(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]).buildRyEids()},nn=e=>Ie(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o}=Xt.getPPIDs(),r=(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),on=(e,...t)=>Ie(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),rn="advertory-fullscreen-scroll",an="advertory-fullscreen-scroll-wrapper",sn="fullscreen-scroll-in-screen",dn="in-screen",ln=e=>e.includes("snoap.no"),cn=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},un=Fe([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,a=e/o,s=t/r;i.style.transform=`scale(${a},${s})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),pn=e=>{const t=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},vn=[],gn={},hn=(e,t)=>{var n;const i=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>mn(e,i),{}),r=fn(e);o.observe(e),i&&(gn[r]=kn(e,null==t?void 0:t.options))},mn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=fn(e);n?(yn(i,n),wn(e,i,t)):(yn(i,n),bn(e,i,t))})},yn=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},fn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},wn=(e,t,n)=>{e.classList.add(dn),document.body.classList.add(sn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),vn.includes(t)||vn.push(t),n&&window.addEventListener("scroll",gn[t],{passive:!0})},bn=(e,t,n)=>{vn.includes(t)&&(n&&window.removeEventListener("scroll",gn[t]),document.body.classList.remove(sn),e.classList.remove(dn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},kn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&xn(e,r,o,0),a.length&&xn(e,a,o,40)}},xn=(e,t,n,i)=>{const o=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let s;s=a>r?(a-r)/t-i:(r+t-(a+o))/t;const d=s<=0;e.style.visibility=d?"hidden":"",e.style.zIndex=d?"":n.toString(),e.style.pointerEvents=d?"none":"all",e.style.opacity=s.toString()})};function Cn(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}Cn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100vw !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top: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 En="left",In={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 Tn=null;const Sn=(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=`(${un})()`,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(ln(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=pn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>ln(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)),ln(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)),cn(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},An=()=>{Tn=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},Pn=()=>{Tn||(Tn=window.requestAnimationFrame(An))},On=(e,t)=>{var n,i,o,r;const{pageContext:{countryCode:a,deviceType:s}}=p.get(),{targetId:d}=e,l=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==l?void 0:l.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),((e,t)=>{var n;const{articlesContainerWidth:i=1302,backgroundColor:o="#fff",foregroundColor:r="#fff",margin:a,beforeContentValue:s=""}=e,d=null!==(n=null==a?void 0:a[t])&&void 0!==n?n:"16px 0",l=i/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${o} 0px,\n ${o} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${o} calc(50% + ${l}px),\n ${o} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${d};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${s&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${s}' !important;\n }`,c.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(c)})(null!==(i=null==l?void 0:l.overlayStyles)&&void 0!==i?i:{},s);const c=document.getElementById(d),u=null==c?void 0:c.parentElement;if(!c||!u)return;hn(u,t),c.className=rn,hn(u,t),c.className="advertory-fullscreen-scroll";const v=Ce(e,Y)?"absolute":"fixed";c.style.position=v,u.className=an,u.dataset.showTagSubscribeId=d,c.setAttribute("data-ad-label",In[a].adText),(null==l?void 0:l.cogwheelPosition)===En&&(c.dataset.moveCogwheelToTheLeft="true"),Pn(),window.addEventListener("resize",Pn),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",Pn),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",Pn)},jn=e=>{if(!(null==e?void 0:e.classList.contains(rn)))return;e.classList.remove(rn),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(an))&&(t.classList.remove(an),t.classList.remove(dn))};var $n=Object.freeze({__proto__:null,createFullscreenScrollAd:On,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=cn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=cn(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Sn(t,e))},undoFullscreenScrollContainer:jn});const Ln=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},_n=(e,t,n)=>{var i,o,r,a;const s=document.createElement("div");s.id=`${e}-button`,t.appendChild(s);(null===(o=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),Ln(e);const d=s.firstElementChild;d&&t.insertBefore(d,s),s.remove()},Nn="ad-loaded",qn=()=>Ie(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:i},fullscreenScroll:o}=p.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=p.getHandlers(),{getConsentAsync:a}=Oe(t,0,n),d=yield a(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=qt(),{prebid:{relevantCallbackTimeout:r}={}}=p.get(),a="relevantCb"===i&&r?r:n[i].timeout,s=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},a);t.push(s)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=qt(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=qt();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=Mt();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return s("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=Mt();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const a=d?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};s("prebid consentManagement",a),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},en(n)),Dt(g,v))),s("core add prebid config",Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},en(n)),Dt(g,v))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{Mn(e,r)},directRenderFn:e=>{var t;const{settings:n,renderFn:r}=e,{bid:a,adDiv:s}=n||{};if(!s)return;const d=r(n),l=Object.assign(Object.assign({},a),{targetId:s.id,banner:!0}),c=s.id,u=document.getElementById(c);u&&(le(l)?(On(l,o),i?u.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 i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(d)):(jn(u),null===(t=null==u?void 0:u.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),u.classList.add(Nn),(null==a?void 0:a.creativeId)&&_n(c,u,Number(null==a?void 0:a.creativeId)))}}),s("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{Mn(e,r)},directRenderFn:()=>{}})})}),Mn=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],s=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,s);const d=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:o,targetId:s},p.get()),null==d||d.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},Dn=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,a]=t;if(!i.dataset.lockedsize&&a&&r)i.style.width=`${r}px`,i.style.height=`${a}px`,n&&(o.resizeAd(i.id,[r,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},Fn=["netboard","board"];class Bn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return Ie(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",a=(null==o?void 0:o.userId)?String(o.userId):"",d=this.buildUrl(e,{envId:r,spid:a});try{s("Starting fetching DrEdition ad from URL:",d);const e={method:"GET"},t=yield Ft.get(d,e);return s("Fetch operation completed successfully."),t}catch(e){s("Error during fetch operation:",e)}return null})}}let Rn=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return Ie(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const Un=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 Vn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return Ie(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,a=e.querySelector(o);if(!a)return void s(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(s("No Dr. Edition ads available to render. Collapsing whole placement."),F(e.id),void Un(a)):((null==d?void 0:d.itemId)&&r&&(s("Dr. Edition ad available to render as a Xandr backfill."),B(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(a,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),Un(a),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):Un(a))):(s("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Un(a))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}class zn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return Ie(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Oe(n.tcf,n.isMobileApp,n.country),o=yield i(),r=vt(n.device)?t.mobileHTML:t.desktopHTML,a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Hn{constructor(e){this.strategy=e}handle(e,t){return Ie(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return Ie(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield on(t)}catch(e){s("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return Ie(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}let Wn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,p):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}};class Kn extends Wn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,p,v].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:p,urlPath:v},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let Gn=class extends Wn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:v)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const Jn={FRONT:"front"},Xn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},Qn=e=>Ie(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),Yn={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return Ie(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return ga})})}})}},Zn=(e,t)=>{null==e||e.forEach(e=>{Yn[e](t)})};class ei{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield Ie(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const a=["ContentMutePlugin"],s=this.createPlayerOverlay(e);Zn(a,s);const d={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},l=yield Qn(d);l.once("assetReady",()=>{Xn(l,a)}),l.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?s.classList.add("is-playing"):s.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?s.classList.add("is-inactive"):s.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),l.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield l.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Jn.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const ti="https://www.aftonbladet.se/video-player-extras/latest/";class ni{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${ti}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${ti}external-link.js`]:{name:"ExternalLink"}}};yield Qn(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 ii=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class oi{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},ii(e)?e:{}),{provider:Object.assign(Object.assign({},ii(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},s=yield Qn(a);s.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield s.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Jn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let ri=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const ai=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,s={[bt.VG]:new Rn,[bt.E24]:new ei,[bt.AFTONBLADET]:new ni,[bt.SVD]:new oi}[o]||new ri,d=new(a===g.SE?Kn:Gn)(n,s,r),l=new Bn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new zn(s,d),u=new Hn(s);return new Vn(l,c,u,d)},si=()=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class di{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return Ie(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return s("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return Ie(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const li=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=ai(n,i,o);e.forEach(e=>{var i,o,a;if(!e.isIntersecting)return;const s=e.target,d=null!==(i=s.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=s.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=s.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(s,Object.assign(Object.assign({},n),{editionName:d,columnName:l,primaryPosition:c})),t.unobserve(s)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},ci=()=>Ie(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),ui=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},pi=[],vi=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:a,publisher:d,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield je(o,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,s=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,d=r[o]||r.desktop,l=w(t.targetId),c=d.find(e=>e.targetId===l),u=Fn.some(e=>l.startsWith(e)),p=pi.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||s;return c&&u&&!p&&v?(pi.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void s("Pulse has not been passed as a prop, aborting");const v=yield si(),g=new di(v),h=ai({publisher:d,pageType:l,country:c},g,null==i?void 0:i.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const y=document.createElement("div");y.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:o,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),gi=(e,t)=>{var n,i,o;if(!ui())return void s("Ad block not enabled, Dr. Edition backfills will not be rendered");s("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:r},finnBlink:a}=e,d=null===(i=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===i?void 0:i[r],l=null!==(o=null==d?void 0:d.map(([e])=>e))&&void 0!==o?o:[],c=new IntersectionObserver((t,n)=>Ie(void 0,void 0,void 0,function*(){for(const i of t){if(!i.isIntersecting)continue;const t=i.target;n.unobserve(t),yield vi(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 hi=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:i,pulseData:o,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},s=a(o,"data-pulse"),d=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},s,d,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:i})]}))},getDrEditionManager:ai,handleDrEdition:e=>Ie(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield je(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield si(),i=new di(n);li({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:vi,handleDrEditionBackfillOnAdblock:gi});const mi="collapseAd",yi="hideAd",fi="resizeAd",wi="renderDrEditionFallback",bi="wallpaperImageUrl",ki="wallpaperColor",xi="velvet",Ci=[fi,bi,ki,mi,yi,wi,xi];let Ei;const Ii=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(O(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:bi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:ki,wallpaperColor:t}}if(e.startsWith(wi)){const t=e.split(":")[1];return{name:wi,targetId:t}}if(e.startsWith(mi)||e.startsWith(yi)){const t=e.split(":")[1];return{name:mi,targetId:t}}if(e.includes("name")&&Ci.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!Ci.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:s,size:d}=n;i===xi&&s&&(s.includes("noScroll")&&(Ei=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(s.includes("close")||s.includes("ended"))&&(null==Ei||Ei(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==mi&&i!==yi||!o||F(o),i===fi&&o&&s&&Dn(o,s),i===wi&&o&&(F(o),vi(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&d&&Dn(o,d,!0),i===bi&&r&&$(r),i===ki&&a&&L(a)},Ti=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Si=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),x(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return La});yield t(e,o,null)}),withFullAdsChain:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return La});yield t(e,o,r,()=>Ie(void 0,void 0,void 0,function*(){if(!U.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return _});t(e)}))})}},Ai=(e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return ye(t)&&i?(s(`loading finn blink ad for blink only placement for ${t}`),void Si().withFinnBlinkAd(t)):ye(t)?(s(`loading finn blink ad with full ads chain for ${t}`),void Si().withFullAdsChain(t)):void x(()=>(s("core showTag",{id:t}),e.showTag(t)))},Pi=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield C,yield E;const n=new IntersectionObserver((t,n)=>((e,t,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(r);s("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,i),a&&(t.unobserve(a),t.disconnect())})})(t,n,Ai,e),Ti(t));n.observe(e)}),Oi=new Map,ji=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],$i=".brandstudio-premium-content-widget",Li=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),_i=({adWrapper:e,placementContainer:t})=>{const n=Li({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),z(i=t),i.innerHTML=""},Ni=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},qi=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=ji.includes(n)&&Boolean(t.closest($i));const o=i?t.closest($i):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!i&&!a||i&&!o)return;if(a)return Ni(e),void r.disconnect();const s=t.closest('[style*="height"]'),d=o;s&&d.contains(s)?Ni(s):d.hasAttribute("style")&&Ni(d),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},Mi=(e,t,n,i,o,r)=>{var a;const s=performance.now(),d=null!==(a=Oi.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;s-d>=o&&l&&(Oi.set(t,s),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&_i({adWrapper:o,placementContainer:n}),x(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},Di=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,Mi,t,n),Ti(300));i.observe(e)},Fi=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},Bi=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Ri=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Ui=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Ki(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Vi=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t,n;return e.targetId===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==i?void 0:i.requestThreshold;Ri(o,r)&&i&&(V(i.targetId),n.length&&o.classList.remove(...n),Ki([i],t))}},zi=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Hi(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Vi(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Vi(e,!1,t))};n.persisted&&(Bi()?window.addEventListener("scroll",i,{passive:!0}):Vi(e,!1,t))})})(e,n))},Hi=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Wi=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Hi(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},Ki=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=Fi(i,n);if(t)for(const t of e){const e=Wi(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)x(()=>window.apntag.refresh(e))},Gi=e=>`externalImpId:'${e}'`,Ji=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,Xi=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:i}=p.get(),{targetId:o,sizes:r,keywords:a,allowedFormats:d,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:v,dynamicSizeWidthCheck:g=!1,globalPlacementId:h}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||He())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=Array.isArray(n)?n.filter(e=>e!==Me):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(e),m=Object.assign({invCode:l,sizes:r,targetId:o,keywords:Ji(a,c),allowedFormats:d,dynamicSizeWidthCheck:g,globalPlacementId:h},v&&{safeframeConfig:v}),y=(e=>{var t,n,i,o,r,a,d;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(s("Tracker state pageViewId is:",null===(r=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===r?void 0:r.pageViewId),null===(d=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===d?void 0:d.pageViewId):(s("Tracker state does not contain field pageViewId or it is empty"),""):(s("Tracker state is empty"),""):(s("Tracker is not configured in initAdvertory function"),"")})(i);n&&y&&(s("External Impression ID assigned to defineTag:",Gi(y)),m.externalImpId=Gi(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}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(m.native=f),m},Qi=e=>!e.includes("takeover")||He(),Yi=e=>{const{source:t}=e;return"csm"===t},Zi=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=p.get(),n=h(t),i=e[`${n}-targetid`],o=i?w(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[o]})},eo=e=>{const{pageContext:{countryCode:t}}=p.get(),n=h(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},to=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},no=(e,t)=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});Cn(".advertory-brandmetrics-survey{width:100%}");const io="advertory-brandmetrics-survey",oo="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",ro=()=>Ie(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var o;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),ao={pageContext:{publisher:"aftonbladet",countryCode:g.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},so={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},lo=e=>(null==e?void 0:e.parent)?[...lo(e.parent),e.shortPath||"unknown"]:[],co=(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]=lo(e);return so[n]||"ovrigaavdelningar"})(e)}_{position}`,uo={aftonbladet:ao},po={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:co(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:lo(e).join(":")}}},vo=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},go=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),ho="se-generic",mo="aa-sch",yo="kv_",fo="pause",wo="{deviceType}",bo="{position}",ko="afp_",xo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),Co="1-1",Eo="16-9",Io="3-4",To="9-16",So="responsive",Ao={[Co]:1,[Eo]:1.78,[To]:.56,[So]:1},Po={[Co]:1,[Eo]:1.78,[Io]:1.33,[To]:.56},Oo=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=st===n?ct:ut,s=o.replace(wo,a);return(e,n)=>{if(e===fo)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(bo,fo).replace(/-([a-z]+)_/,"-article-"))(s);if(n&&xo.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(wo,a).replace(bo,e)}return s.replace(bo,e)}},jo=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[i,o])=>{const r=Math.abs(e[n]-t);return Math.abs(o-t)<r?i:n},n[0][0])},$o=()=>{var e,t;const n=jwplayer().getContainer(),i=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return i&&"number"==typeof i.offsetWidth&&"number"==typeof i.offsetHeight&&0!==i.offsetHeight?i.offsetWidth/i.offsetHeight:1},Lo=()=>{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},_o=()=>{const e=null!==(t=Lo()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Lo()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},No=()=>Object.fromEntries(new URLSearchParams(window.location.search)),qo=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:i,countryCode:o}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},s={isMobileApp:e.isApp,countryCode:o,publisher:i,pageType:"front",deviceType:e.deviceType},d=(yield je(n,e.isApp,o,"video"))?"1":"0",l=yield ro(),c=yield nn(o),u=yield Le({tcf:n,pageContext:s}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>jo(Po,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?jo(Ao,Number(m.toFixed(2))):So;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${mo}-country_code`]:o,[`${mo}-publisher`]:i,[`${mo}-supply_type`]:(y=e.deviceType,y===st?dt:lt),[`kw_${mo}-page_type`]:"collection",[`${mo}-page_type`]:"collection",[`${ho}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${ho}-page`]:"index",[`${ho}-page`]:"index",[`${ho}-screenheight`]:String(window.screen.height),[`${ho}-screenwidth`]:String(window.screen.width),[`${ho}-viewportheight`]:String(a),[`${ho}-viewportwidth`]:String(r),[`${ho}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${ho}-mobile-os`]:pt(),[`${ho}-audience`]:void 0,[`${ho}-externalid_src`]:_o(),[`${ho}-tags`]:e.tags,[`${ho}-articleid`]:p,"article-id":p},yield Lt(Object.assign(Object.assign({},t),{pageContext:s}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${ho}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(No()).some(e=>e.includes(yo))&&(()=>{const e=No(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(yo)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":d,"kw_aa-sch-cmp_advertising":d,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),Mo=["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"],Do=["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"],Fo=["external_uid","gdpr","gdpr_consent","eids","article-id"],Bo=(e,t)=>{const n=[...Mo,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||Fo.includes(e)?e:`kw_${e}`,t]))},Ro=e=>Object.fromEntries(Object.entries(e).filter(([e])=>Do.includes(e))),Uo=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;uo[e]||d(`[video] No config found for publisher "${e}"`);return null!==(t=uo[e])&&void 0!==t?t:ao})(e.publisher),s=(e=>{var t;return null!==(t=po[e])&&void 0!==t?t:po.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),l="/"===window.location.pathname,c=null===(i=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===i?void 0:i.toString(),u=e.assetId===c,p=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:s,isUserPresentOnFrontPage:l,adsKeywords:yield qo({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==s?void 0:s.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:l,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:$o(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:vo(e.startMode)}}),Vo=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:s}=e,{invCode:d}=i||{},l=Oo(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(ko)?`${ko}${t}`:t)(d),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,o),"se-generic-playback-method":go.get(s),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},Bo(r,n)),Ro(r)),{vskippable:"0",referrer:u,vplaybackmethod:s})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},zo=e=>t=>Ie(void 0,void 0,void 0,function*(){const n=yield Uo(e,t);return Vo(n,e)}),Ho={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]}]},Wo={no:"NOK",se:"SEK"},Ko={no:"no",se:"sv"};class Go{buildFetchObject(e,t,n,i){return Ie(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:r}=i,{invCode:a,xandrPlacementId:s}=e,d=yield ro(),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(Ho),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:k(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},s&&{placement_id:s}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||Ko[o]||"no").split("-")[0]},regs:{ext:{gdpr:d.gdpr||0}},user:{id:yield Le(i),ext:{consent:d.gdpr_consent||"",eids:tn(o)}},at:1,cur:[Wo[o]],source:{tid:k(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,i){return Ie(this,void 0,void 0,function*(){try{s("Starting fetching Studio ad from Xandr:",oo);const o=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),d=a.size>0?`${oo}?${a.toString()}`:oo,l=yield this.buildFetchObject(e,t,n,i),c=yield Ft.post(d,o,l);return s("Fetch operation completed successfully.",c),c}catch(e){s("Error during fetch operation:",e)}return null})}}const Jo=0,Xo=3,Qo=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",a=i?`__${i}`:"",s=`advertory${r}-${n}${a}`,d=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(s),o.classList.add(d),t.dataset.adType=n},Yo="finn-blink",Zo="native-ad",er=(e,t)=>{tr(e,t),ir(e,t)},tr=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])rr(i)}),t.dataset.tracked="true")})},nr=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(or):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},ir=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:s=!1}={}}=t,d=s?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:st])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,nr(e),c.disconnect();break}},d);c.observe(o)},or=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?rr(e):window.navigator.sendBeacon(e)},rr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},ar=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:[]}),sr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{pageContext:{deviceType:o},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[o],d=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void s(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},Ti(d)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=U.getData("alertoryConfigKeywords"),v=null!==(i=c(Xi(e)).keywords)&&void 0!==i?i:{},g=new Go,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===rt?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===Jo){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,h,o),h.adType===Xo&&(Qo(t.pageContext.publisher,l,Zo,t.pageContext.pageType),er({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:o,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var o,r,a;let s;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(s=document.createElement("iframe"),n.appendChild(s)),_n(e,n,Number(null==i?void 0:i.adid)),null==s||s.remove()})(e.targetId,e.invCode,l,h.bid))}),dr=(e,t)=>{e.forEach(e=>sr(e,t).catch(e=>{s("Failed to handle server-side ad:",e)}))},lr={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},cr=e=>Ie(void 0,void 0,void 0,function*(){if(!(e=>{const{editory:{editableConfiguration:{enabled:t=!1,pageTypeToFetch:n}={}}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editory:{editoryUrl:n,editableConfiguration:{pageTypeToFetch:i}={}}={}}=e;return(null==t?void 0:t.publisherClassName)&&i?`${n||"https://alertory-cdn.inventory.schibsted.io"}/editable-configurations/${t.publisherClassName}/${i.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield Ft.get(t,{method:"GET",signal:n.signal})}catch(e){throw s("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?((e,t)=>o(t,e,lr))(e,t):e}catch(t){return s("Error fetching S3 config, using site config",{error:t}),e}}),ur=(e,t)=>{const{pageContext:{isMobileApp:n}}=p.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let pr,vr=[];const gr=["takeover","wallpaper"],hr=e=>{const t=(e=>{var t;const n=U.getData("alertoryConfigKeywords"),{queryConfig:i,placements:o,tcf:r,glimr:a,appearanceConfig:s,pageContext:{publisher:d,countryCode:l,pageType:u,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y,fullWidth:f}=e,w=null!==(t=null==i?void 0:i.batchSize)&&void 0!==t?t:c;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:d,countryCode:l,pageType:u,deviceType:p,isMobileApp:v},pageSetup:h,placements:o,tcf:r,queryConfig:Object.assign(Object.assign({},i),{batchSize:w})},a&&{glimr:a}),s&&{appearanceConfig:s}),m&&{takeover:m}),y&&{fullscreenScroll:y}),f&&{fullWidth:f})}})(e);window.advertory={initialized:!0,version:"3.3.7",siteConfig:e,alertoryConfig:t}},mr=()=>Ie(void 0,void 0,void 0,function*(){const{pageOptions:e}=p.get(),{preparePageOptions:t}=p.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=p.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return(yield je(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=U.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=eo(e);U.setData("alertoryConfigKeywords",n)})(o.keywords),x(()=>pr.setPageOpts(o))}),yr=e=>Ie(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),r=yield je(n,i,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>F(e.targetId)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(e,r);fr(a);(null==t?void 0:t.enabled)&&r&&!D()?(s("core loadPlacements prebid enabled"),yield qn()):(s("core load tags invoked without prebid enabled"),wr(a))}),fr=e=>{const{prepareTag:t}=p.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{s("core defineTags",{placement:e});const i=Xi(e);if(Qi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Zi(i),sizes:o}})(o);n.push(r),x(()=>(s("core defineTag - add to the queue",{placement:e,preparedTag:o}),pr.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},wr=e=>{const t=e.filter(({targetId:e})=>Qi(e)).map(({targetId:e})=>e);t.length&&x(()=>(s("core loadTags",{placementsIdsToLoad:t}),pr.loadTags([...t])))},br=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:i}}=p.get(),{requestThreshold:o,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),d=null==n?void 0:n.defaultThreshold[i];a&&(s("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:d}),yield Pi(a,null!=o?o:d)),a&&(null==r?void 0:r.scroll)&&(s("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),kr=e=>e.some(({targetId:e})=>gr.some(t=>e.includes(t))),xr=e=>Ie(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=c}={},pageContext:{deviceType:i}}=p.get(),o=Q(e),r=Object.keys((null==t?void 0:t[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),s=e.filter(({targetId:e})=>!a.has(e));return[...r,...Fi(s,n)]})(i);for(const e of o)kr(e)?(s("core loadAds without lazy loading",{placementsToLoad:e}),yield yr(e)):e.length&&(s("core loadAds with lazy loading",{placementsToLoad:e}),yield Cr(e));const{finnBlink:r}=p.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return La});yield e(n)}}),Cr=e=>Ie(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=p.get(),i=[];if(!t)return s("lazy load is not enabled",{placements:e}),void(yield yr(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{s("lazy load is enabled - handler start",{loadedTargetIds:i,placements:e});const o=e.every(e=>i.includes(e.targetId)),r=e.map(e=>e.targetId);!o&&i.push(...r),!o&&yr(e),s("lazy load is enabled - handler stop",{loadedTargetIds:i,placements:e,arePlacementsLoaded:o,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(s("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),Er=()=>Ie(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];x(()=>{pr.onEvent("adRequested",()=>{e.adRequested()}),pr.onEvent("adAvailable",o=>Ie(void 0,void 0,void 0,function*(){var r,a,d,l,c,u;s("core adAvailable start",{placementsAvailable:vr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Yi(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)});const v=null===(d=null===(a=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===d?void 0:d.adResponse.ads;if(Yi(o)&&v&&(null===(l=v[1])||void 0===l?void 0:l.rtb)&&(o.banner=null===(u=null===(c=v[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),le(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return $n});e(o)}const{widescreenSwitching:g}=p.get();if(be(o)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return Ma});e()}if(le(o)&&!ye(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return $n});e(o,i)}if(!ce(o)||Yi(o)||ye(o.targetId)||null==t||t(o,p.get()),pe(o)&&!he(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return ts});e(o.targetId),yield t(o)}if(ge(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return _});e(()=>x(()=>window.apntag.showTag(o.targetId)),n),U.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&U.setData("horseshoe",{isAvailable:!0}),it({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),e.adAvailable(o);const h=vr.find(({targetId:e})=>e===o.targetId);h&&(yield br(h,o),vr=vr.filter(e=>e.targetId!==h.targetId)),s("core adAvailable stop",{placementsAvailable:vr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Yi(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)})})),pr.onEvent("adLoaded",n=>Ie(void 0,void 0,void 0,function*(){const{refreshConfig:i,appearanceConfig:r,wallpaper:a,adScaleConfig:s}=p.get(),d=document.getElementById(n.targetId);if(ye(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return xa});e(n)}if(o.includes(n.targetId)&&ce(n)&&(null==t||t(n,p.get()),it({adObj:n})),!o.includes(n.targetId)&&Yi(n)&&o.push(n.targetId),he(n)&&F(n.targetId),pe(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return ts});e(pr,n.targetId)}if((e=>Ce(e,ee))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return rs});e(n)}if((e=>Ce(e,ne))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return rs});e(n)}if(ue(n)){const{applyFullwidthFormat:e}=yield Promise.resolve().then(function(){return rs});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;qi({adWrapper:o,placementContainer:i});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Di(i,a,r))})(n,i),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(U.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return _});e(n.targetId)}if(null==s?void 0:s.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return ft});e(n),t(n)}e.adLoaded(n),Ln(n.targetId),d&&(d.classList.add(Nn),(e=>{var t,n;const{pageSectionsSelectors:i}=p.get(),o=null==i?void 0:i.mainFirstColumn,r=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(d)),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:ot(n)}}))})),pr.onEvent("adNoBid",t=>Ie(void 0,void 0,void 0,function*(){var n;if(F(t.targetId),null===(n=p.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return hi});yield e(p.get(),t)}if(pe(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(t)}e.adNoBid(t)})),pr.onEvent("adError",(t,n)=>Ie(void 0,void 0,void 0,function*(){if(pe(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(n)}e.adError(t,n)})),pr.onEvent("adCollapse",()=>{e.adCollapse()}),pr.onEvent("adRequestFailure",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield vi(p.get(),t),e.adRequestFailure(t)})),pr.onEvent("adBadRequest",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield vi(p.get(),t),e.adBadRequest(t)})),pr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),pr.onEvent("adNoBidMediated",t=>Ie(void 0,void 0,void 0,function*(){yield vi(p.get(),t),e.adNoBidMediated(t)}))})}),Ir=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(i)return H(),[];o&&(H(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{B(e.id)})),v(null!=e?e:{}),yield mr();const{clientSidePlacements:s,serverSidePlacements:d}=ar(J(a));let l=s;return r&&(l=l.filter(e=>ye(e.targetId))),dr(d,p.get()),l.length>0&&(vr=[...vr,...l.map(e=>Object.assign({},e))],Ui(l),zi(l),yield xr(l)),vr}),Tr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;p.set(e),p.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:i,kilkaya:o,rightColumnSplit:r,drEdition:a,finnBlink:d}=e;if(U.initialize(),window.addEventListener("message",Ii,!1),pr=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=pr,s("Apn tag is set up on window"),yield Promise.allSettled([Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();(yield je(e,t,n,"xandr-endpoint"))||pr.setEndpoint("ib.adnxs-simple.com",!0)}),Ie(void 0,void 0,void 0,function*(){if(D())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get(),o=yield je(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield on(null==e?void 0:e.prebidUrl))}),Qt(e),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield on(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get();(yield je(t,n,i,"gpt-endpoint"))&&(yield on(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),Ie(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),{getConsentAsync:r}=Oe(n,0,o),a=yield r();if(e&&t&&a){if(yield on(t),document.querySelector(`.${io}`))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(io)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),At(),Ie(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=p.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield on(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==i?void 0:i.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return ss});yield e()}s("Libraries have been loaded and trackers have been set"),yield Er(),yield mr(),s("Page options have been set"),hr(e),s("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=ar(J());if(vr=l,dr(c,e),Ui(vr),zi(vr),yield xr(vr),s("Ads has been loaded",vr),gi(e,vr),to(vr),null==d?void 0:d.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return La});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 hi});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return ms});t(e.rightColumnSplit)}if(null==o?void 0:o.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return Es});yield t(e)}}),Sr=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield((e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{initConsentManager:o,getConsentAsync:r}=Oe(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(i=e.pageContext)||void 0===i?void 0:i.countryCode),a=yield cr(e);yield ci(),yield no(o),yield no(r),s("TCF resolved successfully"),yield Tr(a,t),s("Run function resolved successfully")}))(e,t)}),Ar=(e,t,n,i)=>{var o;const{image:r,icon:a,sponsoredBy:s,title:d,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:k}=e,x=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:x(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=d?d:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return x(t?w:a)})(),sponsoredBy:null!=s?s:"",title:null!=d?d:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:x(b),previewVideoSrc:null!=k?k:""},t)},Pr=(e,t)=>{const n=(i=M,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(M),r=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Or=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(bt).includes(i);n&&r&&Qo(i,e,Zo,o)})(o,n),i())},jr=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:s,targetId:d}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(i=Pr(e.targetId,l))&&void 0!==i?i:c,p=In[t.language||g.NO],v=Ar(s,p,d,t);return(s.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);Or(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&er(e,t)})},$r=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});jr(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Lr=e=>{const{pageContext:{countryCode:t}}=p.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,o=`${h(t)}-adformat`,r=n?n[o]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in de)||window.innerWidth>=de[e]);return{[o]:i?a:r}},_r=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},Nr=()=>{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},qr=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},Mr=(e,t)=>qr(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},Dr=e=>qr(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class Fr{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return Ie(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return Ie(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Br=9826;class Rr{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===rt?"phone":at}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return Ie(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return _e()}getExternalUid(){return Ie(this,void 0,void 0,function*(){return yield Le(p.get())})}isTrackingForbidden(){return Ie(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=Br}={}}=p.get();return"true"===N("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=p.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return Ie(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get(),{getConsentAsync:i}=Oe(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=p.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}}const Ur=new Rr,Vr=Ur.prepare.bind(Ur);function zr(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=pt();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Hr=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Wr(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Hr.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Kr extends Rr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=zr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Wr(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Gr=new class extends Kr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,s;const d=p.get(),l=null!==(i=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},c=null!==(a=null===(r=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(s=d.siteSpecificConfig)||void 0===s?void 0:s.publisherClassName,v=new Fr;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(Lt(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Zt()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{}).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords);const h=v.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:h,user:Object.assign(Object.assign({},Yt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Jr=Gr.prepare.bind(Gr);class Xr extends Rr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=p.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(r=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==r?r:0};var n,i,o,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=p.get(),{appMode:t,mobileOS:n}=zr(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const Qr=new class extends Xr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;const s=p.get(),d=null!==(i=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},l=null!==(a=null===(r=null===(o=s.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new Fr;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(Lt(p.get(),d.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>Ie(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(Zt()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===$e("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),v=!1!==d.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},Yt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Yr=Qr.prepare.bind(Qr),Zr="viewable",ea="adClick";var ta=e=>(t,n,i)=>{const{video:o,img:r,url:a}=t,{publisher:s,productTag:d}=n,{pluginsNames:l,videoLoop:c}=i||{};if(!(null==o?void 0:o.content))return null;const u=Math.ceil(1e5*Math.random()),p=r||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${u}`,g=na(o.content,a),h=ia({id:u,nodeId:v,poster:p,tagURL:g,publisher:s,productTag:d,videoLoop:c});return oa({playerConfig:h,clickUrl:a,pluginsNames:l}),`${e(t,n,v)}`};const na=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.querySelector("ClickThrough"),o=n.querySelector("VideoClicks");if(i){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n.createCDATASection(t))}else if(o){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),o.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},ia=({id:e,nodeId:t,poster:n,tagURL:i,publisher:o="",productTag:r="xandr",videoLoop:a=!1})=>({id:e,poster:n,vendor:"appnexus",node:t,mute:!0,autoplay:a,repeat:a,skin:{name:"inventory-player",url:"https://ads.inventory.schibsted.io/styles/player.css"},settings:{jw:{stretching:"fill",advertising:{client:"vast",tag:i}}},pulse:{provider:o.toLowerCase(),decorator:e=>Object.assign(Object.assign({},ii(e)?e:{}),{provider:Object.assign(Object.assign({},ii(null==e?void 0:e.provider)?e.provider:{}),{productTag:r})})}}),oa=e=>Ie(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:i}=e,{repeat:o}=t,r=yield Qn(t);Zn(n),r.once("assetReady",()=>{Xn(r,n)}),r.on(Zr,e=>{const{viewable:t}=e;t?r.play():r.pause()}),r.on(ea,()=>{window.open(i,"_blank")}),o&&r.on("pause",()=>{r.play()})}),ra=({containerId:e,url:t,body:n,title:i,logo:o,isContentVideoAd:r=!1,imgWidth:a})=>{const s=`\n <div class="ad-header">\n <span>ANNONSØRINNHOLD</span>\n ${o?`<img alt="" aria-hidden="true" class="ad-logo" src="${o}" />`:""}\n </div>\n `,d=`<div class="ad-text">${i}</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 ${s}\n ${n}\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${d}\n </a>\n `:`\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${s}\n ${n}\n ${d}\n </a>\n `}\n </div>\n `},aa=["IntegrationMenu"],sa=({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">${In.no.adText}</span>\n </div>`;Cn('@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}}'),Cn('.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 da={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return Is}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`)},la={default:da.NATIVE_TEMPLATE,content:({containerId:e,url:t,title:n,img:i,imgWidth:o,imgHeight:r,logo:a,imgAltText:s})=>{const d=mt(o,r);return ra({containerId:e,url:t,title:n,logo:a,imgWidth:o,body:`\n<div class="ad-image-wrapper" ${d?`style="padding-bottom: ${100*d}%"`:""}>\n <img alt="${s}" class="ad-image" src="${i}" />\n</div>`})},contentVideo:(e,t)=>ta(({containerId:e,url:t,title:n,logo:i},o,r)=>ra({containerId:e,url:t,title:n,isContentVideoAd:!0,logo:i,body:`\n<div class="ad-video-wrapper">\n <div id="${r}"></div>\n</div>`}))(e,t),nativeVideo:(e,t)=>ta(({containerId:e,url:t,sponsoredBy:n,title:i},o,r)=>(({containerId:e,url:t,sponsoredBy:n,body:i,title:o})=>`\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">${In.no.adFrom} ${n}</div>\n ${i}\n <div class="ad-text">${o}</div>\n </a>\n</div>`)({containerId:e,url:t,sponsoredBy:n,title:i,body:`\n<div class="ad-video-wrapper">\n <div id="${r}"></div>\n</div>`}))(e,t),weeklyMenuVideo:(e,t)=>ta(sa)(e,t,{videoLoop:true,pluginsNames:aa}),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&nbsp;mer\n </a>\n </div>\n </div>`,weeklyMenu:({containerId:e,url:t,img:n,imgAltText:i})=>`<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="${i}" class="ad-image" src="${n}" />\n <span class="ad-label">${In.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&nbsp;mer\n </a>\n </div>\n </div>\n </div>`},ca={displayTemplates:{default:la.default,content:la.content,"ukesmeny-stripe":la.weeklyMenuStripe,ukesmeny:la.weeklyMenu,sponsorstripe:la.sponsorstripe},videoTemplates:{default:la.nativeVideo,content:la.contentVideo,menu:la.weeklyMenuVideo}},ua={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r,globalPlacementId:a}=e,{pageSetup:s,pageContext:{countryCode:d}}=p.get();if(!s)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=ur(i,o),a=Lr(e),s=_r(n),d=Nr(),l=Dr(i),c=Mr(i);return Object.assign(Object.assign({},e),{invCode:r,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),s),l),d),rendererOptions:c})})(e);const{tag:{useAppTabletInvCode:l=!0}={}}=s,c=ur(o,l),u=Lr(e),v=_r(i),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),m=Nr(),y=Dr(o),f=Mr(o,{safeFrameAutoInitialSize:!0}),w=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,b=(new Fr).add(null!=n?n:{}).add(u).add(v).add(null!=g?g:{}).add(y).add(m).addIf(null===(t=null==s?void 0:s.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(d)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:w,invCode:c,keywords:b,rendererOptions:f,globalPlacementId:a||c})},preparePageOptions:e=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Yr(e):Jr(e):yield Vr(e)}),siteEvents:wt,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Jn.FRONT,deviceType:r}=null!==(n=null==t?void 0:t.pageContext)&&void 0!==n?n:{},{nativeTrackingConfig:a,appearanceConfig:s}=null!=t?t:{},d={language:g.NO,publisher:bt.GODT,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:s};jr(e,d,ca)}},pa=((e,t)=>({init:n=>Sr(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:Ir,getVideoPPIDs:nn,createInitNativeAd:$r,getVideoAdsConfig:zo}))(ua,kt),va=Cn("[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 ga=Object.freeze({__proto__:null,default:va});Cn('.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 ha={Blink:"Blink"},ma=new Map,ya=e=>{var t;if(!ma.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(ha)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw ma.delete(e),t});ma.set(e,t)}return null!==(t=ma.get(e))&&void 0!==t?t:Promise.resolve()},fa="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",wa="https://www.finn.no/distribution-front/external/carousel",ba=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:i}}=p.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Qo(n,o,Yo,null!=t?t:i);it({preferredTestIdData:{targetId:e,testId:"finn"}})},ka=e=>{const{pageContext:{publisher:t=""}}=p.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)};var xa=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();le(e)&&On(e,t),ce(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:ba,xandrAdLoaded:ka});const Ca={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return s(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){s(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){s(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},Ea="finn_blink_id",Ia=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:i,theme:o}=e,r=Ee(e,["userId","id","hashed_email","theme"]),a=window[ha.Blink];if(!a)return;const s=new a({remote:wa,id:n,hashed_email:i,theme:o});yield s.inject(Object.assign({},r))}),Ta=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=Ee(e,["userId","theme"]),o=window[ha.Blink];if(!o)return;const r=new o({remote:wa,userId:t,theme:n});yield r.inject(Object.assign({},i))}),Sa=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},Aa=(e,t)=>{const{finnBlink:{enabled:n}={}}=p.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:o,height:r,requireImage:a,theme:s,rec:d,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${Sa(e)}`,enabled:i,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:d,theme:"dark"===s?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},Pa=(e,t,n)=>Ie(void 0,void 0,void 0,function*(){var i;const{placements:o,pageContext:{deviceType:r}}=p.get();s(`rendering finn blink ad for ${e}`);const a=w(e),d=o[r].find(e=>e.targetId===a),l=Aa(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 ka(e);if((e=>{var t;const n=Sa(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void s(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:y}={}}=null!=v?v:{},f=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=_e();return null!=e?e:""}return e})(g),k="dark"===y?"dark":"light";try{const e=yield Ie(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=Ca.get(Ea),n=N("finncode");if(!e||n)return"";if(!t){const t=yield Ft.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return Ca.set(Ea,n),n}return t}),t=yield Ie(void 0,void 0,void 0,function*(){const{ppid1:e}=Xt.getPPIDs();return e}),n=(null===(i=null==d?void 0:d.finnBlink)||void 0===i?void 0:i.useNewConstructor)?Ta:Ia;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:k,uuid:h})).then(()=>{ba(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){s(`Finn blink error ${t}`),n&&n(e),!n&&F(e),ka(e)}}),Oa=()=>Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return!!(yield je(e,t,n,"finn-blink"))||(s("Skip loading finn blink ad due to missing TCF consent."),!1)}),ja=(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}`)},$a=e=>document.querySelector(`#${e}`);var La=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>Ie(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=p.get(),i=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=$a(n);o&&(yield Pi(o,null!=e?e:i))}}),loadFinnBlinkAd:(e,t,n,i)=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=p.get();if(s(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield Oa())||o)return n&&n(e),ka(e),void(!n&&F(e));try{yield ya(fa)}catch(e){console.error(e)}yield Pa(e,t,n),i&&i()}),replaceAdsWithFinnBlink:(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;if(!t)return;const{replacementConfig:o}=t,r=null===(n=null==o?void 0:o.adsToReplace)||void 0===n?void 0:n[e],a=null===(i=null==o?void 0:o.sizes)||void 0===i?void 0:i[e];ui()&&r&&a&&t.enabled?(yield Oa())&&(yield ya(fa),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=p.get(),n=document.createElement("div"),i=document.createElement("div");return i.id=e,n.appendChild(i),Qo(t,i,Yo),s(`Creating blink container for: ${e}`),n})(t);(e=>{s(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),ja(n,i),n.dataset.finnBlinkId=t,Si().withFullAdsChain(e)})):s(`Finn blink configuration is incorrect: ${JSON.stringify(o)}`)})});const _a=1e4,Na=e=>e.some(e=>e.some(e=>!!e&&Ri(e,0)));let qa;var Ma=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=_a,widescreenIdPrefix:i}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=p.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let r=0,a=Date.now(),s=Na(o);if(!o.length)return;qa&&window.removeEventListener("scroll",qa);const d=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(o);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{s||(s=Na(o)||s,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=o.map(e=>e[r]),n=o.map(t=>t[e]);d(t,"opacity","0"),setTimeout(()=>{d(t,"display","none"),d(n,"opacity","0"),d(n,"display","block"),setTimeout(()=>{d(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);qa=c,window.addEventListener("scroll",c)}});const Da="#fff",Fa="#0098da",Ba=(e,t=!0)=>{(e===qe||e===Me)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Ra=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Ua=e=>{document.body.style.overflow=e?"initial":"hidden"},Va=e=>{const t=Ha(e),n=za(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Ua(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},za=e=>{const t=()=>Va(e);return window.addEventListener("advertory:closeTakeover",t),Ra(),t},Ha=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Va(e)};return Ra(),window.addEventListener("keydown",t),t},Wa=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Ha(e),za(e),Ra(),t.addEventListener("click",()=>{Va(e)}),Ua(!1))},Ka=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),za(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Ga=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Va(e))})(e)},Ja=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=p.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=In.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Xa=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=In.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Qa=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=In.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Ya=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=In.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Za=()=>{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)},es=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${et})()`,e+t.outerHTML})(e)),n};var ts=Object.freeze({__proto__:null,createTakeoverAd:e=>Ie(void 0,void 0,void 0,function*(){const{takeover:t}=p.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!t)return;const r=Je(e),a=o.offsetHeight,s=window.scrollY>a;o.style.display="block",!s&&Ba(r,!1),((e,t)=>{({[qe]:Qa,[Ne]:Ja,[Me]:Xa,[De]:Ya})[t](e)})(o,r),Za(),((e,t)=>{({[qe]:Ka,[Me]:Ka,[Ne]:Wa,[De]:Ga})[t](e)})(o,r),((e,t,n)=>{if(!n)return;({[qe]:()=>{const{buttonLabel:i}=Ye(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[Ne]:()=>{const{themeColors:i,logotype:o,buttonLabel:r,showArrowIcon:a}=Ye(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=r?r:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:Da,"important"),n.style.color=null!=t?t:Fa}}})},[Me]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:r=!0}=Ye(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[De]:()=>{}})[t]()})(o,r,t),yield Xe(),!s&&Ba(r,!0),Ze(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=cn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=cn(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,es(t))},modifyTakeoverIframe:(e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===i&&n===o||(r.style.width=i,r.style.height=o)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const ns=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},is=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:r,fullWidthFormatClassName:a}={},fullWidth:s,pageContext:{deviceType:d}}=p.get();if(!o)return null;const l=o.parentElement;if(o.style.width=vt(d)?"100vw":"100%",o.style.position="relative",l&&(l.style.width=vt(d)?"100vw":"100%",l.style.position="relative"),r&&a){const e=`advertory-${r}-${a}`;o.classList.add(`${e}__${t}`),null==l||l.classList.add(`${e}-wrapper__${t}`)}const c=null===(i=null===(n=null==s?void 0:s.options)||void 0===n?void 0:n.styles)||void 0===i?void 0:i[d],u=(null==s?void 0:s.enabled)&&c;return!u&&l&&(l.style.left="50%",l.style.marginLeft="-50vw"),u&&c.adContainer&&ns(o,c.adContainer),u&&c.adContainerWrapper&&l&&ns(l,c.adContainerWrapper),o},os=(e,t,n,i)=>{const o=is(e,i);if(!o)return;const r=o.querySelector("iframe"),a=null==r?void 0:r.parentElement;if(!r||!a)return;const s=o.offsetWidth,d=s/e.width;a.style.transform=`scale(${d})`,a.style.transformOrigin="left top";const l=Math.round(s/t*n);o.style.height=`${l}px`};var rs=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{os(e,1080,1080,"fullsquare-ad")},applyFullwidthFormat:e=>{const t=is(e,"fullwidth-ad");if(!t)return;const n=t.querySelector("iframe");if(!n)return;const{deviceType:i}=p.get().pageContext;n.style.width=vt(i)?"100vw":"100%",(null==n?void 0:n.parentElement)&&(n.parentElement.style.width=vt(i)?"100vw":"100%")},applyNinesixteenFormat:e=>{os(e,1080,1920,"ninesixteen-ad")}});const as=e=>e===g.NO?"schibsted":"schibstedse";var ss=Object.freeze({__proto__:null,getCampaign:as,loadNorstat:()=>Ie(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:i}=p.get(),o=yield je(i,n,t,"norstat");if(!e||n||!o)return;const r=(e=>{const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o}=Xt.getPPIDs(),r=(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{Ie(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${as(t)}/map/${r}`,"norstat")})});const ds=".advertory-right-column-track",ls="--advertory-right-column-track-height",cs=e=>e.getBoundingClientRect().top+window.scrollY,us=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},ps=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},vs=(e,t)=>`${e}-${t}`,gs=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=cs(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=us(e);ps("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=cs(e),o=vs(ls,t),r=i-n,a=vs("--advertory-right-column-split-point-height",t),s=us(e);ps(o,r),ps(a,s)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=vs("--advertory-right-column-ad-height",t),i=us(e);ps(n,i)})(o[t])});((e,t)=>{const n=cs(e);ps(ls,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let hs=!1;var ms=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||hs)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=ds}=e,o=document.querySelector(i);if(!o)return;hs=!0;const r=()=>{gs(o,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(o)}});class ys{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class fs{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class ws{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,s,d,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(o=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===o||o.call(i,u):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(l=null===(d=this.pulse)||void 0===d?void 0:d.trackElementView)||void 0===l||l.call(d,u)})}trackContentClick(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,s):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,s)})}}class bs extends ws{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,r,a;const{clientName:s,creativeId:d,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=d?d:l},page:{"@id":null!=p?p:c,"@type":u,url:location.origin},tags:null===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const ks="[data-k5a-teaser-analytics]",xs=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new bs(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(ks);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(ks);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{s.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class Cs{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[bt.VG]:new ys}[n]||new fs;xs(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(s(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}loadKilkayaScript(e){return Ie(this,void 0,void 0,function*(){yield on(e)})}run(e){return Ie(this,void 0,void 0,function*(){var t,n;const{tcf:i,pageContext:{isMobileApp:o,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const s=yield je(i,o,r,"kilkaya");s&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(s),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var Es=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=s(r,"data-pulse"),l=s(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},runKilkaya:e=>Ie(void 0,void 0,void 0,function*(){const t=new Cs;yield t.run(e)})});Cn('.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 Is=Object.freeze({__proto__:null});module.exports=pa;
1
+ "use strict";var e,t,n=require("react/jsx-runtime");function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=i(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function d(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=o(e[t],n)}),a(t).forEach(function(r){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(s(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):i[r]=o(t[r],n))}),i}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):d(e,t,i):o(t,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e=l}());const r=["placements","takeover","refreshConfig","editory"],a={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},s=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},d=(e,t)=>{console.warn("[Advertory WARN]: ",e)},l=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:i,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||d("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||d("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||d("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||d("pageContext.deviceType is required."),n||d("pageOptions is required."),i||d("placements is required."),(null==o?void 0:o.defaultThreshold)||d("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,i,o;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(i=e.fullscreenScroll)||void 0===i?void 0:i.enabled),property:"main",featureName:"fullscreenScroll"},{flag:!!(null===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&d(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},c=6;class u{set(e){l(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of r){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.prototype.hasOwnProperty.call(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=o(u.DEFAULT_SITE_HANDLERS,e)}}u.DEFAULT_SITE_HANDLERS={siteEvents:a,initNativeAd:function(){}};const p=new u,v=p.modifyConfigProperties.bind(p),g={NO:"no",SE:"se"},h=e=>e===g.NO?"no-sno":"se-generic";let m="";const y=new Map,f=e=>{const{pageSetup:{tag:t}={}}=p.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(m!==window.location.pathname&&(y.clear(),m=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=y.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=p.get();return`${e}-${t}`})()}-count`]=i,y.set(n,i+1),e})):e},w=e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e},b="0123456789abcdefghijklmnopqrstuvwxyz",k=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},x=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})}),I="advertory-wallpaper-background",T="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${I}`);e&&e.remove()},A=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${I}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},P=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,O=e=>P.test(e),j=e=>e.startsWith("wallpaper:color:"),$=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundImage=`url(${e})`)},L=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundColor=e)};var _=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(T),n.classList.add(T))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(I),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(A(n),window.addEventListener("scroll",()=>A(n)))})(n),e()},isShortWallpaperColorMessage:j,isShortWallpaperUrlMessage:O,removeWallpaperBackground:S,setWallpaperBackgroundColor:L,setWallpaperBackgroundImage:$});const N=e=>new URLSearchParams(window.location.search).get(e),q="takeover",M="native_override_desc2",D=()=>null!==N("disable_prebid"),F=e=>{if("0"===N("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&S())},B=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))};class R{initialize(){this.DATA=Object.assign({},R.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}R.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const U=new R,V=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},z=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=U.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},H=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{F(e.id),z(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=w(e.id)}),x(()=>window.apntag.clearRequest())},W="noGroupedPlacements",K=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},G=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},J=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,pageContext:{deviceType:o}}=p.get(),r=n[o].filter(G)||[],a=e?document.querySelector(e):document;if(!a)return[];const s=r.reduce((e,t)=>{const n=K(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({targetId:e})=>e.match(t)),s=(null==i?void 0:i.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${o}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,d=a.querySelectorAll(s),l=Array.from(d).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const o=X(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),s=`${e.id}-${k(6)}`;return e.id=s,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&U.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},o),{targetId:s})});return f(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(s)},X=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:r||o},Q=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=p.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=w(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(w(e.targetId)));return n})(e,i),s=Object.keys(r),d=((e,t)=>e.filter(e=>!t.has(w(e.targetId))))(e,new Set([...s,...o]));return Object.assign(Object.assign(Object.assign({},a),r),{[W]:d})},Y="ABSOLUTE_FULLSCREEN",Z="ANY_FULLSCREEN",ee="NINESIXTEEN",te="FULLWIDTH",ne="FULLSQUARE",ie="TAKEOVER",oe="VELVET_TAKEOVER",re="WALLPAPER",ae="COLLAPSE",se={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],NINESIXTEEN:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],FULLSQUARE:[{width:1080,height:1080}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},de={wallpaper:1600,"l-format":1600},le=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Ce(e,Z)},ce=e=>{const{native:t}=e;return!!t},ue=e=>Ce(e,te),pe=e=>{const{targetId:t}=e;return t.includes("takeover")||Ce(e,ie)},ve=e=>Ce(e,ie),ge=e=>Ce(e,re),he=e=>Ce(e,ae),me=e=>e.targetId.includes("sponsorstripe"),ye=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},fe=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),we=e=>e.targetId.startsWith("midboard"),be=e=>e.targetId.includes("widescreen"),ke=e=>e.width>=1260&&e.width<=1280,xe=e=>e.width>=1600&&e.width<=1620,Ce=(e,t)=>{const n=se[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===o,s=!t.height||t.height===r;return a&&s})};function Ee(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function Ie(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Te=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return s("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(s("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{s("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{s("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);s("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),Se="cmp:loaded";let Ae="undefined"!=typeof window?window._tcf_:void 0,Pe=!1;const Oe=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=N("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(s("TCF bypass param detected, returning consent: true"),!0):(s("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(Pe)return null;if(!Ae)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Ae.getConsentedToAllSync();return s(`TCF consented to all is: ${t}`),Ae.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(s("Getting TCF consent manager..."),window._tcf_)return s("TCF consent manager is already available"),Ae=window._tcf_,void e(Ae);s("TCF consent manager is not available");const n=()=>{s("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Ae=window._tcf_,e(Ae)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(Se,n),Pe=!0,t(new Error("Timeout waiting for CMP to load"))},o);s("Listening for CMP loaded event..."),document.addEventListener(Se,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>Ie(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.SE,i=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.NO;if(t||i)return s("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Te(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Ae)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{s("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);Ae.onTcfReady(()=>{s("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Ae.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},je=(e,t,n,...i)=>Ie(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return s(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=Oe(e,0,n);return(yield o())?(s(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(s(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),$e=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Le=e=>Ie(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e,{getConsentAsync:o}=Oe(t,0,i);if(!(yield o()))return;const r=$e("_pulse2data");return r?r.split(",")[9]:void 0}),_e=()=>{const e=$e("_pulse2data");return e?e.split(",")[2]:void 0},Ne="splash",qe="welcomePage",Me="topscroller",De="velvet",Fe=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},Be="takeover-displayed",Re="takeover-visit-count",Ue=14400,Ve=()=>{const e=$e(Re);return e?parseInt(e):0},ze=()=>{const e=Ve(),{takeover:{options:{cookieCapTime:t=Ue}={}}={}}=p.get(),n=document.location.hostname;window.document.cookie=`${Re}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},He=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=p.get();return"0"!==N(q)&&("1"===N(q)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=p.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Be;return"true"===$e(n)})())&&(!t||We()))},We=()=>{const e=Ve();return 0===e?(ze(),!1):1===e},Ke=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ge=()=>{const{takeover:e}=p.get();return Boolean(null==e?void 0:e.topscroller)},Je=e=>{const{width:t,height:n}=e;return Ke(t,n)?Ne:Ce(e,oe)?De:Ge()?Me:qe},Xe=()=>Ie(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Be,cookieCapTime:n=Ue}={}}={},pageContext:{isMobileApp:i,countryCode:o},tcf:r}=p.get(),a=yield je(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Qe=e=>{var t,n;const i=!!(null===(n=null===(t=p.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return pe(e)&&i},Ye=(e,t)=>{var n;if(t===Me){const{topscroller:t}=e;return null!=t?t:{}}if(t===Ne){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ze=(e,t)=>{t!==Ne?(e=>{var t,n;const i=null===(t=p.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=p.get().takeover)||void 0===n?void 0:n.topscroller;if(!i||o)return;const r=document.querySelector(i),a=document.querySelector(".welcome-page-wrapper"),s=document.querySelector(`#${e.targetId}`),d=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&d&&s))return;const l=null==r?void 0:r.offsetHeight,c=ve(e)?"60svh":`calc(100svh - ${l}px)`,u=ve(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),s.style.setProperty("height",c,"important"),d.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=p.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},et=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})});var tt=Object.freeze({__proto__:null,addTakeoverCookie:Xe,adjustTakeoverHeight:Ze,canDisplayTakeover:He,getProperWelcomePageConfig:Ye,getTakeoverVariant:Je,handleTakeoverCookieOnAdNotShown:e=>Ie(void 0,void 0,void 0,function*(){Qe(e)&&(yield Xe())}),incrementArticleVisitCount:ze,isSplashVariant:Ke,isTopscroller:Ge,scaleAd:et,shouldAddTakeoverCookieForNotShownAd:Qe});const nt={nativeAd:e=>ce(e)&&!me(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:ue,fullscreenScroll:le,topscroller:e=>pe(e)&&Ge(),splash:e=>pe(e)&&Ke(e.width,e.height),welcomePage:pe,wallpaper:ge,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:ke,hFormat:xe,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!xe(e)&&!ke(e),topboard:e=>e.targetId.startsWith("topboard")&&!pe(e),widescreen:be,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:me,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!fe(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!we(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:fe,midboard:we},it=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const a=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(o,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,i;for(const[o,r]of Object.entries(nt))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},ot=e=>{var t;return(null===(t=Object.entries(nt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},rt="mobile",at="tablet",st="desktop",dt="web_desktop",lt="web_phone",ct="wde",ut="wph",pt=()=>{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"},vt=e=>e===rt,gt=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},ht=(e,t=window.screen.width,n,i)=>{const o=gt(e,t);if(n&&n(e,o),i)return void i(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${o})`,r.style.transformOrigin="left top")},mt=(e,t)=>{if(e&&t)return t/e},yt=new Map;yt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),yt.set("panorama",{scale:.79,transformOrigin:"center center"}),yt.set("outstream",{scale:.79,transformOrigin:"center center"}),yt.set("integration",{scale:.79,transformOrigin:"center center"}),yt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var ft=Object.freeze({__proto__:null,calculateScaleFactor:gt,getAspectRatio:mt,scaleAd:ht,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=ot(e),o=yt.get(i),r=document.querySelector(`#${e.targetId}`);if(!r||!o)return;if(r.style.transformOrigin=o.transformOrigin,r.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),s=null==r?void 0:r.offsetWidth;a&&"number"==typeof s&&!isNaN(s)&&a.style.setProperty("right",String(-1*s*.2)+"px")},scaleAds:e=>{var t,n,i,o,r,a;const{adScaleConfig:s,pageContext:{deviceType:d}}=p.get();if(!(null==s?void 0:s.enabled))return;if(Ce(e,Z))return;const l=null!==(t=s.adsToBeScaled[d])&&void 0!==t?t:[],c=K(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=s.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),g=null!==(o=null==v?void 0:v.offsetWidth)&&void 0!==o?o:window.screen.width,h=null!==(a=null===(r=null==v?void 0:v.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;ht(e,(g<h?g:h)-u)}});const wt={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&"native"!==e.adType&&((e,t)=>{ht(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=>{}},bt={SVD:"svd",VG:"vg",GODARE:"godare",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen"},kt={publisherClassName:bt.GODT,fullWidthFormatClassName:"netboard"},xt=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,i=xt)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=xt)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return s("Error with parsing localStorage data"),null}}}})(),Et="glimrTags",It=["glwe_","glwet_"],Tt={geofenceTags:[],geoTags:[],weatherTags:[]},St=(...e)=>Ie(void 0,[...e],void 0,function*(e=p.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield je(t,n,i,"glimr")}const{getConsentAsync:o}=Oe(t,0,i);return yield o()}),At=()=>Ie(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield St())||!(null==e?void 0:e.enabled))return void s("No consent for glimr data fetching.");const t=yield(n=500,Ie(void 0,void 0,void 0,function*(){return yield Promise.race([Ie(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{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})}),Pt={svd:"svd",vg:"vg",godare:"godare",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},Ot=e=>It.some(t=>e.startsWith(t)),jt=e=>e.startsWith("glgc_"),$t=e=>!Ot(e)&&!jt(e),Lt=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield St(e);if(!(null==i?void 0:i.enabled)||!r)return s("No consent for getting glimr tags."),{};const a=h(o),d=_t(e,Boolean(n));return{[`${a}-geo`]:d.geoTags,[`${a}-weather`]:d.weatherTags,[`${a}-geofence`]:d.geofenceTags}}),_t=(e,t)=>{const n=Nt();if(!n)return Tt;const i=((e=[])=>e.filter(Ot))(n),o=((e=[])=>e.filter(jt))(n),r=((e=[],t,n)=>{var i;const o=e.filter($t);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=Pt[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},Nt=()=>{const e=Ct.getByTimestamp(Et);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},qt=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),Mt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Dt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},pageContext:{countryCode:o}}=p.get(),r=[`${h(o)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?r:[]],s=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),d=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:s}}},d)}},Ft={get:(e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>Ie(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},Bt="advertory:ppids-cache",Rt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},Ut={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Vt={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},zt={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Ht={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Wt={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},Kt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Gt{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const Jt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return Ie(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},Xt=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return Ie(this,void 0,void 0,function*(){var n,i,o,r,a,s,d,l,c,u,p;const v=Ct.get(Bt),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(s=g.idfv)||void 0===s?void 0:s.plain,null===(d=g.anId)||void 0===d?void 0:d.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});Ct.set(Bt,o)}hashPPIDs(e,t){return Ie(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Ft.post(t,n,e)}catch(e){return s("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return Ie(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${Kt[t]}:${n}`:null}))(t,n),o=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),r=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Qt=e=>Ie(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:i,isMobileApp:o}}=e;if(!(yield je(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([Jt.processPPIDs(t,null==n?void 0:n.timeout),Xt.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){s(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Yt=e=>{const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Xt.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]).add(r,Ht[e]).add(a,Wt[e]).buildEids()}]}},Zt=()=>{const{ppid1:e,ppid2:t}=Jt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},en=e=>{const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Xt.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]).add(r,Ht[e]).add(a,Wt[e]).buildRyEids()}}]}}},tn=e=>{const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o}=Xt.getPPIDs();return(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]).buildRyEids()},nn=e=>Ie(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o}=Xt.getPPIDs(),r=(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),on=(e,...t)=>Ie(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),rn="advertory-fullscreen-scroll",an="advertory-fullscreen-scroll-wrapper",sn="fullscreen-scroll-in-screen",dn="in-screen",ln=e=>e.includes("snoap.no"),cn=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},un=Fe([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,a=e/o,s=t/r;i.style.transform=`scale(${a},${s})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),pn=e=>{const t=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},vn=[],gn={},hn=(e,t)=>{var n;const i=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>mn(e,i),{}),r=fn(e);o.observe(e),i&&(gn[r]=kn(e,null==t?void 0:t.options))},mn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=fn(e);n?(yn(i,n),wn(e,i,t)):(yn(i,n),bn(e,i,t))})},yn=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},fn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},wn=(e,t,n)=>{e.classList.add(dn),document.body.classList.add(sn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),vn.includes(t)||vn.push(t),n&&window.addEventListener("scroll",gn[t],{passive:!0})},bn=(e,t,n)=>{vn.includes(t)&&(n&&window.removeEventListener("scroll",gn[t]),document.body.classList.remove(sn),e.classList.remove(dn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},kn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&xn(e,r,o,0),a.length&&xn(e,a,o,40)}},xn=(e,t,n,i)=>{const o=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let s;s=a>r?(a-r)/t-i:(r+t-(a+o))/t;const d=s<=0;e.style.visibility=d?"hidden":"",e.style.zIndex=d?"":n.toString(),e.style.pointerEvents=d?"none":"all",e.style.opacity=s.toString()})};function Cn(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}Cn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100vw !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top: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 En="left",In={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 Tn=null;const Sn=(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=`(${un})()`,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(ln(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=pn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>ln(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)),ln(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)),cn(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},An=()=>{Tn=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},Pn=()=>{Tn||(Tn=window.requestAnimationFrame(An))},On=(e,t)=>{var n,i,o,r;const{pageContext:{countryCode:a,deviceType:s}}=p.get(),{targetId:d}=e,l=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==l?void 0:l.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),((e,t)=>{var n;const{articlesContainerWidth:i=1302,backgroundColor:o="#fff",foregroundColor:r="#fff",margin:a,beforeContentValue:s=""}=e,d=null!==(n=null==a?void 0:a[t])&&void 0!==n?n:"16px 0",l=i/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${o} 0px,\n ${o} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${o} calc(50% + ${l}px),\n ${o} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${d};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${s&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${s}' !important;\n }`,c.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(c)})(null!==(i=null==l?void 0:l.overlayStyles)&&void 0!==i?i:{},s);const c=document.getElementById(d),u=null==c?void 0:c.parentElement;if(!c||!u)return;hn(u,t),c.className=rn,hn(u,t),c.className="advertory-fullscreen-scroll";const v=Ce(e,Y)?"absolute":"fixed";c.style.position=v,u.className=an,u.dataset.showTagSubscribeId=d,c.setAttribute("data-ad-label",In[a].adText),(null==l?void 0:l.cogwheelPosition)===En&&(c.dataset.moveCogwheelToTheLeft="true"),Pn(),window.addEventListener("resize",Pn),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",Pn),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",Pn)},jn=e=>{if(!(null==e?void 0:e.classList.contains(rn)))return;e.classList.remove(rn),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(an))&&(t.classList.remove(an),t.classList.remove(dn))};var $n=Object.freeze({__proto__:null,createFullscreenScrollAd:On,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=cn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=cn(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Sn(t,e))},undoFullscreenScrollContainer:jn});const Ln=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},_n=(e,t,n)=>{var i,o,r,a;const s=document.createElement("div");s.id=`${e}-button`,t.appendChild(s);(null===(o=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),Ln(e);const d=s.firstElementChild;d&&t.insertBefore(d,s),s.remove()},Nn="ad-loaded",qn=()=>Ie(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:i},fullscreenScroll:o}=p.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=p.getHandlers(),{getConsentAsync:a}=Oe(t,0,n),d=yield a(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=qt(),{prebid:{relevantCallbackTimeout:r}={}}=p.get(),a="relevantCb"===i&&r?r:n[i].timeout,s=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},a);t.push(s)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=qt(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=qt();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=Mt();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return s("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=Mt();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const a=d?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};s("prebid consentManagement",a),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},en(n)),Dt(g,v))),s("core add prebid config",Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},en(n)),Dt(g,v))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{Mn(e,r)},directRenderFn:e=>{var t;const{settings:n,renderFn:r}=e,{bid:a,adDiv:s}=n||{};if(!s)return;const d=r(n),l=Object.assign(Object.assign({},a),{targetId:s.id,banner:!0}),c=s.id,u=document.getElementById(c);u&&(le(l)?(On(l,o),i?u.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 i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(d)):(jn(u),null===(t=null==u?void 0:u.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),u.classList.add(Nn),(null==a?void 0:a.creativeId)&&_n(c,u,Number(null==a?void 0:a.creativeId)))}}),s("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{Mn(e,r)},directRenderFn:()=>{}})})}),Mn=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],s=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,s);const d=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:o,targetId:s},p.get()),null==d||d.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},Dn=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,a]=t;if(!i.dataset.lockedsize&&a&&r)i.style.width=`${r}px`,i.style.height=`${a}px`,n&&(o.resizeAd(i.id,[r,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},Fn=["netboard","board"];class Bn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return Ie(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",a=(null==o?void 0:o.userId)?String(o.userId):"",d=this.buildUrl(e,{envId:r,spid:a});try{s("Starting fetching DrEdition ad from URL:",d);const e={method:"GET"},t=yield Ft.get(d,e);return s("Fetch operation completed successfully."),t}catch(e){s("Error during fetch operation:",e)}return null})}}let Rn=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return Ie(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const Un=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 Vn{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return Ie(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,a=e.querySelector(o);if(!a)return void s(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(s("No Dr. Edition ads available to render. Collapsing whole placement."),F(e.id),void Un(a)):((null==d?void 0:d.itemId)&&r&&(s("Dr. Edition ad available to render as a Xandr backfill."),B(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(a,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),Un(a),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):Un(a))):(s("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Un(a))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}class zn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return Ie(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Oe(n.tcf,n.isMobileApp,n.country),o=yield i(),r=vt(n.device)?t.mobileHTML:t.desktopHTML,a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Hn{constructor(e){this.strategy=e}handle(e,t){return Ie(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return Ie(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield on(t)}catch(e){s("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return Ie(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}let Wn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,p):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}};class Kn extends Wn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[s,a,p,v].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:p,urlPath:v},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let Gn=class extends Wn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(s=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:v)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const Jn={FRONT:"front"},Xn=(e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})},Qn=e=>Ie(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),Yn={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return Ie(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return ga})})}})}},Zn=(e,t)=>{null==e||e.forEach(e=>{Yn[e](t)})};class ei{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield Ie(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const a=["ContentMutePlugin"],s=this.createPlayerOverlay(e);Zn(a,s);const d={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},l=yield Qn(d);l.once("assetReady",()=>{Xn(l,a)}),l.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?s.classList.add("is-playing"):s.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?s.classList.add("is-inactive"):s.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),l.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield l.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Jn.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const ti="https://www.aftonbladet.se/video-player-extras/latest/";class ni{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${ti}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${ti}external-link.js`]:{name:"ExternalLink"}}};yield Qn(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 ii=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class oi{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},ii(e)?e:{}),{provider:Object.assign(Object.assign({},ii(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},s=yield Qn(a);s.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield s.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Jn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let ri=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const ai=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,s={[bt.VG]:new Rn,[bt.E24]:new ei,[bt.AFTONBLADET]:new ni,[bt.SVD]:new oi}[o]||new ri,d=new(a===g.SE?Kn:Gn)(n,s,r),l=new Bn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new zn(s,d),u=new Hn(s);return new Vn(l,c,u,d)},si=()=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class di{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return Ie(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return s("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return Ie(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const li=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=ai(n,i,o);e.forEach(e=>{var i,o,a;if(!e.isIntersecting)return;const s=e.target,d=null!==(i=s.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=s.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=s.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(s,Object.assign(Object.assign({},n),{editionName:d,columnName:l,primaryPosition:c})),t.unobserve(s)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},ci=()=>Ie(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),ui=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},pi=[],vi=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:a,publisher:d,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield je(o,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,s=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,d=r[o]||r.desktop,l=w(t.targetId),c=d.find(e=>e.targetId===l),u=Fn.some(e=>l.startsWith(e)),p=pi.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||s;return c&&u&&!p&&v?(pi.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void s("Pulse has not been passed as a prop, aborting");const v=yield si(),g=new di(v),h=ai({publisher:d,pageType:l,country:c},g,null==i?void 0:i.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const y=document.createElement("div");y.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:o,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),gi=(e,t)=>{var n,i,o;if(!ui())return void s("Ad block not enabled, Dr. Edition backfills will not be rendered");s("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:r},finnBlink:a}=e,d=null===(i=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===i?void 0:i[r],l=null!==(o=null==d?void 0:d.map(([e])=>e))&&void 0!==o?o:[],c=new IntersectionObserver((t,n)=>Ie(void 0,void 0,void 0,function*(){for(const i of t){if(!i.isIntersecting)continue;const t=i.target;n.unobserve(t),yield vi(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 hi=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:i,pulseData:o,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},s=a(o,"data-pulse"),d=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},s,d,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:i})]}))},getDrEditionManager:ai,handleDrEdition:e=>Ie(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield je(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield si(),i=new di(n);li({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:vi,handleDrEditionBackfillOnAdblock:gi});const mi="collapseAd",yi="hideAd",fi="resizeAd",wi="renderDrEditionFallback",bi="wallpaperImageUrl",ki="wallpaperColor",xi="velvet",Ci=[fi,bi,ki,mi,yi,wi,xi];let Ei;const Ii=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(O(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:bi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:ki,wallpaperColor:t}}if(e.startsWith(wi)){const t=e.split(":")[1];return{name:wi,targetId:t}}if(e.startsWith(mi)||e.startsWith(yi)){const t=e.split(":")[1];return{name:mi,targetId:t}}if(e.includes("name")&&Ci.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!Ci.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:s,size:d}=n;i===xi&&s&&(s.includes("noScroll")&&(Ei=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(s.includes("close")||s.includes("ended"))&&(null==Ei||Ei(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==mi&&i!==yi||!o||F(o),i===fi&&o&&s&&Dn(o,s),i===wi&&o&&(F(o),vi(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&d&&Dn(o,d,!0),i===bi&&r&&$(r),i===ki&&a&&L(a)},Ti=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Si=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),x(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return La});yield t(e,o,null)}),withFullAdsChain:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return La});yield t(e,o,r,()=>Ie(void 0,void 0,void 0,function*(){if(!U.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return _});t(e)}))})}},Ai=(e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return ye(t)&&i?(s(`loading finn blink ad for blink only placement for ${t}`),void Si().withFinnBlinkAd(t)):ye(t)?(s(`loading finn blink ad with full ads chain for ${t}`),void Si().withFullAdsChain(t)):void x(()=>(s("core showTag",{id:t}),e.showTag(t)))},Pi=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield C,yield E;const n=new IntersectionObserver((t,n)=>((e,t,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(r);s("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,i),a&&(t.unobserve(a),t.disconnect())})})(t,n,Ai,e),Ti(t));n.observe(e)}),Oi=new Map,ji=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],$i=".brandstudio-premium-content-widget",Li=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),_i=({adWrapper:e,placementContainer:t})=>{const n=Li({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),z(i=t),i.innerHTML=""},Ni=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},qi=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=ji.includes(n)&&Boolean(t.closest($i));const o=i?t.closest($i):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!i&&!a||i&&!o)return;if(a)return Ni(e),void r.disconnect();const s=t.closest('[style*="height"]'),d=o;s&&d.contains(s)?Ni(s):d.hasAttribute("style")&&Ni(d),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},Mi=(e,t,n,i,o,r)=>{var a;const s=performance.now(),d=null!==(a=Oi.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;s-d>=o&&l&&(Oi.set(t,s),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&_i({adWrapper:o,placementContainer:n}),x(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},Di=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,Mi,t,n),Ti(300));i.observe(e)},Fi=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},Bi=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Ri=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Ui=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Ki(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Vi=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t,n;return e.targetId===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==i?void 0:i.requestThreshold;Ri(o,r)&&i&&(V(i.targetId),n.length&&o.classList.remove(...n),Ki([i],t))}},zi=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Hi(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Vi(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Vi(e,!1,t))};n.persisted&&(Bi()?window.addEventListener("scroll",i,{passive:!0}):Vi(e,!1,t))})})(e,n))},Hi=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Wi=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Hi(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},Ki=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=Fi(i,n);if(t)for(const t of e){const e=Wi(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)x(()=>window.apntag.refresh(e))},Gi=e=>`externalImpId:'${e}'`,Ji=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,Xi=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:i}=p.get(),{targetId:o,sizes:r,keywords:a,allowedFormats:d,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:v,dynamicSizeWidthCheck:g=!1,globalPlacementId:h}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||He())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=Array.isArray(n)?n.filter(e=>e!==Me):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(e),m=Object.assign({invCode:l,sizes:r,targetId:o,keywords:Ji(a,c),allowedFormats:d,dynamicSizeWidthCheck:g,globalPlacementId:h},v&&{safeframeConfig:v}),y=(e=>{var t,n,i,o,r,a,d;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(s("Tracker state pageViewId is:",null===(r=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===r?void 0:r.pageViewId),null===(d=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===d?void 0:d.pageViewId):(s("Tracker state does not contain field pageViewId or it is empty"),""):(s("Tracker state is empty"),""):(s("Tracker is not configured in initAdvertory function"),"")})(i);n&&y&&(s("External Impression ID assigned to defineTag:",Gi(y)),m.externalImpId=Gi(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}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(m.native=f),m},Qi=e=>!e.includes("takeover")||He(),Yi=e=>{const{source:t}=e;return"csm"===t},Zi=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=p.get(),n=h(t),i=e[`${n}-targetid`],o=i?w(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[o]})},eo=e=>{const{pageContext:{countryCode:t}}=p.get(),n=h(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},to=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},no=(e,t)=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});Cn(".advertory-brandmetrics-survey{width:100%}");const io="advertory-brandmetrics-survey",oo="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",ro=()=>Ie(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var o;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),ao={pageContext:{publisher:"aftonbladet",countryCode:g.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},so={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},lo=e=>(null==e?void 0:e.parent)?[...lo(e.parent),e.shortPath||"unknown"]:[],co=(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]=lo(e);return so[n]||"ovrigaavdelningar"})(e)}_{position}`,uo={aftonbladet:ao},po={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:co(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:lo(e).join(":")}}},vo=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},go=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),ho="se-generic",mo="aa-sch",yo="kv_",fo="pause",wo="{deviceType}",bo="{position}",ko="afp_",xo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),Co="1-1",Eo="16-9",Io="3-4",To="9-16",So="responsive",Ao={[Co]:1,[Eo]:1.78,[To]:.56,[So]:1},Po={[Co]:1,[Eo]:1.78,[Io]:1.33,[To]:.56},Oo=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=st===n?ct:ut,s=o.replace(wo,a);return(e,n)=>{if(e===fo)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(bo,fo).replace(/-([a-z]+)_/,"-article-"))(s);if(n&&xo.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(wo,a).replace(bo,e)}return s.replace(bo,e)}},jo=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[i,o])=>{const r=Math.abs(e[n]-t);return Math.abs(o-t)<r?i:n},n[0][0])},$o=()=>{var e,t;const n=jwplayer().getContainer(),i=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return i&&"number"==typeof i.offsetWidth&&"number"==typeof i.offsetHeight&&0!==i.offsetHeight?i.offsetWidth/i.offsetHeight:1},Lo=()=>{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},_o=()=>{const e=null!==(t=Lo()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Lo()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},No=()=>Object.fromEntries(new URLSearchParams(window.location.search)),qo=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:i,countryCode:o}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},s={isMobileApp:e.isApp,countryCode:o,publisher:i,pageType:"front",deviceType:e.deviceType},d=(yield je(n,e.isApp,o,"video"))?"1":"0",l=yield ro(),c=yield nn(o),u=yield Le({tcf:n,pageContext:s}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>jo(Po,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?jo(Ao,Number(m.toFixed(2))):So;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${mo}-country_code`]:o,[`${mo}-publisher`]:i,[`${mo}-supply_type`]:(y=e.deviceType,y===st?dt:lt),[`kw_${mo}-page_type`]:"collection",[`${mo}-page_type`]:"collection",[`${ho}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${ho}-page`]:"index",[`${ho}-page`]:"index",[`${ho}-screenheight`]:String(window.screen.height),[`${ho}-screenwidth`]:String(window.screen.width),[`${ho}-viewportheight`]:String(a),[`${ho}-viewportwidth`]:String(r),[`${ho}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${ho}-mobile-os`]:pt(),[`${ho}-audience`]:void 0,[`${ho}-externalid_src`]:_o(),[`${ho}-tags`]:e.tags,[`${ho}-articleid`]:p,"article-id":p},yield Lt(Object.assign(Object.assign({},t),{pageContext:s}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${ho}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(No()).some(e=>e.includes(yo))&&(()=>{const e=No(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(yo)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":d,"kw_aa-sch-cmp_advertising":d,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),Mo=["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"],Do=["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"],Fo=["external_uid","gdpr","gdpr_consent","eids","article-id"],Bo=(e,t)=>{const n=[...Mo,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||Fo.includes(e)?e:`kw_${e}`,t]))},Ro=e=>Object.fromEntries(Object.entries(e).filter(([e])=>Do.includes(e))),Uo=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;uo[e]||d(`[video] No config found for publisher "${e}"`);return null!==(t=uo[e])&&void 0!==t?t:ao})(e.publisher),s=(e=>{var t;return null!==(t=po[e])&&void 0!==t?t:po.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),l="/"===window.location.pathname,c=null===(i=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===i?void 0:i.toString(),u=e.assetId===c,p=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:s,isUserPresentOnFrontPage:l,adsKeywords:yield qo({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==s?void 0:s.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:l,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:$o(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:vo(e.startMode)}}),Vo=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:s}=e,{invCode:d}=i||{},l=Oo(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(ko)?`${ko}${t}`:t)(d),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,o),"se-generic-playback-method":go.get(s),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},Bo(r,n)),Ro(r)),{vskippable:"0",referrer:u,vplaybackmethod:s})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},zo=e=>t=>Ie(void 0,void 0,void 0,function*(){const n=yield Uo(e,t);return Vo(n,e)}),Ho={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]}]},Wo={no:"NOK",se:"SEK"},Ko={no:"no",se:"sv"};class Go{buildFetchObject(e,t,n,i){return Ie(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:r}=i,{invCode:a,xandrPlacementId:s}=e,d=yield ro(),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(Ho),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:k(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},s&&{placement_id:s}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||Ko[o]||"no").split("-")[0]},regs:{ext:{gdpr:d.gdpr||0}},user:{id:yield Le(i),ext:{consent:d.gdpr_consent||"",eids:tn(o)}},at:1,cur:[Wo[o]],source:{tid:k(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,i){return Ie(this,void 0,void 0,function*(){try{s("Starting fetching Studio ad from Xandr:",oo);const o=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),d=a.size>0?`${oo}?${a.toString()}`:oo,l=yield this.buildFetchObject(e,t,n,i),c=yield Ft.post(d,o,l);return s("Fetch operation completed successfully.",c),c}catch(e){s("Error during fetch operation:",e)}return null})}}const Jo=0,Xo=3,Qo=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",a=i?`__${i}`:"",s=`advertory${r}-${n}${a}`,d=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(s),o.classList.add(d),t.dataset.adType=n},Yo="finn-blink",Zo="native-ad",er=(e,t)=>{tr(e,t),ir(e,t)},tr=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])rr(i)}),t.dataset.tracked="true")})},nr=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(or):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},ir=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:s=!1}={}}=t,d=s?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:st])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,nr(e),c.disconnect();break}},d);c.observe(o)},or=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?rr(e):window.navigator.sendBeacon(e)},rr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},ar=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:[]}),sr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{pageContext:{deviceType:o},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[o],d=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void s(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},Ti(d)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=U.getData("alertoryConfigKeywords"),v=null!==(i=c(Xi(e)).keywords)&&void 0!==i?i:{},g=new Go,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===rt?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===Jo){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,h,o),h.adType===Xo&&(Qo(t.pageContext.publisher,l,Zo,t.pageContext.pageType),er({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:o,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var o,r,a;let s;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(s=document.createElement("iframe"),n.appendChild(s)),_n(e,n,Number(null==i?void 0:i.adid)),null==s||s.remove()})(e.targetId,e.invCode,l,h.bid))}),dr=(e,t)=>{e.forEach(e=>sr(e,t).catch(e=>{s("Failed to handle server-side ad:",e)}))},lr={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},cr=e=>Ie(void 0,void 0,void 0,function*(){if(!(e=>{const{editory:{editableConfiguration:{enabled:t=!1,pageTypeToFetch:n}={}}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editory:{editoryUrl:n,editableConfiguration:{pageTypeToFetch:i}={}}={}}=e;return(null==t?void 0:t.publisherClassName)&&i?`${n||"https://alertory-cdn.inventory.schibsted.io"}/editable-configurations/${t.publisherClassName}/${i.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield Ft.get(t,{method:"GET",signal:n.signal})}catch(e){throw s("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?((e,t)=>o(t,e,lr))(e,t):e}catch(t){return s("Error fetching S3 config, using site config",{error:t}),e}}),ur=(e,t)=>{const{pageContext:{isMobileApp:n}}=p.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let pr,vr=[];const gr=["takeover","wallpaper"],hr=e=>{const t=(e=>{var t;const n=U.getData("alertoryConfigKeywords"),{queryConfig:i,placements:o,tcf:r,glimr:a,appearanceConfig:s,pageContext:{publisher:d,countryCode:l,pageType:u,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y,fullWidth:f}=e,w=null!==(t=null==i?void 0:i.batchSize)&&void 0!==t?t:c;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:d,countryCode:l,pageType:u,deviceType:p,isMobileApp:v},pageSetup:h,placements:o,tcf:r,queryConfig:Object.assign(Object.assign({},i),{batchSize:w})},a&&{glimr:a}),s&&{appearanceConfig:s}),m&&{takeover:m}),y&&{fullscreenScroll:y}),f&&{fullWidth:f})}})(e);window.advertory={initialized:!0,version:"3.3.9-inv-2613.2",siteConfig:e,alertoryConfig:t}},mr=()=>Ie(void 0,void 0,void 0,function*(){const{pageOptions:e}=p.get(),{preparePageOptions:t}=p.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=p.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return(yield je(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=U.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=eo(e);U.setData("alertoryConfigKeywords",n)})(o.keywords),x(()=>pr.setPageOpts(o))}),yr=e=>Ie(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),r=yield je(n,i,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>F(e.targetId)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(e,r);fr(a);(null==t?void 0:t.enabled)&&r&&!D()?(s("core loadPlacements prebid enabled"),yield qn()):(s("core load tags invoked without prebid enabled"),wr(a))}),fr=e=>{const{prepareTag:t}=p.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{s("core defineTags",{placement:e});const i=Xi(e);if(Qi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Zi(i),sizes:o}})(o);n.push(r),x(()=>(s("core defineTag - add to the queue",{placement:e,preparedTag:o}),pr.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},wr=e=>{const t=e.filter(({targetId:e})=>Qi(e)).map(({targetId:e})=>e);t.length&&x(()=>(s("core loadTags",{placementsIdsToLoad:t}),pr.loadTags([...t])))},br=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:i}}=p.get(),{requestThreshold:o,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),d=null==n?void 0:n.defaultThreshold[i];a&&(s("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:d}),yield Pi(a,null!=o?o:d)),a&&(null==r?void 0:r.scroll)&&(s("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),kr=e=>e.some(({targetId:e})=>gr.some(t=>e.includes(t))),xr=e=>Ie(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=c}={},pageContext:{deviceType:i}}=p.get(),o=Q(e),r=Object.keys((null==t?void 0:t[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),s=e.filter(({targetId:e})=>!a.has(e));return[...r,...Fi(s,n)]})(i);for(const e of o)kr(e)?(s("core loadAds without lazy loading",{placementsToLoad:e}),yield yr(e)):e.length&&(s("core loadAds with lazy loading",{placementsToLoad:e}),yield Cr(e));const{finnBlink:r}=p.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return La});yield e(n)}}),Cr=e=>Ie(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=p.get(),i=[];if(!t)return s("lazy load is not enabled",{placements:e}),void(yield yr(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{s("lazy load is enabled - handler start",{loadedTargetIds:i,placements:e});const o=e.every(e=>i.includes(e.targetId)),r=e.map(e=>e.targetId);!o&&i.push(...r),!o&&yr(e),s("lazy load is enabled - handler stop",{loadedTargetIds:i,placements:e,arePlacementsLoaded:o,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(s("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),Er=()=>Ie(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];x(()=>{pr.onEvent("adRequested",()=>{e.adRequested()}),pr.onEvent("adAvailable",o=>Ie(void 0,void 0,void 0,function*(){var r,a,d,l,c,u;s("core adAvailable start",{placementsAvailable:vr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Yi(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)});const v=null===(d=null===(a=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===d?void 0:d.adResponse.ads;if(Yi(o)&&v&&(null===(l=v[1])||void 0===l?void 0:l.rtb)&&(o.banner=null===(u=null===(c=v[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),le(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return $n});e(o)}const{widescreenSwitching:g}=p.get();if(be(o)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return Ma});e()}if(le(o)&&!ye(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return $n});e(o,i)}if(!ce(o)||Yi(o)||ye(o.targetId)||null==t||t(o,p.get()),pe(o)&&!he(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return ts});e(o.targetId),yield t(o)}if(ge(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return _});e(()=>x(()=>window.apntag.showTag(o.targetId)),n),U.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&U.setData("horseshoe",{isAvailable:!0}),it({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),e.adAvailable(o);const h=vr.find(({targetId:e})=>e===o.targetId);h&&(yield br(h,o),vr=vr.filter(e=>e.targetId!==h.targetId)),s("core adAvailable stop",{placementsAvailable:vr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Yi(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)})})),pr.onEvent("adLoaded",n=>Ie(void 0,void 0,void 0,function*(){const{refreshConfig:i,appearanceConfig:r,wallpaper:a,adScaleConfig:s}=p.get(),d=document.getElementById(n.targetId);if(ye(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return xa});e(n)}if(o.includes(n.targetId)&&ce(n)&&(null==t||t(n,p.get()),it({adObj:n})),!o.includes(n.targetId)&&Yi(n)&&o.push(n.targetId),he(n)&&F(n.targetId),pe(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return ts});e(pr,n.targetId)}if((e=>Ce(e,ee))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return rs});e(n)}if((e=>Ce(e,ne))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return rs});e(n)}if(ue(n)){const{applyFullwidthFormat:e}=yield Promise.resolve().then(function(){return rs});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;qi({adWrapper:o,placementContainer:i});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Di(i,a,r))})(n,i),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(U.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return _});e(n.targetId)}if(null==s?void 0:s.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return ft});e(n),t(n)}e.adLoaded(n),Ln(n.targetId),d&&(d.classList.add(Nn),(e=>{var t,n;const{pageSectionsSelectors:i}=p.get(),o=null==i?void 0:i.mainFirstColumn,r=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(d)),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:ot(n)}}))})),pr.onEvent("adNoBid",t=>Ie(void 0,void 0,void 0,function*(){var n;if(F(t.targetId),null===(n=p.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return hi});yield e(p.get(),t)}if(pe(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(t)}e.adNoBid(t)})),pr.onEvent("adError",(t,n)=>Ie(void 0,void 0,void 0,function*(){if(pe(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(n)}e.adError(t,n)})),pr.onEvent("adCollapse",()=>{e.adCollapse()}),pr.onEvent("adRequestFailure",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield vi(p.get(),t),e.adRequestFailure(t)})),pr.onEvent("adBadRequest",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield vi(p.get(),t),e.adBadRequest(t)})),pr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),pr.onEvent("adNoBidMediated",t=>Ie(void 0,void 0,void 0,function*(){yield vi(p.get(),t),e.adNoBidMediated(t)}))})}),Ir=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(i)return H(),[];o&&(H(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{B(e.id)})),v(null!=e?e:{}),yield mr();const{clientSidePlacements:s,serverSidePlacements:d}=ar(J(a));let l=s;return r&&(l=l.filter(e=>ye(e.targetId))),dr(d,p.get()),l.length>0&&(vr=[...vr,...l.map(e=>Object.assign({},e))],Ui(l),zi(l),yield xr(l)),vr}),Tr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;p.set(e),p.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:i,kilkaya:o,rightColumnSplit:r,drEdition:a,finnBlink:d}=e;if(U.initialize(),window.addEventListener("message",Ii,!1),pr=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=pr,s("Apn tag is set up on window"),yield Promise.allSettled([Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();(yield je(e,t,n,"xandr-endpoint"))||pr.setEndpoint("ib.adnxs-simple.com",!0)}),Ie(void 0,void 0,void 0,function*(){if(D())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get(),o=yield je(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield on(null==e?void 0:e.prebidUrl))}),Qt(e),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield on(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get();(yield je(t,n,i,"gpt-endpoint"))&&(yield on(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),Ie(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),{getConsentAsync:r}=Oe(n,0,o),a=yield r();if(e&&t&&a){if(yield on(t),document.querySelector(`.${io}`))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(io)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),At(),Ie(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=p.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield on(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==i?void 0:i.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return ss});yield e()}s("Libraries have been loaded and trackers have been set"),yield Er(),yield mr(),s("Page options have been set"),hr(e),s("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=ar(J());if(vr=l,dr(c,e),Ui(vr),zi(vr),yield xr(vr),s("Ads has been loaded",vr),gi(e,vr),to(vr),null==d?void 0:d.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return La});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 hi});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return ms});t(e.rightColumnSplit)}if(null==o?void 0:o.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return Es});yield t(e)}}),Sr=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield((e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{initConsentManager:o,getConsentAsync:r}=Oe(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(i=e.pageContext)||void 0===i?void 0:i.countryCode),a=yield cr(e);yield ci(),yield no(o),yield no(r),s("TCF resolved successfully"),yield Tr(a,t),s("Run function resolved successfully")}))(e,t)}),Ar=(e,t,n,i)=>{var o;const{image:r,icon:a,sponsoredBy:s,title:d,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:k}=e,x=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:x(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=d?d:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return x(t?w:a)})(),sponsoredBy:null!=s?s:"",title:null!=d?d:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:x(b),previewVideoSrc:null!=k?k:""},t)},Pr=(e,t)=>{const n=(i=M,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(M),r=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Or=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(bt).includes(i);n&&r&&Qo(i,e,Zo,o)})(o,n),i())},jr=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:s,targetId:d}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(i=Pr(e.targetId,l))&&void 0!==i?i:c,p=In[t.language||g.NO],v=Ar(s,p,d,t);return(s.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);Or(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&er(e,t)})},$r=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});jr(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Lr=e=>{const{pageContext:{countryCode:t}}=p.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,o=`${h(t)}-adformat`,r=n?n[o]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in de)||window.innerWidth>=de[e]);return{[o]:i?a:r}},_r=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},Nr=()=>{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},qr=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},Mr=(e,t)=>qr(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},Dr=e=>qr(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class Fr{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return Ie(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return Ie(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Br=9826;class Rr{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===rt?"phone":at}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return Ie(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return _e()}getExternalUid(){return Ie(this,void 0,void 0,function*(){return yield Le(p.get())})}isTrackingForbidden(){return Ie(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=Br}={}}=p.get();return"true"===N("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=p.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return Ie(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get(),{getConsentAsync:i}=Oe(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=p.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}}const Ur=new Rr,Vr=Ur.prepare.bind(Ur);function zr(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=pt();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Hr=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Wr(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Hr.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Kr extends Rr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=zr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Wr(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Gr=new class extends Kr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,s;const d=p.get(),l=null!==(i=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},c=null!==(a=null===(r=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(s=d.siteSpecificConfig)||void 0===s?void 0:s.publisherClassName,v=new Fr;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(Lt(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Zt()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{}).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords);const h=v.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:h,user:Object.assign(Object.assign({},Yt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Jr=Gr.prepare.bind(Gr);class Xr extends Rr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=p.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(r=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==r?r:0};var n,i,o,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=p.get(),{appMode:t,mobileOS:n}=zr(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const Qr=new class extends Xr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;const s=p.get(),d=null!==(i=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},l=null!==(a=null===(r=null===(o=s.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new Fr;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(Lt(p.get(),d.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>Ie(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(Zt()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===$e("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),v=!1!==d.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},Yt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Yr=Qr.prepare.bind(Qr),Zr="viewable",ea="adClick";var ta=e=>(t,n,i)=>{const{video:o,img:r,url:a}=t,{publisher:s,productTag:d}=n,{pluginsNames:l,videoLoop:c}=i||{};if(!(null==o?void 0:o.content))return null;const u=Math.ceil(1e5*Math.random()),p=r||"https://custom.inventory.schibsted.io/1x1-00000000.png",v=`ad-player-${u}`,g=na(o.content,a),h=ia({id:u,nodeId:v,poster:p,tagURL:g,publisher:s,productTag:d,videoLoop:c});return oa({playerConfig:h,clickUrl:a,pluginsNames:l}),`${e(t,n,v)}`};const na=(e,t)=>{const n=(new DOMParser).parseFromString(e,"text/xml"),i=n.querySelector("ClickThrough"),o=n.querySelector("VideoClicks");if(i){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n.createCDATASection(t))}else if(o){const e=n.createElement("ClickThrough");e.appendChild(n.createCDATASection(t)),o.appendChild(e)}return URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(n)],{type:"text/xml"}))},ia=({id:e,nodeId:t,poster:n,tagURL:i,publisher:o="",productTag:r="xandr",videoLoop:a=!1})=>({id:e,poster:n,vendor:"appnexus",node:t,mute:!0,autoplay:a,repeat:a,skin:{name:"inventory-player",url:"https://ads.inventory.schibsted.io/styles/player.css"},settings:{jw:{stretching:"fill",advertising:{client:"vast",tag:i}}},pulse:{provider:o.toLowerCase(),decorator:e=>Object.assign(Object.assign({},ii(e)?e:{}),{provider:Object.assign(Object.assign({},ii(null==e?void 0:e.provider)?e.provider:{}),{productTag:r})})}}),oa=e=>Ie(void 0,void 0,void 0,function*(){const{playerConfig:t,pluginsNames:n,clickUrl:i}=e,{repeat:o}=t,r=yield Qn(t);Zn(n),r.once("assetReady",()=>{Xn(r,n)}),r.on(Zr,e=>{const{viewable:t}=e;t?r.play():r.pause()}),r.on(ea,()=>{window.open(i,"_blank")}),o&&r.on("pause",()=>{r.play()})}),ra=({containerId:e,url:t,body:n,title:i,logo:o,isContentVideoAd:r=!1,imgWidth:a})=>{const s=`\n <div class="ad-header">\n <span>ANNONSØRINNHOLD</span>\n ${o?`<img alt="" aria-hidden="true" class="ad-logo" src="${o}" />`:""}\n </div>\n `,d=`<div class="ad-text">${i}</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 ${s}\n ${n}\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${d}\n </a>\n `:`\n <a class="ad-link" href="${t}" rel="noopener nofollow sponsored">\n ${s}\n ${n}\n ${d}\n </a>\n `}\n </div>\n `},aa=["IntegrationMenu"],sa=({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">${In.no.adText}</span>\n </div>`;Cn('@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}}'),Cn('.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 da={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return Is}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`)},la={default:da.NATIVE_TEMPLATE,content:({containerId:e,url:t,title:n,img:i,imgWidth:o,imgHeight:r,logo:a,imgAltText:s})=>{const d=mt(o,r);return ra({containerId:e,url:t,title:n,logo:a,imgWidth:o,body:`\n<div class="ad-image-wrapper" ${d?`style="padding-bottom: ${100*d}%"`:""}>\n <img alt="${s}" class="ad-image" src="${i}" />\n</div>`})},contentVideo:(e,t)=>ta(({containerId:e,url:t,title:n,logo:i},o,r)=>ra({containerId:e,url:t,title:n,isContentVideoAd:!0,logo:i,body:`\n<div class="ad-video-wrapper">\n <div id="${r}"></div>\n</div>`}))(e,t),nativeVideo:(e,t)=>ta(({containerId:e,url:t,sponsoredBy:n,title:i},o,r)=>(({containerId:e,url:t,sponsoredBy:n,body:i,title:o})=>`\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">${In.no.adFrom} ${n}</div>\n ${i}\n <div class="ad-text">${o}</div>\n </a>\n</div>`)({containerId:e,url:t,sponsoredBy:n,title:i,body:`\n<div class="ad-video-wrapper">\n <div id="${r}"></div>\n</div>`}))(e,t),weeklyMenuVideo:(e,t)=>ta(sa)(e,t,{videoLoop:true,pluginsNames:aa}),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&nbsp;mer\n </a>\n </div>\n </div>`,weeklyMenu:({containerId:e,url:t,img:n,imgAltText:i})=>`<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="${i}" class="ad-image" src="${n}" />\n <span class="ad-label">${In.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&nbsp;mer\n </a>\n </div>\n </div>\n </div>`},ca={displayTemplates:{default:la.default,content:la.content,"ukesmeny-stripe":la.weeklyMenuStripe,ukesmeny:la.weeklyMenu,sponsorstripe:la.sponsorstripe},videoTemplates:{default:la.nativeVideo,content:la.contentVideo,menu:la.weeklyMenuVideo}},ua={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r,globalPlacementId:a}=e,{pageSetup:s,pageContext:{countryCode:d}}=p.get();if(!s)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=ur(i,o),a=Lr(e),s=_r(n),d=Nr(),l=Dr(i),c=Mr(i);return Object.assign(Object.assign({},e),{invCode:r,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),s),l),d),rendererOptions:c})})(e);const{tag:{useAppTabletInvCode:l=!0}={}}=s,c=ur(o,l),u=Lr(e),v=_r(i),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),m=Nr(),y=Dr(o),f=Mr(o,{safeFrameAutoInitialSize:!0}),w=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,b=(new Fr).add(null!=n?n:{}).add(u).add(v).add(null!=g?g:{}).add(y).add(m).addIf(null===(t=null==s?void 0:s.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(d)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:w,invCode:c,keywords:b,rendererOptions:f,globalPlacementId:a||c})},preparePageOptions:e=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Yr(e):Jr(e):yield Vr(e)}),siteEvents:wt,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Jn.FRONT,deviceType:r}=null!==(n=null==t?void 0:t.pageContext)&&void 0!==n?n:{},{nativeTrackingConfig:a,appearanceConfig:s}=null!=t?t:{},d={language:g.NO,publisher:bt.GODT,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:s};jr(e,d,ca)}},pa=((e,t)=>({init:n=>Sr(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:Ir,getVideoPPIDs:nn,createInitNativeAd:$r,getVideoAdsConfig:zo}))(ua,kt),va=Cn("[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 ga=Object.freeze({__proto__:null,default:va});Cn('.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 ha={Blink:"Blink"},ma=new Map,ya=e=>{var t;if(!ma.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(ha)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw ma.delete(e),t});ma.set(e,t)}return null!==(t=ma.get(e))&&void 0!==t?t:Promise.resolve()},fa="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",wa="https://www.finn.no/distribution-front/external/carousel",ba=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:i}}=p.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Qo(n,o,Yo,null!=t?t:i);it({preferredTestIdData:{targetId:e,testId:"finn"}})},ka=e=>{const{pageContext:{publisher:t=""}}=p.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)};var xa=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();le(e)&&On(e,t),ce(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:ba,xandrAdLoaded:ka});const Ca={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return s(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){s(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){s(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},Ea="finn_blink_id",Ia=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:i,theme:o}=e,r=Ee(e,["userId","id","hashed_email","theme"]),a=window[ha.Blink];if(!a)return;const s=new a({remote:wa,id:n,hashed_email:i,theme:o});yield s.inject(Object.assign({},r))}),Ta=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=Ee(e,["userId","theme"]),o=window[ha.Blink];if(!o)return;const r=new o({remote:wa,userId:t,theme:n});yield r.inject(Object.assign({},i))}),Sa=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},Aa=(e,t)=>{const{finnBlink:{enabled:n}={}}=p.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:o,height:r,requireImage:a,theme:s,rec:d,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${Sa(e)}`,enabled:i,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:d,theme:"dark"===s?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},Pa=(e,t,n)=>Ie(void 0,void 0,void 0,function*(){var i;const{placements:o,pageContext:{deviceType:r}}=p.get();s(`rendering finn blink ad for ${e}`);const a=w(e),d=o[r].find(e=>e.targetId===a),l=Aa(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 ka(e);if((e=>{var t;const n=Sa(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void s(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:y}={}}=null!=v?v:{},f=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=_e();return null!=e?e:""}return e})(g),k="dark"===y?"dark":"light";try{const e=yield Ie(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=Ca.get(Ea),n=N("finncode");if(!e||n)return"";if(!t){const t=yield Ft.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return Ca.set(Ea,n),n}return t}),t=yield Ie(void 0,void 0,void 0,function*(){const{ppid1:e}=Xt.getPPIDs();return e}),n=(null===(i=null==d?void 0:d.finnBlink)||void 0===i?void 0:i.useNewConstructor)?Ta:Ia;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:k,uuid:h})).then(()=>{ba(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){s(`Finn blink error ${t}`),n&&n(e),!n&&F(e),ka(e)}}),Oa=()=>Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return!!(yield je(e,t,n,"finn-blink"))||(s("Skip loading finn blink ad due to missing TCF consent."),!1)}),ja=(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}`)},$a=e=>document.querySelector(`#${e}`);var La=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>Ie(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=p.get(),i=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=$a(n);o&&(yield Pi(o,null!=e?e:i))}}),loadFinnBlinkAd:(e,t,n,i)=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=p.get();if(s(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield Oa())||o)return n&&n(e),ka(e),void(!n&&F(e));try{yield ya(fa)}catch(e){console.error(e)}yield Pa(e,t,n),i&&i()}),replaceAdsWithFinnBlink:(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;if(!t)return;const{replacementConfig:o}=t,r=null===(n=null==o?void 0:o.adsToReplace)||void 0===n?void 0:n[e],a=null===(i=null==o?void 0:o.sizes)||void 0===i?void 0:i[e];ui()&&r&&a&&t.enabled?(yield Oa())&&(yield ya(fa),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=p.get(),n=document.createElement("div"),i=document.createElement("div");return i.id=e,n.appendChild(i),Qo(t,i,Yo),s(`Creating blink container for: ${e}`),n})(t);(e=>{s(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),ja(n,i),n.dataset.finnBlinkId=t,Si().withFullAdsChain(e)})):s(`Finn blink configuration is incorrect: ${JSON.stringify(o)}`)})});const _a=1e4,Na=e=>e.some(e=>e.some(e=>!!e&&Ri(e,0)));let qa;var Ma=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=_a,widescreenIdPrefix:i}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=p.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let r=0,a=Date.now(),s=Na(o);if(!o.length)return;qa&&window.removeEventListener("scroll",qa);const d=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(o);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{s||(s=Na(o)||s,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=o.map(e=>e[r]),n=o.map(t=>t[e]);d(t,"opacity","0"),setTimeout(()=>{d(t,"display","none"),d(n,"opacity","0"),d(n,"display","block"),setTimeout(()=>{d(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);qa=c,window.addEventListener("scroll",c)}});const Da="#fff",Fa="#0098da",Ba=(e,t=!0)=>{(e===qe||e===Me)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Ra=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Ua=e=>{document.body.style.overflow=e?"initial":"hidden"},Va=e=>{const t=Ha(e),n=za(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Ua(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},za=e=>{const t=()=>Va(e);return window.addEventListener("advertory:closeTakeover",t),Ra(),t},Ha=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Va(e)};return Ra(),window.addEventListener("keydown",t),t},Wa=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Ha(e),za(e),Ra(),t.addEventListener("click",()=>{Va(e)}),Ua(!1))},Ka=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),za(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Ga=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Va(e))})(e)},Ja=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=p.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=In.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Xa=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=In.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Qa=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=In.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Ya=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=In.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Za=()=>{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)},es=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${et})()`,e+t.outerHTML})(e)),n};var ts=Object.freeze({__proto__:null,createTakeoverAd:e=>Ie(void 0,void 0,void 0,function*(){const{takeover:t}=p.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!t)return;const r=Je(e),a=o.offsetHeight,s=window.scrollY>a;o.style.display="block",!s&&Ba(r,!1),((e,t)=>{({[qe]:Qa,[Ne]:Ja,[Me]:Xa,[De]:Ya})[t](e)})(o,r),Za(),((e,t)=>{({[qe]:Ka,[Me]:Ka,[Ne]:Wa,[De]:Ga})[t](e)})(o,r),((e,t,n)=>{if(!n)return;({[qe]:()=>{const{buttonLabel:i}=Ye(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[Ne]:()=>{const{themeColors:i,logotype:o,buttonLabel:r,showArrowIcon:a}=Ye(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=r?r:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:Da,"important"),n.style.color=null!=t?t:Fa}}})},[Me]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:r=!0}=Ye(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[De]:()=>{}})[t]()})(o,r,t),yield Xe(),!s&&Ba(r,!0),Ze(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=cn(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=cn(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,es(t))},modifyTakeoverIframe:(e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===i&&n===o||(r.style.width=i,r.style.height=o)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const ns=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},is=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:r,fullWidthFormatClassName:a}={},fullWidth:s,pageContext:{deviceType:d}}=p.get();if(!o)return null;const l=o.parentElement;if(o.style.width=vt(d)?"100vw":"100%",o.style.position="relative",l&&(l.style.width=vt(d)?"100vw":"100%",l.style.position="relative"),r&&a){const e=`advertory-${r}-${a}`;o.classList.add(`${e}__${t}`),null==l||l.classList.add(`${e}-wrapper__${t}`)}const c=null===(i=null===(n=null==s?void 0:s.options)||void 0===n?void 0:n.styles)||void 0===i?void 0:i[d],u=(null==s?void 0:s.enabled)&&c;return!u&&l&&vt(d)&&(l.style.left="50%",l.style.marginLeft="-50vw"),u&&c.adContainer&&ns(o,c.adContainer),u&&c.adContainerWrapper&&l&&ns(l,c.adContainerWrapper),o},os=(e,t,n,i)=>{const o=is(e,i);if(!o)return;const r=o.querySelector("iframe"),a=null==r?void 0:r.parentElement;if(!r||!a)return;const s=o.offsetWidth,d=s/e.width;a.style.transform=`scale(${d})`,a.style.transformOrigin="left top";const l=Math.round(s/t*n);o.style.height=`${l}px`};var rs=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{os(e,1080,1080,"fullsquare-ad")},applyFullwidthFormat:e=>{const t=is(e,"fullwidth-ad");if(!t)return;const n=t.querySelector("iframe");if(!n)return;const{deviceType:i}=p.get().pageContext;n.style.width=vt(i)?"100vw":"100%",(null==n?void 0:n.parentElement)&&(n.parentElement.style.width=vt(i)?"100vw":"100%")},applyNinesixteenFormat:e=>{os(e,1080,1920,"ninesixteen-ad")}});const as=e=>e===g.NO?"schibsted":"schibstedse";var ss=Object.freeze({__proto__:null,getCampaign:as,loadNorstat:()=>Ie(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:i}=p.get(),o=yield je(i,n,t,"norstat");if(!e||n||!o)return;const r=(e=>{const{ppid1:t,ppid2:n}=Jt.getPPIDs(),{ppid1:i,ppid2:o}=Xt.getPPIDs(),r=(new Gt).add(n,Rt[e]).add(t,Ut[e]).add(o,Vt[e]).add(i,zt[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{Ie(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${as(t)}/map/${r}`,"norstat")})});const ds=".advertory-right-column-track",ls="--advertory-right-column-track-height",cs=e=>e.getBoundingClientRect().top+window.scrollY,us=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},ps=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},vs=(e,t)=>`${e}-${t}`,gs=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=cs(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=us(e);ps("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=cs(e),o=vs(ls,t),r=i-n,a=vs("--advertory-right-column-split-point-height",t),s=us(e);ps(o,r),ps(a,s)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=vs("--advertory-right-column-ad-height",t),i=us(e);ps(n,i)})(o[t])});((e,t)=>{const n=cs(e);ps(ls,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let hs=!1;var ms=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||hs)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=ds}=e,o=document.querySelector(i);if(!o)return;hs=!0;const r=()=>{gs(o,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(o)}});class ys{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class fs{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class ws{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,s,d,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(o=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===o||o.call(i,u):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(l=null===(d=this.pulse)||void 0===d?void 0:d.trackElementView)||void 0===l||l.call(d,u)})}trackContentClick(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,s):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,s)})}}class bs extends ws{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,r,a;const{clientName:s,creativeId:d,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=d?d:l},page:{"@id":null!=p?p:c,"@type":u,url:location.origin},tags:null===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const ks="[data-k5a-teaser-analytics]",xs=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new bs(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(ks);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(ks);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{s.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class Cs{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[bt.VG]:new ys}[n]||new fs;xs(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(s(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}loadKilkayaScript(e){return Ie(this,void 0,void 0,function*(){yield on(e)})}run(e){return Ie(this,void 0,void 0,function*(){var t,n;const{tcf:i,pageContext:{isMobileApp:o,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const s=yield je(i,o,r,"kilkaya");s&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(s),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var Es=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=s(r,"data-pulse"),l=s(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},runKilkaya:e=>Ie(void 0,void 0,void 0,function*(){const t=new Cs;yield t.run(e)})});Cn('.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 Is=Object.freeze({__proto__:null});module.exports=pa;