@schibsted/advertory 3.6.4-no-issue.1 → 3.6.5
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 +0 -19
- package/ad-native/cjs/index.js +1 -1
- package/ad-native/es/index.d.ts +0 -19
- package/ad-native/es/index.js +1 -1
- package/aftenposten/cjs/index.d.ts +0 -19
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-CGSS0tKf.js +1 -0
- package/aftenposten/es/{events-90h4J0Pi.js → events-BrtAqJbD.js} +1 -1
- package/aftenposten/es/{index-x3C8LqoH.js → index-2TPGlMiI.js} +1 -1
- package/aftenposten/es/{index-D0SMqCpS.js → index-BO5kdoFl.js} +1 -1
- package/aftenposten/es/{index-BZDFHEyy.js → index-CgYQfcsJ.js} +1 -1
- package/aftenposten/es/index-CyylCAXU.js +1 -0
- package/aftenposten/es/{index-GvJ5O8Ol.js → index-DiyY7jME.js} +1 -1
- package/aftenposten/es/{index-CwCkFmT3.js → index-DkMzEzdq.js} +1 -1
- package/aftenposten/es/{index-PNWqx3ql.js → index-Dx1_2rbM.js} +1 -1
- package/aftenposten/es/{index-SPBgETLm.js → index-YZFW5XYK.js} +1 -1
- package/aftenposten/es/{index-k9VKIwq-.js → index-aAMvxk1n.js} +1 -1
- package/aftenposten/es/index.d.ts +0 -19
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-C0fEGkU3.js → styles-73Frgdu6.js} +1 -1
- package/aftenposten/es/{styles-IM25mjsd.js → styles-BJ4HdALX.js} +1 -1
- package/aftenposten/es/{styles-D6C4kXph.js → styles-BMBJ_dLC.js} +1 -1
- package/aftenposten/es/{styles-mqLUt40K.js → styles-B_mmWkIp.js} +1 -1
- package/aftenposten/es/{styles-BODrkqLL.js → styles-C3VDdenU.js} +1 -1
- package/aftenposten/es/{styles-CGsVX09f.js → styles-C5l7RlQE.js} +1 -1
- package/aftenposten/es/{styles-DHz7ybgQ.js → styles-DGQoKTEg.js} +1 -1
- package/aftenposten/es/{styles-otSfsajI.js → styles-DvPlbBYX.js} +1 -1
- package/aftenposten/es/{styles-Bz8JDFmN.js → styles-H2hv-cxU.js} +1 -1
- package/aftenposten/es/{styles-CJ9OBVfJ.js → styles-N8lWOyBH.js} +1 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-Cq8ZeNLa.js +1 -0
- package/aftenpostenv2/es/{events-BiZ53WbG.js → events-BoIjaJ8w.js} +1 -1
- package/aftenpostenv2/es/{index-CvVs7cA5.js → index-B5ZL-Rjh.js} +1 -1
- package/aftenpostenv2/es/index-BXcP5Hm5.js +1 -0
- package/aftenpostenv2/es/{index-1scrmbN8.js → index-CZZF7QUw.js} +1 -1
- package/aftenpostenv2/es/{index-DOo535KJ.js → index-CoNaj9-j.js} +1 -1
- package/{aftonbladetv2/es/index-Cr9mktXq.js → aftenpostenv2/es/index-DJjkw6G8.js} +1 -1
- package/aftenpostenv2/es/{index-oqTbMoBZ.js → index-Db_2VTsd.js} +1 -1
- package/aftenpostenv2/es/{index-Cv4YIbxm.js → index-DdML-00Q.js} +1 -1
- package/aftenpostenv2/es/{index-CHwNPbLT.js → index-GiEUtrkK.js} +1 -1
- package/aftenpostenv2/es/{index-LkRkfkb-.js → index-J1oQJ_r8.js} +1 -1
- package/aftenpostenv2/es/index.d.ts +0 -19
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-Brav2qkV.js → styles-BkmHJJOv.js} +1 -1
- package/aftenpostenv2/es/{styles-XJ-eFfEw.js → styles-BzvYXJkC.js} +1 -1
- package/aftenpostenv2/es/{styles-oXQISx1b.js → styles-C2vZ76M1.js} +1 -1
- package/aftenpostenv2/es/{styles-DSJgHwN1.js → styles-CVhzSijz.js} +1 -1
- package/aftenpostenv2/es/{styles-Cgr1J3T3.js → styles-Clryv9Hj.js} +1 -1
- package/aftenpostenv2/es/{styles-DaS9lthq.js → styles-D3Pm4qer.js} +1 -1
- package/aftenpostenv2/es/{styles--5PORqq4.js → styles-DXWLjzLO.js} +1 -1
- package/aftenpostenv2/es/{styles-BVPRm4PB.js → styles-Dkz3Htxc.js} +1 -1
- package/aftenpostenv2/es/{styles-Cg5tKEAO.js → styles-GYZcDJg-.js} +1 -1
- package/aftenpostenv2/es/{styles-PWB8bkpb.js → styles-oqOqoj1W.js} +1 -1
- package/aftonbladet/cjs/index.d.ts +0 -19
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-_V5Audbn.js +1 -0
- package/aftonbladet/es/{events-A8eRarM0.js → events-CJzsjVyW.js} +1 -1
- package/aftonbladet/es/{index-D9AivUBC.js → index-30rmINZw.js} +1 -1
- package/aftonbladet/es/{index-DIMuWioR.js → index-BCbK2Mrt.js} +1 -1
- package/aftonbladet/es/{index-3y_krWtI.js → index-Bni3tsv5.js} +1 -1
- package/aftonbladet/es/{index-YErwUvPi.js → index-CBeKuUvR.js} +1 -1
- package/aftonbladet/es/index-DVUhAeP5.js +1 -0
- package/aftonbladet/es/{index-BAcl84hu.js → index-DtB48BNL.js} +1 -1
- package/aftonbladet/es/{index-DKVhyZ7t.js → index-aLzDWM0e.js} +1 -1
- package/aftonbladet/es/{index-BiYceV13.js → index-c8kI-vcD.js} +1 -1
- package/aftonbladet/es/{index-DzMEQmPc.js → index-mvepspSi.js} +1 -1
- package/aftonbladet/es/index.d.ts +0 -19
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-B3CXjx3R.js → styles-BPkZEAD-.js} +1 -1
- package/aftonbladet/es/{styles-DAOwzujX.js → styles-CZRDodTH.js} +1 -1
- package/aftonbladet/es/{styles-CqbU0dC-.js → styles-CekYdBOd.js} +1 -1
- package/aftonbladet/es/{styles-whRiQawN.js → styles-CwFeTlaP.js} +1 -1
- package/aftonbladet/es/{styles-CuKe16UU.js → styles-DTrFzAzw.js} +1 -1
- package/aftonbladet/es/{styles-BfmQQWQf.js → styles-kafJWDp1.js} +1 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-DhOD1VZC.js +1 -0
- package/aftonbladetv2/es/{events-RlWiPgEd.js → events-C5v5iE1V.js} +1 -1
- package/aftonbladetv2/es/{index-DG71uAwM.js → index--Be8UbhZ.js} +1 -1
- package/aftonbladetv2/es/{index-CHe2mY5U.js → index-BFJAnPUm.js} +1 -1
- package/{aftenpostenv2/es/index-siSPAYL7.js → aftonbladetv2/es/index-BbOZLzvd.js} +1 -1
- package/aftonbladetv2/es/index-Bnl-hCmK.js +1 -0
- package/aftonbladetv2/es/{index-CzMGSy6Q.js → index-BrB4KaFL.js} +1 -1
- package/aftonbladetv2/es/{index-3uQCIdwA.js → index-CkNz2z-e.js} +1 -1
- package/aftonbladetv2/es/{index-CtEsmloB.js → index-DZctONj5.js} +1 -1
- package/aftonbladetv2/es/{index-BpHuZZzP.js → index-Dx70kkK7.js} +1 -1
- package/aftonbladetv2/es/{index-CwMJAqqO.js → index-Dy9ISoH8.js} +1 -1
- package/aftonbladetv2/es/index.d.ts +0 -19
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-BEhQkXU1.js → styles-BWw6MUfh.js} +1 -1
- package/aftonbladetv2/es/{styles-DPqx2adI.js → styles-CH0eBIZ1.js} +1 -1
- package/aftonbladetv2/es/{styles-DkOgwygd.js → styles-Cf2QMJcS.js} +1 -1
- package/aftonbladetv2/es/{styles-BrFu_W5K.js → styles-CgLlqz7G.js} +1 -1
- package/aftonbladetv2/es/{styles-Bfc9l8WO.js → styles-DpnxJPCQ.js} +1 -1
- package/aftonbladetv2/es/{styles-BoJUgU8p.js → styles-_8FZyG25.js} +1 -1
- package/brandmetrics/cjs/index.js +1 -1
- package/brandmetrics/es/index.js +1 -1
- package/bt/cjs/index.d.ts +0 -19
- package/bt/cjs/index.js +1 -1
- package/bt/es/_auto-entry_bt-CTOR3iJo.js +1 -0
- package/bt/es/{events-B8E0Wmof.js → events-CDiGx_kJ.js} +1 -1
- package/{sa/es/index-BAJc_zk_.js → bt/es/index-6GLhpqQ1.js} +1 -1
- package/{sa/es/index-uThQzJEi.js → bt/es/index-BD2lQffQ.js} +1 -1
- package/bt/es/{index-Bj0f0v87.js → index-Brbrf6FQ.js} +1 -1
- package/bt/es/{index-03aD4eo1.js → index-CSvfpCfu.js} +1 -1
- package/bt/es/{index-dZUFgkcj.js → index-D2eZyMcb.js} +1 -1
- package/bt/es/index-DKGTzkAK.js +1 -0
- package/{sa/es/index-Cyq1Jqmv.js → bt/es/index-GN5Luv2m.js} +1 -1
- package/bt/es/{index-xFX_gjti.js → index-vfI6JnHo.js} +1 -1
- package/bt/es/{index-COAyNr45.js → index-vmoF41n6.js} +1 -1
- package/bt/es/index.d.ts +0 -19
- package/bt/es/index.js +1 -1
- package/{sa/es/styles-CI1Ug3AG.js → bt/es/styles-6fYvpuOp.js} +1 -1
- package/bt/es/{styles-BZkEY9ow.js → styles-AnKMq_OD.js} +1 -1
- package/bt/es/{styles-CEsYJDqo.js → styles-B4mmwRnK.js} +1 -1
- package/bt/es/{styles-CH2-1sgP.js → styles-BfzTE1Wf.js} +1 -1
- package/bt/es/{styles-CGYAqI9_.js → styles-BvJy56Rt.js} +1 -1
- package/bt/es/{styles--vBDQgko.js → styles-C7xGOU6H.js} +1 -1
- package/{sa/es/styles-Ysny45W0.js → bt/es/styles-D4bJcIM4.js} +1 -1
- package/bt/es/{styles-CHBDQHwu.js → styles-Dex4_cvt.js} +1 -1
- package/bt/es/{styles-wforPVjv.js → styles-rFRnCytf.js} +1 -1
- package/btv2/es/_auto-entry_btv2-D3MYyPVi.js +1 -0
- package/btv2/es/{events-B4DlNAQt.js → events-CbbvdA08.js} +1 -1
- package/btv2/es/{index-BUFZZQM2.js → index-Bk0IpCA2.js} +1 -1
- package/btv2/es/{index-CloqSUQD.js → index-BwxuCSNc.js} +1 -1
- package/btv2/es/{index-DxXBBDVp.js → index-C9V5sDTa.js} +1 -1
- package/btv2/es/{index-DNSUtbs9.js → index-Cl_IzcNG.js} +1 -1
- package/btv2/es/{index-feLxUxLr.js → index-CqiXhlFN.js} +1 -1
- package/btv2/es/{index-BYzgCdkQ.js → index-D2sxoQVQ.js} +1 -1
- package/btv2/es/index-DbSmNfh4.js +1 -0
- package/{sav2/es/index-B8QN1-Xi.js → btv2/es/index-DcLzcmwF.js} +1 -1
- package/btv2/es/{index-BbUYZ_o3.js → index-b6WqOVQ7.js} +1 -1
- package/btv2/es/index.d.ts +0 -19
- package/btv2/es/index.js +1 -1
- package/{vgv2/es/styles-Bgv4Jaz7.js → btv2/es/styles-B1g7jDKf.js} +1 -1
- package/{sav2/es/styles-BMrhfdTD.js → btv2/es/styles-BKnDli4l.js} +1 -1
- package/{sav2/es/styles-2Nnzs_wx.js → btv2/es/styles-BRH1Wo7z.js} +1 -1
- package/btv2/es/{styles-DvBM5Avv.js → styles-BwLYPpcA.js} +1 -1
- package/btv2/es/{styles-BHDI2Q0m.js → styles-CSoIhCt6.js} +1 -1
- package/btv2/es/{styles-Dz4b2AdK.js → styles-DDU_GH9v.js} +1 -1
- package/{sav2/es/styles-Bu82ldvz.js → btv2/es/styles-DNXSuP_F.js} +1 -1
- package/{vgv2/es/styles-CDQN7OoS.js → btv2/es/styles-DsWFYc2Y.js} +1 -1
- package/common/cjs/index.js +1 -1
- package/common/es/index.js +1 -1
- package/dr-edition/cjs/index.d.ts +6 -23
- package/dr-edition/cjs/index.js +1 -1
- package/dr-edition/es/index.d.ts +6 -23
- package/dr-edition/es/index.js +1 -1
- package/e24/es/_auto-entry_e24-BpEy58ES.js +1 -0
- package/e24/es/{events-2LemXGhL.js → events-DMy5AbEB.js} +1 -1
- package/e24/es/{index-BPsxnGG7.js → index-CC7jTokX.js} +1 -1
- package/e24/es/{index-RTqU_3hB.js → index-COYSr2gT.js} +1 -1
- package/e24/es/{index-D6VTaTl3.js → index-CmZ75be4.js} +1 -1
- package/e24/es/{index-DF244RRi.js → index-CqIG11G-.js} +1 -1
- package/{svdv2/es/index-DUEKQirr.js → e24/es/index-CtpL999V.js} +1 -1
- package/e24/es/index-CuPVfqC2.js +1 -0
- package/e24/es/{index-CLAfHIml.js → index-CzsZSoXk.js} +1 -1
- package/e24/es/{index-BKQ1a6Ig.js → index-N7143u8T.js} +1 -1
- package/{tv4/es/index-BUuBvzxQ.js → e24/es/index-tMVF4DRR.js} +1 -1
- package/e24/es/index.d.ts +0 -19
- package/e24/es/index.js +1 -1
- package/e24/es/{styles-Bia3hiG7.js → styles-B9D_sVUe.js} +1 -1
- package/e24/es/{styles-oDmE25-G.js → styles-BivpYTAN.js} +1 -1
- package/e24/es/{styles-3sc6XdB-.js → styles-CaFX-Dhh.js} +1 -1
- package/e24/es/{styles-NDCl-Fnx.js → styles-D2A6egGX.js} +1 -1
- package/e24/es/{styles-nqTatAnn.js → styles-DPcCPUbB.js} +1 -1
- package/{tv4/es/styles-D7WvCXz-.js → e24/es/styles-Do6n4ZMP.js} +1 -1
- package/e24/es/{styles-BMJ8T7fL.js → styles-DqMPAHVA.js} +1 -1
- package/e24/es/{styles-DpEIDLEr.js → styles-LSoWLlY2.js} +1 -1
- package/e24/es/{styles-DUOog_gc.js → styles-PjgLGS7b.js} +1 -1
- package/e24/es/{styles-BAl_3vMl.js → styles-f4BKcBzP.js} +1 -1
- package/e24/es/{styles-DK4hTklO.js → styles-x8QyipEm.js} +1 -1
- package/e24/styles.css +1 -1
- package/editory/cjs/index.d.ts +0 -19
- package/editory/es/index.d.ts +0 -19
- package/fotbollskanalen/cjs/index.d.ts +0 -19
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DumTrFL_.js +1 -0
- package/fotbollskanalen/es/{events-BdjHDrCO.js → events-ZjJFi8QC.js} +1 -1
- package/fotbollskanalen/es/{index-DMn-yP1t.js → index-5dx2445c.js} +1 -1
- package/fotbollskanalen/es/{index-VIQLjIBw.js → index-83t7oB8b.js} +1 -1
- package/fotbollskanalen/es/{index-C-He7fit.js → index-CGKDlMmg.js} +1 -1
- package/fotbollskanalen/es/{index-QUwIJqca.js → index-DAi_itu4.js} +1 -1
- package/fotbollskanalen/es/{index-BYOnKTkC.js → index-DFriHY76.js} +1 -1
- package/fotbollskanalen/es/index-DV_g-aoU.js +1 -0
- package/fotbollskanalen/es/{index-nJoT51KX.js → index-iDZsd43T.js} +1 -1
- package/fotbollskanalen/es/{index-B8_DAJrE.js → index-kydjr3CO.js} +1 -1
- package/fotbollskanalen/es/{index-Cq2dTD5N.js → index-zubHvhlS.js} +1 -1
- package/fotbollskanalen/es/index.d.ts +0 -19
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-BuH9xVv6.js → styles-Ck5r4KkG.js} +1 -1
- package/glimr/cjs/index.js +1 -1
- package/glimr/es/index.js +1 -1
- package/godt/cjs/index.d.ts +0 -19
- package/godt/cjs/index.js +1 -1
- package/kilkaya/cjs/index.d.ts +0 -19
- package/kilkaya/cjs/index.js +1 -1
- package/kilkaya/es/index.d.ts +0 -19
- package/kilkaya/es/index.js +1 -1
- package/klart/cjs/index.d.ts +0 -19
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.d.ts +0 -19
- package/koket/cjs/index.js +1 -1
- package/koket/es/_auto-entry_koket-L1nrgeUL.js +1 -0
- package/koket/es/{events-0DxWWCZ9.js → events-BTGz0Pma.js} +1 -1
- package/koket/es/{index-D8fZlGJ6.js → index-4E2GIMHF.js} +1 -1
- package/koket/es/{index-Be_MdB7n.js → index-BBGfWroF.js} +1 -1
- package/koket/es/{index--wuLVJT1.js → index-BxSe2uve.js} +1 -1
- package/koket/es/{index-C6aVVVJ6.js → index-CapaG-J2.js} +1 -1
- package/koket/es/{index-DfDCldGO.js → index-DT4JGaxo.js} +1 -1
- package/koket/es/index-D_M9VOIU.js +1 -0
- package/koket/es/{index-DOGN0SX7.js → index-DjQDUPlI.js} +1 -1
- package/koket/es/{index-cYdPNTwi.js → index-Dt4XfWUn.js} +1 -1
- package/{svdv2/es/index-nzRrRDNv.js → koket/es/index-OaWjkFxh.js} +1 -1
- package/koket/es/index.d.ts +0 -19
- package/koket/es/index.js +1 -1
- package/{svdv2/es/styles-9ghYoFbS.js → koket/es/styles-XyNFWK3D.js} +1 -1
- package/minmote/cjs/index.d.ts +0 -19
- package/minmote/cjs/index.js +1 -1
- package/package.json +1 -1
- package/pent/cjs/index.d.ts +0 -19
- package/pent/cjs/index.js +1 -1
- package/sa/cjs/index.d.ts +0 -19
- package/sa/cjs/index.js +1 -1
- package/sa/es/_auto-entry_sa-B9EduKH8.js +1 -0
- package/sa/es/{events-C8S7jrt3.js → events-DA2ltPG0.js} +1 -1
- package/sa/es/{index-Br6T-pda.js → index-4HyD4prX.js} +1 -1
- package/sa/es/{index-CYNpcUX3.js → index-6KVsvnDN.js} +1 -1
- package/{bt/es/index-D9-4nJzo.js → sa/es/index-C2OhqQoD.js} +1 -1
- package/sa/es/{index-1IvtyUJ6.js → index-CN7BHAWh.js} +1 -1
- package/sa/es/index-D3eIWo0r.js +1 -0
- package/sa/es/{index-B_iUHp18.js → index-DeCtDv4Z.js} +1 -1
- package/{bt/es/index-1fdav_Jg.js → sa/es/index-Dmk7iGsd.js} +1 -1
- package/sa/es/{index-DtJJzHK5.js → index-VMartVgT.js} +1 -1
- package/{bt/es/index-ikSnI3qk.js → sa/es/index-t7Bs5y8o.js} +1 -1
- package/sa/es/index.d.ts +0 -19
- package/sa/es/index.js +1 -1
- package/{vg/es/styles-BSfpgVXJ.js → sa/es/styles-2rJJPgT5.js} +1 -1
- package/sa/es/{styles-BqbfWI42.js → styles-B0zyiuB7.js} +1 -1
- package/sa/es/{styles-_0voXDgk.js → styles-BXQpiwJe.js} +1 -1
- package/sa/es/{styles-jucyBwh4.js → styles-CEP9t0Ff.js} +1 -1
- package/{vg/es/styles-tD8TNMsW.js → sa/es/styles-COVyyfE7.js} +1 -1
- package/sa/es/{styles-B1GOzs0B.js → styles-CbwscNL4.js} +1 -1
- package/sa/es/{styles-B8JtTDvr.js → styles-DZ6LHKrH.js} +1 -1
- package/sa/es/{styles-KihGIsxt.js → styles-VN0LBRZ4.js} +1 -1
- package/{bt/es/styles-BWe06TQl.js → sa/es/styles-aAKviTBd.js} +1 -1
- package/sav2/es/_auto-entry_sav2-e31gmPAN.js +1 -0
- package/sav2/es/{events-BTwxLrmE.js → events-CzgV0gSw.js} +1 -1
- package/sav2/es/{index-CTEloN61.js → index-9i8Xscdw.js} +1 -1
- package/sav2/es/{index-ZGLdhTow.js → index-Aq_AdT_0.js} +1 -1
- package/sav2/es/{index-Dmor7Z1b.js → index-BpVpeYR2.js} +1 -1
- package/{btv2/es/index-DPaE0hzc.js → sav2/es/index-D4fObIZB.js} +1 -1
- package/sav2/es/index-DYnnrQ9_.js +1 -0
- package/sav2/es/{index-HS2u3Zpj.js → index-Devj4B9g.js} +1 -1
- package/sav2/es/{index-COWfP5cs.js → index-Dn_gJXR0.js} +1 -1
- package/sav2/es/{index-rjgG7Xwk.js → index-W5qP0ujP.js} +1 -1
- package/sav2/es/{index-B53BR4b8.js → index-xSxPMKIA.js} +1 -1
- package/sav2/es/index.d.ts +0 -19
- package/sav2/es/index.js +1 -1
- package/{btv2/es/styles-BehUrvhi.js → sav2/es/styles-B2sL5WX4.js} +1 -1
- package/{btv2/es/styles-Cw9KJB6P.js → sav2/es/styles-BLiYCuWq.js} +1 -1
- package/{vgv2/es/styles-B4PZq-53.js → sav2/es/styles-C0jxcdH_.js} +1 -1
- package/sav2/es/{styles-DjMguaWj.js → styles-CEcubZQq.js} +1 -1
- package/sav2/es/{styles-DRLhz-Pu.js → styles-CkFbSEHS.js} +1 -1
- package/sav2/es/{styles-DFoiKFxe.js → styles-DUyX_DuT.js} +1 -1
- package/sav2/es/{styles-zb8508Q3.js → styles-DWB79r6_.js} +1 -1
- package/{vgv2/es/styles-BoxNTzGZ.js → sav2/es/styles-DZBKEfdt.js} +1 -1
- package/svd/cjs/index.d.ts +0 -19
- package/svd/cjs/index.js +1 -1
- package/svd/es/_auto-entry_svd-BdqmfmX6.js +1 -0
- package/svd/es/{events-xpACbhEk.js → events-C-9CJZ4h.js} +1 -1
- package/svd/es/index-1NGo6XQO.js +1 -0
- package/svd/es/{index-AaU4iJb_.js → index-BPc-z5yI.js} +1 -1
- package/svd/es/{index-ZRqg1RwZ.js → index-BlEUjADY.js} +1 -1
- package/{e24/es/index-CZtyf0jS.js → svd/es/index-CDYICatm.js} +1 -1
- package/svd/es/{index-BTkJXRDz.js → index-CPCTDvdm.js} +1 -1
- package/svd/es/{index-Bpqx7sL4.js → index-CqH2jGLh.js} +1 -1
- package/svd/es/{index-C8IPcd68.js → index-CtpXxUty.js} +1 -1
- package/svd/es/{index-DP_0yLU0.js → index-DLuY5Oeh.js} +1 -1
- package/{tv4/es/index-DZpubrgE.js → svd/es/index-Dv2VkPEy.js} +1 -1
- package/svd/es/index.d.ts +0 -19
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-DjXQ1aIf.js → styles--4y6tyb7.js} +1 -1
- package/svd/es/{styles-fEOdy4x5.js → styles-AWXFMeot.js} +1 -1
- package/svd/es/{styles-DDwL7EXa.js → styles-BKSE1vOn.js} +1 -1
- package/svd/es/{styles-wVQjAwi4.js → styles-BYer2eO_.js} +1 -1
- package/svd/es/{styles-COuw80gn.js → styles-Bq2j_d6U.js} +1 -1
- package/svd/es/{styles-DXJ54Dlu.js → styles-Cr8zQz9V.js} +1 -1
- package/svdv2/es/_auto-entry_svdv2-DmKWQeIK.js +1 -0
- package/svdv2/es/{events-rHRR45Oc.js → events-ChZzMCGb.js} +1 -1
- package/svdv2/es/{index-C3EyOOQ1.js → index-BSsUqLi3.js} +1 -1
- package/{koket/es/index-B9jCMa-F.js → svdv2/es/index-BUafAKnp.js} +1 -1
- package/svdv2/es/index-BXwRRMHx.js +1 -0
- package/svdv2/es/index-CHg5wuUI.js +1 -0
- package/svdv2/es/{index-B5_Heysk.js → index-CrDjUSeU.js} +1 -1
- package/svdv2/es/{index-9m7OluMX.js → index-DF4UQA32.js} +1 -1
- package/svdv2/es/{index-sFmWFac1.js → index-DdpAFzQA.js} +1 -1
- package/svdv2/es/{index-D6jFeixA.js → index-DqFMnIvs.js} +1 -1
- package/svdv2/es/{index-_VqtpxkU.js → index-XlBiI6yV.js} +1 -1
- package/svdv2/es/index.d.ts +0 -19
- package/svdv2/es/index.js +1 -1
- package/svdv2/es/{styles-Cffbyyic.js → styles-B8Wm63Ec.js} +1 -1
- package/svdv2/es/{styles-Dl5qiGBy.js → styles-CkFEEa_w.js} +1 -1
- package/svdv2/es/{styles-CdvbETBq.js → styles-DBz9Dne3.js} +1 -1
- package/{koket/es/styles-DswGt2mE.js → svdv2/es/styles-DTV93sOT.js} +1 -1
- package/svdv2/es/{styles-p4pWN8kV.js → styles-DiBJaHVE.js} +1 -1
- package/svdv2/es/{styles-DIBKsLFk.js → styles-DsTdnUNV.js} +1 -1
- package/svdv2/styles.css +1 -1
- package/tek/cjs/index.d.ts +0 -19
- package/tek/cjs/index.js +1 -1
- package/tracker/cjs/index.d.ts +0 -19
- package/tracker/es/index.d.ts +0 -19
- package/tv4/cjs/index.d.ts +0 -19
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/_auto-entry_tv4-GP9f9YWP.js +1 -0
- package/tv4/es/{events-CbC7QEai.js → events-CBIiFHLG.js} +1 -1
- package/tv4/es/{index-CmQWra83.js → index-B2__uMJs.js} +1 -1
- package/tv4/es/{index-D5qF2adM.js → index-C5HBQjWJ.js} +1 -1
- package/tv4/es/{index-pYKKu0ld.js → index-Ch4SrCas.js} +1 -1
- package/tv4/es/{index-BclrqEGM.js → index-CuVprOQs.js} +1 -1
- package/tv4/es/index-DScH3yWn.js +1 -0
- package/{svd/es/index-pRPyyoJx.js → tv4/es/index-Db_dsVJP.js} +1 -1
- package/{svd/es/index-Cge_jEH4.js → tv4/es/index-DfnCtA_I.js} +1 -1
- package/tv4/es/{index-Ks5JLKPT.js → index-XoAfWrkk.js} +1 -1
- package/tv4/es/{index-BUhmWRPT.js → index-dbE5lsvs.js} +1 -1
- package/tv4/es/index.d.ts +0 -19
- package/tv4/es/index.js +1 -1
- package/{e24/es/styles-DWNWEqx9.js → tv4/es/styles-BElEv35i.js} +1 -1
- package/tvnu/cjs/index.d.ts +0 -19
- package/tvnu/cjs/index.js +1 -1
- package/types/index.d.ts +0 -19
- package/vg/cjs/index.d.ts +0 -19
- package/vg/cjs/index.js +1 -1
- package/vg/es/_auto-entry_vg-Rp3gHZAh.js +1 -0
- package/vg/es/{events-DNAl1ePr.js → events-D35DGr75.js} +1 -1
- package/vg/es/{index-DwGxBmeP.js → index-BrYporHD.js} +1 -1
- package/vg/es/index-C016kE6A.js +1 -0
- package/vg/es/{index-BGun5xCj.js → index-CALBi355.js} +1 -1
- package/vg/es/{index-XeZ7SwBk.js → index-CNJLaOsv.js} +1 -1
- package/vg/es/{index-C7fN75K3.js → index-Caz866vA.js} +1 -1
- package/vg/es/{index-DDL8Af2X.js → index-DBY1obI3.js} +1 -1
- package/vg/es/{index-D1uLhilC.js → index-DZgb0LWb.js} +1 -1
- package/vg/es/{index-C3V_e1XF.js → index-k-YsQ_Sz.js} +1 -1
- package/{vgv2/es/index-DmCJBm4m.js → vg/es/index-wJEus7sL.js} +1 -1
- package/vg/es/index.d.ts +0 -19
- package/vg/es/index.js +1 -1
- package/vg/es/{styles-BvhA39C7.js → styles-5YI1QuIh.js} +1 -1
- package/vg/es/{styles-Bv3vF0-b.js → styles-8pqIa33x.js} +1 -1
- package/vg/es/{styles-3bVT0t_a.js → styles-B4Etu3iY.js} +1 -1
- package/vg/es/{styles-CQmno1pW.js → styles-BI-2-NhT.js} +1 -1
- package/vg/es/{styles-lJcNQKcP.js → styles-CMITVLra.js} +1 -1
- package/{sa/es/styles-BQcj5ZW0.js → vg/es/styles-CPN8YKpo.js} +1 -1
- package/vg/es/{styles-CiILkZUo.js → styles-CUhXHsnF.js} +1 -1
- package/vg/es/{styles-XmDfZpcm.js → styles-CfXV6VRM.js} +1 -1
- package/vg/es/{styles-BIALa-xy.js → styles-DAj9t35g.js} +1 -1
- package/vg/es/{styles-D4oRsLM6.js → styles-DVj73s_P.js} +1 -1
- package/vg/es/{styles-CRr6kpBX.js → styles-DanuOZtw.js} +1 -1
- package/{bt/es/styles-CyR4WSpG.js → vg/es/styles-DtEm8YXe.js} +1 -1
- package/vg/es/{styles-4yCwF2nv.js → styles-MO07__ZK.js} +1 -1
- package/vg/es/{styles-BwiR_kbC.js → styles-P9CwLfZu.js} +1 -1
- package/vg/es/{styles-CIHwlSYD.js → styles-ebC35oa4.js} +1 -1
- package/vg/styles.css +1 -1
- package/vgv2/es/_auto-entry_vgv2-CtFbm1pY.js +1 -0
- package/vgv2/es/{events-4c0QZ5ru.js → events-MLPKGiYJ.js} +1 -1
- package/vgv2/es/{index-_3XO0Gdc.js → index-BLaZuPHA.js} +1 -1
- package/vgv2/es/{index-DgzoxTqw.js → index-BzcuYqZC.js} +1 -1
- package/vgv2/es/index-C6pbI_IV.js +1 -0
- package/vgv2/es/{index-BHZONEW_.js → index-CmzLQXEB.js} +1 -1
- package/vgv2/es/{index-DKdpwEOg.js → index-CopaZijs.js} +1 -1
- package/vgv2/es/index-DJja7Kd0.js +1 -0
- package/vgv2/es/{index-6WUbxF8q.js → index-DNHpLrOS.js} +1 -1
- package/vgv2/es/{index-DsHPQZyc.js → index-dDkybE5J.js} +1 -1
- package/vgv2/es/{index-CiK1eAL3.js → index-eXRipzeT.js} +1 -1
- package/vgv2/es/index.d.ts +0 -19
- package/vgv2/es/index.js +1 -1
- package/{btv2/es/styles-DJT27wtw.js → vgv2/es/styles-2RyU9xTM.js} +1 -1
- package/vgv2/es/{styles-sTq9rRqk.js → styles-B12DPGXZ.js} +1 -1
- package/vgv2/es/{styles-E76tlcUr.js → styles-BT4Xcflt.js} +1 -1
- package/vgv2/es/{styles-DGwU3ILj.js → styles-BVt7_2tj.js} +1 -1
- package/vgv2/es/{styles-CSmqo9nP.js → styles-Bz6hOrxF.js} +1 -1
- package/vgv2/es/{styles-szVijAOX.js → styles-C8Nt-9bo.js} +1 -1
- package/vgv2/es/{styles-B858Hsls.js → styles-CAYrbIG-.js} +1 -1
- package/vgv2/es/{styles-BaPlw8lH.js → styles-CK-oDz4k.js} +1 -1
- package/{sav2/es/styles-DnoLY9DG.js → vgv2/es/styles-CMK0k5K7.js} +1 -1
- package/{btv2/es/styles-BPOLl8SC.js → vgv2/es/styles-DGUvoCuJ.js} +1 -1
- package/vgv2/es/{styles-Do2sahbB.js → styles-DH2jgzEK.js} +1 -1
- package/vgv2/es/{styles-Kzz5C2Ep.js → styles-Dy62grXK.js} +1 -1
- package/vgv2/es/{styles-BuGStooT.js → styles-Fgm7EU9P.js} +1 -1
- package/vgv2/es/{styles-OYmkqDQW.js → styles-b3k10M9h.js} +1 -1
- package/{btv2/es/styles-SsDyWsc5.js → vgv2/es/styles-yeAuvyL_.js} +1 -1
- package/vgv2/styles.css +1 -1
- package/video/cjs/index.js +1 -1
- package/video/es/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-e5bjjybw.js +0 -1
- package/aftenposten/es/index-DQlbgZ8n.js +0 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BAMydMZR.js +0 -1
- package/aftenpostenv2/es/index-DQlbgZ8n.js +0 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-CKiQ7hDs.js +0 -1
- package/aftonbladet/es/index-DQlbgZ8n.js +0 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-Dh7qL1X3.js +0 -1
- package/aftonbladetv2/es/index-DQlbgZ8n.js +0 -1
- package/bt/es/_auto-entry_bt-CQT-xDPU.js +0 -1
- package/bt/es/index-DQlbgZ8n.js +0 -1
- package/btv2/es/_auto-entry_btv2-893Uo7bG.js +0 -1
- package/btv2/es/index-DQlbgZ8n.js +0 -1
- package/e24/es/_auto-entry_e24-BzGAVnFM.js +0 -1
- package/e24/es/index-BqUeo7N0.js +0 -1
- package/e24/es/index-DQlbgZ8n.js +0 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-ClJ6Fvy9.js +0 -1
- package/fotbollskanalen/es/index-DQlbgZ8n.js +0 -1
- package/koket/es/_auto-entry_koket-CfcCrr2a.js +0 -1
- package/koket/es/index-DQlbgZ8n.js +0 -1
- package/sa/es/_auto-entry_sa-DuMP7yP_.js +0 -1
- package/sa/es/index-DQlbgZ8n.js +0 -1
- package/sav2/es/_auto-entry_sav2-Chan3yFg.js +0 -1
- package/sav2/es/index-DQlbgZ8n.js +0 -1
- package/svd/es/_auto-entry_svd-5Orlt_aZ.js +0 -1
- package/svd/es/index-DQlbgZ8n.js +0 -1
- package/svdv2/es/_auto-entry_svdv2-D92Sr8sv.js +0 -1
- package/svdv2/es/index-DQlbgZ8n.js +0 -1
- package/tv4/es/_auto-entry_tv4-DTu42CVS.js +0 -1
- package/tv4/es/index-DQlbgZ8n.js +0 -1
- package/vg/es/_auto-entry_vg-CI7KeJ7F.js +0 -1
- package/vg/es/index-BYE_L3YR.js +0 -1
- package/vg/es/index-DQlbgZ8n.js +0 -1
- package/vgv2/es/_auto-entry_vgv2-CVxHXRQ3.js +0 -1
- package/vgv2/es/index-DQlbgZ8n.js +0 -1
package/kilkaya/cjs/index.d.ts
CHANGED
|
@@ -187,24 +187,6 @@ type Newsroom = (typeof Newsrooms)[keyof typeof Newsrooms];
|
|
|
187
187
|
|
|
188
188
|
type InitNativeAd = (adObj: AstAdObj, options?: Partial<SiteConfig>) => void;
|
|
189
189
|
|
|
190
|
-
interface IdentityUser {
|
|
191
|
-
userId?: string | number;
|
|
192
|
-
gender?: string;
|
|
193
|
-
}
|
|
194
|
-
/** The effectively used, narrowed down interface of the Account SDK v6 Account or Account SDK v5 Identity */
|
|
195
|
-
type AccountInterface = {
|
|
196
|
-
getUser: () => Promise<IdentityUser>;
|
|
197
|
-
isLoggedIn: () => Promise<boolean>;
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
interface AccountConfig {
|
|
201
|
-
/** Satisfied by function available in account-sdk-browser v6.
|
|
202
|
-
* This should become the non-optional way to get AccountInterface in a future release,
|
|
203
|
-
* as per https://docs.google.com/document/d/1WR4xgRpWMgd3JXClTYKmrwsa3ZrUVABO7-4NYVxaLs0/edit?tab=t.0#heading=h.77mg7jlirhp
|
|
204
|
-
*/
|
|
205
|
-
getAccountSdk?: () => Promise<AccountInterface>;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
190
|
declare const CogwheelPositions: {
|
|
209
191
|
readonly LEFT: "left";
|
|
210
192
|
readonly RIGHT: "right";
|
|
@@ -228,7 +210,6 @@ interface SiteConfig {
|
|
|
228
210
|
tcf?: TCFConfig;
|
|
229
211
|
prebid?: PrebidConfig;
|
|
230
212
|
pulse?: PulseConfig;
|
|
231
|
-
account?: AccountConfig;
|
|
232
213
|
finnBlink?: FinnBlinkConfig;
|
|
233
214
|
wallpaper?: WallpaperConfig;
|
|
234
215
|
fullscreenScroll?: FullscreenScrollConfig;
|
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="vg",r="sa",i="bt",o="e24";class a{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class s{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class l{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class d extends l{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const c="[data-k5a-teaser-analytics]",u=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new d(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(c);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(c);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},g=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},v=(e,t)=>{console.warn("[Advertory WARN]: ",e)},p=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return g("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(g("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{g("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{g("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);g("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),f="no",h="se",y="cmp:loaded";let m="undefined"!=typeof window?window._tcf_:void 0,w=!1;const b=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(g("TCF bypass param detected, returning consent: true"),!0):(g("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(w)return null;if(!m)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=m.getConsentedToAllSync();return g(`TCF consented to all is: ${t}`),m.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(g("Getting TCF consent manager..."),window._tcf_)return g("TCF consent manager is already available"),m=window._tcf_,void e(m);g("TCF consent manager is not available");const n=()=>{g("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(m=window._tcf_,e(m)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(y,n),w=!0,t(new Error("Timeout waiting for CMP to load"))},o);g("Listening for CMP loaded event..."),document.addEventListener(y,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===f;if(t||n)return g("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield p(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!m)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{g("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);m.onTcfReady(()=>{g("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),m.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}},k=()=>t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"==typeof window)return void e(void 0);if(window.schAccount)return void e(window.schAccount);if(window.Identity)return void e(window.Identity);if(window.schIdentity)return void e(window.schIdentity);const t=new AbortController;window.addEventListener("schAccount:ready",()=>{t.abort(),e(window.schAccount)},{once:!0,signal:t.signal}),window.addEventListener("identity-initialized",()=>{t.abort(),e(window.Identity)},{once:!0,signal:t.signal}),window.addEventListener("schIdentity:ready",()=>{t.abort(),e(window.schIdentity)},{once:!0,signal:t.signal})})});class C{constructor(e){this.account=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.account)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return g("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.account)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}}function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T,S;var A=E(function(){if(S)return T;S=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},T=s}());const O=["placements","takeover","refreshConfig","editory"],P={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},I=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||v("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||v("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||v("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||v("pageContext.deviceType is required."),n||v("pageOptions is required."),r||v("placements is required."),(null==i?void 0:i.defaultThreshold)||v("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&v(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class j{set(e){I(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of O){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=A(j.DEFAULT_SITE_HANDLERS,e)}}j.DEFAULT_SITE_HANDLERS={siteEvents:P,initNativeAd:()=>{}};const _=new j;_.modifyConfigProperties.bind(_);const L=864e5,M=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return g("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=L)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=L)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return g("Error with parsing localStorage data"),null}}}})(),x=e=>e.startsWith("glci_"),N=()=>{var e;return((e=[])=>e.filter(x))(null!==(e=(()=>{const e=M.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},U=/^glci_/,$="gender_",F="geo_",q="male",D="female",K=e=>t(void 0,void 0,void 0,function*(){try{const n=yield((e,n)=>t(void 0,void 0,void 0,function*(){const t=(null==n?void 0:n.getAccountSdk)?n.getAccountSdk:k;return Promise.race([t(),new Promise(t=>setTimeout(()=>t(void 0),e))])}))(500,e),r=new C(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===q||o===D?`${$}${o}`:void 0}catch(e){return}}),B=e=>t(void 0,void 0,void 0,function*(){const t=[],n=yield K(e),r=(()=>{const e=N().map(e=>`${F}${e.replace(U,"")}`);return Array.from(new Set(e))})();return n&&t.push(n),r&&t.push(...r),t}),R="front";class V{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===R?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class H{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class J{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class W{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:l}}){if(!(null==e?void 0:e.instance))return;const d={[n]:new a,[o]:new V,"no-aftenposten":new H,[i]:new z,"no-bergenstidende":new z,[r]:new J,"no-stavangeraftenblad":new J}[l]||new s;u(e.instance,d,t)}injectKilkayaMeta(e,n){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),r=yield B(n);t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(r)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(g(`Kilkaya event for slot: ${n}`),!n)return void g("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(g(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):g("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s,account:l}=e;if(!(null==s?void 0:s.enabled))return;const d=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return g(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=b(e,0,n);return(yield i())?(g(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(g(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");d&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(d,l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},l,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new W;yield t.run(e)});
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");function t(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="vg",r="sa",i="bt",o="e24";class a{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class s{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class l{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class d extends l{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const c="[data-k5a-teaser-analytics]",u=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new d(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(c);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(c);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},g=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},v=(e,t)=>{console.warn("[Advertory WARN]: ",e)},p=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return g("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(g("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{g("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{g("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);g("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),f="no",h="se",y="cmp:loaded";let m="undefined"!=typeof window?window._tcf_:void 0,b=!1;const w=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(g("TCF bypass param detected, returning consent: true"),!0):(g("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(b)return null;if(!m)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=m.getConsentedToAllSync();return g(`TCF consented to all is: ${t}`),m.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(g("Getting TCF consent manager..."),window._tcf_)return g("TCF consent manager is already available"),m=window._tcf_,void e(m);g("TCF consent manager is not available");const n=()=>{g("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(m=window._tcf_,e(m)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(y,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},o);g("Listening for CMP loaded event..."),document.addEventListener(y,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===f;if(t||n)return g("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield p(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!m)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{g("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);m.onTcfReady(()=>{g("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),m.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class k{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return g("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T,E;var O=C(function(){if(E)return T;E=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},T=s}());const S=["placements","takeover","refreshConfig","editory"],P={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},A=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||v("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||v("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||v("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||v("pageContext.deviceType is required."),n||v("pageOptions is required."),r||v("placements is required."),(null==i?void 0:i.defaultThreshold)||v("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,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])&&v(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class I{set(e){A(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of S){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=O(I.DEFAULT_SITE_HANDLERS,e)}}I.DEFAULT_SITE_HANDLERS={siteEvents:P,initNativeAd:()=>{}};const j=new I;j.modifyConfigProperties.bind(j);const L=864e5,_=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return g("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=L)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=L)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return g("Error with parsing localStorage data"),null}}}})(),M=e=>e.startsWith("glci_"),x=()=>{var e;return((e=[])=>e.filter(M))(null!==(e=(()=>{const e=_.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},N=/^glci_/,U="gender_",$="geo_",F="male",q="female",D=()=>t(void 0,void 0,void 0,function*(){try{const n=yield(e=500,t(void 0,void 0,void 0,function*(){return Promise.race([t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new k(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===F||o===q?`${U}${o}`:void 0}catch(e){return}var e}),K=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield D(),n=(()=>{const e=x().map(e=>`${$}${e.replace(N,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),B="front";class R{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===B?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class V{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class H{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class z{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class J{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:l}}){if(!(null==e?void 0:e.instance))return;const d={[n]:new a,[o]:new R,"no-aftenposten":new V,[i]:new H,"no-bergenstidende":new H,[r]:new z,"no-stavangeraftenblad":new z}[l]||new s;u(e.instance,d,t)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield K();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(g(`Kilkaya event for slot: ${n}`),!n)return void g("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(g(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):g("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return g(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return g(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=w(e,0,n);return(yield i())?(g(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(g(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");l&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},l,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new J;yield t.run(e)});
|
package/kilkaya/es/index.d.ts
CHANGED
|
@@ -187,24 +187,6 @@ type Newsroom = (typeof Newsrooms)[keyof typeof Newsrooms];
|
|
|
187
187
|
|
|
188
188
|
type InitNativeAd = (adObj: AstAdObj, options?: Partial<SiteConfig>) => void;
|
|
189
189
|
|
|
190
|
-
interface IdentityUser {
|
|
191
|
-
userId?: string | number;
|
|
192
|
-
gender?: string;
|
|
193
|
-
}
|
|
194
|
-
/** The effectively used, narrowed down interface of the Account SDK v6 Account or Account SDK v5 Identity */
|
|
195
|
-
type AccountInterface = {
|
|
196
|
-
getUser: () => Promise<IdentityUser>;
|
|
197
|
-
isLoggedIn: () => Promise<boolean>;
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
interface AccountConfig {
|
|
201
|
-
/** Satisfied by function available in account-sdk-browser v6.
|
|
202
|
-
* This should become the non-optional way to get AccountInterface in a future release,
|
|
203
|
-
* as per https://docs.google.com/document/d/1WR4xgRpWMgd3JXClTYKmrwsa3ZrUVABO7-4NYVxaLs0/edit?tab=t.0#heading=h.77mg7jlirhp
|
|
204
|
-
*/
|
|
205
|
-
getAccountSdk?: () => Promise<AccountInterface>;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
190
|
declare const CogwheelPositions: {
|
|
209
191
|
readonly LEFT: "left";
|
|
210
192
|
readonly RIGHT: "right";
|
|
@@ -228,7 +210,6 @@ interface SiteConfig {
|
|
|
228
210
|
tcf?: TCFConfig;
|
|
229
211
|
prebid?: PrebidConfig;
|
|
230
212
|
pulse?: PulseConfig;
|
|
231
|
-
account?: AccountConfig;
|
|
232
213
|
finnBlink?: FinnBlinkConfig;
|
|
233
214
|
wallpaper?: WallpaperConfig;
|
|
234
215
|
fullscreenScroll?: FullscreenScrollConfig;
|
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="vg",i="sa",o="bt",a="e24";class s{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class l{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class d{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class c extends d{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const u="[data-k5a-teaser-analytics]",g=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new c(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(u);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(u);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},v=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},p=(e,t)=>{console.warn("[Advertory WARN]: ",e)},f=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return v("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(v("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{v("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{v("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);v("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),h="no",y="se",m="cmp:loaded";let w="undefined"!=typeof window?window._tcf_:void 0,b=!1;const k=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(v("TCF bypass param detected, returning consent: true"),!0):(v("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(b)return null;if(!w)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=w.getConsentedToAllSync();return v(`TCF consented to all is: ${t}`),w.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(v("Getting TCF consent manager..."),window._tcf_)return v("TCF consent manager is already available"),w=window._tcf_,void e(w);v("TCF consent manager is not available");const n=()=>{v("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(w=window._tcf_,e(w)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(m,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},o);v("Listening for CMP loaded event..."),document.addEventListener(m,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h;if(t||n)return v("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield f(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!w)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{v("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);w.onTcfReady(()=>{v("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),w.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}},C=()=>n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"==typeof window)return void e(void 0);if(window.schAccount)return void e(window.schAccount);if(window.Identity)return void e(window.Identity);if(window.schIdentity)return void e(window.schIdentity);const t=new AbortController;window.addEventListener("schAccount:ready",()=>{t.abort(),e(window.schAccount)},{once:!0,signal:t.signal}),window.addEventListener("identity-initialized",()=>{t.abort(),e(window.Identity)},{once:!0,signal:t.signal}),window.addEventListener("schIdentity:ready",()=>{t.abort(),e(window.schIdentity)},{once:!0,signal:t.signal})})});class E{constructor(e){this.account=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.account)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return v("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.account)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S,A;var O=T(function(){if(A)return S;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)},{})},S=s}());const P=["placements","takeover","refreshConfig","editory"],I={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},j=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||p("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||p("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||p("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||p("pageContext.deviceType is required."),n||p("pageOptions is required."),r||p("placements is required."),(null==i?void 0:i.defaultThreshold)||p("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r;const i=e.pageSectionsSelectors,o=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(r=e.widescreenSwitching)||void 0===r?void 0:r.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of o)e&&!(null==i?void 0:i[t])&&p(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class _{set(e){j(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of P){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=O(_.DEFAULT_SITE_HANDLERS,e)}}_.DEFAULT_SITE_HANDLERS={siteEvents:I,initNativeAd:()=>{}};const L=new _;L.modifyConfigProperties.bind(L);const M=864e5,N=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return v("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=M)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=M)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return v("Error with parsing localStorage data"),null}}}})(),U=e=>e.startsWith("glci_"),$=()=>{var e;return((e=[])=>e.filter(U))(null!==(e=(()=>{const e=N.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},F=/^glci_/,x="gender_",D="geo_",q="male",B="female",K=e=>n(void 0,void 0,void 0,function*(){try{const t=yield((e,t)=>n(void 0,void 0,void 0,function*(){const n=(null==t?void 0:t.getAccountSdk)?t.getAccountSdk:C;return Promise.race([n(),new Promise(t=>setTimeout(()=>t(void 0),e))])}))(500,e),r=new E(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===q||o===B?`${x}${o}`:void 0}catch(e){return}}),R=e=>n(void 0,void 0,void 0,function*(){const t=[],n=yield K(e),r=(()=>{const e=$().map(e=>`${D}${e.replace(F,"")}`);return Array.from(new Set(e))})();return n&&t.push(n),r&&t.push(...r),t}),V="front";class H{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===V?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class z{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class J{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class W{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class X{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const d={[r]:new s,[a]:new H,"no-aftenposten":new z,[o]:new J,"no-bergenstidende":new J,[i]:new W,"no-stavangeraftenblad":new W}[n]||new l;g(e.instance,d,t)}injectKilkayaMeta(e,t){return n(this,void 0,void 0,function*(){const n=document.createElement("script"),r=yield R(t);n.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(r)} };`,document.head.appendChild(n)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(v(`Kilkaya event for slot: ${n}`),!n)return void v("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(v(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):v("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s,account:l}=e;if(!(null==s?void 0:s.enabled))return;const d=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return v(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=k(e,0,n);return(yield i())?(v(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(v(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");d&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(d,l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}const G=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},Q=e=>n(void 0,void 0,void 0,function*(){const t=new X;yield t.run(e)});export{G as Kilkaya,Q as runKilkaya};
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const r="vg",i="sa",o="bt",a="e24";class s{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class l{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class d{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:r}=this.parseKilkayaData(e);return{id:r,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class c extends d{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const u="[data-k5a-teaser-analytics]",g=(e,t,n)=>{const r=document.querySelectorAll("k5a-stream");if(!r.length)return;const i=new c(e,t,n),o=new WeakMap,a=e=>{const t=o.get(e);t&&(t.disconnect(),o.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(u);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(i.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(o.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(u);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(i.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),o.set(e,n)})(n,t)})},{threshold:.5});r.forEach(e=>{s.observe(e),e.addEventListener("click",()=>i.trackContentClick(e))})},v=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},p=(e,t)=>{console.warn("[Advertory WARN]: ",e)},f=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return v("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(v("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{v("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{v("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);v("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),h="no",y="se",m="cmp:loaded";let b="undefined"!=typeof window?window._tcf_:void 0,w=!1;const k=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(v("TCF bypass param detected, returning consent: true"),!0):(v("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(w)return null;if(!b)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=b.getConsentedToAllSync();return v(`TCF consented to all is: ${t}`),b.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(v("Getting TCF consent manager..."),window._tcf_)return v("TCF consent manager is already available"),b=window._tcf_,void e(b);v("TCF consent manager is not available");const n=()=>{v("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(b=window._tcf_,e(b)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(m,n),w=!0,t(new Error("Timeout waiting for CMP to load"))},o);v("Listening for CMP loaded event..."),document.addEventListener(m,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h;if(t||n)return v("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield f(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!b)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{v("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);b.onTcfReady(()=>{v("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),b.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class C{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return v("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E,O;var S=T(function(){if(O)return E;O=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},E=s}());const P=["placements","takeover","refreshConfig","editory"],A={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},I=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||p("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||p("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||p("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||p("pageContext.deviceType is required."),n||p("pageOptions is required."),r||p("placements is required."),(null==i?void 0:i.defaultThreshold)||p("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,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])&&p(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)};class j{set(e){I(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of P){const r=e[n];void 0!==r&&(t[n]=r)}Object.assign(this.config,t),Object.hasOwn(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.hasOwn(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.hasOwn(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=S(j.DEFAULT_SITE_HANDLERS,e)}}j.DEFAULT_SITE_HANDLERS={siteEvents:A,initNativeAd:()=>{}};const L=new j;L.modifyConfigProperties.bind(L);const _=864e5,M=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return v("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=_)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=_)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return v("Error with parsing localStorage data"),null}}}})(),N=e=>e.startsWith("glci_"),U=()=>{var e;return((e=[])=>e.filter(N))(null!==(e=(()=>{const e=M.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},$=/^glci_/,F="gender_",x="geo_",D="male",q="female",B=()=>n(void 0,void 0,void 0,function*(){try{const t=yield(e=500,n(void 0,void 0,void 0,function*(){return Promise.race([n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new C(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===D||o===q?`${F}${o}`:void 0}catch(e){return}var e}),K=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield B(),n=(()=>{const e=U().map(e=>`${x}${e.replace($,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),R="front";class V{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===R?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class H{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class J{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class W{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const d={[r]:new s,[a]:new V,"no-aftenposten":new H,[o]:new z,"no-bergenstidende":new z,[i]:new J,"no-stavangeraftenblad":new J}[n]||new l;g(e.instance,d,t)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield K();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(v(`Kilkaya event for slot: ${n}`),!n)return void v("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(v(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):v("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";(e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return v(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return v(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=k(e,0,n);return(yield i())?(v(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(v(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");l&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e))})}}const X=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},G=e=>n(void 0,void 0,void 0,function*(){const t=new W;yield t.run(e)});export{X as Kilkaya,G as runKilkaya};
|
package/klart/cjs/index.d.ts
CHANGED
|
@@ -391,24 +391,6 @@ interface CreateInitNativeAdConfig {
|
|
|
391
391
|
postProcess?: (adObj: AstAdObj, adContainer: HTMLElement) => void;
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
interface IdentityUser {
|
|
395
|
-
userId?: string | number;
|
|
396
|
-
gender?: string;
|
|
397
|
-
}
|
|
398
|
-
/** The effectively used, narrowed down interface of the Account SDK v6 Account or Account SDK v5 Identity */
|
|
399
|
-
type AccountInterface = {
|
|
400
|
-
getUser: () => Promise<IdentityUser>;
|
|
401
|
-
isLoggedIn: () => Promise<boolean>;
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
interface AccountConfig {
|
|
405
|
-
/** Satisfied by function available in account-sdk-browser v6.
|
|
406
|
-
* This should become the non-optional way to get AccountInterface in a future release,
|
|
407
|
-
* as per https://docs.google.com/document/d/1WR4xgRpWMgd3JXClTYKmrwsa3ZrUVABO7-4NYVxaLs0/edit?tab=t.0#heading=h.77mg7jlirhp
|
|
408
|
-
*/
|
|
409
|
-
getAccountSdk?: () => Promise<AccountInterface>;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
394
|
declare const CogwheelPositions: {
|
|
413
395
|
readonly LEFT: "left";
|
|
414
396
|
readonly RIGHT: "right";
|
|
@@ -432,7 +414,6 @@ interface SiteConfig {
|
|
|
432
414
|
tcf?: TCFConfig;
|
|
433
415
|
prebid?: PrebidConfig;
|
|
434
416
|
pulse?: PulseConfig;
|
|
435
|
-
account?: AccountConfig;
|
|
436
417
|
finnBlink?: FinnBlinkConfig;
|
|
437
418
|
wallpaper?: WallpaperConfig;
|
|
438
419
|
fullscreenScroll?: FullscreenScrollConfig;
|