@schibsted/advertory 3.16.1 → 3.16.2-inv-1408.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ad-native/cjs/index.d.ts +6 -0
- package/ad-native/cjs/index.js +1 -1
- package/ad-native/es/index.d.ts +6 -0
- package/ad-native/es/index.js +1 -1
- package/aftenposten/cjs/index.d.ts +6 -0
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-BXKlrxzg.js +1 -0
- package/aftenposten/es/events-D211I5Ap.js +1 -0
- package/aftenposten/es/index-BX6yYPUz.js +1 -0
- package/aftenposten/es/{index-CsMbuvbk.js → index-BcTsbzEx.js} +1 -1
- package/aftenposten/es/{index-MgWt_TgD.js → index-BeYF8XYG.js} +1 -1
- package/aftenposten/es/{index-BA-uAuq5.js → index-Bg_xb61R.js} +1 -1
- package/aftenposten/es/{index-FoC85Ozh.js → index-C9caE0v1.js} +1 -1
- package/aftenposten/es/{index--NjIeMtq.js → index-CC5RKt7Y.js} +1 -1
- package/aftenposten/es/{index-EH44nci2.js → index-F7WsW-pz.js} +1 -1
- package/aftenposten/es/{index-BVGbDJhd.js → index-V8bIJd__.js} +1 -1
- package/aftenposten/es/index.d.ts +6 -0
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-vnHs6WQc.js → styles-3CmAYh4Z.js} +1 -1
- package/aftenposten/es/{styles-U6Y_NE5t.js → styles-BBKdbdYh.js} +1 -1
- package/aftenposten/es/{styles-DbROuDap.js → styles-BrOhayKP.js} +1 -1
- package/aftenposten/es/{styles-kKKme7zm.js → styles-C-k3m7bP.js} +1 -1
- package/aftenposten/es/{styles-DzeNAXt8.js → styles-CDzTrn8x.js} +1 -1
- package/aftenposten/es/{styles-B6gcjTFZ.js → styles-CtVLtaf1.js} +1 -1
- package/aftenposten/es/{styles-BgLgXAac.js → styles-D18PJxH3.js} +1 -1
- package/aftenposten/es/{styles-DnzkzFYy.js → styles-DTAlvFdw.js} +1 -1
- package/aftenposten/es/{styles-CkvreCPA.js → styles-Rlufk7pt.js} +1 -1
- package/aftenposten/es/{styles-BOatZiuY.js → styles-T6LrMVmF.js} +1 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-CzckK7Tx.js +1 -0
- package/aftenpostenv2/es/events-CZsdX9ig.js +1 -0
- package/aftenpostenv2/es/index-AZBoSzq2.js +1 -0
- package/aftenpostenv2/es/{index-BD7C7fw5.js → index-Cg2svT9B.js} +1 -1
- package/aftenpostenv2/es/{index-DZ-pmGqE.js → index-Ch6WmPOM.js} +1 -1
- package/aftenpostenv2/es/{index-DB2YNAa3.js → index-DQVqjDYi.js} +1 -1
- package/aftenpostenv2/es/{index-ByqTDqyE.js → index-DcxHt1FP.js} +1 -1
- package/aftenpostenv2/es/{index-BniSDWQY.js → index-DzrYUR17.js} +1 -1
- package/aftenpostenv2/es/{index-Dx8UGDg7.js → index-RI9_Mevg.js} +1 -1
- package/aftenpostenv2/es/{index-DriKC_vw.js → index-d4g1x1YF.js} +1 -1
- package/aftenpostenv2/es/index.d.ts +6 -0
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-iyzS4Ma0.js → styles-0SwBMjdf.js} +1 -1
- package/aftenpostenv2/es/{styles-CJpZfRlb.js → styles-4uyQAyvi.js} +1 -1
- package/aftenpostenv2/es/{styles-DjKWfNks.js → styles-B0CAqpsk.js} +1 -1
- package/aftenpostenv2/es/{styles-BUE7bmeP.js → styles-BCdkKaoC.js} +1 -1
- package/aftenpostenv2/es/{styles-hV6a0b1r.js → styles-BS5sXHKh.js} +1 -1
- package/aftenpostenv2/es/{styles-Rtn-DTwE.js → styles-CA4LTUNF.js} +1 -1
- package/aftenpostenv2/es/{styles-DDeBWoDk.js → styles-CEVcRLNJ.js} +1 -1
- package/aftenpostenv2/es/{styles-CNqqdiG4.js → styles-CoUiIESI.js} +1 -1
- package/aftenpostenv2/es/{styles-W5GbsZdD.js → styles-KeNS2Hsi.js} +1 -1
- package/aftenpostenv2/es/{styles-DunKuWvX.js → styles-pDSXVzZW.js} +1 -1
- package/aftonbladet/cjs/index.d.ts +6 -0
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-BPaBFn6C.js +1 -0
- package/aftonbladet/es/events-BpMFJAnw.js +1 -0
- package/aftonbladet/es/index-C1tQdj07.js +1 -0
- package/aftonbladet/es/{index-jAChk_u0.js → index-C5oXYwyZ.js} +1 -1
- package/aftonbladet/es/{index-Bugwgjoa.js → index-C8kH9BNY.js} +1 -1
- package/aftonbladet/es/{index-qxHVT5-m.js → index-Ci1yWP9V.js} +1 -1
- package/aftonbladet/es/{index-OJZczvhD.js → index-DT0i3Gys.js} +1 -1
- package/aftonbladet/es/{index-BWw2Jrn7.js → index-DwbyUff9.js} +1 -1
- package/aftonbladet/es/{index-Dt0MASUp.js → index-nImWoPld.js} +1 -1
- package/aftonbladet/es/{index-utB-ictd.js → index-pnGDnf33.js} +1 -1
- package/aftonbladet/es/index.d.ts +6 -0
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-Dsz5cfi3.js → styles-BT3P_BAA.js} +1 -1
- package/aftonbladet/es/{styles-gDX0ygo6.js → styles-Cimvo62B.js} +1 -1
- package/aftonbladet/es/{styles-BtWT613k.js → styles-DS8Yl2Qt.js} +1 -1
- package/aftonbladet/es/{styles-BvHu62wy.js → styles-DliHcWtZ.js} +1 -1
- package/aftonbladet/es/{styles-BfU0oD0-.js → styles-L5daSFFW.js} +1 -1
- package/aftonbladet/es/{styles-ByZpua9r.js → styles-Mrn36ik-.js} +1 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-BRId2Y1J.js +1 -0
- package/aftonbladetv2/es/events-CPEt9P2g.js +1 -0
- package/aftonbladetv2/es/{index-CCktfCvC.js → index-B5nTw6xa.js} +1 -1
- package/aftonbladetv2/es/index-BZdQmXaD.js +1 -0
- package/aftonbladetv2/es/{index-BO-lR9nN.js → index-Bzy67ItD.js} +1 -1
- package/aftonbladetv2/es/{index-DSHSFVOb.js → index-C_11A-Ib.js} +1 -1
- package/aftonbladetv2/es/{index-3Eg4bvN_.js → index-DRHAHzer.js} +1 -1
- package/aftonbladetv2/es/{index-DM-UfNNR.js → index-DmPAOxDI.js} +1 -1
- package/aftonbladetv2/es/{index-XSC5wNbQ.js → index-aTk1aLLT.js} +1 -1
- package/aftonbladetv2/es/{index-B1cui3dt.js → index-xncoa8xP.js} +1 -1
- package/aftonbladetv2/es/index.d.ts +6 -0
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-C-DpQ4RN.js → styles-8JJ319C6.js} +1 -1
- package/aftonbladetv2/es/{styles-CFZMoqbF.js → styles-BaboIBwO.js} +1 -1
- package/aftonbladetv2/es/{styles-wCf8sRxI.js → styles-Bf8PjrzW.js} +1 -1
- package/aftonbladetv2/es/{styles-BOaYZk7z.js → styles-JhJXyRN_.js} +1 -1
- package/aftonbladetv2/es/{styles-C7hRmfCU.js → styles-YNed2DXr.js} +1 -1
- package/aftonbladetv2/es/{styles-BFd21r21.js → styles-eiHDtftU.js} +1 -1
- package/bt/cjs/index.d.ts +6 -0
- package/bt/cjs/index.js +1 -1
- package/bt/es/_auto-entry_bt-B92Y43Bu.js +1 -0
- package/bt/es/events-LIemYc0l.js +1 -0
- package/{sa/es/index-CyyVcWqy.js → bt/es/index-BWLe2vVN.js} +1 -1
- package/bt/es/{index-C02orzbP.js → index-C1T4s3at.js} +1 -1
- package/bt/es/index-CNIzoYMN.js +1 -0
- package/bt/es/{index-Bg3TR55E.js → index-CR6YDFCE.js} +1 -1
- package/bt/es/{index-CInJ1xs9.js → index-CcTuY-J4.js} +1 -1
- package/bt/es/{index-DBw0XYaH.js → index-Cp9MLD0V.js} +1 -1
- package/bt/es/{index-JHvfgnk5.js → index-DaL6cSoE.js} +1 -1
- package/bt/es/{index-81Oz-qGy.js → index-zVjG1QIj.js} +1 -1
- package/bt/es/index.d.ts +6 -0
- package/bt/es/index.js +1 -1
- package/bt/es/{styles-DeBo1zSc.js → styles-B53nZ7Xn.js} +1 -1
- package/bt/es/{styles-BtKlcdvg.js → styles-BW2MNunQ.js} +1 -1
- package/bt/es/{styles-BxDsJfWn.js → styles-C3WSh1y8.js} +1 -1
- package/bt/es/{styles-Bl-Xa0ds.js → styles-CMZftYPj.js} +1 -1
- package/bt/es/{styles-D4kL714Y.js → styles-CtAmbHY-.js} +1 -1
- package/bt/es/{styles-CM32ZnCk.js → styles-D6ZGg9Yp.js} +1 -1
- package/bt/es/{styles-C99hwDpY.js → styles-Dz8BAJPG.js} +1 -1
- package/bt/es/{styles-DXyo7Fs5.js → styles-gdTvjyW1.js} +1 -1
- package/{sa/es/styles-CHsNl2Mc.js → bt/es/styles-ykJgbh5T.js} +1 -1
- package/btv2/es/_auto-entry_btv2-DVjRMzIB.js +1 -0
- package/btv2/es/events-CWzVAzc9.js +1 -0
- package/btv2/es/{index-BAuez-R4.js → index-BAJI59QE.js} +1 -1
- package/btv2/es/{index-DR8jG0pq.js → index-BYi9ivka.js} +1 -1
- package/{sav2/es/index-CPDnPdKS.js → btv2/es/index-CAzWcDE9.js} +1 -1
- package/btv2/es/{index-DcuLYQyJ.js → index-CTadf8bt.js} +1 -1
- package/btv2/es/{index-BleJMqM8.js → index-Cdq1VBEi.js} +1 -1
- package/btv2/es/index-DFX2RYZW.js +1 -0
- package/btv2/es/{index-ESsS5hjq.js → index-DISydOUr.js} +1 -1
- package/btv2/es/{index-D90U_1Qo.js → index-Dn0TTdgB.js} +1 -1
- package/btv2/es/index.d.ts +6 -0
- package/btv2/es/index.js +1 -1
- package/btv2/es/{styles-CBjR7FnE.js → styles-B1JQ13nO.js} +1 -1
- package/{sav2/es/styles-B4aRq6IG.js → btv2/es/styles-BaVQkaPQ.js} +1 -1
- package/{sav2/es/styles-C4fHpc7i.js → btv2/es/styles-EEg9ylqh.js} +1 -1
- package/btv2/es/{styles-D8De12bq.js → styles-KYIYGVsk.js} +1 -1
- package/btv2/es/{styles-BRhHEVrd.js → styles-Y0XhxLyI.js} +1 -1
- package/btv2/es/{styles-D-pB6fGr.js → styles-bLVpNHoZ.js} +1 -1
- package/btv2/es/{styles-ud_EY6B3.js → styles-cXvCbLIf.js} +1 -1
- package/{sav2/es/styles-DOEtsbP-.js → btv2/es/styles-lS6gsMjS.js} +1 -1
- package/e24/es/_auto-entry_e24-DWq1h0ZP.js +1 -0
- package/e24/es/events-0JDh94fh.js +1 -0
- package/e24/es/{index-DnMmQpmq.js → index-BdIYeRWB.js} +1 -1
- package/e24/es/{index-BNA5NZfB.js → index-Btbwppqg.js} +1 -1
- package/e24/es/{index-DEI-wJhu.js → index-C-8xBLeE.js} +1 -1
- package/e24/es/{index-CXlRMveE.js → index-CmLsoICa.js} +1 -1
- package/e24/es/{index-CevbMYIC.js → index-D5brOEgD.js} +1 -1
- package/e24/es/index-DNga4Y2s.js +1 -0
- package/e24/es/{index-CWIhbVPw.js → index-DOqXmvcI.js} +1 -1
- package/e24/es/{index-Bi6PDC4c.js → index-Duf-sZYj.js} +1 -1
- package/e24/es/index.d.ts +6 -0
- package/e24/es/index.js +1 -1
- package/e24/es/{styles-Cl9qoAPs.js → styles-BMYDX5VC.js} +1 -1
- package/e24/es/{styles-BO7pwS_U.js → styles-BZmNZ9KT.js} +1 -1
- package/e24/es/{styles-rncULcNW.js → styles-BrL5pIif.js} +1 -1
- package/e24/es/{styles-DJAMs49M.js → styles-C0M8dUN-.js} +1 -1
- package/e24/es/{styles-CIpLr1xP.js → styles-CgNO3qR6.js} +1 -1
- package/e24/es/{styles-C9DgPMO0.js → styles-Dep1Ut0H.js} +1 -1
- package/e24/es/{styles-CHfJkS4o.js → styles-DtFfqh6Q.js} +1 -1
- package/{tv4/es/styles-N6wd6A_B.js → e24/es/styles-DwGJJyF-.js} +1 -1
- package/e24/es/{styles-CD9vs2Ja.js → styles-RIH-F6Ya.js} +1 -1
- package/e24/es/{styles-BL3psmJI.js → styles-SFFQMCDn.js} +1 -1
- package/e24/es/{styles-BPI4B5gA.js → styles-kGzLW0io.js} +1 -1
- package/editory/cjs/index.d.ts +6 -0
- package/editory/es/index.d.ts +6 -0
- package/fotbollskanalen/cjs/index.d.ts +6 -0
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-CKZFGoi6.js +1 -0
- package/fotbollskanalen/es/events-CV3oqOTn.js +1 -0
- package/fotbollskanalen/es/{index-DOn9ov7p.js → index-BOBvrHMi.js} +1 -1
- package/fotbollskanalen/es/{index-DwPddK-e.js → index-Bfxfefwt.js} +1 -1
- package/fotbollskanalen/es/{index-My4323ov.js → index-CFPdd2f5.js} +1 -1
- package/fotbollskanalen/es/{index-lcwcTlOs.js → index-CGS4zHX0.js} +1 -1
- package/fotbollskanalen/es/{index-Cr8Mal6K.js → index-CuwquC2l.js} +1 -1
- package/fotbollskanalen/es/index-E_fJE7Hz.js +1 -0
- package/fotbollskanalen/es/{index-BRVt_-Mn.js → index-bfTjOlO5.js} +1 -1
- package/fotbollskanalen/es/{index-DVeOnxq3.js → index-boTiRV55.js} +1 -1
- package/fotbollskanalen/es/index.d.ts +6 -0
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-DZEYG8hY.js → styles-BHYR3GoX.js} +1 -1
- package/fotbollskanalen/es/{styles-D457Igc-.js → styles-BQ--e-Vn.js} +1 -1
- package/fotbollskanalen/es/{styles-CQtxVBX-.js → styles-D_sj5Vzh.js} +1 -1
- package/fotbollskanalen/es/{styles-B8RWIS0n.js → styles-Pl2Sjudv.js} +1 -1
- package/godt/cjs/index.d.ts +6 -0
- package/godt/cjs/index.js +1 -1
- package/kilkaya/cjs/index.d.ts +4 -0
- package/kilkaya/cjs/index.js +1 -1
- package/kilkaya/es/index.d.ts +4 -0
- package/kilkaya/es/index.js +1 -1
- package/klart/cjs/index.d.ts +6 -0
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.d.ts +6 -0
- package/koket/cjs/index.js +1 -1
- package/koket/es/_auto-entry_koket-CFp4FLhm.js +1 -0
- package/koket/es/events-31ZPY4Pa.js +1 -0
- package/{svdv2/es/index-CDAstSaK.js → koket/es/index-1_enYyl-.js} +1 -1
- package/koket/es/{index-DiS6pnqp.js → index-BFMzCvOm.js} +1 -1
- package/koket/es/{index-DyKqdWUd.js → index-BHIXSeiq.js} +1 -1
- package/koket/es/index-CBUaWLqH.js +1 -0
- package/koket/es/{index-CQG7p8FU.js → index-CSuGki7X.js} +1 -1
- package/koket/es/{index-B8eeceuk.js → index-DThD_76X.js} +1 -1
- package/koket/es/{index-CbF7vThc.js → index-KO8jArcb.js} +1 -1
- package/koket/es/{index-DUcH6MTv.js → index-gEcW_X4C.js} +1 -1
- package/koket/es/index.d.ts +6 -0
- package/koket/es/index.js +1 -1
- package/koket/es/{styles-CYIKwjx2.js → styles-4-GT-6MM.js} +1 -1
- package/{svdv2/es/styles-H5EW2MNs.js → koket/es/styles-B3_Cph0L.js} +1 -1
- package/koket/es/{styles-CH964apH.js → styles-TfEbRDgH.js} +1 -1
- package/{svdv2/es/styles-BUKp899c.js → koket/es/styles-qQbzU3RU.js} +1 -1
- package/minmote/cjs/index.d.ts +6 -0
- package/minmote/cjs/index.js +1 -1
- package/mtv/es/_auto-entry_mtv-yFNqxz-D.js +1 -0
- package/mtv/es/events-DDuvw29t.js +1 -0
- package/mtv/es/index-CRqQ_AH0.js +1 -0
- package/mtv/es/{index-DU7dK1tv.js → index-CYNZS9We.js} +1 -1
- package/mtv/es/{index-CCxLaTeK.js → index-C_XU8kvn.js} +1 -1
- package/mtv/es/{index-B5JHZdJ_.js → index-CkB0DZNt.js} +1 -1
- package/mtv/es/{index-CHACHVva.js → index-DYHIsJfx.js} +1 -1
- package/mtv/es/{index-FOfQp-cn.js → index-DhrVYtj7.js} +1 -1
- package/{svd/es/index-BLUgliOO.js → mtv/es/index-Dz88TrQM.js} +1 -1
- package/mtv/es/{index-62ZhEiLS.js → index-cMb8HWfK.js} +1 -1
- package/mtv/es/index.d.ts +6 -0
- package/mtv/es/index.js +1 -1
- package/omni/es/_auto-entry_omni-BohAFTHk.js +1 -0
- package/omni/es/events-Cz6K6ltU.js +1 -0
- package/omni/es/{index-B9uQXXEv.js → index-BMEcVMDq.js} +1 -1
- package/omni/es/{index-DDjGpUEr.js → index-BQJHnf4j.js} +1 -1
- package/{tvnu/es/index-C3xnIzU_.js → omni/es/index-CZb60Gl7.js} +1 -1
- package/omni/es/{index-BTgrUU-i.js → index-DXgyn_9M.js} +1 -1
- package/omni/es/{index-BXtYpATo.js → index-DbSsX6rE.js} +1 -1
- package/{tvnu/es/index-C4WAB55h.js → omni/es/index-DbkqnPPJ.js} +1 -1
- package/omni/es/{index-D69As6fp.js → index-Kc14qwo7.js} +1 -1
- package/omni/es/index-hxx-nCeI.js +1 -0
- package/omni/es/index.d.ts +6 -0
- package/omni/es/index.js +1 -1
- package/omni/es/{styles-BA5p-L5N.js → styles-DQ1NUt28.js} +1 -1
- package/omni/es/{styles-DOcAV6ju.js → styles-jbZ1DDYh.js} +1 -1
- package/package.json +1 -1
- package/pent/cjs/index.d.ts +6 -0
- package/pent/cjs/index.js +1 -1
- package/sa/cjs/index.d.ts +6 -0
- package/sa/cjs/index.js +1 -1
- package/sa/es/_auto-entry_sa-BUtvk016.js +1 -0
- package/sa/es/events-D9u8U6oQ.js +1 -0
- package/sa/es/index-4uWa0cMd.js +1 -0
- package/sa/es/{index-BX40s81H.js → index-BSLsBFpt.js} +1 -1
- package/{bt/es/index-CTbYJElV.js → sa/es/index-BTUci2GD.js} +1 -1
- package/sa/es/{index-Cr-FUyBl.js → index-BYu14TaT.js} +1 -1
- package/sa/es/{index-C24tchc6.js → index-CHScCCrI.js} +1 -1
- package/sa/es/{index-o90qAp4u.js → index-D2Ln5F1a.js} +1 -1
- package/sa/es/{index-D4L1qme2.js → index-DMy3dyZE.js} +1 -1
- package/sa/es/{index-CUpj-JB4.js → index-b-RRet8T.js} +1 -1
- package/sa/es/index.d.ts +6 -0
- package/sa/es/index.js +1 -1
- package/sa/es/{styles-CxPsuwAd.js → styles-2lTXPUFp.js} +1 -1
- package/{vg/es/styles-BGZm-9jT.js → sa/es/styles-BKNlqej_.js} +1 -1
- package/sa/es/{styles-B2vQP2K8.js → styles-BtkFTAHm.js} +1 -1
- package/sa/es/{styles-CfUywXvc.js → styles-C0A6Pare.js} +1 -1
- package/sa/es/{styles-s8Z00lKl.js → styles-DAjTauwS.js} +1 -1
- package/sa/es/{styles-Cqr_RRge.js → styles-LN-yk9D_.js} +1 -1
- package/sa/es/{styles-D2LetjR-.js → styles-_5P9fRbC.js} +1 -1
- package/{vg/es/styles-B5V4FI_M.js → sa/es/styles-iJOSfkEc.js} +1 -1
- package/sa/es/{styles-B2HTeuqJ.js → styles-rJUIIzUG.js} +1 -1
- package/sav2/es/_auto-entry_sav2-hNny4WcQ.js +1 -0
- package/sav2/es/events-DiVerwiD.js +1 -0
- package/sav2/es/index-B-YIZJgl.js +1 -0
- package/sav2/es/{index-ByTXDT_0.js → index-BLc8QxpD.js} +1 -1
- package/sav2/es/{index-BC5EQ5Ki.js → index-BfR4Reu1.js} +1 -1
- package/{omni/es/index-9bwaIdG0.js → sav2/es/index-Bgt6S2pK.js} +1 -1
- package/{tvnu/es/index-D10N_Zgv.js → sav2/es/index-By3vGrsd.js} +1 -1
- package/sav2/es/{index-WaOZoUNd.js → index-D6X3dyhA.js} +1 -1
- package/sav2/es/{index-mPgiXuj_.js → index-DHIl7aM3.js} +1 -1
- package/{omni/es/index-BW4d0akI.js → sav2/es/index-DJ7Uvxm-.js} +1 -1
- package/sav2/es/index.d.ts +6 -0
- package/sav2/es/index.js +1 -1
- package/sav2/es/{styles-B1UQfDYG.js → styles-7ZAoF9Ss.js} +1 -1
- package/{btv2/es/styles-DRddXCLA.js → sav2/es/styles-BTpLL_gU.js} +1 -1
- package/sav2/es/{styles-Ch2FCI84.js → styles-CGmceQc6.js} +1 -1
- package/sav2/es/{styles-CnzK_mxw.js → styles-CY1yA4qk.js} +1 -1
- package/{vgv2/es/styles-DELeZqx6.js → sav2/es/styles-CfGxiZQA.js} +1 -1
- package/sav2/es/{styles-DdbJdwhY.js → styles-D9ATo0Sb.js} +1 -1
- package/{vgv2/es/styles-mGmN7rNj.js → sav2/es/styles-DBPVAz0o.js} +1 -1
- package/sav2/es/{styles-BgGC9MUo.js → styles-DSUfSJp3.js} +1 -1
- package/svd/cjs/index.d.ts +6 -0
- package/svd/cjs/index.js +1 -1
- package/svd/es/_auto-entry_svd-CPvMsmZD.js +1 -0
- package/svd/es/events-P9-hiBsX.js +1 -0
- package/svd/es/{index-DrXg3pVq.js → index-B1SNvfK2.js} +1 -1
- package/{mtv/es/index-CtlqPalQ.js → svd/es/index-BfK3wh1b.js} +1 -1
- package/svd/es/{index-B0Iu8vXY.js → index-BxKwBjGZ.js} +1 -1
- package/svd/es/index-ByAq4nWP.js +1 -0
- package/svd/es/{index-DMzJ_nHd.js → index-C94JyJ4K.js} +1 -1
- package/svd/es/{index-B1METJ1o.js → index-D4UsJ_qp.js} +1 -1
- package/svd/es/{index-B_0eYGGR.js → index-D7EcR8mv.js} +1 -1
- package/svd/es/{index-B4iY0GvE.js → index-mWlxS9uy.js} +1 -1
- package/svd/es/index.d.ts +6 -0
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-S2TTOwZN.js → styles-B7t_3dac.js} +1 -1
- package/svd/es/{styles-Cztov_Wv.js → styles-BZoT3V2n.js} +1 -1
- package/svd/es/{styles-D_77In5Q.js → styles-C9-JlqFl.js} +1 -1
- package/svd/es/{styles-C7zlSwvb.js → styles-ClRf5q9O.js} +1 -1
- package/svd/es/{styles-Bw2I5Pno.js → styles-CnYIQUxb.js} +1 -1
- package/svd/es/{styles-CMm02bEb.js → styles-CtclPes5.js} +1 -1
- package/svdv2/es/_auto-entry_svdv2-Ba-lsBXt.js +1 -0
- package/svdv2/es/events-eXTtxcYg.js +1 -0
- package/svdv2/es/{index--fJ82juM.js → index-B7eMinxC.js} +1 -1
- package/svdv2/es/{index-BRFrDRYx.js → index-BrIoqigd.js} +1 -1
- package/svdv2/es/{index-CAsNKuIv.js → index-CTFlFvL7.js} +1 -1
- package/svdv2/es/{index-B6wuVCpl.js → index-CbdjXfCM.js} +1 -1
- package/{koket/es/index-DRjNvGuy.js → svdv2/es/index-Cjwbyeka.js} +1 -1
- package/svdv2/es/{index-Biygcry-.js → index-D98_Piku.js} +1 -1
- package/svdv2/es/{index-BjBJaPcv.js → index-DJCvy8l9.js} +1 -1
- package/svdv2/es/index-rLit3deu.js +1 -0
- package/svdv2/es/index.d.ts +6 -0
- package/svdv2/es/index.js +1 -1
- package/{koket/es/styles-87UmJ0fd.js → svdv2/es/styles-7Iecx_xZ.js} +1 -1
- package/svdv2/es/{styles-CjYRO2UV.js → styles-BuL4fy5M.js} +1 -1
- package/svdv2/es/{styles-DPA1dHCJ.js → styles-CcqqghAC.js} +1 -1
- package/{koket/es/styles-DPzIWi6-.js → svdv2/es/styles-D1CKRif-.js} +1 -1
- package/svdv2/es/{styles-DcRNPjTa.js → styles-EgRNRgE_.js} +1 -1
- package/svdv2/es/{styles-Dc1aKfSv.js → styles-fSE-faGc.js} +1 -1
- package/svdv2/es/{styles-DFmU-6t8.js → styles-rAy-bUBF.js} +1 -1
- package/tek/cjs/index.d.ts +6 -0
- package/tek/cjs/index.js +1 -1
- package/tracker/cjs/index.d.ts +4 -0
- package/tracker/es/index.d.ts +4 -0
- package/tv4/cjs/index.d.ts +6 -0
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/_auto-entry_tv4-B4h6_irD.js +1 -0
- package/tv4/es/events-CROWbECG.js +1 -0
- package/tv4/es/index--QRSY0CI.js +1 -0
- package/tv4/es/{index-BxNrZ8Yf.js → index-BVz2akfe.js} +1 -1
- package/tv4/es/{index-ghGeOxNq.js → index-BeYyEv2O.js} +1 -1
- package/tv4/es/{index-HYqE7h04.js → index-D-1AxAus.js} +1 -1
- package/tv4/es/{index-DvOZYkPa.js → index-D6ofqyb0.js} +1 -1
- package/tv4/es/{index-Db5YHoZP.js → index-Dg_msfaF.js} +1 -1
- package/tv4/es/{index-KvBxcsvd.js → index-DxvUcUel.js} +1 -1
- package/tv4/es/{index-B2vpMEPe.js → index-YTzgv3M6.js} +1 -1
- package/tv4/es/index.d.ts +6 -0
- package/tv4/es/index.js +1 -1
- package/tv4/es/{styles-BUyPd9Y0.js → styles-BHFMghib.js} +1 -1
- package/tv4/es/{styles-DCjlr5xQ.js → styles-CNXWwQZG.js} +1 -1
- package/tv4/es/{styles-B-DC8wXs.js → styles-CSmvFcP5.js} +1 -1
- package/{e24/es/styles-JdFLdy5Z.js → tv4/es/styles-C_BG4Hdl.js} +1 -1
- package/tvnu/cjs/index.d.ts +6 -0
- package/tvnu/cjs/index.js +1 -1
- package/tvnu/es/_auto-entry_tvnu-C3CpXv1q.js +1 -0
- package/tvnu/es/events-BNzRNX_D.js +1 -0
- package/{sav2/es/index-DNZIrN_q.js → tvnu/es/index-B0kAvUxo.js} +1 -1
- package/tvnu/es/index-B8EoAzQu.js +1 -0
- package/{sav2/es/index-yMvxNIY0.js → tvnu/es/index-BAOavej2.js} +1 -1
- package/tvnu/es/{index-DyTc9ILh.js → index-C4JGUT_d.js} +1 -1
- package/{btv2/es/index-DE84wIEB.js → tvnu/es/index-CJTV91qk.js} +1 -1
- package/tvnu/es/{index-CSHenyQ5.js → index-CU0oVV9Y.js} +1 -1
- package/tvnu/es/{index-DmOrGvYz.js → index-CkvNEzJ2.js} +1 -1
- package/{vgv2/es/index-DdgcFF8X.js → tvnu/es/index-DDK7Zxrk.js} +1 -1
- package/tvnu/es/index.d.ts +6 -0
- package/tvnu/es/index.js +1 -1
- package/{btv2/es/styles-DeMpu9UC.js → tvnu/es/styles-B_C8wEgm.js} +1 -1
- package/tvnu/es/{styles--UYsw4aM.js → styles-Cf6yxkMW.js} +1 -1
- package/tvnu/es/{styles-C3fwDL-v.js → styles-N-3vcOab.js} +1 -1
- package/types/index.d.ts +6 -0
- package/vg/cjs/index.d.ts +6 -0
- package/vg/cjs/index.js +1 -1
- package/vg/es/_auto-entry_vg-Q6EH7eyb.js +1 -0
- package/vg/es/events-B4u5kM7V.js +1 -0
- package/vg/es/{index--wXT3-oU.js → index-50N-UzHK.js} +1 -1
- package/vg/es/index-BVtsedgL.js +1 -0
- package/vg/es/{index-7QAcfKPx.js → index-Bb4IHq-a.js} +1 -1
- package/vg/es/{index-C6lcq7AL.js → index-C_Cof7Ms.js} +1 -1
- package/vg/es/{index-4grZKfL5.js → index-ChI170oa.js} +1 -1
- package/vg/es/{index-DntkqQFS.js → index-DTNpbiOK.js} +1 -1
- package/vg/es/{index-0fVLBcRa.js → index-DyIVUzQj.js} +1 -1
- package/vg/es/{index-yUtgdiUg.js → index-NM45bay4.js} +1 -1
- package/vg/es/index.d.ts +6 -0
- package/vg/es/index.js +1 -1
- package/vg/es/{styles-BRu4TSPJ.js → styles-BPadKLLq.js} +1 -1
- package/vg/es/{styles-5MAzs4Zu.js → styles-BTspwHMU.js} +1 -1
- package/vg/es/{styles-vl99wLbR.js → styles-BZniWaQl.js} +1 -1
- package/vg/es/{styles-B0UF7LfE.js → styles-CNynTFmG.js} +1 -1
- package/vg/es/{styles-BN1Q3jGC.js → styles-CYnVW3wV.js} +1 -1
- package/{sa/es/styles-CzYN_LTX.js → vg/es/styles-C_xlmDoB.js} +1 -1
- package/vg/es/{styles-CJthc8yt.js → styles-Ch3A8uUb.js} +1 -1
- package/vg/es/{styles-8GyQTQgv.js → styles-Ch5oLMN3.js} +1 -1
- package/vg/es/{styles-BJMVnrSG.js → styles-Cl0Ua9X1.js} +1 -1
- package/vg/es/{styles-C1WJ3vz7.js → styles-DGh699xB.js} +1 -1
- package/vg/es/{styles-86UDRaJW.js → styles-DoYi5Bdk.js} +1 -1
- package/{bt/es/styles--PbZr0ha.js → vg/es/styles-Ds7_g2po.js} +1 -1
- package/vg/es/{styles-DBnEP0fU.js → styles-GVy9R8oe.js} +1 -1
- package/vg/es/{styles-DNhpQVYO.js → styles-J5fyX781.js} +1 -1
- package/vg/es/{styles-C6Is07pg.js → styles-SGEMycmA.js} +1 -1
- package/vgv2/es/_auto-entry_vgv2-B8zvmSHB.js +1 -0
- package/vgv2/es/events-DSCUhOVD.js +1 -0
- package/vgv2/es/{index-BBWjZxsJ.js → index-A0pj20HQ.js} +1 -1
- package/{tvnu/es/index-C2YotjJU.js → vgv2/es/index-B7UXb2sa.js} +1 -1
- package/vgv2/es/index-Bhk-nlve.js +1 -0
- package/vgv2/es/{index-DEn2V_8g.js → index-Cr8H-0sx.js} +1 -1
- package/vgv2/es/{index-Bu60pgL9.js → index-DG1QfmeI.js} +1 -1
- package/vgv2/es/index-DMiOBLNE.js +1 -0
- package/vgv2/es/{index-Dl_xMnPv.js → index-KnEZC6xh.js} +1 -1
- package/vgv2/es/{index-DWFmomps.js → index-QcLiIMws.js} +1 -1
- package/vgv2/es/index.d.ts +6 -0
- package/vgv2/es/index.js +1 -1
- package/vgv2/es/{styles-HDvKLHsD.js → styles-B3pHpm9u.js} +1 -1
- package/vgv2/es/{styles-MXrAxOVD.js → styles-B5oHB1YL.js} +1 -1
- package/vgv2/es/{styles-BFeY1omF.js → styles-BUTVo0Bt.js} +1 -1
- package/vgv2/es/{styles-COz3RfmR.js → styles-BYDVEBuR.js} +1 -1
- package/vgv2/es/{styles-Cmc8MKa3.js → styles-Bh7Wt8c9.js} +1 -1
- package/vgv2/es/{styles-By6TnGB5.js → styles-BpShvMwo.js} +1 -1
- package/vgv2/es/{styles-Bl_9N8LI.js → styles-CLR9WKRh.js} +1 -1
- package/vgv2/es/{styles-DT7y8IAa.js → styles-CxSfynjB.js} +1 -1
- package/vgv2/es/{styles-0x-jssVm.js → styles-DIwLZo_G.js} +1 -1
- package/vgv2/es/{styles-B2AEj_Tc.js → styles-DSz-HOWp.js} +1 -1
- package/{tvnu/es/styles-CK4taMCz.js → vgv2/es/styles-Df1CqzQb.js} +1 -1
- package/vgv2/es/{styles-xB4_HpKs.js → styles-Jeksf4Vr.js} +1 -1
- package/vgv2/es/{styles-BpuYPyfl.js → styles-MSPC8il5.js} +1 -1
- package/vgv2/es/{styles-C_XPLUFA.js → styles-TPGSF-L1.js} +1 -1
- package/{btv2/es/styles-CbJDTmCV.js → vgv2/es/styles-dBOW2sqc.js} +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-GZ1sIv1t.js +0 -1
- package/aftenposten/es/events-9aIAp3gb.js +0 -1
- package/aftenposten/es/index-30zysrFs.js +0 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-CaNJKb4R.js +0 -1
- package/aftenpostenv2/es/events-BvPoR-c6.js +0 -1
- package/aftenpostenv2/es/index-HPe6c_F5.js +0 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-Bfy9UWBs.js +0 -1
- package/aftonbladet/es/events-B2qPC0JI.js +0 -1
- package/aftonbladet/es/index-CJwtf88D.js +0 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-IvxL0Pnz.js +0 -1
- package/aftonbladetv2/es/events-69bfW6xs.js +0 -1
- package/aftonbladetv2/es/index-DxWp479k.js +0 -1
- package/bt/es/_auto-entry_bt-tWNc5glw.js +0 -1
- package/bt/es/events-DTmcdrxG.js +0 -1
- package/bt/es/index-C3TLCBe7.js +0 -1
- package/btv2/es/_auto-entry_btv2-nAWn20u1.js +0 -1
- package/btv2/es/events-BnQ0qhIr.js +0 -1
- package/btv2/es/index-mey4R2Qb.js +0 -1
- package/e24/es/_auto-entry_e24-DvdknnzM.js +0 -1
- package/e24/es/events-Rm1n0noG.js +0 -1
- package/e24/es/index-CGLozHmr.js +0 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DPyblSMF.js +0 -1
- package/fotbollskanalen/es/events-D6ksBWHo.js +0 -1
- package/fotbollskanalen/es/index-LYi5uIYu.js +0 -1
- package/koket/es/_auto-entry_koket-DUVKlIP1.js +0 -1
- package/koket/es/events-Cz_3ieSv.js +0 -1
- package/koket/es/index-BoYKeek-.js +0 -1
- package/mtv/es/_auto-entry_mtv-SFi7HmQz.js +0 -1
- package/mtv/es/events-Efp-IsoA.js +0 -1
- package/mtv/es/index-DRSCuKvn.js +0 -1
- package/omni/es/_auto-entry_omni-DViPCAlv.js +0 -1
- package/omni/es/events-LRAT_Bvo.js +0 -1
- package/omni/es/index-BhFw5lTE.js +0 -1
- package/sa/es/_auto-entry_sa-DeD3MVP7.js +0 -1
- package/sa/es/events-BecgCWsy.js +0 -1
- package/sa/es/index-BwMYBcbq.js +0 -1
- package/sav2/es/_auto-entry_sav2-Db0fRSt6.js +0 -1
- package/sav2/es/events-DNGKF8ss.js +0 -1
- package/sav2/es/index-C64lmG2i.js +0 -1
- package/svd/es/_auto-entry_svd-WUu3yvXG.js +0 -1
- package/svd/es/events-DwWjYZVp.js +0 -1
- package/svd/es/index-CkyGbTvE.js +0 -1
- package/svdv2/es/_auto-entry_svdv2-DR7G4Tmi.js +0 -1
- package/svdv2/es/events-CnhlqoBJ.js +0 -1
- package/svdv2/es/index-BPZlMFDy.js +0 -1
- package/tv4/es/_auto-entry_tv4-FaljvrBE.js +0 -1
- package/tv4/es/events-DefiGdDS.js +0 -1
- package/tv4/es/index-KFLtqJjc.js +0 -1
- package/tvnu/es/_auto-entry_tvnu-DMZPquXT.js +0 -1
- package/tvnu/es/events-Dqb-GF2f.js +0 -1
- package/tvnu/es/index-B6cU8hsW.js +0 -1
- package/vg/es/_auto-entry_vg-1XkGX2QP.js +0 -1
- package/vg/es/events-Dh51wHYO.js +0 -1
- package/vg/es/index-jA-C4Ij5.js +0 -1
- package/vgv2/es/_auto-entry_vgv2-DvxBVvmD.js +0 -1
- package/vgv2/es/events-C2yf-22F.js +0 -1
- package/vgv2/es/index-Ddv1JfSR.js +0 -1
- package/vgv2/es/index-sQtq8Z9r.js +0 -1
package/kilkaya/cjs/index.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ interface AstAdObj {
|
|
|
97
97
|
subtype?: string;
|
|
98
98
|
renderer_url?: string;
|
|
99
99
|
bidderId?: number | undefined;
|
|
100
|
+
uuid: string;
|
|
100
101
|
}
|
|
101
102
|
interface SafeFrameConfig {
|
|
102
103
|
allowExpansionByPush?: boolean;
|
|
@@ -180,6 +181,9 @@ interface PulseLegacyExtras {
|
|
|
180
181
|
trackViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
181
182
|
trackLegacyViewUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
182
183
|
trackLegacyClickUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
184
|
+
trackImpressionAd?: (eventInput: unknown) => Promise<unknown>;
|
|
185
|
+
trackEngagementAd?: (eventInput: unknown) => Promise<unknown>;
|
|
186
|
+
trackLoadAd?: (eventInput: unknown) => Promise<unknown>;
|
|
183
187
|
}
|
|
184
188
|
interface PulseConfig {
|
|
185
189
|
clientId: string;
|
package/kilkaya/cjs/index.js
CHANGED
|
@@ -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="svd",r="vg",i="sa",o="bt",a="aftonbladet",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 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 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=/^glci_/,v="gender_",p="geo_",f="male",y="female";class h extends c{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getPlacementData(e){var t;const n=e.closest(".kilkaya-wrapper");return{columnName:null!==(t=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==t?t:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0}}getEventBaseData(e){var t,n;const{title:r="",clientName:i="",creativeId:o="",link:a=""}=this.parseKilkayaData(e),{columnName:s,primaryPosition:l}=this.getPlacementData(e),d={publicUrl:a,urlPath:a?new URL(a).pathname:""},{publicUrl:c,urlPath:u}=a&&(null===(n=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===n?void 0:n.call(t,a))||d;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:r,placement:{columnName:s,primaryPosition:l},tags:[i,r,c,u].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":o,pageTitle:r,publicUrl:c,urlPath:u},url:location.origin}}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){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const m="no",b="se",w="[data-k5a-teaser-analytics]",k=(e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new(r===b?h:u)(e,t,n),a=new WeakMap,s=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},l=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(w);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),s(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(w);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),s(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{l.observe(e),e.addEventListener("click",()=>o.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))},T=(e,t)=>{console.warn("[Advertory WARN]: ",e)},E=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))})}),C="cmp:loaded";let S="undefined"!=typeof window?window._tcf_:void 0,I=!1;const A=(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&&(P("TCF bypass param detected, returning consent: true"),!0):(P("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(I)return null;if(!S)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=S.getConsentedToAllSync();return P(`TCF consented to all is: ${t}`),S.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"),S=window._tcf_,void e(S);P("TCF consent manager is not available");const n=()=>{P("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(S=window._tcf_,e(S)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(C,n),I=!0,t(new Error("Timeout waiting for CMP to load"))},o);P("Listening for CMP loaded event..."),document.addEventListener(C,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 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===b,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===m;if(t||n)return P("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield E(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!S)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);S.onTcfReady(()=>{P("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),S.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class O{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 P("[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 j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U,L;var _=j(function(){if(L)return U;L=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)},{})},U=s}());const M={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},N=(e,t)=>_(e,t,M),$=(e,t)=>Object.assign(Object.assign({},e),t),D=(e,t)=>{var n;return N(null!==(n=e)&&void 0!==n?n:{},t)},x={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},B=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||T("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||T("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||T("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||T("pageContext.deviceType is required."),n||T("pageOptions is required."),r||T("placements is required."),(null==i?void 0:i.defaultThreshold)||T("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[t])&&T(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},F={placements:(e,t)=>t,takeover:D,refreshConfig:$,editory:D,appearanceConfig:D,pageContext:$,pageOptions:$,pageSectionsSelectors:$,tcf:$};class K{set(e){B(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(F)){const r=t[e];void 0!==r&&(n[e]=F[e](n[e],r))}})(this.config,e)}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=N(K.DEFAULT_SITE_HANDLERS,e)}}K.DEFAULT_SITE_HANDLERS={siteEvents:x,initNativeAd:()=>{}};const q=new K;q.modifyConfigProperties.bind(q);const R=864e5,V=(()=>{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=R)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=R)=>{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}}}})(),z=e=>e.startsWith("glci_"),H=()=>{var e;return((e=[])=>e.filter(z))(null!==(e=(()=>{const e=V.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},J=()=>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 O(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===f||o===y?`${v}${o}`:void 0}catch(e){return}var e}),W=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield J(),n=(()=>{const e=H().map(e=>`${p}${e.replace(g,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),X="front";class G{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===X?"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 Q{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class Y{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 ee{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===X?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class te{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class ne{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:c,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[r]:new l,[s]:new G,"no-aftenposten":new Q,[o]:new Y,"no-bergenstidende":new Y,[i]:new Z,"no-stavangeraftenblad":new Z,[n]:new ee,[a]:new te}[c]||new d;k(e.instance,g,t,u)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield W();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="flex";(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 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}=A(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===(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 ne;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="svd",r="vg",i="sa",o="bt",a="aftonbladet",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()||""}getPlacementData(e){var t,n;const r=e.closest(".kilkaya-wrapper");return{columnName:null!==(t=null==r?void 0:r.dataset.pulseColumnname)&&void 0!==t?t:"",primaryPosition:Number(null==r?void 0:r.dataset.pulsePrimaryposition)||0,secondaryPosition:Number(null==r?void 0:r.dataset.pulseSecondaryposition)||0,slot:null!==(n=null==r?void 0:r.dataset.slotTag)&&void 0!==n?n:""}}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 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;const{clientName:i,creativeId:o,itemId:a,placement:s}=this.parseKilkayaData(e),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",position:s,elementType:"Article",custom:{customer:i,creativeId:null!=o?o:a},page:{"@id":null!=g?g:s,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===r?void 0:r.call(n,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"}}}class g extends c{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n;const{title:r="",clientName:i="",creativeId:o="",link:a="",itemId:s=""}=this.parseKilkayaData(e),{columnName:l,primaryPosition:d,secondaryPosition:c,slot:u}=this.getPlacementData(e),g={publicUrl:a,urlPath:a?new URL(a).pathname:""},{publicUrl:v,urlPath:p}=a&&(null===(n=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===n?void 0:n.call(t,a))||g;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:r,placement:{columnName:l,primaryPosition:d,secondaryPosition:c,source:u},tags:[i,r,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":o,pageTitle:r,publicUrl:v,urlPath:p},url:location.origin})}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){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const v="no",p="se",f="[data-k5a-teaser-analytics]",y=(e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new(r===p?g:u)(e,t,n),a=new WeakMap,s=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},l=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(f);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),s(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(f);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),s(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{l.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})},m=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},h=(e,t)=>{console.warn("[Advertory WARN]: ",e)},b=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 m("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(m("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{m("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{m("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);m("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),w="cmp:loaded";let k="undefined"!=typeof window?window._tcf_:void 0,P=!1;const T=(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&&(m("TCF bypass param detected, returning consent: true"),!0):(m("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(P)return null;if(!k)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=k.getConsentedToAllSync();return m(`TCF consented to all is: ${t}`),k.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(m("Getting TCF consent manager..."),window._tcf_)return m("TCF consent manager is already available"),k=window._tcf_,void e(k);m("TCF consent manager is not available");const n=()=>{m("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(k=window._tcf_,e(k)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(w,n),P=!0,t(new Error("Timeout waiting for CMP to load"))},o);m("Listening for CMP loaded event..."),document.addEventListener(w,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 m(`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===p,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===v;if(t||n)return m("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield b(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!k)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(()=>{m("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);k.onTcfReady(()=>{m("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),k.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class E{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 m("[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 S,I;var A=C(function(){if(I)return S;I=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)},{})},S=s}());const O={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},j=(e,t)=>A(e,t,O),U=(e,t)=>Object.assign(Object.assign({},e),t),L=(e,t)=>{var n;return j(null!==(n=e)&&void 0!==n?n:{},t)},_={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},M=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||h("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||h("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||h("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||h("pageContext.deviceType is required."),n||h("pageOptions is required."),r||h("placements is required."),(null==i?void 0:i.defaultThreshold)||h("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[t])&&h(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},N={placements:(e,t)=>t,takeover:L,refreshConfig:U,editory:L,appearanceConfig:L,pageContext:U,pageOptions:U,pageSectionsSelectors:U,tcf:U};class ${set(e){M(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(N)){const r=t[e];void 0!==r&&(n[e]=N[e](n[e],r))}})(this.config,e)}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=j($.DEFAULT_SITE_HANDLERS,e)}}$.DEFAULT_SITE_HANDLERS={siteEvents:_,initNativeAd:()=>{}};const D=new $;D.modifyConfigProperties.bind(D);const x=864e5,B=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return m("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=x)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=x)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return m("Error with parsing localStorage data"),null}}}})(),F=e=>e.startsWith("glci_"),K=()=>{var e;return((e=[])=>e.filter(F))(null!==(e=(()=>{const e=B.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},q=/^glci_/,R="gender_",V="geo_",z="male",H="female",J=()=>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 E(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===z||o===H?`${R}${o}`:void 0}catch(e){return}var e}),W=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield J(),n=(()=>{const e=K().map(e=>`${V}${e.replace(q,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),X="front";class G{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===X?"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 Q{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class Y{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 ee{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===X?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class te{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class ne{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:c,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[r]:new l,[s]:new G,"no-aftenposten":new Q,[o]:new Y,"no-bergenstidende":new Y,[i]:new Z,"no-stavangeraftenblad":new Z,[n]:new ee,[a]:new te}[c]||new d;y(e.instance,g,t,u)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield W();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(m(`Kilkaya event for slot: ${n}`),!n)return void m("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(m(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):m("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="flex";(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 m(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return m(`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}=T(e,0,n);return(yield i())?(m(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(m(`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%"},"data-slot-tag":n},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 ne;yield t.run(e)});
|
package/kilkaya/es/index.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ interface AstAdObj {
|
|
|
97
97
|
subtype?: string;
|
|
98
98
|
renderer_url?: string;
|
|
99
99
|
bidderId?: number | undefined;
|
|
100
|
+
uuid: string;
|
|
100
101
|
}
|
|
101
102
|
interface SafeFrameConfig {
|
|
102
103
|
allowExpansionByPush?: boolean;
|
|
@@ -180,6 +181,9 @@ interface PulseLegacyExtras {
|
|
|
180
181
|
trackViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
181
182
|
trackLegacyViewUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
182
183
|
trackLegacyClickUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
184
|
+
trackImpressionAd?: (eventInput: unknown) => Promise<unknown>;
|
|
185
|
+
trackEngagementAd?: (eventInput: unknown) => Promise<unknown>;
|
|
186
|
+
trackLoadAd?: (eventInput: unknown) => Promise<unknown>;
|
|
183
187
|
}
|
|
184
188
|
interface PulseConfig {
|
|
185
189
|
clientId: string;
|
package/kilkaya/es/index.js
CHANGED
|
@@ -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="svd",i="vg",o="sa",a="bt",s="aftonbladet",l="e24";class d{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 c{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class u{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 g extends u{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 v=/^glci_/,p="gender_",f="geo_",h="male",m="female";class y extends u{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getPlacementData(e){var t;const n=e.closest(".kilkaya-wrapper");return{columnName:null!==(t=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==t?t:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0}}getEventBaseData(e){var t,n;const{title:r="",clientName:i="",creativeId:o="",link:a=""}=this.parseKilkayaData(e),{columnName:s,primaryPosition:l}=this.getPlacementData(e),d={publicUrl:a,urlPath:a?new URL(a).pathname:""},{publicUrl:c,urlPath:u}=a&&(null===(n=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===n?void 0:n.call(t,a))||d;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:r,placement:{columnName:s,primaryPosition:l},tags:[i,r,c,u].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":o,pageTitle:r,publicUrl:c,urlPath:u},url:location.origin}}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){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const b="no",w="se",k="[data-k5a-teaser-analytics]",P=(e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new(r===w?y:g)(e,t,n),a=new WeakMap,s=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},l=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(k);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),s(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(k);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),s(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{l.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})},T=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},E=(e,t)=>{console.warn("[Advertory WARN]: ",e)},C=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 T("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(T("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{T("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{T("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);T("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),S="cmp:loaded";let I="undefined"!=typeof window?window._tcf_:void 0,A=!1;const O=(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&&(T("TCF bypass param detected, returning consent: true"),!0):(T("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(A)return null;if(!I)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=I.getConsentedToAllSync();return T(`TCF consented to all is: ${t}`),I.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(T("Getting TCF consent manager..."),window._tcf_)return T("TCF consent manager is already available"),I=window._tcf_,void e(I);T("TCF consent manager is not available");const n=()=>{T("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(I=window._tcf_,e(I)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(S,n),A=!0,t(new Error("Timeout waiting for CMP to load"))},o);T("Listening for CMP loaded event..."),document.addEventListener(S,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 T(`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===w,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===b;if(t||n)return T("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield C(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!I)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(()=>{T("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);I.onTcfReady(()=>{T("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),I.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class U{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 T("[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 j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L,_;var M=j(function(){if(_)return L;_=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)},{})},L=s}());const N={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},$=(e,t)=>M(e,t,N),D=(e,t)=>Object.assign(Object.assign({},e),t),B=(e,t)=>{var n;return $(null!==(n=e)&&void 0!==n?n:{},t)},F={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},K=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||E("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||E("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||E("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||E("pageContext.deviceType is required."),n||E("pageOptions is required."),r||E("placements is required."),(null==i?void 0:i.defaultThreshold)||E("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[t])&&E(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},q={placements:(e,t)=>t,takeover:B,refreshConfig:D,editory:B,appearanceConfig:B,pageContext:D,pageOptions:D,pageSectionsSelectors:D,tcf:D};class x{set(e){K(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(q)){const r=t[e];void 0!==r&&(n[e]=q[e](n[e],r))}})(this.config,e)}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=$(x.DEFAULT_SITE_HANDLERS,e)}}x.DEFAULT_SITE_HANDLERS={siteEvents:F,initNativeAd:()=>{}};const R=new x;R.modifyConfigProperties.bind(R);const V=864e5,z=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return T("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=V)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=V)=>{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 T("Error with parsing localStorage data"),null}}}})(),H=e=>e.startsWith("glci_"),J=()=>{var e;return((e=[])=>e.filter(H))(null!==(e=(()=>{const e=z.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},W=()=>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 U(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===h||o===m?`${p}${o}`:void 0}catch(e){return}var e}),X=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield W(),n=(()=>{const e=J().map(e=>`${f}${e.replace(v,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),G="front";class Q{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"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 Y{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 ee{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class te{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ne{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class re{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[i]:new d,[l]:new Q,"no-aftenposten":new Y,[a]:new Z,"no-bergenstidende":new Z,[o]:new ee,"no-stavangeraftenblad":new ee,[r]:new te,[s]:new ne}[n]||new c;P(e.instance,g,t,u)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield X();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(T(`Kilkaya event for slot: ${n}`),!n)return void T("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(T(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):T("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="flex";(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 T(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return T(`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}=O(e,0,n);return(yield i())?(T(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(T(`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 ie=({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})]}))},oe=e=>n(void 0,void 0,void 0,function*(){const t=new re;yield t.run(e)});export{ie as Kilkaya,oe 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="svd",i="vg",o="sa",a="bt",s="aftonbladet",l="e24";class d{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 c{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class u{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()||""}getPlacementData(e){var t,n;const r=e.closest(".kilkaya-wrapper");return{columnName:null!==(t=null==r?void 0:r.dataset.pulseColumnname)&&void 0!==t?t:"",primaryPosition:Number(null==r?void 0:r.dataset.pulsePrimaryposition)||0,secondaryPosition:Number(null==r?void 0:r.dataset.pulseSecondaryposition)||0,slot:null!==(n=null==r?void 0:r.dataset.slotTag)&&void 0!==n?n:""}}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 g extends u{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r;const{clientName:i,creativeId:o,itemId:a,placement:s}=this.parseKilkayaData(e),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",position:s,elementType:"Article",custom:{customer:i,creativeId:null!=o?o:a},page:{"@id":null!=g?g:s,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===r?void 0:r.call(n,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"}}}class v extends u{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n;const{title:r="",clientName:i="",creativeId:o="",link:a="",itemId:s=""}=this.parseKilkayaData(e),{columnName:l,primaryPosition:d,secondaryPosition:c,slot:u}=this.getPlacementData(e),g={publicUrl:a,urlPath:a?new URL(a).pathname:""},{publicUrl:v,urlPath:p}=a&&(null===(n=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===n?void 0:n.call(t,a))||g;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:r,placement:{columnName:l,primaryPosition:d,secondaryPosition:c,source:u},tags:[i,r,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":o,pageTitle:r,publicUrl:v,urlPath:p},url:location.origin})}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){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const p="no",f="se",y="[data-k5a-teaser-analytics]",m=(e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new(r===f?v:g)(e,t,n),a=new WeakMap,s=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},l=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(y);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),s(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(y);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),s(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{l.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})},h=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},b=(e,t)=>{console.warn("[Advertory WARN]: ",e)},w=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 h("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(h("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{h("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{h("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);h("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),k="cmp:loaded";let P="undefined"!=typeof window?window._tcf_:void 0,T=!1;const E=(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&&(h("TCF bypass param detected, returning consent: true"),!0):(h("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(T)return null;if(!P)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=P.getConsentedToAllSync();return h(`TCF consented to all is: ${t}`),P.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(h("Getting TCF consent manager..."),window._tcf_)return h("TCF consent manager is already available"),P=window._tcf_,void e(P);h("TCF consent manager is not available");const n=()=>{h("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(P=window._tcf_,e(P)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(k,n),T=!0,t(new Error("Timeout waiting for CMP to load"))},o);h("Listening for CMP loaded event..."),document.addEventListener(k,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 h(`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===f,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===p;if(t||n)return h("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield w(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!P)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(()=>{h("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);P.onTcfReady(()=>{h("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),P.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 h("[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 S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I,A;var O=S(function(){if(A)return I;A=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)},{})},I=s}());const j={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},U=(e,t)=>O(e,t,j),L=(e,t)=>Object.assign(Object.assign({},e),t),_=(e,t)=>{var n;return U(null!==(n=e)&&void 0!==n?n:{},t)},M={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},N=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||b("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||b("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||b("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||b("pageContext.deviceType is required."),n||b("pageOptions is required."),r||b("placements is required."),(null==i?void 0:i.defaultThreshold)||b("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==o?void 0:o[t])&&b(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},$={placements:(e,t)=>t,takeover:_,refreshConfig:L,editory:_,appearanceConfig:_,pageContext:L,pageOptions:L,pageSectionsSelectors:L,tcf:L};class D{set(e){N(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys($)){const r=t[e];void 0!==r&&(n[e]=$[e](n[e],r))}})(this.config,e)}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=U(D.DEFAULT_SITE_HANDLERS,e)}}D.DEFAULT_SITE_HANDLERS={siteEvents:M,initNativeAd:()=>{}};const B=new D;B.modifyConfigProperties.bind(B);const F=864e5,K=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return h("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=F)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=F)=>{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 h("Error with parsing localStorage data"),null}}}})(),q=e=>e.startsWith("glci_"),x=()=>{var e;return((e=[])=>e.filter(q))(null!==(e=(()=>{const e=K.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},R=/^glci_/,V="gender_",z="geo_",H="male",J="female",W=()=>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===H||o===J?`${V}${o}`:void 0}catch(e){return}var e}),X=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield W(),n=(()=>{const e=x().map(e=>`${z}${e.replace(R,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),G="front";class Q{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"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 Y{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 ee{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class te{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ne{transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class re{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[i]:new d,[l]:new Q,"no-aftenposten":new Y,[a]:new Z,"no-bergenstidende":new Z,[o]:new ee,"no-stavangeraftenblad":new ee,[r]:new te,[s]:new ne}[n]||new c;m(e.instance,g,t,u)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield X();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(h(`Kilkaya event for slot: ${n}`),!n)return void h("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(h(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):h("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="flex";(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 h(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return h(`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}=E(e,0,n);return(yield i())?(h(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(h(`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 ie=({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%"},"data-slot-tag":r},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})]}))},oe=e=>n(void 0,void 0,void 0,function*(){const t=new re;yield t.run(e)});export{ie as Kilkaya,oe as runKilkaya};
|
package/klart/cjs/index.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ interface AstAdObj {
|
|
|
95
95
|
subtype?: string;
|
|
96
96
|
renderer_url?: string;
|
|
97
97
|
bidderId?: number | undefined;
|
|
98
|
+
uuid: string;
|
|
98
99
|
}
|
|
99
100
|
interface AstAdError {
|
|
100
101
|
code: number;
|
|
@@ -325,6 +326,9 @@ interface PulseLegacyExtras {
|
|
|
325
326
|
trackViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
326
327
|
trackLegacyViewUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
327
328
|
trackLegacyClickUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
|
|
329
|
+
trackImpressionAd?: (eventInput: unknown) => Promise<unknown>;
|
|
330
|
+
trackEngagementAd?: (eventInput: unknown) => Promise<unknown>;
|
|
331
|
+
trackLoadAd?: (eventInput: unknown) => Promise<unknown>;
|
|
328
332
|
}
|
|
329
333
|
interface PulseConfig {
|
|
330
334
|
clientId: string;
|
|
@@ -401,6 +405,8 @@ interface Options {
|
|
|
401
405
|
clickLinkSelector?: string;
|
|
402
406
|
containerId?: string;
|
|
403
407
|
sponsorstripeConfig?: SponsorstripeConfig;
|
|
408
|
+
pulse?: PulseConfig;
|
|
409
|
+
invCode?: string;
|
|
404
410
|
}
|
|
405
411
|
interface AdNativeTemplates {
|
|
406
412
|
[templatesName: string]: (nativeData: AdNativeData, options: Options) => string | null;
|