@schibsted/advertory 3.0.6 → 3.0.9

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 (355) hide show
  1. package/ad-native/cjs/index.js +1 -1
  2. package/ad-native/es/index.d.ts +630 -0
  3. package/ad-native/es/index.js +1 -1
  4. package/aftenposten/cjs/index.js +1 -1
  5. package/aftenposten/es/_auto-entry_aftenposten-DQm5I4hp.js +1 -0
  6. package/aftenposten/es/{events-BiOReKj-.js → events-CLu9WhE9.js} +1 -1
  7. package/aftenposten/es/{index-DnWEiM4c.js → index-5_9BZU2h.js} +1 -1
  8. package/{aftonbladet/es/index-83h2NWY6.js → aftenposten/es/index-BDo3pJv6.js} +1 -1
  9. package/aftenposten/es/{index-BmVi0i4S.js → index-BKSoSDR9.js} +1 -1
  10. package/aftenposten/es/{index-Cz8r8G4d.js → index-B_uDF46T.js} +1 -1
  11. package/aftenposten/es/{index-BkrGcyRe.js → index-CL_6Ijvb.js} +1 -1
  12. package/aftenposten/es/{index-C9Mu0Gt8.js → index-CpCxxAaS.js} +1 -1
  13. package/aftenposten/es/{index-DVVcBfQc.js → index-bT4YXWB1.js} +1 -1
  14. package/aftenposten/es/{index-WyLWHrcG.js → index-zerHyw1F.js} +1 -1
  15. package/aftenposten/es/index.js +1 -1
  16. package/aftenposten/es/{scale-ad-BN6wRFMn.js → scale-ad-DNyvCG9y.js} +1 -1
  17. package/aftenposten/es/{styles-DLG8YfzI.js → styles-Baq5Ezbu.js} +1 -1
  18. package/aftenposten/es/{styles-CvC8lV3a.js → styles-Bd7wJzie.js} +1 -1
  19. package/aftenposten/es/{styles-CHl4sGa8.js → styles-C17s-D85.js} +1 -1
  20. package/aftenposten/es/{styles-BhbI9BH_.js → styles-D4lv-cQ5.js} +1 -1
  21. package/aftenposten/es/{styles-CpeCM6Ps.js → styles-D7jAXeZ9.js} +1 -1
  22. package/aftenposten/es/{styles-DwtiuFNT.js → styles-Dfo17omJ.js} +1 -1
  23. package/aftenposten/es/{styles-DVS4-j__.js → styles-DgUjw8KY.js} +1 -1
  24. package/aftenposten/es/{styles-BevLxuvE.js → styles-DmFIB5BG.js} +1 -1
  25. package/aftenposten/es/{styles-BnvtxCyd.js → styles-EP04iNvW.js} +1 -1
  26. package/aftenposten/es/{styles-Ch9fpsZ1.js → styles-ys_lB2uU.js} +1 -1
  27. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-COmN_rMc.js +1 -0
  28. package/aftenpostenv2/es/{events-BUG4Slrp.js → events-CLFsMd40.js} +1 -1
  29. package/aftenpostenv2/es/{index-DONYheYn.js → index-4wsFW4vR.js} +1 -1
  30. package/aftenpostenv2/es/{index-DgcWmCdw.js → index-BEGtd2lz.js} +1 -1
  31. package/aftenpostenv2/es/{index-Bg19RO96.js → index-BOD-JyTw.js} +1 -1
  32. package/aftenpostenv2/es/{index-CrkUi7Cu.js → index-CDOwIwSg.js} +1 -1
  33. package/aftenpostenv2/es/{index-CZzOieuG.js → index-Dp10fvLI.js} +1 -1
  34. package/aftenpostenv2/es/{index-DuxqIOaJ.js → index-KgD9_1BH.js} +1 -1
  35. package/aftenpostenv2/es/{index-Y0_my3VC.js → index-lCJTj9FD.js} +1 -1
  36. package/aftenpostenv2/es/{index-BrPyuYbz.js → index-zbtVaHAt.js} +1 -1
  37. package/aftenpostenv2/es/index.js +1 -1
  38. package/aftenpostenv2/es/{scale-ad-Dm-T3akL.js → scale-ad-C3UxfUhY.js} +1 -1
  39. package/aftenpostenv2/es/{styles-Gfde75vY.js → styles-4hfsgISD.js} +1 -1
  40. package/aftenpostenv2/es/{styles-Bw6Iz3e6.js → styles-BhbVANLq.js} +1 -1
  41. package/aftenpostenv2/es/{styles-DMDxhWs6.js → styles-BlUmY7Dh.js} +1 -1
  42. package/aftenpostenv2/es/{styles-DtFe69Y9.js → styles-CGlAPeSy.js} +1 -1
  43. package/aftenpostenv2/es/{styles-XudO4a1Y.js → styles-CV_-DLEh.js} +1 -1
  44. package/aftenpostenv2/es/{styles-DbIUgjQ2.js → styles-DMnLqhl_.js} +1 -1
  45. package/aftenpostenv2/es/{styles-BGEov2ov.js → styles-DgojDSyC.js} +1 -1
  46. package/aftenpostenv2/es/{styles-Bf11CRR-.js → styles-Klf__Vv9.js} +1 -1
  47. package/aftenpostenv2/es/{styles-BTgNbjpD.js → styles-j6ldBnRh.js} +1 -1
  48. package/aftenpostenv2/es/{styles-1Aswg3em.js → styles-rIJXQHnz.js} +1 -1
  49. package/aftonbladet/cjs/index.js +1 -1
  50. package/aftonbladet/es/_auto-entry_aftonbladet-DfsNK9YG.js +1 -0
  51. package/aftonbladet/es/{events-B4ruQzaH.js → events-CEaJHu3m.js} +1 -1
  52. package/aftonbladet/es/{index-0yKCB2Er.js → index-9ILbX4p6.js} +1 -1
  53. package/aftonbladet/es/{index-Ccs_VxY6.js → index-BaYfJLeA.js} +1 -1
  54. package/aftonbladet/es/{index-CixJkxBn.js → index-BbfH_JE2.js} +1 -1
  55. package/aftonbladet/es/{index-Cp6Yn5AN.js → index-BzifCoKN.js} +1 -1
  56. package/aftonbladet/es/{index-CWVIPjU_.js → index-CcEDxo_l.js} +1 -1
  57. package/aftonbladet/es/{index-BCV8mqlU.js → index-CfjGy0X9.js} +1 -1
  58. package/aftonbladet/es/{index-D-7NfPfb.js → index-D9zUPszl.js} +1 -1
  59. package/{aftenposten/es/index-9b-m-KQP.js → aftonbladet/es/index-ySQNo1u8.js} +1 -1
  60. package/aftonbladet/es/index.js +1 -1
  61. package/aftonbladet/es/{styles-BLMPQ0Mt.js → styles-A0TbAbzN.js} +1 -1
  62. package/aftonbladet/es/{styles-DTtAgpp8.js → styles-B3W2g5iI.js} +1 -1
  63. package/aftonbladet/es/{styles-B2QX0AtB.js → styles-DWsZ4nEc.js} +1 -1
  64. package/aftonbladet/es/{styles-z3KsuiDZ.js → styles-KUAPzCkM.js} +1 -1
  65. package/aftonbladet/es/{styles-D4VPUS1L.js → styles-QwQbwJ4_.js} +1 -1
  66. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-CQSAbp_Q.js +1 -0
  67. package/aftonbladetv2/es/{events-10LRdeil.js → events-Bny82xg7.js} +1 -1
  68. package/aftonbladetv2/es/{index-B9Sd32Z_.js → index-B-wealpt.js} +1 -1
  69. package/aftonbladetv2/es/{index-OdPoHa9d.js → index-BEuVj4Q4.js} +1 -1
  70. package/aftonbladetv2/es/{index-CsnHCdC0.js → index-BfedPJ4a.js} +1 -1
  71. package/aftonbladetv2/es/{index-3YUoluk1.js → index-C_avelPJ.js} +1 -1
  72. package/aftonbladetv2/es/{index-vkRNMEYa.js → index-CrEOClHI.js} +1 -1
  73. package/aftonbladetv2/es/{index-DIi3aGIM.js → index-DOmwW0Ss.js} +1 -1
  74. package/aftonbladetv2/es/{index-C7rEBjKb.js → index-DyfUCqTk.js} +1 -1
  75. package/aftonbladetv2/es/{index-E6AY4_O1.js → index-RJ7AjB1Z.js} +1 -1
  76. package/aftonbladetv2/es/index.js +1 -1
  77. package/aftonbladetv2/es/{scale-ad-xY4xNHgG.js → scale-ad-VvNFBDL0.js} +1 -1
  78. package/aftonbladetv2/es/{styles-B8wEVl5X.js → styles-5B8Ku1LX.js} +1 -1
  79. package/aftonbladetv2/es/{styles-n1F9shXX.js → styles-DHz2nQWG.js} +1 -1
  80. package/aftonbladetv2/es/{styles-BXu1KWtb.js → styles-D_bSSM10.js} +1 -1
  81. package/aftonbladetv2/es/{styles-BG8mdBSr.js → styles-DsruEkBe.js} +1 -1
  82. package/aftonbladetv2/es/{styles-DPUF_164.js → styles-DwotkCe0.js} +1 -1
  83. package/aftonbladetv2/styles.css +1 -1
  84. package/bt/cjs/index.js +1 -1
  85. package/bt/es/_auto-entry_bt-CL1HGDfN.js +1 -0
  86. package/bt/es/{events-hq5gVY-o.js → events-CBy8vMhe.js} +1 -1
  87. package/{sa/es/index-CXuVavV9.js → bt/es/index-BYhxVbf7.js} +1 -1
  88. package/{sa/es/index-CYQAD_ws.js → bt/es/index-B_CSGyv9.js} +1 -1
  89. package/bt/es/{index-CFLvdW86.js → index-CYn4N_wP.js} +1 -1
  90. package/bt/es/{index-DNVg46jX.js → index-D8O_17Mx.js} +1 -1
  91. package/bt/es/{index-htUFwlbz.js → index-DDRr8MYB.js} +1 -1
  92. package/bt/es/{index-DIGkY5_R.js → index-DiUe_YIG.js} +1 -1
  93. package/bt/es/{index-sGPtCCtm.js → index-DjHumHTB.js} +1 -1
  94. package/bt/es/{index-If6KZ9LH.js → index-PJsNBIYd.js} +1 -1
  95. package/bt/es/index.js +1 -1
  96. package/bt/es/{scale-ad-GRex9BIw.js → scale-ad-CbB427qG.js} +1 -1
  97. package/bt/es/{styles-CkunLjDi.js → styles-B4aycg8F.js} +1 -1
  98. package/{vg/es/styles-IvPZnvBj.js → bt/es/styles-BKyqwNys.js} +1 -1
  99. package/bt/es/{styles-k20YStFP.js → styles-BRSsolNR.js} +1 -1
  100. package/{sa/es/styles-DjymNuqb.js → bt/es/styles-B_CkRrIK.js} +1 -1
  101. package/{sa/es/styles-Dm26mzNO.js → bt/es/styles-BbXcqWwU.js} +1 -1
  102. package/{sa/es/styles-DPh-Sw4U.js → bt/es/styles-Bxrm_Sgk.js} +1 -1
  103. package/bt/es/{styles-zpf20-JY.js → styles-Zz8BrbFG.js} +1 -1
  104. package/bt/es/{styles-DL_psB5o.js → styles-ajrj4Tc_.js} +1 -1
  105. package/{vg/es/styles-BXUt7R1T.js → bt/es/styles-qwY6PJ4D.js} +1 -1
  106. package/btv2/es/_auto-entry_btv2-CVp-n3ck.js +1 -0
  107. package/btv2/es/{events-CFfW5-vc.js → events-B3SsiDCn.js} +1 -1
  108. package/btv2/es/{index-AClqOhB7.js → index-1Po2M0vE.js} +1 -1
  109. package/btv2/es/{index-BsAEpiL7.js → index-B5Z4dirh.js} +1 -1
  110. package/btv2/es/{index-CiA1XR-e.js → index-B7m8ntI1.js} +1 -1
  111. package/btv2/es/{index-b9Ci9OzJ.js → index-BmBMWQ2f.js} +1 -1
  112. package/{sav2/es/index-CnHcVQaK.js → btv2/es/index-CqEPoWH1.js} +1 -1
  113. package/btv2/es/{index-p3CGZ6B1.js → index-Cxv1g4ei.js} +1 -1
  114. package/btv2/es/{index-DB6FZJCt.js → index-DuekyXC1.js} +1 -1
  115. package/btv2/es/{index-CewGfBvm.js → index-TmB6HMtm.js} +1 -1
  116. package/btv2/es/index.js +1 -1
  117. package/btv2/es/{scale-ad-4QCB0hZl.js → scale-ad-zDw6BLjX.js} +1 -1
  118. package/{vgv2/es/styles-CC2YaNGk.js → btv2/es/styles-5LEUKUhS.js} +1 -1
  119. package/{sav2/es/styles-TEiFeiro.js → btv2/es/styles-B4DdUbfP.js} +1 -1
  120. package/btv2/es/{styles-CJPdpqjg.js → styles-BIO6ucYx.js} +1 -1
  121. package/{vgv2/es/styles-4bXgkkI9.js → btv2/es/styles-CzMvE4Ct.js} +1 -1
  122. package/btv2/es/{styles-DneqG1cP.js → styles-DtAng8Cn.js} +1 -1
  123. package/btv2/es/{styles-DxFv21sD.js → styles-DyOM6ra4.js} +1 -1
  124. package/{sav2/es/styles-BcmKHtIO.js → btv2/es/styles-IlmavUol.js} +1 -1
  125. package/{sav2/es/styles-CNxMtDRC.js → btv2/es/styles-oOL4L59M.js} +1 -1
  126. package/dr-edition/cjs/index.js +1 -1
  127. package/dr-edition/es/index.js +1 -1
  128. package/e24/es/_auto-entry_e24-COl4EbsU.js +1 -0
  129. package/e24/es/{events-DxFhErmW.js → events-Dv24iAWb.js} +1 -1
  130. package/e24/es/{index-p0aa29c7.js → index-BCwYuvla.js} +1 -1
  131. package/e24/es/{index-DZ6MGZ82.js → index-BQN7SNT0.js} +1 -1
  132. package/e24/es/{index-BUW3XHKd.js → index-BSKRcAYA.js} +1 -1
  133. package/e24/es/{index-BIKH0mc4.js → index-BeQPubkf.js} +1 -1
  134. package/e24/es/{index-ChdHAv5c.js → index-D1N9nZ6r.js} +1 -1
  135. package/e24/es/{index-CXntEeO0.js → index-D4KRAOjc.js} +1 -1
  136. package/e24/es/{index-C4eOkvH4.js → index-DyWDKlfi.js} +1 -1
  137. package/e24/es/{index-DPb4VoNH.js → index-h0x83nGG.js} +1 -1
  138. package/e24/es/index.js +1 -1
  139. package/e24/es/{scale-ad-C-eHviKy.js → scale-ad-zQttMKZA.js} +1 -1
  140. package/e24/es/{styles-BxURAP6o.js → styles-BDHgdbt4.js} +1 -1
  141. package/e24/es/{styles-CGU8uR8p.js → styles-BRkC3ajG.js} +1 -1
  142. package/e24/es/{styles-RXZgLwMz.js → styles-BbNK2q7U.js} +1 -1
  143. package/e24/es/{styles-B7x-AhcI.js → styles-Cj0cVHVU.js} +1 -1
  144. package/e24/es/{styles-CGmmR6QL.js → styles-Cv6W4L0q.js} +1 -1
  145. package/{tv4/es/styles-Cdm2BE6z.js → e24/es/styles-D-pkus2w.js} +1 -1
  146. package/e24/es/{styles-D2RbOp7g.js → styles-DAA6j6C-.js} +1 -1
  147. package/e24/es/{styles-CXQRrhBV.js → styles-DHfSzwlR.js} +1 -1
  148. package/e24/es/{styles-DET_clXn.js → styles-DMVWp_i5.js} +1 -1
  149. package/e24/es/{styles-B6d3I3Er.js → styles-cXrBEbeK.js} +1 -1
  150. package/e24/es/{styles-BBzolRYO.js → styles-toH9avUo.js} +1 -1
  151. package/fotbollskanalen/cjs/index.js +1 -1
  152. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DqDdM23m.js +1 -0
  153. package/fotbollskanalen/es/{events-BaBHBKsT.js → events-PAiFjuo7.js} +1 -1
  154. package/fotbollskanalen/es/{index-DbKfSaXV.js → index-B8hAdUeJ.js} +1 -1
  155. package/fotbollskanalen/es/{index-BmO87rAS.js → index-C877yvVk.js} +1 -1
  156. package/fotbollskanalen/es/{index-BjxniLsh.js → index-CHvOEPoq.js} +1 -1
  157. package/fotbollskanalen/es/{index-C-uBDIQK.js → index-Cg91G46Z.js} +1 -1
  158. package/fotbollskanalen/es/{index-B50-W3Oo.js → index-Cjrda5bk.js} +1 -1
  159. package/fotbollskanalen/es/{index-CPG9Miey.js → index-DHYXsVU0.js} +1 -1
  160. package/fotbollskanalen/es/{index-qv1CF4SA.js → index-kGpjRJPO.js} +1 -1
  161. package/fotbollskanalen/es/{index-vbtWHMcU.js → index-mmxvRb3c.js} +1 -1
  162. package/fotbollskanalen/es/index.js +1 -1
  163. package/fotbollskanalen/es/{scale-ad-BCenfSPS.js → scale-ad-D3gxPfQg.js} +1 -1
  164. package/fotbollskanalen/es/{styles-BRPRsUHF.js → styles-CHejHEcx.js} +1 -1
  165. package/glimr/es/glimr-Crymyq4O.js +1 -0
  166. package/glimr/es/glimr-sdk-B7FY2YN8.js +1 -0
  167. package/glimr/es/index.js +1 -0
  168. package/godare/cjs/index.js +1 -1
  169. package/godt/cjs/index.js +1 -1
  170. package/klart/cjs/index.js +1 -1
  171. package/koket/cjs/index.js +1 -1
  172. package/koket/es/_auto-entry_koket-C48J8KxZ.js +1 -0
  173. package/koket/es/{events-Bjm7uaC5.js → events-BvwCoqGo.js} +1 -1
  174. package/koket/es/{index-Dsm9hDbd.js → index-B0GE64uH.js} +1 -1
  175. package/koket/es/{index-BsCvvzK-.js → index-BFLC9tsL.js} +1 -1
  176. package/koket/es/{index-CXVMr-L5.js → index-BKa-1wk1.js} +1 -1
  177. package/koket/es/{index-zIWwBPnT.js → index-BmWE5eUE.js} +1 -1
  178. package/koket/es/{index-D2O13WRO.js → index-BqcUAnIN.js} +1 -1
  179. package/koket/es/{index-wMOVbc7X.js → index-C3SesVhC.js} +1 -1
  180. package/koket/es/{index-D7fXKr0D.js → index-DHfNKG7L.js} +1 -1
  181. package/koket/es/{index-DFAMBEP2.js → index-T4KqLXn3.js} +1 -1
  182. package/koket/es/index.js +1 -1
  183. package/koket/es/{scale-ad-BW1mzt3B.js → scale-ad-CypQr_a9.js} +1 -1
  184. package/{svdv2/es/styles-DYdtM1zI.js → koket/es/styles-DWhemvCW.js} +1 -1
  185. package/minmote/cjs/index.js +1 -1
  186. package/package.json +9 -1
  187. package/pent/cjs/index.js +1 -1
  188. package/sa/cjs/index.js +1 -1
  189. package/sa/es/_auto-entry_sa-C2O3W95-.js +1 -0
  190. package/sa/es/{events-DvlJrIGz.js → events-B_AkQY4w.js} +1 -1
  191. package/{bt/es/index-D95Vn84H.js → sa/es/index-67Bd-vn3.js} +1 -1
  192. package/sa/es/{index-DUOK1D71.js → index-BaBi-EbC.js} +1 -1
  193. package/sa/es/{index-CY4_ClO6.js → index-C7q4-6n2.js} +1 -1
  194. package/sa/es/{index-DTBnv5T7.js → index-DWJIaXcV.js} +1 -1
  195. package/sa/es/{index-C2lHGGBU.js → index-DiQCCxiE.js} +1 -1
  196. package/sa/es/{index-B26RXNpx.js → index-Dpcps0Cv.js} +1 -1
  197. package/sa/es/{index-Dh94tDrx.js → index-DyusPcn_.js} +1 -1
  198. package/{bt/es/index-B92BPBeW.js → sa/es/index-lhth1woM.js} +1 -1
  199. package/sa/es/index.js +1 -1
  200. package/sa/es/{scale-ad-DGmlVjN4.js → scale-ad-t_PFaWNl.js} +1 -1
  201. package/{bt/es/styles-C1co0dMs.js → sa/es/styles-BV0qYUwB.js} +1 -1
  202. package/sa/es/{styles-7RQswKeS.js → styles-CBZ4PpKe.js} +1 -1
  203. package/sa/es/{styles-DOjN9BT-.js → styles-CHEeJ7cu.js} +1 -1
  204. package/{bt/es/styles-B_CxTp8L.js → sa/es/styles-CWwty8xS.js} +1 -1
  205. package/{vg/es/styles-ByqxNJ86.js → sa/es/styles-CphOIxsM.js} +1 -1
  206. package/{vg/es/styles-CcZC_ha2.js → sa/es/styles-D706y9SM.js} +1 -1
  207. package/sa/es/{styles-CGGWOgNe.js → styles-DF9R2wTT.js} +1 -1
  208. package/sa/es/{styles-BOf8Fs4E.js → styles-Degf0P68.js} +1 -1
  209. package/{bt/es/styles-ERMO0J9S.js → sa/es/styles-bQoZW5YG.js} +1 -1
  210. package/sav2/es/_auto-entry_sav2-GZukctTY.js +1 -0
  211. package/sav2/es/{events-739VI3uI.js → events-Dy90bU7v.js} +1 -1
  212. package/sav2/es/{index-BmD0lgND.js → index-BIVEkke9.js} +1 -1
  213. package/sav2/es/{index-D2tZpUaV.js → index-BJHgPsUt.js} +1 -1
  214. package/sav2/es/{index-tfQ3TGxs.js → index-BLbqfEWx.js} +1 -1
  215. package/sav2/es/{index-BGcNQxGF.js → index-BmSnpQyk.js} +1 -1
  216. package/sav2/es/{index-CCpsTEcx.js → index-CAKzVYiK.js} +1 -1
  217. package/sav2/es/{index-DEaG-wh3.js → index-CSqYxGu8.js} +1 -1
  218. package/sav2/es/{index-Cysjy-Lf.js → index-Ccu4GltL.js} +1 -1
  219. package/{btv2/es/index-qJ5t6fXx.js → sav2/es/index-DYueosPW.js} +1 -1
  220. package/sav2/es/index.js +1 -1
  221. package/sav2/es/{scale-ad-BBYMdweu.js → scale-ad-Bl1N9sV8.js} +1 -1
  222. package/{vgv2/es/styles-WmD-ZV8J.js → sav2/es/styles-BA8mAyIe.js} +1 -1
  223. package/sav2/es/{styles-DyjEVd8u.js → styles-C-HN-Baq.js} +1 -1
  224. package/{vgv2/es/styles-BwkGUlBI.js → sav2/es/styles-CaJpZDfU.js} +1 -1
  225. package/{btv2/es/styles-CiMNeUuc.js → sav2/es/styles-Cgv_a8jY.js} +1 -1
  226. package/sav2/es/{styles-BOm4onht.js → styles-Cw5M7Drc.js} +1 -1
  227. package/sav2/es/{styles-CYtBqv3q.js → styles-DlwQQU5N.js} +1 -1
  228. package/sav2/es/{styles-DrhLlSo6.js → styles-DpNklgJH.js} +1 -1
  229. package/{btv2/es/styles-BdM6h2zU.js → sav2/es/styles-Dr4bTwHu.js} +1 -1
  230. package/svd/cjs/index.js +1 -1
  231. package/svd/es/_auto-entry_svd-D5RrcHO5.js +1 -0
  232. package/svd/es/{events-HPDXhkAP.js → events-vcsTNIjI.js} +1 -1
  233. package/svd/es/{index-BjfmpdQg.js → index-B6mEhFFK.js} +1 -1
  234. package/svd/es/{index-CJqTHGtx.js → index-BNw3P6N7.js} +1 -1
  235. package/svd/es/{index-mDVb4yUF.js → index-BVpAbMce.js} +1 -1
  236. package/svd/es/{index-CDluv7FZ.js → index-BcD-agLO.js} +1 -1
  237. package/svd/es/{index-1-BvfsCV.js → index-D4M5klSP.js} +1 -1
  238. package/{tv4/es/index-BuOpijvA.js → svd/es/index-D7xb1-Ng.js} +1 -1
  239. package/svd/es/{index-Cp1EqpkX.js → index-DEycD-Fd.js} +1 -1
  240. package/svd/es/{index-Bcv8fkTB.js → index-DVdA1MsS.js} +1 -1
  241. package/svd/es/index.js +1 -1
  242. package/svd/es/{styles-Do0ndNpv.js → styles-BJ0Dttp2.js} +1 -1
  243. package/svd/es/{styles-CM34OmyB.js → styles-BKATK5MH.js} +1 -1
  244. package/svd/es/{styles-Cir8mhry.js → styles-DVFPBtVA.js} +1 -1
  245. package/svd/es/{styles-BF3Lo0nH.js → styles-DdDCc5Ad.js} +1 -1
  246. package/svd/es/{styles-Bx_darZ8.js → styles-DrO_5I-V.js} +1 -1
  247. package/svd/es/{styles-S3NLJBHJ.js → styles-npI4DFOE.js} +1 -1
  248. package/svdv2/es/_auto-entry_svdv2-p0K1CtR7.js +1 -0
  249. package/svdv2/es/{events-DeKvnpR8.js → events-LH8Rwmc5.js} +1 -1
  250. package/svdv2/es/{index-CMeziZ1p.js → index-CCpij6nf.js} +1 -1
  251. package/svdv2/es/{index-BKkotAsX.js → index-CF7g0aK-.js} +1 -1
  252. package/svdv2/es/{index-C9Mgp1Ns.js → index-CgHAmt-Z.js} +1 -1
  253. package/svdv2/es/{index-BCQ43mT9.js → index-D24L1_Eu.js} +1 -1
  254. package/svdv2/es/{index-CD2rAIgI.js → index-DVg3m3u_.js} +1 -1
  255. package/svdv2/es/{index-Cs8xqiX9.js → index-Dlxv0wxl.js} +1 -1
  256. package/svdv2/es/{index-B_0Ua1K5.js → index-DrE9Oj47.js} +1 -1
  257. package/svdv2/es/{index-BrKKXjlL.js → index-Tgnif2ZJ.js} +1 -1
  258. package/svdv2/es/index.js +1 -1
  259. package/svdv2/es/{scale-ad-B-injyXs.js → scale-ad-CKz3c7a6.js} +1 -1
  260. package/svdv2/es/{styles-CxRdNyaX.js → styles-BKgWUypt.js} +1 -1
  261. package/svdv2/es/{styles-DrLsWDG8.js → styles-CD8gudnM.js} +1 -1
  262. package/svdv2/es/{styles-pmxII8YA.js → styles-DGLEbCBe.js} +1 -1
  263. package/{koket/es/styles-DHbCjpUF.js → svdv2/es/styles-DWpSWJWy.js} +1 -1
  264. package/svdv2/es/{styles-D_Qcy3Ld.js → styles-Du54Z3aW.js} +1 -1
  265. package/svdv2/es/{styles-Ba8tZf2w.js → styles-RM4iZ99z.js} +1 -1
  266. package/tek/cjs/index.js +1 -1
  267. package/tracker/es/index.d.ts +591 -0
  268. package/tv4/cjs/index.js +1 -1
  269. package/tv4/es/_auto-entry_tv4-hpV2mS7-.js +1 -0
  270. package/tv4/es/{events-2b3yOu44.js → events-CmhvusJj.js} +1 -1
  271. package/tv4/es/{index-D0Zz8Tmy.js → index-BDOCKubD.js} +1 -1
  272. package/tv4/es/{index-bg0mLvSF.js → index-BFd40gTe.js} +1 -1
  273. package/tv4/es/{index-amt-q8bY.js → index-BS8IyRYc.js} +1 -1
  274. package/tv4/es/{index-TT__OLVt.js → index-B_pVXnSb.js} +1 -1
  275. package/tv4/es/{index-BpWtrqZF.js → index-CE6Z-BOq.js} +1 -1
  276. package/tv4/es/{index-ClS9vJgB.js → index-D8tfFuVH.js} +1 -1
  277. package/tv4/es/{index-pvhPjp2A.js → index-DKIHEu4R.js} +1 -1
  278. package/{svd/es/index-D8CpO2LZ.js → tv4/es/index-PC9fGmH8.js} +1 -1
  279. package/tv4/es/index.js +1 -1
  280. package/tv4/es/{scale-ad-Cg4XJLYf.js → scale-ad-fAq7RnE3.js} +1 -1
  281. package/{e24/es/styles-73PaajEX.js → tv4/es/styles-Df21_T1u.js} +1 -1
  282. package/tvnu/cjs/index.js +1 -1
  283. package/vg/cjs/index.js +1 -1
  284. package/vg/es/_auto-entry_vg-DiwAKbPE.js +1 -0
  285. package/vg/es/{events-CzN0XToG.js → events-CnXys1Zi.js} +1 -1
  286. package/vg/es/{index-B9h_nB1K.js → index-6TVBHSgI.js} +1 -1
  287. package/vg/es/{index-COyB1REd.js → index-B919RnoX.js} +1 -1
  288. package/vg/es/{index-CCC8Bhs2.js → index-CSotidSA.js} +1 -1
  289. package/vg/es/{index-Q_cVFp3p.js → index-Cxqza1dF.js} +1 -1
  290. package/vg/es/{index-JgrmlK1S.js → index-DB1tns1N.js} +1 -1
  291. package/vg/es/{index-LjVipOCq.js → index-DFcW-IQF.js} +1 -1
  292. package/vg/es/{index-0CFCxD_z.js → index-DHSE4doX.js} +1 -1
  293. package/vg/es/{index-LuP9fyve.js → index-DmPfeCrT.js} +1 -1
  294. package/vg/es/index.js +1 -1
  295. package/vg/es/{scale-ad-BciSJvDB.js → scale-ad-U1-_NZ5U.js} +1 -1
  296. package/vg/es/{styles-DMTvV8Qr.js → styles-B8G0YeJq.js} +1 -1
  297. package/vg/es/{styles-BphiQRBl.js → styles-BOcOBo9C.js} +1 -1
  298. package/vg/es/{styles-C96fW--A.js → styles-BQucZqmh.js} +1 -1
  299. package/vg/es/{styles-vBsNxvlv.js → styles-BRGW26UD.js} +1 -1
  300. package/vg/es/{styles-BQrZTYjN.js → styles-C2FdrgPc.js} +1 -1
  301. package/{sa/es/styles-Bu6arANX.js → vg/es/styles-CJBC5MTw.js} +1 -1
  302. package/vg/es/{styles-BrJCxPwy.js → styles-CliHWZ_3.js} +1 -1
  303. package/vg/es/{styles-C6JOo99b.js → styles-CxvW80pe.js} +1 -1
  304. package/{bt/es/styles-ByCPgfvI.js → vg/es/styles-D6KA3nzn.js} +1 -1
  305. package/vg/es/{styles-DxeDnC1z.js → styles-DQZl1kr1.js} +1 -1
  306. package/vg/es/{styles-Bcy3W0JQ.js → styles-DSyDdp0R.js} +1 -1
  307. package/vg/es/{styles-DMuyn6JR.js → styles-DXkl62T9.js} +1 -1
  308. package/vg/es/{styles-DA7xbkfR.js → styles-DrELy3eP.js} +1 -1
  309. package/{bt/es/styles-BxeFQj-K.js → vg/es/styles-Dtqx_Iyi.js} +1 -1
  310. package/{sa/es/styles-o2hKUeC_.js → vg/es/styles-DzWFXrGP.js} +1 -1
  311. package/vgv2/es/_auto-entry_vgv2-yb_BOqwj.js +1 -0
  312. package/vgv2/es/{events-ed6ldYs_.js → events-Cq7csg5I.js} +1 -1
  313. package/vgv2/es/{index-r2WA9ytJ.js → index-B_ngjvfi.js} +1 -1
  314. package/vgv2/es/{index-9ShiTmCk.js → index-Bp-ks7x9.js} +1 -1
  315. package/vgv2/es/{index-C-f5PhTU.js → index-C1ar8NXn.js} +1 -1
  316. package/vgv2/es/{index-B50_qVAV.js → index-C7RMeZil.js} +1 -1
  317. package/vgv2/es/{index-Dt2VhOlh.js → index-CsHr_ayb.js} +1 -1
  318. package/vgv2/es/{index-B6WB8_fC.js → index-Dwszgdmc.js} +1 -1
  319. package/vgv2/es/{index-Djy3e14d.js → index-Kp7_MJys.js} +1 -1
  320. package/vgv2/es/{index-DLcxSB8w.js → index-nZ0FUDKR.js} +1 -1
  321. package/vgv2/es/index.js +1 -1
  322. package/vgv2/es/{scale-ad-Mf-tBk7F.js → scale-ad-C2rI3LbT.js} +1 -1
  323. package/vgv2/es/{styles-JhDxvNU6.js → styles-BItKV7lf.js} +1 -1
  324. package/{sav2/es/styles-CwAT9SzR.js → vgv2/es/styles-BbbuT45O.js} +1 -1
  325. package/vgv2/es/{styles-CuP20dIX.js → styles-C38lcWGe.js} +1 -1
  326. package/vgv2/es/{styles-BAo97sJu.js → styles-CLPvM5ML.js} +1 -1
  327. package/vgv2/es/{styles-p5BJXgVG.js → styles-Cd0dpIPu.js} +1 -1
  328. package/vgv2/es/{styles-dTJ4A8yI.js → styles-Ceayw1va.js} +1 -1
  329. package/vgv2/es/{styles-BK-5nB9o.js → styles-CjOoN7r2.js} +1 -1
  330. package/{btv2/es/styles-aSBpH4uJ.js → vgv2/es/styles-CrTsteeB.js} +1 -1
  331. package/{btv2/es/styles-DR1cPIhP.js → vgv2/es/styles-D7HsNqkv.js} +1 -1
  332. package/{btv2/es/styles-CMefryLx.js → vgv2/es/styles-DKlksm_A.js} +1 -1
  333. package/vgv2/es/{styles-DOyGq3Aj.js → styles-DfRbFxS5.js} +1 -1
  334. package/vgv2/es/{styles-D0BSbcVK.js → styles-Dxakr1Gf.js} +1 -1
  335. package/vgv2/es/{styles-W7gpXZhS.js → styles-KPPGvSX8.js} +1 -1
  336. package/vgv2/es/{styles-bc7Fz9Lw.js → styles-QgUS5hJD.js} +1 -1
  337. package/vgv2/es/{styles-DfUgblCX.js → styles-UXYxtRWD.js} +1 -1
  338. package/vgv2/styles.css +1 -1
  339. package/video/es/index.js +1 -0
  340. package/aftenposten/es/_auto-entry_aftenposten-kjWb7SF_.js +0 -1
  341. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-Cn5VHsfn.js +0 -1
  342. package/aftonbladet/es/_auto-entry_aftonbladet-DuuQNOf-.js +0 -1
  343. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-CxXViAAd.js +0 -1
  344. package/bt/es/_auto-entry_bt-F9mGJBdl.js +0 -1
  345. package/btv2/es/_auto-entry_btv2-Bn7jzyBF.js +0 -1
  346. package/e24/es/_auto-entry_e24-CsgqhFVD.js +0 -1
  347. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-CkEHQ-Aw.js +0 -1
  348. package/koket/es/_auto-entry_koket-DkTlJr6v.js +0 -1
  349. package/sa/es/_auto-entry_sa-7Jo7EATc.js +0 -1
  350. package/sav2/es/_auto-entry_sav2-DdV_65lQ.js +0 -1
  351. package/svd/es/_auto-entry_svd-D9J2bRUH.js +0 -1
  352. package/svdv2/es/_auto-entry_svdv2-DaptLHBB.js +0 -1
  353. package/tv4/es/_auto-entry_tv4-BBqq4-EW.js +0 -1
  354. package/vg/es/_auto-entry_vg-RACVqHzA.js +0 -1
  355. package/vgv2/es/_auto-entry_vgv2-CL22djBE.js +0 -1
package/tv4/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");const t={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},n={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"},r={publisherClassName:n.TV4,fullWidthFormatClassName:"panorama",classesToRemoveOnRefresh:[]};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{d(r.next(e))}catch(e){i(e)}}function s(e){try{d(r.throw(e))}catch(e){i(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((r=r.apply(e,t||[])).next())})}function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s,d;"function"==typeof SuppressedError&&SuppressedError;var l=a(function(){if(d)return s;d=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function i(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&o(e).forEach(function(t){a[t]=n(e[t],r)}),o(t).forEach(function(o){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(i(e,o)&&r.isMergeableObject(t[o])?a[o]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(o,r)(e[o],t[o],r):a[o]=n(t[o],r))}),a}function l(t,o,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||e,i.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(o);return s===Array.isArray(t)?s?i.arrayMerge(t,o,i):a(t,o,i):n(o,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},s=l}());const c=["placements","takeover","refreshConfig","editableConfiguration"],u={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},p=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},v=(e,t)=>{console.warn("[Advertory WARN]: ",e)},g=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||v("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||v("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||v("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||v("pageContext.deviceType is required."),n||v("pageOptions is required."),r||v("placements is required."),(null==o?void 0:o.defaultThreshold)||v("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,o;const i=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===(r=e.fullscreenScroll)||void 0===r?void 0:r.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==i?void 0:i[t])&&v(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},h=6;class m{set(e){g(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 c){const r=e[n];void 0!==r&&(t[n]=r)}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=l(m.DEFAULT_SITE_HANDLERS,e)}}m.DEFAULT_SITE_HANDLERS={siteEvents:u,initNativeAd:function(){}};const y=new m,f=y.modifyConfigProperties.bind(y);class w{initialize(){this.DATA=Object.assign({},w.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)}}w.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const b=new w,x=864e5,E=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return p("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=x)=>{const o={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(o))},getByTimestamp:(t,n=x)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return p("Error with parsing localStorage data"),null}}}})(),k="glimrTags",A=["glwe_","glwet_"],C={geofenceTags:[],geoTags:[],weatherTags:[]},I=e=>new URLSearchParams(window.location.search).get(e),S="takeover",T="native_override_desc2",O=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 p("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const o=e=>{r||(p("Resolving advertising permission value obtained"),r=!0,t(e))},i=setTimeout(()=>{p("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{p("On Tcf Ready called, waiting for permission"),clearTimeout(i)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(i);const t=Number(e);p("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),P={NO:"no",SE:"se"},j="cmp:loaded";let L="undefined"!=typeof window?window._tcf_:void 0,N=!1;const _=(e,t,n)=>{const r=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=I("bypass_tcf"),s=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(p("TCF bypass param detected, returning consent: true"),!0):(p("TCF is not enabled, returning consent: true"),!0))(r,a))return!0;if(N)return null;if(!L)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=L.getConsentedToAllSync();return p(`TCF consented to all is: ${t}`),L.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(p("Getting TCF consent manager..."),window._tcf_)return p("TCF consent manager is already available"),L=window._tcf_,void e(L);p("TCF consent manager is not available");const n=()=>{p("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(L=window._tcf_,e(L)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(j,n),N=!0,t(new Error("Timeout waiting for CMP to load"))},o);p("Listening for CMP loaded event..."),document.addEventListener(j,n,{once:!0})}):Promise.resolve(null),getConsentSync:s,getConsentAsync:()=>i(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return p(`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===P.SE,r=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===P.NO;if(t||r)return p("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield O(e);if(!(null==e?void 0:e.enabled))return!0;const i=s();return null!==i?i:yield new Promise((e,t)=>{try{if(!L)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{p("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);L.onTcfReady(()=>{p("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),L.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}},D=(e,t,n,...r)=>i(void 0,[e,t,n,...r],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return p(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return p(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=_(e,0,n);return(yield o())?(p(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(p(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}),$=(...e)=>i(void 0,[...e],void 0,function*(e=y.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:r}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield D(t,n,r,"glimr")}const{getConsentAsync:o}=_(t,0,r);return yield o()}),q=()=>i(void 0,void 0,void 0,function*(){const{glimr:e}=y.get();if(!(yield $())||!(null==e?void 0:e.enabled))return void p("No consent for glimr data fetching.");const t=yield(n=500,i(void 0,void 0,void 0,function*(){return yield Promise.race([i(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)=>{E.setWithTimestamp(k,{tags:e,tagMappings:t}),n(!0)})})}catch(e){p(`Error during getting glimr data: ${e}`)}else p("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),M={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"},B=e=>A.some(t=>e.startsWith(t)),F=e=>e.startsWith("glgc_"),R=e=>!B(e)&&!F(e),V=e=>e===P.NO?"no-sno":"se-generic",z=(e,t)=>i(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:r,pageContext:{countryCode:o}={}}=e,i=yield $(e);if(!(null==r?void 0:r.enabled)||!i)return p("No consent for getting glimr tags."),{};const a=V(o),s=U(e,Boolean(n));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}),U=(e,t)=>{const n=H();if(!n)return C;const r=((e=[])=>e.filter(B))(n),o=((e=[])=>e.filter(F))(n),i=((e=[],t,n)=>{var r;const o=e.filter(R);if(n&&t){const{publisher:e}=null!==(r=t.pageContext)&&void 0!==r?r:{},n=M[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:i,geofenceTags:o,weatherTags:r}},H=()=>{const e=E.getByTimestamp(k);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},W=()=>(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),K=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),G=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:r=!1}={},pageContext:{countryCode:o}}=y.get(),i=[`${V(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",...r?i:[]],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)}},J={get:(e,t)=>i(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)=>i(void 0,void 0,void 0,function*(){const r=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:r});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},Y="advertory:ppids-cache",Q={[P.SE]:`SCH${P.SE.toUpperCase()}-EnvHash`,[P.NO]:`SCH${P.NO.toUpperCase()}-EnvHash`},X={[P.SE]:`SCH${P.SE.toUpperCase()}-UserHash`,[P.NO]:`SCH${P.NO.toUpperCase()}-UserHash`},Z={[P.SE]:`sch${P.SE}-envhash-v3`,[P.NO]:`sch${P.NO}-envhash-v3`},ee={[P.SE]:`sch${P.SE}-userhash-v3`,[P.NO]:`sch${P.NO}-userhash-v3`},te={[P.SE]:`'sch${P.SE}-iosid-v3'`,[P.NO]:`'sch${P.NO}-iosid-v3'`},ne={[P.SE]:`sch${P.SE}-androidid-v3`,[P.NO]:`sch${P.NO}-androidid-v3`},re={[P.SE]:"sdrn:schibsted.com:user",[P.NO]:"sdrn:spid.no:user"};class oe{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:r})=>{t.append(e,`${r}-${n}`)}),t}}const ie=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return i(this,arguments,void 0,function*(e,t=1e4){var n,r;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===(r=o.xandr)||void 0===r?void 0:r.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||p("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:""}},ae=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return i(this,void 0,void 0,function*(){var n,r,o,i,a,s,d,l,c,u,p;const v=E.get(Y),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===(r=g.idfv)||void 0===r?void 0:r.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(i=c.userId)&&void 0!==i?i:"",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||p("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,r){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=r?r:null}shouldHash(e,t){var n,r;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(r=t[o])||void 0===r?void 0:r.plain))return!0}return!1}cachePPIDs(e,t,n,r){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}}:{}),r?{anId:{plain:r}}:{});E.set(Y,o)}hashPPIDs(e,t){return i(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield J.post(t,n,e)}catch(e){return p("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return i(this,arguments,void 0,function*({clientId:e,instance:t},n){const r=yield((e,t)=>i(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${re[t]}:${n}`:null}))(t,n),o=yield(e=>i(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),a=window.advertory_idfv,s=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:r},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),s?{anId:{plain:s}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:r,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:r.plain,environmentId:o.plain}}},se=e=>i(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:r,isMobileApp:o}}=e;if(!(yield D(n,o,r,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([ie.processPPIDs(t,null==n?void 0:n.timeout),ae.processPPIDs(t,r)])).forEach((e,t)=>{if("rejected"===e.status){p(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),de=e=>{const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o,idfv:i,anId:a}=ae.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]).add(i,te[e]).add(a,ne[e]).buildEids()}]}},le=()=>{const{ppid1:e,ppid2:t}=ie.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},ce=e=>{const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o,idfv:i,anId:a}=ae.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]).add(i,te[e]).add(a,ne[e]).buildRyEids()}}]}}},ue=e=>{const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o}=ae.getPPIDs();return(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]).buildRyEids()},pe=e=>i(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o}=ae.getPPIDs(),i=(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]);return yield new Promise(e=>{e(i.buildVideoEids())})}),ve=(e,...t)=>i(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const o=document.createElement("script");o.async=!0,o.src=e;const i=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",i),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",i),o.addEventListener("error",a);const d=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),ge="ABSOLUTE_FULLSCREEN",he="ANY_FULLSCREEN",me="VERTICAL_FULLWIDTH",ye="FULLWIDTH",fe="TAKEOVER",we="VELVET_TAKEOVER",be="WALLPAPER",xe="COLLAPSE",Ee={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],VERTICAL_FULLWIDTH:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},ke={wallpaper:1600,"l-format":1600},Ae=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Me(e,he)},Ce=e=>{const{native:t}=e;return!!t},Ie=e=>Me(e,ye),Se=e=>{const{targetId:t}=e;return t.includes("takeover")||Me(e,fe)},Te=e=>Me(e,fe),Oe=e=>Me(e,be),Pe=e=>Me(e,xe),je=e=>e.targetId.includes("sponsorstripe"),Le=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Ne=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),_e=e=>e.targetId.startsWith("midboard"),De=e=>e.targetId.includes("widescreen"),$e=e=>e.width>=1260&&e.width<=1280,qe=e=>e.width>=1600&&e.width<=1620,Me=(e,t)=>{const n=Ee[t];if(!n)return!1;return!!n.find(t=>{var n,r;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,i=(null===(r=e.banner)||void 0===r?void 0:r.height)||e.height,a=t.width===o,s=!t.height||t.height===i;return a&&s})},Be="advertory-fullscreen-scroll",Fe="advertory-fullscreen-scroll-wrapper",Re="fullscreen-scroll-in-screen",Ve="in-screen",ze=e=>e.includes("snoap.no"),Ue=e=>{var t,n,r,o,i;return!!(null===(i=null===(o=null===(r=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===r?void 0:r.adResponse)||void 0===o?void 0:o.ads[1])||void 0===i?void 0:i.rtb)},He=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const r=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),i=r.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...i,o).toString()},We=He([],()=>{const e=({width:e,height:t})=>{var n;const r=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!r)return;const{clientWidth:o,clientHeight:i}=r,a=e/o,s=t/i;r.style.transform=`scale(${a},${s})`,r.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}),Ke=e=>{const t=He([],()=>{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 r=n.contentDocument.createElement("style");r.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(r),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},Ge=[],Je={},Ye=(e,t)=>{var n;const r=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>Qe(e,r),{}),i=Ze(e);o.observe(e),r&&(Je[i]=nt(e,null==t?void 0:t.options))},Qe=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const r=Ze(e);n?(Xe(r,n),et(e,r,t)):(Xe(r,n),tt(e,r,t))})},Xe=(e,t)=>{var n,r;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const i=t?"showFullscreen":"hideFullscreen";null===(r=o.contentWindow)||void 0===r||r.postMessage(`advertory:${i}-${e}`,"*")},Ze=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},et=(e,t,n)=>{e.classList.add(Ve),document.body.classList.add(Re),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Ge.includes(t)||Ge.push(t),n&&window.addEventListener("scroll",Je[t],{passive:!0})},tt=(e,t,n)=>{Ge.includes(t)&&(n&&window.removeEventListener("scroll",Je[t]),document.body.classList.remove(Re),e.classList.remove(Ve),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},nt=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:r=[".skyscraper_r"],headerZIndex:o=3}=t,i=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&i.push(n)}),r.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{i.length&&rt(e,i,o,0),a.length&&rt(e,a,o,40)}},rt=(e,t,n,r)=>{const o=e.offsetHeight,i=window.scrollY,a=e.getBoundingClientRect().top+i;t.forEach(e=>{const t=e.offsetHeight;let s;s=a>i?(a-i)/t-r:(i+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 ot(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}ot('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100% !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:0}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:19px !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const it="left",at={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 st=null;const dt=(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=`(${We})()`,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(ze(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=Ke(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>ze(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)),ze(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)),Ue(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},lt=()=>{st=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,r=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",`${r}px`)},ct=()=>{st||(st=window.requestAnimationFrame(lt))},ut=(e,t)=>{var n,r,o,i;const{pageContext:{countryCode:a}}=y.get(),{targetId:s}=e,d=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==d?void 0:d.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),(e=>{const{articlesContainerWidth:t=1302,backgroundColor:n="#fff",foregroundColor:r="#fff",margin:o="16px 0",beforeContentValue:i=""}=e,a=t/2,s=document.createElement("style");s.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${a}px),\n ${r} calc(50% - ${a}px),\n ${r} calc(50% + ${a}px),\n ${n} calc(50% + ${a}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${o};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${i&&"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: '${i}' !important;\n }`,s.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(s)})(null!==(r=null==d?void 0:d.overlayStyles)&&void 0!==r?r:{});const l=document.getElementById(s),c=null==l?void 0:l.parentElement;if(!l||!c)return;Ye(c,t),l.className=Be,Ye(c,t),l.className="advertory-fullscreen-scroll";const u=Me(e,ge)?"absolute":"fixed";l.style.position=u,c.className=Fe,c.dataset.showTagSubscribeId=s,l.setAttribute("data-ad-label",at[a].adText),(null==d?void 0:d.cogwheelPosition)===it&&(l.dataset.moveCogwheelToTheLeft="true"),ct(),window.addEventListener("resize",ct),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",ct),null===(i=window.visualViewport)||void 0===i||i.addEventListener("scroll",ct)},pt=e=>{if(!(null==e?void 0:e.classList.contains(Be)))return;e.classList.remove(Be),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(Fe))&&(t.classList.remove(Fe),t.classList.remove(Ve))};var vt=Object.freeze({__proto__:null,createFullscreenScrollAd:ut,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,r=Ue(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[r].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,r=Ue(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[r].rtb;o&&(o.banner.content=t)})(e,dt(t,e))},undoFullscreenScrollContainer:pt});const gt=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},ht=(e,t,n)=>{var r,o,i,a;const s=document.createElement("div");s.id=`${e}-button`,t.appendChild(s);(null===(o=null===(r=window.apntag.requests)||void 0===r?void 0:r.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(i=(a=window.apntag).requests)&&void 0!==i||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),gt(e);const d=s.firstElementChild;d&&t.insertBefore(d,s),s.remove()},mt="ad-loaded",yt=()=>null!==I("disable_prebid"),ft=()=>i(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:r},fullscreenScroll:o}=y.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:i}=y.getHandlers(),{getConsentAsync:a}=_(t,0,n),s=yield a(),d=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:r=>{const o=W(),{prebid:{relevantCallbackTimeout:i}={}}=y.get(),a="relevantCb"===r&&i?i:n[r].timeout,s=setTimeout(()=>{!n[r].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${r}'`),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}}})(),l=W(),c=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=W();return{user:e,keywords:t}})();d.failsafeOnTimeout("relevantCb");const{user:{externalUid:u=""}={},keywords:v}=c;(()=>{const e=K();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(d.getCancel()||!l.loadTags)return p("core loadTags() call was cancelled",{cancel:d.getCancel(),apnTagLoadTags:!l.loadTags,condition:"or"}),void d.cleanup();const t=K();d.events.relevantCb.done=!0,d.failsafeOnTimeout("auctionCb");const r=s?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};p("prebid consentManagement",r),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:r,enableSendAllBids:!1},ce(n)),G(v,u))),p("core add prebid config",Object.assign(Object.assign({consentManagement:r,enableSendAllBids:!1},ce(n)),G(v,u))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{d.getCancel()||(d.events.auctionCb.done=!0,l.loadTags(e)),d.cleanup()}},customNativeRender:e=>{wt(e,i)},directRenderFn:e=>{var t;const{settings:n,renderFn:r}=e,{bid:i,adDiv:a}=n||{};if(!a)return;const s=r(n),d=Object.assign(Object.assign({},i),{targetId:a.id,banner:!0}),l=a.id,c=document.getElementById(l);c&&(Ae(d)?(ut(d,o),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const r=new MutationObserver(()=>{n()&&r.disconnect()});r.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(s)):(pt(c),null===(t=null==c?void 0:c.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),c.classList.add(mt),(null==i?void 0:i.creativeId)&&ht(l,c,Number(null==i?void 0:i.creativeId)))}}),p("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{d.getCancel()||(d.events.auctionCb.done=!0,l.loadTags(e))}},customNativeRender:e=>{wt(e,i)},directRenderFn:()=>{}})})}),wt=(e,t)=>{var n;const{divId:r,native:o,bid:i}=e,a=document.querySelectorAll(`[id^=${r}]`)[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},y.get()),null==d||d.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:i.adId}),"*")},bt="0123456789abcdefghijklmnopqrstuvwxyz",xt=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=bt[Math.floor(36*Math.random())]}return t},Et=e=>{window.apntag.anq.push(e)},kt=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),At=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})});let Ct="";const It=new Map,St=e=>{const{pageSetup:{tag:t}={}}=y.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(Ct!==window.location.pathname&&(It.clear(),Ct=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),r=null!==(t=It.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=y.get();return`${e}-${t}`})()}-count`]=r,It.set(n,r+1),e})):e},Tt=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},Ot="advertory-wallpaper-background",Pt="advertory-with-horseshoe",jt=()=>{const e=document.querySelector(`.${Ot}`);e&&e.remove()},Lt=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${Ot}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},Nt=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,_t=e=>Nt.test(e),Dt=e=>e.startsWith("wallpaper:color:"),$t=e=>{const t=document.querySelector(`.${Ot}`);t&&(t.style.backgroundImage=`url(${e})`)},qt=e=>{const t=document.querySelector(`.${Ot}`);t&&(t.style.backgroundColor=e)};var Mt=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(Pt),n.classList.add(Pt))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{jt();const e=document.createElement("div");e.classList.add(Ot),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&&(Lt(n),window.addEventListener("scroll",()=>Lt(n)))})(n),e()},isShortWallpaperColorMessage:Dt,isShortWallpaperUrlMessage:_t,removeWallpaperBackground:jt,setWallpaperBackgroundColor:qt,setWallpaperBackgroundImage:$t});const Bt=e=>{if("0"===I("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")&&jt())},Ft=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"))},Rt=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,r=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${r}px`)},Vt=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:r}=(e=>{const t=b.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=r},zt=()=>{jt();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{Bt(e.id),Vt(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),r=null==t?void 0:t.getAttribute("data-probable-width");n&&r&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",r+"px"))})(e.id),e.innerHTML="",e.id=Tt(e.id)}),Et(()=>window.apntag.clearRequest())},Ut="noGroupedPlacements",Ht=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Wt=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Kt=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:r,pageContext:{deviceType:o}}=y.get(),i=n[o].filter(Wt)||[],a=e?document.querySelector(e):document;if(!a)return[];const s=i.reduce((e,t)=>{const n=Ht(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=i.filter(({targetId:e})=>e.match(t)),s=(null==r?void 0:r.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 r;const o=Gt(e,t,n),i=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=i&&(null===(r=o.finnBlink)||void 0===r?void 0:r.loadOnlyFinnBlink),s=`${e.id}-${xt(6)}`;return e.id=s,e.setAttribute("data-advertory-ad-rendered","true"),i&&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&&b.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 St(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)},Gt=(e,t,n)=>{const r=n[t],o=n[n.length-1],i=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==r?void 0:r.targetId)?r:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:i||o},Jt=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=y.get(),r=(null==t?void 0:t[n])||{},o=Object.values(r).flat(),i=(e=>{const t={};return e.forEach(e=>{const n=Tt(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[r,o]of Object.entries(t))n[r]=e.filter(e=>o.includes(Tt(e.targetId)));return n})(e,r),s=Object.keys(i),d=((e,t)=>e.filter(e=>!t.has(Tt(e.targetId))))(e,new Set([...s,...o]));return Object.assign(Object.assign(Object.assign({},a),i),{[Ut]:d})},Yt=(e,t,n)=>{const r=document.getElementById(`div_utif_${e}`);if(!r)return;const{apntag:o}=window,[i,a]=t;if(!r.dataset.lockedsize&&a&&i)r.style.width=`${i}px`,r.style.height=`${a}px`,n&&(o.resizeAd(r.id,[i,a]),r.dataset.lockedsize="true",r.dataset.lockedwidth=i.toString(),r.dataset.lockedheight=a.toString());else if(null==r?void 0:r.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=r.dataset;e&&t&&o.resizeAd(r.id,[e,t])}},Qt=["netboard","board"];class Xt{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,r;const{editionName:o}=e,i=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(r=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==r?r:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),i&&s.searchParams.append("urlData",i),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return i(this,void 0,void 0,function*(){var t,n,r;const o=yield this.identityFacade.getIdentityUser(),i=null!==(r=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==r?r:"",a=(null==o?void 0:o.userId)?String(o.userId):"",s=this.buildUrl(e,{envId:i,spid:a});try{p("Starting fetching DrEdition ad from URL:",s);const e={method:"GET"},t=yield J.get(s,e);return p("Fetch operation completed successfully."),t}catch(e){p("Error during fetch operation:",e)}return null})}}let Zt=class{getDrEditionUTMParams(e,t){var n;const{title:r="",clientName:o,creativeId:i}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=r.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},i&&{utm_id:`df-${i}`})}getUrlSearchParams(e,t,n){if(!e)return"";const r=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),i=new URLSearchParams(e.search);return Object.entries(r).forEach(([e,t])=>{o.has(e)||i.set(e,null!=t?t:"")}),i.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const r=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!r)return"";const o=this.getDrEditionUTMParams(e,t),i=new URL(r);return Object.entries(o).forEach(([e,t])=>{i.searchParams.has(e)||i.searchParams.set(e,null!=t?t:"")}),i.toString()}handleVideo(e,t){return i(this,void 0,void 0,function*(){const{id:n,autoplay:r,mute:o,videoLoop:i,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:r,vgtvMuted:o,vgtvLoop:!!i,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:r,pathname:o}=new URL(n);if(!r.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const i=o.split("/");return i.length?[...i.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const en=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):p("Dr. Edition container does not have a parent element, cannot remove height lock.")};class tn{constructor(e,t,n,r){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=r,this.drEditionAds=[]}fetchAndRenderAd(e,t){return i(this,void 0,void 0,function*(){var n,r;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:i=!1}=t,a=e.querySelector(o);if(!a)return void p(`Container with selector "${o}" not found.`);const s=yield this.drEditionService.fetchData(t);return(null==s?void 0:s.itemId)||i?!(null==s?void 0:s.itemId)&&i?(p("No Dr. Edition ads available to render. Collapsing whole placement."),Bt(e.id),void en(a)):((null==s?void 0:s.itemId)&&i&&(p("Dr. Edition ad available to render as a Xandr backfill."),Ft(e.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(a,s,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(s,t),en(a),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(e,s,t),null===(r=e.querySelector("a"))||void 0===r||r.addEventListener("pointerup",()=>null)):en(a))):(p("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void en(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 r=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";Ft(r)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const r=e.querySelector(".dr-edition-slider");if(!r)return!1;let o=null;const i=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)),[...r.children].forEach(e=>{i.observe(e)})})},{threshold:[.9]});return[...r.children].forEach(e=>{i.observe(e)}),!0}}const nn={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},rn="web_desktop",on="web_phone",an="wde",sn="wph",dn=()=>{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"};class ln{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return i(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:r}=_(n.tcf,n.isMobileApp,n.country),o=yield r(),i=n.device===nn.MOBILE?t.mobileHTML:t.desktopHTML;const a=o?i:i.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var r,o,i;e.search=null!==(i=null===(o=(r=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(r,e,t,n))&&void 0!==i?i:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class cn{constructor(e){this.strategy=e}handle(e,t){return i(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:r}={}}=e;(n||r)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return i(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 ve(t)}catch(e){p("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return i(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:r}=e.videoConfiguration,o=[...document.querySelectorAll(`#${r}`)||[]].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 i=null==o?void 0:o.parentNode;if(!i)return;const a=i.closest("a");i.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,r,o;const{preview:{url:i,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!i)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",i),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(r=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(r,s),!0))}}let un=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,r){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 r=null==n?void 0:n.textContent;return r?r.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:r}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:r}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return i(this,void 0,void 0,function*(){var r,o,i,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===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)?null===(i=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===i||i.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 i(this,void 0,void 0,function*(){var r,o,i,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(r=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(r,l):this.pulse.trackClickUIElement?null===(a=(i=this.pulse).trackClickUIElement)||void 0===a||a.call(i,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}};class pn extends un{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){const{pulseData:{title:r,clientName:o="",creativeId:i}={}}=t,{columnName:a,primaryPosition:s}=n;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:r,placement:{columnName:a,primaryPosition:s},"spt:custom":{is_sponsored:!0,sponsor:o,"spt:creativeId":i},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let vn=class extends un{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var r,o,i,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(i=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===i?void 0:i.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,r){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,r),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,r){var o,i,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===(i=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===i?void 0:i.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:r,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const gn="front",hn=e=>i(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 r=document.createElement("script");r.id=e,r.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",r.async=!0;try{r.src=r.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(r,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)))}))}),mn={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 i(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Yi})})}})}};class yn{handleVideo(e,t){return i(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:r,mute:o,vendor:a}}){yield i(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 s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{mn[e](c)});const u={id:t,node:n,autoplay:r,mute:o,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},p=yield hn(u);p.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(p,s)}),p.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),p.once("PulseStats:ready",()=>i(this,void 0,void 0,function*(){const e=yield p.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===gn?"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:r}=new URL(n),o=r.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 fn="https://www.aftonbladet.se/video-player-extras/latest/";class wn{handleVideo(e,t){return i(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:r,mute:o,vendor:i}}){const a={id:t,node:n,autoplay:r,mute:o,vendor:i,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${fn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${fn}external-link.js`]:{name:"ExternalLink"}}};yield hn(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}getPulseObjectId(){return""}getPulsePageId(){return""}}const bn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class xn{handleVideo(e,t){return i(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:r,mute:o,vendor:a}}){const s={id:t,node:n,autoplay:r,mute:o,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},bn(e)?e:{}),{provider:Object.assign(Object.assign({},bn(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield hn(s);d.once("PulseStats:ready",()=>i(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===gn?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let En=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const kn=(e,t,r)=>{var o;const{publisher:i,pageType:a,country:s}=e,d={[n.VG]:new Zt,[n.E24]:new yn,[n.AFTONBLADET]:new wn,[n.SVD]:new xn}[i]||new En,l=new(s===P.SE?pn:vn)(r,d,a),c=new Xt(t,null!==(o=null==r?void 0:r.pulseTracker)&&void 0!==o?o:r),u=new ln(d,l),p=new cn(d);return new tn(c,u,p,l)},An=()=>i(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 Cn{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 i(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 p("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return i(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 In=(e,t,n)=>{const{wrapperSelector:r}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(r),i=new IntersectionObserver((r,o)=>((e,t,n,r,o)=>{const i=kn(n,r,o);e.forEach(e=>{var r,o,a;if(!e.isIntersecting)return;const s=e.target,d=null!==(r=s.dataset.editionName)&&void 0!==r?r:"",l=null!==(o=s.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=s.dataset.pulsePrimaryposition)&&void 0!==a?a:"";i.fetchAndRenderAd(s,Object.assign(Object.assign({},n),{editionName:d,columnName:l,primaryPosition:c})),t.unobserve(s)})})(r,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>i.observe(e))},Sn=()=>i(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)}}),Tn=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},On=[],Pn=(e,t)=>i(void 0,void 0,void 0,function*(){var n;const{pulse:r,tcf:o,drEdition:i,pageContext:{deviceType:a,publisher:s,pageType:d,countryCode:l,isMobileApp:c}}=e;if(!(yield D(o,c,l,"handleDrEditionBackfill")))return;const u=((e,t)=>{var n,r;const{pageContext:{deviceType:o},placements:i,drEdition:a}=e,s=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,d=i[o]||i.desktop,l=Tt(t.targetId),c=d.find(e=>e.targetId===l),u=Qt.some(e=>l.startsWith(e)),p=On.includes(l),v=(null===(r=null==c?void 0:c.drEdition)||void 0===r?void 0:r.editionName)||s;return c&&u&&!p&&v?(On.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!u)return;if(!(null==r?void 0:r.instance))return void p("Pulse has not been passed as a prop, aborting");const v=yield An(),g=new Cn(v),h=kn({publisher:s,pageType:d,country:l},g,null==r?void 0:r.instance),m=document.getElementById(t.targetId);if(!m||!i)return;m.classList.value="";const y=document.createElement("div");y.className=i.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==u?void 0:u.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:i,device:a,tcf:o,isMobileApp:c,country:l,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),jn=(e,t)=>{var n,r,o,a;if(!Tn())return void p("Ad block not enabled, Dr. Edition backfills will not be rendered");p("Ad block is enabled, Dr. Edition backfills will be rendered");const s=null!==(a=null===(o=null===(r=null===(n=e.finnBlink)||void 0===n?void 0:n.replacementConfig)||void 0===r?void 0:r.adsToReplace)||void 0===o?void 0:o.map(([e])=>e))&&void 0!==a?a:[],d=new IntersectionObserver((t,n)=>i(void 0,void 0,void 0,function*(){for(const r of t){if(!r.isIntersecting)continue;const t=r.target;n.unobserve(t),yield Pn(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!s.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&d.observe(t)})};var Ln=Object.freeze({__proto__:null,DrEdition:({editionName:t,fallbackTargetId:n,children:r,pulseData:o,htmlAttributes:i})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[r,o]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(o)}return n},s=a(o,"data-pulse"),d=a(i,"data");return e.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":t},s,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:r})]}))},getDrEditionManager:kn,handleDrEdition:e=>i(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield D(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield An(),r=new Cn(n);In({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},r,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:Pn,handleDrEditionBackfillOnAdblock:jn});const Nn="collapseAd",_n="hideAd",Dn="resizeAd",$n="renderDrEditionFallback",qn="wallpaperImageUrl",Mn="wallpaperColor",Bn="velvet",Fn=[Dn,qn,Mn,Nn,_n,$n,Bn];let Rn;const Vn=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(_t(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:qn,wallpaperImageUrl:t}}if(Dt(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:Mn,wallpaperColor:t}}if(e.startsWith($n)){const t=e.split(":")[1];return{name:$n,targetId:t}}if(e.startsWith(Nn)||e.startsWith(_n)){const t=e.split(":")[1];return{name:Nn,targetId:t}}if(e.includes("name")&&Fn.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!Fn.some(e=>n.name===e))return;const{name:r,targetId:o,wallpaperImageUrl:i,wallpaperColor:a,cmd:s,size:d}=n;r===Bn&&s&&(s.includes("noScroll")&&(Rn=(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==Rn||Rn(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),r!==Nn&&r!==_n||!o||Bt(o),r===Dn&&o&&s&&Yt(o,s),r===$n&&o&&(Bt(o),Pn(y.get(),{targetId:o})),"resizeMediationAd"===r&&o&&d&&Yt(o,d,!0),r===qn&&i&&$t(i),r===Mn&&a&&qt(a)},zn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Un=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=y.get(),r=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},a=e=>{Ft(e),Et(()=>r.showTag(e))};return{withXandrAd:a,withFinnBlinkAd:e=>i(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ha});yield t(e,o,null)}),withFullAdsChain:e=>i(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void a(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ha});yield t(e,o,a,()=>i(void 0,void 0,void 0,function*(){if(!b.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return Mt});t(e)}))})}},Hn=(e,t,n)=>{const r="true"===n.dataset.isFinnBlinkOnlyPlacement;return Le(t)&&r?(p(`loading finn blink ad for blink only placement for ${t}`),void Un().withFinnBlinkAd(t)):Le(t)?(p(`loading finn blink ad with full ads chain for ${t}`),void Un().withFullAdsChain(t)):void Et(()=>(p("core showTag",{id:t}),e.showTag(t)))},Wn=(e,t)=>i(void 0,void 0,void 0,function*(){yield kt,yield At;const n=new IntersectionObserver((t,n)=>((e,t,n,r)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,i=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(i);p("core log from intersection observer handler",{targetId:i,element:a}),n(window.apntag,i,r),a&&(t.unobserve(a),t.disconnect())})})(t,n,Hn,e),zn(t));n.observe(e)}),Kn=new Map,Gn=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Jn=".brandstudio-premium-content-widget",Yn=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Qn=({adWrapper:e,placementContainer:t})=>{const n=Yn({adWrapper:e,placementContainer:t});var r;null==e||e.style.setProperty("height",`${n}px`),Vt(r=t),r.innerHTML=""},Xn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Zn=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=y.get(),r=Gn.includes(n)&&Boolean(t.closest(Jn));const o=r?t.closest(Jn):null,i=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!r&&!a||r&&!o)return;if(a)return Xn(e),void i.disconnect();const s=t.closest('[style*="height"]'),d=o;s&&d.contains(s)?Xn(s):d.hasAttribute("style")&&Xn(d),i.disconnect()})})});try{i.observe(t,{childList:!0,subtree:!0})}catch(e){i.disconnect()}},er=(e,t,n,r,o,i)=>{var a;const s=performance.now(),d=null!==(a=Kn.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(r,o)&&n<0;s-d>=o&&l&&(Kn.set(t,s),((e,t,n)=>{const{pageContext:{countryCode:r}}=y.get(),o=null==n?void 0:n.parentElement;o&&n&&Qn({adWrapper:o,placementContainer:n}),Et(()=>{e.setKeywords([t],{[`${V(r)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,i))},tr=(e,t,n)=>{const r=new IntersectionObserver((e,r)=>((e,t,n,r)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:i}=e;t(window.apntag,o.id,i.y,n,r,o)})})(e,er,t,n),zn(300));r.observe(e)},nr=(e,t=6)=>{const n=[];for(let r=0;r<e.length;r+=t){const o=e.slice(r,r+t);n.push(o)}return n},rr=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),or=(e,t=0)=>{const n=e.getBoundingClientRect(),r=window.innerHeight;return n.bottom>-t&&n.top<r+t},ir=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=y.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),cr(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},ar=(e,t,n)=>{const r=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of r){const r=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)}),i=null==r?void 0:r.requestThreshold;or(o,i)&&r&&(Rt(r.targetId),n.length&&o.classList.remove(...n),cr([r],t))}},sr=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:r}}=y.get();t&&(e.forEach(({targetId:e})=>{const t=dr(e);t&&(t.dataset.bfCacheRefresh="true")}),r?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&ar(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const r=()=>{window.scrollY>0&&(window.removeEventListener("scroll",r),ar(e,!1,t))};n.persisted&&(rr()?window.addEventListener("scroll",r,{passive:!0}):ar(e,!1,t))})})(e,n))},dr=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},lr=e=>{const{targetId:t,allowedFormats:n}=e,r=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(dr(t)),o=(e=>1===e[0]&&1===e[1])(r),i={sizes:[r],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(i.native=void 0),i},cr=(e,t=!1)=>{const{queryConfig:{batchSize:n=h}={}}=y.get(),r=e.map(({targetId:e})=>e),o=nr(r,n);if(t)for(const t of e){const e=lr(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)Et(()=>window.apntag.refresh(e))},ur=(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,pr=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},vr=e=>i(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:r}={}}=e,{getConsentAsync:o}=_(t,0,r);if(!(yield o()))return;const i=pr("_pulse2data");return i?i.split(",")[9]:void 0}),gr=()=>{const e=pr("_pulse2data");return e?e.split(",")[2]:void 0},hr="splash",mr="welcomePage",yr="topscroller",fr="velvet",wr="takeover-displayed",br="takeover-visit-count",xr=14400,Er=()=>{const e=pr(br);return e?parseInt(e):0},kr=()=>{const e=Er(),{takeover:{options:{cookieCapTime:t=xr}={}}={}}=y.get(),n=document.location.hostname;window.document.cookie=`${br}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},Ar=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=y.get();return"0"!==I(S)&&("1"===I(S)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=y.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||wr;return"true"===pr(n)})())&&(!t||Cr()))},Cr=()=>{const e=Er();return 0===e?(kr(),!1):1===e},Ir=(e,t)=>[[1,1],[1920,1080]].some(([n,r])=>n===e&&r===t),Sr=()=>{const{takeover:e}=y.get();return Boolean(null==e?void 0:e.topscroller)},Tr=e=>{const{width:t,height:n}=e;return Ir(t,n)?hr:Me(e,we)?fr:Sr()?yr:mr},Or=()=>i(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=wr,cookieCapTime:n=xr}={}}={},pageContext:{isMobileApp:r,countryCode:o},tcf:i}=y.get(),a=yield D(i,r,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Pr=e=>{var t,n;const r=!!(null===(n=null===(t=y.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return Se(e)&&r},jr=(e,t)=>{var n;if(t===yr){const{topscroller:t}=e;return null!=t?t:{}}if(t===hr){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Lr=(e,t)=>{t!==hr?(e=>{var t,n;const r=null===(t=y.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=y.get().takeover)||void 0===n?void 0:n.topscroller;if(!r||o)return;const i=document.querySelector(r),a=document.querySelector(".welcome-page-wrapper"),s=document.querySelector(`#${e.targetId}`),d=document.querySelector(".advertory-welcome-page-scroll");if(!(i&&a&&d&&s))return;const l=null==i?void 0:i.offsetHeight,c=Te(e)?"60svh":`calc(100svh - ${l}px)`,u=Te(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=y.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),r=document.querySelector(`#${e.targetId}`);if(!n||!r)return;const o=`calc(100svh - ${n.offsetHeight}px)`;r.style.setProperty("height",o,"important")})(e)},Nr=He([],()=>{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 _r=Object.freeze({__proto__:null,addTakeoverCookie:Or,adjustTakeoverHeight:Lr,canDisplayTakeover:Ar,getProperWelcomePageConfig:jr,getTakeoverVariant:Tr,handleTakeoverCookieOnAdNotShown:e=>i(void 0,void 0,void 0,function*(){Pr(e)&&(yield Or())}),incrementArticleVisitCount:kr,isSplashVariant:Ir,isTopscroller:Sr,scaleAd:Nr,shouldAddTakeoverCookieForNotShownAd:Pr});const Dr=e=>`externalImpId:'${e}'`,$r=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:r}=y.get(),{targetId:o,sizes:i,keywords:a,allowedFormats:s,invCode:d,ssaNativeAdEnabled:l=!1,nativeCustomProperties:c,safeframeConfig:u,dynamicSizeWidthCheck:v=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||Ar())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],r=Array.isArray(n)?n.filter(e=>e!==yr):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":r}),i=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:i,keywords:o})})(e),g=Object.assign({invCode:d,sizes:i,targetId:o,keywords:ur(a,l),allowedFormats:s,dynamicSizeWidthCheck:v},u&&{safeframeConfig:u}),h=(e=>{var t,n,r,o,i,a,s;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(r=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===r?void 0:r.pageViewId)?(p("Tracker state pageViewId is:",null===(i=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===i?void 0:i.pageViewId),null===(s=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===s?void 0:s.pageViewId):(p("Tracker state does not contain field pageViewId or it is empty"),""):(p("Tracker state is empty"),""):(p("Tracker is not configured in initAdvertory function"),"")})(r);n&&h&&(p("External Impression ID assigned to defineTag:",Dr(h)),g.externalImpId=Dr(h));const m=(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,r])=>((null==e?void 0:e.includes(n))&&(t[n]=r),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}}))(c);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(g.native=m),g},qr=e=>!e.includes("takeover")||Ar(),Mr=e=>{const{source:t}=e;return"csm"===t},Br={nativeAd:e=>Ce(e)&&!je(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:Ie,fullscreenScroll:Ae,topscroller:e=>Se(e)&&Sr(),splash:e=>Se(e)&&Ir(e.width,e.height),welcomePage:Se,wallpaper:Oe,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:$e,hFormat:qe,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!qe(e)&&!$e(e),topboard:e=>e.targetId.startsWith("topboard")&&!Se(e),widescreen:De,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:je,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Ne(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!_e(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:Ne,midboard:_e},Fr=({adObj:e,preferredTestIdData:t})=>{var n,r;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const i=null===(r=document.querySelector(`#${o}`))||void 0===r?void 0:r.parentElement;if(!i)return;if(((e,t)=>{var n,r,o,i;const a=null===(i=null===(o=null===(r=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===r?void 0:r.tags)||void 0===o?void 0:o[e])||void 0===i?void 0:i.invCode;a&&(t.dataset.invCode=a)})(o,i),null==t?void 0:t.testId)return void(i.dataset.testid=t.testId);const a="DIV"===(null==i?void 0:i.tagName);e&&a&&((e,t)=>{var n,r;for(const[o,i]of Object.entries(Br))if(i(e)){if("nativeAd"===o){const i="default";t.dataset.testid=`${o}-${null!==(r=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==r?r:i}`;break}t.dataset.testid=o;break}})(e,i)},Rr=e=>{var t;return(null===(t=Object.entries(Br).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},Vr=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=y.get(),n=V(t),r=e[`${n}-targetid`],o=r?Tt(r[0]):"";return Object.assign(Object.assign({},e),r&&{[`${n}-targetid`]:[o]})},zr=e=>{const{pageContext:{countryCode:t}}=y.get(),n=V(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"]})},Ur=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 r=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===r),i=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);i&&i.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"})})()},Hr=(e,t)=>i(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});ot(".advertory-brandmetrics-survey{width:100%}");const Wr="advertory-brandmetrics-survey",Kr="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",Gr=()=>i(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,r)=>{var o;r||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),Jr={pageContext:{publisher:"aftonbladet",countryCode:P.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"}},Yr={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},Qr=e=>(null==e?void 0:e.parent)?[...Qr(e.parent),e.shortPath||"unknown"]:[],Xr=(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]=Qr(e);return Yr[n]||"ovrigaavdelningar"})(e)}_{position}`,Zr={aftonbladet:Jr},eo={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:Xr(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:Qr(e).join(":")}}},to=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},no=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),ro="se-generic",oo="aa-sch",io="kv_",ao="pause",so="{deviceType}",lo="{position}",co="afp_",uo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),po="1-1",vo="16-9",go="3-4",ho="9-16",mo="responsive",yo={[po]:1,[vo]:1.78,[ho]:.56,[mo]:1},fo={[po]:1,[vo]:1.78,[go]:1.33,[ho]:.56},wo=(e,t,n,r)=>{const{invCode:o="",videoOverlayInvCode:i}=null!=e?e:{},a=nn.DESKTOP===n?an:sn,s=o.replace(so,a);return(e,n)=>{if(e===ao)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(lo,ao).replace(/-([a-z]+)_/,"-article-"))(s);if(n&&uo.has(e)){return(r&&i?i:t.frontpageInvCodeTemplate).replace(so,a).replace(lo,e)}return s.replace(lo,e)}},bo=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[r,o])=>{const i=Math.abs(e[n]-t);return Math.abs(o-t)<i?r:n},n[0][0])},xo=()=>{var e,t;const n=jwplayer().getContainer(),r=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return r&&"number"==typeof r.offsetWidth&&"number"==typeof r.offsetHeight&&0!==r.offsetHeight?r.offsetWidth/r.offsetHeight:1},Eo=()=>{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},ko=()=>{const e=null!==(t=Eo()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Eo()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Ao=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Co=(e,t)=>i(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:r,countryCode:o}}=t,{width:i,height:a}={width:window.innerWidth,height:window.innerHeight},s={isMobileApp:e.isApp,countryCode:o,publisher:r,pageType:"front",deviceType:e.deviceType},d=(yield D(n,e.isApp,o,"video"))?"1":"0",l=yield Gr(),c=yield pe(o),u=yield vr({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)=>bo(fo,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?bo(yo,Number(m.toFixed(2))):mo;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${oo}-country_code`]:o,[`${oo}-publisher`]:r,[`${oo}-supply_type`]:(y=e.deviceType,y===nn.DESKTOP?rn:on),[`kw_${oo}-page_type`]:"collection",[`${oo}-page_type`]:"collection",[`${ro}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${ro}-page`]:"index",[`${ro}-page`]:"index",[`${ro}-screenheight`]:String(window.screen.height),[`${ro}-screenwidth`]:String(window.screen.width),[`${ro}-viewportheight`]:String(a),[`${ro}-viewportwidth`]:String(i),[`${ro}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${ro}-mobile-os`]:dn(),[`${ro}-audience`]:void 0,[`${ro}-externalid_src`]:ko(),[`${ro}-tags`]:e.tags,[`${ro}-articleid`]:p,"article-id":p},yield z(Object.assign(Object.assign({},t),{pageContext:s}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${ro}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Ao()).some(e=>e.includes(io))&&(()=>{const e=Ao(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(io)).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})}),Io=["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"],So=["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"],To=["external_uid","gdpr","gdpr_consent","eids","article-id"],Oo=(e,t)=>{const n=[...Io,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||To.includes(e)?e:`kw_${e}`,t]))},Po=e=>Object.fromEntries(Object.entries(e).filter(([e])=>So.includes(e))),jo=(e,t)=>i(void 0,void 0,void 0,function*(){var n,r,o,i;const a=(e=>{var t;Zr[e]||v(`[video] No config found for publisher "${e}"`);return null!==(t=Zr[e])&&void 0!==t?t:Jr})(e.publisher),s=(e=>{var t;return null!==(t=eo[e])&&void 0!==t?t:eo.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),d="/"===window.location.pathname,l=null===(r=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===r?void 0:r.toString(),c=e.assetId===l,u=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,p=c?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:s,isUserPresentOnFrontPage:d,adsKeywords:yield Co({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(i=null==s?void 0:s.sections)&&void 0!==i?i:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:d,isInitialVideo:c,instreamAspectRatio:u,playerAspectRatio:xo(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:p,playbackMethod:to(e.startMode)}}),Lo=(e,t)=>{const{siteConfig:n,siteVideoParams:r,isUserPresentOnFrontPage:o,adsKeywords:i,prerollPlacementFormat:a,playbackMethod:s}=e,{invCode:d}=r||{},l=wo(r,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(co)?`${co}${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":no.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({},Oo(i,n)),Po(i)),{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({},i),{"se-generic-adformat":c("pause")})}}}},No=e=>t=>i(void 0,void 0,void 0,function*(){const n=yield jo(e,t);return Lo(n,e)}),_o={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]}]},Do={no:"NOK",se:"SEK"},$o={no:"no",se:"sv"};class qo{buildFetchObject(e,t,n,r){return i(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:i}=r,{invCode:a,xandrPlacementId:s}=e,d=yield Gr(),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(_o),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:xt(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(i.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||$o[o]||"no").split("-")[0]},regs:{ext:{gdpr:d.gdpr||0}},user:{id:yield vr(r),ext:{consent:d.gdpr_consent||"",eids:ue(o)}},at:1,cur:[Do[o]],source:{tid:xt(36)},ext:{prebid:{bidder:{appnexus:{member:i.member}}}}}})}fetchData(e,t,n,r){return i(this,void 0,void 0,function*(){try{p("Starting fetching Studio ad from Xandr:",Kr);const o=new Headers({"Content-Type":"application/json"}),i=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=i.get(e);return t?[[e,t]]:[]})),s=a.size>0?`${Kr}?${a.toString()}`:Kr,d=yield this.buildFetchObject(e,t,n,r),l=yield J.post(s,o,d);return p("Fetch operation completed successfully.",l),l}catch(e){p("Error during fetch operation:",e)}return null})}}const Mo=0,Bo=3,Fo=(e,t,n,r)=>{const o=t.parentElement;if(!o)return;const i=e?`-${e}`:"",a=r?`__${r}`:"",s=`advertory${i}-${n}${a}`,d=`advertory${i}-${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},Ro="finn-blink",Vo="native-ad",zo=(e,t)=>{Uo(e,t),Wo(e,t)},Uo=(e,t)=>{var n,r;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const i=null!==(r=null==t?void 0:t.clickLinkSelector)&&void 0!==r?r:"a.ad-link";(null==o?void 0:o.querySelectorAll(i)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const r of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Go(r)}),t.dataset.tracked="true")})},Ho=e=>{var t;const{native:{impressionTrackers:n}={}}=e,r=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;r||!o?null==n||n.forEach(Ko):window.apntag.fireImpressionTrackers(e);const i=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(i)},Wo=(e,t)=>{var n;let r=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:i,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:s=!1}={}}=t,d=s?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=i?i:nn.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!r)for(const n of t)if(n.isIntersecting){r=!0,Ho(e),c.disconnect();break}},d);c.observe(o)},Ko=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Go(e):window.navigator.sendBeacon(e)},Go=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Jo=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:[]}),Yo=(e,t)=>i(void 0,void 0,void 0,function*(){var n,r;const{pageContext:{deviceType:o},appearanceConfig:i}=t,a=null==i?void 0:i.defaultThreshold[o],s=null!==(n=e.requestThreshold)&&void 0!==n?n:a,d=document.getElementById(e.targetId);if(!d)return void p(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},zn(s)).observe(d)});const{prepareTag:l}=y.getHandlers(),c=b.getData("alertoryConfigKeywords"),u=null!==(r=l($r(e)).keywords)&&void 0!==r?r:{},v=new qo,g=yield v.fetchData(e,c,u,t);g&&(((e,t,n)=>{const r=n===nn.MOBILE?t.mobileHTML:t.desktopHTML;if(r){if(t.adType===Mo){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>${r}`,e.appendChild(n)}else e.innerHTML=r;e.classList.add("ad-loaded")}})(d,g,o),g.adType===Bo&&(Fo(t.pageContext.publisher,d,Vo,t.pageContext.pageType),zo({targetId:e.targetId,native:{clickTrackers:g.clickTrackers,impressionTrackers:g.impTrackers}},{deviceType:o,appearanceConfig:i,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,r)=>{var o,i,a;let s;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(i=(a=window.apntag).requests)&&void 0!==i||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==r?void 0:r.adid)}]}}),!!n.querySelector("iframe")||(s=document.createElement("iframe"),n.appendChild(s)),ht(e,n,Number(null==r?void 0:r.adid)),null==s||s.remove()})(e.targetId,e.invCode,d,g.bid))}),Qo=(e,t)=>{e.forEach(e=>Yo(e,t).catch(e=>{p("Failed to handle server-side ad:",e)}))},Xo={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},Zo=e=>i(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:r}=e;return Boolean(t&&n&&(null==r?void 0:r.publisherClassName))})(e))return e;try{const t=yield(e=>i(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,r=setTimeout(()=>n.abort(),5e3);try{return yield J.get(t,{method:"GET",signal:n.signal})}catch(e){throw p("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(r)}}))(e);return t?((e,t)=>l(t,e,Xo))(e,t):e}catch(t){return p("Error fetching S3 config, using site config",{error:t}),e}}),ei=(e,t)=>{const{pageContext:{isMobileApp:n}}=y.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let ti,ni=[];const ri=["takeover","wallpaper"],oi=e=>{const t=(e=>{var t;const n=b.getData("alertoryConfigKeywords"),{queryConfig:r,placements:o,tcf:i,glimr:a,appearanceConfig:s,pageContext:{publisher:d,countryCode:l,pageType:c,deviceType:u,isMobileApp:p=!1},pageOptions:{member:v},pageSetup:g,takeover:m,fullscreenScroll:y}=e,f=null!==(t=null==r?void 0:r.batchSize)&&void 0!==t?t:h;return{xandr:{member:v,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:d,countryCode:l,pageType:c,deviceType:u,isMobileApp:p},pageSetup:g,placements:o,tcf:i,queryConfig:Object.assign(Object.assign({},r),{batchSize:f})},a&&{glimr:a}),s&&{appearanceConfig:s}),m&&{takeover:m}),y&&{fullscreenScroll:y})}})(e);window.advertory={initialized:!0,version:"3.0.6",siteConfig:e,alertoryConfig:t}},ii=()=>i(void 0,void 0,void 0,function*(){const{pageOptions:e}=y.get(),{preparePageOptions:t}=y.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=y.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"]}})(),r=yield i(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=y.get();return(yield D(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)}),r));(e=>{const t=b.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=zr(e);b.setData("alertoryConfigKeywords",n)})(o.keywords),Et(()=>ti.setPageOpts(o))}),ai=e=>i(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:r,countryCode:o}}=y.get(),i=yield D(n,r,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>Bt(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,i);si(a);(null==t?void 0:t.enabled)&&i&&!yt()?(p("core loadPlacements prebid enabled"),yield ft()):(p("core load tags invoked without prebid enabled"),di(a))}),si=e=>{const{prepareTag:t}=y.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const r=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==r&&-1===o?-1:-1===r&&-1!==o?1:r-o})})(e).forEach(e=>{p("core defineTags",{placement:e});const r=$r(e);if(qr(e.targetId)){const o=t(r),i=(e=>{const{allowedFormats:t,invCode:n,keywords:r,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Vr(r),sizes:o}})(o);n.push(i),Et(()=>(p("core defineTag - add to the queue",{placement:e,preparedTag:o}),ti.defineTag(o)))}}),(e=>{var t,n,r;(null===(r=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===r?void 0:r.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},di=e=>{const t=e.filter(({targetId:e})=>qr(e)).map(({targetId:e})=>e);t.length&&Et(()=>(p("core loadTags",{placementsIdsToLoad:t}),ti.loadTags([...t])))},li=(e,t)=>i(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:r}}=y.get(),{requestThreshold:o,refresh:i}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),s=null==n?void 0:n.defaultThreshold[r];a&&(p("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:s}),yield Wn(a,null!=o?o:s)),a&&(null==i?void 0:i.scroll)&&(p("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=i.scroll.toString())}),ci=e=>e.some(({targetId:e})=>ri.some(t=>e.includes(t))),ui=e=>i(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,r]=(e=>e.reduce(([e,t],n)=>{var r;return(null===(r=null==n?void 0:n.finnBlink)||void 0===r?void 0:r.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=h}={},pageContext:{deviceType:r}}=y.get(),o=Jt(e),i=Object.keys((null==t?void 0:t[r])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(i.flat().map(({targetId:e})=>e)),s=e.filter(({targetId:e})=>!a.has(e));return[...i,...nr(s,n)]})(r);for(const e of o)ci(e)?(p("core loadAds without lazy loading",{placementsToLoad:e}),yield ai(e)):e.length&&(p("core loadAds with lazy loading",{placementsToLoad:e}),yield pi(e));const{finnBlink:i}=y.get();if((null==i?void 0:i.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ha});yield e(n)}}),pi=e=>i(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=y.get(),r=[];if(!t)return p("lazy load is not enabled",{placements:e}),void(yield ai(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{p("lazy load is enabled - handler start",{loadedTargetIds:r,placements:e});const o=e.every(e=>r.includes(e.targetId)),i=e.map(e=>e.targetId);!o&&r.push(...i),!o&&ai(e),p("lazy load is enabled - handler stop",{loadedTargetIds:r,placements:e,arePlacementsLoaded:o,targetIds:i}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(p("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),vi=()=>i(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=y.getHandlers(),{wallpaper:n,fullscreenScroll:r}=y.get(),o=[];Et(()=>{ti.onEvent("adRequested",()=>{e.adRequested()}),ti.onEvent("adAvailable",o=>i(void 0,void 0,void 0,function*(){var i,a,s,d,l,c;p("core adAvailable start",{placementsAvailable:ni,adObj:o,isFullscreenScrollAd:Ae(o),isFinnBlink:Le(o.targetId),isNativeAd:Ce(o),isMediation:Mr(o),isTakeoverAd:Se(o),isCollapseAd:Pe(o),isWallpaperAd:Oe(o)});const u=null===(s=null===(a=null===(i=null===window||void 0===window?void 0:window.apntag)||void 0===i?void 0:i.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===s?void 0:s.adResponse.ads;if(Mr(o)&&u&&(null===(d=u[1])||void 0===d?void 0:d.rtb)&&(o.banner=null===(c=null===(l=u[1])||void 0===l?void 0:l.rtb)||void 0===c?void 0:c.banner),Ae(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return vt});e(o)}const{widescreenSwitching:v}=y.get();if(De(o)&&(null==v?void 0:v.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return wa});e()}if(Ae(o)&&!Le(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return vt});e(o,r)}if(!Ce(o)||Mr(o)||Le(o.targetId)||null==t||t(o,y.get()),Se(o)&&!Pe(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return qa});e(o.targetId),yield t(o)}if(Oe(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return Mt});e(()=>Et(()=>window.apntag.showTag(o.targetId)),n),b.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&b.setData("horseshoe",{isAvailable:!0}),Fr({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const r=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;r&&((e,t)=>{const{height:n,width:r,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&r&&(t.dataset.adSizes=`[${r},${n}]`)})(e,r)})(o),e.adAvailable(o);const g=ni.find(({targetId:e})=>e===o.targetId);g&&(yield li(g,o),ni=ni.filter(e=>e.targetId!==g.targetId)),p("core adAvailable stop",{placementsAvailable:ni,adObj:o,isFullscreenScrollAd:Ae(o),isFinnBlink:Le(o.targetId),isNativeAd:Ce(o),isMediation:Mr(o),isTakeoverAd:Se(o),isCollapseAd:Pe(o),isWallpaperAd:Oe(o)})})),ti.onEvent("adLoaded",n=>i(void 0,void 0,void 0,function*(){const{refreshConfig:r,appearanceConfig:i,wallpaper:a,adScaleConfig:s}=y.get(),d=document.getElementById(n.targetId);if(Le(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return oa});e(n)}if(o.includes(n.targetId)&&Ce(n)&&(null==t||t(n,y.get()),Fr({adObj:n})),!o.includes(n.targetId)&&Mr(n)&&o.push(n.targetId),Pe(n)&&Bt(n.targetId),Se(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return qa});e(ti,n.targetId)}if(Ie(n)){const{prepareContainerForFullWidthFormat:e}=yield Promise.resolve().then(function(){return Va});e(n)}if((e=>Me(e,me))(n)){const{scaleVerticalFullWidthAd:e}=yield Promise.resolve().then(function(){return Va});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,r=document.querySelector(`#${n}`),o=null==r?void 0:r.parentElement;if(!o||!r)return;Zn({adWrapper:o,placementContainer:r});const{delayTimeToNextRefresh:i=1e3}=t,a=(new Date).getTime();r&&"true"!==r.dataset.subscribedForRefresh&&(r.dataset.subscribedForRefresh="true",r.dataset.refresh&&tr(r,a,i))})(n,r),(null==i?void 0:i.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(b.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return Mt});e(n.targetId)}if(null==s?void 0:s.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return Ra});e(n),t(n)}e.adLoaded(n),gt(n.targetId),d&&(d.classList.add(mt),(e=>{var t,n;const{pageSectionsSelectors:r}=y.get(),o=null==r?void 0:r.mainFirstColumn,i=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;i&&e.clientWidth>i&&(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:Rr(n)}}))})),ti.onEvent("adNoBid",t=>i(void 0,void 0,void 0,function*(){var n;if(Bt(t.targetId),null===(n=y.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return Ln});yield e(y.get(),t)}if(Se(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return _r});yield e(t)}e.adNoBid(t)})),ti.onEvent("adError",(t,n)=>i(void 0,void 0,void 0,function*(){if(Se(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return _r});yield e(n)}e.adError(t,n)})),ti.onEvent("adCollapse",()=>{e.adCollapse()}),ti.onEvent("adRequestFailure",t=>i(void 0,void 0,void 0,function*(){Bt(t.targetId),yield Pn(y.get(),t),e.adRequestFailure(t)})),ti.onEvent("adBadRequest",t=>i(void 0,void 0,void 0,function*(){Bt(t.targetId),yield Pn(y.get(),t),e.adBadRequest(t)})),ti.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),ti.onEvent("adNoBidMediated",t=>i(void 0,void 0,void 0,function*(){yield Pn(y.get(),t),e.adNoBidMediated(t)}))})}),gi=(e,t)=>i(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:r,reloadExistingAds:o,renderFinnBlinkPlacements:i,contextSelector:a}=null!=t?t:{};if(r)return zt(),[];o&&(zt(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{Ft(e.id)})),f(null!=e?e:{}),yield ii();const{clientSidePlacements:s,serverSidePlacements:d}=Jo(Kt(a));let l=s;return i&&(l=l.filter(e=>Le(e.targetId))),Qo(d,y.get()),l.length>0&&(ni=[...ni,...l.map(e=>Object.assign({},e))],ir(l),sr(l),yield ui(l)),ni}),hi=(e,t)=>i(void 0,void 0,void 0,function*(){y.set(e),y.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:n,kilkaya:r,rightColumnSplit:o,drEdition:a,finnBlink:s}=e;if(b.initialize(),window.addEventListener("message",Vn,!1),ti=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=ti,p("Apn tag is set up on window"),yield Promise.allSettled([i(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=y.get();(yield D(e,t,n,"xandr-endpoint"))||ti.setEndpoint("ib.adnxs-simple.com",!0)}),i(void 0,void 0,void 0,function*(){if(yt())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:r}}=y.get(),o=yield D(t,n,r,"prebid");(null==e?void 0:e.enabled)&&o&&(yield ve(null==e?void 0:e.prebidUrl))}),se(e),i(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=y.get();yield ve(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),i(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:r}}=y.get();(yield D(t,n,r,"gpt-endpoint"))&&(yield ve(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),i(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:r,countryCode:o}}=y.get(),{getConsentAsync:i}=_(n,0,o),a=yield i();if(e&&t&&a){if(yield ve(t),document.querySelector(`.${Wr}`))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(Wr)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),q(),i(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=y.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield ve(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==n?void 0:n.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return Ua});yield e()}p("Libraries have been loaded and trackers have been set"),yield vi(),yield ii(),p("Page options have been set"),oi(e),p("Advertory is setup on window");const{clientSidePlacements:d,serverSidePlacements:l}=Jo(Kt());if(ni=d,Qo(l,e),ir(ni),sr(ni),yield ui(ni),p("Ads has been loaded",ni),jn(e,ni),Ur(ni),null==s?void 0:s.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ha});yield t(e.finnBlink)}if(null==a?void 0:a.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return Ln});yield t(e)}if(null==o?void 0:o.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Za});t(e.rightColumnSplit)}if(null==r?void 0:r.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return ss});yield t(e)}}),mi=(e,t)=>i(void 0,void 0,void 0,function*(){yield((e,t)=>i(void 0,void 0,void 0,function*(){var n,r;const{initConsentManager:o,getConsentAsync:i}=_(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(r=e.pageContext)||void 0===r?void 0:r.countryCode),a=yield Zo(e);yield Sn(),yield Hr(o),yield Hr(i),p("TCF resolved successfully"),yield hi(a,t),p("Run function resolved successfully")}))(e,t)}),yi=(e,t,n,r)=>{var o;const{image:i,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:x}=e,E=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:E(i),imgWidth:null==i?void 0:i.width,imgHeight:null==i?void 0:i.height,imgAltText:null!=d?d:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=r.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return E(t?w:a)})(),sponsoredBy:null!=s?s:"",title:null!=d?d:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:E(b),previewVideoSrc:null!=x?x:""},t)},fi=(e,t)=>{const n=(r=T,window.location.href.includes(r));var r;const o=new URLSearchParams(window.location.search).get(T),i=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?i?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},wi=(e,t,r,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const r=e.parentElement,{publisher:o,pageType:i}=t,a=o&&Object.values(n).includes(o);r&&a&&Fo(o,e,Vo,i)})(i,r),o())},bi=(e,t,n)=>{const r=((e,t,n)=>{var r;const{displayTemplates:o,videoTemplates:i}=n,a="default";if(!e.native)return null;const{native:s,targetId:d}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(r=fi(e.targetId,l))&&void 0!==r?r:c,p=at[t.language||P.NO],v=yi(s,p,d,t);return(s.video?i[u]:o[u]||o.default)(v,t)})(e,t,n);wi(e.targetId,r,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&zo(e,t)})},xi=e=>(t,n)=>{var r;const{targetId:o}=t,i=document.querySelector(`#${o}`);if(!i)return;const a=e.getOptions(null!=n?n:{});bi(t,a,e.templates),null===(r=e.postProcess)||void 0===r||r.call(e,t,i)},Ei=e=>{const{pageContext:{countryCode:t}}=y.get(),{keywords:n,dynamicSizeWidthCheck:r}=e,o=`${V(t)}-adformat`,i=n?n[o]:[];if(!i)return{};const a=(Array.isArray(i)?i:[i]).filter(e=>!(e in ke)||window.innerWidth>=ke[e]);return{[o]:r?a:i}},ki=e=>{const{pageContext:{countryCode:t}}=y.get(),n=`${V(t)}-targetid`;return e?{[n]:[e]}:{}},Ai=()=>{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},Ci=e=>{const{siteSpecificConfig:t}=y.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},Ii=(e,t)=>Ci(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},Si=e=>Ci(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class Ti{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return i(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 i(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Oi=9826;class Pi{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e=nn.DESKTOP,isMobileApp:t}}=y.get();if(t){return{"aa-sch-supply_type":`app_${e===nn.MOBILE?"phone":nn.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return i(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 i(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 gr()}getExternalUid(){return i(this,void 0,void 0,function*(){return yield vr(y.get())})}isTrackingForbidden(){return i(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=Oi}={}}=y.get();return"true"===I("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=y.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return i(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=y.get(),{getConsentAsync:r}=_(e,0,n);return{"aa-sch-cmp_advertising":(yield r())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=y.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 ji=new Pi,Li=ji.prepare.bind(ji);function Ni(e=!1){var t,n;const r=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=dn();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:r.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const _i=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Di(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",_i.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class $i extends Pi{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=nn.DESKTOP}}=y.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=y.get(),{OS:n,isHybridApp:r}=Ni(t);return{"no-sno-apptype":n&&e&&r?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Di(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:r}}=y.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"===r?"article":"front"}`}}}const qi=new class extends $i{prepare(e){return i(this,void 0,void 0,function*(){var t,n,r,o,i,a,s;const d=y.get(),l=null!==(r=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==r?r:{},c=null!==(a=null===(i=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===i?void 0:i.keywords)&&void 0!==a?a:{},u=null===(s=d.siteSpecificConfig)||void 0===s?void 0:s.publisherClassName,p=new Ti;yield p.addAsync(this.getAdvertisingConsentKeywords()),yield p.addAsync(z(y.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield p.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),p.add(this.getSupplyTypeKeywords()).add(le()).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 v=p.build(),g=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:v,user:Object.assign(Object.assign({},de(P.NO)),g?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Mi=qi.prepare.bind(qi);class Bi extends Pi{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=nn.DESKTOP}}=y.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,r=document.documentElement.clientHeight;return{width:e||n||0,height:t||r||0}}(),t={width:null!==(r=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==r?r:0,height:null!==(i=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==i?i:0};var n,r,o,i;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return i(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}}=y.get(),{appMode:t,mobileOS:n}=Ni(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:r}}=y.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"===r?"article":"front"}`}}}const Fi=new class extends Bi{prepare(e){return i(this,void 0,void 0,function*(){var t,n,r,o,a,s;const d=y.get(),l=null!==(r=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==r?r:{},c=null!==(s=null===(a=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===a?void 0:a.keywords)&&void 0!==s?s:{},u=new Ti;yield u.addAsync(this.getAdvertisingConsentKeywords()),yield u.addAsync(z(y.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield u.addIfAsync(c.externalIdSrc,()=>this.getExternalIdSrc()),yield u.addIfAsync(c.sdkVersion,()=>i(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),u.add(this.getSupplyTypeKeywords()).add(le()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.screen,this.getScreenKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).addIf(c.hasPlusMembership,{"se-generic-has_plus":"plus"===pr("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const p=u.build(),v=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:p,user:Object.assign(Object.assign({},de(P.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Ri=Fi.prepare.bind(Fi);ot(".advertory-splash-navbar-wrapper{width:100%;border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.advertory-splash-navbar-wrapper .advertory-splash-navbar{display:flex;justify-content:space-between;align-items:center;width:100%;margin:0 auto;padding:14px;cursor:default}@media screen and (min-width: 600px){.advertory-splash-navbar-wrapper .advertory-splash-navbar{padding:24px 30px}}@keyframes elementsAnimation{0%{opacity:0;pointer-events:none;cursor:default}95%{opacity:0;pointer-events:none;cursor:default}100%{opacity:1;pointer-events:all;cursor:pointer}}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-logo{display:block;height:18px;width:fit-content}@media screen and (min-width: 600px){.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-logo{height:26px}}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-close{display:flex;align-items:center;gap:8px;font-family:Arial,Helvetica,Verdana,Geneva,sans-serif;font-size:14px;line-height:20px;animation:elementsAnimation 1.5s linear;cursor:pointer}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-close:hover{text-decoration:underline}");const Vi=()=>e.jsx("div",{role:"button",tabIndex:1,"data-testid":"advertory-splash-navbar-wrapper",className:"advertory-splash-navbar-wrapper",style:{display:"none"},children:e.jsxs("div",{className:"advertory-splash-navbar",children:[e.jsx("img",{id:"advertory-splash-logotype",className:"advertory-splash-logo",width:"250",height:"30"}),e.jsx("div",{className:"advertory-splash-close","data-testid":"advertory-splash-close",children:e.jsx("span",{id:"advertory-splash-close-label"})})]})});var zi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAYAAADjVADoAAAAAXNSR0IArs4c6QAAAtZJREFUeAHd3EFuwjAQBVDUbZeIM7DqUWANZ0PiDiy4D0JVu4BlpapVK/p/qpEgEGJjezJjS6NAoI3n4Uwg4IxGaKfTaYJYI/aIA2KDmPKxmhpyekFsEUfEDrFCjJsccYMI74h2+8SKeS0QyGWJ+GonifuviDFHA0dCV/vGA+4xkMMC8dOVJNavCMHd4V5zjYHE+hCY+44QrAl9zSUGkgpBYO5HQrAwhjRXGEiINeHe7nCe85YQUwQLY0hzgYFEQkcCc2YBfZEjxxx3mGRIM42BBGIQOGIWF0dGrIjBoKK5o0kygoh4xsiG4BkjO4JHjGIInjCKI7Qwbr0/Rx+ummoBxdbTjg6SZOgSG+TRxBSGOoJgWcIYDMESxuAIFjCAsESEfna4fscoSeRaojPqNcMcgmBqYphF0MQwj6CB4QahJIY7hBIYDyAspR8mlkgg+WjiHkFeiRSMahBSMKpDeBCD50Bj3jHaqgmSdNcycjfB03sbsXwhCA46HlNA70n4RciI4R8hA0Y9CC2M0C+RuJuoIjxJRxWWz9hGzPZ+8fwPhX7pbQKvbsxJlfOiyXOlM72eFtxSAoKA+MfIgOAfIyOCX4xIBB4dOPxDmp/dBNksEUwupDWHSDxxhqgHA8lEI0idrgYjBaEajBwI7jFyIrjFKIHgDqMkghsMDYQEDJ1f+2kimMUYAsEcxpAIZjAsIAyOYQnhDCPm7Dg/w6QVUIsI6hiWEdQwPCAUx/CEUAwDCLE/6zXzXST6nqeAekbINjJqQEjGAAKnCYeeL1T9Gk6Si10in5jdhBP7ppzlx7nSIY0IlxPBYnuo+Hz0NQZjQwhOGO9rLkZC2xlJhWIcCLHrUXA1Eh7E2BOClw7oaq4RBAXJ9Y2MNSHGCF46oN1YQN3UBEm6a4lciHFrxvMb1k+av8MNYnBkcDdhzWAB/Z8m3PWfHa5HTpz+zbnwvDAAr5LAS0Y0CH9NGDAEswYjMgAAAABJRU5ErkJggg==",Ui="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAAAAXNSR0IArs4c6QAACT5JREFUeAHtnc1vFlUUximICbLAmoAuSCw7IlsghEQpJWGhEaksJbZdskDSP4Ck6T9AQPcE1I2JEjS6UosbEvzYKbpSWAku+EgEo4nB3wNv67zT+Z5zP97pnOTJOzP33nOec8503pnz3rldt66XtRWBR48ebQcnwLNry/Pq3io2gxhtrz7KQU9I7Aa/A8l1MOHAzEirJCY7wM9AoljtDuIQho+AP0FSbrGzJwihCI0Si73gdjJAbCtmR7zSxeBJ8C/IkgccPOqVUITGFAPwMCtAHFPsTjqnjZH14AwoExE65ZxQpAbkO8g7oZOxUyzXO3EDxZvApaS1Ctvn6OOGkBMv2ymVr0A+1xHFdFM7y6nRKNwGrtVhkeh7me1nUio7tysfgXxtIortNpOgoGgn+LUJi8SY79h+wYRQhErkG5CPbUQx3tnKPRRMgjttWCTG3mD7pVaEIhwsn4B8sxDFerKRmww8Dv62YJHQcZftqUaEIhwkX8C9hH8Wm4r58VruMuC0heUcHf9wfKYWoQg7ywcgX1zJ6VK3sbwRnHfFIKV3oZRQpB3wYyHli6vd8yjemBkGGraAL4FPuYixpzMJRXhQXIE4+xTlZMtQODiwFfzok0XC1hLb0ReO4TgOxDWEKDfPKWnLD7Uvs71rKIv+diYxdRVCE/5M1rM04HaVUZP1Rpr1Vm4OrmiD0FPA9586JockysIxDLMKuEPEPewoN6u/yzi46MF4kQkVjt9YOZMCb8BFBVxxCimLhWGA2Qxwebta5nwUhWNIngJVCrhl/jRtVw6qPf7QcQpYPxDWJX6WAcvfsYUnmWWjbIK6Bdy6vpX1V+ynavnFAMuSSxnBvHavhWNItCng5vlQ93jzEh6WLIqadQmn+6uo+nyts61B54h8bVckx5HRPusqJA8fu3U1waEYrusqHP//LFIhEVW6oFPf19IdUtz80ItH8yD0ndPbVRJRpQ++zIDQd8TzVbg27oODMTybLDR2YDAQP3wVcDGVKf4mK2E+hqf/C/BY/fRfkknGhCjgpjOmqW97S6jaNmMwOUEyTcjX/tcYqlw4Vl+wBEKKJpXusM1GRW0YDlnBXg76dTYmyiirD1DfkLKE8fEyrk7bIaBLzPsgpBQWjiG2B6hPSFGM4vntDzKLIaOB7czCMcdjuEkqLuA6/ZMqUE5wZkHo2+SVGcdwiaGAO1sQstpNY7VHlAwgSIfo8jEY/lm7ZJxx87mBvneM9dZRd5/Ox8bGxr6qM6isr3nCZJCk6RfSz8GL2l+DchOfXyNZP1n77uTniwHRfZD9wZrwCOiTz/tcJEu+O0mYFEP4Fh8HwGfaXyMiXw8MfHfisrOEiS3EH/Chd8Xe037HRT4eHfg8+q7yvRa6cAwFJ6JiuNsCbiL9Tm46EvqHNnFsmgMfAtv3oYaseN35C2tv8Vd1yZdVrwmTUyRNRU9d623eh5LSMPIHZl8nWd/6NO89YXKOpO3g4wvQ7n0oKQsjv2D2VZL1m2/zTm868pwZOLqf9m/y+kR8XJz3h0iWYhIkYTKMw3f5OAw+0P6IiLgeHnAfEcoOaHKJDF04hkKpLDpwfXRVEq7QheO8jKmYPTu6kXXInMAcApr1GouIi4rZveRFgADtAjcjyJg4hHoFKy887Y/j1HZwAlSeW1FmFV2acfw9CCWy3W4GbsJJdGkuiWLU3dXccG4z+BT4FtncnIh3q010JScrdXs1N5zdAN4FvkS2NrTKUGIwurKmA3Z/NTccd104Ni/gwllzSR6CLJG9bq/mhoPTIC8AWUGpekw6VZQ2E/RVnUtyhr5uihco3gQugTpiOskfw1mXmDp80n1NZ+CivMlLI4qp7a8XKNwGroEmcplBZqu5oSv5Jd6Ez/IY0xm48hHI1yai2Nr8eoGi6FZzg9M4uAKaisaOW10D0WXx4mO3V3MjSE1nHJvOwIWH5cuA3V/NjYDVKRybFnCxPQWsS2ndX82NoM2BohnHapuzugRKD/pmSmzS3Eq6vZobockrHJsXcLG10CoV1Qefp2v2O3A0bAEjvZob/NOFY9MCLvpDvAw4tJrb2ODPeyufSyBEdfoKdqf5Ffcen62FoGqJiGNAJaaP0Hu7tVIUoFd3lZ+ASeBbNOX7FXy589gwZN4EIeU6xid8R6GqPXEDy/+OI1ScdBI+ERj0q7ktByP1SWysqytNEn6RQau/yzhY5xa5ieGyMZkv5aVi6G0XsirgilNIKX4UgdkMKLpFdk1eleyVl/K8ZSdlSByAuIQS5WAmRSt7l44uHgjrOn6WAW4q2dluPz4qm0BF65CiR5GpApqrmxhgWXJp6rxp4Xi1l8NHINmmgNvUx/S4Gxxo9g8ZGGhR1EwTqrvfr+Y2fF4V7xHd0T7rit173IqP3bqa4FAM1/W78DhYIf61uqBT39fSHVJMf+hdCQAezYPQd079am4rGamwQcJieDZZqEC1sAt++CrgYipT9Hyn14ndC4ZiePq/AI/VT/8l7jMmRAEXs0NiOpekxOUnzZi3mlsx5EnNnX41t0rZGnQiuJpbsVQzyNbdKxWOMaoCrvqGlCWMm80lqZOrlb4QaDq3wjJw/WpuKxmpuEH0Fy0z0EBXZuEYPTHcJBUXcCvG2LwbwZkF0RSO4RJDAXfWMtCPf3G2VEiQ+tXcngT0Ph/9am6WJ5dDXTfR3a/m5jDAlqr71dwso+lYV7+am+MAW6rvV3PjBmYURMXwecvMF+kyv0ssMoZj07T3q7kVBamkzWvCxIWk9au5lSSlqNl7wgZJ28Fnv5pbUWZy2rzPShIPphxr2bp+NbecpBQdDpIwESJp/WpuRZmJuY3vtdCFYyiUSpwF3FCJJVyhC8d5GVMxezZUXKK2S2DyXsrLC6br45qB26/mVnTWEKD0S3muk5Kn3/RlwCKfR76NCHZqNbeRT0gVB0haJ1Zzq+JrZ/qQtJFeza0ziajrCIlzPePYawG3rv8j2Z+kTYOHwFqkU0XpXqwjQGD3As2atRL/M3CtgxK7PjJlNePYdDW32OMWlB9J04zjKy3+zDR2PKgTa804AW8649h0Nbe1FvfW/pK4OoXjvoDbOuIGCkjaHCiacay2OQNTvQqrCJCQvMJxX8C1CrK1HpKWLhx3roAbZE6HdaKS+kiak9Xckjb67T4ClSPwH3Dy/EjlG8AUAAAAAElFTkSuQmCC";ot(".advertory-welcome-page-close{padding:0;background:none;border:none;z-index:1;position:fixed;top:42px;left:16px;color:#fff;cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-welcome-page-close .advertory-welcome-page-close-image{width:22px;height:22px}@media screen and (min-width: 736px){.advertory-welcome-page-close .advertory-welcome-page-close-image{width:28px;height:28px}}.advertory-welcome-page-scroll{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:18px;text-shadow:0 2px 5px rgba(0,0,0,.2);text-align:center;position:absolute;max-width:100%;z-index:1000;left:50%;transform:translate(-50%);cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-welcome-page-scroll .advertory-welcome-page-scroll-image{width:26px;height:26px;margin-top:19px}@media screen and (min-width: 736px){.advertory-welcome-page-scroll{font-size:calc(24px + 2*(100vw - 736px)/514)}.advertory-welcome-page-scroll .advertory-welcome-page-scroll-image{width:54px;height:54px;margin-top:22px}}");const Hi=()=>e.jsxs(e.Fragment,{children:[e.jsx(()=>e.jsx("div",{style:{display:"none"},className:"advertory-welcome-page-elements advertory-welcome-page-close smooth-close-takeover","data-testid":"welcome-page-close-button",children:e.jsx("img",{className:"advertory-welcome-page-close-image",src:zi,alt:"Stäng annonsen",width:"28",height:"28"})}),{}),e.jsx(()=>e.jsxs("div",{style:{display:"none"},className:"advertory-welcome-page-elements advertory-welcome-page-scroll smooth-close-takeover","data-testid":"welcome-page-arrow-icon",children:[e.jsx("span",{id:"advertory-welcome-page-scroll-label"}),e.jsx("img",{className:"advertory-welcome-page-scroll-image",id:"advertory-welcome-page-scroll-image",src:Ui,width:"54",height:"54"})]}),{})]});ot(".advertory-topscroller-close{padding:0;background:none;border:none;z-index:1;position:fixed;top:42px;left:16px;color:#fff;cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-topscroller-close img{width:22px;height:22px}@media screen and (min-width: 736px){.advertory-topscroller-close img{width:28px;height:28px}}.advertory-topscroller-scroll{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:18px;text-shadow:0 2px 5px rgba(0,0,0,.2);position:absolute;max-width:100%;text-align:center;z-index:1000;left:50%;transform:translate(-50%);cursor:pointer;top:50vh;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-topscroller-scroll img{width:26px;height:26px;margin-top:19px}@media screen and (min-width: 736px){.advertory-topscroller-scroll{font-size:calc(24px + 2*(100vw - 736px)/514);top:55vh}.advertory-topscroller-scroll img{width:54px;height:54px;margin-top:22px}}@media screen and (min-height: 836px){.advertory-topscroller-scroll{top:50vh !important}}");const Wi=()=>e.jsxs(e.Fragment,{children:[e.jsx(()=>e.jsx("div",{style:{display:"none"},className:"advertory-topscroller-elements advertory-topscroller-close smooth-close-takeover","data-testid":"topscroller-close-button",children:e.jsx("img",{src:zi,alt:"Stäng annonsen",width:"28",height:"28"})}),{}),e.jsx(()=>e.jsxs("div",{style:{display:"none"},className:"advertory-topscroller-elements advertory-topscroller-scroll smooth-close-takeover","data-testid":"topscroller-arrow-icon",children:[e.jsx("span",{id:"advertory-topscroller-scroll-label"}),e.jsx("img",{id:"advertory-topscroller-scroll-image",src:Ui,width:"54",height:"54"})]}),{})]});ot(".advertory-splash-navbar-wrapper{width:100%;border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.advertory-splash-navbar-wrapper .advertory-splash-navbar{display:flex;justify-content:space-between;align-items:center;width:100%;margin:0 auto;padding:14px;cursor:default}@media screen and (min-width: 600px){.advertory-splash-navbar-wrapper .advertory-splash-navbar{padding:24px 30px}}@keyframes elementsAnimation{0%{opacity:0;pointer-events:none;cursor:default}95%{opacity:0;pointer-events:none;cursor:default}100%{opacity:1;pointer-events:all;cursor:pointer}}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-logo{display:block;height:18px;width:fit-content}@media screen and (min-width: 600px){.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-logo{height:26px}}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-close{display:flex;align-items:center;gap:8px;font-family:Arial,Helvetica,Verdana,Geneva,sans-serif;font-size:14px;line-height:20px;animation:elementsAnimation 1.5s linear;cursor:pointer}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-close:hover{text-decoration:underline}.advertory-welcome-page-close{padding:0;background:none;border:none;z-index:1;position:fixed;top:42px;left:16px;color:#fff;cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-welcome-page-close .advertory-welcome-page-close-image{width:22px;height:22px}@media screen and (min-width: 736px){.advertory-welcome-page-close .advertory-welcome-page-close-image{width:28px;height:28px}}.advertory-welcome-page-scroll{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:18px;text-shadow:0 2px 5px rgba(0,0,0,.2);text-align:center;position:absolute;max-width:100%;z-index:1000;left:50%;transform:translate(-50%);cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-welcome-page-scroll .advertory-welcome-page-scroll-image{width:26px;height:26px;margin-top:19px}@media screen and (min-width: 736px){.advertory-welcome-page-scroll{font-size:calc(24px + 2*(100vw - 736px)/514)}.advertory-welcome-page-scroll .advertory-welcome-page-scroll-image{width:54px;height:54px;margin-top:22px}}.advertory-topscroller-close{padding:0;background:none;border:none;z-index:1;position:fixed;top:42px;left:16px;color:#fff;cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-topscroller-close img{width:22px;height:22px}@media screen and (min-width: 736px){.advertory-topscroller-close img{width:28px;height:28px}}.advertory-topscroller-scroll{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:18px;text-shadow:0 2px 5px rgba(0,0,0,.2);position:absolute;max-width:100%;text-align:center;z-index:1000;left:50%;transform:translate(-50%);cursor:pointer;top:50vh;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-topscroller-scroll img{width:26px;height:26px;margin-top:19px}@media screen and (min-width: 736px){.advertory-topscroller-scroll{font-size:calc(24px + 2*(100vw - 736px)/514);top:55vh}.advertory-topscroller-scroll img{width:54px;height:54px;margin-top:22px}}@media screen and (min-height: 836px){.advertory-topscroller-scroll{top:50vh !important}}.advertory-takeover-wrapper{display:none;font-family:Arial,Helvetica,Verdana,Geneva,sans-serif;width:100%}.advertory-takeover-wrapper.advertory-impact-wrapper{z-index:10001}.advertory-takeover-wrapper.welcome-page-wrapper{clip-path:inset(0)}.advertory-takeover-wrapper.advertory-splash-wrapper{position:fixed;height:100vh;background-color:#fff;font-weight:700;z-index:10001}.advertory-takeover-wrapper.topscroller-wrapper div[role=button]{border-bottom-left-radius:0;border-bottom-right-radius:13px !important;right:unset}.advertory-takeover-wrapper.topscroller-wrapper iframe[id^=utif_]{width:100%;height:68vh}.advertory-takeover-wrapper.topscroller-wrapper .takeover-topscroller-label{right:0 !important;left:unset !important}.advertory-takeover-wrapper div[role=button]{background-color:hsla(0,0%,100%,.75) !important;border-bottom-left-radius:13px;border-bottom-right-radius:0 !important;left:unset !important;right:0}.advertory-takeover-wrapper .advertory-takeover{position:fixed;height:100vh;width:100%}.advertory-takeover-wrapper .advertory-takeover .advertory-takeover-label{position:absolute;top:0;left:0;font-size:10px;font-weight:700;background-color:hsla(0,0%,100%,.75);color:#585858;padding:7px;letter-spacing:.4px}.takeover-ad-hidden{display:none;visibility:hidden;height:0 !important}body.page-locked{position:fixed;top:0;left:0;right:0;width:100%;overflow:hidden}");const Ki={prepareTag:e=>{var t;const{keywords:n,targetId:r,invCode:o,dynamicSizeWidthCheck:i}=e,{pageSetup:a,pageContext:{countryCode:s}}=y.get();if(!a)return(e=>{const{keywords:t,targetId:n,invCode:r}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=y.get(),i=ei(r,o),a=Ei(e),s=ki(n),d=Ai(),l=Si(r),c=Ii(r);return Object.assign(Object.assign({},e),{invCode:i,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),s),l),d),rendererOptions:c})})(e);const{tag:{useAppTabletInvCode:d=!0}={}}=a,l=ei(o,d),c=Ei(e),u=ki(r),p=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(l),v=Ai(),g=Si(o),h=Ii(o,{safeFrameAutoInitialSize:!0}),m=i&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,f=(new Ti).add(null!=n?n:{}).add(c).add(u).add(null!=p?p:{}).add(g).add(v).addIf(null===(t=null==a?void 0:a.tag)||void 0===t?void 0:t.reloadKeywords,{[`${V(s)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:m,invCode:l,keywords:f,rendererOptions:h})},preparePageOptions:e=>i(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=y.get();return n?yield t===P.SE?Ri(e):Mi(e):yield Li(e)}),siteEvents:t},Gi=((e,t)=>({init:n=>mi(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:gi,getVideoPPIDs:pe,createInitNativeAd:xi,getVideoAdsConfig:No}))(Ki,r),Ji=ot("[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 Yi=Object.freeze({__proto__:null,default:Ji});ot('.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 Qi={Blink:"Blink"},Xi=new Map,Zi=e=>{var t;if(!Xi.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Qi)){const r=e[t];null!=r&&(window[n]=r)}})(e)).catch(t=>{throw Xi.delete(e),t});Xi.set(e,t)}return null!==(t=Xi.get(e))&&void 0!==t?t:Promise.resolve()},ea="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",ta="https://www.finn.no/distribution-front/external/carousel",na=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:r}}=y.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Fo(n,o,Ro,null!=t?t:r);Fr({preferredTestIdData:{targetId:e,testId:"finn"}})},ra=e=>{const{pageContext:{publisher:t=""}}=y.get(),n=document.querySelector(`#${e}`);if(!n)return;const r=`-${t}`;n.classList.remove(`advertory${r}-finn-blink`),n.classList.remove(`advertory${r}-finn-blink-wrapper`)};var oa=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=y.get(),{initNativeAd:n}=y.getHandlers();Ae(e)&&ut(e,t),Ce(e)&&(null==n||n(e,y.get()))},finnBlinkLoaded:na,xandrAdLoaded:ra});const ia={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return p(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){p(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){p(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},aa="finn_blink_id",sa=e=>i(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:r,theme:i}=e,a=o(e,["userId","id","hashed_email","theme"]),s=window[Qi.Blink];if(!s)return;const d=new s({remote:ta,id:n,hashed_email:r,theme:i});yield d.inject(Object.assign({},a))}),da=e=>i(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,r=o(e,["userId","theme"]),i=window[Qi.Blink];if(!i)return;const a=new i({remote:ta,userId:t,theme:n});yield a.inject(Object.assign({},r))}),la=e=>{var t,n;const r=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==r?void 0:r.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},ca=(e,t)=>{const{finnBlink:{enabled:n}={}}=y.get(),r=(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(!r||!n)return null;const{limit:o,height:i,requireImage:a,theme:s,rec:d,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${la(e)}`,enabled:r,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=i?i:100,offset:null!=u?u:200,requireImage:a,rec:d,theme:"dark"===s?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},ua=(e,t,n)=>i(void 0,void 0,void 0,function*(){var r;const{placements:o,pageContext:{deviceType:a}}=y.get();p(`rendering finn blink ad for ${e}`);const s=Tt(e),d=o[a].find(e=>e.targetId===s),l=ca(e,null==d?void 0:d.finnBlink);if(!(null==l?void 0:l.enabled))return p(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void ra(e);if((e=>{var t;const n=la(e),r=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==r?void 0:r.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void p(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:f}={}}=null!=v?v:{},w=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=gr();return null!=e?e:""}return e})(g),x="dark"===f?"dark":"light";try{const e=yield i(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=y.get(),t=ia.get(aa),n=I("finncode");if(!e||n)return"";if(!t){const t=yield J.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return ia.set(aa,n),n}return t}),t=yield i(void 0,void 0,void 0,function*(){const{ppid1:e}=ae.getPPIDs();return e}),n=(null===(r=null==d?void 0:d.finnBlink)||void 0===r?void 0:r.useNewConstructor)?da:sa;yield n(Object.assign(Object.assign({},l),{channel:w,id:b,userId:t,hashed_email:e,theme:x,uuid:h})).then(()=>{na(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){p(`Finn blink error ${t}`),n&&n(e),!n&&Bt(e),ra(e)}}),pa=()=>i(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=y.get();return!!(yield D(e,t,n,"finn-blink"))||(p("Skip loading finn blink ad due to missing TCF consent."),!1)}),va=(e,t)=>{var n;(p(`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)):p(`Cannot perform afterend on: ${e.id}`)},ga=e=>document.querySelector(`#${e}`);var ha=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>i(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=y.get(),r=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=ga(n);o&&(yield Wn(o,null!=e?e:r))}}),loadFinnBlinkAd:(e,t,n,r)=>i(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=y.get();if(p(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield pa())||o)return n&&n(e),ra(e),void(!n&&Bt(e));try{yield Zi(ea)}catch(e){console.error(e)}yield ua(e,t,n),r&&r()}),replaceAdsWithFinnBlink:e=>i(void 0,void 0,void 0,function*(){if(!e)return;const{replacementConfig:t}=e;if(!(Tn()&&(null==t?void 0:t.adsToReplace)&&(null==t?void 0:t.sizes)&&e.enabled))return void p(`Finn blink configuration is incorrect: ${JSON.stringify(t)}`);if(!(yield pa()))return;yield Zi(ea);const{adsToReplace:n,sizes:r}=t;n.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const r=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=y.get(),n=document.createElement("div"),r=document.createElement("div");return r.id=e,n.appendChild(r),Fo(t,r,Ro),p(`Creating blink container for: ${e}`),n})(t);(e=>{p(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),va(n,r),n.dataset.finnBlinkId=t,Un().withFullAdsChain(e)})})});const ma=1e4,ya=e=>e.some(e=>e.some(e=>!!e&&or(e,0)));let fa;var wa=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=y.get(),{enabled:t,options:{rotationInterval:n=ma,widescreenIdPrefix:r}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=y.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(r);let i=0,a=Date.now(),s=ya(o);if(!o.length)return;fa&&window.removeEventListener("scroll",fa);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(...r)=>{null===n&&(e(...r),n=setTimeout(()=>{n=null},t))}})(()=>{s||(s=ya(o)||s,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(i),t=o.map(e=>e[i]),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)})(),i=l(i),a=Date.now())},1e3);fa=c,window.addEventListener("scroll",c)}});const ba="#fff",xa="#0098da",Ea=(e,t=!0)=>{(e===mr||e===yr)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},ka=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Aa=e=>{document.body.style.overflow=e?"initial":"hidden"},Ca=e=>{const t=Sa(e),n=Ia(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Aa(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Ia=e=>{const t=()=>Ca(e);return window.addEventListener("advertory:closeTakeover",t),ka(),t},Sa=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Ca(e)};return ka(),window.addEventListener("keydown",t),t},Ta=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Sa(e),Ia(e),ka(),t.addEventListener("click",()=>{Ca(e)}),Aa(!1))},Oa=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Ia(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Pa=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Ca(e))})(e)},ja=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=y.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),r=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&r&&(r.style.display="flex",r.innerText=at.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},La=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=at.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Na=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=at.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},_a=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=at.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Da=()=>{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)},$a=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${Nr})()`,e+t.outerHTML})(e)),n};var qa=Object.freeze({__proto__:null,createTakeoverAd:e=>i(void 0,void 0,void 0,function*(){const{takeover:t}=y.get(),{targetId:n}=e,r=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!r||!o||!t)return;const i=Tr(e),a=o.offsetHeight,s=window.scrollY>a;o.style.display="block",!s&&Ea(i,!1),((e,t)=>{({[mr]:Na,[hr]:ja,[yr]:La,[fr]:_a})[t](e)})(o,i),Da(),((e,t)=>{({[mr]:Oa,[yr]:Oa,[hr]:Ta,[fr]:Pa})[t](e)})(o,i),((e,t,n)=>{if(!n)return;({[mr]:()=>{const{buttonLabel:r}=jr(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=r?r:"")})},[hr]:()=>{const{themeColors:r,logotype:o,buttonLabel:i,showArrowIcon:a}=jr(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!=i?i:""),".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&&r){const{backgroundColor:e,color:t}=r;n.style.setProperty("background-color",null!=e?e:ba,"important"),n.style.color=null!=t?t:xa}}})},[yr]:()=>{const{buttonLabel:r,showArrowIcon:o,showCloseButton:i=!0}=jr(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||i||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=r?r:""))})},[fr]:()=>{}})[t]()})(o,i,t),yield Or(),!s&&Ea(i,!0),Lr(e,i)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,r=Ue(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[r].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,r=Ue(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[r].rtb;o&&(o.banner.content=t)})(e,$a(t))},modifyTakeoverIframe:(e,t)=>{var n;const r="100%",o="100%";e.resizeAd(t,[r,o]);const i=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!i)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(i),t=e.width,n=e.height;t===r&&n===o||(i.style.width=r,i.style.height=o)}}).observe(i,{attributes:!0,attributeFilter:["style"]})}});const Ma=(e,t)=>{const n=e.width,r=(null!=t?t:window.screen.width)/n;return r<1?r:1},Ba=(e,t=window.screen.width,n,r)=>{const o=Ma(e,t);if(n&&n(e,o),r)return void r(e);const i=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);i&&(i.style.transform=`scale(${o})`,i.style.transformOrigin="left top")},Fa=new Map;Fa.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Fa.set("panorama",{scale:.79,transformOrigin:"center center"}),Fa.set("outstream",{scale:.79,transformOrigin:"center center"}),Fa.set("integration",{scale:.79,transformOrigin:"center center"}),Fa.set("toppanorama",{scale:.8,transformOrigin:"left center"});var Ra=Object.freeze({__proto__:null,calculateScaleFactor:Ma,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:Ba,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 r=Rr(e),o=Fa.get(r),i=document.querySelector(`#${e.targetId}`);if(!i||!o)return;if(i.style.transformOrigin=o.transformOrigin,i.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==i?void 0:i.offsetWidth;a&&"number"==typeof s&&!isNaN(s)&&a.style.setProperty("right",String(-1*s*.2)+"px")},scaleAds:e=>{var t,n,r,o,i,a;const{adScaleConfig:s,pageContext:{deviceType:d}}=y.get();if(!(null==s?void 0:s.enabled))return;if(Me(e,he))return;const l=null!==(t=s.adsToBeScaled[d])&&void 0!==t?t:[],c=Ht(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(r=null===(n=s.offset)||void 0===n?void 0:n[c])&&void 0!==r?r:0,p=document.getElementById(e.targetId),v=null!==(o=null==p?void 0:p.offsetWidth)&&void 0!==o?o:window.screen.width,g=null!==(a=null===(i=null==p?void 0:p.parentElement)||void 0===i?void 0:i.offsetWidth)&&void 0!==a?a:window.screen.width;Ba(e,(v<g?v:g)-u)}});var Va=Object.freeze({__proto__:null,prepareContainerForFullWidthFormat:e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:r}={}}=y.get();if(!t||!n||!r)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${r}__full-width-ad`),o.classList.add(`advertory-${n}-${r}-wrapper__full-width-ad`))},scaleVerticalFullWidthAd:e=>{var t;const n=document.querySelector(`#${e.targetId}`),r=null===(t=document.querySelector(`#${e.targetId}`))||void 0===t?void 0:t.parentElement,o=null==n?void 0:n.querySelector("iframe"),i=null==o?void 0:o.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:s}={}}=y.get();if(!(n&&o&&i&&r))return;r.classList.add(`advertory-${a}-${s}__vertical-full-width-ad-wrapper`);const d=window.innerWidth,l=Math.round(d/1080*1920);n.style.width="100%",n.style.height=`${l}px`,n.classList.add(`advertory-${a}-${s}__vertical-full-width-ad`);const c=Ma(e,n.offsetWidth);i.style.transform=`scale(${c})`,i.style.transformOrigin="left top"}});const za=e=>e===P.NO?"schibsted":"schibstedse";var Ua=Object.freeze({__proto__:null,getCampaign:za,loadNorstat:()=>i(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:r}=y.get(),o=yield D(r,n,t,"norstat");if(!e||n||!o)return;const a=(e=>{const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o}=ae.getPPIDs(),i=(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]);return`${i.buildNorstatPath()}?${i.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{i(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const r=document.createElement("img");r.src=e,r.id=null!=t?t:"",n&&(r.style.display="none"),document.body.appendChild(r)})})(`https://sch-map.norstatsurveys.com/api/nids/${za(t)}/map/${a}`,"norstat")})});const Ha=".advertory-right-column-track",Wa="--advertory-right-column-track-height",Ka=e=>e.getBoundingClientRect().top+window.scrollY,Ga=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Ja=(e,t)=>{const n=(r=t,`${Math.max(0,Math.round(r))}px`);var r;document.body.style.setProperty(e,n)},Ya=(e,t)=>`${e}-${t}`,Qa=(e,t,n)=>{var r;const o=Array.from(null!==(r=e.querySelectorAll(t))&&void 0!==r?r:[]),i=(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===i.length)return;const a=Ka(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ga(e);Ja("--advertory-newsroom-header-height",t)})(),i.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const r=Ka(e),o=Ya(Wa,t),i=r-n,a=Ya("--advertory-right-column-split-point-height",t),s=Ga(e);Ja(o,i),Ja(a,s)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Ya("--advertory-right-column-ad-height",t),r=Ga(e);Ja(n,r)})(o[t])});((e,t)=>{const n=Ka(e);Ja(Wa,n-t)})(i[Math.min(o.length,i.length-1)].point,a)};let Xa=!1;var Za=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Xa)return;const{splitPointIDs:t,adSelector:n,trackSelector:r=Ha}=e,o=document.querySelector(r);if(!o)return;Xa=!0;const i=()=>{Qa(o,n,t)};i(),window.addEventListener("resize",i),window.addEventListener("orientationchange",i),window.addEventListener("load",i),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(i)});new ResizeObserver(i).observe(o)}});class es{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:r,pathname:o}=new URL(n);if(!r.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const i=o.split("/");return i.length?[...i.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class ts{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class ns{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:r}=this.parseKilkayaData(e);return{id:r,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 i(this,void 0,void 0,function*(){var t,n,r,o,i,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===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===o||o.call(r,u):(null===(i=this.pulse)||void 0===i?void 0:i.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 i(this,void 0,void 0,function*(){var t,n,r,o,i,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=(r=this.pulse).trackClickUIElement)||void 0===o||o.call(r,s):null===(a=(i=this.pulse).trackElementClick)||void 0===a||a.call(i,s)})}}class rs extends ns{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,o,i,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===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.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===(i=this.newsroomStrategy)||void 0===i?void 0:i.getTags)||void 0===a?void 0:a.call(i,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),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 os="[data-k5a-teaser-analytics]",is=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const o=new rs(e,t,n),i=new WeakMap,a=e=>{const t=i.get(e);t&&(t.disconnect(),i.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(os);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(i.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(os);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"]}),i.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class as{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:r}}){if(!(null==e?void 0:e.instance))return;const o={[n.VG]:new es}[r]||new ts;is(e.instance,o,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const r=n.parentElement;r&&(p(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const r=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";Ft(r)}loadKilkayaScript(e){return i(this,void 0,void 0,function*(){yield ve(e)})}run(e){return i(this,void 0,void 0,function*(){var t,n;const{tcf:r,pageContext:{isMobileApp:o,countryCode:i},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const s=yield D(r,o,i,"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 ss=Object.freeze({__proto__:null,Kilkaya:({placementName:t,slotTag:n,fallbackTargetId:r,children:o,pulseData:i,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,o]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(o)}return n},d=s(i,"data-pulse"),l=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,l,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:o})]}))},runKilkaya:e=>i(void 0,void 0,void 0,function*(){const t=new as;yield t.run(e)})});exports.Takeover=t=>e.jsxs("div",{className:"advertory-takeover-wrapper",children:[e.jsx(Vi,{}),e.jsx(Hi,{}),e.jsx(Wi,{}),e.jsxs("div",{id:t.targetId,className:"advertory-takeover","data-device":"all",children:[e.jsx("div",{className:"div-for-xandr",style:{display:"none"}}),e.jsx("div",{className:"advertory-takeover-label",style:{display:"none"}}),e.jsx("div",{id:`${t.targetId}-button`})]})]}),exports.default=Gi;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");const t={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},n={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"},r={publisherClassName:n.TV4,fullWidthFormatClassName:"panorama",classesToRemoveOnRefresh:[]};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function i(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{d(r.next(e))}catch(e){i(e)}}function s(e){try{d(r.throw(e))}catch(e){i(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((r=r.apply(e,t||[])).next())})}function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s,d;"function"==typeof SuppressedError&&SuppressedError;var l=a(function(){if(d)return s;d=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function i(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&o(e).forEach(function(t){a[t]=n(e[t],r)}),o(t).forEach(function(o){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(i(e,o)&&r.isMergeableObject(t[o])?a[o]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(o,r)(e[o],t[o],r):a[o]=n(t[o],r))}),a}function l(t,o,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||e,i.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(o);return s===Array.isArray(t)?s?i.arrayMerge(t,o,i):a(t,o,i):n(o,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},s=l}());const c=["placements","takeover","refreshConfig","editableConfiguration"],u={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},p=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},v=(e,t)=>{console.warn("[Advertory WARN]: ",e)},g=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||v("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||v("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||v("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||v("pageContext.deviceType is required."),n||v("pageOptions is required."),r||v("placements is required."),(null==o?void 0:o.defaultThreshold)||v("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,o;const i=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===(r=e.fullscreenScroll)||void 0===r?void 0:r.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==i?void 0:i[t])&&v(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},h=6;class m{set(e){g(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 c){const r=e[n];void 0!==r&&(t[n]=r)}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=l(m.DEFAULT_SITE_HANDLERS,e)}}m.DEFAULT_SITE_HANDLERS={siteEvents:u,initNativeAd:function(){}};const y=new m,f=y.modifyConfigProperties.bind(y);class w{initialize(){this.DATA=Object.assign({},w.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)}}w.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const b=new w,x=864e5,E=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return p("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=x)=>{const o={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(o))},getByTimestamp:(t,n=x)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return p("Error with parsing localStorage data"),null}}}})(),k="glimrTags",A=["glwe_","glwet_"],C={geofenceTags:[],geoTags:[],weatherTags:[]},I=e=>new URLSearchParams(window.location.search).get(e),S="takeover",T="native_override_desc2",O=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 p("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const o=e=>{r||(p("Resolving advertising permission value obtained"),r=!0,t(e))},i=setTimeout(()=>{p("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{p("On Tcf Ready called, waiting for permission"),clearTimeout(i)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(i);const t=Number(e);p("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),P={NO:"no",SE:"se"},j="cmp:loaded";let L="undefined"!=typeof window?window._tcf_:void 0,N=!1;const _=(e,t,n)=>{const r=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=I("bypass_tcf"),s=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(p("TCF bypass param detected, returning consent: true"),!0):(p("TCF is not enabled, returning consent: true"),!0))(r,a))return!0;if(N)return null;if(!L)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=L.getConsentedToAllSync();return p(`TCF consented to all is: ${t}`),L.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(p("Getting TCF consent manager..."),window._tcf_)return p("TCF consent manager is already available"),L=window._tcf_,void e(L);p("TCF consent manager is not available");const n=()=>{p("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(L=window._tcf_,e(L)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(j,n),N=!0,t(new Error("Timeout waiting for CMP to load"))},o);p("Listening for CMP loaded event..."),document.addEventListener(j,n,{once:!0})}):Promise.resolve(null),getConsentSync:s,getConsentAsync:()=>i(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return p(`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===P.SE,r=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===P.NO;if(t||r)return p("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield O(e);if(!(null==e?void 0:e.enabled))return!0;const i=s();return null!==i?i:yield new Promise((e,t)=>{try{if(!L)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{p("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);L.onTcfReady(()=>{p("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),L.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}},$=(e,t,n,...r)=>i(void 0,[e,t,n,...r],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return p(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return p(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=_(e,0,n);return(yield o())?(p(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(p(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}),D=(...e)=>i(void 0,[...e],void 0,function*(e=y.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:r}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield $(t,n,r,"glimr")}const{getConsentAsync:o}=_(t,0,r);return yield o()}),q=()=>i(void 0,void 0,void 0,function*(){const{glimr:e}=y.get();if(!(yield D())||!(null==e?void 0:e.enabled))return void p("No consent for glimr data fetching.");const t=yield(n=500,i(void 0,void 0,void 0,function*(){return yield Promise.race([i(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)=>{E.setWithTimestamp(k,{tags:e,tagMappings:t}),n(!0)})})}catch(e){p(`Error during getting glimr data: ${e}`)}else p("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),M={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"},B=e=>A.some(t=>e.startsWith(t)),F=e=>e.startsWith("glgc_"),R=e=>!B(e)&&!F(e),U=e=>e===P.NO?"no-sno":"se-generic",V=(e,t)=>i(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:r,pageContext:{countryCode:o}={}}=e,i=yield D(e);if(!(null==r?void 0:r.enabled)||!i)return p("No consent for getting glimr tags."),{};const a=U(o),s=z(e,Boolean(n));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}),z=(e,t)=>{const n=H();if(!n)return C;const r=((e=[])=>e.filter(B))(n),o=((e=[])=>e.filter(F))(n),i=((e=[],t,n)=>{var r;const o=e.filter(R);if(n&&t){const{publisher:e}=null!==(r=t.pageContext)&&void 0!==r?r:{},n=M[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:i,geofenceTags:o,weatherTags:r}},H=()=>{const e=E.getByTimestamp(k);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},W=()=>(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),K=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),G=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:r=!1}={},pageContext:{countryCode:o}}=y.get(),i=[`${U(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",...r?i:[]],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)}},J={get:(e,t)=>i(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)=>i(void 0,void 0,void 0,function*(){const r=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:r});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},Y="advertory:ppids-cache",Q={[P.SE]:`SCH${P.SE.toUpperCase()}-EnvHash`,[P.NO]:`SCH${P.NO.toUpperCase()}-EnvHash`},X={[P.SE]:`SCH${P.SE.toUpperCase()}-UserHash`,[P.NO]:`SCH${P.NO.toUpperCase()}-UserHash`},Z={[P.SE]:`sch${P.SE}-envhash-v3`,[P.NO]:`sch${P.NO}-envhash-v3`},ee={[P.SE]:`sch${P.SE}-userhash-v3`,[P.NO]:`sch${P.NO}-userhash-v3`},te={[P.SE]:`'sch${P.SE}-iosid-v3'`,[P.NO]:`'sch${P.NO}-iosid-v3'`},ne={[P.SE]:`sch${P.SE}-androidid-v3`,[P.NO]:`sch${P.NO}-androidid-v3`},re={[P.SE]:"sdrn:schibsted.com:user",[P.NO]:"sdrn:spid.no:user"};class oe{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:r})=>{t.append(e,`${r}-${n}`)}),t}}const ie=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return i(this,arguments,void 0,function*(e,t=1e4){var n,r;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===(r=o.xandr)||void 0===r?void 0:r.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||p("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:""}},ae=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return i(this,void 0,void 0,function*(){var n,r,o,i,a,s,d,l,c,u,p;const v=E.get(Y),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===(r=g.idfv)||void 0===r?void 0:r.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(i=c.userId)&&void 0!==i?i:"",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||p("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,r){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=r?r:null}shouldHash(e,t){var n,r;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(r=t[o])||void 0===r?void 0:r.plain))return!0}return!1}cachePPIDs(e,t,n,r){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}}:{}),r?{anId:{plain:r}}:{});E.set(Y,o)}hashPPIDs(e,t){return i(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield J.post(t,n,e)}catch(e){return p("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return i(this,arguments,void 0,function*({clientId:e,instance:t},n){const r=yield((e,t)=>i(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${re[t]}:${n}`:null}))(t,n),o=yield(e=>i(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),a=window.advertory_idfv,s=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:r},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),s?{anId:{plain:s}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:r,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:r.plain,environmentId:o.plain}}},se=e=>i(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:r,isMobileApp:o}}=e;if(!(yield $(n,o,r,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([ie.processPPIDs(t,null==n?void 0:n.timeout),ae.processPPIDs(t,r)])).forEach((e,t)=>{if("rejected"===e.status){p(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),de=e=>{const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o,idfv:i,anId:a}=ae.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]).add(i,te[e]).add(a,ne[e]).buildEids()}]}},le=()=>{const{ppid1:e,ppid2:t}=ie.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},ce=e=>{const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o,idfv:i,anId:a}=ae.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]).add(i,te[e]).add(a,ne[e]).buildRyEids()}}]}}},ue=e=>{const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o}=ae.getPPIDs();return(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]).buildRyEids()},pe=e=>i(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o}=ae.getPPIDs(),i=(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]);return yield new Promise(e=>{e(i.buildVideoEids())})}),ve=(e,...t)=>i(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const o=document.createElement("script");o.async=!0,o.src=e;const i=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",i),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",i),o.addEventListener("error",a);const d=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),ge="ABSOLUTE_FULLSCREEN",he="ANY_FULLSCREEN",me="VERTICAL_FULLWIDTH",ye="FULLWIDTH",fe="TAKEOVER",we="VELVET_TAKEOVER",be="WALLPAPER",xe="COLLAPSE",Ee={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],VERTICAL_FULLWIDTH:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},ke={wallpaper:1600,"l-format":1600},Ae=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Me(e,he)},Ce=e=>{const{native:t}=e;return!!t},Ie=e=>Me(e,ye),Se=e=>{const{targetId:t}=e;return t.includes("takeover")||Me(e,fe)},Te=e=>Me(e,fe),Oe=e=>Me(e,be),Pe=e=>Me(e,xe),je=e=>e.targetId.includes("sponsorstripe"),Le=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Ne=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),_e=e=>e.targetId.startsWith("midboard"),$e=e=>e.targetId.includes("widescreen"),De=e=>e.width>=1260&&e.width<=1280,qe=e=>e.width>=1600&&e.width<=1620,Me=(e,t)=>{const n=Ee[t];if(!n)return!1;return!!n.find(t=>{var n,r;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,i=(null===(r=e.banner)||void 0===r?void 0:r.height)||e.height,a=t.width===o,s=!t.height||t.height===i;return a&&s})},Be="advertory-fullscreen-scroll",Fe="advertory-fullscreen-scroll-wrapper",Re="fullscreen-scroll-in-screen",Ue="in-screen",Ve=e=>e.includes("snoap.no"),ze=e=>{var t,n,r,o,i;return!!(null===(i=null===(o=null===(r=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===r?void 0:r.adResponse)||void 0===o?void 0:o.ads[1])||void 0===i?void 0:i.rtb)},He=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const r=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),i=r.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...i,o).toString()},We=He([],()=>{const e=({width:e,height:t})=>{var n;const r=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!r)return;const{clientWidth:o,clientHeight:i}=r,a=e/o,s=t/i;r.style.transform=`scale(${a},${s})`,r.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}),Ke=e=>{const t=He([],()=>{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 r=n.contentDocument.createElement("style");r.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(r),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},Ge=[],Je={},Ye=(e,t)=>{var n;const r=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>Qe(e,r),{}),i=Ze(e);o.observe(e),r&&(Je[i]=nt(e,null==t?void 0:t.options))},Qe=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const r=Ze(e);n?(Xe(r,n),et(e,r,t)):(Xe(r,n),tt(e,r,t))})},Xe=(e,t)=>{var n,r;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const i=t?"showFullscreen":"hideFullscreen";null===(r=o.contentWindow)||void 0===r||r.postMessage(`advertory:${i}-${e}`,"*")},Ze=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},et=(e,t,n)=>{e.classList.add(Ue),document.body.classList.add(Re),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Ge.includes(t)||Ge.push(t),n&&window.addEventListener("scroll",Je[t],{passive:!0})},tt=(e,t,n)=>{Ge.includes(t)&&(n&&window.removeEventListener("scroll",Je[t]),document.body.classList.remove(Re),e.classList.remove(Ue),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},nt=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:r=[".skyscraper_r"],headerZIndex:o=3}=t,i=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&i.push(n)}),r.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{i.length&&rt(e,i,o,0),a.length&&rt(e,a,o,40)}},rt=(e,t,n,r)=>{const o=e.offsetHeight,i=window.scrollY,a=e.getBoundingClientRect().top+i;t.forEach(e=>{const t=e.offsetHeight;let s;s=a>i?(a-i)/t-r:(i+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 ot(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}ot('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100% !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:0}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:19px !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const it="left",at={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 st=null;const dt=(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=`(${We})()`,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(Ve(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=Ke(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>Ve(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)),Ve(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)),ze(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},lt=()=>{st=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,r=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",`${r}px`)},ct=()=>{st||(st=window.requestAnimationFrame(lt))},ut=(e,t)=>{var n,r,o,i;const{pageContext:{countryCode:a}}=y.get(),{targetId:s}=e,d=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==d?void 0:d.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),(e=>{const{articlesContainerWidth:t=1302,backgroundColor:n="#fff",foregroundColor:r="#fff",margin:o="16px 0",beforeContentValue:i=""}=e,a=t/2,s=document.createElement("style");s.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${n} 0px,\n ${n} calc(50% - ${a}px),\n ${r} calc(50% - ${a}px),\n ${r} calc(50% + ${a}px),\n ${n} calc(50% + ${a}px),\n ${n} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${o};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${i&&"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: '${i}' !important;\n }`,s.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(s)})(null!==(r=null==d?void 0:d.overlayStyles)&&void 0!==r?r:{});const l=document.getElementById(s),c=null==l?void 0:l.parentElement;if(!l||!c)return;Ye(c,t),l.className=Be,Ye(c,t),l.className="advertory-fullscreen-scroll";const u=Me(e,ge)?"absolute":"fixed";l.style.position=u,c.className=Fe,c.dataset.showTagSubscribeId=s,l.setAttribute("data-ad-label",at[a].adText),(null==d?void 0:d.cogwheelPosition)===it&&(l.dataset.moveCogwheelToTheLeft="true"),ct(),window.addEventListener("resize",ct),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",ct),null===(i=window.visualViewport)||void 0===i||i.addEventListener("scroll",ct)},pt=e=>{if(!(null==e?void 0:e.classList.contains(Be)))return;e.classList.remove(Be),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(Fe))&&(t.classList.remove(Fe),t.classList.remove(Ue))};var vt=Object.freeze({__proto__:null,createFullscreenScrollAd:ut,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,r=ze(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[r].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,r=ze(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[r].rtb;o&&(o.banner.content=t)})(e,dt(t,e))},undoFullscreenScrollContainer:pt});const gt=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},ht=(e,t,n)=>{var r,o,i,a;const s=document.createElement("div");s.id=`${e}-button`,t.appendChild(s);(null===(o=null===(r=window.apntag.requests)||void 0===r?void 0:r.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(i=(a=window.apntag).requests)&&void 0!==i||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),gt(e);const d=s.firstElementChild;d&&t.insertBefore(d,s),s.remove()},mt="ad-loaded",yt=()=>null!==I("disable_prebid"),ft=()=>i(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:r},fullscreenScroll:o}=y.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:i}=y.getHandlers(),{getConsentAsync:a}=_(t,0,n),s=yield a(),d=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:r=>{const o=W(),{prebid:{relevantCallbackTimeout:i}={}}=y.get(),a="relevantCb"===r&&i?i:n[r].timeout,s=setTimeout(()=>{!n[r].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${r}'`),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}}})(),l=W(),c=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=W();return{user:e,keywords:t}})();d.failsafeOnTimeout("relevantCb");const{user:{externalUid:u=""}={},keywords:v}=c;(()=>{const e=K();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(d.getCancel()||!l.loadTags)return p("core loadTags() call was cancelled",{cancel:d.getCancel(),apnTagLoadTags:!l.loadTags,condition:"or"}),void d.cleanup();const t=K();d.events.relevantCb.done=!0,d.failsafeOnTimeout("auctionCb");const r=s?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};p("prebid consentManagement",r),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:r,enableSendAllBids:!1},ce(n)),G(v,u))),p("core add prebid config",Object.assign(Object.assign({consentManagement:r,enableSendAllBids:!1},ce(n)),G(v,u))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{d.getCancel()||(d.events.auctionCb.done=!0,l.loadTags(e)),d.cleanup()}},customNativeRender:e=>{wt(e,i)},directRenderFn:e=>{var t;const{settings:n,renderFn:r}=e,{bid:i,adDiv:a}=n||{};if(!a)return;const s=r(n),d=Object.assign(Object.assign({},i),{targetId:a.id,banner:!0}),l=a.id,c=document.getElementById(l);c&&(Ae(d)?(ut(d,o),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const r=new MutationObserver(()=>{n()&&r.disconnect()});r.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(s)):(pt(c),null===(t=null==c?void 0:c.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),c.classList.add(mt),(null==i?void 0:i.creativeId)&&ht(l,c,Number(null==i?void 0:i.creativeId)))}}),p("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{d.getCancel()||(d.events.auctionCb.done=!0,l.loadTags(e))}},customNativeRender:e=>{wt(e,i)},directRenderFn:()=>{}})})}),wt=(e,t)=>{var n;const{divId:r,native:o,bid:i}=e,a=document.querySelectorAll(`[id^=${r}]`)[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},y.get()),null==d||d.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:i.adId}),"*")},bt="0123456789abcdefghijklmnopqrstuvwxyz",xt=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=bt[Math.floor(36*Math.random())]}return t},Et=e=>{window.apntag.anq.push(e)},kt=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),At=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})});let Ct="";const It=new Map,St=e=>{const{pageSetup:{tag:t}={}}=y.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(Ct!==window.location.pathname&&(It.clear(),Ct=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),r=null!==(t=It.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=y.get();return`${e}-${t}`})()}-count`]=r,It.set(n,r+1),e})):e},Tt=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},Ot="advertory-wallpaper-background",Pt="advertory-with-horseshoe",jt=()=>{const e=document.querySelector(`.${Ot}`);e&&e.remove()},Lt=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${Ot}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},Nt=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,_t=e=>Nt.test(e),$t=e=>e.startsWith("wallpaper:color:"),Dt=e=>{const t=document.querySelector(`.${Ot}`);t&&(t.style.backgroundImage=`url(${e})`)},qt=e=>{const t=document.querySelector(`.${Ot}`);t&&(t.style.backgroundColor=e)};var Mt=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(Pt),n.classList.add(Pt))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{jt();const e=document.createElement("div");e.classList.add(Ot),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&&(Lt(n),window.addEventListener("scroll",()=>Lt(n)))})(n),e()},isShortWallpaperColorMessage:$t,isShortWallpaperUrlMessage:_t,removeWallpaperBackground:jt,setWallpaperBackgroundColor:qt,setWallpaperBackgroundImage:Dt});const Bt=e=>{if("0"===I("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")&&jt())},Ft=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"))},Rt=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,r=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${r}px`)},Ut=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:r}=(e=>{const t=b.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=r},Vt=()=>{jt();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{Bt(e.id),Ut(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),r=null==t?void 0:t.getAttribute("data-probable-width");n&&r&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",r+"px"))})(e.id),e.innerHTML="",e.id=Tt(e.id)}),Et(()=>window.apntag.clearRequest())},zt="noGroupedPlacements",Ht=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Wt=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Kt=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:r,pageContext:{deviceType:o}}=y.get(),i=n[o].filter(Wt)||[],a=e?document.querySelector(e):document;if(!a)return[];const s=i.reduce((e,t)=>{const n=Ht(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=i.filter(({targetId:e})=>e.match(t)),s=(null==r?void 0:r.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 r;const o=Gt(e,t,n),i=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=i&&(null===(r=o.finnBlink)||void 0===r?void 0:r.loadOnlyFinnBlink),s=`${e.id}-${xt(6)}`;return e.id=s,e.setAttribute("data-advertory-ad-rendered","true"),i&&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&&b.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 St(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)},Gt=(e,t,n)=>{const r=n[t],o=n[n.length-1],i=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==r?void 0:r.targetId)?r:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:i||o},Jt=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=y.get(),r=(null==t?void 0:t[n])||{},o=Object.values(r).flat(),i=(e=>{const t={};return e.forEach(e=>{const n=Tt(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[r,o]of Object.entries(t))n[r]=e.filter(e=>o.includes(Tt(e.targetId)));return n})(e,r),s=Object.keys(i),d=((e,t)=>e.filter(e=>!t.has(Tt(e.targetId))))(e,new Set([...s,...o]));return Object.assign(Object.assign(Object.assign({},a),i),{[zt]:d})},Yt=(e,t,n)=>{const r=document.getElementById(`div_utif_${e}`);if(!r)return;const{apntag:o}=window,[i,a]=t;if(!r.dataset.lockedsize&&a&&i)r.style.width=`${i}px`,r.style.height=`${a}px`,n&&(o.resizeAd(r.id,[i,a]),r.dataset.lockedsize="true",r.dataset.lockedwidth=i.toString(),r.dataset.lockedheight=a.toString());else if(null==r?void 0:r.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=r.dataset;e&&t&&o.resizeAd(r.id,[e,t])}},Qt=["netboard","board"];class Xt{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,r;const{editionName:o}=e,i=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(r=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==r?r:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),i&&s.searchParams.append("urlData",i),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return i(this,void 0,void 0,function*(){var t,n,r;const o=yield this.identityFacade.getIdentityUser(),i=null!==(r=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==r?r:"",a=(null==o?void 0:o.userId)?String(o.userId):"",s=this.buildUrl(e,{envId:i,spid:a});try{p("Starting fetching DrEdition ad from URL:",s);const e={method:"GET"},t=yield J.get(s,e);return p("Fetch operation completed successfully."),t}catch(e){p("Error during fetch operation:",e)}return null})}}let Zt=class{getDrEditionUTMParams(e,t){var n;const{title:r="",clientName:o,creativeId:i}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,s=r.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},i&&{utm_id:`df-${i}`})}getUrlSearchParams(e,t,n){if(!e)return"";const r=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),i=new URLSearchParams(e.search);return Object.entries(r).forEach(([e,t])=>{o.has(e)||i.set(e,null!=t?t:"")}),i.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const r=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!r)return"";const o=this.getDrEditionUTMParams(e,t),i=new URL(r);return Object.entries(o).forEach(([e,t])=>{i.searchParams.has(e)||i.searchParams.set(e,null!=t?t:"")}),i.toString()}handleVideo(e,t){return i(this,void 0,void 0,function*(){const{id:n,autoplay:r,mute:o,videoLoop:i,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:r,vgtvMuted:o,vgtvLoop:!!i,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:r,pathname:o}=new URL(n);if(!r.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const i=o.split("/");return i.length?[...i.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const en=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):p("Dr. Edition container does not have a parent element, cannot remove height lock.")};class tn{constructor(e,t,n,r){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=r,this.drEditionAds=[]}fetchAndRenderAd(e,t){return i(this,void 0,void 0,function*(){var n,r;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:i=!1}=t,a=e.querySelector(o);if(!a)return void p(`Container with selector "${o}" not found.`);const s=yield this.drEditionService.fetchData(t);return(null==s?void 0:s.itemId)||i?!(null==s?void 0:s.itemId)&&i?(p("No Dr. Edition ads available to render. Collapsing whole placement."),Bt(e.id),void en(a)):((null==s?void 0:s.itemId)&&i&&(p("Dr. Edition ad available to render as a Xandr backfill."),Ft(e.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(a,s,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(s,t),en(a),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(e,s,t),null===(r=e.querySelector("a"))||void 0===r||r.addEventListener("pointerup",()=>null)):en(a))):(p("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void en(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 r=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";Ft(r)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const r=e.querySelector(".dr-edition-slider");if(!r)return!1;let o=null;const i=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)),[...r.children].forEach(e=>{i.observe(e)})})},{threshold:[.9]});return[...r.children].forEach(e=>{i.observe(e)}),!0}}const nn={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},rn="web_desktop",on="web_phone",an="wde",sn="wph",dn=()=>{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"};class ln{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return i(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:r}=_(n.tcf,n.isMobileApp,n.country),o=yield r(),i=n.device===nn.MOBILE?t.mobileHTML:t.desktopHTML;const a=o?i:i.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var r,o,i;e.search=null!==(i=null===(o=(r=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(r,e,t,n))&&void 0!==i?i:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class cn{constructor(e){this.strategy=e}handle(e,t){return i(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:r}={}}=e;(n||r)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return i(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 ve(t)}catch(e){p("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return i(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:r}=e.videoConfiguration,o=[...document.querySelectorAll(`#${r}`)||[]].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 i=null==o?void 0:o.parentNode;if(!i)return;const a=i.closest("a");i.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,r,o;const{preview:{url:i,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!i)return!1;const s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",i),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(r=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(r,s),!0))}}let un=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,r){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 r=null==n?void 0:n.textContent;return r?r.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:r}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:r}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return i(this,void 0,void 0,function*(){var r,o,i,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===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)?null===(i=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===i||i.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 i(this,void 0,void 0,function*(){var r,o,i,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(r=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(r,l):this.pulse.trackClickUIElement?null===(a=(i=this.pulse).trackClickUIElement)||void 0===a||a.call(i,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}};class pn extends un{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var r,o,i;const{pulseData:{title:a,clientName:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(i=null===(o=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.transformUrl)||void 0===o?void 0:o.call(r,l))&&void 0!==i?i:{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 vn=class extends un{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var r,o,i,a,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(i=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===i?void 0:i.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,r){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,r),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,r){var o,i,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===(i=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===i?void 0:i.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:r,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const gn="front",hn=e=>i(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 r=document.createElement("script");r.id=e,r.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",r.async=!0;try{r.src=r.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(r,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)))}))}),mn={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 i(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Yi})})}})}};class yn{handleVideo(e,t){return i(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:r,mute:o,vendor:a}}){yield i(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 s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{mn[e](c)});const u={id:t,node:n,autoplay:r,mute:o,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},p=yield hn(u);p.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(p,s)}),p.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),p.once("PulseStats:ready",()=>i(this,void 0,void 0,function*(){const e=yield p.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===gn?"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:r}=new URL(n),o=r.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 fn="https://www.aftonbladet.se/video-player-extras/latest/";class wn{handleVideo(e,t){return i(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:r,mute:o,vendor:i}}){const a={id:t,node:n,autoplay:r,mute:o,vendor:i,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${fn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${fn}external-link.js`]:{name:"ExternalLink"}}};yield hn(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 bn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class xn{handleVideo(e,t){return i(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:r,mute:o,vendor:a}}){const s={id:t,node:n,autoplay:r,mute:o,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},bn(e)?e:{}),{provider:Object.assign(Object.assign({},bn(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield hn(s);d.once("PulseStats:ready",()=>i(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===gn?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let En=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const kn=(e,t,r)=>{var o;const{publisher:i,pageType:a,country:s}=e,d={[n.VG]:new Zt,[n.E24]:new yn,[n.AFTONBLADET]:new wn,[n.SVD]:new xn}[i]||new En,l=new(s===P.SE?pn:vn)(r,d,a),c=new Xt(t,null!==(o=null==r?void 0:r.pulseTracker)&&void 0!==o?o:r),u=new ln(d,l),p=new cn(d);return new tn(c,u,p,l)},An=()=>i(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 Cn{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 i(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 p("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return i(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 In=(e,t,n)=>{const{wrapperSelector:r}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(r),i=new IntersectionObserver((r,o)=>((e,t,n,r,o)=>{const i=kn(n,r,o);e.forEach(e=>{var r,o,a;if(!e.isIntersecting)return;const s=e.target,d=null!==(r=s.dataset.editionName)&&void 0!==r?r:"",l=null!==(o=s.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=s.dataset.pulsePrimaryposition)&&void 0!==a?a:"";i.fetchAndRenderAd(s,Object.assign(Object.assign({},n),{editionName:d,columnName:l,primaryPosition:c})),t.unobserve(s)})})(r,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>i.observe(e))},Sn=()=>i(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)}}),Tn=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},On=[],Pn=(e,t)=>i(void 0,void 0,void 0,function*(){var n;const{pulse:r,tcf:o,drEdition:i,pageContext:{deviceType:a,publisher:s,pageType:d,countryCode:l,isMobileApp:c}}=e;if(!(yield $(o,c,l,"handleDrEditionBackfill")))return;const u=((e,t)=>{var n,r;const{pageContext:{deviceType:o},placements:i,drEdition:a}=e,s=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,d=i[o]||i.desktop,l=Tt(t.targetId),c=d.find(e=>e.targetId===l),u=Qt.some(e=>l.startsWith(e)),p=On.includes(l),v=(null===(r=null==c?void 0:c.drEdition)||void 0===r?void 0:r.editionName)||s;return c&&u&&!p&&v?(On.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!u)return;if(!(null==r?void 0:r.instance))return void p("Pulse has not been passed as a prop, aborting");const v=yield An(),g=new Cn(v),h=kn({publisher:s,pageType:d,country:l},g,null==r?void 0:r.instance),m=document.getElementById(t.targetId);if(!m||!i)return;m.classList.value="";const y=document.createElement("div");y.className=i.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==u?void 0:u.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:i,device:a,tcf:o,isMobileApp:c,country:l,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),jn=(e,t)=>{var n,r,o,a;if(!Tn())return void p("Ad block not enabled, Dr. Edition backfills will not be rendered");p("Ad block is enabled, Dr. Edition backfills will be rendered");const s=null!==(a=null===(o=null===(r=null===(n=e.finnBlink)||void 0===n?void 0:n.replacementConfig)||void 0===r?void 0:r.adsToReplace)||void 0===o?void 0:o.map(([e])=>e))&&void 0!==a?a:[],d=new IntersectionObserver((t,n)=>i(void 0,void 0,void 0,function*(){for(const r of t){if(!r.isIntersecting)continue;const t=r.target;n.unobserve(t),yield Pn(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!s.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&d.observe(t)})};var Ln=Object.freeze({__proto__:null,DrEdition:({editionName:t,fallbackTargetId:n,children:r,pulseData:o,htmlAttributes:i})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[r,o]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(o)}return n},s=a(o,"data-pulse"),d=a(i,"data");return e.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":t},s,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:r})]}))},getDrEditionManager:kn,handleDrEdition:e=>i(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield $(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield An(),r=new Cn(n);In({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},r,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:Pn,handleDrEditionBackfillOnAdblock:jn});const Nn="collapseAd",_n="hideAd",$n="resizeAd",Dn="renderDrEditionFallback",qn="wallpaperImageUrl",Mn="wallpaperColor",Bn="velvet",Fn=[$n,qn,Mn,Nn,_n,Dn,Bn];let Rn;const Un=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(_t(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:qn,wallpaperImageUrl:t}}if($t(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:Mn,wallpaperColor:t}}if(e.startsWith(Dn)){const t=e.split(":")[1];return{name:Dn,targetId:t}}if(e.startsWith(Nn)||e.startsWith(_n)){const t=e.split(":")[1];return{name:Nn,targetId:t}}if(e.includes("name")&&Fn.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!Fn.some(e=>n.name===e))return;const{name:r,targetId:o,wallpaperImageUrl:i,wallpaperColor:a,cmd:s,size:d}=n;r===Bn&&s&&(s.includes("noScroll")&&(Rn=(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==Rn||Rn(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),r!==Nn&&r!==_n||!o||Bt(o),r===$n&&o&&s&&Yt(o,s),r===Dn&&o&&(Bt(o),Pn(y.get(),{targetId:o})),"resizeMediationAd"===r&&o&&d&&Yt(o,d,!0),r===qn&&i&&Dt(i),r===Mn&&a&&qt(a)},Vn=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),zn=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=y.get(),r=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},a=e=>{Ft(e),Et(()=>r.showTag(e))};return{withXandrAd:a,withFinnBlinkAd:e=>i(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ha});yield t(e,o,null)}),withFullAdsChain:e=>i(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void a(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ha});yield t(e,o,a,()=>i(void 0,void 0,void 0,function*(){if(!b.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return Mt});t(e)}))})}},Hn=(e,t,n)=>{const r="true"===n.dataset.isFinnBlinkOnlyPlacement;return Le(t)&&r?(p(`loading finn blink ad for blink only placement for ${t}`),void zn().withFinnBlinkAd(t)):Le(t)?(p(`loading finn blink ad with full ads chain for ${t}`),void zn().withFullAdsChain(t)):void Et(()=>(p("core showTag",{id:t}),e.showTag(t)))},Wn=(e,t)=>i(void 0,void 0,void 0,function*(){yield kt,yield At;const n=new IntersectionObserver((t,n)=>((e,t,n,r)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,i=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(i);p("core log from intersection observer handler",{targetId:i,element:a}),n(window.apntag,i,r),a&&(t.unobserve(a),t.disconnect())})})(t,n,Hn,e),Vn(t));n.observe(e)}),Kn=new Map,Gn=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Jn=".brandstudio-premium-content-widget",Yn=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Qn=({adWrapper:e,placementContainer:t})=>{const n=Yn({adWrapper:e,placementContainer:t});var r;null==e||e.style.setProperty("height",`${n}px`),Ut(r=t),r.innerHTML=""},Xn=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Zn=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=y.get(),r=Gn.includes(n)&&Boolean(t.closest(Jn));const o=r?t.closest(Jn):null,i=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!r&&!a||r&&!o)return;if(a)return Xn(e),void i.disconnect();const s=t.closest('[style*="height"]'),d=o;s&&d.contains(s)?Xn(s):d.hasAttribute("style")&&Xn(d),i.disconnect()})})});try{i.observe(t,{childList:!0,subtree:!0})}catch(e){i.disconnect()}},er=(e,t,n,r,o,i)=>{var a;const s=performance.now(),d=null!==(a=Kn.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(r,o)&&n<0;s-d>=o&&l&&(Kn.set(t,s),((e,t,n)=>{const{pageContext:{countryCode:r}}=y.get(),o=null==n?void 0:n.parentElement;o&&n&&Qn({adWrapper:o,placementContainer:n}),Et(()=>{e.setKeywords([t],{[`${U(r)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,i))},tr=(e,t,n)=>{const r=new IntersectionObserver((e,r)=>((e,t,n,r)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:i}=e;t(window.apntag,o.id,i.y,n,r,o)})})(e,er,t,n),Vn(300));r.observe(e)},nr=(e,t=6)=>{const n=[];for(let r=0;r<e.length;r+=t){const o=e.slice(r,r+t);n.push(o)}return n},rr=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),or=(e,t=0)=>{const n=e.getBoundingClientRect(),r=window.innerHeight;return n.bottom>-t&&n.top<r+t},ir=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=y.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),cr(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},ar=(e,t,n)=>{const r=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of r){const r=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)}),i=null==r?void 0:r.requestThreshold;or(o,i)&&r&&(Rt(r.targetId),n.length&&o.classList.remove(...n),cr([r],t))}},sr=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:r}}=y.get();t&&(e.forEach(({targetId:e})=>{const t=dr(e);t&&(t.dataset.bfCacheRefresh="true")}),r?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&ar(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const r=()=>{window.scrollY>0&&(window.removeEventListener("scroll",r),ar(e,!1,t))};n.persisted&&(rr()?window.addEventListener("scroll",r,{passive:!0}):ar(e,!1,t))})})(e,n))},dr=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},lr=e=>{const{targetId:t,allowedFormats:n}=e,r=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(dr(t)),o=(e=>1===e[0]&&1===e[1])(r),i={sizes:[r],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(i.native=void 0),i},cr=(e,t=!1)=>{const{queryConfig:{batchSize:n=h}={}}=y.get(),r=e.map(({targetId:e})=>e),o=nr(r,n);if(t)for(const t of e){const e=lr(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)Et(()=>window.apntag.refresh(e))},ur=(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,pr=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},vr=e=>i(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:r}={}}=e,{getConsentAsync:o}=_(t,0,r);if(!(yield o()))return;const i=pr("_pulse2data");return i?i.split(",")[9]:void 0}),gr=()=>{const e=pr("_pulse2data");return e?e.split(",")[2]:void 0},hr="splash",mr="welcomePage",yr="topscroller",fr="velvet",wr="takeover-displayed",br="takeover-visit-count",xr=14400,Er=()=>{const e=pr(br);return e?parseInt(e):0},kr=()=>{const e=Er(),{takeover:{options:{cookieCapTime:t=xr}={}}={}}=y.get(),n=document.location.hostname;window.document.cookie=`${br}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},Ar=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=y.get();return"0"!==I(S)&&("1"===I(S)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=y.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||wr;return"true"===pr(n)})())&&(!t||Cr()))},Cr=()=>{const e=Er();return 0===e?(kr(),!1):1===e},Ir=(e,t)=>[[1,1],[1920,1080]].some(([n,r])=>n===e&&r===t),Sr=()=>{const{takeover:e}=y.get();return Boolean(null==e?void 0:e.topscroller)},Tr=e=>{const{width:t,height:n}=e;return Ir(t,n)?hr:Me(e,we)?fr:Sr()?yr:mr},Or=()=>i(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=wr,cookieCapTime:n=xr}={}}={},pageContext:{isMobileApp:r,countryCode:o},tcf:i}=y.get(),a=yield $(i,r,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Pr=e=>{var t,n;const r=!!(null===(n=null===(t=y.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return Se(e)&&r},jr=(e,t)=>{var n;if(t===yr){const{topscroller:t}=e;return null!=t?t:{}}if(t===hr){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Lr=(e,t)=>{t!==hr?(e=>{var t,n;const r=null===(t=y.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=y.get().takeover)||void 0===n?void 0:n.topscroller;if(!r||o)return;const i=document.querySelector(r),a=document.querySelector(".welcome-page-wrapper"),s=document.querySelector(`#${e.targetId}`),d=document.querySelector(".advertory-welcome-page-scroll");if(!(i&&a&&d&&s))return;const l=null==i?void 0:i.offsetHeight,c=Te(e)?"60svh":`calc(100svh - ${l}px)`,u=Te(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=y.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),r=document.querySelector(`#${e.targetId}`);if(!n||!r)return;const o=`calc(100svh - ${n.offsetHeight}px)`;r.style.setProperty("height",o,"important")})(e)},Nr=He([],()=>{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 _r=Object.freeze({__proto__:null,addTakeoverCookie:Or,adjustTakeoverHeight:Lr,canDisplayTakeover:Ar,getProperWelcomePageConfig:jr,getTakeoverVariant:Tr,handleTakeoverCookieOnAdNotShown:e=>i(void 0,void 0,void 0,function*(){Pr(e)&&(yield Or())}),incrementArticleVisitCount:kr,isSplashVariant:Ir,isTopscroller:Sr,scaleAd:Nr,shouldAddTakeoverCookieForNotShownAd:Pr});const $r=e=>`externalImpId:'${e}'`,Dr=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:r}=y.get(),{targetId:o,sizes:i,keywords:a,allowedFormats:s,invCode:d,ssaNativeAdEnabled:l=!1,nativeCustomProperties:c,safeframeConfig:u,dynamicSizeWidthCheck:v=!1}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||Ar())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],r=Array.isArray(n)?n.filter(e=>e!==yr):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":r}),i=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:i,keywords:o})})(e),g=Object.assign({invCode:d,sizes:i,targetId:o,keywords:ur(a,l),allowedFormats:s,dynamicSizeWidthCheck:v},u&&{safeframeConfig:u}),h=(e=>{var t,n,r,o,i,a,s;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(r=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===r?void 0:r.pageViewId)?(p("Tracker state pageViewId is:",null===(i=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===i?void 0:i.pageViewId),null===(s=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===s?void 0:s.pageViewId):(p("Tracker state does not contain field pageViewId or it is empty"),""):(p("Tracker state is empty"),""):(p("Tracker is not configured in initAdvertory function"),"")})(r);n&&h&&(p("External Impression ID assigned to defineTag:",$r(h)),g.externalImpId=$r(h));const m=(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,r])=>((null==e?void 0:e.includes(n))&&(t[n]=r),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}}))(c);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(g.native=m),g},qr=e=>!e.includes("takeover")||Ar(),Mr=e=>{const{source:t}=e;return"csm"===t},Br={nativeAd:e=>Ce(e)&&!je(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:Ie,fullscreenScroll:Ae,topscroller:e=>Se(e)&&Sr(),splash:e=>Se(e)&&Ir(e.width,e.height),welcomePage:Se,wallpaper:Oe,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:De,hFormat:qe,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!qe(e)&&!De(e),topboard:e=>e.targetId.startsWith("topboard")&&!Se(e),widescreen:$e,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:je,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Ne(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!_e(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:Ne,midboard:_e},Fr=({adObj:e,preferredTestIdData:t})=>{var n,r;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const i=null===(r=document.querySelector(`#${o}`))||void 0===r?void 0:r.parentElement;if(!i)return;if(((e,t)=>{var n,r,o,i;const a=null===(i=null===(o=null===(r=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===r?void 0:r.tags)||void 0===o?void 0:o[e])||void 0===i?void 0:i.invCode;a&&(t.dataset.invCode=a)})(o,i),null==t?void 0:t.testId)return void(i.dataset.testid=t.testId);const a="DIV"===(null==i?void 0:i.tagName);e&&a&&((e,t)=>{var n,r;for(const[o,i]of Object.entries(Br))if(i(e)){if("nativeAd"===o){const i="default";t.dataset.testid=`${o}-${null!==(r=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==r?r:i}`;break}t.dataset.testid=o;break}})(e,i)},Rr=e=>{var t;return(null===(t=Object.entries(Br).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},Ur=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=y.get(),n=U(t),r=e[`${n}-targetid`],o=r?Tt(r[0]):"";return Object.assign(Object.assign({},e),r&&{[`${n}-targetid`]:[o]})},Vr=e=>{const{pageContext:{countryCode:t}}=y.get(),n=U(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"]})},zr=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 r=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===r),i=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);i&&i.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"})})()},Hr=(e,t)=>i(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});ot(".advertory-brandmetrics-survey{width:100%}");const Wr="advertory-brandmetrics-survey",Kr="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",Gr=()=>i(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,r)=>{var o;r||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),Jr={pageContext:{publisher:"aftonbladet",countryCode:P.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"}},Yr={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},Qr=e=>(null==e?void 0:e.parent)?[...Qr(e.parent),e.shortPath||"unknown"]:[],Xr=(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]=Qr(e);return Yr[n]||"ovrigaavdelningar"})(e)}_{position}`,Zr={aftonbladet:Jr},eo={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:Xr(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:Qr(e).join(":")}}},to=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},no=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),ro="se-generic",oo="aa-sch",io="kv_",ao="pause",so="{deviceType}",lo="{position}",co="afp_",uo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),po="1-1",vo="16-9",go="3-4",ho="9-16",mo="responsive",yo={[po]:1,[vo]:1.78,[ho]:.56,[mo]:1},fo={[po]:1,[vo]:1.78,[go]:1.33,[ho]:.56},wo=(e,t,n,r)=>{const{invCode:o="",videoOverlayInvCode:i}=null!=e?e:{},a=nn.DESKTOP===n?an:sn,s=o.replace(so,a);return(e,n)=>{if(e===ao)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(lo,ao).replace(/-([a-z]+)_/,"-article-"))(s);if(n&&uo.has(e)){return(r&&i?i:t.frontpageInvCodeTemplate).replace(so,a).replace(lo,e)}return s.replace(lo,e)}},bo=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[r,o])=>{const i=Math.abs(e[n]-t);return Math.abs(o-t)<i?r:n},n[0][0])},xo=()=>{var e,t;const n=jwplayer().getContainer(),r=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return r&&"number"==typeof r.offsetWidth&&"number"==typeof r.offsetHeight&&0!==r.offsetHeight?r.offsetWidth/r.offsetHeight:1},Eo=()=>{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},ko=()=>{const e=null!==(t=Eo()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Eo()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Ao=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Co=(e,t)=>i(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:r,countryCode:o}}=t,{width:i,height:a}={width:window.innerWidth,height:window.innerHeight},s={isMobileApp:e.isApp,countryCode:o,publisher:r,pageType:"front",deviceType:e.deviceType},d=(yield $(n,e.isApp,o,"video"))?"1":"0",l=yield Gr(),c=yield pe(o),u=yield vr({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)=>bo(fo,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?bo(yo,Number(m.toFixed(2))):mo;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${oo}-country_code`]:o,[`${oo}-publisher`]:r,[`${oo}-supply_type`]:(y=e.deviceType,y===nn.DESKTOP?rn:on),[`kw_${oo}-page_type`]:"collection",[`${oo}-page_type`]:"collection",[`${ro}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${ro}-page`]:"index",[`${ro}-page`]:"index",[`${ro}-screenheight`]:String(window.screen.height),[`${ro}-screenwidth`]:String(window.screen.width),[`${ro}-viewportheight`]:String(a),[`${ro}-viewportwidth`]:String(i),[`${ro}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${ro}-mobile-os`]:dn(),[`${ro}-audience`]:void 0,[`${ro}-externalid_src`]:ko(),[`${ro}-tags`]:e.tags,[`${ro}-articleid`]:p,"article-id":p},yield V(Object.assign(Object.assign({},t),{pageContext:s}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${ro}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Ao()).some(e=>e.includes(io))&&(()=>{const e=Ao(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(io)).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})}),Io=["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"],So=["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"],To=["external_uid","gdpr","gdpr_consent","eids","article-id"],Oo=(e,t)=>{const n=[...Io,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||To.includes(e)?e:`kw_${e}`,t]))},Po=e=>Object.fromEntries(Object.entries(e).filter(([e])=>So.includes(e))),jo=(e,t)=>i(void 0,void 0,void 0,function*(){var n,r,o,i;const a=(e=>{var t;Zr[e]||v(`[video] No config found for publisher "${e}"`);return null!==(t=Zr[e])&&void 0!==t?t:Jr})(e.publisher),s=(e=>{var t;return null!==(t=eo[e])&&void 0!==t?t:eo.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),d="/"===window.location.pathname,l=null===(r=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===r?void 0:r.toString(),c=e.assetId===l,u=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,p=c?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:s,isUserPresentOnFrontPage:d,adsKeywords:yield Co({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(i=null==s?void 0:s.sections)&&void 0!==i?i:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:d,isInitialVideo:c,instreamAspectRatio:u,playerAspectRatio:xo(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:p,playbackMethod:to(e.startMode)}}),Lo=(e,t)=>{const{siteConfig:n,siteVideoParams:r,isUserPresentOnFrontPage:o,adsKeywords:i,prerollPlacementFormat:a,playbackMethod:s}=e,{invCode:d}=r||{},l=wo(r,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(co)?`${co}${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":no.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({},Oo(i,n)),Po(i)),{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({},i),{"se-generic-adformat":c("pause")})}}}},No=e=>t=>i(void 0,void 0,void 0,function*(){const n=yield jo(e,t);return Lo(n,e)}),_o={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]}]},$o={no:"NOK",se:"SEK"},Do={no:"no",se:"sv"};class qo{buildFetchObject(e,t,n,r){return i(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:i}=r,{invCode:a,xandrPlacementId:s}=e,d=yield Gr(),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(_o),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:xt(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(i.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||Do[o]||"no").split("-")[0]},regs:{ext:{gdpr:d.gdpr||0}},user:{id:yield vr(r),ext:{consent:d.gdpr_consent||"",eids:ue(o)}},at:1,cur:[$o[o]],source:{tid:xt(36)},ext:{prebid:{bidder:{appnexus:{member:i.member}}}}}})}fetchData(e,t,n,r){return i(this,void 0,void 0,function*(){try{p("Starting fetching Studio ad from Xandr:",Kr);const o=new Headers({"Content-Type":"application/json"}),i=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=i.get(e);return t?[[e,t]]:[]})),s=a.size>0?`${Kr}?${a.toString()}`:Kr,d=yield this.buildFetchObject(e,t,n,r),l=yield J.post(s,o,d);return p("Fetch operation completed successfully.",l),l}catch(e){p("Error during fetch operation:",e)}return null})}}const Mo=0,Bo=3,Fo=(e,t,n,r)=>{const o=t.parentElement;if(!o)return;const i=e?`-${e}`:"",a=r?`__${r}`:"",s=`advertory${i}-${n}${a}`,d=`advertory${i}-${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},Ro="finn-blink",Uo="native-ad",Vo=(e,t)=>{zo(e,t),Wo(e,t)},zo=(e,t)=>{var n,r;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const i=null!==(r=null==t?void 0:t.clickLinkSelector)&&void 0!==r?r:"a.ad-link";(null==o?void 0:o.querySelectorAll(i)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const r of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Go(r)}),t.dataset.tracked="true")})},Ho=e=>{var t;const{native:{impressionTrackers:n}={}}=e,r=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;r||!o?null==n||n.forEach(Ko):window.apntag.fireImpressionTrackers(e);const i=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(i)},Wo=(e,t)=>{var n;let r=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:i,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:s=!1}={}}=t,d=s?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=i?i:nn.DESKTOP])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!r)for(const n of t)if(n.isIntersecting){r=!0,Ho(e),c.disconnect();break}},d);c.observe(o)},Ko=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Go(e):window.navigator.sendBeacon(e)},Go=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Jo=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:[]}),Yo=(e,t)=>i(void 0,void 0,void 0,function*(){var n,r;const{pageContext:{deviceType:o},appearanceConfig:i}=t,a=null==i?void 0:i.defaultThreshold[o],s=null!==(n=e.requestThreshold)&&void 0!==n?n:a,d=document.getElementById(e.targetId);if(!d)return void p(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},Vn(s)).observe(d)});const{prepareTag:l}=y.getHandlers(),c=b.getData("alertoryConfigKeywords"),u=null!==(r=l(Dr(e)).keywords)&&void 0!==r?r:{},v=new qo,g=yield v.fetchData(e,c,u,t);g&&(((e,t,n)=>{const r=n===nn.MOBILE?t.mobileHTML:t.desktopHTML;if(r){if(t.adType===Mo){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>${r}`,e.appendChild(n)}else e.innerHTML=r;e.classList.add("ad-loaded")}})(d,g,o),g.adType===Bo&&(Fo(t.pageContext.publisher,d,Uo,t.pageContext.pageType),Vo({targetId:e.targetId,native:{clickTrackers:g.clickTrackers,impressionTrackers:g.impTrackers}},{deviceType:o,appearanceConfig:i,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,r)=>{var o,i,a;let s;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(i=(a=window.apntag).requests)&&void 0!==i||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==r?void 0:r.adid)}]}}),!!n.querySelector("iframe")||(s=document.createElement("iframe"),n.appendChild(s)),ht(e,n,Number(null==r?void 0:r.adid)),null==s||s.remove()})(e.targetId,e.invCode,d,g.bid))}),Qo=(e,t)=>{e.forEach(e=>Yo(e,t).catch(e=>{p("Failed to handle server-side ad:",e)}))},Xo={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},Zo=e=>i(void 0,void 0,void 0,function*(){if(!(e=>{const{editableConfiguration:{useS3Config:t=!1,pageTypeToFetch:n}={},siteSpecificConfig:r}=e;return Boolean(t&&n&&(null==r?void 0:r.publisherClassName))})(e))return e;try{const t=yield(e=>i(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editableConfiguration:{pageTypeToFetch:n}={}}=e;return(null==t?void 0:t.publisherClassName)&&n?`https://alertory-cdn.staging.inventory.schibsted.io/editable-configurations/${t.publisherClassName}/${n.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,r=setTimeout(()=>n.abort(),5e3);try{return yield J.get(t,{method:"GET",signal:n.signal})}catch(e){throw p("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(r)}}))(e);return t?((e,t)=>l(t,e,Xo))(e,t):e}catch(t){return p("Error fetching S3 config, using site config",{error:t}),e}}),ei=(e,t)=>{const{pageContext:{isMobileApp:n}}=y.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let ti,ni=[];const ri=["takeover","wallpaper"],oi=e=>{const t=(e=>{var t;const n=b.getData("alertoryConfigKeywords"),{queryConfig:r,placements:o,tcf:i,glimr:a,appearanceConfig:s,pageContext:{publisher:d,countryCode:l,pageType:c,deviceType:u,isMobileApp:p=!1},pageOptions:{member:v},pageSetup:g,takeover:m,fullscreenScroll:y}=e,f=null!==(t=null==r?void 0:r.batchSize)&&void 0!==t?t:h;return{xandr:{member:v,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:d,countryCode:l,pageType:c,deviceType:u,isMobileApp:p},pageSetup:g,placements:o,tcf:i,queryConfig:Object.assign(Object.assign({},r),{batchSize:f})},a&&{glimr:a}),s&&{appearanceConfig:s}),m&&{takeover:m}),y&&{fullscreenScroll:y})}})(e);window.advertory={initialized:!0,version:"3.0.9",siteConfig:e,alertoryConfig:t}},ii=()=>i(void 0,void 0,void 0,function*(){const{pageOptions:e}=y.get(),{preparePageOptions:t}=y.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=y.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"]}})(),r=yield i(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=y.get();return(yield $(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)}),r));(e=>{const t=b.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Vr(e);b.setData("alertoryConfigKeywords",n)})(o.keywords),Et(()=>ti.setPageOpts(o))}),ai=e=>i(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:r,countryCode:o}}=y.get(),i=yield $(n,r,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>Bt(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,i);si(a);(null==t?void 0:t.enabled)&&i&&!yt()?(p("core loadPlacements prebid enabled"),yield ft()):(p("core load tags invoked without prebid enabled"),di(a))}),si=e=>{const{prepareTag:t}=y.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const r=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==r&&-1===o?-1:-1===r&&-1!==o?1:r-o})})(e).forEach(e=>{p("core defineTags",{placement:e});const r=Dr(e);if(qr(e.targetId)){const o=t(r),i=(e=>{const{allowedFormats:t,invCode:n,keywords:r,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Ur(r),sizes:o}})(o);n.push(i),Et(()=>(p("core defineTag - add to the queue",{placement:e,preparedTag:o}),ti.defineTag(o)))}}),(e=>{var t,n,r;(null===(r=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===r?void 0:r.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},di=e=>{const t=e.filter(({targetId:e})=>qr(e)).map(({targetId:e})=>e);t.length&&Et(()=>(p("core loadTags",{placementsIdsToLoad:t}),ti.loadTags([...t])))},li=(e,t)=>i(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:r}}=y.get(),{requestThreshold:o,refresh:i}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),s=null==n?void 0:n.defaultThreshold[r];a&&(p("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:s}),yield Wn(a,null!=o?o:s)),a&&(null==i?void 0:i.scroll)&&(p("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=i.scroll.toString())}),ci=e=>e.some(({targetId:e})=>ri.some(t=>e.includes(t))),ui=e=>i(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,r]=(e=>e.reduce(([e,t],n)=>{var r;return(null===(r=null==n?void 0:n.finnBlink)||void 0===r?void 0:r.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=h}={},pageContext:{deviceType:r}}=y.get(),o=Jt(e),i=Object.keys((null==t?void 0:t[r])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(i.flat().map(({targetId:e})=>e)),s=e.filter(({targetId:e})=>!a.has(e));return[...i,...nr(s,n)]})(r);for(const e of o)ci(e)?(p("core loadAds without lazy loading",{placementsToLoad:e}),yield ai(e)):e.length&&(p("core loadAds with lazy loading",{placementsToLoad:e}),yield pi(e));const{finnBlink:i}=y.get();if((null==i?void 0:i.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ha});yield e(n)}}),pi=e=>i(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=y.get(),r=[];if(!t)return p("lazy load is not enabled",{placements:e}),void(yield ai(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{p("lazy load is enabled - handler start",{loadedTargetIds:r,placements:e});const o=e.every(e=>r.includes(e.targetId)),i=e.map(e=>e.targetId);!o&&r.push(...i),!o&&ai(e),p("lazy load is enabled - handler stop",{loadedTargetIds:r,placements:e,arePlacementsLoaded:o,targetIds:i}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(p("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),vi=()=>i(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=y.getHandlers(),{wallpaper:n,fullscreenScroll:r}=y.get(),o=[];Et(()=>{ti.onEvent("adRequested",()=>{e.adRequested()}),ti.onEvent("adAvailable",o=>i(void 0,void 0,void 0,function*(){var i,a,s,d,l,c;p("core adAvailable start",{placementsAvailable:ni,adObj:o,isFullscreenScrollAd:Ae(o),isFinnBlink:Le(o.targetId),isNativeAd:Ce(o),isMediation:Mr(o),isTakeoverAd:Se(o),isCollapseAd:Pe(o),isWallpaperAd:Oe(o)});const u=null===(s=null===(a=null===(i=null===window||void 0===window?void 0:window.apntag)||void 0===i?void 0:i.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===s?void 0:s.adResponse.ads;if(Mr(o)&&u&&(null===(d=u[1])||void 0===d?void 0:d.rtb)&&(o.banner=null===(c=null===(l=u[1])||void 0===l?void 0:l.rtb)||void 0===c?void 0:c.banner),Ae(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return vt});e(o)}const{widescreenSwitching:v}=y.get();if($e(o)&&(null==v?void 0:v.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return wa});e()}if(Ae(o)&&!Le(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return vt});e(o,r)}if(!Ce(o)||Mr(o)||Le(o.targetId)||null==t||t(o,y.get()),Se(o)&&!Pe(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return qa});e(o.targetId),yield t(o)}if(Oe(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return Mt});e(()=>Et(()=>window.apntag.showTag(o.targetId)),n),b.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&b.setData("horseshoe",{isAvailable:!0}),Fr({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const r=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;r&&((e,t)=>{const{height:n,width:r,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&r&&(t.dataset.adSizes=`[${r},${n}]`)})(e,r)})(o),e.adAvailable(o);const g=ni.find(({targetId:e})=>e===o.targetId);g&&(yield li(g,o),ni=ni.filter(e=>e.targetId!==g.targetId)),p("core adAvailable stop",{placementsAvailable:ni,adObj:o,isFullscreenScrollAd:Ae(o),isFinnBlink:Le(o.targetId),isNativeAd:Ce(o),isMediation:Mr(o),isTakeoverAd:Se(o),isCollapseAd:Pe(o),isWallpaperAd:Oe(o)})})),ti.onEvent("adLoaded",n=>i(void 0,void 0,void 0,function*(){const{refreshConfig:r,appearanceConfig:i,wallpaper:a,adScaleConfig:s}=y.get(),d=document.getElementById(n.targetId);if(Le(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return oa});e(n)}if(o.includes(n.targetId)&&Ce(n)&&(null==t||t(n,y.get()),Fr({adObj:n})),!o.includes(n.targetId)&&Mr(n)&&o.push(n.targetId),Pe(n)&&Bt(n.targetId),Se(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return qa});e(ti,n.targetId)}if(Ie(n)){const{prepareContainerForFullWidthFormat:e}=yield Promise.resolve().then(function(){return Ua});e(n)}if((e=>Me(e,me))(n)){const{scaleVerticalFullWidthAd:e}=yield Promise.resolve().then(function(){return Ua});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,r=document.querySelector(`#${n}`),o=null==r?void 0:r.parentElement;if(!o||!r)return;Zn({adWrapper:o,placementContainer:r});const{delayTimeToNextRefresh:i=1e3}=t,a=(new Date).getTime();r&&"true"!==r.dataset.subscribedForRefresh&&(r.dataset.subscribedForRefresh="true",r.dataset.refresh&&tr(r,a,i))})(n,r),(null==i?void 0:i.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(b.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return Mt});e(n.targetId)}if(null==s?void 0:s.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return Ra});e(n),t(n)}e.adLoaded(n),gt(n.targetId),d&&(d.classList.add(mt),(e=>{var t,n;const{pageSectionsSelectors:r}=y.get(),o=null==r?void 0:r.mainFirstColumn,i=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;i&&e.clientWidth>i&&(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:Rr(n)}}))})),ti.onEvent("adNoBid",t=>i(void 0,void 0,void 0,function*(){var n;if(Bt(t.targetId),null===(n=y.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return Ln});yield e(y.get(),t)}if(Se(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return _r});yield e(t)}e.adNoBid(t)})),ti.onEvent("adError",(t,n)=>i(void 0,void 0,void 0,function*(){if(Se(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return _r});yield e(n)}e.adError(t,n)})),ti.onEvent("adCollapse",()=>{e.adCollapse()}),ti.onEvent("adRequestFailure",t=>i(void 0,void 0,void 0,function*(){Bt(t.targetId),yield Pn(y.get(),t),e.adRequestFailure(t)})),ti.onEvent("adBadRequest",t=>i(void 0,void 0,void 0,function*(){Bt(t.targetId),yield Pn(y.get(),t),e.adBadRequest(t)})),ti.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),ti.onEvent("adNoBidMediated",t=>i(void 0,void 0,void 0,function*(){yield Pn(y.get(),t),e.adNoBidMediated(t)}))})}),gi=(e,t)=>i(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:r,reloadExistingAds:o,renderFinnBlinkPlacements:i,contextSelector:a}=null!=t?t:{};if(r)return Vt(),[];o&&(Vt(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{Ft(e.id)})),f(null!=e?e:{}),yield ii();const{clientSidePlacements:s,serverSidePlacements:d}=Jo(Kt(a));let l=s;return i&&(l=l.filter(e=>Le(e.targetId))),Qo(d,y.get()),l.length>0&&(ni=[...ni,...l.map(e=>Object.assign({},e))],ir(l),sr(l),yield ui(l)),ni}),hi=(e,t)=>i(void 0,void 0,void 0,function*(){y.set(e),y.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:n,kilkaya:r,rightColumnSplit:o,drEdition:a,finnBlink:s}=e;if(b.initialize(),window.addEventListener("message",Un,!1),ti=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=ti,p("Apn tag is set up on window"),yield Promise.allSettled([i(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=y.get();(yield $(e,t,n,"xandr-endpoint"))||ti.setEndpoint("ib.adnxs-simple.com",!0)}),i(void 0,void 0,void 0,function*(){if(yt())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:r}}=y.get(),o=yield $(t,n,r,"prebid");(null==e?void 0:e.enabled)&&o&&(yield ve(null==e?void 0:e.prebidUrl))}),se(e),i(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=y.get();yield ve(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),i(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:r}}=y.get();(yield $(t,n,r,"gpt-endpoint"))&&(yield ve(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),i(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:r,countryCode:o}}=y.get(),{getConsentAsync:i}=_(n,0,o),a=yield i();if(e&&t&&a){if(yield ve(t),document.querySelector(`.${Wr}`))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(Wr)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),q(),i(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=y.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield ve(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==n?void 0:n.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return za});yield e()}p("Libraries have been loaded and trackers have been set"),yield vi(),yield ii(),p("Page options have been set"),oi(e),p("Advertory is setup on window");const{clientSidePlacements:d,serverSidePlacements:l}=Jo(Kt());if(ni=d,Qo(l,e),ir(ni),sr(ni),yield ui(ni),p("Ads has been loaded",ni),jn(e,ni),zr(ni),null==s?void 0:s.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ha});yield t(e.finnBlink)}if(null==a?void 0:a.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return Ln});yield t(e)}if(null==o?void 0:o.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Za});t(e.rightColumnSplit)}if(null==r?void 0:r.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return ss});yield t(e)}}),mi=(e,t)=>i(void 0,void 0,void 0,function*(){yield((e,t)=>i(void 0,void 0,void 0,function*(){var n,r;const{initConsentManager:o,getConsentAsync:i}=_(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(r=e.pageContext)||void 0===r?void 0:r.countryCode),a=yield Zo(e);yield Sn(),yield Hr(o),yield Hr(i),p("TCF resolved successfully"),yield hi(a,t),p("Run function resolved successfully")}))(e,t)}),yi=(e,t,n,r)=>{var o;const{image:i,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:x}=e,E=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:E(i),imgWidth:null==i?void 0:i.width,imgHeight:null==i?void 0:i.height,imgAltText:null!=d?d:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=r.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return E(t?w:a)})(),sponsoredBy:null!=s?s:"",title:null!=d?d:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:E(b),previewVideoSrc:null!=x?x:""},t)},fi=(e,t)=>{const n=(r=T,window.location.href.includes(r));var r;const o=new URLSearchParams(window.location.search).get(T),i=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?i?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},wi=(e,t,r,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const r=e.parentElement,{publisher:o,pageType:i}=t,a=o&&Object.values(n).includes(o);r&&a&&Fo(o,e,Uo,i)})(i,r),o())},bi=(e,t,n)=>{const r=((e,t,n)=>{var r;const{displayTemplates:o,videoTemplates:i}=n,a="default";if(!e.native)return null;const{native:s,targetId:d}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(r=fi(e.targetId,l))&&void 0!==r?r:c,p=at[t.language||P.NO],v=yi(s,p,d,t);return(s.video?i[u]:o[u]||o.default)(v,t)})(e,t,n);wi(e.targetId,r,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&Vo(e,t)})},xi=e=>(t,n)=>{var r;const{targetId:o}=t,i=document.querySelector(`#${o}`);if(!i)return;const a=e.getOptions(null!=n?n:{});bi(t,a,e.templates),null===(r=e.postProcess)||void 0===r||r.call(e,t,i)},Ei=e=>{const{pageContext:{countryCode:t}}=y.get(),{keywords:n,dynamicSizeWidthCheck:r}=e,o=`${U(t)}-adformat`,i=n?n[o]:[];if(!i)return{};const a=(Array.isArray(i)?i:[i]).filter(e=>!(e in ke)||window.innerWidth>=ke[e]);return{[o]:r?a:i}},ki=e=>{const{pageContext:{countryCode:t}}=y.get(),n=`${U(t)}-targetid`;return e?{[n]:[e]}:{}},Ai=()=>{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},Ci=e=>{const{siteSpecificConfig:t}=y.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},Ii=(e,t)=>Ci(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},Si=e=>Ci(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class Ti{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return i(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 i(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Oi=9826;class Pi{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e=nn.DESKTOP,isMobileApp:t}}=y.get();if(t){return{"aa-sch-supply_type":`app_${e===nn.MOBILE?"phone":nn.TABLET}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return i(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 i(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 gr()}getExternalUid(){return i(this,void 0,void 0,function*(){return yield vr(y.get())})}isTrackingForbidden(){return i(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=Oi}={}}=y.get();return"true"===I("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=y.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return i(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=y.get(),{getConsentAsync:r}=_(e,0,n);return{"aa-sch-cmp_advertising":(yield r())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=y.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 ji=new Pi,Li=ji.prepare.bind(ji);function Ni(e=!1){var t,n;const r=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=dn();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:r.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const _i=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function $i(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",_i.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Di extends Pi{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=nn.DESKTOP}}=y.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=y.get(),{OS:n,isHybridApp:r}=Ni(t);return{"no-sno-apptype":n&&e&&r?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return $i(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:r}}=y.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"===r?"article":"front"}`}}}const qi=new class extends Di{prepare(e){return i(this,void 0,void 0,function*(){var t,n,r,o,i,a,s;const d=y.get(),l=null!==(r=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==r?r:{},c=null!==(a=null===(i=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===i?void 0:i.keywords)&&void 0!==a?a:{},u=null===(s=d.siteSpecificConfig)||void 0===s?void 0:s.publisherClassName,p=new Ti;yield p.addAsync(this.getAdvertisingConsentKeywords()),yield p.addAsync(V(y.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield p.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),p.add(this.getSupplyTypeKeywords()).add(le()).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 v=p.build(),g=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:v,user:Object.assign(Object.assign({},de(P.NO)),g?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Mi=qi.prepare.bind(qi);class Bi extends Pi{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=nn.DESKTOP}}=y.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,r=document.documentElement.clientHeight;return{width:e||n||0,height:t||r||0}}(),t={width:null!==(r=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==r?r:0,height:null!==(i=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==i?i:0};var n,r,o,i;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return i(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}}=y.get(),{appMode:t,mobileOS:n}=Ni(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:r}}=y.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"===r?"article":"front"}`}}}const Fi=new class extends Bi{prepare(e){return i(this,void 0,void 0,function*(){var t,n,r,o,a,s;const d=y.get(),l=null!==(r=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==r?r:{},c=null!==(s=null===(a=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===a?void 0:a.keywords)&&void 0!==s?s:{},u=new Ti;yield u.addAsync(this.getAdvertisingConsentKeywords()),yield u.addAsync(V(y.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield u.addIfAsync(c.externalIdSrc,()=>this.getExternalIdSrc()),yield u.addIfAsync(c.sdkVersion,()=>i(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),u.add(this.getSupplyTypeKeywords()).add(le()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.screen,this.getScreenKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).addIf(c.hasPlusMembership,{"se-generic-has_plus":"plus"===pr("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const p=u.build(),v=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:p,user:Object.assign(Object.assign({},de(P.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Ri=Fi.prepare.bind(Fi);ot(".advertory-splash-navbar-wrapper{width:100%;border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.advertory-splash-navbar-wrapper .advertory-splash-navbar{display:flex;justify-content:space-between;align-items:center;width:100%;margin:0 auto;padding:14px;cursor:default}@media screen and (min-width: 600px){.advertory-splash-navbar-wrapper .advertory-splash-navbar{padding:24px 30px}}@keyframes elementsAnimation{0%{opacity:0;pointer-events:none;cursor:default}95%{opacity:0;pointer-events:none;cursor:default}100%{opacity:1;pointer-events:all;cursor:pointer}}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-logo{display:block;height:18px;width:fit-content}@media screen and (min-width: 600px){.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-logo{height:26px}}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-close{display:flex;align-items:center;gap:8px;font-family:Arial,Helvetica,Verdana,Geneva,sans-serif;font-size:14px;line-height:20px;animation:elementsAnimation 1.5s linear;cursor:pointer}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-close:hover{text-decoration:underline}");const Ui=()=>e.jsx("div",{role:"button",tabIndex:1,"data-testid":"advertory-splash-navbar-wrapper",className:"advertory-splash-navbar-wrapper",style:{display:"none"},children:e.jsxs("div",{className:"advertory-splash-navbar",children:[e.jsx("img",{id:"advertory-splash-logotype",className:"advertory-splash-logo",width:"250",height:"30"}),e.jsx("div",{className:"advertory-splash-close","data-testid":"advertory-splash-close",children:e.jsx("span",{id:"advertory-splash-close-label"})})]})});var Vi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAYAAADjVADoAAAAAXNSR0IArs4c6QAAAtZJREFUeAHd3EFuwjAQBVDUbZeIM7DqUWANZ0PiDiy4D0JVu4BlpapVK/p/qpEgEGJjezJjS6NAoI3n4Uwg4IxGaKfTaYJYI/aIA2KDmPKxmhpyekFsEUfEDrFCjJsccYMI74h2+8SKeS0QyGWJ+GonifuviDFHA0dCV/vGA+4xkMMC8dOVJNavCMHd4V5zjYHE+hCY+44QrAl9zSUGkgpBYO5HQrAwhjRXGEiINeHe7nCe85YQUwQLY0hzgYFEQkcCc2YBfZEjxxx3mGRIM42BBGIQOGIWF0dGrIjBoKK5o0kygoh4xsiG4BkjO4JHjGIInjCKI7Qwbr0/Rx+ummoBxdbTjg6SZOgSG+TRxBSGOoJgWcIYDMESxuAIFjCAsESEfna4fscoSeRaojPqNcMcgmBqYphF0MQwj6CB4QahJIY7hBIYDyAspR8mlkgg+WjiHkFeiRSMahBSMKpDeBCD50Bj3jHaqgmSdNcycjfB03sbsXwhCA46HlNA70n4RciI4R8hA0Y9CC2M0C+RuJuoIjxJRxWWz9hGzPZ+8fwPhX7pbQKvbsxJlfOiyXOlM72eFtxSAoKA+MfIgOAfIyOCX4xIBB4dOPxDmp/dBNksEUwupDWHSDxxhqgHA8lEI0idrgYjBaEajBwI7jFyIrjFKIHgDqMkghsMDYQEDJ1f+2kimMUYAsEcxpAIZjAsIAyOYQnhDCPm7Dg/w6QVUIsI6hiWEdQwPCAUx/CEUAwDCLE/6zXzXST6nqeAekbINjJqQEjGAAKnCYeeL1T9Gk6Si10in5jdhBP7ppzlx7nSIY0IlxPBYnuo+Hz0NQZjQwhOGO9rLkZC2xlJhWIcCLHrUXA1Eh7E2BOClw7oaq4RBAXJ9Y2MNSHGCF46oN1YQN3UBEm6a4lciHFrxvMb1k+av8MNYnBkcDdhzWAB/Z8m3PWfHa5HTpz+zbnwvDAAr5LAS0Y0CH9NGDAEswYjMgAAAABJRU5ErkJggg==",zi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAAAAXNSR0IArs4c6QAACT5JREFUeAHtnc1vFlUUximICbLAmoAuSCw7IlsghEQpJWGhEaksJbZdskDSP4Ck6T9AQPcE1I2JEjS6UosbEvzYKbpSWAku+EgEo4nB3wNv67zT+Z5zP97pnOTJOzP33nOec8503pnz3rldt66XtRWBR48ebQcnwLNry/Pq3io2gxhtrz7KQU9I7Aa/A8l1MOHAzEirJCY7wM9AoljtDuIQho+AP0FSbrGzJwihCI0Si73gdjJAbCtmR7zSxeBJ8C/IkgccPOqVUITGFAPwMCtAHFPsTjqnjZH14AwoExE65ZxQpAbkO8g7oZOxUyzXO3EDxZvApaS1Ctvn6OOGkBMv2ymVr0A+1xHFdFM7y6nRKNwGrtVhkeh7me1nUio7tysfgXxtIortNpOgoGgn+LUJi8SY79h+wYRQhErkG5CPbUQx3tnKPRRMgjttWCTG3mD7pVaEIhwsn4B8sxDFerKRmww8Dv62YJHQcZftqUaEIhwkX8C9hH8Wm4r58VruMuC0heUcHf9wfKYWoQg7ywcgX1zJ6VK3sbwRnHfFIKV3oZRQpB3wYyHli6vd8yjemBkGGraAL4FPuYixpzMJRXhQXIE4+xTlZMtQODiwFfzok0XC1hLb0ReO4TgOxDWEKDfPKWnLD7Uvs71rKIv+diYxdRVCE/5M1rM04HaVUZP1Rpr1Vm4OrmiD0FPA9586JockysIxDLMKuEPEPewoN6u/yzi46MF4kQkVjt9YOZMCb8BFBVxxCimLhWGA2Qxwebta5nwUhWNIngJVCrhl/jRtVw6qPf7QcQpYPxDWJX6WAcvfsYUnmWWjbIK6Bdy6vpX1V+ynavnFAMuSSxnBvHavhWNItCng5vlQ93jzEh6WLIqadQmn+6uo+nyts61B54h8bVckx5HRPusqJA8fu3U1waEYrusqHP//LFIhEVW6oFPf19IdUtz80ItH8yD0ndPbVRJRpQ++zIDQd8TzVbg27oODMTybLDR2YDAQP3wVcDGVKf4mK2E+hqf/C/BY/fRfkknGhCjgpjOmqW97S6jaNmMwOUEyTcjX/tcYqlw4Vl+wBEKKJpXusM1GRW0YDlnBXg76dTYmyiirD1DfkLKE8fEyrk7bIaBLzPsgpBQWjiG2B6hPSFGM4vntDzKLIaOB7czCMcdjuEkqLuA6/ZMqUE5wZkHo2+SVGcdwiaGAO1sQstpNY7VHlAwgSIfo8jEY/lm7ZJxx87mBvneM9dZRd5/Ox8bGxr6qM6isr3nCZJCk6RfSz8GL2l+DchOfXyNZP1n77uTniwHRfZD9wZrwCOiTz/tcJEu+O0mYFEP4Fh8HwGfaXyMiXw8MfHfisrOEiS3EH/Chd8Xe037HRT4eHfg8+q7yvRa6cAwFJ6JiuNsCbiL9Tm46EvqHNnFsmgMfAtv3oYaseN35C2tv8Vd1yZdVrwmTUyRNRU9d623eh5LSMPIHZl8nWd/6NO89YXKOpO3g4wvQ7n0oKQsjv2D2VZL1m2/zTm868pwZOLqf9m/y+kR8XJz3h0iWYhIkYTKMw3f5OAw+0P6IiLgeHnAfEcoOaHKJDF04hkKpLDpwfXRVEq7QheO8jKmYPTu6kXXInMAcApr1GouIi4rZveRFgADtAjcjyJg4hHoFKy887Y/j1HZwAlSeW1FmFV2acfw9CCWy3W4GbsJJdGkuiWLU3dXccG4z+BT4FtncnIh3q010JScrdXs1N5zdAN4FvkS2NrTKUGIwurKmA3Z/NTccd104Ni/gwllzSR6CLJG9bq/mhoPTIC8AWUGpekw6VZQ2E/RVnUtyhr5uihco3gQugTpiOskfw1mXmDp80n1NZ+CivMlLI4qp7a8XKNwGroEmcplBZqu5oSv5Jd6Ez/IY0xm48hHI1yai2Nr8eoGi6FZzg9M4uAKaisaOW10D0WXx4mO3V3MjSE1nHJvOwIWH5cuA3V/NjYDVKRybFnCxPQWsS2ndX82NoM2BohnHapuzugRKD/pmSmzS3Eq6vZobockrHJsXcLG10CoV1Qefp2v2O3A0bAEjvZob/NOFY9MCLvpDvAw4tJrb2ODPeyufSyBEdfoKdqf5Ffcen62FoGqJiGNAJaaP0Hu7tVIUoFd3lZ+ASeBbNOX7FXy589gwZN4EIeU6xid8R6GqPXEDy/+OI1ScdBI+ERj0q7ktByP1SWysqytNEn6RQau/yzhY5xa5ieGyMZkv5aVi6G0XsirgilNIKX4UgdkMKLpFdk1eleyVl/K8ZSdlSByAuIQS5WAmRSt7l44uHgjrOn6WAW4q2dluPz4qm0BF65CiR5GpApqrmxhgWXJp6rxp4Xi1l8NHINmmgNvUx/S4Gxxo9g8ZGGhR1EwTqrvfr+Y2fF4V7xHd0T7rit173IqP3bqa4FAM1/W78DhYIf61uqBT39fSHVJMf+hdCQAezYPQd079am4rGamwQcJieDZZqEC1sAt++CrgYipT9Hyn14ndC4ZiePq/AI/VT/8l7jMmRAEXs0NiOpekxOUnzZi3mlsx5EnNnX41t0rZGnQiuJpbsVQzyNbdKxWOMaoCrvqGlCWMm80lqZOrlb4QaDq3wjJw/WpuKxmpuEH0Fy0z0EBXZuEYPTHcJBUXcCvG2LwbwZkF0RSO4RJDAXfWMtCPf3G2VEiQ+tXcngT0Ph/9am6WJ5dDXTfR3a/m5jDAlqr71dwso+lYV7+am+MAW6rvV3PjBmYURMXwecvMF+kyv0ssMoZj07T3q7kVBamkzWvCxIWk9au5lSSlqNl7wgZJ28Fnv5pbUWZy2rzPShIPphxr2bp+NbecpBQdDpIwESJp/WpuRZmJuY3vtdCFYyiUSpwF3FCJJVyhC8d5GVMxezZUXKK2S2DyXsrLC6br45qB26/mVnTWEKD0S3muk5Kn3/RlwCKfR76NCHZqNbeRT0gVB0haJ1Zzq+JrZ/qQtJFeza0ziajrCIlzPePYawG3rv8j2Z+kTYOHwFqkU0XpXqwjQGD3As2atRL/M3CtgxK7PjJlNePYdDW32OMWlB9J04zjKy3+zDR2PKgTa804AW8649h0Nbe1FvfW/pK4OoXjvoDbOuIGCkjaHCiacay2OQNTvQqrCJCQvMJxX8C1CrK1HpKWLhx3roAbZE6HdaKS+kiak9Xckjb67T4ClSPwH3Dy/EjlG8AUAAAAAElFTkSuQmCC";ot(".advertory-welcome-page-close{padding:0;background:none;border:none;z-index:1;position:fixed;top:42px;left:16px;color:#fff;cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-welcome-page-close .advertory-welcome-page-close-image{width:22px;height:22px}@media screen and (min-width: 736px){.advertory-welcome-page-close .advertory-welcome-page-close-image{width:28px;height:28px}}.advertory-welcome-page-scroll{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:18px;text-shadow:0 2px 5px rgba(0,0,0,.2);text-align:center;position:absolute;max-width:100%;z-index:1000;left:50%;transform:translate(-50%);cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-welcome-page-scroll .advertory-welcome-page-scroll-image{width:26px;height:26px;margin-top:19px}@media screen and (min-width: 736px){.advertory-welcome-page-scroll{font-size:calc(24px + 2*(100vw - 736px)/514)}.advertory-welcome-page-scroll .advertory-welcome-page-scroll-image{width:54px;height:54px;margin-top:22px}}");const Hi=()=>e.jsxs(e.Fragment,{children:[e.jsx(()=>e.jsx("div",{style:{display:"none"},className:"advertory-welcome-page-elements advertory-welcome-page-close smooth-close-takeover","data-testid":"welcome-page-close-button",children:e.jsx("img",{className:"advertory-welcome-page-close-image",src:Vi,alt:"Stäng annonsen",width:"28",height:"28"})}),{}),e.jsx(()=>e.jsxs("div",{style:{display:"none"},className:"advertory-welcome-page-elements advertory-welcome-page-scroll smooth-close-takeover","data-testid":"welcome-page-arrow-icon",children:[e.jsx("span",{id:"advertory-welcome-page-scroll-label"}),e.jsx("img",{className:"advertory-welcome-page-scroll-image",id:"advertory-welcome-page-scroll-image",src:zi,width:"54",height:"54"})]}),{})]});ot(".advertory-topscroller-close{padding:0;background:none;border:none;z-index:1;position:fixed;top:42px;left:16px;color:#fff;cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-topscroller-close img{width:22px;height:22px}@media screen and (min-width: 736px){.advertory-topscroller-close img{width:28px;height:28px}}.advertory-topscroller-scroll{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:18px;text-shadow:0 2px 5px rgba(0,0,0,.2);position:absolute;max-width:100%;text-align:center;z-index:1000;left:50%;transform:translate(-50%);cursor:pointer;top:50vh;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-topscroller-scroll img{width:26px;height:26px;margin-top:19px}@media screen and (min-width: 736px){.advertory-topscroller-scroll{font-size:calc(24px + 2*(100vw - 736px)/514);top:55vh}.advertory-topscroller-scroll img{width:54px;height:54px;margin-top:22px}}@media screen and (min-height: 836px){.advertory-topscroller-scroll{top:50vh !important}}");const Wi=()=>e.jsxs(e.Fragment,{children:[e.jsx(()=>e.jsx("div",{style:{display:"none"},className:"advertory-topscroller-elements advertory-topscroller-close smooth-close-takeover","data-testid":"topscroller-close-button",children:e.jsx("img",{src:Vi,alt:"Stäng annonsen",width:"28",height:"28"})}),{}),e.jsx(()=>e.jsxs("div",{style:{display:"none"},className:"advertory-topscroller-elements advertory-topscroller-scroll smooth-close-takeover","data-testid":"topscroller-arrow-icon",children:[e.jsx("span",{id:"advertory-topscroller-scroll-label"}),e.jsx("img",{id:"advertory-topscroller-scroll-image",src:zi,width:"54",height:"54"})]}),{})]});ot(".advertory-splash-navbar-wrapper{width:100%;border-bottom-right-radius:0 !important;border-bottom-left-radius:0 !important}.advertory-splash-navbar-wrapper .advertory-splash-navbar{display:flex;justify-content:space-between;align-items:center;width:100%;margin:0 auto;padding:14px;cursor:default}@media screen and (min-width: 600px){.advertory-splash-navbar-wrapper .advertory-splash-navbar{padding:24px 30px}}@keyframes elementsAnimation{0%{opacity:0;pointer-events:none;cursor:default}95%{opacity:0;pointer-events:none;cursor:default}100%{opacity:1;pointer-events:all;cursor:pointer}}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-logo{display:block;height:18px;width:fit-content}@media screen and (min-width: 600px){.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-logo{height:26px}}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-close{display:flex;align-items:center;gap:8px;font-family:Arial,Helvetica,Verdana,Geneva,sans-serif;font-size:14px;line-height:20px;animation:elementsAnimation 1.5s linear;cursor:pointer}.advertory-splash-navbar-wrapper .advertory-splash-navbar .advertory-splash-close:hover{text-decoration:underline}.advertory-welcome-page-close{padding:0;background:none;border:none;z-index:1;position:fixed;top:42px;left:16px;color:#fff;cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-welcome-page-close .advertory-welcome-page-close-image{width:22px;height:22px}@media screen and (min-width: 736px){.advertory-welcome-page-close .advertory-welcome-page-close-image{width:28px;height:28px}}.advertory-welcome-page-scroll{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:18px;text-shadow:0 2px 5px rgba(0,0,0,.2);text-align:center;position:absolute;max-width:100%;z-index:1000;left:50%;transform:translate(-50%);cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-welcome-page-scroll .advertory-welcome-page-scroll-image{width:26px;height:26px;margin-top:19px}@media screen and (min-width: 736px){.advertory-welcome-page-scroll{font-size:calc(24px + 2*(100vw - 736px)/514)}.advertory-welcome-page-scroll .advertory-welcome-page-scroll-image{width:54px;height:54px;margin-top:22px}}.advertory-topscroller-close{padding:0;background:none;border:none;z-index:1;position:fixed;top:42px;left:16px;color:#fff;cursor:pointer;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-topscroller-close img{width:22px;height:22px}@media screen and (min-width: 736px){.advertory-topscroller-close img{width:28px;height:28px}}.advertory-topscroller-scroll{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:18px;text-shadow:0 2px 5px rgba(0,0,0,.2);position:absolute;max-width:100%;text-align:center;z-index:1000;left:50%;transform:translate(-50%);cursor:pointer;top:50vh;filter:drop-shadow(rgba(0, 0, 0, 0.2) -1px -1px 1px) drop-shadow(rgba(0, 0, 0, 0.2) 1px 1px 1px)}.advertory-topscroller-scroll img{width:26px;height:26px;margin-top:19px}@media screen and (min-width: 736px){.advertory-topscroller-scroll{font-size:calc(24px + 2*(100vw - 736px)/514);top:55vh}.advertory-topscroller-scroll img{width:54px;height:54px;margin-top:22px}}@media screen and (min-height: 836px){.advertory-topscroller-scroll{top:50vh !important}}.advertory-takeover-wrapper{display:none;font-family:Arial,Helvetica,Verdana,Geneva,sans-serif;width:100%}.advertory-takeover-wrapper.advertory-impact-wrapper{z-index:10001}.advertory-takeover-wrapper.welcome-page-wrapper{clip-path:inset(0)}.advertory-takeover-wrapper.advertory-splash-wrapper{position:fixed;height:100vh;background-color:#fff;font-weight:700;z-index:10001}.advertory-takeover-wrapper.topscroller-wrapper div[role=button]{border-bottom-left-radius:0;border-bottom-right-radius:13px !important;right:unset}.advertory-takeover-wrapper.topscroller-wrapper iframe[id^=utif_]{width:100%;height:68vh}.advertory-takeover-wrapper.topscroller-wrapper .takeover-topscroller-label{right:0 !important;left:unset !important}.advertory-takeover-wrapper div[role=button]{background-color:hsla(0,0%,100%,.75) !important;border-bottom-left-radius:13px;border-bottom-right-radius:0 !important;left:unset !important;right:0}.advertory-takeover-wrapper .advertory-takeover{position:fixed;height:100vh;width:100%}.advertory-takeover-wrapper .advertory-takeover .advertory-takeover-label{position:absolute;top:0;left:0;font-size:10px;font-weight:700;background-color:hsla(0,0%,100%,.75);color:#585858;padding:7px;letter-spacing:.4px}.takeover-ad-hidden{display:none;visibility:hidden;height:0 !important}body.page-locked{position:fixed;top:0;left:0;right:0;width:100%;overflow:hidden}");const Ki={prepareTag:e=>{var t;const{keywords:n,targetId:r,invCode:o,dynamicSizeWidthCheck:i}=e,{pageSetup:a,pageContext:{countryCode:s}}=y.get();if(!a)return(e=>{const{keywords:t,targetId:n,invCode:r}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=y.get(),i=ei(r,o),a=Ei(e),s=ki(n),d=Ai(),l=Si(r),c=Ii(r);return Object.assign(Object.assign({},e),{invCode:i,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),s),l),d),rendererOptions:c})})(e);const{tag:{useAppTabletInvCode:d=!0}={}}=a,l=ei(o,d),c=Ei(e),u=ki(r),p=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(l),v=Ai(),g=Si(o),h=Ii(o,{safeFrameAutoInitialSize:!0}),m=i&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,f=(new Ti).add(null!=n?n:{}).add(c).add(u).add(null!=p?p:{}).add(g).add(v).addIf(null===(t=null==a?void 0:a.tag)||void 0===t?void 0:t.reloadKeywords,{[`${U(s)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:m,invCode:l,keywords:f,rendererOptions:h})},preparePageOptions:e=>i(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=y.get();return n?yield t===P.SE?Ri(e):Mi(e):yield Li(e)}),siteEvents:t},Gi=((e,t)=>({init:n=>mi(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:gi,getVideoPPIDs:pe,createInitNativeAd:xi,getVideoAdsConfig:No}))(Ki,r),Ji=ot("[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 Yi=Object.freeze({__proto__:null,default:Ji});ot('.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 Qi={Blink:"Blink"},Xi=new Map,Zi=e=>{var t;if(!Xi.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Qi)){const r=e[t];null!=r&&(window[n]=r)}})(e)).catch(t=>{throw Xi.delete(e),t});Xi.set(e,t)}return null!==(t=Xi.get(e))&&void 0!==t?t:Promise.resolve()},ea="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",ta="https://www.finn.no/distribution-front/external/carousel",na=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:r}}=y.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Fo(n,o,Ro,null!=t?t:r);Fr({preferredTestIdData:{targetId:e,testId:"finn"}})},ra=e=>{const{pageContext:{publisher:t=""}}=y.get(),n=document.querySelector(`#${e}`);if(!n)return;const r=`-${t}`;n.classList.remove(`advertory${r}-finn-blink`),n.classList.remove(`advertory${r}-finn-blink-wrapper`)};var oa=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=y.get(),{initNativeAd:n}=y.getHandlers();Ae(e)&&ut(e,t),Ce(e)&&(null==n||n(e,y.get()))},finnBlinkLoaded:na,xandrAdLoaded:ra});const ia={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return p(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){p(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){p(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},aa="finn_blink_id",sa=e=>i(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:r,theme:i}=e,a=o(e,["userId","id","hashed_email","theme"]),s=window[Qi.Blink];if(!s)return;const d=new s({remote:ta,id:n,hashed_email:r,theme:i});yield d.inject(Object.assign({},a))}),da=e=>i(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,r=o(e,["userId","theme"]),i=window[Qi.Blink];if(!i)return;const a=new i({remote:ta,userId:t,theme:n});yield a.inject(Object.assign({},r))}),la=e=>{var t,n;const r=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==r?void 0:r.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},ca=(e,t)=>{const{finnBlink:{enabled:n}={}}=y.get(),r=(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(!r||!n)return null;const{limit:o,height:i,requireImage:a,theme:s,rec:d,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${la(e)}`,enabled:r,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=i?i:100,offset:null!=u?u:200,requireImage:a,rec:d,theme:"dark"===s?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},ua=(e,t,n)=>i(void 0,void 0,void 0,function*(){var r;const{placements:o,pageContext:{deviceType:a}}=y.get();p(`rendering finn blink ad for ${e}`);const s=Tt(e),d=o[a].find(e=>e.targetId===s),l=ca(e,null==d?void 0:d.finnBlink);if(!(null==l?void 0:l.enabled))return p(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void ra(e);if((e=>{var t;const n=la(e),r=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==r?void 0:r.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void p(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:f}={}}=null!=v?v:{},w=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=gr();return null!=e?e:""}return e})(g),x="dark"===f?"dark":"light";try{const e=yield i(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=y.get(),t=ia.get(aa),n=I("finncode");if(!e||n)return"";if(!t){const t=yield J.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return ia.set(aa,n),n}return t}),t=yield i(void 0,void 0,void 0,function*(){const{ppid1:e}=ae.getPPIDs();return e}),n=(null===(r=null==d?void 0:d.finnBlink)||void 0===r?void 0:r.useNewConstructor)?da:sa;yield n(Object.assign(Object.assign({},l),{channel:w,id:b,userId:t,hashed_email:e,theme:x,uuid:h})).then(()=>{na(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){p(`Finn blink error ${t}`),n&&n(e),!n&&Bt(e),ra(e)}}),pa=()=>i(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=y.get();return!!(yield $(e,t,n,"finn-blink"))||(p("Skip loading finn blink ad due to missing TCF consent."),!1)}),va=(e,t)=>{var n;(p(`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)):p(`Cannot perform afterend on: ${e.id}`)},ga=e=>document.querySelector(`#${e}`);var ha=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>i(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=y.get(),r=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=ga(n);o&&(yield Wn(o,null!=e?e:r))}}),loadFinnBlinkAd:(e,t,n,r)=>i(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=y.get();if(p(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield pa())||o)return n&&n(e),ra(e),void(!n&&Bt(e));try{yield Zi(ea)}catch(e){console.error(e)}yield ua(e,t,n),r&&r()}),replaceAdsWithFinnBlink:e=>i(void 0,void 0,void 0,function*(){if(!e)return;const{replacementConfig:t}=e;if(!(Tn()&&(null==t?void 0:t.adsToReplace)&&(null==t?void 0:t.sizes)&&e.enabled))return void p(`Finn blink configuration is incorrect: ${JSON.stringify(t)}`);if(!(yield pa()))return;yield Zi(ea);const{adsToReplace:n,sizes:r}=t;n.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const r=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=y.get(),n=document.createElement("div"),r=document.createElement("div");return r.id=e,n.appendChild(r),Fo(t,r,Ro),p(`Creating blink container for: ${e}`),n})(t);(e=>{p(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),va(n,r),n.dataset.finnBlinkId=t,zn().withFullAdsChain(e)})})});const ma=1e4,ya=e=>e.some(e=>e.some(e=>!!e&&or(e,0)));let fa;var wa=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=y.get(),{enabled:t,options:{rotationInterval:n=ma,widescreenIdPrefix:r}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=y.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(r);let i=0,a=Date.now(),s=ya(o);if(!o.length)return;fa&&window.removeEventListener("scroll",fa);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(...r)=>{null===n&&(e(...r),n=setTimeout(()=>{n=null},t))}})(()=>{s||(s=ya(o)||s,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(i),t=o.map(e=>e[i]),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)})(),i=l(i),a=Date.now())},1e3);fa=c,window.addEventListener("scroll",c)}});const ba="#fff",xa="#0098da",Ea=(e,t=!0)=>{(e===mr||e===yr)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},ka=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Aa=e=>{document.body.style.overflow=e?"initial":"hidden"},Ca=e=>{const t=Sa(e),n=Ia(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Aa(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Ia=e=>{const t=()=>Ca(e);return window.addEventListener("advertory:closeTakeover",t),ka(),t},Sa=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Ca(e)};return ka(),window.addEventListener("keydown",t),t},Ta=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Sa(e),Ia(e),ka(),t.addEventListener("click",()=>{Ca(e)}),Aa(!1))},Oa=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Ia(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Pa=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Ca(e))})(e)},ja=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=y.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),r=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&r&&(r.style.display="flex",r.innerText=at.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},La=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=at.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Na=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=at.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},_a=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=at.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},$a=()=>{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)},Da=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${Nr})()`,e+t.outerHTML})(e)),n};var qa=Object.freeze({__proto__:null,createTakeoverAd:e=>i(void 0,void 0,void 0,function*(){const{takeover:t}=y.get(),{targetId:n}=e,r=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!r||!o||!t)return;const i=Tr(e),a=o.offsetHeight,s=window.scrollY>a;o.style.display="block",!s&&Ea(i,!1),((e,t)=>{({[mr]:Na,[hr]:ja,[yr]:La,[fr]:_a})[t](e)})(o,i),$a(),((e,t)=>{({[mr]:Oa,[yr]:Oa,[hr]:Ta,[fr]:Pa})[t](e)})(o,i),((e,t,n)=>{if(!n)return;({[mr]:()=>{const{buttonLabel:r}=jr(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=r?r:"")})},[hr]:()=>{const{themeColors:r,logotype:o,buttonLabel:i,showArrowIcon:a}=jr(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!=i?i:""),".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&&r){const{backgroundColor:e,color:t}=r;n.style.setProperty("background-color",null!=e?e:ba,"important"),n.style.color=null!=t?t:xa}}})},[yr]:()=>{const{buttonLabel:r,showArrowIcon:o,showCloseButton:i=!0}=jr(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||i||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=r?r:""))})},[fr]:()=>{}})[t]()})(o,i,t),yield Or(),!s&&Ea(i,!0),Lr(e,i)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,r=ze(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[r].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,r=ze(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[r].rtb;o&&(o.banner.content=t)})(e,Da(t))},modifyTakeoverIframe:(e,t)=>{var n;const r="100%",o="100%";e.resizeAd(t,[r,o]);const i=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!i)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(i),t=e.width,n=e.height;t===r&&n===o||(i.style.width=r,i.style.height=o)}}).observe(i,{attributes:!0,attributeFilter:["style"]})}});const Ma=(e,t)=>{const n=e.width,r=(null!=t?t:window.screen.width)/n;return r<1?r:1},Ba=(e,t=window.screen.width,n,r)=>{const o=Ma(e,t);if(n&&n(e,o),r)return void r(e);const i=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);i&&(i.style.transform=`scale(${o})`,i.style.transformOrigin="left top")},Fa=new Map;Fa.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Fa.set("panorama",{scale:.79,transformOrigin:"center center"}),Fa.set("outstream",{scale:.79,transformOrigin:"center center"}),Fa.set("integration",{scale:.79,transformOrigin:"center center"}),Fa.set("toppanorama",{scale:.8,transformOrigin:"left center"});var Ra=Object.freeze({__proto__:null,calculateScaleFactor:Ma,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:Ba,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 r=Rr(e),o=Fa.get(r),i=document.querySelector(`#${e.targetId}`);if(!i||!o)return;if(i.style.transformOrigin=o.transformOrigin,i.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==i?void 0:i.offsetWidth;a&&"number"==typeof s&&!isNaN(s)&&a.style.setProperty("right",String(-1*s*.2)+"px")},scaleAds:e=>{var t,n,r,o,i,a;const{adScaleConfig:s,pageContext:{deviceType:d}}=y.get();if(!(null==s?void 0:s.enabled))return;if(Me(e,he))return;const l=null!==(t=s.adsToBeScaled[d])&&void 0!==t?t:[],c=Ht(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(r=null===(n=s.offset)||void 0===n?void 0:n[c])&&void 0!==r?r:0,p=document.getElementById(e.targetId),v=null!==(o=null==p?void 0:p.offsetWidth)&&void 0!==o?o:window.screen.width,g=null!==(a=null===(i=null==p?void 0:p.parentElement)||void 0===i?void 0:i.offsetWidth)&&void 0!==a?a:window.screen.width;Ba(e,(v<g?v:g)-u)}});var Ua=Object.freeze({__proto__:null,prepareContainerForFullWidthFormat:e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:r}={}}=y.get();if(!t||!n||!r)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${r}__full-width-ad`),o.classList.add(`advertory-${n}-${r}-wrapper__full-width-ad`))},scaleVerticalFullWidthAd:e=>{var t;const n=document.querySelector(`#${e.targetId}`),r=null===(t=document.querySelector(`#${e.targetId}`))||void 0===t?void 0:t.parentElement,o=null==n?void 0:n.querySelector("iframe"),i=null==o?void 0:o.parentElement,{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:s}={}}=y.get();if(!(n&&o&&i&&r))return;r.classList.add(`advertory-${a}-${s}__vertical-full-width-ad-wrapper`);const d=window.innerWidth,l=Math.round(d/1080*1920);n.style.width="100%",n.style.height=`${l}px`,n.classList.add(`advertory-${a}-${s}__vertical-full-width-ad`);const c=Ma(e,n.offsetWidth);i.style.transform=`scale(${c})`,i.style.transformOrigin="left top"}});const Va=e=>e===P.NO?"schibsted":"schibstedse";var za=Object.freeze({__proto__:null,getCampaign:Va,loadNorstat:()=>i(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:r}=y.get(),o=yield $(r,n,t,"norstat");if(!e||n||!o)return;const a=(e=>{const{ppid1:t,ppid2:n}=ie.getPPIDs(),{ppid1:r,ppid2:o}=ae.getPPIDs(),i=(new oe).add(n,Q[e]).add(t,X[e]).add(o,Z[e]).add(r,ee[e]);return`${i.buildNorstatPath()}?${i.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{i(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const r=document.createElement("img");r.src=e,r.id=null!=t?t:"",n&&(r.style.display="none"),document.body.appendChild(r)})})(`https://sch-map.norstatsurveys.com/api/nids/${Va(t)}/map/${a}`,"norstat")})});const Ha=".advertory-right-column-track",Wa="--advertory-right-column-track-height",Ka=e=>e.getBoundingClientRect().top+window.scrollY,Ga=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Ja=(e,t)=>{const n=(r=t,`${Math.max(0,Math.round(r))}px`);var r;document.body.style.setProperty(e,n)},Ya=(e,t)=>`${e}-${t}`,Qa=(e,t,n)=>{var r;const o=Array.from(null!==(r=e.querySelectorAll(t))&&void 0!==r?r:[]),i=(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===i.length)return;const a=Ka(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ga(e);Ja("--advertory-newsroom-header-height",t)})(),i.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const r=Ka(e),o=Ya(Wa,t),i=r-n,a=Ya("--advertory-right-column-split-point-height",t),s=Ga(e);Ja(o,i),Ja(a,s)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Ya("--advertory-right-column-ad-height",t),r=Ga(e);Ja(n,r)})(o[t])});((e,t)=>{const n=Ka(e);Ja(Wa,n-t)})(i[Math.min(o.length,i.length-1)].point,a)};let Xa=!1;var Za=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Xa)return;const{splitPointIDs:t,adSelector:n,trackSelector:r=Ha}=e,o=document.querySelector(r);if(!o)return;Xa=!0;const i=()=>{Qa(o,n,t)};i(),window.addEventListener("resize",i),window.addEventListener("orientationchange",i),window.addEventListener("load",i),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(i)});new ResizeObserver(i).observe(o)}});class es{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:r,pathname:o}=new URL(n);if(!r.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const i=o.split("/");return i.length?[...i.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class ts{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class ns{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:r}=this.parseKilkayaData(e);return{id:r,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 i(this,void 0,void 0,function*(){var t,n,r,o,i,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===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===o||o.call(r,u):(null===(i=this.pulse)||void 0===i?void 0:i.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 i(this,void 0,void 0,function*(){var t,n,r,o,i,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=(r=this.pulse).trackClickUIElement)||void 0===o||o.call(r,s):null===(a=(i=this.pulse).trackElementClick)||void 0===a||a.call(i,s)})}}class rs extends ns{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,o,i,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===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.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===(i=this.newsroomStrategy)||void 0===i?void 0:i.getTags)||void 0===a?void 0:a.call(i,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),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 os="[data-k5a-teaser-analytics]",is=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const o=new rs(e,t,n),i=new WeakMap,a=e=>{const t=i.get(e);t&&(t.disconnect(),i.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(os);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(i.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(os);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"]}),i.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class as{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:r}}){if(!(null==e?void 0:e.instance))return;const o={[n.VG]:new es}[r]||new ts;is(e.instance,o,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const r=n.parentElement;r&&(p(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const r=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";Ft(r)}loadKilkayaScript(e){return i(this,void 0,void 0,function*(){yield ve(e)})}run(e){return i(this,void 0,void 0,function*(){var t,n;const{tcf:r,pageContext:{isMobileApp:o,countryCode:i},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const s=yield $(r,o,i,"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 ss=Object.freeze({__proto__:null,Kilkaya:({placementName:t,slotTag:n,fallbackTargetId:r,children:o,pulseData:i,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,o]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(o)}return n},d=s(i,"data-pulse"),l=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,l,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:o})]}))},runKilkaya:e=>i(void 0,void 0,void 0,function*(){const t=new as;yield t.run(e)})});exports.Takeover=t=>e.jsxs("div",{className:"advertory-takeover-wrapper",children:[e.jsx(Ui,{}),e.jsx(Hi,{}),e.jsx(Wi,{}),e.jsxs("div",{id:t.targetId,className:"advertory-takeover","data-device":"all",children:[e.jsx("div",{className:"div-for-xandr",style:{display:"none"}}),e.jsx("div",{className:"advertory-takeover-label",style:{display:"none"}}),e.jsx("div",{id:`${t.targetId}-button`})]})]}),exports.default=Gi;