@schibsted/advertory 3.5.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ad-native/cjs/index.d.ts +6 -27
- package/ad-native/es/index.d.ts +6 -27
- package/aftenposten/cjs/index.d.ts +6 -27
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-DRy582No.js +1 -0
- package/aftenposten/es/{events-BdUUv4z9.js → events-C9C7urqL.js} +1 -1
- package/aftenposten/es/{index-pwlm_8K9.js → index-BkS_SJlJ.js} +1 -1
- package/aftenposten/es/{index-B0GbVMVf.js → index-BnqSaT1c.js} +1 -1
- package/aftenposten/es/{index-DapT0kRB.js → index-C3FOilzo.js} +1 -1
- package/aftenposten/es/{index-C_ljmtA9.js → index-CydB8YIr.js} +1 -1
- package/aftenposten/es/{index-DKtW-pTb.js → index-DORsiGYv.js} +1 -1
- package/aftenposten/es/{index-ChQz2fSU.js → index-DeI8d-uV.js} +1 -1
- package/aftenposten/es/{index-cS_ROIVL.js → index-DwPGsi8k.js} +1 -1
- package/aftenposten/es/{index-DkhtWF8d.js → index-cQE0VJo1.js} +1 -1
- package/aftenposten/es/index.d.ts +6 -27
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-Dmx2lehx.js → styles-80njiXh8.js} +1 -1
- package/aftenposten/es/{styles-C8Zgiulr.js → styles-9muMJKJn.js} +1 -1
- package/aftenposten/es/{styles-e0EN2V-x.js → styles-B0TjAFsC.js} +1 -1
- package/aftenposten/es/{styles-BQ-lJJ7T.js → styles-BqDARxy2.js} +1 -1
- package/aftenposten/es/{styles-B8dOeQvd.js → styles-C-mBJ4KF.js} +1 -1
- package/aftenposten/es/{styles-R1ul5aQy.js → styles-CH01dhZI.js} +1 -1
- package/aftenposten/es/{styles-poVB2pbH.js → styles-CQkWKgtJ.js} +1 -1
- package/aftenposten/es/{styles-Dd4NzezP.js → styles-CkwzAwsB.js} +1 -1
- package/aftenposten/es/{styles-CvqBpTZq.js → styles-DwsygbnU.js} +1 -1
- package/aftenposten/es/{styles-Cf0KXpQR.js → styles-s1wxb2F_.js} +1 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-CXrYo3kj.js +1 -0
- package/aftenpostenv2/es/{events-DcWIew6H.js → events-ByEM8ZeV.js} +1 -1
- package/aftenpostenv2/es/{index-DZzhmxxW.js → index-B0U7ps9y.js} +1 -1
- package/aftenpostenv2/es/{index-CcSUoH4K.js → index-BZciKqap.js} +1 -1
- package/aftenpostenv2/es/{index-C7WYLENT.js → index-CxmBWC8z.js} +1 -1
- package/aftenpostenv2/es/{index-DF_5taAR.js → index-Dp17754Z.js} +1 -1
- package/aftenpostenv2/es/{index-Dcvv755W.js → index-DzW5W5w1.js} +1 -1
- package/aftenpostenv2/es/{index-lNsi3PkQ.js → index-T22foY0A.js} +1 -1
- package/aftenpostenv2/es/{index-CrKzCfAy.js → index-TeY0tmGM.js} +1 -1
- package/aftenpostenv2/es/{index-AopMILqF.js → index-Vv6YGuEQ.js} +1 -1
- package/aftenpostenv2/es/index.d.ts +6 -27
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-DJS8FgJN.js → styles-2437hpxv.js} +1 -1
- package/aftenpostenv2/es/{styles-BAw6-DTz.js → styles-B9yGGUxs.js} +1 -1
- package/aftenpostenv2/es/{styles-Bj5ghS1X.js → styles-CE4ljrOq.js} +1 -1
- package/aftenpostenv2/es/{styles-P6wiFv7t.js → styles-CFIY_fYs.js} +1 -1
- package/aftenpostenv2/es/{styles-BM1Sl2Gt.js → styles-C_hqfq3h.js} +1 -1
- package/aftenpostenv2/es/{styles-BDLsV2h0.js → styles-CwOFrT-m.js} +1 -1
- package/aftenpostenv2/es/{styles-IW7sRlQb.js → styles-DVb70HkY.js} +1 -1
- package/aftenpostenv2/es/{styles-BtZEv20p.js → styles-Dv3iE5E9.js} +1 -1
- package/aftenpostenv2/es/{styles-DE8b2eKw.js → styles-U1MbgnO8.js} +1 -1
- package/aftenpostenv2/es/{styles-CIIzxpxi.js → styles-gvMqFZ6Z.js} +1 -1
- package/aftonbladet/cjs/index.d.ts +6 -27
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-B5rZbU4l.js +1 -0
- package/aftonbladet/es/{events-IGtjvn9p.js → events-BbyNwvht.js} +1 -1
- package/aftonbladet/es/{index-CHU0K-b3.js → index-B2yfV01q.js} +1 -1
- package/aftonbladet/es/{index-BhKqdx8_.js → index-BG8DyJ9Q.js} +1 -1
- package/aftonbladet/es/{index-Caooy7VZ.js → index-BdoEltYH.js} +1 -1
- package/aftonbladet/es/{index-D6pMj_OI.js → index-BjfZKgVs.js} +1 -1
- package/aftonbladet/es/{index-CxookX-2.js → index-CYq72Epp.js} +1 -1
- package/aftonbladet/es/{index-BJEVa6xU.js → index-D-SooPyf.js} +1 -1
- package/aftonbladet/es/{index-CWKXxJLi.js → index-D7OZ0aH_.js} +1 -1
- package/aftonbladet/es/{index-D3BbAZHM.js → index-DJjSX67L.js} +1 -1
- package/aftonbladet/es/index.d.ts +6 -27
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-CneLnMG-.js → styles-BGJhp99G.js} +1 -1
- package/aftonbladet/es/{styles-BbdwnbjB.js → styles-BivTRwAi.js} +1 -1
- package/aftonbladet/es/{styles-l3rELDcP.js → styles-CGvjrVhR.js} +1 -1
- package/aftonbladet/es/{styles-vt9VlFI1.js → styles-COq02SIe.js} +1 -1
- package/aftonbladet/es/{styles-DYVEy61p.js → styles-D4zAPI1T.js} +1 -1
- package/aftonbladet/es/{styles-B_1G3J8x.js → styles-_AmB2_Ug.js} +1 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-yMuDMPYm.js +1 -0
- package/aftonbladetv2/es/{events-DUSi9AAZ.js → events-Be3bdEHm.js} +1 -1
- package/aftonbladetv2/es/{index-CZlvEwnW.js → index-8t-IGjUw.js} +1 -1
- package/aftonbladetv2/es/{index-ChmNC_fC.js → index-BjpGqbjh.js} +1 -1
- package/aftonbladetv2/es/{index-DfBkkkvU.js → index-C82MmKIC.js} +1 -1
- package/aftonbladetv2/es/{index-BLCl5ZdU.js → index-CO_dweCr.js} +1 -1
- package/aftonbladetv2/es/{index-GJk0lNdn.js → index-CWUPQnPC.js} +1 -1
- package/aftonbladetv2/es/{index-CdYhVWhS.js → index-DE5y5asp.js} +1 -1
- package/aftonbladetv2/es/{index-Jfir0E9v.js → index-DgEEfQ4V.js} +1 -1
- package/aftonbladetv2/es/{index-Bcz4aUWR.js → index-vUqiPpRV.js} +1 -1
- package/aftonbladetv2/es/index.d.ts +6 -27
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-C2EUpfcA.js → styles-8negJCpa.js} +1 -1
- package/aftonbladetv2/es/{styles-D8Ya94d4.js → styles-BEJZ55UE.js} +1 -1
- package/aftonbladetv2/es/{styles-CTR9osUQ.js → styles-BRoq235i.js} +1 -1
- package/aftonbladetv2/es/{styles-BW540-He.js → styles-CDUOKDqP.js} +1 -1
- package/aftonbladetv2/es/{styles-Ckoizx2L.js → styles-CdOpQ1lK.js} +1 -1
- package/aftonbladetv2/es/{styles-CGV7U9oK.js → styles-DZXuPYK-.js} +1 -1
- package/bt/cjs/index.d.ts +6 -27
- package/bt/cjs/index.js +1 -1
- package/bt/es/_auto-entry_bt-CnDc-5tA.js +1 -0
- package/bt/es/{events-e79PURVK.js → events-pbsfBMud.js} +1 -1
- package/bt/es/{index-BCITuOKt.js → index-10o0F1pU.js} +1 -1
- package/bt/es/{index-B4efIi6B.js → index-CB1ozKI0.js} +1 -1
- package/bt/es/{index-Ble0HNAL.js → index-CBRfC8oj.js} +1 -1
- package/bt/es/{index-CfGTqWHB.js → index-CGQ4Pl9E.js} +1 -1
- package/bt/es/{index-VicIknhs.js → index-LRR9-Efh.js} +1 -1
- package/bt/es/{index-DkfBi2Yr.js → index-YRhOwnMQ.js} +1 -1
- package/bt/es/{index-Br2GZL3S.js → index-unOIp1lu.js} +1 -1
- package/{sa/es/index-CsLiSVuW.js → bt/es/index-xozUOz97.js} +1 -1
- package/bt/es/index.d.ts +6 -27
- package/bt/es/index.js +1 -1
- package/bt/es/{styles-UB5Sj-JP.js → styles-B5Q64krs.js} +1 -1
- package/bt/es/{styles-1fY0S9gh.js → styles-BZO-cpQq.js} +1 -1
- package/bt/es/{styles-BRkymHpC.js → styles-BpCvYBjb.js} +1 -1
- package/bt/es/{styles-DbidWe0Z.js → styles-Cpv7xnJr.js} +1 -1
- package/{sa/es/styles-C265I3ui.js → bt/es/styles-DEhknitf.js} +1 -1
- package/bt/es/{styles-BQ6Zagkv.js → styles-DMVxTKWi.js} +1 -1
- package/bt/es/{styles-V6NyO8CO.js → styles-DdjMnoRQ.js} +1 -1
- package/{sa/es/styles-DmxGH8LS.js → bt/es/styles-Dzo0F2pC.js} +1 -1
- package/bt/es/{styles-DDXhGRHY.js → styles-a9BNs9Hq.js} +1 -1
- package/btv2/es/_auto-entry_btv2-Br28Rkuw.js +1 -0
- package/btv2/es/{events-DWbA1yJI.js → events-BkiRy_Ug.js} +1 -1
- package/btv2/es/{index-CbKhLQ71.js → index-6ynUsW2j.js} +1 -1
- package/btv2/es/{index-D95XQOb1.js → index-96JPKWtS.js} +1 -1
- package/btv2/es/{index-CmYG9TmN.js → index-BdTWdaSz.js} +1 -1
- package/btv2/es/{index-Dc3aKlrr.js → index-CSvnRSDB.js} +1 -1
- package/btv2/es/{index-DShbLut5.js → index-CiEuFLju.js} +1 -1
- package/btv2/es/{index-D-VoD7Rn.js → index-CxqQHs2I.js} +1 -1
- package/btv2/es/{index-DllNqk9Z.js → index-Dbtbms4R.js} +1 -1
- package/btv2/es/{index-CMIm7eJa.js → index-tpv3zSXV.js} +1 -1
- package/btv2/es/index.d.ts +6 -27
- package/btv2/es/index.js +1 -1
- package/{vgv2/es/styles-Cr5Fs5YF.js → btv2/es/styles-4acKP-vS.js} +1 -1
- package/{sav2/es/styles-BH4mt2Zh.js → btv2/es/styles-5MLqt1cS.js} +1 -1
- package/{sav2/es/styles-CdHzLcOB.js → btv2/es/styles-BiFfLo8O.js} +1 -1
- package/{sav2/es/styles-0zU2Afam.js → btv2/es/styles-CLAANEHj.js} +1 -1
- package/{sav2/es/styles-CCVahElC.js → btv2/es/styles-Cn0AvhaU.js} +1 -1
- package/{vgv2/es/styles-Dt3_EHGE.js → btv2/es/styles-DoxT4Rpe.js} +1 -1
- package/btv2/es/{styles-Beb5i1JJ.js → styles-FCKiIT56.js} +1 -1
- package/btv2/es/{styles-CzOVz7GX.js → styles-M3do-e6G.js} +1 -1
- package/dr-edition/cjs/index.d.ts +6 -13
- package/dr-edition/cjs/index.js +1 -1
- package/dr-edition/es/index.d.ts +6 -13
- package/dr-edition/es/index.js +1 -1
- package/e24/es/_auto-entry_e24-BXEl1rLt.js +1 -0
- package/e24/es/{events-8oWxK8Fm.js → events-Df12jcjq.js} +1 -1
- package/e24/es/{index-BJWHHKPL.js → index-4DwbOKHX.js} +1 -1
- package/e24/es/{index-7zdjryBD.js → index-5AxjPEeO.js} +1 -1
- package/e24/es/{index-Oewlw7Sn.js → index-BeRC9YaL.js} +1 -1
- package/e24/es/{index-DG1bJJNc.js → index-CbclshF7.js} +1 -1
- package/{tv4/es/index-D_WaHIAK.js → e24/es/index-CyTyxMlY.js} +1 -1
- package/e24/es/{index-DGv329Av.js → index-DVso5CpT.js} +1 -1
- package/e24/es/{index-BUkXE3O2.js → index-DY79nObF.js} +1 -1
- package/e24/es/{index-B4CZvSXL.js → index-boY00MWk.js} +1 -1
- package/e24/es/index.d.ts +6 -27
- package/e24/es/index.js +1 -1
- package/e24/es/{styles-CLbzPfFd.js → styles-BnU3rand.js} +1 -1
- package/e24/es/{styles-D-IZsxVS.js → styles-BvaDTUig.js} +1 -1
- package/e24/es/{styles-BQNdcZSJ.js → styles-CEJZ6EtK.js} +1 -1
- package/e24/es/{styles-DjQsLdnn.js → styles-Cf5yeLFb.js} +1 -1
- package/e24/es/{styles-VEo6IZcm.js → styles-D3tm4qWR.js} +1 -1
- package/e24/es/{styles-NQUQlHqi.js → styles-DFTviKUt.js} +1 -1
- package/e24/es/{styles-CcOkuOfr.js → styles-DxT7w3qt.js} +1 -1
- package/e24/es/{styles-D7k76BFk.js → styles-Dzv8j5Mc.js} +1 -1
- package/e24/es/{styles-Dieie13I.js → styles-VzILOixk.js} +1 -1
- package/{tv4/es/styles-B9dFHoiV.js → e24/es/styles-WK8ASD47.js} +1 -1
- package/e24/es/{styles-Dbpp0W0o.js → styles-ZNG2Qej-.js} +1 -1
- package/editory/cjs/index.d.ts +6 -27
- package/editory/es/index.d.ts +6 -27
- package/fotbollskanalen/cjs/index.d.ts +6 -27
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DmWPi7Jf.js +1 -0
- package/fotbollskanalen/es/{events-FpRT23ZZ.js → events-B3ZU1LUw.js} +1 -1
- package/fotbollskanalen/es/{index-Byq7YtvA.js → index-B2k25BEc.js} +1 -1
- package/fotbollskanalen/es/{index-DDGOVmpS.js → index-B9qRzvev.js} +1 -1
- package/fotbollskanalen/es/{index-BHG4pc98.js → index-BnfmazmK.js} +1 -1
- package/fotbollskanalen/es/{index-B5NH2IkJ.js → index-CBwVsPYL.js} +1 -1
- package/fotbollskanalen/es/{index-DxE0VElJ.js → index-CRGyYdc3.js} +1 -1
- package/fotbollskanalen/es/{index-BUPmcSlI.js → index-CkTyreXG.js} +1 -1
- package/fotbollskanalen/es/{index-CFC2qCZk.js → index-Dul3Mfgg.js} +1 -1
- package/fotbollskanalen/es/{index-g58X-f96.js → index-IPyvHxTb.js} +1 -1
- package/fotbollskanalen/es/index.d.ts +6 -27
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-CLQOoJGF.js → styles-DrADmvb2.js} +1 -1
- package/godt/cjs/index.d.ts +6 -27
- package/godt/cjs/index.js +1 -1
- package/kilkaya/cjs/index.d.ts +5 -27
- package/kilkaya/es/index.d.ts +5 -27
- package/klart/cjs/index.d.ts +6 -27
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.d.ts +6 -27
- package/koket/cjs/index.js +1 -1
- package/koket/es/_auto-entry_koket-DeF09zwU.js +1 -0
- package/koket/es/{events-C5iJPAr5.js → events-CA87816N.js} +1 -1
- package/{svdv2/es/index-DKgFd8BC.js → koket/es/index-B73Rktog.js} +1 -1
- package/koket/es/{index-8lrNvRkU.js → index-BKARuv6H.js} +1 -1
- package/koket/es/{index-BeO4rcvy.js → index-BeVRG0em.js} +1 -1
- package/koket/es/{index-CFuuJHk_.js → index-BwFjCDEc.js} +1 -1
- package/koket/es/{index-G9hUyJfl.js → index-CjAvTmMP.js} +1 -1
- package/koket/es/{index-BhiCfvRb.js → index-D4uWONVv.js} +1 -1
- package/koket/es/{index-BTa20fDA.js → index-D55dsLBV.js} +1 -1
- package/koket/es/{index-CUnZcQ5_.js → index-DJNFb_Jk.js} +1 -1
- package/koket/es/index.d.ts +6 -27
- package/koket/es/index.js +1 -1
- package/{svdv2/es/styles-CGPf0BAr.js → koket/es/styles-B8SdZ5io.js} +1 -1
- package/minmote/cjs/index.d.ts +6 -27
- package/minmote/cjs/index.js +1 -1
- package/package.json +1 -1
- package/pent/cjs/index.d.ts +6 -27
- package/pent/cjs/index.js +1 -1
- package/sa/cjs/index.d.ts +6 -27
- package/sa/cjs/index.js +1 -1
- package/sa/es/_auto-entry_sa-BAbSOW6y.js +1 -0
- package/sa/es/{events-Czp1Bf7L.js → events-CQr7o7mK.js} +1 -1
- package/sa/es/{index-BlWGftLo.js → index-Bp0FlYj4.js} +1 -1
- package/sa/es/{index-DRrfqemd.js → index-BpsmpJX6.js} +1 -1
- package/sa/es/{index-BK2Woo0V.js → index-CNOm0Zvv.js} +1 -1
- package/sa/es/{index-DVJ3uiHQ.js → index-DX8zLkcC.js} +1 -1
- package/sa/es/{index-RJ0AwbAy.js → index-DbxvaQTc.js} +1 -1
- package/{bt/es/index-q6gQRPQi.js → sa/es/index-DiAcKl0S.js} +1 -1
- package/sa/es/{index-B6QpNnPz.js → index-FxBHhBpN.js} +1 -1
- package/sa/es/{index-BgzaHxEB.js → index-bdVJz39p.js} +1 -1
- package/sa/es/index.d.ts +6 -27
- package/sa/es/index.js +1 -1
- package/sa/es/{styles-BIEPgknJ.js → styles-Bdm5gig8.js} +1 -1
- package/sa/es/{styles-x_RZ8LfI.js → styles-BwOfPT8j.js} +1 -1
- package/{vg/es/styles-CDe9glwP.js → sa/es/styles-Ck-s8aFw.js} +1 -1
- package/sa/es/{styles-DbqMID7Q.js → styles-CqUSV7ll.js} +1 -1
- package/sa/es/{styles-BZbbl3__.js → styles-CvadVFAo.js} +1 -1
- package/sa/es/{styles-BvK_Hm8A.js → styles-D65Pg6EJ.js} +1 -1
- package/sa/es/{styles-DE-5r6jI.js → styles-DDcLvb2o.js} +1 -1
- package/{vg/es/styles-BxHcjj-n.js → sa/es/styles-DEjree18.js} +1 -1
- package/{bt/es/styles-C6Hn-Ylj.js → sa/es/styles-DZXqLTj3.js} +1 -1
- package/sav2/es/_auto-entry_sav2-CRnV3rZ2.js +1 -0
- package/sav2/es/{events-BI8lwyAS.js → events-DzwqUdEh.js} +1 -1
- package/sav2/es/{index-Dm0CwDko.js → index-14YfQ5Vr.js} +1 -1
- package/sav2/es/{index-Dd4x--40.js → index-38SjBDT2.js} +1 -1
- package/sav2/es/{index-jUIaqg6x.js → index-4sqWaTaf.js} +1 -1
- package/sav2/es/{index-VFT0zh22.js → index-B9ab_exe.js} +1 -1
- package/sav2/es/{index-CFYdF9nM.js → index-C1PhEl88.js} +1 -1
- package/sav2/es/{index-BgPfftGv.js → index-CbfYCeKr.js} +1 -1
- package/sav2/es/{index-GTPIp0mQ.js → index-DUEqQmBJ.js} +1 -1
- package/sav2/es/{index-BQ8oAuHr.js → index-_tdwh7iG.js} +1 -1
- package/sav2/es/index.d.ts +6 -27
- package/sav2/es/index.js +1 -1
- package/sav2/es/{styles-Lru4uD64.js → styles-BP4c8b71.js} +1 -1
- package/{btv2/es/styles-BIeAmWTL.js → sav2/es/styles-BquGVxXw.js} +1 -1
- package/sav2/es/{styles-BR_5kDUe.js → styles-BuEo0j8F.js} +1 -1
- package/{vgv2/es/styles-BVfmnN3W.js → sav2/es/styles-CSib2wFT.js} +1 -1
- package/sav2/es/{styles-BMp80jah.js → styles-CVOyC0Hy.js} +1 -1
- package/{btv2/es/styles-DjvA7hfT.js → sav2/es/styles-D84Umkht.js} +1 -1
- package/sav2/es/{styles-CZnBwaC3.js → styles-DQgdRzKf.js} +1 -1
- package/{btv2/es/styles-es1ee8SC.js → sav2/es/styles-wpXGtNVU.js} +1 -1
- package/svd/cjs/index.d.ts +6 -27
- package/svd/cjs/index.js +1 -1
- package/svd/es/_auto-entry_svd-C6TfzEqZ.js +1 -0
- package/svd/es/{events-CWFgkDG1.js → events-D7UqxiPo.js} +1 -1
- package/{e24/es/index-fEZDTay_.js → svd/es/index-B114sh1q.js} +1 -1
- package/svd/es/{index-BP41ecWy.js → index-CFnnxX9d.js} +1 -1
- package/svd/es/{index-BKe3qaf7.js → index-CQCYYjIO.js} +1 -1
- package/svd/es/{index-D5ggf8Xp.js → index-CXVjdJfX.js} +1 -1
- package/svd/es/{index-Bya6Uq5B.js → index-DAojgc2F.js} +1 -1
- package/svd/es/{index-CCt9DWBH.js → index-DWNMB-6h.js} +1 -1
- package/svd/es/{index-BcNPzl4P.js → index-Din3zIPs.js} +1 -1
- package/svd/es/{index-C3cDOsuZ.js → index-DlW-FUIo.js} +1 -1
- package/svd/es/index.d.ts +6 -27
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-BWNs7vrn.js → styles-BV30fi5B.js} +1 -1
- package/svd/es/{styles-CcAVJGfE.js → styles-Bt0L4xU3.js} +1 -1
- package/svd/es/{styles-u3GakbDH.js → styles-DSLLwXoo.js} +1 -1
- package/svd/es/{styles-CI0tJc6e.js → styles-Dp2-I0FM.js} +1 -1
- package/svd/es/{styles-C7-tNUeS.js → styles-a0evvwP0.js} +1 -1
- package/svd/es/{styles-DUN-Sq2Q.js → styles-ocLsivmt.js} +1 -1
- package/svdv2/es/_auto-entry_svdv2-BcxtA5H5.js +1 -0
- package/svdv2/es/{events-CbogHJk0.js → events-DkpF1OVt.js} +1 -1
- package/svdv2/es/{index-DQEHhVgW.js → index-BNSx3ZEA.js} +1 -1
- package/svdv2/es/{index-BnEvrjDt.js → index-C7YoinwT.js} +1 -1
- package/svdv2/es/{index-aN0srUEo.js → index-Dbmwj6UJ.js} +1 -1
- package/{koket/es/index-DFkHEsQ5.js → svdv2/es/index-Dr9YS9Kp.js} +1 -1
- package/svdv2/es/{index-LihWROT2.js → index-JL0kyJm9.js} +1 -1
- package/svdv2/es/{index-4lmCFsSW.js → index-JQzzmtfN.js} +1 -1
- package/svdv2/es/{index-DaAnuF-t.js → index-blcrdGFA.js} +1 -1
- package/svdv2/es/{index-D3McYvBy.js → index-yWxbTBYY.js} +1 -1
- package/svdv2/es/index.d.ts +6 -27
- package/svdv2/es/index.js +1 -1
- package/{koket/es/styles-BQIPgsRh.js → svdv2/es/styles-B1n7-3GW.js} +1 -1
- package/svdv2/es/{styles-tlqB4rsT.js → styles-BlXdm2-y.js} +1 -1
- package/svdv2/es/{styles-P6IOCdoC.js → styles-BukOlMgV.js} +1 -1
- package/svdv2/es/{styles-Eh1GkHPx.js → styles-ByR8L2Dq.js} +1 -1
- package/svdv2/es/{styles-CKXTdzs6.js → styles-CEvkNQZ3.js} +1 -1
- package/svdv2/es/{styles-Dci-bvKU.js → styles-UmufiLeH.js} +1 -1
- package/tek/cjs/index.d.ts +6 -27
- package/tek/cjs/index.js +1 -1
- package/tracker/cjs/index.d.ts +6 -27
- package/tracker/cjs/index.js +1 -1
- package/tracker/es/index.d.ts +6 -27
- package/tracker/es/index.js +1 -1
- package/tv4/cjs/index.d.ts +6 -27
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/_auto-entry_tv4-DsO-wqRO.js +1 -0
- package/tv4/es/{events-Bn0rJup8.js → events-4DkzCgrU.js} +1 -1
- package/tv4/es/{index-B6yq5Gyv.js → index-B6ag97Bw.js} +1 -1
- package/tv4/es/{index-gT_GHXn7.js → index-BQo7w0nT.js} +1 -1
- package/tv4/es/{index-BJji2ATp.js → index-BksRxrvK.js} +1 -1
- package/tv4/es/{index-BkFrwx_r.js → index-CPNVZLfK.js} +1 -1
- package/tv4/es/{index-BPa0_w5G.js → index-C_duha9o.js} +1 -1
- package/tv4/es/{index-BWEU3m94.js → index-DCgJvntT.js} +1 -1
- package/tv4/es/{index-Cq1qeKSR.js → index-GDlvM-pA.js} +1 -1
- package/{svd/es/index-CLVC_R25.js → tv4/es/index-R0DJReD8.js} +1 -1
- package/tv4/es/index.d.ts +6 -27
- package/tv4/es/index.js +1 -1
- package/{e24/es/styles-IKoxXgO0.js → tv4/es/styles-CpFHpgiA.js} +1 -1
- package/tvnu/cjs/index.d.ts +6 -27
- package/tvnu/cjs/index.js +1 -1
- package/types/index.d.ts +6 -27
- package/vg/cjs/index.d.ts +6 -27
- package/vg/cjs/index.js +1 -1
- package/vg/es/_auto-entry_vg-5Fd4iVl3.js +1 -0
- package/vg/es/{events-BsbXyYJY.js → events-GNcxmmFo.js} +1 -1
- package/vg/es/{index-CbihXkGs.js → index-7HsThj3q.js} +1 -1
- package/vg/es/{index-zknvo2nh.js → index-B20ShDSB.js} +1 -1
- package/vg/es/{index-DRb6TbCy.js → index-BdKcLkzi.js} +1 -1
- package/vg/es/{index-BjFWFokY.js → index-BvlbZzc8.js} +1 -1
- package/vg/es/{index-DXTyIRph.js → index-CHYiiXpY.js} +1 -1
- package/vg/es/{index-B0l-K3Nm.js → index-D7eOCUrJ.js} +1 -1
- package/vg/es/{index-Bf04WCFs.js → index-DAIjI6Xf.js} +1 -1
- package/vg/es/{index-DiHKSlZN.js → index-Dx0-EJRL.js} +1 -1
- package/vg/es/index.d.ts +6 -27
- package/vg/es/index.js +1 -1
- package/vg/es/{styles-CpI8Vlow.js → styles-9iOhmpQG.js} +1 -1
- package/vg/es/{styles-VY3hon_C.js → styles-B5RVrjQu.js} +1 -1
- package/vg/es/{styles-BexolDY4.js → styles-BErBnM5w.js} +1 -1
- package/vg/es/{styles-CIXqdJYT.js → styles-BJjHhcVd.js} +1 -1
- package/vg/es/{styles-ByLB3fAX.js → styles-BV2uz0rS.js} +1 -1
- package/vg/es/{styles-DP0QUZVe.js → styles-BVJJ_nnN.js} +1 -1
- package/vg/es/{styles-DthpO9K3.js → styles-BYlo20Oa.js} +1 -1
- package/vg/es/{styles-fArum_w2.js → styles-BvIBq9wk.js} +1 -1
- package/vg/es/{styles-b8Bmj5zP.js → styles-C5Ty1y5b.js} +1 -1
- package/{sa/es/styles-CgQ3pAiP.js → vg/es/styles-C7uK6z6P.js} +1 -1
- package/{bt/es/styles-DNutfDj8.js → vg/es/styles-DhxL-Kdf.js} +1 -1
- package/vg/es/{styles-CWBxD9zM.js → styles-F51u_KzR.js} +1 -1
- package/vg/es/{styles-BUtIGfqi.js → styles-F_EI0-R4.js} +1 -1
- package/vg/es/{styles-B63x2SpC.js → styles-k2ioKG8W.js} +1 -1
- package/vg/es/{styles-DxISXjJx.js → styles-mRZXwsl_.js} +1 -1
- package/vgv2/es/_auto-entry_vgv2-VQkwNK6O.js +1 -0
- package/vgv2/es/{events-B9GLUG_c.js → events-umppYZ48.js} +1 -1
- package/vgv2/es/{index-CRmtQ0Ln.js → index-B80fFKEp.js} +1 -1
- package/vgv2/es/{index-CFD6e815.js → index-ByTqOSor.js} +1 -1
- package/vgv2/es/{index-CWzszIrQ.js → index-C755Omrb.js} +1 -1
- package/vgv2/es/{index-BPI8SWbT.js → index-D9DCQDzE.js} +1 -1
- package/vgv2/es/{index-C1qvZ43-.js → index-DRyZUuLI.js} +1 -1
- package/vgv2/es/{index-gk_94DrP.js → index-Dh6g8FK2.js} +1 -1
- package/vgv2/es/{index-DNJnGBOC.js → index-JRUgEAmx.js} +1 -1
- package/vgv2/es/{index-BrQmd96n.js → index-gZmFckTC.js} +1 -1
- package/vgv2/es/index.d.ts +6 -27
- package/vgv2/es/index.js +1 -1
- package/{btv2/es/styles--PBvFHeQ.js → vgv2/es/styles-64VQBzw7.js} +1 -1
- package/vgv2/es/{styles-BypJiXcH.js → styles-B-nkSOeh.js} +1 -1
- package/vgv2/es/{styles-BveOiWvC.js → styles-BAYB1_6J.js} +1 -1
- package/{btv2/es/styles-BFs5C1e2.js → vgv2/es/styles-BGK9zDgq.js} +1 -1
- package/vgv2/es/{styles-Ca6cxxB-.js → styles-BNZNX1uK.js} +1 -1
- package/vgv2/es/{styles-Ze0zbpIu.js → styles-C5mWX7Pu.js} +1 -1
- package/vgv2/es/{styles-C7Zup_OS.js → styles-CYOT98OO.js} +1 -1
- package/vgv2/es/{styles-DNcC9ILz.js → styles-D-8BgKu3.js} +1 -1
- package/vgv2/es/{styles-DpUl3Suf.js → styles-DIkzDo-C.js} +1 -1
- package/vgv2/es/{styles-CXtejXaY.js → styles-DKDSQL-H.js} +1 -1
- package/{btv2/es/styles-kWtSX6kZ.js → vgv2/es/styles-DdwWbFr7.js} +1 -1
- package/vgv2/es/{styles-D1hkQkrv.js → styles-DnnW6Uhr.js} +1 -1
- package/vgv2/es/{styles-By7C17yJ.js → styles-c8ku3cpV.js} +1 -1
- package/vgv2/es/{styles-COdKCQnY.js → styles-noKspg7k.js} +1 -1
- package/vgv2/es/{styles-fmVnipjj.js → styles-zHrW6Rjb.js} +1 -1
- package/video/cjs/index.js +1 -1
- package/video/es/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-KOEDRGMj.js +0 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-B5bkdkn2.js +0 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-Czkvey-5.js +0 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-CI9xcMRh.js +0 -1
- package/bt/es/_auto-entry_bt-CI6IkXgn.js +0 -1
- package/btv2/es/_auto-entry_btv2-Byn2KJna.js +0 -1
- package/e24/es/_auto-entry_e24-Chx1wkKd.js +0 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-BjtGQ3_l.js +0 -1
- package/koket/es/_auto-entry_koket-B2WlSuMx.js +0 -1
- package/sa/es/_auto-entry_sa-DR1Eak8R.js +0 -1
- package/sav2/es/_auto-entry_sav2-Buoo9FKC.js +0 -1
- package/svd/es/_auto-entry_svd-BH3Ngjrt.js +0 -1
- package/svdv2/es/_auto-entry_svdv2-D3Q-Cwuh.js +0 -1
- package/tv4/es/_auto-entry_tv4-CQemRCV3.js +0 -1
- package/vg/es/_auto-entry_vg-Ysm3SmZS.js +0 -1
- package/vgv2/es/_auto-entry_vgv2-CXADx6AD.js +0 -1
package/tracker/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import Tracker from '@schibsted/pulse-sdk';
|
|
2
|
+
|
|
1
3
|
type AstAdType = 'banner' | 'video' | 'native' | 'outstream';
|
|
2
4
|
interface AstBanner {
|
|
3
5
|
content: string;
|
|
@@ -133,39 +135,17 @@ declare const Countries: {
|
|
|
133
135
|
};
|
|
134
136
|
type Country = (typeof Countries)[keyof typeof Countries];
|
|
135
137
|
|
|
136
|
-
interface
|
|
137
|
-
xandr?: {
|
|
138
|
-
ppId1?: string;
|
|
139
|
-
ppId2?: string;
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
interface TrackerInstance {
|
|
143
|
-
getAdvertisingIdentifiers: () => Promise<AdvertisingIdentifiers>;
|
|
144
|
-
getUserId: () => Promise<undefined | string | number>;
|
|
145
|
-
getEnvironmentId: () => Promise<undefined | string>;
|
|
146
|
-
getActor: () => Promise<undefined | unknown>;
|
|
147
|
-
state?: {
|
|
148
|
-
pageViewId?: string;
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
interface PulseInstance extends TrackerInstance {
|
|
152
|
-
pulseTracker?: TrackerInstance;
|
|
138
|
+
interface PulseLegacyExtras {
|
|
153
139
|
trackElementView?: (eventInput: unknown) => Promise<void>;
|
|
154
140
|
trackElementClick?: (eventInput: unknown) => Promise<void>;
|
|
155
141
|
trackClickUIElement?: (eventInput: unknown) => Promise<void>;
|
|
156
142
|
trackViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
157
|
-
trackLegacyClickUIElement?: (eventInput: unknown) => Promise<void>;
|
|
158
|
-
trackLegacyViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
159
143
|
}
|
|
160
|
-
interface
|
|
144
|
+
interface PulseConfig {
|
|
161
145
|
clientId: string;
|
|
162
|
-
instance:
|
|
146
|
+
instance: Tracker & PulseLegacyExtras;
|
|
163
147
|
hasherUrl?: string;
|
|
164
148
|
}
|
|
165
|
-
interface Pulse {
|
|
166
|
-
clientId: string;
|
|
167
|
-
instance: PulseInstance;
|
|
168
|
-
}
|
|
169
149
|
interface UserIdsObject {
|
|
170
150
|
userIds: Array<AstUserIds>;
|
|
171
151
|
}
|
|
@@ -254,8 +234,7 @@ interface SiteConfig {
|
|
|
254
234
|
glimr?: GlimrConfig;
|
|
255
235
|
tcf?: TCFConfig;
|
|
256
236
|
prebid?: PrebidConfig;
|
|
257
|
-
|
|
258
|
-
pulse?: Pulse;
|
|
237
|
+
pulse?: PulseConfig;
|
|
259
238
|
finnBlink?: FinnBlinkConfig;
|
|
260
239
|
wallpaper?: WallpaperConfig;
|
|
261
240
|
fullscreenScroll?: FullscreenScrollConfig;
|
package/tracker/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,n,i,t){return new(i||(i=Promise))(function(s,d){function r(e){try{a(t.next(e))}catch(e){d(e)}}function o(e){try{a(t.throw(e))}catch(e){d(e)}}function a(e){var n;e.done?s(e.value):(n=e.value,n instanceof i?n:new i(function(e){e(n)})).then(r,o)}a((t=t.apply(e,n||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="opaque",i=i=>e(void 0,void 0,void 0,function*(){if(i.type!==n){if(!i.ok)throw new Error(i.statusText);return yield i.json()}}),t={get:(n,...t)=>e(void 0,[n,...t],void 0,function*(n,t={}){var{timeout:s}=t,d=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(t=Object.getOwnPropertySymbols(e);s<t.length;s++)n.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(i[t[s]]=e[t[s]])}return i}(t,["timeout"]);if(s)return((n,t,s)=>e(void 0,void 0,void 0,function*(){const e=new AbortController,d=setTimeout(()=>e.abort(),s);try{const s=yield fetch(n,Object.assign(Object.assign({},t),{signal:e.signal}));return i(s)}finally{clearTimeout(d)}}))(n,d,s);const r=yield fetch(n,d);return i(r)}),post:(n,i,t)=>e(void 0,void 0,void 0,function*(){const e=JSON.stringify(t),s=yield fetch(n,{method:"POST",headers:i,body:e});if(!s.ok)throw new Error(s.statusText);return yield s.json()})},s=(e,n)=>{const i="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(n?console.log(i,e,n):console.log(i,e))},d=864e5,r=(()=>{const e=e=>{const n=window.localStorage.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch(e){return s("Error with parsing localStorage data"),null}},n=(e,n)=>{window.localStorage.setItem(e,JSON.stringify(n))};return{get:e,set:n,setWithTimestamp:(e,i,t=d)=>{const s={data:i,expirationTime:(new Date).getTime()+t};n(e,JSON.stringify(s))},getByTimestamp:(n,i=d)=>{const t=e(n);if(!t)return null;if(!i)return t;try{const{expirationTime:e,data:n}=JSON.parse(t);return(new Date).getTime()<=e?n:null}catch(e){return s("Error with parsing localStorage data"),null}}}})(),o={NO:"no",SE:"se"},a="advertory:ppids-cache",l={[o.SE]:`SCH${o.SE.toUpperCase()}-EnvHash`,[o.NO]:`SCH${o.NO.toUpperCase()}-EnvHash`},c={[o.SE]:`SCH${o.SE.toUpperCase()}-UserHash`,[o.NO]:`SCH${o.NO.toUpperCase()}-UserHash`},u={[o.SE]:`sch${o.SE}-envhash-v3`,[o.NO]:`sch${o.NO}-envhash-v3`},p={[o.SE]:`sch${o.SE}-userhash-v3`,[o.NO]:`sch${o.NO}-userhash-v3`},v={[o.SE]:`'sch${o.SE}-iosid-v3'`,[o.NO]:`'sch${o.NO}-iosid-v3'`},h={[o.SE]:`sch${o.SE}-androidid-v3`,[o.NO]:`sch${o.NO}-androidid-v3`},f={[o.SE]:"sdrn:schibsted.com:user",[o.NO]:"sdrn:spid.no:user"};class g{constructor(){this.eids=[]}add(e,n){return e&&this.eids.push({id:e,source:n}),this}buildRyEids(){return this.eids.map(({id:e,source:n})=>({source:n,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:n})=>`${n},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const n=new URLSearchParams;return this.eids.slice(1).forEach(({id:i,source:t})=>{n.append(e,`${t}-${i}`)}),n}}const P=e=>new Promise(n=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void n(!1);const i=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const n=Number(e);return s("Advertising permission value obtained synchronously: ",e),Boolean(n)})();if(null!==i)return void n(i);let t=!1;const d=e=>{t||(s("Resolving advertising permission value obtained"),t=!0,n(e))},r=setTimeout(()=>{s("Advertising permission timed out, resolving with false"),d(!1)},3e3);window._tcf_.onTcfReady(()=>{s("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const n=Number(e);s("Advertising permission value obtained asynchronously: ",e),d(Boolean(n))})}),y="cmp:loaded";let I="undefined"!=typeof window?window._tcf_:void 0,m=!1;const w=(n,i,t)=>{const d=!!(null==n?void 0:n.enabled),r=(null==n?void 0:n.timeout)||3e3,a=(l="bypass_tcf",new URLSearchParams(window.location.search).get(l));var l;const c=()=>{if(!(null==n?void 0:n.enabled))return!0;if(((e,n)=>e?!!n&&(s("TCF bypass param detected, returning consent: true"),!0):(s("TCF is not enabled, returning consent: true"),!0))(d,a))return!0;if(m)return null;if(!I)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const e=I.getConsentedToAllSync();return s(`TCF consented to all is: ${e}`),I.getConsentedToAllSync()};return{initConsentManager:()=>(null==n?void 0:n.enabled)?new Promise((e,n)=>{if(s("Getting TCF consent manager..."),window._tcf_)return s("TCF consent manager is already available"),I=window._tcf_,void e(I);s("TCF consent manager is not available");const i=()=>{s("CMP loaded, resolving consent manager..."),t&&clearTimeout(t),window._tcf_?(I=window._tcf_,e(I)):n(new Error("CMP loaded but window._tcf_ is not defined"))},t=setTimeout(()=>{document.removeEventListener(y,i),m=!0,n(new Error("Timeout waiting for CMP to load"))},r);s("Listening for CMP loaded event..."),document.addEventListener(y,i,{once:!0})}):Promise.resolve(null),getConsentSync:c,getConsentAsync:()=>e(void 0,void 0,void 0,function*(){if(null==n?void 0:n.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${n.schibstedAdChoicesOverrideValue}`),Boolean(Number(n.schibstedAdChoicesOverrideValue));const e=(null==n?void 0:n.advertisingCMPSignalEnabled)&&t===o.SE,i=(null==n?void 0:n.advertisingCMPSignalEnabled)&&t===o.NO;if(e||i)return s("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield P(n);if(!(null==n?void 0:n.enabled))return!0;const d=c();return null!==d?d:yield new Promise((e,n)=>{try{if(!I)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let n=!1;const i=i=>{n||(n=!0,e(i))},t=setTimeout(()=>{s("TCF isConsentedToAll timed out, resolving with false"),i(!1)},r);I.onTcfReady(()=>{s("On Tcf Ready called, waiting for consent"),clearTimeout(t)}),I.isConsentedToAll(n=>{clearTimeout(t),e(n)})}catch(e){n(e)}})})}},b=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(n){return e(this,arguments,void 0,function*(e,n=1e4){var i,t;const s=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),n)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(i=s.xandr)||void 0===i?void 0:i.ppId1,null===(t=s.xandr)||void 0===t?void 0:t.ppId2)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:""}}setPPIDs(e,n){this.ppid1=null!=e?e:"",this.ppid2=null!=n?n:""}},C=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(n,i){return e(this,void 0,void 0,function*(){var e,t,s,d,o,l,c,u,p,v,h;const f=r.get(a),g=yield this.getNewPPIDs(n,i);if(this.shouldHash(f,g)){const i=null!==(e=n.hasherUrl)&&void 0!==e?e:"https://hasher.schibsted.com/api/v1/hash",r=this.createHasherPayload(g),a=yield this.hashPPIDs(r,i);return a?(this.cachePPIDs(r,a,null===(t=g.idfv)||void 0===t?void 0:t.plain,null===(s=g.anId)||void 0===s?void 0:s.plain),void this.setPPIDs(null!==(d=a.userId)&&void 0!==d?d:"",null!==(o=a.environmentId)&&void 0!==o?o:"",null===(l=g.idfv)||void 0===l?void 0:l.plain,null===(c=g.anId)||void 0===c?void 0:c.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(u=null==f?void 0:f.userId.hashed)&&void 0!==u?u:"",null!==(p=null==f?void 0:f.environmentId.hashed)&&void 0!==p?p:"",null===(v=null==g?void 0:g.idfv)||void 0===v?void 0:v.plain,null===(h=null==g?void 0:g.anId)||void 0===h?void 0:h.plain)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,n,i,t){this.ppid1=null!=e?e:"",this.ppid2=null!=n?n:"",this.idfv=null!=i?i:null,this.anId=null!=t?t:null}shouldHash(e,n){var i,t;if(!e)return!0;for(const s in e){if((null===(i=e[s])||void 0===i?void 0:i.plain)!==(null===(t=n[s])||void 0===t?void 0:t.plain))return!0}return!1}cachePPIDs(e,n,i,t){const s=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:n.userId},environmentId:{plain:e.environmentId,hashed:n.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},i?{idfv:{plain:i}}:{}),t?{anId:{plain:t}}:{});r.set(a,s)}hashPPIDs(n,i){return e(this,void 0,void 0,function*(){try{const e=new Headers({"Content-Type":"application/json"});return yield t.post(i,e,n)}catch(e){return s("Error with hashing PPIDs",e),null}})}getNewPPIDs(n,i){return e(this,arguments,void 0,function*({clientId:n,instance:i},t){const s=yield((n,i)=>e(void 0,void 0,void 0,function*(){const e=yield n.getUserId();return e?`${f[i]}:${e}`:null}))(i,t),d=yield(n=>e(void 0,void 0,void 0,function*(){const e=yield n.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}))(i),r=window.advertory_idfv,o=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:n},userId:{plain:s},environmentId:{plain:d},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),o?{anId:{plain:o}}:{})})}createHasherPayload({clientId:e,trackerType:n,trackerVersion:i,userId:t,environmentId:s}){return{clientId:e.plain,trackerType:n.plain,trackerVersion:i.plain,userId:t.plain,environmentId:s.plain}}};exports.getFinnBlinkUserId=()=>e(void 0,void 0,void 0,function*(){const{ppid1:e}=C.getPPIDs();return e}),exports.getOpenRtbEids=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s}=C.getPPIDs();return(new g).add(i,l[e]).add(n,c[e]).add(s,u[e]).add(t,p[e]).buildRyEids()},exports.getPPIDLoggedInStatus=()=>{const{ppid1:e,ppid2:n}=b.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":n?"1":"0"}},exports.getPPIDNorstatString=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s}=C.getPPIDs(),d=(new g).add(i,l[e]).add(n,c[e]).add(s,u[e]).add(t,p[e]);return`${d.buildNorstatPath()}?${d.buildNorstatQuery("alias").toString()}`},exports.getPPIDRelevantYieldConfig=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s,idfv:d,anId:r}=C.getPPIDs();if(!i)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new g).add(i,l[e]).add(n,c[e]).add(s,u[e]).add(t,p[e]).add(d,v[e]).add(r,h[e]).buildRyEids()}}]}}},exports.getUserIdsObject=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s,idfv:d,anId:r}=C.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new g).add(i,l[e]).add(n,c[e]).add(s,u[e]).add(t,p[e]).add(d,v[e]).add(r,h[e]).buildEids()}]}},exports.getVideoPPIDs=n=>e(void 0,void 0,void 0,function*(){const{ppid1:e,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s}=C.getPPIDs(),d=(new g).add(i,l[n]).add(e,c[n]).add(s,u[n]).add(t,p[n]);return yield new Promise(e=>{e(d.buildVideoEids())})}),exports.setXandrPPIDs=n=>e(void 0,void 0,void 0,function*(){const{tracker:i,tcf:t,pageContext:{countryCode:d,isMobileApp:r}}=n,o=yield((n,i,t,...d)=>e(void 0,[n,i,t,...d],void 0,function*(e,n,i,t="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return s(`Schibsted Consent to Pay is not enabled, returning true for ${t}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${t}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:d}=w(e,0,i);return(yield d())?(s(`Schibsted Ad Choices consent given according to TCF consent manager for ${t}`),!0):(s(`Schibsted Ad Choices consent not given according to TCF consent manager for ${t}`),!1)}))(t,r,d,"setXandrPPIDs");if(!o)return;if(!i)return;(yield Promise.allSettled([b.processPPIDs(i,null==t?void 0:t.timeout),C.processPPIDs(i,d)])).forEach((e,n)=>{if("rejected"===e.status){s(`Cannot fetch PPIDs v${n+2}`,e.reason)}})});
|
|
1
|
+
"use strict";function e(e,n,i,t){return new(i||(i=Promise))(function(s,d){function r(e){try{a(t.next(e))}catch(e){d(e)}}function o(e){try{a(t.throw(e))}catch(e){d(e)}}function a(e){var n;e.done?s(e.value):(n=e.value,n instanceof i?n:new i(function(e){e(n)})).then(r,o)}a((t=t.apply(e,n||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="opaque",i=i=>e(void 0,void 0,void 0,function*(){if(i.type!==n){if(!i.ok)throw new Error(i.statusText);return yield i.json()}}),t={get:(n,...t)=>e(void 0,[n,...t],void 0,function*(n,t={}){var{timeout:s}=t,d=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(t=Object.getOwnPropertySymbols(e);s<t.length;s++)n.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(i[t[s]]=e[t[s]])}return i}(t,["timeout"]);if(s)return((n,t,s)=>e(void 0,void 0,void 0,function*(){const e=new AbortController,d=setTimeout(()=>e.abort(),s);try{const s=yield fetch(n,Object.assign(Object.assign({},t),{signal:e.signal}));return i(s)}finally{clearTimeout(d)}}))(n,d,s);const r=yield fetch(n,d);return i(r)}),post:(n,i,t)=>e(void 0,void 0,void 0,function*(){const e=JSON.stringify(t),s=yield fetch(n,{method:"POST",headers:i,body:e});if(!s.ok)throw new Error(s.statusText);return yield s.json()})},s=(e,n)=>{const i="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(n?console.log(i,e,n):console.log(i,e))},d=864e5,r=(()=>{const e=e=>{const n=window.localStorage.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch(e){return s("Error with parsing localStorage data"),null}},n=(e,n)=>{window.localStorage.setItem(e,JSON.stringify(n))};return{get:e,set:n,setWithTimestamp:(e,i,t=d)=>{const s={data:i,expirationTime:(new Date).getTime()+t};n(e,JSON.stringify(s))},getByTimestamp:(n,i=d)=>{const t=e(n);if(!t)return null;if(!i)return t;try{const{expirationTime:e,data:n}=JSON.parse(t);return(new Date).getTime()<=e?n:null}catch(e){return s("Error with parsing localStorage data"),null}}}})(),o={NO:"no",SE:"se"},a="advertory:ppids-cache",l={[o.SE]:`SCH${o.SE.toUpperCase()}-EnvHash`,[o.NO]:`SCH${o.NO.toUpperCase()}-EnvHash`},c={[o.SE]:`SCH${o.SE.toUpperCase()}-UserHash`,[o.NO]:`SCH${o.NO.toUpperCase()}-UserHash`},u={[o.SE]:`sch${o.SE}-envhash-v3`,[o.NO]:`sch${o.NO}-envhash-v3`},p={[o.SE]:`sch${o.SE}-userhash-v3`,[o.NO]:`sch${o.NO}-userhash-v3`},v={[o.SE]:`'sch${o.SE}-iosid-v3'`,[o.NO]:`'sch${o.NO}-iosid-v3'`},h={[o.SE]:`sch${o.SE}-androidid-v3`,[o.NO]:`sch${o.NO}-androidid-v3`},f={[o.SE]:"sdrn:schibsted.com:user",[o.NO]:"sdrn:spid.no:user"};class g{constructor(){this.eids=[]}add(e,n){return e&&this.eids.push({id:e,source:n}),this}buildRyEids(){return this.eids.map(({id:e,source:n})=>({source:n,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:n})=>`${n},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const n=new URLSearchParams;return this.eids.slice(1).forEach(({id:i,source:t})=>{n.append(e,`${t}-${i}`)}),n}}const P=e=>new Promise(n=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void n(!1);const i=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const n=Number(e);return s("Advertising permission value obtained synchronously: ",e),Boolean(n)})();if(null!==i)return void n(i);let t=!1;const d=e=>{t||(s("Resolving advertising permission value obtained"),t=!0,n(e))},r=setTimeout(()=>{s("Advertising permission timed out, resolving with false"),d(!1)},3e3);window._tcf_.onTcfReady(()=>{s("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const n=Number(e);s("Advertising permission value obtained asynchronously: ",e),d(Boolean(n))})}),y="cmp:loaded";let I="undefined"!=typeof window?window._tcf_:void 0,m=!1;const w=(n,i,t)=>{const d=!!(null==n?void 0:n.enabled),r=(null==n?void 0:n.timeout)||3e3,a=(l="bypass_tcf",new URLSearchParams(window.location.search).get(l));var l;const c=()=>{if(!(null==n?void 0:n.enabled))return!0;if(((e,n)=>e?!!n&&(s("TCF bypass param detected, returning consent: true"),!0):(s("TCF is not enabled, returning consent: true"),!0))(d,a))return!0;if(m)return null;if(!I)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const e=I.getConsentedToAllSync();return s(`TCF consented to all is: ${e}`),I.getConsentedToAllSync()};return{initConsentManager:()=>(null==n?void 0:n.enabled)?new Promise((e,n)=>{if(s("Getting TCF consent manager..."),window._tcf_)return s("TCF consent manager is already available"),I=window._tcf_,void e(I);s("TCF consent manager is not available");const i=()=>{s("CMP loaded, resolving consent manager..."),t&&clearTimeout(t),window._tcf_?(I=window._tcf_,e(I)):n(new Error("CMP loaded but window._tcf_ is not defined"))},t=setTimeout(()=>{document.removeEventListener(y,i),m=!0,n(new Error("Timeout waiting for CMP to load"))},r);s("Listening for CMP loaded event..."),document.addEventListener(y,i,{once:!0})}):Promise.resolve(null),getConsentSync:c,getConsentAsync:()=>e(void 0,void 0,void 0,function*(){if(null==n?void 0:n.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${n.schibstedAdChoicesOverrideValue}`),Boolean(Number(n.schibstedAdChoicesOverrideValue));const e=(null==n?void 0:n.advertisingCMPSignalEnabled)&&t===o.SE,i=(null==n?void 0:n.advertisingCMPSignalEnabled)&&t===o.NO;if(e||i)return s("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield P(n);if(!(null==n?void 0:n.enabled))return!0;const d=c();return null!==d?d:yield new Promise((e,n)=>{try{if(!I)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let n=!1;const i=i=>{n||(n=!0,e(i))},t=setTimeout(()=>{s("TCF isConsentedToAll timed out, resolving with false"),i(!1)},r);I.onTcfReady(()=>{s("On Tcf Ready called, waiting for consent"),clearTimeout(t)}),I.isConsentedToAll(n=>{clearTimeout(t),e(n)})}catch(e){n(e)}})})}},b=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(n){return e(this,arguments,void 0,function*(e,n=1e4){var i,t;const s=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),n)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(i=s.xandr)||void 0===i?void 0:i.ppId1,null===(t=s.xandr)||void 0===t?void 0:t.ppId2)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:""}}setPPIDs(e,n){this.ppid1=null!=e?e:"",this.ppid2=null!=n?n:""}},C=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(n,i){return e(this,void 0,void 0,function*(){var e,t,s,d,o,l,c,u,p,v,h;const f=r.get(a),g=yield this.getNewPPIDs(n,i);if(this.shouldHash(f,g)){const i=null!==(e=n.hasherUrl)&&void 0!==e?e:"https://hasher.schibsted.com/api/v1/hash",r=this.createHasherPayload(g),a=yield this.hashPPIDs(r,i);return a?(this.cachePPIDs(r,a,null===(t=g.idfv)||void 0===t?void 0:t.plain,null===(s=g.anId)||void 0===s?void 0:s.plain),void this.setPPIDs(null!==(d=a.userId)&&void 0!==d?d:"",null!==(o=a.environmentId)&&void 0!==o?o:"",null===(l=g.idfv)||void 0===l?void 0:l.plain,null===(c=g.anId)||void 0===c?void 0:c.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(u=null==f?void 0:f.userId.hashed)&&void 0!==u?u:"",null!==(p=null==f?void 0:f.environmentId.hashed)&&void 0!==p?p:"",null===(v=null==g?void 0:g.idfv)||void 0===v?void 0:v.plain,null===(h=null==g?void 0:g.anId)||void 0===h?void 0:h.plain)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,n,i,t){this.ppid1=null!=e?e:"",this.ppid2=null!=n?n:"",this.idfv=null!=i?i:null,this.anId=null!=t?t:null}shouldHash(e,n){var i,t;if(!e)return!0;for(const s in e){if((null===(i=e[s])||void 0===i?void 0:i.plain)!==(null===(t=n[s])||void 0===t?void 0:t.plain))return!0}return!1}cachePPIDs(e,n,i,t){const s=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:n.userId},environmentId:{plain:e.environmentId,hashed:n.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},i?{idfv:{plain:i}}:{}),t?{anId:{plain:t}}:{});r.set(a,s)}hashPPIDs(n,i){return e(this,void 0,void 0,function*(){try{const e=new Headers({"Content-Type":"application/json"});return yield t.post(i,e,n)}catch(e){return s("Error with hashing PPIDs",e),null}})}getNewPPIDs(n,i){return e(this,arguments,void 0,function*({clientId:n,instance:i},t){const s=yield((n,i)=>e(void 0,void 0,void 0,function*(){const e=yield n.getUserId();return e?`${f[i]}:${e}`:null}))(i,t),d=yield(r=i,e(void 0,void 0,void 0,function*(){const e=yield r.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}));var r;const o=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:n},userId:{plain:s},environmentId:{plain:d},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},o?{idfv:{plain:o}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:n,trackerVersion:i,userId:t,environmentId:s}){return{clientId:e.plain,trackerType:n.plain,trackerVersion:i.plain,userId:t.plain,environmentId:s.plain}}};exports.getFinnBlinkUserId=()=>e(void 0,void 0,void 0,function*(){const{ppid1:e}=C.getPPIDs();return e}),exports.getOpenRtbEids=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s}=C.getPPIDs();return(new g).add(i,l[e]).add(n,c[e]).add(s,u[e]).add(t,p[e]).buildRyEids()},exports.getPPIDLoggedInStatus=()=>{const{ppid1:e,ppid2:n}=b.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":n?"1":"0"}},exports.getPPIDNorstatString=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s}=C.getPPIDs(),d=(new g).add(i,l[e]).add(n,c[e]).add(s,u[e]).add(t,p[e]);return`${d.buildNorstatPath()}?${d.buildNorstatQuery("alias").toString()}`},exports.getPPIDRelevantYieldConfig=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s,idfv:d,anId:r}=C.getPPIDs();if(!i)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new g).add(i,l[e]).add(n,c[e]).add(s,u[e]).add(t,p[e]).add(d,v[e]).add(r,h[e]).buildRyEids()}}]}}},exports.getUserIdsObject=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s,idfv:d,anId:r}=C.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new g).add(i,l[e]).add(n,c[e]).add(s,u[e]).add(t,p[e]).add(d,v[e]).add(r,h[e]).buildEids()}]}},exports.getVideoPPIDs=n=>e(void 0,void 0,void 0,function*(){const{ppid1:e,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:s}=C.getPPIDs(),d=(new g).add(i,l[n]).add(e,c[n]).add(s,u[n]).add(t,p[n]);return yield new Promise(e=>{e(d.buildVideoEids())})}),exports.setXandrPPIDs=n=>e(void 0,void 0,void 0,function*(){const{pulse:i,tcf:t,pageContext:{countryCode:d,isMobileApp:r}}=n,o=yield((n,i,t,...d)=>e(void 0,[n,i,t,...d],void 0,function*(e,n,i,t="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return s(`Schibsted Consent to Pay is not enabled, returning true for ${t}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${t}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:d}=w(e,0,i);return(yield d())?(s(`Schibsted Ad Choices consent given according to TCF consent manager for ${t}`),!0):(s(`Schibsted Ad Choices consent not given according to TCF consent manager for ${t}`),!1)}))(t,r,d,"setXandrPPIDs");if(!o)return;if(!i)return;(yield Promise.allSettled([b.processPPIDs(i,null==t?void 0:t.timeout),C.processPPIDs(i,d)])).forEach((e,n)=>{if("rejected"===e.status){s(`Cannot fetch PPIDs v${n+2}`,e.reason)}})});
|
package/tracker/es/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import Tracker from '@schibsted/pulse-sdk';
|
|
2
|
+
|
|
1
3
|
type AstAdType = 'banner' | 'video' | 'native' | 'outstream';
|
|
2
4
|
interface AstBanner {
|
|
3
5
|
content: string;
|
|
@@ -133,39 +135,17 @@ declare const Countries: {
|
|
|
133
135
|
};
|
|
134
136
|
type Country = (typeof Countries)[keyof typeof Countries];
|
|
135
137
|
|
|
136
|
-
interface
|
|
137
|
-
xandr?: {
|
|
138
|
-
ppId1?: string;
|
|
139
|
-
ppId2?: string;
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
interface TrackerInstance {
|
|
143
|
-
getAdvertisingIdentifiers: () => Promise<AdvertisingIdentifiers>;
|
|
144
|
-
getUserId: () => Promise<undefined | string | number>;
|
|
145
|
-
getEnvironmentId: () => Promise<undefined | string>;
|
|
146
|
-
getActor: () => Promise<undefined | unknown>;
|
|
147
|
-
state?: {
|
|
148
|
-
pageViewId?: string;
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
interface PulseInstance extends TrackerInstance {
|
|
152
|
-
pulseTracker?: TrackerInstance;
|
|
138
|
+
interface PulseLegacyExtras {
|
|
153
139
|
trackElementView?: (eventInput: unknown) => Promise<void>;
|
|
154
140
|
trackElementClick?: (eventInput: unknown) => Promise<void>;
|
|
155
141
|
trackClickUIElement?: (eventInput: unknown) => Promise<void>;
|
|
156
142
|
trackViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
157
|
-
trackLegacyClickUIElement?: (eventInput: unknown) => Promise<void>;
|
|
158
|
-
trackLegacyViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
159
143
|
}
|
|
160
|
-
interface
|
|
144
|
+
interface PulseConfig {
|
|
161
145
|
clientId: string;
|
|
162
|
-
instance:
|
|
146
|
+
instance: Tracker & PulseLegacyExtras;
|
|
163
147
|
hasherUrl?: string;
|
|
164
148
|
}
|
|
165
|
-
interface Pulse {
|
|
166
|
-
clientId: string;
|
|
167
|
-
instance: PulseInstance;
|
|
168
|
-
}
|
|
169
149
|
interface UserIdsObject {
|
|
170
150
|
userIds: Array<AstUserIds>;
|
|
171
151
|
}
|
|
@@ -254,8 +234,7 @@ interface SiteConfig {
|
|
|
254
234
|
glimr?: GlimrConfig;
|
|
255
235
|
tcf?: TCFConfig;
|
|
256
236
|
prebid?: PrebidConfig;
|
|
257
|
-
|
|
258
|
-
pulse?: Pulse;
|
|
237
|
+
pulse?: PulseConfig;
|
|
259
238
|
finnBlink?: FinnBlinkConfig;
|
|
260
239
|
wallpaper?: WallpaperConfig;
|
|
261
240
|
fullscreenScroll?: FullscreenScrollConfig;
|
package/tracker/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,n,i,t){return new(i||(i=Promise))(function(d,s){function r(e){try{a(t.next(e))}catch(e){s(e)}}function o(e){try{a(t.throw(e))}catch(e){s(e)}}function a(e){var n;e.done?d(e.value):(n=e.value,n instanceof i?n:new i(function(e){e(n)})).then(r,o)}a((t=t.apply(e,n||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="opaque",i=i=>e(void 0,void 0,void 0,function*(){if(i.type!==n){if(!i.ok)throw new Error(i.statusText);return yield i.json()}}),t={get:(n,...t)=>e(void 0,[n,...t],void 0,function*(n,t={}){var{timeout:d}=t,s=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var d=0;for(t=Object.getOwnPropertySymbols(e);d<t.length;d++)n.indexOf(t[d])<0&&Object.prototype.propertyIsEnumerable.call(e,t[d])&&(i[t[d]]=e[t[d]])}return i}(t,["timeout"]);if(d)return((n,t,d)=>e(void 0,void 0,void 0,function*(){const e=new AbortController,s=setTimeout(()=>e.abort(),d);try{const d=yield fetch(n,Object.assign(Object.assign({},t),{signal:e.signal}));return i(d)}finally{clearTimeout(s)}}))(n,s,d);const r=yield fetch(n,s);return i(r)}),post:(n,i,t)=>e(void 0,void 0,void 0,function*(){const e=JSON.stringify(t),d=yield fetch(n,{method:"POST",headers:i,body:e});if(!d.ok)throw new Error(d.statusText);return yield d.json()})},d=(e,n)=>{const i="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(n?console.log(i,e,n):console.log(i,e))},s=864e5,r=(()=>{const e=e=>{const n=window.localStorage.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch(e){return d("Error with parsing localStorage data"),null}},n=(e,n)=>{window.localStorage.setItem(e,JSON.stringify(n))};return{get:e,set:n,setWithTimestamp:(e,i,t=s)=>{const d={data:i,expirationTime:(new Date).getTime()+t};n(e,JSON.stringify(d))},getByTimestamp:(n,i=s)=>{const t=e(n);if(!t)return null;if(!i)return t;try{const{expirationTime:e,data:n}=JSON.parse(t);return(new Date).getTime()<=e?n:null}catch(e){return d("Error with parsing localStorage data"),null}}}})(),o={NO:"no",SE:"se"},a="advertory:ppids-cache",l={[o.SE]:`SCH${o.SE.toUpperCase()}-EnvHash`,[o.NO]:`SCH${o.NO.toUpperCase()}-EnvHash`},c={[o.SE]:`SCH${o.SE.toUpperCase()}-UserHash`,[o.NO]:`SCH${o.NO.toUpperCase()}-UserHash`},u={[o.SE]:`sch${o.SE}-envhash-v3`,[o.NO]:`sch${o.NO}-envhash-v3`},p={[o.SE]:`sch${o.SE}-userhash-v3`,[o.NO]:`sch${o.NO}-userhash-v3`},v={[o.SE]:`'sch${o.SE}-iosid-v3'`,[o.NO]:`'sch${o.NO}-iosid-v3'`},h={[o.SE]:`sch${o.SE}-androidid-v3`,[o.NO]:`sch${o.NO}-androidid-v3`},f={[o.SE]:"sdrn:schibsted.com:user",[o.NO]:"sdrn:spid.no:user"};class g{constructor(){this.eids=[]}add(e,n){return e&&this.eids.push({id:e,source:n}),this}buildRyEids(){return this.eids.map(({id:e,source:n})=>({source:n,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:n})=>`${n},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const n=new URLSearchParams;return this.eids.slice(1).forEach(({id:i,source:t})=>{n.append(e,`${t}-${i}`)}),n}}const P=e=>new Promise(n=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void n(!1);const i=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const n=Number(e);return d("Advertising permission value obtained synchronously: ",e),Boolean(n)})();if(null!==i)return void n(i);let t=!1;const s=e=>{t||(d("Resolving advertising permission value obtained"),t=!0,n(e))},r=setTimeout(()=>{d("Advertising permission timed out, resolving with false"),s(!1)},3e3);window._tcf_.onTcfReady(()=>{d("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const n=Number(e);d("Advertising permission value obtained asynchronously: ",e),s(Boolean(n))})}),y="cmp:loaded";let I="undefined"!=typeof window?window._tcf_:void 0,m=!1;const w=(n,i,t)=>{const s=!!(null==n?void 0:n.enabled),r=(null==n?void 0:n.timeout)||3e3,a=(l="bypass_tcf",new URLSearchParams(window.location.search).get(l));var l;const c=()=>{if(!(null==n?void 0:n.enabled))return!0;if(((e,n)=>e?!!n&&(d("TCF bypass param detected, returning consent: true"),!0):(d("TCF is not enabled, returning consent: true"),!0))(s,a))return!0;if(m)return null;if(!I)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const e=I.getConsentedToAllSync();return d(`TCF consented to all is: ${e}`),I.getConsentedToAllSync()};return{initConsentManager:()=>(null==n?void 0:n.enabled)?new Promise((e,n)=>{if(d("Getting TCF consent manager..."),window._tcf_)return d("TCF consent manager is already available"),I=window._tcf_,void e(I);d("TCF consent manager is not available");const i=()=>{d("CMP loaded, resolving consent manager..."),t&&clearTimeout(t),window._tcf_?(I=window._tcf_,e(I)):n(new Error("CMP loaded but window._tcf_ is not defined"))},t=setTimeout(()=>{document.removeEventListener(y,i),m=!0,n(new Error("Timeout waiting for CMP to load"))},r);d("Listening for CMP loaded event..."),document.addEventListener(y,i,{once:!0})}):Promise.resolve(null),getConsentSync:c,getConsentAsync:()=>e(void 0,void 0,void 0,function*(){if(null==n?void 0:n.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${n.schibstedAdChoicesOverrideValue}`),Boolean(Number(n.schibstedAdChoicesOverrideValue));const e=(null==n?void 0:n.advertisingCMPSignalEnabled)&&t===o.SE,i=(null==n?void 0:n.advertisingCMPSignalEnabled)&&t===o.NO;if(e||i)return d("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield P(n);if(!(null==n?void 0:n.enabled))return!0;const s=c();return null!==s?s:yield new Promise((e,n)=>{try{if(!I)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let n=!1;const i=i=>{n||(n=!0,e(i))},t=setTimeout(()=>{d("TCF isConsentedToAll timed out, resolving with false"),i(!1)},r);I.onTcfReady(()=>{d("On Tcf Ready called, waiting for consent"),clearTimeout(t)}),I.isConsentedToAll(n=>{clearTimeout(t),e(n)})}catch(e){n(e)}})})}},b=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(n){return e(this,arguments,void 0,function*(e,n=1e4){var i,t;const d=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),n)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(i=d.xandr)||void 0===i?void 0:i.ppId1,null===(t=d.xandr)||void 0===t?void 0:t.ppId2)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:""}}setPPIDs(e,n){this.ppid1=null!=e?e:"",this.ppid2=null!=n?n:""}},C=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(n,i){return e(this,void 0,void 0,function*(){var e,t,d,s,o,l,c,u,p,v,h;const f=r.get(a),g=yield this.getNewPPIDs(n,i);if(this.shouldHash(f,g)){const i=null!==(e=n.hasherUrl)&&void 0!==e?e:"https://hasher.schibsted.com/api/v1/hash",r=this.createHasherPayload(g),a=yield this.hashPPIDs(r,i);return a?(this.cachePPIDs(r,a,null===(t=g.idfv)||void 0===t?void 0:t.plain,null===(d=g.anId)||void 0===d?void 0:d.plain),void this.setPPIDs(null!==(s=a.userId)&&void 0!==s?s:"",null!==(o=a.environmentId)&&void 0!==o?o:"",null===(l=g.idfv)||void 0===l?void 0:l.plain,null===(c=g.anId)||void 0===c?void 0:c.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(u=null==f?void 0:f.userId.hashed)&&void 0!==u?u:"",null!==(p=null==f?void 0:f.environmentId.hashed)&&void 0!==p?p:"",null===(v=null==g?void 0:g.idfv)||void 0===v?void 0:v.plain,null===(h=null==g?void 0:g.anId)||void 0===h?void 0:h.plain)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,n,i,t){this.ppid1=null!=e?e:"",this.ppid2=null!=n?n:"",this.idfv=null!=i?i:null,this.anId=null!=t?t:null}shouldHash(e,n){var i,t;if(!e)return!0;for(const d in e){if((null===(i=e[d])||void 0===i?void 0:i.plain)!==(null===(t=n[d])||void 0===t?void 0:t.plain))return!0}return!1}cachePPIDs(e,n,i,t){const d=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:n.userId},environmentId:{plain:e.environmentId,hashed:n.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},i?{idfv:{plain:i}}:{}),t?{anId:{plain:t}}:{});r.set(a,d)}hashPPIDs(n,i){return e(this,void 0,void 0,function*(){try{const e=new Headers({"Content-Type":"application/json"});return yield t.post(i,e,n)}catch(e){return d("Error with hashing PPIDs",e),null}})}getNewPPIDs(n,i){return e(this,arguments,void 0,function*({clientId:n,instance:i},t){const d=yield((n,i)=>e(void 0,void 0,void 0,function*(){const e=yield n.getUserId();return e?`${f[i]}:${e}`:null}))(i,t),s=yield(n=>e(void 0,void 0,void 0,function*(){const e=yield n.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}))(i),r=window.advertory_idfv,o=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:n},userId:{plain:d},environmentId:{plain:s},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),o?{anId:{plain:o}}:{})})}createHasherPayload({clientId:e,trackerType:n,trackerVersion:i,userId:t,environmentId:d}){return{clientId:e.plain,trackerType:n.plain,trackerVersion:i.plain,userId:t.plain,environmentId:d.plain}}},S=n=>e(void 0,void 0,void 0,function*(){const{tracker:i,tcf:t,pageContext:{countryCode:s,isMobileApp:r}}=n,o=yield((n,i,t,...s)=>e(void 0,[n,i,t,...s],void 0,function*(e,n,i,t="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return d(`Schibsted Consent to Pay is not enabled, returning true for ${t}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${t}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:s}=w(e,0,i);return(yield s())?(d(`Schibsted Ad Choices consent given according to TCF consent manager for ${t}`),!0):(d(`Schibsted Ad Choices consent not given according to TCF consent manager for ${t}`),!1)}))(t,r,s,"setXandrPPIDs");if(!o)return;if(!i)return;(yield Promise.allSettled([b.processPPIDs(i,null==t?void 0:t.timeout),C.processPPIDs(i,s)])).forEach((e,n)=>{if("rejected"===e.status){d(`Cannot fetch PPIDs v${n+2}`,e.reason)}})}),E=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d,idfv:s,anId:r}=C.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new g).add(i,l[e]).add(n,c[e]).add(d,u[e]).add(t,p[e]).add(s,v[e]).add(r,h[e]).buildEids()}]}},T=()=>{const{ppid1:e,ppid2:n}=b.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":n?"1":"0"}},O=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d,idfv:s,anId:r}=C.getPPIDs();if(!i)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new g).add(i,l[e]).add(n,c[e]).add(d,u[e]).add(t,p[e]).add(s,v[e]).add(r,h[e]).buildRyEids()}}]}}},D=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d}=C.getPPIDs(),s=(new g).add(i,l[e]).add(n,c[e]).add(d,u[e]).add(t,p[e]);return`${s.buildNorstatPath()}?${s.buildNorstatQuery("alias").toString()}`},N=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d}=C.getPPIDs();return(new g).add(i,l[e]).add(n,c[e]).add(d,u[e]).add(t,p[e]).buildRyEids()},$=n=>e(void 0,void 0,void 0,function*(){const{ppid1:e,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d}=C.getPPIDs(),s=(new g).add(i,l[n]).add(e,c[n]).add(d,u[n]).add(t,p[n]);return yield new Promise(e=>{e(s.buildVideoEids())})}),A=()=>e(void 0,void 0,void 0,function*(){const{ppid1:e}=C.getPPIDs();return e});export{A as getFinnBlinkUserId,N as getOpenRtbEids,T as getPPIDLoggedInStatus,D as getPPIDNorstatString,O as getPPIDRelevantYieldConfig,E as getUserIdsObject,$ as getVideoPPIDs,S as setXandrPPIDs};
|
|
1
|
+
function e(e,n,i,t){return new(i||(i=Promise))(function(d,s){function o(e){try{a(t.next(e))}catch(e){s(e)}}function r(e){try{a(t.throw(e))}catch(e){s(e)}}function a(e){var n;e.done?d(e.value):(n=e.value,n instanceof i?n:new i(function(e){e(n)})).then(o,r)}a((t=t.apply(e,n||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="opaque",i=i=>e(void 0,void 0,void 0,function*(){if(i.type!==n){if(!i.ok)throw new Error(i.statusText);return yield i.json()}}),t={get:(n,...t)=>e(void 0,[n,...t],void 0,function*(n,t={}){var{timeout:d}=t,s=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var d=0;for(t=Object.getOwnPropertySymbols(e);d<t.length;d++)n.indexOf(t[d])<0&&Object.prototype.propertyIsEnumerable.call(e,t[d])&&(i[t[d]]=e[t[d]])}return i}(t,["timeout"]);if(d)return((n,t,d)=>e(void 0,void 0,void 0,function*(){const e=new AbortController,s=setTimeout(()=>e.abort(),d);try{const d=yield fetch(n,Object.assign(Object.assign({},t),{signal:e.signal}));return i(d)}finally{clearTimeout(s)}}))(n,s,d);const o=yield fetch(n,s);return i(o)}),post:(n,i,t)=>e(void 0,void 0,void 0,function*(){const e=JSON.stringify(t),d=yield fetch(n,{method:"POST",headers:i,body:e});if(!d.ok)throw new Error(d.statusText);return yield d.json()})},d=(e,n)=>{const i="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(n?console.log(i,e,n):console.log(i,e))},s=864e5,o=(()=>{const e=e=>{const n=window.localStorage.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch(e){return d("Error with parsing localStorage data"),null}},n=(e,n)=>{window.localStorage.setItem(e,JSON.stringify(n))};return{get:e,set:n,setWithTimestamp:(e,i,t=s)=>{const d={data:i,expirationTime:(new Date).getTime()+t};n(e,JSON.stringify(d))},getByTimestamp:(n,i=s)=>{const t=e(n);if(!t)return null;if(!i)return t;try{const{expirationTime:e,data:n}=JSON.parse(t);return(new Date).getTime()<=e?n:null}catch(e){return d("Error with parsing localStorage data"),null}}}})(),r={NO:"no",SE:"se"},a="advertory:ppids-cache",l={[r.SE]:`SCH${r.SE.toUpperCase()}-EnvHash`,[r.NO]:`SCH${r.NO.toUpperCase()}-EnvHash`},c={[r.SE]:`SCH${r.SE.toUpperCase()}-UserHash`,[r.NO]:`SCH${r.NO.toUpperCase()}-UserHash`},u={[r.SE]:`sch${r.SE}-envhash-v3`,[r.NO]:`sch${r.NO}-envhash-v3`},p={[r.SE]:`sch${r.SE}-userhash-v3`,[r.NO]:`sch${r.NO}-userhash-v3`},v={[r.SE]:`'sch${r.SE}-iosid-v3'`,[r.NO]:`'sch${r.NO}-iosid-v3'`},h={[r.SE]:`sch${r.SE}-androidid-v3`,[r.NO]:`sch${r.NO}-androidid-v3`},f={[r.SE]:"sdrn:schibsted.com:user",[r.NO]:"sdrn:spid.no:user"};class g{constructor(){this.eids=[]}add(e,n){return e&&this.eids.push({id:e,source:n}),this}buildRyEids(){return this.eids.map(({id:e,source:n})=>({source:n,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:n})=>`${n},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const n=new URLSearchParams;return this.eids.slice(1).forEach(({id:i,source:t})=>{n.append(e,`${t}-${i}`)}),n}}const P=e=>new Promise(n=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void n(!1);const i=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const n=Number(e);return d("Advertising permission value obtained synchronously: ",e),Boolean(n)})();if(null!==i)return void n(i);let t=!1;const s=e=>{t||(d("Resolving advertising permission value obtained"),t=!0,n(e))},o=setTimeout(()=>{d("Advertising permission timed out, resolving with false"),s(!1)},3e3);window._tcf_.onTcfReady(()=>{d("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const n=Number(e);d("Advertising permission value obtained asynchronously: ",e),s(Boolean(n))})}),y="cmp:loaded";let I="undefined"!=typeof window?window._tcf_:void 0,m=!1;const w=(n,i,t)=>{const s=!!(null==n?void 0:n.enabled),o=(null==n?void 0:n.timeout)||3e3,a=(l="bypass_tcf",new URLSearchParams(window.location.search).get(l));var l;const c=()=>{if(!(null==n?void 0:n.enabled))return!0;if(((e,n)=>e?!!n&&(d("TCF bypass param detected, returning consent: true"),!0):(d("TCF is not enabled, returning consent: true"),!0))(s,a))return!0;if(m)return null;if(!I)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const e=I.getConsentedToAllSync();return d(`TCF consented to all is: ${e}`),I.getConsentedToAllSync()};return{initConsentManager:()=>(null==n?void 0:n.enabled)?new Promise((e,n)=>{if(d("Getting TCF consent manager..."),window._tcf_)return d("TCF consent manager is already available"),I=window._tcf_,void e(I);d("TCF consent manager is not available");const i=()=>{d("CMP loaded, resolving consent manager..."),t&&clearTimeout(t),window._tcf_?(I=window._tcf_,e(I)):n(new Error("CMP loaded but window._tcf_ is not defined"))},t=setTimeout(()=>{document.removeEventListener(y,i),m=!0,n(new Error("Timeout waiting for CMP to load"))},o);d("Listening for CMP loaded event..."),document.addEventListener(y,i,{once:!0})}):Promise.resolve(null),getConsentSync:c,getConsentAsync:()=>e(void 0,void 0,void 0,function*(){if(null==n?void 0:n.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${n.schibstedAdChoicesOverrideValue}`),Boolean(Number(n.schibstedAdChoicesOverrideValue));const e=(null==n?void 0:n.advertisingCMPSignalEnabled)&&t===r.SE,i=(null==n?void 0:n.advertisingCMPSignalEnabled)&&t===r.NO;if(e||i)return d("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield P(n);if(!(null==n?void 0:n.enabled))return!0;const s=c();return null!==s?s:yield new Promise((e,n)=>{try{if(!I)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let n=!1;const i=i=>{n||(n=!0,e(i))},t=setTimeout(()=>{d("TCF isConsentedToAll timed out, resolving with false"),i(!1)},o);I.onTcfReady(()=>{d("On Tcf Ready called, waiting for consent"),clearTimeout(t)}),I.isConsentedToAll(n=>{clearTimeout(t),e(n)})}catch(e){n(e)}})})}},b=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(n){return e(this,arguments,void 0,function*(e,n=1e4){var i,t;const d=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),n)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(i=d.xandr)||void 0===i?void 0:i.ppId1,null===(t=d.xandr)||void 0===t?void 0:t.ppId2)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:""}}setPPIDs(e,n){this.ppid1=null!=e?e:"",this.ppid2=null!=n?n:""}},C=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(n,i){return e(this,void 0,void 0,function*(){var e,t,d,s,r,l,c,u,p,v,h;const f=o.get(a),g=yield this.getNewPPIDs(n,i);if(this.shouldHash(f,g)){const i=null!==(e=n.hasherUrl)&&void 0!==e?e:"https://hasher.schibsted.com/api/v1/hash",o=this.createHasherPayload(g),a=yield this.hashPPIDs(o,i);return a?(this.cachePPIDs(o,a,null===(t=g.idfv)||void 0===t?void 0:t.plain,null===(d=g.anId)||void 0===d?void 0:d.plain),void this.setPPIDs(null!==(s=a.userId)&&void 0!==s?s:"",null!==(r=a.environmentId)&&void 0!==r?r:"",null===(l=g.idfv)||void 0===l?void 0:l.plain,null===(c=g.anId)||void 0===c?void 0:c.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(u=null==f?void 0:f.userId.hashed)&&void 0!==u?u:"",null!==(p=null==f?void 0:f.environmentId.hashed)&&void 0!==p?p:"",null===(v=null==g?void 0:g.idfv)||void 0===v?void 0:v.plain,null===(h=null==g?void 0:g.anId)||void 0===h?void 0:h.plain)})}getPPIDs(){var e,n;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(n=this.ppid2)&&void 0!==n?n:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,n,i,t){this.ppid1=null!=e?e:"",this.ppid2=null!=n?n:"",this.idfv=null!=i?i:null,this.anId=null!=t?t:null}shouldHash(e,n){var i,t;if(!e)return!0;for(const d in e){if((null===(i=e[d])||void 0===i?void 0:i.plain)!==(null===(t=n[d])||void 0===t?void 0:t.plain))return!0}return!1}cachePPIDs(e,n,i,t){const d=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:n.userId},environmentId:{plain:e.environmentId,hashed:n.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},i?{idfv:{plain:i}}:{}),t?{anId:{plain:t}}:{});o.set(a,d)}hashPPIDs(n,i){return e(this,void 0,void 0,function*(){try{const e=new Headers({"Content-Type":"application/json"});return yield t.post(i,e,n)}catch(e){return d("Error with hashing PPIDs",e),null}})}getNewPPIDs(n,i){return e(this,arguments,void 0,function*({clientId:n,instance:i},t){const d=yield((n,i)=>e(void 0,void 0,void 0,function*(){const e=yield n.getUserId();return e?`${f[i]}:${e}`:null}))(i,t),s=yield(o=i,e(void 0,void 0,void 0,function*(){const e=yield o.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}));var o;const r=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:n},userId:{plain:d},environmentId:{plain:s},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:n,trackerVersion:i,userId:t,environmentId:d}){return{clientId:e.plain,trackerType:n.plain,trackerVersion:i.plain,userId:t.plain,environmentId:d.plain}}},S=n=>e(void 0,void 0,void 0,function*(){const{pulse:i,tcf:t,pageContext:{countryCode:s,isMobileApp:o}}=n,r=yield((n,i,t,...s)=>e(void 0,[n,i,t,...s],void 0,function*(e,n,i,t="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return d(`Schibsted Consent to Pay is not enabled, returning true for ${t}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${t}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:s}=w(e,0,i);return(yield s())?(d(`Schibsted Ad Choices consent given according to TCF consent manager for ${t}`),!0):(d(`Schibsted Ad Choices consent not given according to TCF consent manager for ${t}`),!1)}))(t,o,s,"setXandrPPIDs");if(!r)return;if(!i)return;(yield Promise.allSettled([b.processPPIDs(i,null==t?void 0:t.timeout),C.processPPIDs(i,s)])).forEach((e,n)=>{if("rejected"===e.status){d(`Cannot fetch PPIDs v${n+2}`,e.reason)}})}),E=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d,idfv:s,anId:o}=C.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new g).add(i,l[e]).add(n,c[e]).add(d,u[e]).add(t,p[e]).add(s,v[e]).add(o,h[e]).buildEids()}]}},T=()=>{const{ppid1:e,ppid2:n}=b.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":n?"1":"0"}},O=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d,idfv:s,anId:o}=C.getPPIDs();if(!i)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new g).add(i,l[e]).add(n,c[e]).add(d,u[e]).add(t,p[e]).add(s,v[e]).add(o,h[e]).buildRyEids()}}]}}},D=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d}=C.getPPIDs(),s=(new g).add(i,l[e]).add(n,c[e]).add(d,u[e]).add(t,p[e]);return`${s.buildNorstatPath()}?${s.buildNorstatQuery("alias").toString()}`},N=e=>{const{ppid1:n,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d}=C.getPPIDs();return(new g).add(i,l[e]).add(n,c[e]).add(d,u[e]).add(t,p[e]).buildRyEids()},$=n=>e(void 0,void 0,void 0,function*(){const{ppid1:e,ppid2:i}=b.getPPIDs(),{ppid1:t,ppid2:d}=C.getPPIDs(),s=(new g).add(i,l[n]).add(e,c[n]).add(d,u[n]).add(t,p[n]);return yield new Promise(e=>{e(s.buildVideoEids())})}),A=()=>e(void 0,void 0,void 0,function*(){const{ppid1:e}=C.getPPIDs();return e});export{A as getFinnBlinkUserId,N as getOpenRtbEids,T as getPPIDLoggedInStatus,D as getPPIDNorstatString,O as getPPIDRelevantYieldConfig,E as getUserIdsObject,$ as getVideoPPIDs,S as setXandrPPIDs};
|
package/tv4/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import Tracker from '@schibsted/pulse-sdk';
|
|
2
|
+
|
|
1
3
|
type AstAdType = 'banner' | 'video' | 'native' | 'outstream';
|
|
2
4
|
interface AstBanner {
|
|
3
5
|
content: string;
|
|
@@ -296,39 +298,17 @@ declare const PageTypes: {
|
|
|
296
298
|
};
|
|
297
299
|
type PageType = (typeof PageTypes)[keyof typeof PageTypes];
|
|
298
300
|
|
|
299
|
-
interface
|
|
300
|
-
xandr?: {
|
|
301
|
-
ppId1?: string;
|
|
302
|
-
ppId2?: string;
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
interface TrackerInstance {
|
|
306
|
-
getAdvertisingIdentifiers: () => Promise<AdvertisingIdentifiers>;
|
|
307
|
-
getUserId: () => Promise<undefined | string | number>;
|
|
308
|
-
getEnvironmentId: () => Promise<undefined | string>;
|
|
309
|
-
getActor: () => Promise<undefined | unknown>;
|
|
310
|
-
state?: {
|
|
311
|
-
pageViewId?: string;
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
interface PulseInstance extends TrackerInstance {
|
|
315
|
-
pulseTracker?: TrackerInstance;
|
|
301
|
+
interface PulseLegacyExtras {
|
|
316
302
|
trackElementView?: (eventInput: unknown) => Promise<void>;
|
|
317
303
|
trackElementClick?: (eventInput: unknown) => Promise<void>;
|
|
318
304
|
trackClickUIElement?: (eventInput: unknown) => Promise<void>;
|
|
319
305
|
trackViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
320
|
-
trackLegacyClickUIElement?: (eventInput: unknown) => Promise<void>;
|
|
321
|
-
trackLegacyViewUIElement?: (eventInput: unknown) => Promise<void>;
|
|
322
306
|
}
|
|
323
|
-
interface
|
|
307
|
+
interface PulseConfig {
|
|
324
308
|
clientId: string;
|
|
325
|
-
instance:
|
|
309
|
+
instance: Tracker & PulseLegacyExtras;
|
|
326
310
|
hasherUrl?: string;
|
|
327
311
|
}
|
|
328
|
-
interface Pulse {
|
|
329
|
-
clientId: string;
|
|
330
|
-
instance: PulseInstance;
|
|
331
|
-
}
|
|
332
312
|
|
|
333
313
|
declare const Newsrooms: {
|
|
334
314
|
readonly SVD: "svd";
|
|
@@ -433,8 +413,7 @@ interface SiteConfig {
|
|
|
433
413
|
glimr?: GlimrConfig;
|
|
434
414
|
tcf?: TCFConfig;
|
|
435
415
|
prebid?: PrebidConfig;
|
|
436
|
-
|
|
437
|
-
pulse?: Pulse;
|
|
416
|
+
pulse?: PulseConfig;
|
|
438
417
|
finnBlink?: FinnBlinkConfig;
|
|
439
418
|
wallpaper?: WallpaperConfig;
|
|
440
419
|
fullscreenScroll?: FullscreenScrollConfig;
|