/* This software Connector and its source code are the property of Contxtful Technologies Inc. Use of this script is Subject to the terms and conditions of the License Agreement. As a subscriber, you agree that you are solely responsible for providing all appropriate and legally required disclosures pertaining to the use and removal of the Connector(s) and obtain any legally required consents as needed, and you agree that it will defend, indemnify and hold Contxtful Technologies Inc. harmless from and against any and all third-party claims stemming from or related to the use of Tags as provided herein. */ var Contxtful=new __contxtful__; function __contxtful__(){function wa(a,b){b="https://ad.doubleclick.net/ddm/activity/src="+B.fld;b=b+";type="+B.type;b+=";cat=";target1=";dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;gdpr=;gdpr_consent=;ord=1?";let c=b+B.cat1+target1;if(!ea)try{xa("GET",c,!0).send()}catch(d){console.log("Contxtful.Api log:",d)}if(33g;g++){var l=f&255;k[n++]=l;f=(f-l)/256}}function d(f){if("undefined"!==typeof f&&f.length)for(var g=0;g{delete C[b]})}function rb(a,b){return X()?-1!=["TRIGGER","MANUAL","FIRST"].indexOf(a)||-1!= ["TRAFFIC"].indexOf(a)&&!b:!0}function q({CtxtEvent:a="NONE",autopost:b=!1,async:c=!0,noRawData:d=!1,dataSize:e=0}){var k,n,f,g,l,t,p,r;if(1!=q.stop&&rb(a,d)){h.Acq="Y";1==Ca&&"TRIGGER"!=a&&"FIRST"!=a&&(h.Acq="N");"undefined"==typeof q.counter&&(q.counter=0);if(1==sb)if(q.counter==ia-1){if(Z(),"STOP"!=a){q.stop=!0;return}}else if(q.counter>=ia)return;1==Xa&&(-1!==["FIRST","STOP","TRIGGER","MANUAL"].indexOf(a)||5>q.counter||1==Ya?mb():C={});C.ctxtpc=q.counter;h.postCount=q.counter;1==b&&setTimeout(function(){q({autopost:b, noRawData:d,async:c})},250);h.tBrowser=fa();h.other=Y(C);h.uField=Y(ja);h.cParam=Y(ka);var u=1E3*((new Date).getTime()-I);if(u<2E3*D||1==d){var la=0;h.ctxtReq=Y(Za);h.eDesc="WEB_"+a+"_POST";0==q.counter?h.key=ha+"_STATS":"RUNTIME"===a?h.eDesc="WEB_RUNTIME":"RUNTIME"!==a&&"FIRST_POST"!==a&&"TRAFFIC"!==a&&m!=y&&(u=u*y/m);h.url="";h.originUrl="";h.uaStr="";if("FIRST"==a||"STOP"==a||5>q.counter||1==Ya)h.url=window.location.href,h.originUrl=document.referrer,h.uaStr="NaN";for(var z in h)h[z]=encodeURIComponent(h[z]); if(0==d){h.key="TRAFFIC"==a||"MANUAL"==a?ha+"_"+a:ha+"_STATS";z=function(tb){return 0!=tb};var w;var A=0;if(P.some(z)||aa.some(z)||ba.some(z)){G.sensorsWorking=!0;var Q=1}else G.sensorsWorking=!1,Q=0;z=ma.some(z)||na.some(z)||oa.some(z)?1:0;for(w=A=0;wub?!0:!1:A>vb?!0:!1;w=z&Q;A=3*(Q+z+w);1==R&&0==Xa&&Z();var S=e;if("TRIGGER"==a||"MANUAL"==a)S=y;la="undefined"!==typeof K&&0c;c++)e=a&255,a>>=8,b[c]=e;a=Va(b,d);"undefined"!==typeof a&& M(a);return a}}function J(a,b,c,d=-1){-1!=d?c.AddFloat32Array(a.slice(b,d)):(b!=y&&c.AddFloat32Array(a.slice(b,y)),0!=b&&(b>y&&(b=y),c.AddFloat32Array(a.slice(0,b))))}function xb(){ca>D&&(I+=ca-D);q({async:U,CtxtEvent:"RUNTIME",dataSize:0});I=(new Date).getTime();q.counter>=Ia&&(clearInterval(N),N=null,q({noRawData:!0,async:!0,CtxtEvent:"STOP"}))}function Ja(){V=!0;null===N&&1==T&&(I=(new Date).getTime(),fa(),ClearDiscreteEvents(),100>ra&&!Ua(ra)||(Ca=!1,N=setInterval(xb,ca)))}function Ka(a){!1!== sa&&(clearTimeout(sa),sa=!1);0==m&&(I=(new Date).getTime(),fa(),1==T&&ClearDiscreteEvents());null==a.acceleration.x&&null==a.acceleration.y&&null==a.acceleration.z&&L&&(wa(Math.floor(100*Math.random()),"handleMotionEvent"),L=!1);null==a.acceleration.x&&null==a.acceleration.y&&null==a.acceleration.z&&1==T?Ja():V=!1;var b=La?-1:1;null!=a.accelerationIncludingGravity?(P[m]=b*a.accelerationIncludingGravity.x,aa[m]=b*a.accelerationIncludingGravity.y,ba[m]=b*a.accelerationIncludingGravity.z):(P[m]=0,aa[m]= 0,ba[m]=0);null!=a.acceleration?(Da[m]=b*a.acceleration.x,Ea[m]=b*a.acceleration.y,Fa[m]=b*a.acceleration.z):(Da[m]=0,Ea[m]=0,Fa[m]=0);null!=a.rotationRate?(ma[m]=a.rotationRate.alpha*Ma,na[m]=a.rotationRate.beta*Ma,oa[m]=a.rotationRate.gamma*Ma):(ma[m]=0,na[m]=0,oa[m]=0);a=(new Date).getTime()-I;"undefined"===typeof W||isNaN(W)||(D=1E3*W);a>D/2&&(y=ab(m,D/a),Na=!0);m+=1;1==R&&a>yb&&(a=y,y=m,V=!1,q({async:U,CtxtEvent:"TRAFFIC",dataSize:m}),y=a,R=!1);1==Na&&m>=y&&(0==bb&&(q({async:U,CtxtEvent:"RUNTIME", dataSize:y}),Oa=(new Date).getTime()),I-Oa>=ca&&(q({async:U,CtxtEvent:"RUNTIME",dataSize:y}),Oa=I),bb+=1,m=0,Na=!1)}function ab(a,b,c=!0){a=Math.round(a*b);if(c){c=1;if(!a||a&a-1)for(;c>=1;)d<<=1;b=d}a=c-aH&&(a=H);return a}function cb(a="FIRST"){G.sampling=!0;if("undefined"!=typeof Dfp)if(Dfp.setReceptivity()){if("legacy"===O||ya())R=!1}else"undefined"===typeof contxtful_config&&db(),ya()&&(ta=1);"undefined"!==typeof screen&&(C.w=screen.width, C.y=screen.height,C.z=window.devicePixelRatio);pb(a);m=0;if("DeviceMotionEvent"in window)try{La&&Ja(),window.addEventListener("devicemotion",Ka,!1),L&&(sa=setTimeout(Z,1E3)),setTimeout(window.removeEventListener,18E5,"devicemotion",Ka)}catch(b){console.log("Contxtful.Api.log:",b)}else Ja();1==T&&startScreenSensors()}function Z(){L&&(wa(Math.floor(100*Math.random()),"Stop"),L=!1);G.sampling&&(G.sampling=!1,q({noRawData:!0,async:!0,CtxtEvent:"STOP"}),window.removeEventListener("devicemotion",Ka),1== T&&stopScreenSensors(),null!=N&&(clearInterval(N),N=null),null!=eb&&(clearInterval(eb),V=!1))}function db(){if("undefined"!=typeof Dfp)try{Dfp.callbackInjection("-1",Dfp.getLookAlike())?X()||(ob(),za(JSON.stringify(Dfp.getLookAlike()))):fb()}catch(a){fb()}}function fb(){gb++;2>=gb&&setTimeout(function(){db()},500)}var G={cicalls:[],ptim:[],clc:0,sicalls:[]},F=document.currentScript.getAttribute("src");try{var ea="true"===(E(F).dry||!1);ea&&console.log("Running in dry mode")}catch(a){console.log(a), ea=!1}var L=!1,B={fld:"",type:"",cat1:"",cat2:""};if(L)try{B.fld=E(F).fld||"",B.type=E(F).type||"",B.cat1=E(F).cat1||"",B.cat2=E(F).cat2||""}catch(a){console.log(a),B.fld="",B.type="",B.cat1="",B.cat2=""}var D=1E3,y=ab(32*D/1E3,2),h={},Za={},ja={},C={},ka={},I=0,wb=-1,ua="Y",Pa=0,W=1,da=100,Ga="cracq",Ha="ctxtfl.com",qa="ctxtfl.com";Ha=x("PostDomain",Ha)+"/";qa=x("PostDomain",qa)+"/";Ga=x("PostPath",Ga);var sb=!0,ia=5,ra=0,Ia=5,O="legacy",hb=!0;Ia=x("DesktopMaxPost",Ia);ra=x("DesktopPercentage", ra);hb=x("DesktopEnabled",hb);O=x("CertificationMode",O);"undefined"!=typeof contxtful_config&&contxtful_config.hasOwnProperty("manual")&&1==contxtful_config.manual&&(O="high-precision");var U=!0,R=!1,ta=0,Xa=!0,vb=16,ub=4,ha=function(){var a="undefined"!=typeof contxtful_config?contxtful_config.tag_id:E(F).id;if(20b;b++){var d=c[b].charCodeAt();if(d<"0".charCodeAt()||d>"9".charCodeAt()&& d<"A".charCodeAt()||d>"Z".charCodeAt()&&d<"a".charCodeAt()||d>"z".charCodeAt()){b=!1;break b}}b=!0}if(b){b="";for(d=0;d4*d-3?d=0:(d=Math.floor(4*d-3),100Ra?!Ua(Ra):!1,T=!1,sa=!1;G.sampling=!1;ca=zb;var P=new Float32Array(H),aa=new Float32Array(H),ba=new Float32Array(H),Da=new Float32Array(H),Ea=new Float32Array(H),Fa=new Float32Array(H),ma=new Float32Array(H),na=new Float32Array(H),oa=new Float32Array(H),m=0;h.uaStr="NaN";h.screenW="NaN";h.screenH="NaN";h.color="NaN";h.dpi="NaN";h.ctxtReq=Y(Za);h.lang="NaN";var La=null,N=null,v=new function(){return{SetId:function(a){this.userId=a},GetId:function(){return this.userId},SetUserField:function(a, b){ja[a]=b},ClearUserField:function(){ja={}},GetUserField:function(a){return ja[a]},SetCampaignParam:function(a,b){ka[a]=b},ClearCampaignParam:function(){ka={}},GetCampaignParam:function(a){return ka[a]},SetReceptivity:function(){X()?v.GetManualReceptivity():"undefined"!=typeof Dfp&&Dfp.setReceptivity()},GetReceptivity:function(){return X()?(Ta(),!1):"undefined"!=typeof Dfp?Dfp.setReceptivity({RETURN:!0}):!1},TriggerEvent:function(a){var b="no_Valid_parameter";if("string"===typeof a||"object"===typeof a)b= a;C.Trigger=b;q({CtxtEvent:"TRIGGER",async:U,dataSize:m});C={}},GetManualReceptivity:function(){X()?V?Getlookalike():q({CtxtEvent:"MANUAL",async:U,dataSize:m}):Ta()}}};v.Results={"Attention Level":{Confidence:"Contact Contxtful",State:"Contact Contxtful"},"Device Movement":{Confidence:"Contact Contxtful",State:"Contact Contxtful"},"Holding In Hand":{Confidence:"Contact Contxtful",State:"Contact Contxtful"}};v.Modules={attention:{Level:"Contact Contxtful",State:"Contact Contxtful"},humanity:{Level:"Contact Contxtful", State:"Contact Contxtful"},movement:{Level:"Contact Contxtful",State:"Contact Contxtful"}};v.Data={Att:{Lv:"Contact Contxtful",St:"Contact Contxtful"},InHand:{Lv:"Contact Contxtful",St:"Contact Contxtful"},Mvt:{Lv:"Contact Contxtful",St:"Contact Contxtful"}};v.Response="Contact Contxtful";v.userId="Contact Contxtful";v.Recep="Contact Contxtful";var va=new function(){function a(c,d){var e="Other";/Linux/.test(c)&&(e="Linux");/Windows/.test(c)&&(e="Windows");/Macintosh/.test(c)&&(e="Mac OS X");/iPad/.test(c)&& !/HiPad/.test(c)&&(e="iOS");/iPhone/.test(c)&&(e="iOS");/Android/.test(c)&&(e="Android");/CrOS/.test(c)&&(e="Chrome OS");d&&(/Windows Phone/.test(c)&&(e="Windows Phone"),/Ubuntu/.test(c)&&(e="Ubuntu"),/Fedora/.test(c)&&(e="Fedora"),/Tizen/.test(c)&&(e="Tizen"),/CrKey/.test(c)&&(e="Chromecast"),/FreeBSD/.test(c)&&(e="FreeBSD"),/OpenBSD/.test(c)&&(e="OpenBSD"),/\(BB10;/.test(c)&&(e="BlackBerry OS"),/Web0S/.test(c)&&(e="Web0S"));return e}function b(c,d){var e=a(c,d);e=/Mac OS X|Linux|Windows|Chrome OS|Ubuntu|Fedora|Chromecast|OpenBSD/.test(e); d&&/NetCast|Fuchsia|Andr0id|Android/.test(c)&&(e=!1);return e}return{isMobile:function(c=!0){let d=navigator.userAgent;var e;if(!(e=b(d,c))){let k=/Other|Tizen|OpenBSD|FreeBSD|Web0S/;e=!0;if(/Mobile /.test(d)||k.test(a(d,c))||b(c))e=!1;/iPhone/.test(d)&&(e=!1);/iPad/.test(d)&&(e=!0);c&&(/Mobile Midori|Mobile DuckDuckGo|Mobile Iron/.test(d)&&(e=!0),/NetCast|Fuchsia|Andr0id|; rv:/.test(d)&&(e=!1),/Silk|ARM/.test(d)&&(e=!0),/Quest/.test(d)&&/Mobile/.test(d)&&(e=!0),/\(Linux; Android\)/.test(d)&&(e=!1), / zh-cn;/.test(d)&&(e=!0))}return e||/http/.test(d)?!1:!0},isApple:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh|Mac OS/.test(navigator.userAgent)}}};G.isMobile=va.isMobile();h.userIdInternal="f5482b8b22c2dc3c";"undefined"!=typeof contxtful_config?(h.userIdInternal=kb(),h.userIdClient=contxtful_config.userIdClient):h.userIdClient=E(F).userId;v.userId=h.userIdInternal;h.dataSampled="Y";"undefined"!==typeof va&&"object"==typeof va&&(La=va.isApple());Qa&&cb();var ib= D;"undefined"!=typeof contxtful_config&&(ib=0);"undefined"!==typeof lookalikeReceptive&&"function"==typeof lookalikeReceptive&&setTimeout(function(){V&&lookalikeReceptive()},ib);return{tests:G,Api:v,Start:cb,Stop:Z}}; // CreationDate:07-03-2023-13:38:00