(function(){var i=window,v="//ads.pubmatic.com/AdServer/js/user_sync.html?kdntuid=1&SPug=true",a=function(H){return typeof H==="function"},B=console.log.bind(console,"PubMatic:"),n=function(L,K){var I=0,H=L.length,J=false;for(;I((new Date()).getTime()-(24*60*60*1000))){J.c=H.c;J.g=H.g}else{}}}}return J},f=function(I){var H;if(!k){return}try{H=i.localStorage.getItem(d)}catch(J){}if(H&&typeof H==="string"&&H!=="null"){try{H=JSON.parse(H)}catch(J){H={}}if(H.hasOwnProperty(I)){delete H[I];try{i.localStorage.setItem(d,JSON.stringify(H))}catch(J){}}}},w=function(){return t},e=function(J,K){var H=1;function Q(){var R={};function S(){if(R.usPrivacy){J(R)}else{}}return{consentDataCallback:function(T,U){if(U&&T.uspString){R.usPrivacy=T.uspString}S()}}}var I=Q();var P={};try{window.__uspapi("getUSPData",H,I.consentDataCallback)}catch(O){var N=window;var M;while(!M){try{if(N.frames.__uspapiLocator){M=N}}catch(O){}if(N===window.top){break}N=N.parent}if(!M){return K("USP CMP not found.")}L("getUSPData",M,I.consentDataCallback)}function L(T,S,V){window.__uspapi=function(Y,W,aa){var X=Math.random()+"";var Z={__uspapiCall:{command:Y,version:W,callId:X}};P[X]=aa;S.postMessage(Z,"*")};window.addEventListener("message",R,false);window.__uspapi(T,H,U);function R(X){var W=X&&X.data&&X.data.__uspapiReturn;if(W&&W.callId){if(typeof P[W.callId]!=="undefined"){P[W.callId](W.returnValue,W.success);delete P[W.callId]}}}function U(W,X){window.removeEventListener("message",R,false);V(W,X)}}},h=function(I,K){function J(M){var L=!!(M&&M.usPrivacy);if(!L){return}j(I,"c",M.usPrivacy);if(K){K("USP")}}function H(){if(K){K("USP")}}e(J,H);setTimeout(function(){H("USP: Failed to retrieve user consent data from CMP, failure callback calling..")},100)},j=function(K,H,J){var I;if(!k){return}try{I=i.localStorage.getItem(l)}catch(L){}if(I&&typeof I==="string"&&I!=="null"){try{I=JSON.parse(I)}catch(L){I={}}}else{I={}}if(I){if(!I.hasOwnProperty(K)){I[K]={}}I[K].t=(new Date()).getTime();I[K][H]=J}try{i.localStorage.setItem(l,JSON.stringify(I))}catch(L){}},r=function(K){var J={c:""};if(!k){return J}var I;try{I=i.localStorage.getItem(l)}catch(L){}if(I&&typeof I==="string"&&I!=="null"){try{I=JSON.parse(I)}catch(L){I={}}if(I.hasOwnProperty(K)){var H=I[K];if(H&&H.c&&H.t){if(H.t&&parseInt(H.t)>((new Date()).getTime()-(24*60*60*1000))){J.c=H.c}else{}}}}return J},G=function(){return["sectionChange","signalStatus"]},z=function(H){if(H&&H.signalStatus==="ready"){return true}else{return false}},c=function(H,I){var O="__gpp";var N={};function J(R,S){if(!S){I(R,S)}else{if(R&&z(R.pingData)&&G().includes(R.eventName)){H(R.pingData,S)}}}function P(){window[O]("addEventListener",J)}if(window[O]){if(typeof window[O]==="function"){P()}else{setTimeout(function(){if(typeof window[O]==="function"){P()}},500)}}else{if(window!==top){var L=window;var Q;while(!Q){try{if(L.frames.__gppLocator){Q=L}}catch(M){}if(L===window.top){break}L=L.parent}K("addEventListener",Q,J)}else{setTimeout(function(){if(typeof window[O]==="function"){P()}},500)}}function K(T,V,W){window.__gpp=function(aa,ac,X,Y){if(!V){U();return I({msg:"GPP: CMP not found"},false)}var Z=Math.random()+"";var ab={__gppCall:{command:aa,parameter:X,version:Y,callId:Z}};N[Z]=ac;V.postMessage(ab,"*")};window.addEventListener("message",S,false);window.__gpp(T,R,null,"1.1");function S(Y){var X={};try{X=(typeof Y.data==="string")?JSON.parse(Y.data):Y.data}catch(aa){}if(X&&X.__gppReturn&&X.__gppReturn.callId){var Z=X.__gppReturn;if(typeof N[Z.callId]==="function"){N[Z.callId](Z.returnValue,Z.success);N[Z.callId]=null}}}function U(){window.removeEventListener("message",S,false)}function R(X,Y){U();W(X,Y)}}},b=function(L,P){var I=76;var H=false;function K(Q){if(!Q){return Q}return Q.reduceRight(function(R,S){return Object.assign(S,R)},{})}function J(R,Q){return R.reduce(function(T,S){return(T&&T[S]!==undefined)?T[S]:undefined},Q)}function N(Q){if(Q&&Q.VendorConsent&&Q.VendorConsent.length&&Q.VendorConsent.includes(I)){return true}else{return false}}function O(S){if(S&&S.gppString){var R=S.applicableSections;if(R&&R.length&&R.indexOf(2)!==-1){var Q=K(J(["parsedSections","tcfeuv2"],S));if(N(Q)){y(L,"GPP",S.gppString,S.applicableSections)}else{u(L)}}else{y(L,"GPP",S.gppString,S.applicableSections)}}if(P&&!H){H=true;P("GPP")}}function M(){if(H){return}if(P){H=true;P("GPP")}}c(O,M);setTimeout(function(){M("GPP: Failed to retrieve user consent data from CMP, failure callback calling..")},500)},m=function(H){var I={consentKey:"c",additionalKey:"g"};if(H==="GPP"){I.consentKey="gpp";I.additionalKey="gpp_sid"}return I},y=function(M,H,L,I){var J;var K=m(H);if(!k){return}try{J=i.localStorage.getItem(q)}catch(N){}if(J&&typeof J==="string"&&J!=="null"){try{J=JSON.parse(J)}catch(N){J={}}}else{J={}}if(J){if(!J.hasOwnProperty(M)){J[M]={}}J[M].t=(new Date()).getTime();J[M][K.consentKey]=encodeURIComponent(L);J[M][K.additionalKey]=I}try{i.localStorage.setItem(q,JSON.stringify(J))}catch(N){}},x=function(M,H){var K=m(H);var L={};L[K.consentKey]="";if(!k){return L}var J;try{J=i.localStorage.getItem(q)}catch(N){}if(J&&typeof J==="string"&&J!=="null"){try{J=JSON.parse(J)}catch(N){J={}}if(J.hasOwnProperty(M)){var I=J[M];if(I&&I[K.consentKey]&&I.t){if(I.t&&parseInt(I.t)>((new Date()).getTime()-(24*60*60*1000))){L[K.consentKey]=I[K.consentKey];if(typeof I[K.additionalKey]==="object"&&I[K.additionalKey].length){L[K.additionalKey]=I[K.additionalKey].join(",")}else{L[K.additionalKey]=I[K.additionalKey]}}else{}}}}return L},u=function(I){if(!k){return}var H;try{H=i.localStorage.getItem(q)}catch(J){}if(H&&typeof H==="string"&&H!=="null"){try{H=JSON.parse(H)}catch(J){H={}}if(H.hasOwnProperty(I)){delete H[I];try{i.localStorage.setItem(q,JSON.stringify(H))}catch(J){}}}};i.PubMaticSync=i.PubMaticSync||{};i.PubMaticSync.sync=function(H){var I={};H.delay=H.delay||0;I.p=H.pubId||"";I.s=H.siteId||"";I.predirect=H.url||"";I.userIdMacro=H.macro||"";setTimeout(function(){var L=(i.__cmp||i.__tcfapi)?1:0;F(H.pubId);var M=o(H.pubId);L=(L?L:(H.gdpr?H.gdpr:0));I.gdpr_consent=M&&M.c?M.c:(H.gdprConsent||"");I.gdpr=(M&&typeof M.g==="string")?M.g:(I.gdpr||"0");h(H.pubId);var K=r(H.pubId);I.us_privacy=K&&K.c?K.c:H.us_privacy||"";b(H.pubId);var J=x(H.pubId,"GPP");I.gpp=J&&J.gpp?J.gpp:(H.gpp||"");I.gpp_sid=(J&&J.gpp_sid)?J.gpp_sid:(H.gpp_sid||"");s(p()+v+g(I))},H.delay)}})();