@schibsted/advertory 3.4.13 → 3.4.14

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 (316) hide show
  1. package/aftenposten/cjs/index.js +1 -1
  2. package/aftenposten/es/{_auto-entry_aftenposten-Cl0fdATI.js → _auto-entry_aftenposten-EtY8GywO.js} +1 -1
  3. package/aftenposten/es/{events-DKEPGfkM.js → events-aNNPNIqz.js} +1 -1
  4. package/aftenposten/es/{index-CCE-C1HN.js → index-C0GWciD3.js} +1 -1
  5. package/aftenposten/es/{index-BNB3C6E-.js → index-CGWeMiyd.js} +1 -1
  6. package/aftenposten/es/{index-CHRLj_VV.js → index-Celgx891.js} +1 -1
  7. package/aftenposten/es/{index-C9D1A7fz.js → index-DKswyaY6.js} +1 -1
  8. package/aftenposten/es/{index-JUbNdRuz.js → index-DiTRkWxo.js} +1 -1
  9. package/aftenposten/es/{index-DWEtV0NR.js → index-GljCR_Yl.js} +1 -1
  10. package/aftenposten/es/{index-B9jM8uJp.js → index-R-_EwTMJ.js} +1 -1
  11. package/aftenposten/es/{index-BhbxE_25.js → index-YhGb4swR.js} +1 -1
  12. package/aftenposten/es/index.js +1 -1
  13. package/aftenposten/es/{styles-Cdv34tFr.js → styles-1J1dVECT.js} +1 -1
  14. package/aftenposten/es/{styles-CbWNyowJ.js → styles-BB2SvrTn.js} +1 -1
  15. package/aftenposten/es/{styles-Drrmd6ic.js → styles-BfpczqmL.js} +1 -1
  16. package/aftenposten/es/{styles-CVdL3mGq.js → styles-Blfzermq.js} +1 -1
  17. package/aftenposten/es/{styles-DRo2gfi-.js → styles-Bo8FUe1n.js} +1 -1
  18. package/aftenposten/es/{styles-DhO41e2R.js → styles-CuY2GV3h.js} +1 -1
  19. package/aftenposten/es/{styles-DPLTaMqa.js → styles-DBMUr5Jo.js} +1 -1
  20. package/aftenposten/es/{styles-2jZnGzOL.js → styles-DEM3Gi4L.js} +1 -1
  21. package/aftenposten/es/{styles-BSf3bvgL.js → styles-PAkuxweI.js} +1 -1
  22. package/aftenposten/es/{styles-CkK0N-wj.js → styles-ztiWgibq.js} +1 -1
  23. package/aftenpostenv2/es/{_auto-entry_aftenpostenv2-DmzCVOLI.js → _auto-entry_aftenpostenv2-DHJZKdQn.js} +1 -1
  24. package/aftenpostenv2/es/{events-cGs04mSN.js → events-VvzSMsl7.js} +1 -1
  25. package/aftenpostenv2/es/{index-DWvJchU6.js → index-BT7e8g0Z.js} +1 -1
  26. package/aftenpostenv2/es/{index-CLljdOgE.js → index-BnCsGsiy.js} +1 -1
  27. package/aftenpostenv2/es/{index-Dxxj-XUF.js → index-BzptQywS.js} +1 -1
  28. package/aftenpostenv2/es/{index-BDTGsSwd.js → index-CfiF-crx.js} +1 -1
  29. package/aftenpostenv2/es/{index-BhSR3kGL.js → index-D-wLI-V3.js} +1 -1
  30. package/aftenpostenv2/es/{index-D7ptGGO-.js → index-DBsl_S5J.js} +1 -1
  31. package/aftenpostenv2/es/{index-kaOiEg3O.js → index-LsjimNAy.js} +1 -1
  32. package/aftenpostenv2/es/{index-aNIUHXze.js → index-iU3UTSv8.js} +1 -1
  33. package/aftenpostenv2/es/index.js +1 -1
  34. package/aftenpostenv2/es/{styles-CWIHh5ES.js → styles-BooZMo4j.js} +1 -1
  35. package/aftenpostenv2/es/{styles-BQRJOeWA.js → styles-CAdaLqhC.js} +1 -1
  36. package/aftenpostenv2/es/{styles-Jd_XZ1sX.js → styles-CEK4LgyA.js} +1 -1
  37. package/aftenpostenv2/es/{styles-Bb8KCS67.js → styles-CbL4pB-1.js} +1 -1
  38. package/aftenpostenv2/es/{styles-DcbX8XpP.js → styles-ChnqRzhg.js} +1 -1
  39. package/aftenpostenv2/es/{styles-CjWMsJWa.js → styles-Ci9J7jKv.js} +1 -1
  40. package/aftenpostenv2/es/{styles-BUi1KOiu.js → styles-D08iDSOO.js} +1 -1
  41. package/aftenpostenv2/es/{styles-Cf3flzw_.js → styles-Dg9pvL6a.js} +1 -1
  42. package/aftenpostenv2/es/{styles-Dqbg_h90.js → styles-DynezWrn.js} +1 -1
  43. package/aftenpostenv2/es/{styles-D4CN1Pbp.js → styles-Te_pNEb0.js} +1 -1
  44. package/aftonbladet/cjs/index.js +1 -1
  45. package/aftonbladet/es/{_auto-entry_aftonbladet-C8UPlgHW.js → _auto-entry_aftonbladet-B3k7YOBF.js} +1 -1
  46. package/aftonbladet/es/{events-CqHPJ25E.js → events-Crg3L5_c.js} +1 -1
  47. package/aftonbladet/es/{index-C-aG3CSr.js → index-B1L0P1wI.js} +1 -1
  48. package/aftonbladet/es/{index-BfYyv1Y3.js → index-Bobb62Hm.js} +1 -1
  49. package/aftonbladet/es/{index-DbLqYJQ1.js → index-ByNCqWG8.js} +1 -1
  50. package/aftonbladet/es/{index-DPBovzTm.js → index-CrfNDcKV.js} +1 -1
  51. package/aftonbladet/es/{index-DRC_jUIR.js → index-CyMfmkio.js} +1 -1
  52. package/aftonbladet/es/{index-wu_uZJ3I.js → index-D4x98Sy_.js} +1 -1
  53. package/aftonbladet/es/{index-DMXydSy1.js → index-DVhUFIWV.js} +1 -1
  54. package/aftonbladet/es/{index-DD-wmA3b.js → index-gy_UT4eF.js} +1 -1
  55. package/aftonbladet/es/index.js +1 -1
  56. package/aftonbladet/es/{styles-CRybZj4C.js → styles-4FPciXKr.js} +1 -1
  57. package/aftonbladet/es/{styles-7WtKxzhO.js → styles-7ca24lPW.js} +1 -1
  58. package/aftonbladet/es/{styles-BvQVtKqM.js → styles-CWd0qunX.js} +1 -1
  59. package/aftonbladet/es/{styles-B2yIShmI.js → styles-_3OqNUti.js} +1 -1
  60. package/aftonbladet/es/{styles-B7F00SJC.js → styles-eU2MLwjj.js} +1 -1
  61. package/aftonbladet/es/{styles-CrqmyCRC.js → styles-r32kR33X.js} +1 -1
  62. package/aftonbladetv2/es/{_auto-entry_aftonbladetv2-BRG4vCT_.js → _auto-entry_aftonbladetv2-C6dng7Av.js} +1 -1
  63. package/aftonbladetv2/es/{events-F2MAm7hP.js → events-C7hVJNRc.js} +1 -1
  64. package/aftonbladetv2/es/{index-vrLkrA5Q.js → index-3bjoIdXb.js} +1 -1
  65. package/aftonbladetv2/es/{index-CH80zQJg.js → index-7JuA3m3Q.js} +1 -1
  66. package/aftonbladetv2/es/{index-DK6d1n72.js → index-BzWc5vHd.js} +1 -1
  67. package/aftonbladetv2/es/{index-BxhMMu8S.js → index-CuuWwcD4.js} +1 -1
  68. package/aftonbladetv2/es/{index-DSy4XN0k.js → index-D-111ysD.js} +1 -1
  69. package/aftonbladetv2/es/{index-mZot56VG.js → index-DUK2MbMc.js} +1 -1
  70. package/aftonbladetv2/es/{index-3t-TtZA7.js → index-DttZBtcH.js} +1 -1
  71. package/aftonbladetv2/es/{index-Bmq3vLe7.js → index-myD5LMzf.js} +1 -1
  72. package/aftonbladetv2/es/index.js +1 -1
  73. package/aftonbladetv2/es/{styles-B_SLUOOm.js → styles-B0JWyUDb.js} +1 -1
  74. package/aftonbladetv2/es/{styles-BDXIY7L6.js → styles-CTVusyII.js} +1 -1
  75. package/aftonbladetv2/es/{styles-D9MbCPbR.js → styles-CYWNLpOe.js} +1 -1
  76. package/aftonbladetv2/es/{styles-Bf-nc3ar.js → styles-CgfgGfFC.js} +1 -1
  77. package/aftonbladetv2/es/{styles-tb8NbiL9.js → styles-DK83RzaC.js} +1 -1
  78. package/aftonbladetv2/es/{styles-BnM-vUtg.js → styles-JlDcWbZV.js} +1 -1
  79. package/bt/cjs/index.js +1 -1
  80. package/bt/es/{_auto-entry_bt-Bk5yuKAV.js → _auto-entry_bt-DUcmJ2ku.js} +1 -1
  81. package/bt/es/{events-BiZTUccz.js → events-Cde2i6dy.js} +1 -1
  82. package/bt/es/{index-CCWVerJg.js → index-BHn9ynLP.js} +1 -1
  83. package/{sa/es/index-CVo2bvHa.js → bt/es/index-BOwPxMrI.js} +1 -1
  84. package/bt/es/{index-PBYkoefE.js → index-BeTyrZf3.js} +1 -1
  85. package/bt/es/{index-WW1ggdD2.js → index-Bt3KxlOO.js} +1 -1
  86. package/bt/es/{index-C0SDG27K.js → index-DCFEAOKQ.js} +1 -1
  87. package/bt/es/{index-Ctn9l5sF.js → index-DGWOOPcW.js} +1 -1
  88. package/bt/es/{index-D4CTTpHq.js → index-FBqdAJVX.js} +1 -1
  89. package/bt/es/{index-47maYTIw.js → index-LjfBD_xy.js} +1 -1
  90. package/bt/es/index.js +1 -1
  91. package/bt/es/{styles-DzpOal2h.js → styles-8d9uM6fs.js} +1 -1
  92. package/bt/es/{styles-BvtgJJvA.js → styles-BfRFHwVs.js} +1 -1
  93. package/{sa/es/styles-B0fUHg6e.js → bt/es/styles-C8DnuqSs.js} +1 -1
  94. package/bt/es/{styles-D-Vefwdc.js → styles-C_4XMT-G.js} +1 -1
  95. package/bt/es/{styles-vp9TKNef.js → styles-CcNwWif0.js} +1 -1
  96. package/bt/es/{styles-D3b_zDLG.js → styles-DRJ2KyA3.js} +1 -1
  97. package/{sa/es/styles-Cn4mlkwu.js → bt/es/styles-DeLtxm-7.js} +1 -1
  98. package/bt/es/{styles-Cj7qoYzk.js → styles-SO94Mupz.js} +1 -1
  99. package/bt/es/{styles-K196H2g8.js → styles-SVz6chgd.js} +1 -1
  100. package/btv2/es/{_auto-entry_btv2-yQhIazsa.js → _auto-entry_btv2-D2FHz3QG.js} +1 -1
  101. package/btv2/es/{events-BzjCXDmD.js → events-CCT83Nij.js} +1 -1
  102. package/btv2/es/{index-DXx3mLih.js → index-7Ez_Ronh.js} +1 -1
  103. package/{sav2/es/index-DK1oTN1u.js → btv2/es/index-BHOfxyyp.js} +1 -1
  104. package/btv2/es/{index-CH4xAaPD.js → index-BHvGK5b6.js} +1 -1
  105. package/btv2/es/{index-DSSpySZH.js → index-C5tXlI-6.js} +1 -1
  106. package/btv2/es/{index-ypDJbRmv.js → index-C7gvPO7W.js} +1 -1
  107. package/btv2/es/{index-i76Dw8aX.js → index-Ct5dvsuS.js} +1 -1
  108. package/btv2/es/{index-CrEzAmOq.js → index-MrzR8hOq.js} +1 -1
  109. package/btv2/es/{index-D2xGJKyH.js → index-pgTzQGZK.js} +1 -1
  110. package/btv2/es/index.js +1 -1
  111. package/{vgv2/es/styles-BPT-qUNq.js → btv2/es/styles-Bo_Iovmx.js} +1 -1
  112. package/{sav2/es/styles-DJw6pIzH.js → btv2/es/styles-C5hdNxqP.js} +1 -1
  113. package/btv2/es/{styles-DQuTQjle.js → styles-CMzhWGxU.js} +1 -1
  114. package/{sav2/es/styles-BlHvtXYb.js → btv2/es/styles-CeXhXj2f.js} +1 -1
  115. package/{sav2/es/styles-Cbs2drMD.js → btv2/es/styles-DFgxH_36.js} +1 -1
  116. package/{vgv2/es/styles-BBZMSzoF.js → btv2/es/styles-DNLeCYjA.js} +1 -1
  117. package/{sav2/es/styles-B6yetf03.js → btv2/es/styles-DsdyDZfJ.js} +1 -1
  118. package/btv2/es/{styles-Cex1nobv.js → styles-KxHIpCeb.js} +1 -1
  119. package/e24/es/{_auto-entry_e24-B8BbWljb.js → _auto-entry_e24-Cz-sabh7.js} +1 -1
  120. package/e24/es/{events-Bn2T7T9a.js → events-C7lcFBm7.js} +1 -1
  121. package/e24/es/{index-BZcVv812.js → index-AkgArUou.js} +1 -1
  122. package/e24/es/{index-dWe5Rx5B.js → index-BaVeOvRN.js} +1 -1
  123. package/e24/es/{index-ByW4jH_X.js → index-BfVWJtjH.js} +1 -1
  124. package/e24/es/{index-CF9p3gqF.js → index-BfjKelU3.js} +1 -1
  125. package/{tv4/es/index-BRrn8QKt.js → e24/es/index-CX3Bi8nn.js} +1 -1
  126. package/e24/es/{index-CduaDIrS.js → index-Cc0xxQD8.js} +1 -1
  127. package/e24/es/{index-BQv3Sxf9.js → index-HsI1zISB.js} +1 -1
  128. package/e24/es/{index-W3BxJEHG.js → index-KfmbuDFv.js} +1 -1
  129. package/e24/es/index.js +1 -1
  130. package/e24/es/{styles-BpT05fHe.js → styles-BdU3EKpj.js} +1 -1
  131. package/e24/es/{styles-pdDQ694q.js → styles-C9DG7Usb.js} +1 -1
  132. package/e24/es/{styles-f5hwcx2V.js → styles-CCG3z8rI.js} +1 -1
  133. package/e24/es/{styles-BZ62iRdG.js → styles-CHMD6Bqh.js} +1 -1
  134. package/e24/es/{styles-Ce1bu28P.js → styles-CIGC9QQN.js} +1 -1
  135. package/e24/es/{styles-Cf4ypcKM.js → styles-CNyrqPLq.js} +1 -1
  136. package/e24/es/{styles-0iI9RREc.js → styles-CT29VQHg.js} +1 -1
  137. package/e24/es/{styles-CdBHjteb.js → styles-CtnIzp2j.js} +1 -1
  138. package/e24/es/{styles-CrOq1uSB.js → styles-DSyXEM0K.js} +1 -1
  139. package/e24/es/{styles-BiDCLCW7.js → styles-DvC11JEH.js} +1 -1
  140. package/{tv4/es/styles-CWeSNH-n.js → e24/es/styles-VDl0rmFd.js} +1 -1
  141. package/fotbollskanalen/cjs/index.js +1 -1
  142. package/fotbollskanalen/es/{_auto-entry_fotbollskanalen-awwUwT11.js → _auto-entry_fotbollskanalen-FkLZW4D2.js} +1 -1
  143. package/fotbollskanalen/es/{events-szJnDbry.js → events-BWA-2thH.js} +1 -1
  144. package/fotbollskanalen/es/{index-CrDNIO4l.js → index-1gBV8-hR.js} +1 -1
  145. package/fotbollskanalen/es/{index-CNnVOwXm.js → index-3djT3sHR.js} +1 -1
  146. package/fotbollskanalen/es/{index-CjLD1zkx.js → index-B-_ubU0_.js} +1 -1
  147. package/fotbollskanalen/es/{index-ZvfM5Yz1.js → index-B8j2m66Z.js} +1 -1
  148. package/fotbollskanalen/es/{index-BQHqJCPe.js → index-BwbYIEOX.js} +1 -1
  149. package/fotbollskanalen/es/{index-D7CjRRto.js → index-CWTaJpBa.js} +1 -1
  150. package/fotbollskanalen/es/{index-qdqyfUtE.js → index-DVYZ3NYl.js} +1 -1
  151. package/fotbollskanalen/es/{index-DvCXcWg2.js → index-V5FBDx0k.js} +1 -1
  152. package/fotbollskanalen/es/index.js +1 -1
  153. package/fotbollskanalen/es/{styles-RQCqAO4d.js → styles-0JAjVhsb.js} +1 -1
  154. package/godt/cjs/index.js +1 -1
  155. package/kilkaya/cjs/index.js +1 -1
  156. package/kilkaya/es/index.js +1 -1
  157. package/klart/cjs/index.js +1 -1
  158. package/koket/cjs/index.js +1 -1
  159. package/koket/es/{_auto-entry_koket-B5W_TYr9.js → _auto-entry_koket-CEn1sb81.js} +1 -1
  160. package/koket/es/{events-BdWyZJzS.js → events-DhH916KC.js} +1 -1
  161. package/koket/es/{index-DkSEuan0.js → index-BYEYg5n6.js} +1 -1
  162. package/{svdv2/es/index-C4pN98HM.js → koket/es/index-Bu6TB0DP.js} +1 -1
  163. package/koket/es/{index-BpEUYR1h.js → index-DHTr3or4.js} +1 -1
  164. package/koket/es/{index-CQRM1_9Z.js → index-DTtS6hyT.js} +1 -1
  165. package/koket/es/{index-DKcphVAX.js → index-DZzMpwTx.js} +1 -1
  166. package/koket/es/{index-D3ygEfot.js → index-bAd1NCOu.js} +1 -1
  167. package/koket/es/{index-0VMjhDYm.js → index-eMen7DRS.js} +1 -1
  168. package/{svdv2/es/index-BFuceDfK.js → koket/es/index-ypZ2A-fD.js} +1 -1
  169. package/koket/es/index.js +1 -1
  170. package/{svdv2/es/styles-CsRH7OwY.js → koket/es/styles-B_H1HQkP.js} +1 -1
  171. package/minmote/cjs/index.js +1 -1
  172. package/package.json +1 -1
  173. package/pent/cjs/index.js +1 -1
  174. package/sa/cjs/index.js +1 -1
  175. package/sa/es/{_auto-entry_sa-Bb5FVWBc.js → _auto-entry_sa-Br3iro3o.js} +1 -1
  176. package/sa/es/{events-CpHcIBzh.js → events-DmkSNbn4.js} +1 -1
  177. package/sa/es/{index-Bl-YU1dP.js → index-BKdF7HJV.js} +1 -1
  178. package/sa/es/{index-BGQPYUjf.js → index-C3-dT3Da.js} +1 -1
  179. package/sa/es/{index-CwCnQRNv.js → index-CFDGnu0F.js} +1 -1
  180. package/sa/es/{index-Dd1Y97lw.js → index-CURdCwBP.js} +1 -1
  181. package/{bt/es/index-BgBCbmKK.js → sa/es/index-ClURBZHT.js} +1 -1
  182. package/sa/es/{index-tLG8ciGB.js → index-DN-YIKca.js} +1 -1
  183. package/sa/es/{index-Dff3FrSE.js → index-DdjFNLfi.js} +1 -1
  184. package/sa/es/{index-Dm912f7j.js → index-DlfjcCfo.js} +1 -1
  185. package/sa/es/index.js +1 -1
  186. package/{vg/es/styles-C7LhgQkX.js → sa/es/styles-B-lO9R-E.js} +1 -1
  187. package/{bt/es/styles-Dxz3L0fX.js → sa/es/styles-BNr1wnJP.js} +1 -1
  188. package/sa/es/{styles-BgvUhWZT.js → styles-BinlqIzR.js} +1 -1
  189. package/sa/es/{styles-CFJdZolS.js → styles-BqJmPjkx.js} +1 -1
  190. package/{vg/es/styles-BS_Oh73M.js → sa/es/styles-Bz__iovu.js} +1 -1
  191. package/sa/es/{styles-BzaRI9FD.js → styles-CKXkPSK7.js} +1 -1
  192. package/sa/es/{styles-CViyCPXH.js → styles-D6Yw1Ac5.js} +1 -1
  193. package/sa/es/{styles-DwXHz4p-.js → styles-Dl9lSG5k.js} +1 -1
  194. package/sa/es/{styles-6eCduJjk.js → styles-nIWjdf4Q.js} +1 -1
  195. package/sav2/es/{_auto-entry_sav2-AZVx6DD8.js → _auto-entry_sav2-D7Zkf3q3.js} +1 -1
  196. package/sav2/es/{events-Dog8n166.js → events-CLjaEfKg.js} +1 -1
  197. package/sav2/es/{index-DlVGuIRO.js → index-B9vqocMj.js} +1 -1
  198. package/{btv2/es/index-DCAju2n6.js → sav2/es/index-BpNenTh6.js} +1 -1
  199. package/sav2/es/{index-IfeBZfAv.js → index-C4g2W0Sb.js} +1 -1
  200. package/sav2/es/{index-C2vTQtRr.js → index-CFBp0gWl.js} +1 -1
  201. package/sav2/es/{index-8h2QQSc2.js → index-CtpIO46D.js} +1 -1
  202. package/sav2/es/{index-BVyGMuqV.js → index-D2OGiVeA.js} +1 -1
  203. package/sav2/es/{index-CqRijYqt.js → index-DF8KOTU3.js} +1 -1
  204. package/sav2/es/{index-CFrKD4N4.js → index-DR45cNWr.js} +1 -1
  205. package/sav2/es/index.js +1 -1
  206. package/sav2/es/{styles-B3oMClUn.js → styles-4VHKUOCA.js} +1 -1
  207. package/{vgv2/es/styles-ByxjhGhY.js → sav2/es/styles-AZhdSm8U.js} +1 -1
  208. package/{btv2/es/styles--cN6_CNi.js → sav2/es/styles-B0lS7d1J.js} +1 -1
  209. package/{btv2/es/styles-wXMjHens.js → sav2/es/styles-B4-CHFMj.js} +1 -1
  210. package/sav2/es/{styles-3YwI1h2-.js → styles-B6Tn2m5H.js} +1 -1
  211. package/sav2/es/{styles-RC2bhv68.js → styles-DR2_niKK.js} +1 -1
  212. package/sav2/es/{styles-B3vIzWMl.js → styles-RoErDfv8.js} +1 -1
  213. package/{btv2/es/styles-D_OVqIdW.js → sav2/es/styles-l-8lIA-0.js} +1 -1
  214. package/svd/cjs/index.js +1 -1
  215. package/svd/es/{_auto-entry_svd-CENb3dWh.js → _auto-entry_svd-EeywsUFy.js} +1 -1
  216. package/svd/es/{events-CzwVC4qY.js → events-BGNp0ea8.js} +1 -1
  217. package/svd/es/{index-AxMmynyO.js → index-29Jf_Biv.js} +1 -1
  218. package/{e24/es/index-C5JK4Qx4.js → svd/es/index-BIwR4oxJ.js} +1 -1
  219. package/svd/es/{index-D07O6Cdm.js → index-BtDN90s0.js} +1 -1
  220. package/svd/es/{index-5ln_jpoV.js → index-CKr8OvT_.js} +1 -1
  221. package/svd/es/{index-Dv1udWqy.js → index-D6Ta9osQ.js} +1 -1
  222. package/svd/es/{index-ClvSP2ZW.js → index-Dd5XL9Bh.js} +1 -1
  223. package/svd/es/{index-COmMOm0t.js → index-U6-8PbJh.js} +1 -1
  224. package/svd/es/{index-Z_kOo7dB.js → index-yLNHfxRN.js} +1 -1
  225. package/svd/es/index.js +1 -1
  226. package/svd/es/{styles-Dn6Zt-RJ.js → styles-1X-vMM3I.js} +1 -1
  227. package/svd/es/{styles-DxYChK1b.js → styles-5uj-ZsHl.js} +1 -1
  228. package/svd/es/{styles--z8Dgl02.js → styles-BKaQTDGq.js} +1 -1
  229. package/svd/es/{styles-BWFlVQnU.js → styles-Cus0jeG9.js} +1 -1
  230. package/svd/es/{styles-DPnCh2t5.js → styles-DEd63ZFk.js} +1 -1
  231. package/svd/es/{styles-T716n3-R.js → styles-DyN1NmcS.js} +1 -1
  232. package/svdv2/es/{_auto-entry_svdv2-B2oqDqqQ.js → _auto-entry_svdv2-BOdsgENe.js} +1 -1
  233. package/svdv2/es/{events-DcyH6O_V.js → events-DqZfw4u-.js} +1 -1
  234. package/svdv2/es/{index-BxwG5_mt.js → index-2odxm5tq.js} +1 -1
  235. package/svdv2/es/{index-S3a66jhs.js → index-C4rimTjh.js} +1 -1
  236. package/{koket/es/index-B4RxuN92.js → svdv2/es/index-CbGdqBCP.js} +1 -1
  237. package/svdv2/es/{index-DfLPDKWG.js → index-CtUznPAK.js} +1 -1
  238. package/svdv2/es/{index-D3YfK_Rr.js → index-DXWYk6cz.js} +1 -1
  239. package/svdv2/es/{index-Ba6e0PrX.js → index-EpnJhmcV.js} +1 -1
  240. package/svdv2/es/{index-hQ40Xo1i.js → index-I-xNTWVP.js} +1 -1
  241. package/{koket/es/index-BMfC4ihY.js → svdv2/es/index-yCwBuZEJ.js} +1 -1
  242. package/svdv2/es/index.js +1 -1
  243. package/{koket/es/styles-CDfsgc7e.js → svdv2/es/styles-9t16wRK2.js} +1 -1
  244. package/svdv2/es/{styles-B2ke3usj.js → styles-BUjiG59F.js} +1 -1
  245. package/svdv2/es/{styles-ygGFK_Nz.js → styles-CA4Z2e2v.js} +1 -1
  246. package/svdv2/es/{styles-CrLSHnyW.js → styles-CuKhob1v.js} +1 -1
  247. package/svdv2/es/{styles-DoZ4OR3i.js → styles-DToIRCe4.js} +1 -1
  248. package/svdv2/es/{styles-Cpk3jqGg.js → styles-DxAKuP0Z.js} +1 -1
  249. package/tek/cjs/index.js +1 -1
  250. package/tv4/cjs/index.js +1 -1
  251. package/tv4/es/{_auto-entry_tv4-B41KwUm2.js → _auto-entry_tv4-BIyw3FfG.js} +1 -1
  252. package/tv4/es/{events-wcexbD6c.js → events-C0sezdBn.js} +1 -1
  253. package/tv4/es/{index-zUieoZtt.js → index-BpzCvrHU.js} +1 -1
  254. package/tv4/es/{index-CojPSAod.js → index-C3N6OygM.js} +1 -1
  255. package/tv4/es/{index-CJLyjRUy.js → index-CDm1z5Zz.js} +1 -1
  256. package/tv4/es/{index-CJrmaByc.js → index-CZmxzuAB.js} +1 -1
  257. package/{svd/es/index-CtQAlx1i.js → tv4/es/index-CeRWWVnw.js} +1 -1
  258. package/tv4/es/{index-DwwSIWUX.js → index-D6j9NyVD.js} +1 -1
  259. package/tv4/es/{index-DOPye16D.js → index-DDWIYeu-.js} +1 -1
  260. package/tv4/es/{index-C27mV0sI.js → index-sIym3nCc.js} +1 -1
  261. package/tv4/es/index.js +1 -1
  262. package/{e24/es/styles-DbPaaQhx.js → tv4/es/styles-CFq95Psg.js} +1 -1
  263. package/tvnu/cjs/index.js +1 -1
  264. package/vg/cjs/index.js +1 -1
  265. package/vg/es/{_auto-entry_vg-DKyKS-W5.js → _auto-entry_vg-2d1xLWdJ.js} +1 -1
  266. package/vg/es/{events-Ca8PEFxH.js → events-BuIHSL2h.js} +1 -1
  267. package/vg/es/{index-CY5_yPNz.js → index-20ZWVGEc.js} +1 -1
  268. package/vg/es/{index-gh-qdWl3.js → index-BDINj96k.js} +1 -1
  269. package/vg/es/{index-2ViM6Z_E.js → index-CA0WZ6Ax.js} +1 -1
  270. package/vg/es/{index-iwIx2csi.js → index-CCJ1nJj9.js} +1 -1
  271. package/vg/es/{index-2HBwWrDZ.js → index-CZuZrMsL.js} +1 -1
  272. package/vg/es/{index-lAaEINKY.js → index-D2Jjx9PT.js} +1 -1
  273. package/vg/es/{index-Dw4tkJm9.js → index-DTQcufJF.js} +1 -1
  274. package/vg/es/{index-BhoMjnwi.js → index-Dl49HE4w.js} +1 -1
  275. package/vg/es/index.js +1 -1
  276. package/{bt/es/styles-B1VaBJsk.js → vg/es/styles-BLEcq5zd.js} +1 -1
  277. package/vg/es/{styles-CEOa8SJF.js → styles-BZEN7d7Q.js} +1 -1
  278. package/vg/es/{styles-B7mPwht_.js → styles-Bo3zTh_r.js} +1 -1
  279. package/vg/es/{styles-h_Sz1ik5.js → styles-Bqoueq7w.js} +1 -1
  280. package/vg/es/{styles-CfChsdxf.js → styles-BrTe9i2l.js} +1 -1
  281. package/vg/es/{styles-CcSukju-.js → styles-Bz0xWAPo.js} +1 -1
  282. package/vg/es/{styles-COAPuyTC.js → styles-CCZ98LB_.js} +1 -1
  283. package/vg/es/{styles-BoAqtXI-.js → styles-CQOliiLX.js} +1 -1
  284. package/vg/es/{styles-Cq8gyMtO.js → styles-Cq0YVuP-.js} +1 -1
  285. package/vg/es/{styles-DGCn2CYN.js → styles-EesYVlqx.js} +1 -1
  286. package/{sa/es/styles-Bzr7re6i.js → vg/es/styles-J6ZIkWWg.js} +1 -1
  287. package/vg/es/{styles-DeJdP1N1.js → styles-NumU-nPs.js} +1 -1
  288. package/vg/es/{styles-KWo4tdyB.js → styles-PevLCSy7.js} +1 -1
  289. package/vg/es/{styles-DyU85Yem.js → styles-h04QFm1i.js} +1 -1
  290. package/vg/es/{styles-CxEdAEsm.js → styles-jFF5Vdp2.js} +1 -1
  291. package/vgv2/es/{_auto-entry_vgv2-BOwVYPRZ.js → _auto-entry_vgv2-D8TcsAHG.js} +1 -1
  292. package/vgv2/es/{events-DNkN18vT.js → events-DEsiy1oQ.js} +1 -1
  293. package/vgv2/es/{index-C9W2H7yU.js → index-7WHfLNBO.js} +1 -1
  294. package/vgv2/es/{index-StiNpJYN.js → index-B3ngGiHs.js} +1 -1
  295. package/vgv2/es/{index-C1ElJMPL.js → index-B7Qwcv3E.js} +1 -1
  296. package/vgv2/es/{index-DNScSEfq.js → index-BSlqbyek.js} +1 -1
  297. package/vgv2/es/{index-Bg9q612m.js → index-DGISJUMb.js} +1 -1
  298. package/vgv2/es/{index-DK-aVwq5.js → index-Dy1kdc5b.js} +1 -1
  299. package/vgv2/es/{index-CFfew_Hr.js → index-OH40eW-t.js} +1 -1
  300. package/vgv2/es/{index-BAOSiCkF.js → index-oFKUHxJ1.js} +1 -1
  301. package/vgv2/es/index.js +1 -1
  302. package/vgv2/es/{styles-CYFBwqUu.js → styles-B2B95hc3.js} +1 -1
  303. package/vgv2/es/{styles-C1D_9t7l.js → styles-B6GKsM48.js} +1 -1
  304. package/vgv2/es/{styles-BEfPRcna.js → styles-BP1mlW3y.js} +1 -1
  305. package/vgv2/es/{styles-BPnYKeGp.js → styles-C8ervY_s.js} +1 -1
  306. package/{btv2/es/styles-BlLbcdMF.js → vgv2/es/styles-CLpzB4TP.js} +1 -1
  307. package/{btv2/es/styles-DEI95laR.js → vgv2/es/styles-CdXBCGzU.js} +1 -1
  308. package/vgv2/es/{styles-QY_ZMd8I.js → styles-CevEX1M3.js} +1 -1
  309. package/vgv2/es/{styles-BcpiLYlT.js → styles-D6-Q2fZt.js} +1 -1
  310. package/vgv2/es/{styles-D6HQ6xcn.js → styles-DOTBy6aM.js} +1 -1
  311. package/vgv2/es/{styles-C3B5JUB_.js → styles-Dqe1Vqpx.js} +1 -1
  312. package/vgv2/es/{styles-Dbde7ciA.js → styles-DuZv94it.js} +1 -1
  313. package/vgv2/es/{styles-CGoOi8H3.js → styles-DwuSyeJg.js} +1 -1
  314. package/vgv2/es/{styles-BeBDnUVA.js → styles-KY3tCqxT.js} +1 -1
  315. package/{btv2/es/styles-rgnDm1KE.js → vgv2/es/styles-uRcDFP1H.js} +1 -1
  316. package/vgv2/es/{styles-CC39I9et.js → styles-uYs9ct2S.js} +1 -1
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime");function t(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="vg",r="aftenposten",i="sa",o="bt",a="e24";class s{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:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class l{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class d{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 t(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,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===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class c extends d{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,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 u="[data-k5a-teaser-analytics]",g=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new c(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(u);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(u);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},v=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},p=(e,t)=>{console.warn("[Advertory WARN]: ",e)},f=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 v("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(v("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{v("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{v("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);v("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),h="no",y="se",m="cmp:loaded";let b="undefined"!=typeof window?window._tcf_:void 0,w=!1;const k=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(v("TCF bypass param detected, returning consent: true"),!0):(v("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(w)return null;if(!b)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=b.getConsentedToAllSync();return v(`TCF consented to all is: ${t}`),b.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(v("Getting TCF consent manager..."),window._tcf_)return v("TCF consent manager is already available"),b=window._tcf_,void e(b);v("TCF consent manager is not available");const n=()=>{v("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(b=window._tcf_,e(b)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(m,n),w=!0,t(new Error("Timeout waiting for CMP to load"))},o);v("Listening for CMP loaded event..."),document.addEventListener(m,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h;if(t||n)return v("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield f(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!b)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(()=>{v("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);b.onTcfReady(()=>{v("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),b.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class C{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return v("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E,O;var S=T(function(){if(O)return E;O=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)?s((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 i(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 o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},E=s}());const P=["placements","takeover","refreshConfig","editory"],A={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},I=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||p("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||p("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||p("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||p("pageContext.deviceType is required."),n||p("pageOptions is required."),r||p("placements is required."),(null==i?void 0:i.defaultThreshold)||p("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{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.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&p(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class j{set(e){I(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 P){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=S(j.DEFAULT_SITE_HANDLERS,e)}}j.DEFAULT_SITE_HANDLERS={siteEvents:A,initNativeAd:()=>{}};const L=new j;L.modifyConfigProperties.bind(L);const _=864e5,M=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return v("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=_)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=_)=>{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 v("Error with parsing localStorage data"),null}}}})(),x=e=>e.startsWith("glci_"),N=()=>{var e;return((e=[])=>e.filter(x))(null!==(e=(()=>{const e=M.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},U=/^glci_/,$="gender_",F="geo_",q="male",D="female",K=()=>t(void 0,void 0,void 0,function*(){try{const n=yield(e=500,t(void 0,void 0,void 0,function*(){return Promise.race([t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new C(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===q||o===D?`${$}${o}`:void 0}catch(e){return}var e}),B=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield K(),n=(()=>{const e=N().map(e=>`${F}${e.replace(U,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),R="front";class V{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===R?"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),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class H{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class J{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class W{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:d}}){if(!(null==e?void 0:e.instance))return;const c={[n]:new s,[a]:new V,[r]:new H,[o]:new z,[i]:new J}[d]||new l;g(e.instance,c,t)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield B();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(v(`Kilkaya event for slot: ${n}`),!n)return void v("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(v(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):v("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return v(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`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:i}=k(e,0,n);return(yield i())?(v(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(v(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");l&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},l,d,{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:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new W;yield t.run(e)});
1
+ "use strict";var e=require("react/jsx-runtime");function t(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="vg",r="sa",i="bt",o="e24";class a{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:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class s{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class l{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 t(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,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===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class d extends l{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,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 c="[data-k5a-teaser-analytics]",u=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new d(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(c);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(c);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},g=(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)},p=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 g("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(g("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{g("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{g("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);g("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),f="no",h="se",y="cmp:loaded";let m="undefined"!=typeof window?window._tcf_:void 0,b=!1;const w=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(g("TCF bypass param detected, returning consent: true"),!0):(g("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(b)return null;if(!m)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=m.getConsentedToAllSync();return g(`TCF consented to all is: ${t}`),m.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(g("Getting TCF consent manager..."),window._tcf_)return g("TCF consent manager is already available"),m=window._tcf_,void e(m);g("TCF consent manager is not available");const n=()=>{g("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(m=window._tcf_,e(m)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(y,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},o);g("Listening for CMP loaded event..."),document.addEventListener(y,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===f;if(t||n)return g("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield p(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!m)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(()=>{g("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);m.onTcfReady(()=>{g("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),m.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class k{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return g("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T,E;var O=C(function(){if(E)return T;E=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)?s((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 i(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 o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},T=s}());const S=["placements","takeover","refreshConfig","editory"],P={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},A=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=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==i?void 0:i.defaultThreshold)||v("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{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.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&v(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class I{set(e){A(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 S){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=O(I.DEFAULT_SITE_HANDLERS,e)}}I.DEFAULT_SITE_HANDLERS={siteEvents:P,initNativeAd:()=>{}};const j=new I;j.modifyConfigProperties.bind(j);const L=864e5,_=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return g("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=L)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=L)=>{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 g("Error with parsing localStorage data"),null}}}})(),M=e=>e.startsWith("glci_"),x=()=>{var e;return((e=[])=>e.filter(M))(null!==(e=(()=>{const e=_.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},N=/^glci_/,U="gender_",$="geo_",F="male",q="female",D=()=>t(void 0,void 0,void 0,function*(){try{const n=yield(e=500,t(void 0,void 0,void 0,function*(){return Promise.race([t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new k(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===F||o===q?`${U}${o}`:void 0}catch(e){return}var e}),K=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield D(),n=(()=>{const e=x().map(e=>`${$}${e.replace(N,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),B="front";class R{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===B?"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),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class V{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class H{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class z{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class J{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:l}}){if(!(null==e?void 0:e.instance))return;const d={[n]:new a,[o]:new R,"no-aftenposten":new V,[i]:new H,"no-bergenstidende":new H,[r]:new z,"no-stavangeraftenblad":new z}[l]||new s;u(e.instance,d,t)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield K();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(g(`Kilkaya event for slot: ${n}`),!n)return void g("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(g(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):g("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return g(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`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:i}=w(e,0,n);return(yield i())?(g(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(g(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");l&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},l,d,{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:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new J;yield t.run(e)});
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const r="vg",i="aftenposten",o="sa",a="bt",s="e24";class l{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:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class d{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class c{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 n(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,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===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class u extends c{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,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 g="[data-k5a-teaser-analytics]",v=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new u(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(g);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(g);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},p=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},f=(e,t)=>{console.warn("[Advertory WARN]: ",e)},h=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 i=e=>{r||(p("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{p("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{p("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);p("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),y="no",m="se",b="cmp:loaded";let w="undefined"!=typeof window?window._tcf_:void 0,k=!1;const C=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{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))(i,a))return!0;if(k)return null;if(!w)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=w.getConsentedToAllSync();return p(`TCF consented to all is: ${t}`),w.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"),w=window._tcf_,void e(w);p("TCF consent manager is not available");const n=()=>{p("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(w=window._tcf_,e(w)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(b,n),k=!0,t(new Error("Timeout waiting for CMP to load"))},o);p("Listening for CMP loaded event..."),document.addEventListener(b,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>n(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)&&r===m,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===y;if(t||n)return p("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield h(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!w)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);w.onTcfReady(()=>{p("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),w.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class T{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 n(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 n(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)}}function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O,S;var P=E(function(){if(S)return O;S=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)?s((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 i(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 o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},O=s}());const A=["placements","takeover","refreshConfig","editory"],I={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},j=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||f("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||f("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||f("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||f("pageContext.deviceType is required."),n||f("pageOptions is required."),r||f("placements is required."),(null==i?void 0:i.defaultThreshold)||f("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{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.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&f(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class L{set(e){j(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of A){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=P(L.DEFAULT_SITE_HANDLERS,e)}}L.DEFAULT_SITE_HANDLERS={siteEvents:I,initNativeAd:()=>{}};const _=new L;_.modifyConfigProperties.bind(_);const M=864e5,N=(()=>{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=M)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=M)=>{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}}}})(),U=e=>e.startsWith("glci_"),$=()=>{var e;return((e=[])=>e.filter(U))(null!==(e=(()=>{const e=N.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},F=/^glci_/,x="gender_",D="geo_",q="male",B="female",K=()=>n(void 0,void 0,void 0,function*(){try{const t=yield(e=500,n(void 0,void 0,void 0,function*(){return Promise.race([n(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)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new T(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===q||o===B?`${x}${o}`:void 0}catch(e){return}var e}),R=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield K(),n=(()=>{const e=$().map(e=>`${D}${e.replace(F,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),V="front";class H{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===V?"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),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class z{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class J{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class W{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class X{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const c={[r]:new l,[s]:new H,[i]:new z,[a]:new J,[o]:new W}[n]||new d;v(e.instance,c,t)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield R();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(p(`Kilkaya event for slot: ${n}`),!n)return void p("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(p(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):p("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){yield((e,...t)=>n(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 i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],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:i}=C(e,0,n);return(yield i())?(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)}))(i,o,a,"kilkaya");l&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}const G=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},Q=e=>n(void 0,void 0,void 0,function*(){const t=new X;yield t.run(e)});export{G as Kilkaya,Q as runKilkaya};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const r="vg",i="sa",o="bt",a="e24";class s{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:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class l{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class d{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 n(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,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===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class c extends d{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,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 u="[data-k5a-teaser-analytics]",g=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new c(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(u);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(u);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},v=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},p=(e,t)=>{console.warn("[Advertory WARN]: ",e)},f=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 v("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(v("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{v("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{v("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);v("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),h="no",y="se",m="cmp:loaded";let b="undefined"!=typeof window?window._tcf_:void 0,w=!1;const k=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(v("TCF bypass param detected, returning consent: true"),!0):(v("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(w)return null;if(!b)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=b.getConsentedToAllSync();return v(`TCF consented to all is: ${t}`),b.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(v("Getting TCF consent manager..."),window._tcf_)return v("TCF consent manager is already available"),b=window._tcf_,void e(b);v("TCF consent manager is not available");const n=()=>{v("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(b=window._tcf_,e(b)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(m,n),w=!0,t(new Error("Timeout waiting for CMP to load"))},o);v("Listening for CMP loaded event..."),document.addEventListener(m,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h;if(t||n)return v("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield f(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!b)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(()=>{v("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);b.onTcfReady(()=>{v("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),b.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class C{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 n(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 v("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(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)}}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E,O;var S=T(function(){if(O)return E;O=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)?s((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 i(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 o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},E=s}());const P=["placements","takeover","refreshConfig","editory"],A={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},I=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||p("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||p("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||p("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||p("pageContext.deviceType is required."),n||p("pageOptions is required."),r||p("placements is required."),(null==i?void 0:i.defaultThreshold)||p("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{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.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&p(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class j{set(e){I(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 P){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=S(j.DEFAULT_SITE_HANDLERS,e)}}j.DEFAULT_SITE_HANDLERS={siteEvents:A,initNativeAd:()=>{}};const L=new j;L.modifyConfigProperties.bind(L);const _=864e5,M=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return v("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=_)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=_)=>{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 v("Error with parsing localStorage data"),null}}}})(),N=e=>e.startsWith("glci_"),U=()=>{var e;return((e=[])=>e.filter(N))(null!==(e=(()=>{const e=M.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},$=/^glci_/,F="gender_",x="geo_",D="male",q="female",B=()=>n(void 0,void 0,void 0,function*(){try{const t=yield(e=500,n(void 0,void 0,void 0,function*(){return Promise.race([n(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)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new C(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===D||o===q?`${F}${o}`:void 0}catch(e){return}var e}),K=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield B(),n=(()=>{const e=U().map(e=>`${x}${e.replace($,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),R="front";class V{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===R?"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),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class H{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class J{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class W{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const d={[r]:new s,[a]:new V,"no-aftenposten":new H,[o]:new z,"no-bergenstidende":new z,[i]:new J,"no-stavangeraftenblad":new J}[n]||new l;g(e.instance,d,t)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield K();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(v(`Kilkaya event for slot: ${n}`),!n)return void v("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(v(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):v("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){yield((e,...t)=>n(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 i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return v(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`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:i}=k(e,0,n);return(yield i())?(v(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(v(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");l&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}const X=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},G=e=>n(void 0,void 0,void 0,function*(){const t=new W;yield t.run(e)});export{X as Kilkaya,G as runKilkaya};