/* funnel-relay version 2.6.61 - do the magic here 2024-05-02 11:11 */ trx=window.trx||{},trx.runcount=0,trx.runtime=function(){"use strict";trx.magicLinksEngine=null,trx.MagicLinks=class{static prepareDefaultSettings(e){return"object"!=typeof e.detection_rules&&(e.detection_rules={auto:!0,custom:[],exclude_urls:[],page_url_filter:""}),null==e.detection_rules.auto&&(e.detection_rules.auto=!0),null==e.detection_rules.auto_networks&&(e.detection_rules.auto_networks={amazon:!1,ls:!0,cj:!0,sas:!1,awin:!1,pj:!1,sl:!1,vl:!1,ir:!1,td:!1,wg:!1,pt:!1,al:!1,at:!1,tt:!1,ho:!1,tc:!1,bol:!1,afs:!1,rv:!1,wyf:!1,ef:!1,dc:!1,afy:!1,ebay:!1,rfs:!1,ct:!1,fo:!1,pap:!1,bhp:!1,eff:!1,fnc:!1,dd:!1,exv:!1,naff:!1,ag:!1,phga:!1,cf:!1,howl:!1,af:!1,ia:!1,pbet:!1,dynamic:!1}),e.detection_rules.custom instanceof Array||(e.detection_rules.custom=[]),e.detection_rules.exclude_urls instanceof Array||(e.detection_rules.exclude_urls=[]),null==e.detection_rules.page_url_filter&&(e.detection_rules.page_url_filter=""),null==e.detection_rules.amazon_no_append&&(e.detection_rules.amazon_no_append=!1),"object"!=typeof e.features&&(e.features={}),null==e.features.append_referrer&&(e.features.append_referrer={enabled:!0,attr_name:"referrer",new_query_param:!1}),null==e.features.asin_map&&(e.features.asin_map={enabled:!1}),null==e.features.asin_tag&&(e.features.asin_tag={enabled:!1}),null==e.features.wait_then_click&&(e.features.wait_then_click={enabled:!1}),null==e.features.use_beacon&&(e.features.use_beacon={enabled:!1}),null==e.features.observe&&(e.features.observe={enabled:!1}),null==e.features.urlchange&&(e.features.urlchange={enabled:!1}),null==e.features.iid_track&&(e.features.iid_track={enabled:!1}),null==e.features.new_window&&(e.features.new_window={enabled:!1}),null==e.features.attributes_forwarding&&(e.features.attributes_forwarding={enabled:!0,attributes:["utm_source","utm_campaign","utm_content","utm_medium","utm_term","gclid","fbclid","cntt"]}),null==e.features.append_timing&&(e.features.append_timing={enabled:!1,t_load:!1,t_clicked:!1,t_toclick:!1,new_query_param:!1}),null==e.features.append_attributes&&(e.features.append_attributes={enabled:!1,attributes:""}),null==e.features.track_events&&(e.features.track_events={enabled:!1,pageview:!1,clicks:!1,props_map:{xid:"prop1",link:"prop2",label:"prop3",referrer:"prop4",origin:"prop5"},props_map_custom:[]}),null==e.features.auto_optimize_link&&(e.features.auto_optimize_link={enabled:!1}),null==e.features.link_preview&&(e.features.link_preview={enabled:!1,show_icon:!1,show_metadata:!1,show_coupons:!1}),null==e.features.shorten_extra_param&&(e.features.shorten_extra_param={enabled:!1}),null==e.features.metadata&&(e.features.metadata={enabled:!1,selectors:""}),null==e.features.spot&&(e.features.spot={enabled:!1,link_rules:!1,asin_rules:!1,asin_per_page:!1,autotagger:!1,direct_deals:!1,dd:{enabled:!1,items:{}}}),null==e.features.srs&&(e.features.srs={enabled:!1}),e}constructor(e){try{null==e&&(e=!0),null==t&&(t="prod"),this.isInRunFunction=!1,this._paramsBuffer={attr_forwarding:{},metadata:{},timing:{},urls:{},attr_append:{},page_trace:[],custom_meta:{}},this._xids={},this._autoRun=e,this.init(e)}catch(e){this._error(e,e.stack)}}init(){try{if(this._onPageSettings=trx.magic_links_settings||{},this._envSettings={"events_recording_env":"buzzfeed","events_recording_api":"https://write.trackonomics.net/prod","app_key":"gsd65fgr0hgTTT","events_recording_iid":"https://trx-hub.com","cdn":"https://cdn-magiclinks.trackonomics.net"},this._serverSettings={"detection_rules":{"auto":"true","page_url_filter":"","auto_networks":{"amazon":"true","awin":"true","cj":"true","dynamic":"true","ir":"true","ls":"true","sas":"true","sl":"true","pj":"true","td":"true","wg":"true","pt":"true","al":"true","at":"true","tt":"true","vg":"true","ho":"true","tc":"true","bol":"true","rv":"true","afs":"true","wyf":"true","ef":"true","dc":"true","afy":"true","ebay":"true","rfs":"true","fo":"true","ct":"true","pap":"true","bhp":"true","eff":"true","fnc":"true","dd":"true","exv":"true","naff":"true","ag":"true","phga":"true","howl":"true","cf":"true","af":"true","ia":"true","pbet":"true"},"amazon_no_append":"true"},"features":{"append_referrer":{"enabled":"true","attr_name":"referrer"},"spot":{"enabled":"true","link_rules":"false","asin_rules":"false","asin_per_page":"false","autotagger":"false","direct_deals":"false","dd":{"enabled":"false"}},"asin_map":{"enabled":"false"},"asin_tag":{"enabled":"false","tags_required":"0"},"iid_track":{"enabled":"false"},"wait_then_click":{"enabled":"false"},"use_beacon":{"enabled":"false"},"observe":{"enabled":"true"},"urlchange":{"enabled":"true"},"new_window":{"enabled":"false"},"attributes_forwarding":{"enabled":"true","attributes":["utm_source","utm_campaign","utm_content","utm_medium","utm_term","gclid","fbclid","cntt"]},"append_timing":{"enabled":"false","t_load":"false","t_clicked":"false","t_toclick":"false"},"append_attributes":{"enabled":"false","attributes":""},"track_events":{"enabled":"true","pageview":"false","clicks":"false","analytics_code":"","props_map":{"xid":"","link":"","label":"","referrer":"","origin":""}},"link_preview":{"enabled":"false","show_icon":"false","show_metadata":"false","show_coupons":"false"},"link_optimization":{"enabled":"false","shortening_extra_param":"false"},"metadata":{"enabled":"false","selectors":""}},"dynamic_domains":[""],"product":"843884","domains":["walmart.com"],"version":"2.6.61","profile":"huffpost","profile_name":"huffpost","impact_domains":{"2cw9.net":1,"w6fg.net":1,"7ymy.net":1,"zz6n.net":1,"a4v3ci.net":1,"dttq.net":1,"5oih.net":1,"njih.net":1,"rfvk.net":1,"rt8x.net":1,"43k8.net":1,"7eer.net":1,"uzvs.net":1,"u44t.net":1,"pvxt.net":1,"vaz6fn.net":1,"ojrq.net":1,"mvvx.net":1,"yx69dc.net":1,"awb5.net":1,"k7qtpo.net":1,"8odi.net":1,"mp5l.net":1,"evyy.net":1,"fx3vf7.net":1,"2npn3e.net":1,"i9pljp.net":1,"l9vx.net":1,"75r4.net":1,"ulnv.net":1,"74rjtv.net":1,"trw6mw.net":1,"xwrk.net":1,"dgdrgu.net":1,"tnu8.net":1,"pq2o.net":1,"snlv.net":1,"yfb7.net":1,"vzck.net":1,"glg9ob.net":1,"5f77.net":1,"sk2bvq.net":1,"iln8.net":1,"7tiv.net":1,"o93x.net":1,"yfh6ag.net":1,"zfrcsk.net":1,"kwpkyy.net":1,"6cqhdo.net":1,"fziv.net":1,"f9tmep.net":1,"bwa8.net":1,"74az.net":1,"gnv2.net":1,"uidg.net":1,"i3zp.net":1,"ssxmnr.net":1,"l9yg.net":1,"ixmz.net":1,"fmtgqt.net":1,"uydo.net":1,"2lsp.net":1,"oie8.net":1,"7mh5.net":1,"tmfhgn.net":1,"ngi2ba.net":1,"bs6l.net":1,"fdf2.net":1,"ruqo.net":1,"bts6.net":1,"yxku6p.net":1,"xhuc.net":1,"b9i7.net":1,"vzffua.net":1,"oteh.net":1,"uskn.net":1,"kxyi.net":1,"hyyc7q.net":1,"5ad6.net":1,"n76h.net":1,"quvl.net":1,"qflm.net":1,"8hwt.net":1,"ig9i.net":1,"d2lsjo.net":1,"9quv.net":1,"rao4.net":1,"xikq.net":1,"72mu89.net":1,"xrx2ci.net":1,"q4ew.net":1,"j4ib.net":1,"wrrv.net":1,"uqzq.net":1,"mw46.net":1,"z6vo.net":1,"g39l.net":1,"2det.net":1,"ibfwsl.net":1,"jtlo.net":1,"dfjeo3.net":1,"wqi6.net":1,"jgpt48.net":1,"eccsr4.net":1,"myi4.net":1,"j4df.net":1,"s7so.net":1,"w2wxmz.net":1,"64ud.net":1,"6rfywi.net":1,"rrmo.net":1,"2m8f.net":1,"fu4n.net":1,"ryvx.net":1,"mjs4.net":1,"bn5x.net":1,"7xde.net":1,"5vju.net":1,"7zd4df.net":1,"xuok.net":1,"o64jx9.net":1,"am3t9s.net":1,"w2t6.net":1,"xr64.net":1,"vayb.net":1,"ygwk.net":1,"ioym.net":1,"dg6u.net":1,"oyuv.net":1,"otg8.net":1,"8ujrgu.net":1,"3qag.net":1,"3f64ir.net":1,"hrlo.net":1,"fjbu.net":1,"fqik.net":1,"43wo.net":1,"ncw6.net":1,"9nz77o.net":1,"xk3g.net":1,"p7qb.net":1,"mvqw.net":1,"ntaf.net":1,"iypa.net":1,"rv5k.net":1,"wjx7.net":1,"5d3x.net":1,"saq2.net":1,"vegb.net":1,"pxi6.net":1,"b54k.net":1,"njv3dp.net":1,"nob9.net":1,"t8puue.net":1,"briy.net":1,"bpu9.net":1,"voq9.net":1,"8aog.net":1,"dodxnr.net":1,"igs4ds.net":1,"w9v5.net":1,"exgl.net":1,"3uu8.net":1,"ei7w.net":1,"vjggsg.net":1,"79ic8e.net":1,"6noy.net":1,"zrjdwn.net":1,"vdcy.net":1,"8ne3.net":1,"tk2x2c.net":1,"2xc8.net":1,"3tvl.net":1,"tkjf.net":1,"r69o.net":1,"o5kg.net":1,"74wq.net":1,"zc5a.net":1,"e8i7.net":1,"bvrd.net":1,"r2oa.net":1,"uisv.net":1,"uqhv.net":1,"y8uw.net":1,"o67m.net":1,"ydow.net":1,"mlvy.net":1,"liln.net":1,"ga3c.net":1,"szey.net":1,"2lka.net":1,"opfm.net":1,"rhq9ml.net":1,"jvam.net":1,"uqog.net":1,"ork2.net":1,"nwh3qn.net":1,"znqymu.net":1,"wsslc4.net":1,"8kt6.net":1,"9pctbx.net":1,"7voo.net":1,"ifmu.net":1,"fzsu.net":1,"9j4c.net":1,"ow29pp.net":1,"sgur.net":1,"icjj.net":1,"27exom.net":1,"6ywx.net":1,"upvt.net":1,"4paxeq.net":1,"ue8cqz.net":1,"2su64p.net":1,"wo8g.net":1,"lvuv.net":1,"36c4.net":1,"vzew.net":1,"hmqldu.net":1,"m768hc.net":1,"7no9.net":1,"xuvt.net":1,"pfm4.net":1,"3lki.net":1,"p73z.net":1,"i3f2.net":1,"7isk.net":1,"7z5k.net":1,"brvi.net":1,"fi2z.net":1,"znvt.net":1,"tpeipe.net":1,"imlz.net":1,"audw.net":1,"rqu9.net":1,"hjef.net":1,"ln72.net":1,"a5fp.net":1,"juo2.net":1,"ir2by2.net":1,"tf77py.net":1,"eszb.net":1,"2gib.net":1,"bop8.net":1,"nsji.net":1,"mpye.net":1,"hs9x.net":1,"vocq.net":1,"msafflnk.net":1,"8zwg.net":1,"58dp.net":1,"973t.net":1,"hu6f.net":1,"5kd8.net":1,"ue7a.net":1,"i8h2.net":1,"7orgeq.net":1,"mp4l.net":1,"6wfgdb.net":1,"ayxtyv.net":1,"h4km.net":1,"mxu9.net":1,"w9iork.net":1,"ftcv.net":1,"6eld.net":1,"atkw.net":1,"nkwcmr.net":1,"vwz6.net":1,"xovt.net":1,"lkze4s.net":1,"uxsi.net":1,"wkq9.net":1,"8utb.net":1,"2j9x.net":1,"kk2kau.net":1,"iy7a.net":1,"2xje.net":1,"vqi8.net":1,"keof.net":1,"givvml.net":1,"x57o.net":1,"33qw.net":1,"nbq93e.net":1,"tlir.net":1,"7st3op.net":1,"l3km.net":1,"pb6g.net":1,"hj2i.net":1,"8f6i.net":1,"tql5.net":1,"otpb.net":1,"2gfm.net":1,"whij.net":1,"9zpg.net":1,"8mz3uu.net":1,"8hslpj.net":1,"nrku7u.net":1,"xg6r.net":1,"jyae.net":1,"o3ae.net":1,"9vn7kv.net":1,"rw9xb6.net":1,"z5dw.net":1,"wk5q.net":1,"e9jo.net":1,"r7kg.net":1,"uikc.net":1,"258o.net":1,"eyip.net":1,"c9ftyd.net":1,"a9yw.net":1,"krg4.net":1,"et7l.net":1,"wd2f.net":1,"nvaz.net":1,"ozkewk.net":1,"5sfo.net":1,"qumg.net":1,"5l5h.net":1,"cwv7.net":1,"qbt4.net":1,"ytuz.net":1,"3xvk.net":1,"zlyuo6.net":1,"58mq.net":1,"z27l.net":1,"iqoc.net":1,"eqjw.net":1,"dbapeb.net":1,"hgphc2.net":1,"wnbi.net":1,"te8rfv.net":1,"qyiv3c.net":1,"jv6k.net":1,"9rwv.net":1,"zgkv.net":1,"p5ld.net":1,"s4lle7.net":1,"eqcm.net":1,"wsktbf.net":1,"7ema.net":1,"2rch.net":1,"y6mxrg.net":1,"cmuw.net":1,"jedg.net":1,"wmempi.net":1,"lmwjx3.net":1,"zpn8dk.net":1,"z724.net":1,"zihf.net":1,"i5md.net":1,"yaub.net":1,"syuh.net":1,"htuy.net":1,"pbj2.net":1,"zvq6.net":1,"rg35.net":1,"8ibi.net":1,"kbp968.net":1,"5zd6.net":1,"n72aat.net":1,"aiy7.net":1,"nnh2.net":1,"z6rjha.net":1,"7fdy.net":1,"8bvm.net":1,"qodh.net":1,"jwpdsd.net":1,"otegtm.net":1,"2t23.net":1,"i5em.net":1,"xibx.net":1,"xlwzq3.net":1,"deg5.net":1,"3anx.net":1,"78cfvm.net":1,"57ib.net":1,"6dny.net":1,"auhm.net":1,"tm7566.net":1,"tm7516.net":1,"tm7569.net":1,"tm7559.net":1,"tm7560.net":1,"tm7562.net":1,"tm8534.net":1,"lusg.net":1,"bxvfun.net":1,"8bga.net":1,"22o6.net":1,"ebml.net":1,"9q66.net":1,"i679.net":1,"attfm2.net":1,"ztk5.net":1,"dubn.net":1,"yuxg.net":1,"2nm686.net":1,"meqk.net":1,"kd4a.net":1,"e2rq.net":1,"m43q4j.net":1,"hblm3c.net":1,"yvzx.net":1,"vp6l.net":1,"u97e.net":1,"5rmr.net":1,"qyov.net":1,"yoxl.net":1,"e54b.net":1,"akum7z.net":1,"hg7mxc.net":1,"pdy5.net":1,"aqpq.net":1,"mivh.net":1,"eqwh.net":1,"vx83.net":1,"vtdix3.net":1,"xvtl.net":1,"ulvh.net":1,"cw3o.net":1,"zvcr.net":1,"eat8mo.net":1,"ikkr9x.net":1,"6x7g.net":1,"bzi2vw.net":1,"43a8.net":1,"gfpv.net":1,"sjv.io":1,"pxf.io":1,"affiliates.abebooks.com":1,"go.corsair.com":1,"go.gemvara.com":1,"go.jewelry.com":1,"go.web.plus.espn.com":1,"goto.bodybuilding.com":1,"goto.carters.com":1,"goto.grocery.walmart.com":1,"goto.kayosports.com.au":1,"goto.target.com":1,"goto.walmart.com":1,"hpn.houzz.com":1,"linkto.hrblock.com":1,"partners.alamo.com":1,"partners.enterprise.com":1,"partners.hostgator.com":1,"partners.hotwire.com":1,"partners.nationalcar.com":1,"refer.turo.com":1,"tracking.maxcdn.com":1,"tracking.stackpath.com":1,"hpn.houzz.co.uk":1,"partners.wantable.co":1,"i284638.net":1,"xayxet.net":1,"7sb2uw.net":1,"dcm9zy.net":1,"6jxl.net":1,"cfzu.net":1,"i140643.net":1,"i125364.net":1,"i127288.net":1,"8ocm68.net":1,"jlud63.net":1,"i312864.net":1,"rv8crv.net":1,"haujjd.net":1,"qq3wj3.net":1,"4hyab9.net":1,"i308314.net":1,"oet7.net":1,"uym8.net":1,"avo2.net":1,"i279709.net":1,"i139476.net":1,"3tpfen.net":1,"bbgqo9.net":1,"i139049.net":1,"nm3tqp.net":1,"soyxmd.net":1,"partner.canva.com":1,"4xc4ep.net":1,"frhi32.net":1,"wrjfga.net":1,"i206080.net":1,"8s4u9r.net":1,"fubo.tv":1,"8u86.net":1,"shrw9t.net":1,"ouod.net":1,"i157428.net":1,"i274555.net":1,"gqce.net":1,"nhuie7.net":1,"i310051.net":1,"i351729.net":1,"i181536.net":1,"xyibsh.net":1,"i326295.net":1,"obak77.net":1,"7w7o67.net":1,"i206938.net":1,"zvvq7p.net":1,"oloiyb.net":1,"wvr2.net":1,"8rh8hm.net":1,"i276600.net":1,"i358707.net":1,"d67ag4.net":1,"magpmk.net":1,"i7cdw9.net":1,"i114090.net":1,"ubertrk.com":1,"i240138.net":1,"7ufqwl.net":1,"fdcm73.net":1,"n5ka.net":1,"q77h.net":1,"goto.bluenile.com":1,"bodybuilding.com":1,"ayph.net":1,"pvzi.net":1,"35p2.net":1,"cezg3w.net":1,"i294747.net":1,"ml6pmo.net":1,"i200065.net":1,"k77v.net":1,"l49yho.net":1,"i301580.net":1,"lf49oc.net":1,"i242740.net":1,"i142493.net":1,"zvbf.net":1,"risj.net":1,"partners.inmotionhosting.com":1,"fum2sp.net":1,"av4d.net":1,"i240196.net":1,"i134524.net":1,"i263265.net":1,"i8epma.net":1,"ihfo.net":1,"i209368.net":1,"oedf.net":1,"i6xjt2.net":1,"i328067.net":1,"i146980.net":1,"idgz2n.net":1,"drn3.net":1,"i305175.net":1,"i271380.net":1,"vxca.net":1,"c3me6x.net":1,"i317579.net":1,"iyhh.net":1,"wgn3fr.net":1,"vthnbx.net":1,"i277339.net":1,"ifgza3.net":1,"llbyf9.net":1,"c5l5.net":1,"i263671.net":1,"4fq8.net":1,"blihtq.net":1,"rjnwm7.net":1,"43zz.net":1,"i275503.net":1,"i276271.net":1,"2gl34e.net":1,"i206969.net":1,"i303683.net":1,"hbbswr.net":1,"ewrvdi.net":1,"hq6ajo.net":1,"kmlj9i.net":1,"goto.americanexpress.com":1,"hw4zyk.net":1,"4ok7ht.net":1,"i179050.net":1,"wmsyr7.net":1,"a6gkwq.net":1,"i257289.net":1,"4tqiav.net":1,"i203032.net":1,"ie8t3j.net":1,"xr2bd6.net":1,"i286093.net":1,"ustnul.net":1,"uewp.net":1,"nd8t.net":1,"txuqk6.net":1,"xpfo.net":1,"8x7ctf.net":1,"i130883.net":1,"i295461.net":1,"i294432.net":1,"t7c9v8.net":1,"chx3kt.net":1,"i297327.net":1,"c38gzp.net":1,"i123888.net":1,"i246982.net":1,"i148866.net":1,"gcc3.net":1,"ver28r.net":1,"xkpq.net":1,"xkri.net":1,"9yde.net":1,"i134784.net":1,"xhtgk3.net":1,"hv8ceq.net":1,"77jaha.net":1,"9u2rlz.net":1,"uztnuq.net":1,"mkr3.net":1,"642pbb.net":1,"2xkn.net":1,"qk4r.net":1,"gfko.net":1,"mno8.net":1,"znhhcm.net":1,"iybsj3.net":1,"aht6xo.net":1,"8zaeu3.net":1,"kjorbe.net":1,"sfe5.net":1,"i299105.net":1,"6uu72h.net":1,"4g9yrz.net":1,"1.envato.market":1,"4drrzr.net":1,"c3nu2i.net":1,"vs9au6.net":1,"tdndqm.net":1,"i339540.net":1,"i285710.net":1,"i250869.net":1,"775j.net":1,"7q8j.net":1,"83ckgt.net":1,"i300907.net":1,"qn6r.net":1,"p8mc.net":1,"lgkftb.net":1,"i334637.net":1,"i205484.net":1,"ldw66v.net":1,"aqp4qa.net":1,"i358993.net":1,"i168918.net":1,"hnyj8s.net":1,"7qto.net":1,"i121497.net":1,"mrlph3.net":1,"fhsxpf.net":1,"npfrrw.net":1,"i116782.net":1,"u7lr6p.net":1,"648q.net":1,"tbthfv.net":1,"i116503.net":1,"uqrxu7.net":1,"i302106.net":1,"i183635.net":1,"pa4kxy.net":1,"3obyns.net":1,"i210675.net":1,"xb398u.net":1,"i276400.net":1,"fb8d.net":1,"kbasqv.net":1,"i189637.net":1,"i190936.net":1,"i140070.net":1,"i353150.net":1,"t2bw9u.net":1,"vvtnn9.net":1,"p3oc.net":1,"g6gdil.net":1,"i213011.net":1,"ule4b9.net":1,"qy67zi.net":1,"8zgmnp.net":1,"wxc9hm.net":1,"bueme2.net":1,"wcmu8e.net":1,"i260660.net":1,"2ygtwc.net":1,"i122908.net":1,"74tzgq.net":1,"e4wb.net":1,"5nfc.net":1,"zafxzt.net":1,"e9ppfh.net":1,"tv2h87.net":1,"nkygzf.net":1,"i108736.net":1,"i163678.net":1,"i144304.net":1,"f6rcao.net":1,"9yoxzr.net":1,"erik73.net":1,"r37x9j.net":1,"ng4cgr.net":1,"8v4lqg.net":1,"o7n83a.net":1,"i261477.net":1,"m4ibck.net":1,"74xz8u.net":1,"i169060.net":1,"i117711.net":1,"epvitm.net":1,"puasq9.net":1,"wf373c.net":1,"gyuyee.net":1,"pkpakz.net":1,"i340849.net":1,"i344083.net":1,"i203761.net":1,"i270719.net":1,"vwli.net":1,"i295768.net":1,"i359245.net":1,"i258711.net":1,"rvgu.net":1,"mwztt8.net":1,"elfm.net":1,"eyjo.net":1,"gqco.net":1,"hmxg.net":1,"ijrn.net":1,"jewn.net":1,"tzva.net":1,"wfraqy.net":1,"dne9je.net":1,"4byfvk.net":1,"i181990.net":1,"xq2wid.net":1,"7oyhzp.net":1,"aydjxz.net":1,"i331371.net":1,"ffxwxg.net":1,"i363662.net":1,"obbk.net":1,"fgjaok.net":1,"h382za.net":1,"i113075.net":1,"i130297.net":1,"a49pb4.net":1,"8kpa2n.net":1,"i128439.net":1,"i326837.net":1,"w27s.net":1,"gtlppj.net":1,"i104546.net":1,"go.silpada.com":1,"i160067.net":1,"gvhb.net":1,"8lvxaf.net":1,"i191769.net":1,"awv4zz.net":1,"gtlptb.net":1,"7ck3j6.net":1,"w7ma.net":1,"j8ujgp.net":1,"c2ukkg.net":1,"u4prjd.net":1,"t2nfq3.net":1,"i317572.net":1,"i246054.net":1,"woc3yh.net":1,"zytd7d.net":1,"jpzeir.net":1,"li9jiy.net":1,"i141006.net":1,"i141602.net":1,"mzte.net":1,"vz7pkt.net":1,"yardaz.net":1,"a49tr6.net":1,"tkl68z.net":1,"i298770.net":1,"2uf4ta.net":1,"i156748.net":1,"jmx223.net":1,"nqn6.net":1,"n72y7a.net":1,"i357552.net":1,"i274396.net":1,"vdvm.net":1,"8n4773.net":1,"btyhsg.net":1,"g7ix2j.net":1,"4qxjn9.net":1,"vfjm.net":1,"nrlq2m.net":1,"wyfx2f.net":1,"4emhls.net":1,"ovon4f.net":1,"2rcf97.net":1,"krym8q.net":1,"go.nansen.ai":1,"goto.binge.com.au":1,"kattestadvertiser3.dgmperformance.com.au":1,"goto.flashnews.com.au":1,"a.12-mp.com":1,"h.12-mp.com":1,"r.15-mp.com":1,"f.17-mp.com":1,"h.17-mp.com":1,"c.1lnk1.com":1,"a.3000trk.com":1,"e.3000trk.com":1,"f.3000trk.com":1,"h.3000trk.com":1,"r.3000trk.com":1,"v.3000trk.com":1,"e.3100trk.com":1,"h.3100trk.com":1,"m.3100trk.com":1,"r.3100trk.com":1,"v.3100trk.com":1,"e.3200trk.com":1,"f.3200trk.com":1,"h.3200trk.com":1,"r.3200trk.com":1,"v.3200trk.com":1,"e.3300trk.com":1,"f.3300trk.com":1,"h.3300trk.com":1,"r.3300trk.com":1,"partners.advertiser.com":1,"goto.advertiserdemo.com":1,"aeropostale.com":1,"goto.allstate.com":1,"partners.americanexpress.com":1,"appleaffiliatedemo.com":1,"www.appleaffiliatedemo.com":1,"www.audibletrial.com":1,"belk.com":1,"brandwrapped.com":1,"creator.canva.com":1,"goto.capitalone.com":1,"goto.careerbuilder.com":1,"www.celestecampaign.com":1,"goto.childrensplace.com":1,"custom.com":1,"a.data3100.com":1,"s.data3100.com":1,"u.data3100.com":1,"w.data3100.com":1,"f.data3200.com":1,"m.data3200.com":1,"r.data3200.com":1,"c.data3300.com":1,"ir.deepattractiononline.com":1,"t.dgm-au.com":1,"t.dgm-nz.com":1,"goto.directresponse.com":1,"goto.discover.com":1,"www.dwtest2.com":1,"www.dwtest2custom.com":1,"app.partner.ebay.com":1,"goto.example.com":1,"go.expressvpn.com":1,"goto.financedemo.com":1,"secure.financedemo.com":1,"partners.fitness4her.com":1,"partners.freeshadez.com":1,"go.globalhealingcenter.com":1,"gotonextissue.com":1,"goto.gucci.com":1,"goto.guitarcenter.com":1,"partners.hollisterco.com":1,"goto.hottopic.com":1,"linkto.ext.hp.com":1,"partners.impactradius.com":1,"goto.jet.com":1,"partners.justdeals.com":1,"r.kraken.com":1,"goto.lenovo.com":1,"goto.libertymutual.com":1,"goto.macys.com":1,"www.marcel.com":1,"tr.michaelkors.com":1,"afflnk.microsoft.com":1,"a.mp3456.com":1,"e.mp3456.com":1,"tracking123.namoffers.com":1,"goto.nest.com":1,"go.novica.com":1,"shop.nuleafnaturals.com":1,"offers.ondeckcapital.com":1,"secure.optimumoffer.com":1,"goto.orientaltrading.com":1,"goto.proactive.com":1,"secure.quickenloans.com":1,"goto.reebok.com":1,"direct.retailmenot.com":1,"cpatraffic.rtmn.com":1,"cpctraffic.rtmn.com":1,"goto.rugsusa.com":1,"goto.saasdemo.com":1,"partners.shinola.com":1,"partners.shopjustice.com":1,"partner.shopmoment.com":1,"go.smtp2go.com":1,"refer.sofi.com":1,"impact.swarovski.com":1,"swarovskidemo.com":1,"tr.talbots.com":1,"partners.teespring.com":1,"goto.telecomdemo.com":1,"goto.thumbtack.com":1,"goto.ticketexchangebyticketmaster.com":1,"goto.ticketmaster.com":1,"htotopic.tr.com":1,"talbots.tr.com":1,"goto.traveldemo.com":1,"goto.tribpub.com":1,"goto.uber.com":1,"go.ubisoft.com":1,"goto.victoriassecret.com":1,"goto.vitaminshoppe.com":1,"partners.vonage.com":1,"partners.webhostinghub.com":1,"claires.westfield.com":1,"affiliates.williams-sonoma.com":1,"wondereporium.com":1,"goto.yourdomain.com":1,"goto.zalora.com":1,"elfsight.io":1,"whiteterry.29cxp7.net":1,"anythingloan.2lth.net":1,"yamazaki-home.2mnhoy.net":1,"the-realreal.2pxhba.net":1,"westelmuk.2vfn.net":1,"koreanair.2vx8.net":1,"fundera.34rwxn.net":1,"captureone.38d4qb.net":1,"sitebeat.39v3vo.net":1,"ooma-smart-security.3ddabr.net":1,"roofstock.3k3q.net":1,"pbkidsau.3kpx.net":1,"root-insurance.3mhson.net":1,"self-lender.3qcw.net":1,"supercheapauto.3wqa7g.net":1,"havensimple.3yjf29.net":1,"rest.3z6a.net":1,"westelmau.44ky.net":1,"ticketmasteritalia.46uy.net":1,"crowdstreet.4cl7.net":1,"consumer-credit-union.4cna.net":1,"sony.4fmm4z.net":1,"secret-escapes-it.4h2elr.net":1,"hoteltonight.4jvn.net":1,"automattic.4oqh.net":1,"kogan.4p72pk.net":1,"smiledirectclubuk.4quhjm.net":1,"staplescanada.4u8mqw.net":1,"jing.4xcm.net":1,"masterworks.536u.net":1,"cove.54dw.net":1,"sitey.5ps6.net":1,"lenovo-portugal.62kb.net":1,"vypecanada.64i2oe.net":1,"gettyimages.68w6.net":1,"istockphoto.6q33.net":1,"bioxskincare.729cod.net":1,"kleinfeld-bridal.73b3h3.net":1,"tui-uk.7cnq.net":1,"didimobilityaustralia.7jnpqz.net":1,"resellerclub-india.7kwdlr.net":1,"foodlion.7lg23b.net":1,"boxofstyle.7rhm.net":1,"kosas.7zgd.net":1,"termly.7zqw8y.net":1,"kwikfit.82rc.net":1,"flixcar.8bjsq8.net":1,"telestream.8bx6ag.net":1,"m1finance.8bxp97.net":1,"thechillway.8l4s7a.net":1,"bodylogixca.8plgeh.net":1,"fanatics.93n6tx.net":1,"virgin-voyages.99ptgw.net":1,"upstart.9c65.net":1,"boka.9i9b.net":1,"bananarepublic.9itn9h.net":1,"royallondonover50s.9kkdyy.net":1,"yamibuy.9nt4.net":1,"landlord.9uk3f2.net":1,"constantcontact.9w9y.net":1,"ula-equipment.9xrw.net":1,"untuckit.9znn.net":1,"youneedabudget.a4xxmk.net":1,"logitech-de.a58n.net":1,"aspiration.a5oq.net":1,"watches-of-switzerland.ai2ltf.net":1,"breville-remanufactured.aj4m7r.net":1,"waves.alzt.net":1,"rslartunion.amofm7.net":1,"nectaruk.aor6.net":1,"thechildrensplace.ay6u.net":1,"secret-escapes-fr.b3zq62.net":1,"meet-cleo.b4th.net":1,"thedoors.b6rs.net":1,"secret-escapes-de.b7ohif.net":1,"nars-cosmetics.bc2sfg.net":1,"links.bitstamp.net":1,"vaulted.blbvux.net":1,"hsbcsgcc.bmki.net":1,"hsbcsgpl.bmki.net":1,"n26-eu.c2nwa3.net":1,"regionalfinance.c2nz.net":1,"drivepeasy.c7ch.net":1,"dreamclouduk.cpd3.net":1,"levelbank.cz6xnl.net":1,"goldsmiths.db9cet.net":1,"pivothealth.dclzbw.net":1,"rootinevitamins.df7rps.net":1,"lenovo.dgi7au.net":1,"tickpick.dgrk2e.net":1,"ariat.dkkdet.net":1,"wilson.dkvl.net":1,"ticketsnow.dpcn8w.net":1,"unestcollegesavingsplan.dqxc7i.net":1,"brownells.dts2xn.net":1,"barbequesgalore.dvkiik.net":1,"theyes.dxfbc9.net":1,"mojo-mortages.dylnvf.net":1,"deluxe-vpn.e2f6.net":1,"smiledirectclubau.e4uc73.net":1,"crazydomains.eaug7r.net":1,"sheex.eaul.net":1,"fitbux.eibg.net":1,"royallondonfuneralplan.ekszbb.net":1,"unoccupied-property.er7gnw.net":1,"square-uk.es4ecy.net":1,"bwell-briogeo.ev72ra.net":1,"gaigai.ez7hkm.net":1,"essentiamattress.f3uvj9.net":1,"zoetic.fgebzp.net":1,"bidroom.firn8e.net":1,"luno.fl9beu.net":1,"netspot.fm7owm.net":1,"cledepeaubeaute.fy339m.net":1,"reebok-canada.fzqh.net":1,"currencyfair.g6ww.net":1,"royal-london.g8pw6g.net":1,"cds.gd24vx.net":1,"afklmpointstravel.gfbv.net":1,"watch.gkhe.net":1,"lightstream.gr4q.net":1,"westelmca.gsfo.net":1,"linode.gvw92c.net":1,"bodylogix.h3wdt8.net":1,"imp.i102578.net":1,"imp.i102585.net":1,"imp.i102628.net":1,"imp.i105279.net":1,"imp.i109152.net":1,"imp.i110150.net":1,"imp.i111827.net":1,"imp.i114863.net":1,"imp.i115008.net":1,"imp.i117074.net":1,"imp.i118097.net":1,"imp.i119894.net":1,"imp.i120408.net":1,"imp.i122462.net":1,"imp.i123723.net":1,"imp.i127447.net":1,"imp.i127448.net":1,"imp.i127484.net":1,"imp.i132230.net":1,"imp.i136221.net":1,"imp.i141429.net":1,"imp.i141782.net":1,"imp.i141824.net":1,"imp.i144525.net":1,"imp.i146086.net":1,"imp.i146998.net":1,"imp.i153228.net":1,"imp.i153398.net":1,"imp.i154272.net":1,"imp.i155730.net":1,"imp.i162910.net":1,"imp.i163361.net":1,"imp.i164922.net":1,"imp.i167134.net":1,"imp.i174494.net":1,"imp.i174730.net":1,"imp.i175411.net":1,"imp.i177738.net":1,"imp.i179468.net":1,"imp.i182465.net":1,"imp.i184500.net":1,"imp.i184621.net":1,"imp.i185592.net":1,"imp.i187843.net":1,"imp.i188489.net":1,"imp.i189201.net":1,"imp.i195052.net":1,"imp.i197837.net":1,"imp.i200982.net":1,"imp.i201009.net":1,"imp.i201604.net":1,"imp.i204684.net":1,"imp.i204706.net":1,"imp.i205248.net":1,"imp.i207729.net":1,"imp.i209882.net":1,"imp.i215020.net":1,"imp.i215644.net":1,"imp.i217012.net":1,"imp.i217056.net":1,"imp.i217336.net":1,"imp.i218435.net":1,"imp.i220923.net":1,"imp.i222331.net":1,"imp.i222351.net":1,"imp.i222833.net":1,"imp.i224272.net":1,"imp.i225013.net":1,"imp.i225111.net":1,"imp.i229218.net":1,"imp.i229304.net":1,"imp.i229745.net":1,"imp.i231566.net":1,"imp.i233452.net":1,"imp.i234686.net":1,"imp.i239438.net":1,"imp.i239776.net":1,"imp.i241730.net":1,"imp.i241976.net":1,"imp.i248313.net":1,"imp.i251749.net":1,"imp.i253636.net":1,"imp.i254217.net":1,"imp.i255443.net":1,"imp.i256749.net":1,"imp.i259117.net":1,"imp.i259801.net":1,"imp.i261257.net":1,"imp.i265064.net":1,"imp.i266063.net":1,"imp.i266918.net":1,"imp.i267874.net":1,"imp.i279730.net":1,"imp.i284037.net":1,"imp.i286488.net":1,"imp.i287301.net":1,"imp.i292280.net":1,"imp.i294986.net":1,"imp.i295937.net":1,"imp.i296901.net":1,"levis.i2a9tn.net":1,"imp.i302163.net":1,"imp.i302434.net":1,"imp.i302817.net":1,"imp.i303990.net":1,"imp.i304868.net":1,"imp.i305322.net":1,"imp.i308085.net":1,"imp.i308713.net":1,"imp.i309903.net":1,"imp.i310488.net":1,"imp.i311231.net":1,"imp.i312634.net":1,"imp.i313392.net":1,"imp.i313414.net":1,"imp.i315845.net":1,"imp.i319830.net":1,"imp.i325350.net":1,"imp.i326929.net":1,"imp.i331902.net":1,"imp.i332630.net":1,"imp.i335593.net":1,"imp.i335971.net":1,"imp.i337888.net":1,"imp.i339846.net":1,"imp.i344425.net":1,"imp.i346552.net":1,"imp.i347823.net":1,"imp.i347961.net":1,"imp.i349124.net":1,"imp.i349218.net":1,"imp.i350665.net":1,"imp.i351785.net":1,"imp.i353253.net":1,"imp.i353259.net":1,"imp.i353989.net":1,"imp.i354918.net":1,"imp.i357806.net":1,"imp.i361937.net":1,"imp.i366014.net":1,"imp.i373950.net":1,"imp.i374012.net":1,"imp.i374255.net":1,"imp.i374549.net":1,"imp.i376996.net":1,"imp.i378378.net":1,"imp.i379087.net":1,"imp.i382113.net":1,"imp.i384100.net":1,"paradoxinteractive.i38e.net":1,"imp.i447714.net":1,"carquest.i77b.net":1,"lendkey.id2d3x.net":1,"step2.ijnb.net":1,"boat.iklrq6.net":1,"easyship.ilbqy6.net":1,"smol-products.ilwyv3.net":1,"splash-financial.j48ltb.net":1,"wikibuy.j4snje.net":1,"lighthouse360.j9nt.net":1,"fanatiz.jbbfvx.net":1,"motivecbd.jdm88d.net":1,"paxvapor.jfki2j.net":1,"skinceuticalsca.jkwjpk.net":1,"adriannapap.jniufr.net":1,"evens.jplh3y.net":1,"balooliving-ca.jrc3mx.net":1,"lolatravelcompany.jsp92a.net":1,"dicksmith.jxhtmc.net":1,"jetblue.jyeh.net":1,"davidjones.k98d.net":1,"chefsteps.kbzing.net":1,"vox.kffcyy.net":1,"booktopia.kh4ffx.net":1,"smol-us.kpuanq.net":1,"ottyie.kqmu.net":1,"yeezy.l36r.net":1,"oxygenbank.l43qr8.net":1,"potterybarnau.l69d.net":1,"holiday-home.lat366.net":1,"fabletics-ca.lbze.net":1,"virgin-experience-days.ldaz.net":1,"first-choice.le7z.net":1,"menulog-au.lhqm.net":1,"secretescapesse.lk5c.net":1,"square-au.lnvf6s.net":1,"tui-ireland.lp9g.net":1,"tradesmen.luaxx2.net":1,"littlecooks.mjglcb.net":1,"choice.mtko.net":1,"blockfi.mxuy67.net":1,"myhippo.ndqgrs.net":1,"revolut.ngih.net":1,"revolut-for-pioneers.ngih.net":1,"revolutbusiness.ngih.net":1,"starling-bank.nny66p.net":1,"plushbeds.nzvz.net":1,"mealtrain.o4i2p9.net":1,"tripbeat.o4kt.net":1,"blinkist.o6eiov.net":1,"travelmedicalinsurance.o8bpq6.net":1,"armedforcesvacationclub.o97o.net":1,"grasshopper.o9o4.net":1,"teconnectivity.o9trf8.net":1,"bcf.oaccss.net":1,"latexforless.oack.net":1,"yogainternational.oae6r3.net":1,"ecoterrabeds.obdh.net":1,"rebotanicals.ohojfd.net":1,"premium-beat.oivf.net":1,"saudia.opdn.net":1,"dockers.orx24i.net":1,"evesleepie.osc3ri.net":1,"spaces-uk.ots4th.net":1,"norton.ow5a.net":1,"fastcover.owjezm.net":1,"joy-organics.oxmy.net":1,"pearson.oy8hzn.net":1,"work.ariat.p2tjla.net":1,"sitelio.p4xq.net":1,"apriadirect.p96x.net":1,"williams-sonoma-au.pgg3.net":1,"insureandgo.pmicpk.net":1,"tkees.pmwkew.net":1,"cheapoair.ppa7q7.net":1,"likewise.q2izwe.net":1,"keeps.q3qw.net":1,"lendkey.qbh8ac.net":1,"us-doctors-clinical.qeeylr.net":1,"staplescopyprint.qgv6w8.net":1,"tadashishoji.qhqdlu.net":1,"campman.qltq8g.net":1,"99designs.qvig.net":1,"public.qwjcdi.net":1,"anapointstravel.qxwr.net":1,"static-caravan.r2gfl2.net":1,"websitebuilder.r5n8.net":1,"smiledirectclubca.rjkjc2.net":1,"rabobank.rkow.net":1,"rebelsport.rrg8du.net":1,"homedepotservices.rvrm.net":1,"allianz.rvsspp.net":1,"sitebuilder.s4r8.net":1,"golf-galaxy.selw.net":1,"mappin-and-webb.sgygtv.net":1,"rbs.shzxkd.net":1,"vita-grace.sjnezz.net":1,"afklm.tcux.net":1,"n26-us.tcwuzj.net":1,"regus-uk.tfyxfo.net":1,"travelbirdbe.tgu7.net":1,"stasher.thj6q2.net":1,"jamrockorganics.tioq8n.net":1,"ticketmaster-se.tm7505.net":1,"bibi.tm7506.net":1,"ticketmaster-es.tm7508.net":1,"ticketmaster-nl.tm7510.net":1,"ticketmaster-ie.tm7512.net":1,"ticketmaster-de.tm7514.net":1,"ticketmaster-fi.tm7520.net":1,"ticketmaster-dk.tm7521.net":1,"ticketmaster-be.tm7522.net":1,"ticketmaster-at.tm8116.net":1,"ticketmaster-pl.tm8185.net":1,"ticketmaster-ch.tm8186.net":1,"ticketmaster-no.tm8215.net":1,"ticketmaster-cz.tm9743.net":1,"remitly.tod8mp.net":1,"onpay.tpchkr.net":1,"shiseido.u24his.net":1,"tui-travel-money.ubn8.net":1,"oneshoppingcart.uejg.net":1,"touring-caravan.ueuik7.net":1,"logitech-ch.ug7o.net":1,"linkedin.ukzh.net":1,"nisolo.uvwgb9.net":1,"stitchfixuk.v6xh.net":1,"etihad.vkuz.net":1,"wineexpress.vneoga.net":1,"natwest.vnx2z7.net":1,"kaizennaturals.vrivoq.net":1,"marthastewartcoffee.vrwlzj.net":1,"emirates.vwur.net":1,"cbdistillery.vxoy.net":1,"polyscience.vyd8.net":1,"0800flowers.vz2om2.net":1,"samsonite.w7fot8.net":1,"discoverhomeequityloans.wrqf.net":1,"esalon.wy62cy.net":1,"nuri.x89scb.net":1,"decathlon-nl.x8nb.net":1,"make-it-count.xmav.net":1,"readly.xqtubi.net":1,"gotowebinar.xrte.net":1,"alliant.y26xwv.net":1,"eddiebauerca.ydij.net":1,"epi.ykwujd.net":1,"crazydomainsuk.yqcqcu.net":1,"scottscheapflights.yuy8ab.net":1,"epth.yvvn.net":1,"upgrade.ywhcc7.net":1,"peapod.yy4skx.net":1,"onetravel.z4fp8q.net":1,"lendkey.zkfimy.net":1,"lenovo-in.zlvv.net":1,"lsg.zlwlj8.net":1,"travelstart.zwjlk6.net":1,"alj.zyzfnh.net":1,"www.test.org":1,"goto.financeclient.co.uk":1,"gotosainsburysbank.co.uk":1,"goto.retailclient.co.uk":1,"goto.saasclient.co.uk":1,"goto.travelclient.co.uk":1}},null==this._envSettings.events_recording_env&&(this._envSettings.events_recording_env="prod"),this._embedUrlToken="FR-EMBEDDED-RF",this._delimiter1="|",this._delimiter2="~",this._delimiter3="%40%40",this._delimiter4="-",this._logPrefix="FunnelRelay:: ",this._loadTime=Date.now(),this._links=[],this._links_unique={},this._domains=[],this._domains_unique=[],this._wrapped_trxhub_links=[],this._customLinks=new Map,this._report={},this._exclude_urls_regex=[],this._customerId='buzzfeed_ok567kgt88_huffpost',this._propertyId="PROPERTY_ID",this._ddDomains={},this._ddURLVisit="",this._iframed=window.self!==window.top,!0===this._iframed&&void 0!==document.referrer&&""!==document.referrer&&(trx.source=document.referrer),this._scriptEm=document.getElementById("funnel-relay-installer"),null!=this._scriptEm){if(!this._scriptEm.hasAttribute("data-property-id")||!this._scriptEm.hasAttribute("data-customer-id")||this._isEmpty(this._scriptEm.hasAttribute("data-property-id"))||this._isEmpty(this._scriptEm.hasAttribute("data-customer-id")))return void this._error("Missing one of the mandatory script attributes 'data-customer-id' and/or 'data-property-id'");this._customerId=this._scriptEm.getAttribute("data-customer-id"),this._propertyId=this._scriptEm.getAttribute("data-property-id"),this._isSimulator=this._scriptEm.hasAttribute("data-simulator")}else if(window.trxFrTag)this._customerId=window.trxFrCustomerId,this._propertyId=window.trxFrPropertyId,this._isSimulator=!1;else if(null===this._customerId)return void this._error('Installation script is missing id="funnel-relay-installer" attribute. Funnel Relay will not run');var e=/iPad|iPhone|iPod/.test(navigator.platform||"");this._new_window=!1,0==this._new_window&&void 0!==this._serverSettings.features&&void 0!==this._serverSettings.features.new_window&&!0===this._asBoolean(this._serverSettings.features.new_window.enabled)&&(this._new_window=!0),this._iid_track=!1,0==this._iid_track&&void 0!==this._serverSettings.features&&void 0!==this._serverSettings.features.iid_track&&!0===this._asBoolean(this._serverSettings.features.iid_track.enabled)&&(this._iid_track=!0),this._asin_map=!1,0==this._asin_map&&void 0!==this._serverSettings.features&&void 0!==this._serverSettings.features.asin_map&&!0===this._asBoolean(this._serverSettings.features.asin_map.enabled)&&(this._asin_map=!0),this._asin_tag=!1,0==this._asin_tag&&void 0!==this._serverSettings.features&&void 0!==this._serverSettings.features.asin_tag&&!0===this._asBoolean(this._serverSettings.features.asin_tag.enabled)&&(this._asin_tag=!0),this._use_beacon=e,0==this._use_beacon&&void 0!==this._serverSettings.features&&void 0!==this._serverSettings.features.use_beacon&&!0===this._asBoolean(this._serverSettings.features.use_beacon.enabled)&&(this._use_beacon=!0),void 0!==trx.amp_redirect&&1==trx.amp_redirect?this.ampRedirectNow():(this._prepareSettings(),this._prepareExcludeRegExp(),this._autoRun&&this.run(),this.retransmit_sotrage_items(),this._observe=!1,0==this._observe&&void 0!==this._serverSettings.features&&void 0!==this._serverSettings.features.observe&&!0===this._asBoolean(this._serverSettings.features.observe.enabled)&&(this._observe=!0),this._observe&&setTimeout(async function(){this.observe()}.bind(this),500),this._url_change=!1,0==this._url_change&&void 0!==this._serverSettings.features&&void 0!==this._serverSettings.features.urlchange&&!0===this._asBoolean(this._serverSettings.features.urlchange.enabled)&&(this._url_change=!0),void 0==trx.his&&this._url_change&&(trx.his=!0,this._debug("bind location change!"),history.pushState=(e=>(function t(){var i=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),i}))(history.pushState),history.replaceState=(e=>(function t(){var i=e.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),i}))(history.replaceState),window.addEventListener("popstate",()=>{window.dispatchEvent(new Event("locationchange"))}),window.addEventListener("locationchange",e=>{this._debug("location: "+document.location+", state: "+JSON.stringify(e.state)),this._runFeatures(!0)})))}catch(e){console.error("Magic Links 'init' procedure fail! Details: "+e),e.stack&&console.error(e.stack)}}observe(){if(void 0===trx.observer){var e=0,t={attributes:!0,childList:!0,subtree:!0};window.MutationObserver&&(trx.observer=new MutationObserver(function(i){e>1||1===(e+=1)&&(trx.observer.disconnect(),setTimeout(async function(){this._links=[],this._wrapped_trxhub_links=[],this._debug("Rerun..."),await this._updatePageDomains(),this.run(),e=0,trx.observer.observe(document.body,t)}.bind(this),3e3))}.bind(this)),trx.observer.observe(document.body,t))}}retransmitlog(e){let t=this._envSettings.events_recording_api+"/log",i={method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrer:"*client",body:e};return navigator.sendBeacon&&this._use_beacon?navigator.sendBeacon(t,e):fetch(t,i).then(t=>{if(t.ok){let i="Write to events-recording service. Body:\n"+e;return this._isSimulator&&this._log(i),this._debug(i),t.json()}this._log("Fail to write event data. HTTP error, status = "+t.status)}).then(e=>{e&&e.message&&this._log(e.message)}).catch(e=>{this._log(e)})}retransmit(e){let t=this._envSettings.events_recording_api+"/write",i={method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrer:"*client",body:e};return navigator.sendBeacon&&this._use_beacon?navigator.sendBeacon(t,e):fetch(t,i).then(t=>{if(t.ok){let i="Write to events-recording service. Body:\n"+e;return this._isSimulator&&this._log(i),this._debug(i),t.json()}this._log("Fail to write event data. HTTP error, status = "+t.status)}).then(e=>{e&&e.message&&this._log(e.message)}).catch(e=>{this._log(e)})}retransmit_sotrage_items(){try{if("undefined"!=typeof Storage){let e="";for(let e=0;e0)){var i=window.history.pop();console.log(i)}this._prepareSettings(),this._prepareExcludeRegExp(),this.run(),0===this._links.length&&(this._debug("coundent find aff link"),location.href=t.href),this._collectClickTimeParams(),this._addMetadataFromRequest(e);let r=this._writeDataToEventsService(this._links[0],"AMP");this._use_beacon?(!0===r&&t.setAttribute("data-written","true"),t.click()):r.then(()=>{t.setAttribute("data-written","true"),t.click()})}_addMetadataFromRequest(e){if(void 0!==this._settings.features&&void 0!==this._settings.features.metadata){let t=this._settings.features.metadata;if(this._asBoolean(t.enabled)&&!this._isEmpty(t.selectors)){let i,r,n,s=t.selectors.split("\n");for(let t=0;t1){if(i=t[0].trim(),0===(r=t[1].trim()).length)continue;void 0===e[i]||this._isEmpty(e[i])||(this._paramsBuffer.metadata[i]=e[i])}else this._log("Invalid metadata line. Line must have name and Xpath value in this format: name | xpath ")}}catch(e){this._log(e)}}}}get onPageSettings(){return this._onPageSettings}get serverSettings(){return this._serverSettings.hasOwnProperty("SETTINGS_PLACEHOLDER")?{}:this._serverSettings}get paramsBuffer(){return this._paramsBuffer}static renderLinkPreview(e,t){let i=document.querySelector('iframe[data-ml-preview="'+e+'"]');if(null!=i)return void i.parentNode.removeChild(i);let r=document.querySelector('a[data-ml-id="'+e+'"]');if(null!=r){let t=document.createElement("iframe");t.setAttribute("data-ml-preview",e),t.setAttribute("scrolling","no"),t.setAttribute("frameborder","0"),t.style.borderStyle="solid",t.style.borderWidth="2px",t.style.borderColor="grey",t.style.borderRadius="3px",t.style.position="absolute",t.style.width="120px",t.style.height="90px",t.style.background="#fff";let i=document.documentElement,n=r.getBoundingClientRect();t.style.top=n.top+(window.pageYOffset-i.clientTop)-100+"px",t.style.left=n.left+(window.pageXOffset-i.clientLeft)+(n.width-60)+"px",document.body.appendChild(t);let s=t.contentWindow||t.contentDocument;s.document&&(s=s.document);let a=s.createElement("img"),o="http://images.shrinktheweb.com/xino.php?stwembed=1&stwaccesskeyid=4abc115f8a632c5&stwsize=120x90&stwurl="+r.href;a.setAttribute("src",o),a.style.width="100%",a.style.height="auto",s.body.appendChild(a),s.body.style.padding="1px"}t.stopImmediatePropagation()}run(){if(this.isInRunFunction)this._debug("Already in run function.");else{0===trx.runcount&&(trx.runcount=trx.runcount+1),this.isInRunFunction=!0;try{if(this._isEmpty(this._envSettings.events_recording_api))return void this._error("Missing environment settings. Check that you setup $ENV_SETTINGS in my.cfg.php and that 'events_recording_api' is set there!");if(!this._checkPageUrlMatch())return;if(document.links.length>0)for(let e=0;e0&&(this._appendUUID(),this._runFeatures()),(this._asin_map||this._asin_tag)&&this._asinMapCall(),this._logPageTrace(),this._debug("Links count "+this._links.length);for(let e=0;e0&&this._appendToTRXHUBLinks()}catch(e){this._error("'run' procedure fail! Details: "+e,e.stack),this.isInRunFunction=!1}this.isInRunFunction=!1}}async _updatePageDomains(){try{if("undefined"!=typeof __SKIM_JS_GLOBAL__&&"function"==typeof __SKIM_JS_GLOBAL__.getDebugInfo&&document.links.length>0){var e={};for(let t=0;t0){await this._slAPICall();let t=Object.keys(e);for(let i=0;i0)for(let r=0;r{if(t.ok)return e._domains=e._domains.concat(e._domains_unique),t.json();e._log("Failed to get domains. HTTP error, status = "+t.status),i(!1)}).then(i=>{if(void 0!==i&&i&&void 0!==i.merchant_domains&&i.merchant_domains.length>0)if("undefined"!=typeof __SKIM_JS_GLOBAL__&&"function"==typeof __SKIM_JS_GLOBAL__.getDebugInfo){let e=__SKIM_JS_GLOBAL__.getDebugInfo().runTimeInfo.aff_domains;for(let t=0;t{e._log(t),i(!1)})})}_asinMapCall(){let e=this._customerId.split("_");if(this._envSettings.asin_map_api&&trx.LZString&&trx.md5&&e.length>1){let i=e[e.length-1],r=window.location.href,n=Object.keys(this._prepareAnchorASIN()).sort(),s=[this._envSettings.asin_map_api,i,"/",trx.md5(r+n.join(",")),"?client="+e[0]];this._asin_tag&&s.push("&tags=","1");var t={method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded"},redirect:"follow",referrer:"*client"};this._iframed&&(t.referrer=location.href),fetch(s.join("")+"&data="+trx.LZString.compressToEncodedURIComponent(JSON.stringify({url:r,asin:n})),t).then(e=>{e.text().then(e=>{})})}}_prepareAnchorASIN(){let e={};for(let t=0;t2){let i=t.slice(0,t.length-1);e.cidp1=i.join("_"),e.cidp2=t[t.length-1]}}}var t=JSON.stringify(e),i=trx.LZString.compressToEncodedURIComponent(t);this._debug("Meta "+t.length+" bytes decresed to "+i.length+" bytes ("+Math.round(100*i.length/t.length)+" %)");var r=this._envSettings.events_recording_iid+"/i/m/i.png?q="+i;if(this.pixel_append(r),r.length>=8e3)try{if("undefined"!=typeof Storage){var n,s="fr_log_"+(n=Math.round((new Date).getTime()/1e3)),a={},o;(o=this._getLogInfomration(a)).url=window.location.href,o.message="pixel too big "+r.length,localStorage.setItem(s,JSON.stringify(o))}}catch(e){this._debug(e)}}if(this._links.length>0){var l=[],d=25,c=0,h=0;for(var _ in this._links)void 0===l[c]&&(l[c]={}),l[c][this._links[_].info.xid]=this._links[_].anchor.getAttribute("data-orig-url"),h>=25&&(c+=1,h=0),h+=1;for(var u=0;u<=c;u++)if(void 0!==l[u]){this._debug(l[u]);var f={pid:this._paramsBuffer.customer_id,iid:trx.iid,xids:l[u]},g=JSON.stringify(f),p=trx.LZString.compressToEncodedURIComponent(g);this._debug(g.length+" bytes decresed to "+p.length+" bytes ("+Math.round(100*p.length/g.length)+" %)");var r=this._envSettings.events_recording_iid+"/i/x/i.png?q="+p;if(this.pixel_append(r),r.length>=8e3)try{if("undefined"!=typeof Storage){var n,s="fr_log_"+(n=Math.round((new Date).getTime()/1e3)),a={},o;(o=this._getLogInfomration(a)).url=window.location.href,o.message="pixel too big "+r.length,localStorage.setItem(s,JSON.stringify(o))}}catch(e){this._debug(e)}}}}}pixel_append(e){var t=document.createElement("img");t.height="1",t.width="1",t.style="border-style:none;display:none;",t.alt="",t.src=e,document.body.appendChild(t)}registerCustomLinks(e){for(let[t,i]of e)this.registerCustomLink(t,i)}registerCustomLink(e,t){if(this._isEmpty(e)||this._isEmpty(t))this._error("registerCustomLink method was invoked with either empty 'id' or empty 'url' arguments. Check you call to method(s) 'registerCustomLink' / 'registerCustomLinks'");else{let i=document.getElementById(e);null!=i&&i.parentNode.removeChild(i),(i=document.createElement("a")).href=t,i.id=e,i.style.display="none",i.setAttribute("data-ml-custom-link","true"),i.setAttribute("target","_blank"),document.body.append(i),this._customLinks.set(e,{orig_url:t})}}getProcessedCustomLinks(){for(let[e,t]of this._customLinks){let i=document.getElementById(e);t.processed=i.hasAttribute("data-ml"),t.processed&&(t.fr_url=i.href)}return this._customLinks}recordCustomLinkClick(e,t){try{let i=!1;for(let r=0;r2){let t=e.slice(0,e.length-1);this._paramsBuffer.cidp1=t.join("_"),this._paramsBuffer.cidp2=e[e.length-1]}}this._paramsBuffer.source=location.href,void 0!==trx.source&&(this._paramsBuffer.source=trx.source,this._paramsBuffer.urls.source=trx.source,this._paramsBuffer.amp_source=location.href),this._paramsBuffer.event_type="click",this._prepareCustomMetadata();let t=this._settings.features;for(let i in t)if(t.hasOwnProperty(i)){let r=t[i];if(!this._asBoolean(r.enabled))continue;switch(i){case"append_referrer":this._appendReferrer(r);break;case"append_timing":this._appendTiming(r);break;case"append_attributes":this._appendAttributes(r);break;case"attributes_forwarding":this._attributesForwarding(r,e);break;case"track_events":this._prepareEventTracking(r);break;case"auto_optimize_link":this._autoOptimizeLinks(r);break;case"link_preview":this._preparePreview(r);break;case"shorten_extra_param":this._prepareShortExtraParam(r);break;case"metadata":this._prepareMetadata(r);break}}if(1!=e){for(let e=0;e{e.anchor.setAttribute("data-written","true")}),n.catch(t=>{try{if("undefined"!=typeof Storage){var i,r="fr_log_"+Math.round((new Date).getTime()/1e3),n=this._getLogInfomration(JSON.parse(JSON.stringify(this._paramsBuffer)));n.message=t,n.xid=e.info.xid,localStorage.setItem(r,JSON.stringify(n))}}catch(e){this._debug(e)}e.anchor.setAttribute("data-written","true")})}_promiseTimeout(e,t){let i=new Promise((t,i)=>{let r=setTimeout(()=>{clearTimeout(r),i("Timed out in "+e+"ms.")},e)});return Promise.race([t,i])}_cleanupXid(e,t){if(null==e)return"";let i,r;if(null==t&&(t=""),!this._isEmpty(e)){let n=["|xid:fr","xid:fr","xid%3Afr"];for(let s=0;s0)for(let e of this._settings.detection_rules.custom)switch(e.type){case"element":if(void 0!==e.selector_attribute&&void 0!==e.selector_element&&e.selector_element.toLowerCase()==n.anchor.nodeName.toLowerCase()&&n.anchor.hasAttribute(e.selector_attribute)){let t=n.anchor.getAttribute(e.selector_attribute),i=this._detectKnownAffiliateLink(t,{});void 0!==i&&""!==i&&(t=this._cleanupXid(t),t=this._appendExtraParam(i,t,"xid",o,!1),n.anchor.setAttribute(e.selector_attribute,t))}break}if(void 0!==n.info.internal_network&&"dd"===n.info.internal_network){let e="";if(n.anchor.hasAttribute("rev")){let t=n.anchor.getAttribute("rev");e=(t=this._cleanupXid(t))+"|xid:"+o}else e="xid:"+o;n.anchor.setAttribute("rev",e),void 0!==this._ddURLVisit&&this._ddURLVisit&&"dd"===n.info.dynamicType&&(n.info.dd_wrapped_url=this._ddCreateWrappedURL(s,e,n.anchor,o))}}n.anchor.setAttribute("data-xid",o),this._new_window&&0==n.anchor.hasAttribute("target")&&n.anchor.setAttribute("target","_blank"),null!=window.trxdebug&&n.anchor.setAttribute("data-network",a)}}_appendToTRXHUBLinks(){let e="",t="",i=!0;if(void 0!==this._settings.features&&this._settings.features&&void 0!==this._settings.features.attributes_forwarding&&this._settings.features.attributes_forwarding&&void 0!==this._settings.features.attributes_forwarding.enabled&&!1!==this._asBoolean(this._settings.features.attributes_forwarding.enabled)||(i=!1),i){let t=this._settings.features.attributes_forwarding,i=location.search;if(void 0!==trx.source&&trx.source&&(i="?"+trx.source.replace(/(\S*)\?/,"")),!this._isEmpty(i)&&i.length>1){let t=this._parseQuery(i.substring(1));t.has("cntt")?e=t.get("cntt"):void 0!==this._paramsBuffer.attr_forwarding.cntt&&(e=this._paramsBuffer.attr_forwarding.cntt)}}this._iid_track&&void 0!==trx.iid&&trx.iid&&(t=trx.iid);for(let i=0;i0){let t;this._parseQuery(e.attributes).forEach((e,t,i)=>{for(let i=0;i0){!0===t&&(this._paramsBuffer.attr_forwarding={});let r=location.search;if(void 0!==trx.source&&(r="?"+trx.source.replace(/(\S*)\?/,"")),void 0===e.attributes.includes.cntt&&e.attributes.push("cntt"),!this._isEmpty(r)&&r.length>1){let t;this._parseQuery(r.substring(1)).forEach((t,i,r)=>{e.attributes.includes(i)&&(this._paramsBuffer.attr_forwarding[i]=t)})}try{var i;if(sessionStorage)if(null!=this._paramsBuffer.attr_forwarding&&"null"!=this._paramsBuffer.attr_forwarding||(this._paramsBuffer.attr_forwarding={}),0==Object.keys(this._paramsBuffer.attr_forwarding).length)try{this._paramsBuffer.attr_forwarding=JSON.parse(sessionStorage.getItem("fr_attr_forwarding")),null!=this._paramsBuffer.attr_forwarding&&"null"!=this._paramsBuffer.attr_forwarding||(this._paramsBuffer.attr_forwarding={})}catch(e){this._debug(e),this._paramsBuffer.attr_forwarding={}}else try{sessionStorage.setItem("fr_attr_forwarding",JSON.stringify(this._paramsBuffer.attr_forwarding))}catch(e){this._debug(e)}}catch(e){this._debug(e)}}}_prepareEventTracking(e){if(this._asBoolean(e.enabled)){if(this._isEmpty(e.analytics_code)||0!==e.analytics_code.indexOf("UA-")||"undefined"==typeof ga){if(this._isEmpty(e.analytics_code)||"undefined"==typeof s||"function"!=typeof s.tl)return;this.trackerObj=new trx.AdobeTracker(e.analytics_code)}else this.trackerObj=new trx.GATracker(e.analytics_code);if(this._asBoolean(e.pageview)&&this.trackerObj.trackPageView(),this._asBoolean(e.clicks))for(let t=0;t{let t=this._getAnchorLabel(r,50)+" ["+r.href+"]";this.trackerObj.trackEvent("magic-links","click",t,"1",{xid:n,anchor:r,props_map:e.props_map,props_map_custom:e.props_map_custom,data:this.paramsBuffer})}),this._markLink("feature","track_events",r)}}}_autoOptimizeLinks(e){this._asBoolean(e.enabled)}_preparePreview(e){if(this._asBoolean(e.enabled)){if(e.show_icon)for(let e=0;e1){if(t=e[0].trim(),0===(i=e[1].trim()).length)continue;if(0===(i=e.slice(1).join().trim()).indexOf("js::")){let e=i.replace("js::","").trim();null==(r=trx.MagicLinks._getObjectByPath(e))&&("function"==typeof trx.get[t]?r=trx.get[t]():this._log("Missing function trx.get."+t))}else if(0===i.indexOf("ck::")){let e=i.replace("ck::","").trim();this._isEmpty(e)?this._log("Invalid metadata cookie line. Cookie name is missing"):r=this._getCookie(e)}else if(0===i.indexOf("ls::")){let e=i.replace("ls::","").trim();try{if("undefined"!=typeof Storage){let t=void 0;t=window.localStorage.getItem(e),this._isEmpty(t)?this._log("Invalid metadata localStorage line. Storage name is missing"):r=t}}catch(e){this._debug(e)}}else if("function"==typeof document.evaluate){let e;r=document.evaluate(i,document,null,XPathResult.STRING_TYPE,null).stringValue}this._isEmpty(r)||((r instanceof Array||"number"==typeof r)&&(r=r.toString()),this._paramsBuffer[t]=r.trim(),this._paramsBuffer.metadata[t]=r.trim())}else this._log("Invalid metadata line. Line must have name and Xpath value in this format: name | xpath ")}}catch(e){this._log(e)}}}_getCookie(e){try{let t=e+"=",i,r=decodeURIComponent(document.cookie).split(";");for(let e=0;e=10)n={source:"..."};else{var t=location.href;void 0!==trx.source&&(t=trx.source),n={source:t,referrer:document.referrer,attr_forwarding:this._paramsBuffer.attr_forwarding}}e.push(n);try{sessionStorage.setItem("fr_referrer_trace",JSON.stringify(e))}catch(e){this._debug(e)}this._paramsBuffer.page_trace=e}}catch(e){this._debug("Error when recording referrer trace. Details: ",e)}}_needToClearTraces(){if(this._isEmpty(document.referrer))return!0;let e=!1,t="",i=document.referrer.split("/");return!Array.isArray(i)||(""!==(t=i[2])&&t===location.hostname||(e=!0),e)}_disbaleLinks(){if(void 0!==this._settings.disable_rules&&this._asBoolean(this._settings.disable_rules.enabled)&&void 0!==this._settings.disable_rules.networks){var e=[];for(let e=0;e0){this._autoDetectCustomRules(this._settings.detection_rules.custom);for(let e of this._settings.detection_rules.custom)switch(e.type){case"element":this._detectByElementSelector(e);break}}for(let e=0;e-1)){e=a.href;var r=this._getAbsoluteOffsetFromBody(a);if((void 0===this._links_unique[r.top+"_"+r.left+"_"+e]||"function"!=typeof a.click_fn||null===a.click_fn)&&!this._isEmpty(e)&&this._isAbsolute(e)&&!this._isExcludedUrl(e)){let s={inxStart:0,inxEnd:0,embedded:!1,dynamic:!1,dynamicType:null,url:"",network:""};if("ge"==(t=this._detectKnownAffiliateLink(e,s))&&(t="amazon"),this._checkEmbeddedLink(e,s),void 0!==s&&Object.keys(s).length&&void 0!==s.embedded&&s.embedded&&void 0!==s.wrapping_net&&"howl"===s.wrapping_net&&(t=s.wrapping_net),!1!==t&&this._asBoolean(i[t])||a.hasAttribute("data-prepend-xid")){if(a.hasAttribute("data-prepend-xid")&&this._debug("found prepended xid"),s.network=t,"sas"==t&&-1!==e.search(/(r\.cfm\?b=999&)|(r.cfm%3Fb%3D999%26)/)){this._debug("found wrong SAS url.");var n=e;void 0!==s.wrapping_url&&(n=s.url),n=(n=n.replace("r.cfm?b=999&","r.cfm?b=999999&")).replace("r.cfm%3Fb%3D999%26","r.cfm%3Fb%3D999999%26"),s.url=n,a.setAttribute("data-orig-url",e)}this._links.push({network:t,anchor:a,info:s}),this._links_unique[r.top+"_"+r.left+"_"+e]=a,a.hasAttribute("data-orig-url")||a.setAttribute("data-orig-url",e)}else!1===t&&this._asBoolean(i.dynamic)&&"true"===a.getAttribute("data-ml-dynamic")?(s.inxStart=0,s.inxEnd=0,s.embedded=!1,s.dynamic=!0,s.dynamicType=a.getAttribute("data-ml-dynamic-type"),s.url="",s.internal_network=a.getAttribute("data-ml-dynamic-type"),"dd"===s.dynamicType&&(s.network=s.internal_network),this._links.push({network:t,anchor:a,info:s}),this._links_unique[r.top+"_"+r.left+"_"+e]=a,a.hasAttribute("data-orig-url")||a.setAttribute("data-orig-url",e)):"trx"===t&&(this._wrapped_trxhub_links.push({network:t,anchor:a,info:s}),this._links_unique[r.top+"_"+r.left+"_"+e]=a,a.hasAttribute("data-orig-url")||a.setAttribute("data-orig-url",e))}}}}_getAbsoluteOffsetFromBody(e){for(var t=0,i=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft+e.clientLeft,i+=e.offsetTop-e.scrollTop+e.clientTop,e=e.offsetParent;return{top:i,left:t}}_detectByElementSelector(e){let t,i,r;document.querySelectorAll(e.selector).forEach(r=>{if(!(!0!==trx.magicLinksSimulator&&r.hasAttribute("data-xid")||r.hasAttribute("data-orig-url")))if("A"===r.nodeName&&void 0===e.selector_attribute){t=r.href;var n=this._getAbsoluteOffsetFromBody(r);if(void 0!==this._links_unique[n.top+"_"+n.left+"_"+t])return;if(!this._isEmpty(t)&&this._isAbsolute(t)&&!this._isExcludedUrl(t))try{let s;if(new RegExp(e.pattern).test(t)){let e={inxStart:0,inxEnd:0,embedded:!1,dynamic:!1,dynamicType:null,url:t};!1===(i=this._detectKnownAffiliateLink(t,e))&&(i="other"),this._checkEmbeddedLink(t,e),e.network=i,this._links.push({network:i,anchor:r,info:e}),this._links_unique[n.top+"_"+n.left+"_"+t]=r,r.hasAttribute("data-orig-url")||r.setAttribute("data-orig-url",t)}}catch(e){this._debug(e)}}else if(r.nodeName.toLowerCase()===e.selector_element){t=void 0,void 0!==r[e.selector_attribute]&&(t=r[e.selector_attribute]),r.hasAttribute(e.selector_attribute)&&(t=r.getAttribute(e.selector_attribute));var n=this._getAbsoluteOffsetFromBody(r);if(void 0!==this._links_unique[n.top+"_"+n.left+"_"+t])return;if(!this._isEmpty(t)&&this._isAbsolute(t)&&!this._isExcludedUrl(t))try{let s;if(new RegExp(e.pattern).test(t)){let s={inxStart:0,inxEnd:0,embedded:!1,dynamic:!1,dynamicType:null,url:t};!1===(i=this._detectKnownAffiliateLink(t,s))&&(i="other"),this._checkEmbeddedLink(t,s),s.selector_element=e.selector_element,s.selector_attribute=e.selector_attribute,s.network=i,this._links.push({network:i,anchor:r,info:s}),this._links_unique[n.top+"_"+n.left+"_"+t]=r,r.hasAttribute("data-orig-url")||r.setAttribute("data-orig-url",t)}}catch(e){this._debug(e)}}})}_detectKnownAffiliateLink(e,t){let i,r,n={};void 0!==this._serverSettings.impact_domains&&(n=this._serverSettings.impact_domains);var s=e.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i),a=s&&s[1];if(null!==a&&1!==n[a]){const e=/(([a-z\-0-9]+)(?:\.com|\.fr|\.co.uk|\.io|\.net|\.com.au|\.co|\.tv|\.market))/g;null!==(s=a.match(e))&&1==s.length&&(a=s[0])}if(-1!==e.indexOf("trx-hub.com"))i="trx";else if(-1!==e.indexOf("/dp/")&&e.includes("tag=")&&(r=-1!==e.indexOf("amazon."))||-1!==e.indexOf("/gp/")&&e.includes("tag=")&&(r=-1!==e.indexOf("amazon."))||(r=-1!=e.indexOf("/amzn."))||(r=-1!=e.indexOf("/www.amzn."))||(r=-1!=e.indexOf(".amazon-adsystem.com")))i="amazon";else if(-1!==(r=e.indexOf("linksynergy")))i="ls";else if(-1!==(r=e.indexOf("anrdoezrs.net"))||-1!==(r=e.indexOf("jdoqocy.com"))||-1!==(r=e.indexOf("tqlkg.com"))||-1!==(r=e.indexOf("tkqlhce.com"))||-1!==(r=e.indexOf("dpbolvw.net"))||-1!==(r=e.indexOf("jqoqocy.com"))||-1!==(r=e.indexOf("kqzfj.com"))||-1!==(r=e.indexOf("kqzyfj.com"))||-1!==(r=e.indexOf("ftjcfx.com"))||-1!==(r=e.indexOf("lduhtrp.net"))||-1!==(r=e.indexOf("qksrv.net")))i="cj";else if(-1!==(r=e.indexOf("shareasale.com"))||-1!==(r=e.indexOf("shareasale-analytics.com")))i="sas";else if(-1!==(r=e.indexOf("awin1.com")))i="awin";else if(-1!==(r=e.indexOf("pepperjamnetwork.com"))||-1!==(r=e.indexOf("pjtra.com/t/"))||-1!==(r=e.indexOf("gopjn.com/t/"))||-1!==(r=e.indexOf("pjatr.com/t/"))||-1!==(r=e.indexOf("pntra.com/t/"))||-1!==(r=e.indexOf("pntrs.com/t/"))||-1!==(r=e.indexOf("pntrac.com/t/")))i="pj";else if(-1!==(r=e.indexOf("track.webgains.com")))i="wg";else if(-1!==(r=e.indexOf("prf.hn/click")))i="pt";else if(-1!==(r=e.indexOf("tradedoubler.com/click?"))||-1!==(r=e.indexOf("pf.tradedoubler.com/pf/"))||-1!==(r=e.indexOf("tradedoubler.com%2Fclick%3F")))i="td";else if(-1!==(r=e.search(/\/c\/(\d+)\/(\d+)\//))||-1!==(r=e.search(/%2Fc%2F(\d+)%2F(\d+)%2F(\d+)%/))||1==n[a])i="ir";else if(-1!==(r=e.indexOf("go.redirectingat.com"))||-1!==e.search(/go\.[a-zA-Z0-9].*?\.com(\/?)\?id=[0-9].+?X[0-9].+?&/)||-1!==e.indexOf("go.skimresources.com")||-1!==e.indexOf("fave.co")||-1!==e.indexOf("c1.dealnews.com"))i="sl";else if(-1!==(r=e.indexOf("redirect.viglink.com")))i="vg";else if(-1!==(r=e.indexOf("avantlink.com/click")))i="al";else if(-1!==(r=e.indexOf("track.adtraction.com"))||-1!==(r=e.indexOf("adtr.co"))||-1!==(r=e.search(/\/t\/t\/\?a=(\d+)/))||-1!==(r=e.search(/\/t\/t\?a=(\d+)/)))i="at";else if(-1!==(r=e.indexOf("tc.tradetracker.net"))||-1!==(r=e.search(/(\?|\&)tt=(\d+)_(\d+)_(\d+)(_[\w-]+)?/))||-1!==(r=e.search(/(partner).*(\/c?).*(c=).*(m=).*(a=)/)))i="tt";else if(-1!==(r=e.indexOf("/aff_c"))&&-1!==e.search(/aff_id=(\d+)/))i="ho";else if(r=-1!==e.indexOf("c.trackmytarget.com"))i="tc";else if(r=-1!==e.indexOf("buy.geni.us/Proxy.ashx"))i="ge";else if((r=-1!==e.indexOf("partner.bol.com/click/click"))||(r=-1!==e.indexOf("tracking.bol.com/click/click")))i="bol";else if(r=-1!==e.search(/(track\.[wg|wargaming]+\-aff\.com\/click)/))i="afs";else if(r=-1!==e.indexOf("oc.brcclx.com/t/?"))i="rv";else if(r=-1!==e.search(/(wayfair\.com[\S]+refid=)/))i="wyf";else if((r=-1!==e.search(/(ndt5\.net\/c\/)/))||(r=-1!==e.search(/(ds1\.nl\/c\/)/))||(r=-1!==e.search(/(lt45\.net\/c\/)/))||(r=-1!==e.search(/(fr135\.net\/c\/)/))||(r=-1!==e.search(/(dt51\.net\/c\/)/))||(r=-1!==e.search(/(at19\.net\/c\/)/))||(r=-1!==e.search(/(jf79\.net\/c\/)/))||(r=-1!==e.search(/(rkn3\.net\/c\/)/))||(r=-1!==e.search(/(bdt9\.net\/c\/)/)))i="dc";else if(r=-1!==e.search(/(hylxtrk|buy\.storyworth|nolahmattress|romadesignerjewelry|ostlon|hiasor|goplay4|trck1t|wb44trk|wb22trk)(\.com)(\/?)([a-zA-Z0-9]+\/[a-zA-Z0-9]+\/|(\?)((oid=[0-9]+)[\S]*(affid=[0-9]+)|(affid=[0-9]+)[\S]*(oid=[0-9]+))|(cmp\/))/))i="ef";else if(r=-1!==e.search(/((ebay\.)(?=.*\bcampid=[\d+])(?=.*\bmkcid=1\b)(?=.*\bmkrid=[\d+]*\b)[\S]*)|((ebay\.)(?=.*\bcampid=[\d+])(?=.*\bmpre=[\d+]*\b)(?=.*\bpub=[\d+]*\b)[\S]*)|((ebay\.).[\S]*(mkcid%3D)[\S]*(mkrid%3D[0-9\-]*)[\S]*(%26campid%3D[0-9]*)[\S]*)/))i="ebay";else if(r=-1!==e.search(/((spindlemattress|worldwidecyclery|thegravitycartel|verdebikes|gaggiadirect|cobocbd|leafremedys)\.com[\S]*[\&|\?]aff=[\d]+)|(lumen\.me[\S]*[\&|\?]fid=[\d]+)/))i="afy";else if(r=-1!==e.search(/(\?|\&)(rfsn=([0-9]{1,})\.([a-z0-9]{3,}))/))i="rfs";else if(r=-1!==e.search(/(cmtcr\.com\/clk\.trk|qwxyq\.com\/clk\.trk)/))i="ct";else if(r=-1!==e.search(/(track\.flexlinkspro\.com|track\.flexlinks\.com)/))i="fo";else if(r=-1!==e.search(/(stackedbrands\.com|getrxd\.com|transparentlabs\.com|roguefitness\.com|leanbeanofficial\.com|realketones\.com|amplemeal\.com)|([\?|\&|\#]a_aid=[a-zA-Z0-9]+)/))i="pap";else if(r=-1!==e.search(/(bhphotovideo\.com\/c\/product[\S]*\/BI\/[\d]*[\S]*\/KBID\/[\d]*)/))i="bhp";else if(r=-1!==e.search(/(track.effiliation.com\/)[\S]*(id_compteur=[1-9]+)/))i="eff";else if(r=-1!==e.search(/(financeads\.net\/tc\.php)/))i="fnc";else if(r=-1!==e.search(/(\.digidip\.net\/visit[\S]*(url=))|(\.digidip\.net%2Fvisit[\S]*(url%3D))/))i="dd";else if(r=-1!==e.search(/(\&|\?)(a_fid=)/))i="exv";else if(r=-1!==e.search(/(\/[a-z]{3}\.[\S]*\/\?P[0-9a-fA-F]{3,})|(action\.metaffiliation\.com\/trk\.php\?mclic=P[0-9a-fA-F]{3,})/))i="naff";else if(r=-1!==e.search(/(secure\.2checkout\.com\/affiliate\.php\?)[\S]*(ACCOUNT=)[\S]*(AFFILIATE=[1-9]*\&)[\S]*(PATH=)[\S]*/))i="ag";else if(r=-1!==e.search(/(?=.*apple\.com\/)(?=.*at=)(?=.*itscg=)(?=.*itsct=).*/))i="phga";else if(r=-1!==e.search(/((t\.cfjump\.com\/)[0-9]*\/t\/[0-9]*)/))i="cf";else if(r=-1!==e.search(/(howl\.me\/|shop-links\.co\/|shop-edits\.co\/)((\d{19})|[0-9a-zA-Z]{11}|link)/))i="howl";else if(r=-1!==e.search(/(scripts\.affiliatefuture\.com\/AFClick\.asp)+[\S]*(affiliateID=\d+)/))i="af";else if(r=-1!==e.search(/^.*(?=.btag=).*(?=.affid=).*(?=.siteid=).*$/))i="ia";else{if(!(r=-1!==e.search(/^.*(?=.*pointsbetpartners\.com\/)(?=.*payload=).*$/)))return!1;i="pbet"}return i}_isCJ(e){return-1!==e.indexOf("anrdoezrs.net")||-1!==e.indexOf("jdoqocy.com")||-1!==e.indexOf("tqlkg.com")||-1!==e.indexOf("tkqlhce.com")||-1!==e.indexOf("dpbolvw.net")||-1!==e.indexOf("jqoqocy.com")||-1!==e.indexOf("kqzfj.com")||-1!==e.indexOf("kqzyfj.com")||-1!==e.indexOf("ftjcfx.com")||-1!==e.indexOf("lduhtrp.net")||-1!==e.indexOf("qksrv.net")}_findAsin(e){let t=null;const i=/(?:[/dp/]|$)([A-Z0-9]{10})(?:[\/])/g,r=e.match(i);return null!==r&&r.length>0&&(t=r[0].replace("/","").replace("/","")),t}_checkEmbeddedLink(e,t){if(-1!==e.search(/howl\.me\/link\/\?url=/gim)?(t.wrapping_net="howl",t.qp="url"):-1!==e.indexOf("go.redirectingat.com")||-1!==e.indexOf("go.skimresources.com")?(t.wrapping_net="sl",t.qp="url"):-1!==e.indexOf("redirect.viglink.com")?(t.wrapping_net="vg",t.qp="u"):-1!==e.search(/(\.digidip\.net%2Fvisit[\S]*(url%3D))/)?(t.wrapping_net="dd",t.qp="ref"):-1!==e.search(/(buy.geni.us\/Proxy.ashx[\S]*(GR_URL))/)&&(t.wrapping_net="ge",t.qp="GR_URL"),void 0!==t.wrapping_net){let i=e.indexOf("&"+t.qp+"=");if(-1===i&&(i=e.indexOf("?"+t.qp+"=")),-1!==i){let r=e.indexOf("&",i+t.qp.length+2);-1===r&&(r=e.length),t.url=decodeURIComponent(e.substring(i+t.qp.length+2,r)),t.internal_network=this._detectKnownAffiliateLink(t.url),t.embedded=!0;let n=e.substring(0,i+t.qp.length+2),s=e.substring(r);t.wrapping_url=n+this._embedUrlToken+s}}else t.url=e,t.embedded=!1}async _ddFetchHostsIgnoreList(e){try{e=encodeURIComponent(e);let t={method:"GET"};if(void 0!==this._envSettings.cdn){let i=await fetch(this._envSettings.cdn+"/client/dd?v=2&p="+e,t),r;return await i.json()}}catch(e){this._log(e)}}_markDynamicDomainLinks(){let e,t;var i=void 0;if("undefined"!=typeof skimlinksInitialized&&(i=!0),"undefined"!=typeof __SKIM_JS_GLOBAL__&&"function"==typeof __SKIM_JS_GLOBAL__.getDebugInfo)e="sl",t=__SKIM_JS_GLOBAL__.getDebugInfo().runTimeInfo.aff_domains;else if(void 0!==i)e="sl";else if("undefined"!=typeof vglnk&&"function"==typeof vglnk.opt)e="vg",t=vglnk.opt("commercial_domains");else{if("undefined"==typeof Digidip||!Digidip)return;Object.keys(this._ddDomains).length<1&&this._ddFetchHostsIgnoreList(location.href).then(e=>{void 0!==e&&Object.keys(e).length>0&&1===e.status&&void 0!==e.url_visit&&e.url_visit&&(this._ddDomains=e.domains,this._ddURLVisit=e.url_visit)}),Object.keys(this._ddDomains).length>0&&(e="dd",t=this._ddDomains)}if(null!=t){for(let i=0;i0&&(void 0===t[n]||!t[n])&&n!==location.hostname&&!1===r.classList.contains("squirrel_no_digidip")&&""!==n&&void 0!==r.href&&""!==r.href&&0!==r.href.indexOf("#")?(r.setAttribute("data-ml-dynamic","true"),r.setAttribute("data-ml-dynamic-type",e)):!0===t[n]&&"dd"!==e&&(r.setAttribute("data-ml-dynamic","true"),r.setAttribute("data-ml-dynamic-type",e))}catch(e){this._log(e)}try{this._debug("FR find dynamic domains: "+JSON.stringify(t))}catch(e){}}else if(void 0!==i){skimlinks_exclude;var r=[];"undefined"!=typeof skimlinksInitialized&&(r=skimlinks_exclude);let i=document.querySelectorAll("a[data-skimlinks-tracking]"),a="("+r.join("|").replace("*","")+")",o=new RegExp(a),l={};for(let t in i)if(void 0!==i[t].href){if(o.test(i[t].href))continue;var n=i[t].href.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i),s=(n&&n[1]).replace("www.","");void 0!==s&&void 0==l[s]&&(l[s]=1);try{i[t].setAttribute("data-ml-dynamic","true"),i[t].setAttribute("data-ml-dynamic-type",e)}catch(e){this._log(e)}}void 0!==l&&(t=Object.keys(l))}else this._debug("FR didn't find dynamic domains")}_isExcludedUrl(e){let t=this._exclude_urls_regex;for(let i=0;i0&&(this._settings=this._extendForte(this._settings,this.serverSettings)),Object.keys(this.onPageSettings).length>0&&(this._settings=this._extendForte(this._settings,this.onPageSettings))}_collectClickTimeParams(){let e=this._settings.features.append_timing;if(this._asBoolean(e.enabled)){let t=e.t_clicked,i=e.t_toclick,r=Date.now();t&&(this._paramsBuffer.t_clicked=r,this._paramsBuffer.timing.t_clicked=r),i&&(this._paramsBuffer.t_toclick=r-this._loadTime,this._paramsBuffer.timing.t_toclick=r-this._loadTime)}}_writeDataToEventsService(e,t,i){let r;try{r=JSON.parse(JSON.stringify(this._paramsBuffer))}catch(e){this._log(e),r=this._paramsBuffer}void 0!==trx.source&&trx.source||void 0!==r.source&&r.source!==location.href&&(r.source=location.href),r.uuid=e.info.xid;var n=e.info.xid;if(r.link_replaced=!1,e.anchor.hasAttribute("data-spot-rid")){let t=e.anchor.getAttribute("data-spot-rid"),i=e.anchor.getAttribute("data-orig-url"),s=e.anchor.getAttribute("data-spot-replaced");n=t,r.uuid=t,r.original_xid=e.info.xid,r.link_replaced=!0,r.orig_url=i,r.link_replace_to=s}if(void 0===n&&e.anchor.hasAttribute("data-xid")&&(n=e.anchor.getAttribute("data-xid")),e.anchor.hasAttribute("data-orig-url")&&(r.anchor_orig=e.anchor.getAttribute("data-orig-url")),r.client_time=(new Date).toISOString(),r.anchor_id=this._emptyIfNull(e.anchor.id),r.anchor_href=e.anchor.href,r.anchor_label=e.anchor.innerText,r.page_title=document.title,r.spot_id="",r.network=e.info.network,null!=t&&(r.event_type=t),e.anchor.hasAttribute("data-affiliation-url")?(r.anchor_href=e.anchor.getAttribute("data-affiliation-url"),r.network=this._detectKnownAffiliateLink(r.anchor_href,{})):void 0!==e.info.selector_attribute&&(r.anchor_href=e.info.url),void 0!==e.info.dd_wrapped_url&&e.info.dd_wrapped_url&&(r.anchor_href=e.info.dd_wrapped_url),e.anchor.hasAttribute("data-vars-link-id")&&(void 0===r.metadata&&(r.metadata={}),r.metadata.linkid=e.anchor.getAttribute("data-vars-link-id")),void 0!==e.anchor.attributes)for(var s=e.anchor.attributes,a="",o=s.length-1;o>=0;o--)(s[o].name.indexOf("trx-vars-")>-1||s[o].name.indexOf("affluent-details-")>-1)&&(void 0==r.link_meta&&(r.link_meta={}),(a=s[o].value.replace(/[^a-z0-9A-Z \-\_]/gi,"")).length>256&&(a=a.slice(0,256)),r.link_meta[s[o].name.replace("trx-vars-","").replace("affluent-details-","")]=a);if(null!=i&&"object"==typeof i)for(let e in i)i.hasOwnProperty(e)&&0===e.indexOf("custom_")&&(r[e]=i[e]);let l=this._envSettings.events_recording_api+"/write",d={env:this._envSettings.events_recording_env,id:n,app_key:this._envSettings.app_key,property_id:r.property_id,customer_id:r.customer_id,cidp1:r.cidp1,cidp2:r.cidp2,event_type:r.event_type,network:r.network,data:encodeURIComponent(JSON.stringify(r))},c=JSON.stringify(d),h=JSON.parse(c);h.data=r;let _=JSON.stringify(h),u=r.uuid;delete r.uuid,delete r.client_time,delete r.anchor_href,delete r.anchor_label,delete r.page_title,delete r.spot_id;try{if("undefined"!=typeof Storage){var f="fr_click_"+u;localStorage.setItem(f,c)}}catch(e){this._debug(e)}if(void 0!==this._envSettings.events_recording_api2){let e=this._envSettings.events_recording_api2+"/write";var g={method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrer:"*client",body:c};this._iframed&&(g.referrer=location.href),fetch(e,g).then(e=>{if(e.ok){let e="Write to events-recording service. Body:\n"+_;return this._isSimulator&&this._log(e),void this._debug(e)}this._log("Fail to write event data. HTTP error, status = "+e.status);try{if("undefined"!=typeof Storage){var t=Math.round((new Date).getTime()/1e3);f="fr_log_"+t}}catch(e){this._debug(e)}}).then(e=>{e&&e.message&&this._log(e.message)}).catch(e=>{this._log(e)})}let p={method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrer:"*client",body:c};if(this._iframed&&(p.referrer=location.href),"AMP"==t){var m=l.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i),b,b,k;if(void 0!==(b=(m&&m[1]).replace("www.","")))(b=b.split(".").slice(-2).join("."))==location.hostname.split(".").slice(-2).join(".")&&(this._debug("same domain"),p.credentials=p.headers=p.mode=void 0)}if(navigator.sendBeacon&&this._use_beacon){try{let e=navigator.sendBeacon(l,c)}catch(e){console.log(e)}if(this._debug("sendBeacon: URL = "+l+"; status = "+status),1==status)try{localStorage.removeItem(f)}catch(e){this._debug(e)}return status}return fetch(l,p).then(t=>{if(t.ok){let e="Write to events-recording service. Body:\n"+_;if(this._isSimulator&&this._log(e),200==t.status)try{"undefined"!=typeof Storage&&localStorage.removeItem(f)}catch(e){this._debug(e)}return this._debug(e),t.json()}this._log("Fail to write event data. HTTP error, status = "+t.status);try{if("undefined"!=typeof Storage){var i=Math.round((new Date).getTime()/1e3);f="fr_log_"+i;var n=this._getLogInfomration(r);n.message="Fail to write event data. HTTP error, status = "+t.status,n.xid=e.info.xid,localStorage.setItem(f,JSON.stringify(n))}}catch(e){this._debug(e)}}).then(t=>{if(t&&t.message){this._log(t.message);try{if("undefined"!=typeof Storage){var i=Math.round((new Date).getTime()/1e3);f="fr_log_"+i;var n=this._getLogInfomration(r);n.message=t.message,n.xid=e.info.xid,void 0!==n.message&&"done"!==n.message.toLowerCase().trim()&&localStorage.setItem(f,JSON.stringify(n))}}catch(e){this._debug(e)}}}).catch(t=>{this._log(t);try{if("undefined"!=typeof Storage){var i=Math.round((new Date).getTime()/1e3);f="fr_log_"+i;var n=this._getLogInfomration(r);n.message=t.message,n.xid=e.info.xid,localStorage.setItem(f,JSON.stringify(n))}}catch(e){this._debug(e)}})}_getLogInfomration(e){return e.env=this._envSettings.events_recording_env,e.app_key=this._envSettings.app_key,e.property_id=this._propertyId,e.customer_id=this._customerId,e.loginfo={nAgt:navigator.userAgent,screen:screen.width+"*"+screen.height},e}_log(e){console.log(this._logPrefix+e)}_error(e,t){console.error(this._logPrefix+e),null!=t&&console.error(t);try{if("undefined"!=typeof Storage){var i,r="fr_log_"+Math.round((new Date).getTime()/1e3),n={},s=this._getLogInfomration(n);s.message=this._logPrefix+e,localStorage.setItem(r,JSON.stringify(s))}}catch(e){this._debug(e)}}_debug(e){null!=window.trxdebug&&console.log(this._logPrefix+e)}_prepareExcludeRegExp(){this._exclude_urls_regex=[];let e=this._settings.detection_rules.exclude_urls;if(e.length>0)for(let t=0;t0&&(_=this._getDelimiter(e,s)+_),this._insertToString(e,_,d)):"pt"===s?this._appendNameValueToUrl_PT(e,t,i,r,_):"cj"===s?this._appendNameValueToUrl_CJ(e,t,i,r,_):"td"===s?this._appendNameValueToUrl_TD(e,t,i,r,_):(_="/"+r+"/"+_,this._insertToString(e,_,e.length));if(1==o?l=e.toLocaleLowerCase().indexOf(r.toLocaleLowerCase()+encodeURIComponent("=").toLocaleLowerCase()):-1!==(l=e.toLocaleLowerCase().indexOf(r.toLocaleLowerCase()+"="))&&"&"!==e.toLocaleLowerCase().charAt(l-1)&&"?"!==e.toLocaleLowerCase().charAt(l-1)&&(-1===(l=e.toLocaleLowerCase().indexOf("&"+r.toLocaleLowerCase()+"="))&&(l=e.toLocaleLowerCase().indexOf("?"+r.toLocaleLowerCase()+"=")),"&"!==e.toLocaleLowerCase().charAt(l)&&"?"!==e.toLocaleLowerCase().charAt(l)?l=-1:l+=1),-1===l){a="=";var f="?";if(-1!==e.indexOf("?")?f="&":-1!==e.indexOf("#")&&(f="&"),!0===o&&(f=encodeURIComponent(f),a=encodeURIComponent(a)),_=f+r+a+_,"wg"===s){if(-1!==(l=e.toLocaleLowerCase().indexOf("wgtarget")))return _=_.replace(f,"")+f,this._insertToString(e,_,l)}else if("howl"===s){let t="&";if(!0===o&&(t=encodeURIComponent(t)),-1!==(l=e.toLocaleLowerCase().indexOf(t+"url")))return _=_.replace(f,"")+f,this._insertToString(e,_,l+1)}return this._insertToString(e,_,e.length)}return 1==o?-1===(d=e.indexOf(encodeURIComponent("&").toLocaleLowerCase(),l))&&(d=e.indexOf("&",l)):d=e.indexOf("&",l),-1===d&&(d=e.length),(u=e.substring(l+r.length+1,d)).length>0&&(_=1==o?encodeURIComponent(this._getDelimiter(e,s)+_):this._getDelimiter(e,s)+_),this._insertToString(e,_,d)}return n?e+=t+"/"+i:-1!==e.indexOf("?")?e+="&"+t+"="+i:e+="?"+t+"="+i,e}_regexIndexOf(e,t,i){var r=e.substring(i||0).search(t);return r>=0?r+(i||0):r}_appendNameValueToUrl_TD(e,t,i,r,n){let s,a,o,l,d;if(-1===(s=e.toLocaleLowerCase().indexOf("epi("))){if(-1!==(s=e.toLocaleLowerCase().indexOf("url(")))return e+"epi("+n+")";if(-1===(o=e.toLocaleLowerCase().indexOf("&epi="))){let t=e.toLocaleLowerCase().indexOf("url");return-1!==t?(n="epi="+n+"&",this._insertToString(e,n,t)):e+"&epi="+n}return-1===(l=e.indexOf("&",o+5))?e+this._getDelimiter(e)+n:(n=this._getDelimiter(e)+n,this._insertToString(e,n,l))}return s+=r.length,-1!==(a=e.indexOf(")",s))?((d=e.substring(s,a)).length>0&&(n=this._getDelimiter(e)+n),this._insertToString(e,n,a)):e}_appendNameValueToUrl_PT(e,t,i,r,n){let s,a,o;return-1!==(s=e.indexOf(r))?(s+=r.length,-1!==(a=e.indexOf("/",s))?((o=e.substring(s,a)).length>0&&(n=this._getDelimiter(e)+n),this._insertToString(e,n,a)):((o=e.substring(s,e.length)).length>0&&(n=this._getDelimiter(e)+n),this._insertToString(e,n,e.length))):-1!==(s=e.indexOf("/destination"))?(n="/pubref:"+n,this._insertToString(e,n,s)):(n="/pubref:"+n,this._insertToString(e,n,e.length));return e}_appendNameValueToUrl_CJ(e,t,i,r,n){let s=e.indexOf("dlg/");if(-1===s&&(s=e.indexOf("/am/")),n=n.replace(":","-"),-1!==s)return n=r+"/"+n+"/",this._insertToString(e,n,s+4);if(-1===e.indexOf("?"))return e+"?sid="+n;{let t=e.indexOf("?"),i=e.toLocaleLowerCase().indexOf("sid=",t+1);if(-1===i&&(i=e.toLocaleLowerCase().indexOf("&sid=",t+1)),-1!==i){let t=e.indexOf("&",i+5);return-1===t?e+this._getDelimiter(e).replace("|",this._delimiter4)+n:(n=this._getDelimiter(e).replace("|",this._delimiter4)+n,this._insertToString(e,n,t))}return t===e.length-1?e+"sid="+n:e+"&sid="+n}}_checkPageUrlMatch(){return!!this._isEmpty(this._settings.detection_rules.page_url_filter)||location.href.includes(this._settings.detection_rules.page_url_filter)}_insertToString(e,t,i){let r,n;return(r=e.substring(0,i))+t+(n=it&&(r=r.substring(0,t)+"..."),r}_isEmpty(e){return null==e||""===e||void 0===e}_emptyIfNull(e){return null==e?"":e}_isAbsolute(e){return 0===e.indexOf("http://")||0===e.indexOf("https://")}_asBoolean(e){return"true"===e||!0===e}_generateUUID(){const e=Date.now(),t=String.fromCharCode(Math.floor(10*Math.random()+97)),i=String.fromCharCode(Math.floor(10*Math.random()+97)),r=String.fromCharCode(Math.floor(10*Math.random()+97));return`fr${e}${t}${i}${r}`}static _getObjectByPath(e,t){null==t&&(t=window);const i=e.split(".");if(1===i.length)return t[i[0]];{let e=t;for(let t=0;t0?this._rsId=e:this._rsId=null}trackEvent(e,t,i,r,n){if("function"==typeof s.tl){let e=s,t=null!=this._rsId?this._rsId:s_account;null!=t&&(e=s_gi(t));let i=n.props_map;null==i&&(i={xid:"prop1",link:"prop2",label:"prop3",referrer:"prop4",origin:"prop5"});let r=n.props_map_custom,a=[i.xid,i.link,i.label,i.referrer,i.origin];if(null!=r)for(let e=0;e0?setTimeout(()=>{trx.magicLinksEngine.run(),trx.magicLinksEngine._runFRCallback()},n):(trx.magicLinksEngine.run(),trx.magicLinksEngine._runFRCallback());/* Spot version 2.6.61 - do the magic here 2024-05-02 11:11 */ trx.SpotClient=class{constructor(e,t){this._frClient=e,null==t&&(t={}),this._options=t,this._settingsLoaded=!1,this._websiteId=null,this._pageId=null,this._actionLinks=[],this._cache={},this._asinRules={},this._spotSettings={"s3_rule_action_links_url":"https:\/\/fr-actions.trackonomics.net\/prod"},this._dataset={uri:{},asin:{}},this._autoRun=this._asBoolean(!0),this._reportEnabled=this._asBoolean(t.report_enabled),this._report={links:[],activity:[]},this._isApplingRules=!1,this._refDate=0}_asBoolean(e){return"true"===e||!0===e}set autoRun(e){this._autoRun=e}set reportEnabled(e){this._reportEnabled=e}set refDate(e){null!=e&&e>0&&(this._refDate=e)}get report(){return this._report}async start(){try{return this._report={links:[],activity:[]},this.applyRules(),!0}catch(e){return console.error("Fail to start SpotClient.",e),!1}}async applyRules(){if(!0!==this._isApplingRules){if(this._isApplingRules=!0,this._logActivity("Rules actions were found for this page and will be apply depending on spot feature settings."),this._asBoolean(this._frClient._settings.features.spot.enabled)){let e=!1;if(this._asBoolean(this._frClient._settings.features.spot.link_rules)?(!1!==(e=await this._loadPageActionLinks())&&(this._websiteId=e.website_id,this._pageId=e.page_id,this._actionLinks=e.action_links,this._settingsLoaded=!0,this._reportEnabled&&(this.report.num_actions=Object.keys(this._actionLinks).length)),this._prepareAnchorURI(),void 0!==this._actionLinks&&Object.keys(this._actionLinks).length>0?(this._logActivity("Checking link_rules."),this._applyLinkRules()):this._logActivity("link_rules no rules to apply.")):this._logActivity("link_rules feature is disabled."),this._asBoolean(this._frClient._settings.features.spot.asin_rules)?(!1!==(e=await this._loadAsinsPerEnv())&&(this._asinRules=e.asins,this._settingsLoaded=!0,this._reportEnabled&&(this.report.num_asins=Object.keys(this._asinRules).length)),void 0!==this._asinRules&&Object.keys(this._asinRules).length>0?(this._dataset.asin=this._frClient._prepareAnchorASIN(),this._applyASINRules(),this._logActivity("Checking asin_rules.")):this._logActivity("link_rules no rules to apply.")):this._logActivity("asin_rules feature is disabled."),this._asBoolean(this._frClient._settings.features.spot.asin_per_page)){let t=this._getAllPerPageAnchors();t.amazon.length>0||t.outtra.length>0||t.elements.length>0?!1!==(e=await this._loadLogic("/{l}/{c}/{p}/{u}/{i}","pp","tags.json",!0))&&Object.keys(e).length>0?this._applyPerPageLogic(e,t):this._asBoolean(this._frClient._settings.features.spot.autotagger)&&!1!==(e=await this._loadLogic("/{l}/{cu}/{ue}","pp/tag","",!1))&&this._applyPerPageLogic(e,t):this._logActivity("no asin to replace.")}else this._logActivity("asin_per_page feature is disabled.");this._asBoolean(this._frClient._settings.features.spot.direct_deals)?(e=await this._loadLogic("/{l}/{c}/{u}/{i}","pl","place.json",!0),void 0===trx.LZString?this._frClient._error("Fail to load the LZ lib."):!1!==e&&void 0!==trx.LZString&&this._applyDirectDealsLogic(e)):this._logActivity("direct deals feature is disabled.")}this._isApplingRules=!1}else this._logActivity("already applying rules.")}async _loadPageActionLinks(){if("api"===this._spotSettings.rulesSource){let e={profile:"",href:location.href,app_key:this._spotSettings.app_key};const t=await fetch(this._spotSettings.spot_host+"/page-action-links?"+this.createHttpQuery(e));if(t.ok){let e=await t.json();return 1===e.status?e.data:2===e.status?(this._logActivity("No rule's action-links found for page"),!1):(this._logWarning("Fail to read rule's action-links for page from api. Details: "+e.message),!1)}return this._logWarning(`Fail to read rule's action-links for page from api. Status: ${t.statusText} Code: ${t.status}`),!1}{let e=this.getWebPageURI();const t=await fetch(this._spotSettings.s3_rule_action_links_url+"/"+e+"/action_links.json");return t.ok?await t.json():(this._logWarning(`Fail to read rule's action-links for page from S3. Possibly file does not exist on S3. Status: ${t.statusText} Code: ${t.status}`),!1)}}async _loadAsinsPerEnv(){let e=this._frClient._settings.features.spot.profile,t=this._spotSettings.s3_rule_action_links_url+"/publisher_code/"+e+"/asin_map.json";const i=await fetch(t);return i.ok?await i.json():(this._logWarning(`Fail to read rule's action-links for page from S3. Possibly file does not exist on S3. Status: ${i.statusText} Code: ${i.status}`),!1)}async _loadLogic(e,t,i,a){void 0===a&&(a=!1);let r=this._frClient._customerId,n=r.split("_"),s=n[0],o=r.replace(n[0]+"_"+n[1]+"_","");o=o.replace(/(\.js)$/gim,"");let l=this.getWebPageURI();var d=e.replace("{l}",t).replace("{c}",s).replace("{p}",o).replace("{u}",l).replace("{i}",i).replace("//","/").replace("{ue}",encodeURIComponent(l)).replace("{cu}",r);let p=(this._spotSettings.s3_rule_action_links_url+d).toLowerCase();if(!0===a&&void 0!==this._cache[p])return this._cache[p];const c=await fetch(p);if(c.ok){let e=await c.json();return!0===a&&(this._cache[p]=e),e}return 403!==c.status&&(this._logWarning(`Fail to read rule's logic for page from S3. Possibly file does not exist on S3. Status: ${c.statusText} Code: ${c.status}`),!1)}async _loadAsinsPerDomain(){let e=this.getWebPageHost();const t=await fetch(this._spotSettings.s3_rule_action_links_url+"/"+e+"/asins.json");return t.ok?await t.json():(this._logWarning(`Fail to read rule's action-links for page from S3. Possibly file does not exist on S3. Status: ${t.statusText} Code: ${t.status}`),!1)}createHttpQuery(e){let t="";for(let a in e)if(e.hasOwnProperty(a)){t.length>0&&(t+="&");let r=e[a];if(Array.isArray(r))for(var i=0;i0)for(let a=0;a{if(t.nodeName.toLowerCase()===i.selector_element){let a=void 0;if(void 0!==t[i.selector_attribute]&&(a=t[i.selector_attribute]),t.hasAttribute(i.selector_attribute)&&(a=t.getAttribute(i.selector_attribute)),void 0===a)return;((-1!==a.indexOf("/dp/")||a.indexOf(encodeURIComponent("/dp/")))&&-1!==a.indexOf("amazon.")||(-1!==a.indexOf("/gp/")||a.indexOf(encodeURIComponent("/gp/")))&&-1!==a.indexOf("amazon.")||-1!=a.indexOf("/amzn.")||-1!=a.indexOf("/www.amzn.")||-1!=a.indexOf(".amazon-adsystem.com"))&&e.elements.push({e:t,s:i.selector_element,a:i.selector_attribute,h:a})}})}}for(let t=0;t0)for(var i=0;i0)for(var i=0;i0)for(let t in e.optional_placement_positions)if(null!==(s=document.querySelector(e.optional_placement_positions[t])))break;if(null!==s){var o=t.indexOf("q=");if(-1!==o){var l=t.indexOf("&p=");if(-1!==l)var d=t.substring(o+2,l);else var d=t.substring(o+2);d.length>0&&(d=decodeURIComponent(d).replace("/c/","/i/")+a.replace(i[0],decodeURIComponent(i[0])).replace(i[1],decodeURIComponent(i[1])),r.innerHTML+="")}s.appendChild(r),this._recordDirectDealsImp(e,f)}else if("undefined"!=typeof Storage){var p,c="fr_log_"+Math.round((new Date).getTime()/1e3),_={},h=this._frClient._getLogInfomration(_);h.url=window.location.href,h.message="cannot place ad on page.",localStorage.setItem(c,JSON.stringify(h))}}else if("text"==e.ad_unit){let i=document.getElementsByTagName("body")[0].innerHTML;var u=new RegExp(e.keywords,"i");i=i.replace(u,''+e.keywords+""),document.getElementsByTagName("body")[0].innerHTML=i,this._recordDirectDealsImp(e,f)}}catch(e){this._frClient._debug(e)}}_recordDirectDealsImp(e,t){let i=this._frClient._paramsBuffer;if(i.client_time=(new Date).toISOString(),i.page_title=document.title,i.iid=t,i.event_type="impression",void 0===i.customer_id){i.cidp1=i.customer_id=this._frClient._customerId;const e=this._frClient._paramsBuffer.customer_id.split("_");if(-1!==i.customer_id.indexOf("_")){const e=i.customer_id.split("_");if(e.length>2){let t=e.slice(0,e.length-1);i.cidp1=t.join("_"),i.cidp2=e[e.length-1]}}}i.source=location.href;var a={};a.campaign_id=e.campaign_id,a.offer_id=e.offer_id,a.ad_unit=e.ad_unit,a.agent=navigator.userAgent,i.ad=a;var r=JSON.stringify(i),n=trx.LZString.compressToEncodedURIComponent(r);this._frClient._debug("Meta "+r.length+" bytes decresed to "+n.length+" bytes ("+Math.round(100*n.length/r.length)+" %)");var s=this._frClient._envSettings.events_recording_iid+"/i/c/i.png?q="+n;if(this._frClient.pixel_append(s),s.length>=8e3&&"undefined"!=typeof Storage){var o,l="fr_log_"+Math.round((new Date).getTime()/1e3),d={},p=this._frClient._getLogInfomration(d);p.url=window.location.href,p.message="pixel too big "+s.length,localStorage.setItem(l,JSON.stringify(p))}}_applyPerPageLogic(e,t){if(void 0!==e.replace&&void 0!==e.replace.amazon||void 0!==e.all&&void 0!==e.all.amazon||void 0!==e.add&&void 0!==e.add.amazon){let p=0,c=0,_=0,h=0;var i={};for(var a in void 0!==e.all&&(e.all=this._perPageCleanParams(e.all)),void 0!==e.replace&&(e.replace=this._perPageCleanParams(e.replace)),void 0!==e.add&&(e.add=this._perPageCleanParams(e.add)),t)for(var r in t[a]){if("elements"===a){let i="amazon",o=t[a][r],l=o.h,d=o.e.getAttribute("data-orig-url"),h=!1;if(this._isEmpty(d)||(l=d,d.toLowerCase()==o.h.toLowerCase()&&(h=!0)),o.e.hasAttribute("data-spot-replaced")&&!1===h)continue;d=o.h;let u=this._pageId;null==u&&(u="");let f=this._frClient.parseQueryString(d),g="",m=Object.keys(e.all[i]);this._isEmpty(f[m])||(g=f[m]);let v=this._frClient._detectKnownAffiliateLink(o.h,{});var n=!1;if(void 0!==e.all&&void 0!==e.all[i]&&(n=this._perPageReplaceParamsForElement(o.e,o.h,o.a,e.all[i],n)),void 0!==e.replace&&void 0!==e.replace[i]&&(n=this._perPageReplaceParamsForElement(o.e,o.h,o.a,e.replace[i],n)),!0===s||!0===n){if(!o.e.hasAttribute("data-xid")){let e=this._frClient._generateUUID();o.e.setAttribute("data-xid",e)}o.e.setAttribute("data-orig-url",d),o.e.setAttribute("data-spot-replaced","1")}if(!1===n&&!1===s)continue;let C={orig_url:d,url:o.e.getAttribute(o.a)};this._reportEnabled&&this._report.links.push(C);let y={network:v,anchor:o.e,info:C};this._clickRebind(y),p+=1,!0===n&&(_+=1),!0===s&&(c+=1);continue}let i=t[a][r];void 0!==e.sl&&void 0!==i.href&&void 0!==e.sl&&void 0!==e.sl[i.href]&&(i.setAttribute("data-orig-url",i.href),i.href=e.sl[i],h+=1);let u=i.href,f="";i.hasAttribute("data-href")&&(f=i.getAttribute("data-href"));let g=i.getAttribute("data-orig-url"),m=!1;if(this._isEmpty(g)||(u=g,g.toLowerCase()==i.href.toLowerCase()&&(m=!0)),i.hasAttribute("data-spot-replaced")&&!1===m)continue;g=u;let v=this._pageId;null==v&&(v="");let C=this._frClient.parseQueryString(g),y="",b=Object.keys(e.all[a]);this._isEmpty(C[b])||(y=C[b]);let k=this._frClient._detectKnownAffiliateLink(i.href,{});var n=!1;void 0!==e.all&&void 0!==e.all[a]&&(n=this._perPageReplaceParams(i,e.all[a],n,f)),void 0!==e.replace&&void 0!==e.replace[a]&&(n=this._perPageReplaceParams(i,e.replace[a],n,f));var s=!1;if(!1===n){if(-1!==u.indexOf("/dp/")||-1!==u.indexOf("/gp/")||-1!==u.indexOf(encodeURIComponent("/dp/"))||-1!==u.indexOf(encodeURIComponent("/gp/"))||-1!==f.indexOf("/dp/")||-1!==f.indexOf("/gp/")||-1!==f.indexOf(encodeURIComponent("/dp/"))||-1!==f.indexOf(encodeURIComponent("/gp/"))){""!==k&&null!==k||(k="amazon");var o=!1;-1===u.indexOf(encodeURIComponent("/dp/"))&&-1===u.indexOf(encodeURIComponent("/gp/"))||(o=!0),void 0!==e.all&&(s=this._perPageAppendParams(i,e.all[a],s,o,f)),void 0!==e.add&&(s=this._perPageAppendParams(i,e.add[a],s,o,f))}-1!==u.indexOf("outtra.com")&&(k="outtra.com",void 0!==e.all&&(s=this._perPageAppendParams(i,e.all[a],s,o)),void 0!==e.add&&(s=this._perPageAppendParams(i,e.add[a],s,o)))}if(!0===s||!0===n){if(!i.hasAttribute("data-xid")){let e=this._frClient._generateUUID();i.setAttribute("data-xid",e)}i.setAttribute("data-orig-url",g),i.setAttribute("data-spot-replaced","1")}if(!1===n&&!1===s)continue;var l={20:"United States"};if("ge"==k&&void 0!==e.all&&void 0!==e.all.amazon.tag&&void 0!==window.permutive&&void 0!==permutive.context&&void 0!==permutive.context.country){var d=e.all.amazon.tag.split("-");if(d.length>0&&-1!==l[d[d.length-1]]&&l[d[d.length-1]]==permutive.context.country&&(i.href=i.href.replace(/(TSID=[\d]*&)/,""),!i.hasAttribute("data-xid"))){let e=this._frClient._generateUUID();i.setAttribute("data-xid",e)}}let x={orig_url:g,url:i.href};this._reportEnabled&&this._report.links.push(x);let A={network:k,anchor:i,info:x};this._clickRebind(A),p+=1,!0===n&&(_+=1),!0===s&&(c+=1)}p>0&&this._frClient._runFeatures(),this._logActivity(`Action applied for rule per page '${p}' , switched tag '${_}', reattributed '${c}', short links opend '${h}' `)}}_perPageCleanParams(e){for(var t in e)for(var i in e[t])"string"==typeof e[t][i]&&(e[t][i]=e[t][i].trim());return e}_perPageReplaceParamsForElement(e,t,i,a,r){for(var n in a){var s=new RegExp("(\\%26|\\%3F|\\&|\\?)("+n+"=|"+n+"\\%3D)([^\\&|\\%])+","g");t.search(s)>=0&&!1===r&&(r=!0,t=t.replace(s,"$1$2"+a[n]),e.setAttribute(i,t))}return r}_perPageReplaceParams(e,t,i,a){for(var r in t){var n=new RegExp("(\\%26|\\%3F|\\&|\\?)("+r+"=|"+r+"\\%3D)([^\\&|\\%])+","g");e.href.search(n)>=0&&!1===i&&(i=!0,e.href=e.href.replace(n,"$1$2"+t[r])),void 0!==a&&""!==a&&a.search(n)>=0&&(i=!0,a=a.replace(n,"$1$2"+t[r]),e.setAttribute("data-href",a))}return i}_perPageAppendParams(e,t,i,a,r){for(var n in t){let s=new RegExp("(\\&|\\?)("+n+"=)[^\\&]]+","g");if(!1===s.test(e.href)&&!1===i&&(i=!0,e.href=!0===a?this._frClient._appendNameValueToUrl(e.href,"",t[n],n,!1,"amazon","",a):this._frClient._appendNameValueToUrl(e.href,"",t[n],n,!1,"amazon",""),void 0!==r&&""!==r&&!1===s.test(r))){let i=!1;-1===r.indexOf(encodeURIComponent("/dp/"))&&-1===r.indexOf(encodeURIComponent("/gp/"))||(i=!0),!0===i?(r=this._frClient._appendNameValueToUrl(r,"",t[n],n,!1,"amazon","",i),e.setAttribute("data-href",r)):(r=this._frClient._appendNameValueToUrl(r,"",t[n],n,!1,"amazon",""),e.setAttribute("data-href",r))}}return i}_applyASINRules(){for(let e of Object.keys(this._dataset.asin)){let t=this._dataset.asin[e];if(void 0!==this._asinRules[e]){let i=0;for(let a in t){let r=t[a],n=r.href,s=r.getAttribute("data-orig-url");this._isEmpty(s)||(n=s),s=n,r.setAttribute("data-orig-url",s),r.setAttribute("data-spot-replaced",this._asinRules[e]),r.href=this._asinRules[e];let o=this._pageId;null==o&&(o="");let l=this._frClient.parseQueryString(s),d="";this._isEmpty(l.tag)||(d=l.tag);let p={"{tag}":d,"{asin}":e,"{page_id}":o},c=this._generateGenricRID(p,"fr{ts}_{asin}_{page_id}_{c1}{c2}{c3}_{tag}"),_=this._frClient._detectKnownAffiliateLink(r.href,{});r.href=this._frClient._appendExtraParam(_,r.href,"rid",c,!1),r.setAttribute("data-spot-rid",c);let h={rule_id:e,orig_url:s,url:r.href};this._reportEnabled&&this._report.links.push(h);let u={network:_,anchor:r,info:h};this._clickRebind(u),i+=1}this._logActivity(`Action applied for rule asin '${e}'`)}}}_clickRebind(e){if(e.anchor.hasAttribute("data-skimlinks-tracking")){let t=e.anchor.cloneNode(!0);null!==e.anchor.parentNode&&(e.anchor.parentNode.replaceChild(t,e.anchor),e.anchor=t)}null!=e.anchor.click_fn&&"function"==typeof e.anchor.click_fn&&e.anchor.removeEventListener("click",e.anchor.click_fn);let t=this._frClient._linkClicked.bind(this._frClient,e);e.anchor.addEventListener("click",t),e.anchor.click_fn=t,null!=e.anchor.contextmenu_fn&&"function"==typeof e.anchor.contextmenu_fn&&e.anchor.removeEventListener("contextmenu",e.anchor.contextmenu_fn);let i=this._frClient._linkClicked.bind(this._frClient,e);e.anchor.addEventListener("contextmenu",i),e.anchor.contextmenu_fn=i}_applyLinkRules(){let e={};for(let i of Object.keys(this._actionLinks)){let a=this._actionLinks[i],r=a.actions;if(null==r){console.warn(`Rule's page actions with old format was found and ignored. Save the rule with Id: ${i} to update actions data.`);continue}let n=0,s=0;null!=a.start_date&&(n=parseInt(a.start_date),Number.isNaN(n)&&(n=0)),null!=a.end_date&&(s=parseInt(a.end_date),Number.isNaN(s)&&(s=0));let o=null!=this._refDate&&this._refDate>0?this._refDate:Math.round(Date.now()/1e3);if(n>0&&o0&&o>s)this._logActivity(`Action found for rule '${i}' but rule's end date passed. Rule action ignored.`);else for(let a of Object.keys(r))if(null==e[a]){let n=r[a],s=this._findAnchorByUri(n.uri);if(null!=s)for(var t=0;t0&&(t+="&");let a=e[i];t+=i+"="+encodeURIComponent(a)}return t}_processLink(e,t,i){let a=t.href;if(t.hasAttribute("data-skimlinks-tracking")){let e=t.cloneNode(!0);if(null!==t.parentNode){t.parentNode.replaceChild(e,t),t=e;let r,n,s={network:this._frClient._detectKnownAffiliateLink(t.href,{}),anchor:t,info:{rule_id:i,orig_url:a,url:t.href}},o=this._frClient._linkClicked.bind(this._frClient,s);t.addEventListener("click",o)}}t.setAttribute("data-orig-url",a),t.setAttribute("data-spot-replaced",""),t.href=e.url,this._appendRID(t,e,i);let r={rule_id:i,orig_url:a,url:e.url};this._reportEnabled&&this._report.links.push(r)}_findAnchorByUri(e,t){return void 0!==this._dataset.uri[e]&&(void 0===t&&(t=0),this._dataset.uri[e])?this._dataset.uri[e]:null}_prepareAnchorURI(){let e={};for(let i=0;i.3*document.body.clientWidth)break}return a}decodeHtmlSpecialChars(e){const t={"&":"&","<":"<",">":">",""":'"',"'":"'"};return e.replace(/(&|<|>|"|')/g,function(e){return t[e]})}_appendRID(e,t,i){let a=this._frClient._detectKnownAffiliateLink(e.href,{});a||(a="");let r=this._generateRID(t,i);e.href=this._frClient._appendExtraParam(a,e.href,"rid",r,!1),e.setAttribute("data-spot-rid",r)}_generateRID(e,t){const i=Date.now(),a=String.fromCharCode(Math.floor(10*Math.random()+97)),r=String.fromCharCode(Math.floor(10*Math.random()+97)),n=String.fromCharCode(Math.floor(10*Math.random()+97));return`fr${i}_${t}_${e.link_id}_${a}${r}${n}`}_generateGenricRID(e,t){const i=Date.now(),a=String.fromCharCode(Math.floor(10*Math.random()+97)),r=String.fromCharCode(Math.floor(10*Math.random()+97)),n=String.fromCharCode(Math.floor(10*Math.random()+97));void 0===t&&(t="fr{ts}_{ruleId}_{link_id}_{c1}{c2}{c3}");let s=t.replace("{ts}",i).replace("{c1}",a).replace("{c2}",r).replace("{c3}",n);for(let t in e)s=s.replace(t,e[t]);return s}_logActivity(e){null!=window.trxdebug&&console.log(e),this._reportEnabled&&this.report.activity.push("I::"+e)}_logError(e){console.error(e),this._reportEnabled&&this.report.activity.push("E::"+e)}_logWarning(e){console.warn(e),this._reportEnabled&&this.report.activity.push("E::"+e)}};}(); //@formatter:off trx.run_md5 = !function(n){"use strict";function d(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function f(n,t,r,e,o,u){return d(function(n,t){return n<>>32-t}(d(d(t,n),d(e,u)),o),r)}function l(n,t,r,e,o,u,c){return f(t&r|~t&e,n,t,o,u,c)}function g(n,t,r,e,o,u,c){return f(t&e|r&~e,n,t,o,u,c)}function v(n,t,r,e,o,u,c){return f(t^r^e,n,t,o,u,c)}function m(n,t,r,e,o,u,c){return f(r^(t|~e),n,t,o,u,c)}function i(n,t){var r,e,o,u,c;n[t>>5]|=128<>>9<<4)]=t;var f=1732584193,i=-271733879,a=-1732584194,h=271733878;for(r=0;r>5]>>>t%32&255);return r}function h(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<>>4&15)+e.charAt(15&t);return o}function r(n){return unescape(encodeURIComponent(n))}function o(n){return function(n){return a(i(h(n),8*n.length))}(r(n))}function u(n,t){return function(n,t){var r,e,o=h(n),u=[],c=[];for(u[15]=c[15]=void 0,16