8d00e4343987593afa91865c8407fea36971df89c736d5d70ad6d717d4992d1d

Source Code:

// Hash: KYd5BGGOINGWG7RITKwYjhzaHElslCzyG3W4tct+ZD5oUsDULnMuLUsvaoYDtybbpZecT7acNLTR4+z9eqKkB/rgR1lZ+OmO4xhl/bYyoMeDro9PZKA/Rvmi/xsTvQnzg7IxOsaXlnmdJu5kaF1WYU2Ao+D55TooeamGlZi0JQQ=
!function(){"use strict";var r=(i.prototype.isAdBlocked=function(t){var e=this;this.createPixel(i.allowedPixelUrl,function(){(e.allowedPixelLoaded=!0)===e.blockedPixelFailed&&t(!0)},function(){}),this.createPixel(i.blockedPixelUrl,function(){t(!1)},function(){(e.blockedPixelFailed=!0)===e.allowedPixelLoaded&&t(!0)})},i.prototype.createPixel=function(t,e,i){var r=document.createElement("img");r.src=t,r.height=1,r.width=1,r.style.display="none",r.onload=e,r.onerror=i},i.allowedPixelUrl="https://static.criteo.net/images/pixel.gif?ch=1",i.blockedPixelUrl="https://static.criteo.net/images/pixel.gif?ch=2",i);function i(){this.allowedPixelLoaded=!1,this.blockedPixelFailed=!1}var o=(t.prototype.checkLocalStorage=function(){if(!this.localStorage)return!1;var t=this.CHECK_STORAGE_KEY;try{return this.localStorage.setItem(t,t),this.localStorage.removeItem(t),!0}catch(t){return!1}},t.prototype.removeItem=function(t){this.localStorage.removeItem(t),this.localStorage.removeItem(t+this.EXPIRE_SUFFIX)},t.prototype.getItem=function(t,e){var i=(new Date).getTime(),r=this.localStorage.getItem(t+this.EXPIRE_SUFFIX),o=r?parseInt(r,10):-1;return-1!==o&&o<i||e&&(-1===o||e<o-i)?(this.removeItem(t),null):this.localStorage.getItem(t)},t.prototype.setItem=function(t,e,i){if(this.localStorage.setItem(t,e),i){var r=(new Date).getTime()+i;this.localStorage.setItem(t+this.EXPIRE_SUFFIX,r.toString())}},t.prototype.getAllItemsByPrefix=function(t){var e=[];for(var i in localStorage)0===i.indexOf(t)&&e.push(i);return e},t);function t(t){this.EXPIRE_SUFFIX="_expires",this.CHECK_STORAGE_KEY="criteo_localstorage_check",this.localStorage=function(t){try{return t.localStorage}catch(t){return}}(t||window)}var m=(e.create=function(){return new e},e.prototype.adBlockFlagEnabled=function(){if(!this.localStorageEnabled)return!1;var t=e.ADBLOCK_FLAG_KEY;return null!==this.localStorageHelper.getItem(t)},e.prototype.enableAdBlockFlag=function(){if(this.localStorageEnabled){var t=e.ADBLOCK_FLAG_KEY;this.localStorageHelper.setItem(t,"1",e.ADBLOCK_FLAG_LIFETIME)}},e.prototype.disableAdBlockFlag=function(){if(this.localStorageEnabled){var t=e.ADBLOCK_FLAG_KEY;this.localStorageHelper.removeItem(t)}},e.prototype.setAdBlockFlagTimer=function(t){var e=this;if(!this.adBlockFlagEnabled()&&this.timerEnabled&&!this.timerStarted){var i=new r;this.timerStarted=!0,setTimeout(function(){e.timerEnabled&&i.isAdBlocked(function(t){t?e.enableAdBlockFlag():e.disableAdBlockFlag()}),e.disableAdBlockFlagTimer()},t)}},e.prototype.disableAdBlockFlagTimer=function(){this.timerEnabled=!1},e.ADBLOCK_FLAG_KEY="criteo_adblock_flag",e.ADBLOCK_FLAG_LIFETIME=864e5,e);function e(){this.localStorageHelper=new o,this.localStorageEnabled=this.localStorageHelper.checkLocalStorage(),this.timerEnabled=!0,this.timerStarted=!1}var n,a,c,s,M=((n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(d,a=function(){}),d.prototype.ResizeFrame=function(t,e){if(this.document.defaultView&&this.document.defaultView.frameElement){var i=this.document.defaultView.frameElement;i.width=t.toString(),i.height=e.toString()}},d.prototype.Write=function(t){this.document.open(),this.document.write(t),this.document.close()},d.prototype.LoadScript=function(t){this.Write("<script type='text/javascript' src='"+t+"'><\/script>")},d);function d(t){var e=a.call(this)||this;return e.document=t,e}(s=c=c||{})[s.Error=0]="Error",s[s.Warning=1]="Warning",s[s.Debug=2]="Debug";var l=["color: #fff;","background: #ff8f1c;","display: inline-block;","padding: 1px 4px;","border-radius: 3px;"].join(" "),R=(u.Log=function(t,e){if(!(u.LOGLEVEL<t)){var i=c[t].toUpperCase(),r=window.navigator.userAgent,o=0<r.indexOf("MSIE ")||0<r.indexOf("Trident/");window.console&&(o?console.log("[PubTag] "+i+": "+e):console.log("%cPubTag",l,i+": "+e))}},u.Debug=function(t){u.Log(c.Debug,t)},u.Warning=function(t){u.Log(c.Warning,t)},u.Error=function(t){u.Log(c.Error,t)},u.LOGLEVEL=c.Error,u);function u(){}var p=(h.prototype.silentModeEnabled=function(){var t=h.SILENT_MODE_KEY;return this.localStorageEnabled&&null!==this.localStorageHelper.getItem(t)},h.prototype.enableSilentMode=function(t){if(this.localStorageEnabled){var e=h.SILENT_MODE_KEY;this.localStorageHelper.setItem(e,"1",t)}},h.SILENT_MODE_KEY="criteo_silent_mode",h);function h(){this.localStorageHelper=new o,this.localStorageEnabled=this.localStorageHelper.checkLocalStorage()}function f(t){try{return JSON.parse(t)}catch(t){return}}function v(){return(new Date).getTime()}var g=(y.prototype.toString=function(){return this.width+"x"+this.height},y);function y(t,e){this.width=t,this.height=e}var E=(C.prototype.toString=function(){return"ImpId"+this.impressionId},C);function C(t){this.impressionId=t}var I,b,_=((I=function(t,e){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(S,b=E),S.prototype.toString=function(){return b.prototype.toString.call(this)+"_Size"+this.size+"_NetworkId"+this.networkId},S);function S(t,e,i){var r=b.call(this,t)||this;return r.size=e,r.networkId=i,r}var w,T,A=((w=function(t,e){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(P,T=E),P.prototype.toString=function(){return T.prototype.toString.call(this)+"_ZoneId"+this.zoneId},P);function P(t,e){var i=T.call(this,t)||this;return i.zoneId=e,i}var O=(B.prototype.createKeysFromSlotRequest=function(t){if(this.useZoneIdIntegration)return[new A(t.impId,t.zoneId)];for(var e=[],i=0,r=t.sizes;i<r.length;i++){var o=r[i];e.push(new _(t.impId,o,this.networkId))}return e},B.prototype.createKeyFromSlotResponse=function(t){return this.useZoneIdIntegration?new A(t.impid,t.zoneid):new _(t.impid,new g(t.width,t.height),this.networkId)},B.prototype.createKeyFromBid=function(t){return this.useZoneIdIntegration?new A(t.impressionId,t.zoneId):new _(t.impressionId,new g(t.width,t.height),this.networkId)},B);function B(t,e){this.useZoneIdIntegration=t,this.networkId=e}var D=(x.useZoneIdIntegration=function(t,e){return void 0===e||0===t.filter(function(t){return void 0!==t.sizes&&0<t.sizes.length}).length},x.prototype.getBySlotKey=function(t,e){var i=e.toString();if(i in t){var r=t[i];if(void 0!==r)return void 0!==r.bid&&void 0!==r.expiration&&r.expiration<v()&&(r.bid=void 0,r.expiration=void 0),r}return{}},x.prototype.setBySlotKey=function(t,e,i){var r=e.toString();void 0!==i.bid||void 0!==i.expiration&&i.expiration>v()?t[r]=i:r in t&&delete t[r]},x.prototype.filterNoBidSlots=function(t){var e=[];if(this.localStorageEnabled)for(var i=this.localStorageHelper.getItem(x.BIDCACHE_STORAGE_KEY),r=i&&f(i)||{},o=0,n=t;o<n.length;o++){for(var a=n[o],s=[],d=0,c=this.slotKeyFactory.createKeysFromSlotRequest(a);d<c.length;d++){var l=c[d];this.getBidFromMap(r,l,0)!==x.NO_BID&&(l instanceof _?s.push(l.size):e.push(a))}0<s.length&&(a.sizes=s,e.push(a))}return e},x.prototype.getRequestCachedBids=function(t,e){void 0===e&&(e=5e3);var i={};if(this.localStorageEnabled){for(var r=this.localStorageHelper.getItem(x.BIDCACHE_STORAGE_KEY),o=r&&f(r)||{},n=0,a=t;n<a.length;n++)for(var s=a[n],d=0,c=this.slotKeyFactory.createKeysFromSlotRequest(s);d<c.length;d++){var l=c[d],u=this.getBidFromMap(o,l,e);void 0!==u&&u!==x.NO_BID&&(i[s.slotId]=u)}this.localStorageHelper.setItem(x.BIDCACHE_STORAGE_KEY,JSON.stringify(o))}return i},x.prototype.getBid=function(t,e){if(void 0===e&&(e=5e3),this.localStorageEnabled){var i=this.localStorageHelper.getItem(x.BIDCACHE_STORAGE_KEY),r=i&&f(i)||{},o=this.getBidFromMap(r,t,e);return this.localStorageHelper.setItem(x.BIDCACHE_STORAGE_KEY,JSON.stringify(r)),o}},x.prototype.getBidFromMap=function(t,e,i){void 0===i&&(i=5e3);var r=this.getBySlotKey(t,e);return void 0===r.bid&&r.expiration&&r.expiration>v()?x.NO_BID:0<i&&void 0!==r.bid?(delete t[e.toString()],r.bid):void 0},x.prototype.storeResponseBids=function(t){if(this.localStorageEnabled){for(var e=this.localStorageHelper.getItem(x.BIDCACHE_STORAGE_KEY),r=e&&f(e)||{},i=function(i){var t=o.slotKeyFactory.createKeyFromSlotResponse(i.slot);o.modifyCache(r,t,function(t){var e=v()+1e3*i.ttl;(void 0===t.expiration||t.expiration<e)&&(t.bid=i.slot,t.expiration=e)})},o=this,n=0,a=t;n<a.length;n++)i(a[n]);this.localStorageHelper.setItem(x.BIDCACHE_STORAGE_KEY,JSON.stringify(r))}},x.prototype.storeRequestNoBids=function(t){if(this.localStorageEnabled){for(var e=this.localStorageHelper.getItem(x.BIDCACHE_STORAGE_KEY),o=e&&f(e)||{},i=function(e){for(var t=0,i=n.slotKeyFactory.createKeysFromSlotRequest(e.slot);t<i.length;t++){var r=i[t];n.modifyCache(o,r,function(t){t.bid=void 0,t.expiration=Math.max(t.expiration||0,v()+1e3*e.ttl)})}},n=this,r=0,a=t;r<a.length;r++)i(a[r]);this.localStorageHelper.setItem(x.BIDCACHE_STORAGE_KEY,JSON.stringify(o))}},x.prototype.removeBid=function(e){if(this.localStorageEnabled){var t=this.localStorageHelper.getItem(x.BIDCACHE_STORAGE_KEY),i=t&&f(t)||{},r=this.slotKeyFactory.createKeyFromBid(e);this.modifyCache(i,r,function(t){void 0!==t.bid&&t.bid.slotid===e.slotId&&(t.bid=void 0,t.expiration=void 0)}),this.localStorageHelper.setItem(x.BIDCACHE_STORAGE_KEY,JSON.stringify(i))}},x.prototype.modifyCache=function(t,e,i){var r=this.getBySlotKey(t,e);i(r),this.setBySlotKey(t,e,r)},x.prototype.cleanUpLegacyLocalStorageItems=function(){for(var t=0,e=this.localStorageHelper.getAllItemsByPrefix("criteo_pt_cdb_bidcache_");t<e.length;t++){var i=e[t];localStorage.removeItem(i)}},x.prototype.clearExpiredItems=function(){for(var t=this.localStorageHelper.getItem(x.BIDCACHE_STORAGE_KEY),e=t&&f(t)||{},i=0,r=Object.keys(e);i<r.length;i++){var o=r[i],n=e[o];void 0!==n&&void 0!==n.expiration&&n.expiration<v()&&delete e[o]}this.localStorageHelper.setItem(x.BIDCACHE_STORAGE_KEY,JSON.stringify(e)),this.cleanUpLegacyLocalStorageItems()},x.NO_BID="nobid",x.BIDCACHE_STORAGE_KEY="criteo_pt_cdb_bidcachemap",x);function x(t,e){this.localStorageHelper=new o,this.localStorageEnabled=this.localStorageHelper.checkLocalStorage(),this.slotKeyFactory=new O(t,e)}var k=(L.prototype.filterNoBidSlots=function(t){var e=this.bidManager.filterNoBidSlots(t);return this.context.shouldIgnoreSilentMode?(e.length!==t.length&&this.context.setSilentModeIgnored&&this.context.setSilentModeIgnored(),t):e},L.prototype.silentModeEnabled=function(){var t=!1;return this.silentModeManager.silentModeEnabled()&&(this.context.shouldIgnoreSilentMode&&this.context.setSilentModeIgnored?this.context.setSilentModeIgnored():t=!0),t},L.prototype.getCachedBids=function(t){return this.bidManager.getRequestCachedBids(t)},L.prototype.removeBid=function(t){this.bidManager.removeBid(t)},L.prototype.handleResponse=function(t,e,i,r){var o=i.time_to_next_call;0<o&&(R.Debug("Global silent mode enabled for "+o+" seconds"),this.silentModeManager.enableSilentMode(1e3*o));var n={};if(i.slots)for(var a=0,s=i.slots;a<s.length;a++)(g=s[a]).ttl&&(n[g.imp_id]=g.ttl);var d=[];if(e.slots)for(var c=0,l=e.slots;c<l.length;c++){var u=0;(g=l[c]).slotid in n&&(u=n[g.slotid],delete n[g.slotid]),0<u&&(R.Debug("Bid for slot '"+g.impid+"' cached for "+u+" seconds"),d.push({slot:g,ttl:u}))}this.bidManager.storeResponseBids(d);var p=[];for(var h in n)if(n.hasOwnProperty(h))for(var f=0,v=t;f<v.length;f++){var g;(g=v[f]).slotId===h&&(u=n[h],R.Debug("Silent mode for slot '"+g.impId+"' enabled for "+u+" seconds"),p.push({slot:g,ttl:u}))}this.bidManager.storeRequestNoBids(p)},L.prototype.clearExpiredItems=function(){var t=this;setTimeout(function(){t.bidManager.clearExpiredItems()},3e3)},L);function L(t,e,i){var r=D.useZoneIdIntegration(e,i);this.bidManager=new D(r,i),this.silentModeManager=new p,this.context=t}var N=(F.prototype.eval=function(t){},F);function F(t){this.name=t}var U,q,W=((U=function(t,e){return(U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}U(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(H,q=N),H.prototype.eval=function(t){this.callback&&this.callback.apply(this)},H.NAME="genericEvent",H);function H(t){var e=q.call(this,H.NAME)||this;return e.callback=t,e}var G=(K.prototype.generateRandomId=function(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,6)},K);function K(t,e,i,r,o,n,a){this.id=this.generateRandomId(),this.slotId=t,this.impressionId=e,this.cpm=i,this.width=r,this.height=o,this.zoneId=n,this.dealCode=a}var V,z,j=((V=function(t,e){return(V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}V(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(Y,z=G),Y.prototype.GenerateEvent=function(t){var e=this;return t.ResizeFrame(this.width,this.height),new W(function(){return t.LoadScript(e.displayUrl)})},Y.prototype.GenerateMessage=function(){return{displayUrl:this.displayUrl}},Y);function Y(t,e,i,r,o,n,a,s){var d=z.call(this,t,e,i,r,o,n,s)||this;return d.displayUrl=a,d}var X,J,Z=((X=function(t,e){return(X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}X(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(Q,J=G),Q.prototype.GenerateEvent=function(t){var e=this;return t.ResizeFrame(this.width,this.height),new W(function(){return t.Write(e.creative)})},Q.prototype.GenerateMessage=function(){return{creative:this.creative}},Q);function Q(t,e,i,r,o,n,a,s){var d=J.call(this,t,e,i,r,o,n,s)||this;return d.creative=a,d}var $,tt,et=(($=function(t,e){return($=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}$(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(it,tt=G),it.prototype.GenerateEvent=function(t){var e=this;return"function"!=typeof this.nativeCallback?(R.Error("'nativeCallback' parameter is not a function in placements object"),new W(void 0)):"object"!=typeof this.nativePayload?(R.Error("'nativePayload' parameter is not an object in placements object"),new W(void 0)):new W(function(){return e.nativeCallback(e.nativePayload)})},it.prototype.GenerateMessage=function(){return{nativePayload:this.nativePayload}},it);function it(t,e,i,r,o,n,a,s,d){var c=tt.call(this,t,e,i,r,o,n,d)||this;return c.nativeCallback=a,c.nativePayload=s,c}var rt=93,ot=function(t,e,i,r,o,n,a,s,d,c,l,u,p,h,f,v,g,m,y){this.publisherTagVersion=t,this.slots=e,this.elapsed=i,this.isTimeout=r,this.pageLoadElapsed=o,this.adapterStartElapsed=n,this.cdbCallStartElapsed=a,this.cdbCallEndElapsed=s,this.adapterEndElapsed=d,this.setTargetingElapsed=c,this.adapterTimeout=l,this.adapterIsTimeout=u,this.timeToFirstByte=p,this.id=h,this.previousBuildRequestTimestamp=f,this.silentModeRequestCount=v,this.localStorageKeyCount=g,this.connectionEstablishmentTime=m,this.domainLookupTime=y},nt=function(t,e,i,r,o){this.impressionId=t,this.zoneId=e,this.adUnitId=i,this.cachedBidUsed=r,this.isDsc=o},at=(st.prototype.withElapsed=function(t){return this.elapsed=Math.round(t),this},st.prototype.withIsTimeout=function(t){return(this.isTimeout=t)&&this.events.push({eventId:"CdbCallTimeout"}),this},st.prototype.withPageLoadElapsed=function(t){return this.pageLoadElapsed=Math.round(t),this.events.push({eventId:"AuctionStart",elapsed:this.pageLoadElapsed}),this},st.prototype.withAdapterStartElapsed=function(t){return this.adapterStartElapsed=Math.round(t),this.events.push({eventId:"AdapterBidStart",elapsed:this.adapterStartElapsed}),this},st.prototype.withCdbCallStartElapsed=function(t){return this.cdbCallStartElapsed=Math.round(t),this.events.push({eventId:"CdbCallStart",elapsed:this.cdbCallStartElapsed}),this},st.prototype.withCdbCallEndElapsed=function(t){return this.cdbCallEndElapsed=Math.round(t),this.events.push({eventId:"CdbCallEnd",elapsed:this.cdbCallEndElapsed}),this},st.prototype.withSetTargetingElapsed=function(t){return this.setTargetingElapsed=Math.round(t),this},st.prototype.withAdapterEndElapsed=function(t){return this.adapterEndElapsed=Math.round(t),this.events.push({eventId:"AdapterBidEnd",elapsed:this.adapterEndElapsed}),this},st.prototype.withAdapterTimeout=function(t){return this.adapterTimeout=t&&Math.round(t),this.events.push({eventId:"AdapterTimeout",elapsed:this.adapterTimeout}),this},st.prototype.withSlotIdsMatchedByCache=function(t){return 0<(this.slotIdsMatchedByCache=t).length&&this.events.push({eventId:"CachedBidUsed",slots:this.slotIdsMatchedByCache}),this},st.prototype.withTimeToFirstByte=function(t){return this.timeToFirstByte=t&&Math.round(t),this.timeToFirstByte&&this.events.push({eventId:"TimeToFirstByte",elapsed:this.timeToFirstByte}),this},st.prototype.withConnectionEstablishmentTime=function(t){return this.connectionEstablishmentTime=t&&Math.round(t),this.connectionEstablishmentTime&&this.events.push({eventId:"TcpConnectionElapsedTime",elapsed:this.connectionEstablishmentTime}),this},st.prototype.withDomainLookupTime=function(t){return this.domainLookupTime=t&&Math.round(t),this.domainLookupTime&&this.events.push({eventId:"DomainLookupElapsedTime",elapsed:this.domainLookupTime}),this},st.prototype.withClientRequestId=function(t){return this.clientRequestId=t,this},st.prototype.addSlot=function(e,t,i,r){var o=0<this.slotIdsMatchedByCache.filter(function(t){return t===e}).length;return this.slots.push(new nt(e,t,i,o,r)),this},st.prototype.build=function(){var t;return void 0!==this.adapterTimeout&&(t=this.adapterEndElapsed>this.adapterTimeout),new ot(rt,this.slots,this.elapsed,this.isTimeout,this.pageLoadElapsed,this.adapterStartElapsed,this.cdbCallStartElapsed,this.cdbCallEndElapsed,this.adapterEndElapsed,this.setTargetingElapsed,this.adapterTimeout,t,this.timeToFirstByte,this.clientRequestId,this.metricsManager.getPreviousBuildRequestTimestamp(),this.metricsManager.getSilentModeRequestCount(!0),this.metricsManager.getLocalStorageKeyCount(),this.connectionEstablishmentTime,this.domainLookupTime)},st.prototype.buildBidWonEvent=function(t){if(void 0===this.clientRequestId)throw new Error("buildBidWonEvent() cannot be called without a requestId!");var e={eventId:"BidWon",slots:[t]};return{requestId:this.clientRequestId,events:[e]}},st.prototype.buildSetTargetingEvent=function(){if(void 0===this.clientRequestId)throw new Error("buildSetTargetingEvent() cannot be called without a requestId!");if(this.setTargetingElapsed){var t={eventId:"SetTargeting",elapsed:Math.round(this.setTargetingElapsed)};return{requestId:this.clientRequestId,events:[t]}}throw new Error("buildSetTargetingEvent() cannot be called without a targeting elapsed value!")},st.prototype.buildEvents=function(){if(void 0===this.clientRequestId)throw new Error("buildEvents() cannot be called without a requestId!");var t=[],e=this.metricsManager.getPreviousBuildRequestTimestamp();return e&&t.push({eventId:"UserReturnTime",elapsed:(new Date).getTime()-e}),{requestId:this.clientRequestId,events:this.events.concat(t)}},st);function st(t){this.elapsed=0,this.isTimeout=!1,this.pageLoadElapsed=0,this.adapterStartElapsed=0,this.cdbCallStartElapsed=0,this.cdbCallEndElapsed=0,this.adapterEndElapsed=0,this.slotIdsMatchedByCache=[],this.slots=[],this.events=[],this.metricsManager=t}var dt=(ct.prototype.getRequest=function(){return{feedbacks:this.feedbacks}},ct.prototype.getUrl=function(){return this.urlBuilder.buildCsmUrl(this.profileId,this.adapterVersion,this.wrapperVersion)},ct);function ct(t,e,i,r,o){this.urlBuilder=t,this.profileId=e,this.adapterVersion=r,this.wrapperVersion=o,this.feedbacks=i}var lt,ut,pt=(ht.generateCacheBuster=function(){return Math.floor(99999999999*Math.random())},ht);function ht(){}function ft(t){switch(t.toLowerCase()){case"amp":return lt.AMP;default:return lt.Unspecified}}(ut=lt=lt||{})[ut.Unspecified=0]="Unspecified",ut[ut.AMP=1]="AMP";var vt=(gt.prototype.buildUrl=function(t,e,i,r,o){void 0===i&&(i=lt.Unspecified);var n=gt.CRITEO_BIDDER_URL+this.getHandlerPath();return n+="?ptv=93",!0===e.isAdBlocked&&(n+="&abp=1"),n=this.appendCommonParameters(n,t,r,o),n+=e.ctoIdOnPublisherDomain?"&idcpy="+e.ctoIdOnPublisherDomain:"",n+=e.secureId?"&sid="+e.secureId:"",n+=e.isOptOut?"&optout=1":"",n+=e.bundle?"&bundle="+e.bundle:"",i!==lt.Unspecified&&(n+="&im="+i),n+=e.silentModeIgnored?"&smi=1":"",n+="&cb="+String(pt.generateCacheBuster()),n+=e.getContextFlags()},gt.prototype.buildCsmUrl=function(t,e,i){var r=gt.CRITEO_BIDDER_URL+gt.CRITEO_CSM_HANDLER;return r+="?ptv=93",this.appendCommonParameters(r,t,e,i)},gt.prototype.buildErrorUrl=function(){return gt.CRITEO_BIDDER_URL+gt.CRITEO_ERROR_HANDLER},gt.prototype.buildCsmEventsUrl=function(){return gt.CRITEO_BIDDER_URL+gt.CRITEO_CSM_EVENTS_HANDLER},gt.prototype.buildCsmCountersUrl=function(){return gt.CRITEO_BIDDER_URL+gt.CRITEO_CSM_COUNTERS_HANDLER},gt.prototype.appendCommonParameters=function(t,e,i,r){return t+="&profileId="+String(e),void 0!==i&&(t+="&av="+String(i)),void 0!==r&&(t+="&wv="+encodeURIComponent(r)),t},gt.prototype.getHandlerPath=function(){return this.auditMode?gt.CRITEO_BIDDER_AUDIT_HANDLER:gt.CRITEO_BIDDER_HANDLER},gt.CRITEO_BIDDER_URL="https://bidder.criteo.com/",gt.CRITEO_BIDDER_HANDLER="cdb",gt.CRITEO_CSM_HANDLER="csm",gt.CRITEO_CSM_EVENTS_HANDLER="csm/events",gt.CRITEO_CSM_COUNTERS_HANDLER="csm/counters",gt.CRITEO_ERROR_HANDLER="error",gt.CRITEO_BIDDER_AUDIT_HANDLER="prebid/audit",gt);function gt(t){void 0===t&&(t=!1),this.auditMode=t}var mt=(yt.prototype.getMetrics=function(t,e){if(void 0===e&&(e=yt.TIMING_METRICS_STORAGE_KEY),this.localStorageEnabled){var i=this.localStorageHelper.getItem(e),r=i?f(i):[];return t&&this.localStorageHelper.removeItem(e),Array.isArray(r)?r:[]}return[]},yt.prototype.setMetrics=function(t,e){void 0===e&&(e=yt.TIMING_METRICS_STORAGE_KEY),this.localStorageEnabled&&this.localStorageHelper.setItem(e,JSON.stringify(t),36e5)},yt.prototype.addMetric=function(t,e){void 0===e&&(e=yt.TIMING_METRICS_STORAGE_KEY);var i=this.getMetrics(!1,e);i.push(t),this.setMetrics(i,e)},yt.prototype.storeMetric=function(t){var e=this;if(this.localStorageEnabled){this.addMetric(t);var i=(t&&t.adapterTimeout||2e3)+1e3;setTimeout(function(){e.sendMetrics(e.getMetrics(!0))},i)}},yt.prototype.getManagerMetrics=function(){var t=this.localStorageHelper.getItem(yt.MANAGER_METRICS_STORAGE_KEY);if(null==t)return{};var e=f(t);return void 0===e?{}:e},yt.prototype.setManagerMetrics=function(t){this.localStorageHelper.setItem(yt.MANAGER_METRICS_STORAGE_KEY,JSON.stringify(t))},yt.prototype.getPreviousBuildRequestTimestamp=function(){var t=this.getManagerMetrics().previousBuildRequestTimestamp;return isNaN(t)?void 0:t},yt.prototype.resetPreviousBuildRequestTimestamp=function(){var t=this.getManagerMetrics();t.previousBuildRequestTimestamp=(new Date).getTime().toString(),this.setManagerMetrics(t)},yt.prototype.getSilentModeRequestCount=function(t){void 0===t&&(t=!1);var e=this.getManagerMetrics().silentModeRequestCount;return t&&this.resetSilentModeRequestCount(),isNaN(e)?0:e},yt.prototype.incSilentModeRequestCount=function(){var t=this.getManagerMetrics();t.silentModeRequestCount=isNaN(t.silentModeRequestCount)?1:t.silentModeRequestCount+1,this.setManagerMetrics(t)},yt.prototype.resetSilentModeRequestCount=function(){var t=this.getManagerMetrics();t.silentModeRequestCount=0,this.setManagerMetrics(t)},yt.prototype.getLocalStorageKeyCount=function(){return this.localStorageHelper.getAllItemsByPrefix("criteo_").length+this.localStorageHelper.getAllItemsByPrefix("cto_").length},yt.prototype.sendMetric=function(t){this.sendMetrics([t])},yt.prototype.sendMetrics=function(t){if(!(t.length<=0)){this.resetPreviousBuildRequestTimestamp();var e=new dt(this.urlBuilder,this.profileId,t,this.adapterVersion,this.wrapperVersion),i=e.getUrl(),r=JSON.stringify(e.getRequest());navigator.sendBeacon&&navigator.sendBeacon(i,r)}},yt.TIMING_METRICS_STORAGE_KEY="criteo_pt_cdb_metrics",yt.MANAGER_METRICS_STORAGE_KEY="criteo_pt_cdb_mngr_metrics",yt.EVENTS_METRICS_STORAGE_KEY="criteo_pt_cdb_events_metrics",yt.COUNTERS_METRICS_STORAGE_KEY="criteo_pt_cdb_counters_metrics",yt);function yt(t,e,i,r){this.urlBuilder=new vt,this.profileId=t,this.adapterVersion=e,this.wrapperVersion=i,this.localStorageHelper=r||new o,this.localStorageEnabled=this.localStorageHelper.checkLocalStorage()}var Et=(Ct.clearState=function(){this.cloneByImpressionId={}},Ct.tryInsertPlaceholder=function(t,e){void 0===e&&(e=!1);var i=document.getElementById(t);if(null===i)return R.Warning("Unable to insert ad placeholder : impression id "+t+" not found."),!1;if(i.appendChild(this.createPlaceholder()),!e&&this.isVisible(i))return!0;this.removePlaceholder(t);var r=i.parentElement;if(null===r)return!1;var o=this.createClone(i);return r.insertBefore(o,i),o.appendChild(this.createPlaceholder()),this.isVisible(o)?(this.cloneByImpressionId[t]=o,!0):(R.Warning("Ad placeholder created but not visible : can't render."),r.removeChild(o),!1)},Ct.isVisible=function(t){return 0!==t.offsetWidth&&0!==t.offsetHeight&&0!==t.getClientRects().length},Ct.createClone=function(t){var e=t.cloneNode(!1);return e.id=this.generateRandomId(),e.className="","none"===e.style.display&&e.style.removeProperty("display"),"SPAN"===e.tagName&&(e.style.display="block"),e},Ct.generateRandomId=function(){for(var t="1234567890abcdefghijklmnopqrstuvwxyz",e="",i=0;i<20;i++){var r=Math.floor(Math.random()*t.length);e+=t.charAt(r)}return e},Ct.createPlaceholder=function(){var t=document.createElement("div");return t.style.width="1px",t.style.height="1px",t.style.display="block",t.className=Ct.PLACEHOLDER_NAME,t},Ct.removePlaceholder=function(t){var e=this.cloneByImpressionId[t];if(void 0===e){var i=document.getElementById(t);if(null!==i)for(var r=0,o=i.getElementsByClassName(Ct.PLACEHOLDER_NAME);r<o.length;r++){var n=o[r];null!==n.parentNode&&n.parentNode.removeChild(n)}}else null!==e.parentNode&&e.parentNode.removeChild(e)},Ct.insertAdIFrame=function(t){var e,i=this.cloneByImpressionId[t];if(void 0!==i)e=i;else{var r=document.getElementById(t);if(null===r)return null;e=r}for(var o=0,n=e.getElementsByClassName(Ct.PLACEHOLDER_NAME);o<n.length;o++){for(var a=n[o],s=0,d=a.childNodes;s<d.length;s++){var c=d[s];null!==c.parentNode&&c.parentNode.removeChild(c)}var l=this.createAdIFrame();return a.appendChild(l),a.style.width="",a.style.height="",a.style.display="",l}return null},Ct.createAdIFrame=function(){var t=document.createElement("iframe");return t.scrolling="no",t.marginWidth="0",t.marginHeight="0",t.frameBorder="0",t.style.border="0",t.style.verticalAlign="bottom",t},Ct.removePlaceholders=function(t,e){void 0===e&&(e=[]);for(var i=0,r=t;i<r.length;i++){var o=r[i].impId;-1===e.indexOf(o)&&Ct.removePlaceholder(o)}},Ct.tryInsertPlaceholders=function(t,e){void 0===e&&(e=!1);for(var i=[],r=0,o=t;r<o.length;r++){var n=o[r],a=n.impId;Ct.tryInsertPlaceholder(a,e)&&i.push(n)}return i},Ct.PLACEHOLDER_NAME="criteo_placeholder",Ct.cloneByImpressionId={},Ct);function Ct(){}var It=(bt.prototype.isValid=function(){return 0<this.slots.length},bt.prototype.getRequest=function(){for(var t=[],e=0,i=this.slots;e<i.length;e++){var r=i[e],o={slotid:r.slotId,impid:r.impId};if(void 0!==r.zoneId&&(o.zoneid=r.zoneId),void 0!==r.nativeCallback&&(o.native=!0),void 0!==r.transactionId&&(o.transactionid=r.transactionId),void 0!==r.publisherSubId&&(o.publishersubid=r.publisherSubId),void 0!==r.sizes){for(var n=[],a=0,s=r.sizes;a<s.length;a++){var d=s[a];n.push(d.width+"x"+d.height)}o.sizes=n}if(void 0!==r.video){var c={playersizes:this.parsePlayerSizes(r.video.playersize),mimes:r.video.mimes,protocols:r.video.protocols,maxduration:r.video.maxduration,api:r.video.api,skip:r.video.skip,placement:r.video.placement,playbackmethod:r.video.playbackmethod,minduration:r.video.minduration,startdelay:r.video.startdelay};o.video=c}if(void 0!==this.viewportComputer){var l=this.viewportComputer.getSlotPosition(r);void 0!==l&&(o.position={top:l.top,left:l.left})}void 0!==r.ext&&(o.ext=r.ext),t.push(o)}var u={ceh:this.context.ceh,uspOptout:this.context.ccpaOptout,ext:this.context.userExt},p={publisher:{url:this.context.highestAccessibleUrl,ext:this.context.publisherExt},slots:t,user:u};void 0!==this.networkId&&(p.publisher.networkid=this.networkId);var h=this.metricsManager.getMetrics(!0);if(h.length&&(p.previousBidFeedback=h),this.privacyWrapper&&(this.privacyWrapper.gdprConsent&&(p.gdprConsent=this.privacyWrapper.gdprConsent),this.privacyWrapper.ccpaIabConsent&&(u.uspIab=this.privacyWrapper.ccpaIabConsent.uspString)),void 0!==this.viewportComputer){var f=this.viewportComputer.getViewport();p.viewport={width:f.width,height:f.height,scrollTop:f.scrollTop,scrollLeft:f.scrollLeft}}return void 0!==this.adapterTimeout&&(p.tmax=this.adapterTimeout),void 0!==this.clientRequestId&&(p.id=this.clientRequestId),p},bt.parsePlayerSize=function(t){return t[0]+"x"+t[1]},bt.prototype.parsePlayerSizes=function(t){return Array.isArray(t[0])?t.map(function(t){return bt.parsePlayerSize(t)}):[bt.parsePlayerSize(t)]},bt.prototype.getUrl=function(){return this.urlBuilder.buildUrl(this.profileId,this.context,this.integrationMode,this.adapterVersion,this.wrapperVersion)},bt);function bt(t,e,i,r,o,n,a,s,d,c,l,u,p){this.slots=t,this.context=e,this.metricsManager=i,this.urlBuilder=r,this.profileId=o,this.integrationMode=n||lt.Unspecified,this.networkId=a,this.adapterVersion=s,this.privacyWrapper=d,this.wrapperVersion=c,this.viewportComputer=l,this.adapterTimeout=u,this.clientRequestId=p}function _t(t){var e={slots:void 0,time_to_next_call:0};return void 0!==t.exd&&(void 0!==t.exd.time_to_next_call&&(e.time_to_next_call=t.exd.time_to_next_call),e.slots=t.exd.slots,delete t.exd),e}function St(){var i=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(i+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(i+16*Math.random())%16|0;return i=Math.floor(i/16),("x"===t?e:3&e|8).toString(16)})}var wt=function(t,e,i,r,o,n,a,s,d){this.slotId=St().replace(/-/g,""),this.impId=t,this.zoneId=e,this.nativeCallback=i,this.transactionId=r,this.sizes=o,this.publisherSubId=n,this.mediaTypes=a,this.video=s,this.ext=d},Tt=function(t,e,i,r,o,n,a,s,d,c){this.playersize=t,this.mimes=e,this.protocols=i,this.maxduration=r,this.api=o,this.skip=n,this.placement=a,this.playbackmethod=s,this.minduration=d,this.startdelay=c},Mt=(Rt.CreateRunning=function(){var t=new Rt;return t.start(),t},Rt.CreateWithStartTime=function(t){var e=new Rt(!1);return e.startTime=t,e},Rt.TimeSincePageLoad=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.timing&&window.performance.timing.navigationStart)return(new Date).getTime()-performance.timing.navigationStart}return 0},Rt.prototype.start=function(){this.startTime=this.now()},Rt.prototype.elapsed=function(){return this.now()-this.startTime},Rt);function Rt(t){void 0===t&&(t=!0),t&&window.performance&&window.performance.now?this.now=window.performance.now.bind(window.performance):Date.now?this.now=Date.now:this.now=function(){return(new Date).getTime()}}var At=(Pt.prototype.sendRequest=function(t){this.url=t,this.sendTime=Mt.CreateRunning(),this.builder.withCdbCallStartElapsed(this.timer.elapsed())},Pt.prototype.requestReceived=function(t){void 0===t&&(t=!1),this.builder.withElapsed(function(t){if(window.performance&&window.performance.getEntries)for(var e=window.performance.getEntries(),i=e.length-1;0<=i;--i){var r=e[i];if(r.name===t&&r.duration)return Math.round(r.duration)}}(this.url)||this.sendTime.elapsed()),this.builder.withCdbCallEndElapsed(this.timer.elapsed()),this.builder.withIsTimeout(t)},Pt.prototype.setTargeting=function(){this.hasSetTargetingBeenCalled||(this.builder.withSetTargetingElapsed(this.timer.elapsed()),this.hasSetTargetingBeenCalled=!0)},Pt.prototype.finish=function(t){if(this.builder.withAdapterEndElapsed(this.timer.elapsed()),t&&0!==t.length)for(var e=0,i=t;e<i.length;e++){var r=i[e];this.builder.addSlot(r.imp_id,r.zone_id,r.ad_unit_id,r.is_dsc)}else this.builder.addSlot("");var o=Pt.getLastCdbTiming();return void 0!==o&&(this.builder.withTimeToFirstByte(Pt.computeTimeToFirstByte(o)),this.builder.withConnectionEstablishmentTime(Pt.computeConnectionEstablishmentTime(o)),this.builder.withDomainLookupTime(Pt.computeDomainLookupTime(o))),this.build()},Pt.getLastCdbTiming=function(){if(void 0!==window.performance&&void 0!==window.performance.getEntriesByType&&"function"==typeof window.performance.getEntriesByType){var t=window.performance.getEntriesByType("resource");if(void 0!==t){var e=t.filter(function(t){return 0<=t.name.indexOf("cdb")});return void 0!==e&&0<e.length?e[e.length-1]:void 0}}},Pt.computeTimeToFirstByte=function(t){var e=t.responseStart,i=t.requestStart;if(void 0!==e&&void 0!==i)return e-i},Pt.computeConnectionEstablishmentTime=function(t){var e=t.connectEnd-t.connectStart;return isNaN(e)?void 0:e},Pt.computeDomainLookupTime=function(t){var e=t.domainLookupEnd-t.domainLookupStart;return isNaN(e)?void 0:e},Pt.prototype.build=function(){return this.builder.build()},Pt);function Pt(t,e,i,r){this.hasSetTargetingBeenCalled=!1,this.builder=t,this.timer=void 0!==e?Mt.CreateWithStartTime(e):Mt.CreateRunning();var o=this.timer.elapsed();this.builder.withAdapterStartElapsed(o),this.builder.withPageLoadElapsed(Mt.TimeSincePageLoad()-o),this.builder.withClientRequestId(r||St()),void 0!==i&&this.builder.withAdapterTimeout(i)}function Ot(t){var e="number"==typeof window.PREBID_TIMEOUT?window.PREBID_TIMEOUT:void 0;return t&&e?Math.min(t,e):t||e||void 0}var Bt=function(t,e){this.top=t,this.left=e},Dt=function(t,e,i,r){this.width=t,this.height=e,this.scrollTop=i,this.scrollLeft=r},xt=(kt.getHighestAccessibleWindow=function(t){var e=t,i=!1;try{for(;e.parent.document!==e.document;){if(!e.parent.document){i=!0;break}e=e.parent}}catch(t){i=!0}return{topFrame:e,err:i}},kt.getHighestAccessibleUrl=function(t){var e=t.topFrame;if(!t.err)return e.location.href;try{var i=e.top.location.href;if(i)return i}catch(t){}try{var r=e.location.ancestorOrigins;if(r)return r[r.length-1]}catch(t){}return e.document.referrer},kt.inIframe=function(){try{return window.self!==window.top}catch(t){return!0}},kt);function kt(){}var Lt=(Nt.prototype.getViewport=function(){var t=xt.getHighestAccessibleWindow(window).topFrame,e=t.document,i=t.innerWidth||e.documentElement.clientWidth,r=t.innerHeight||e.documentElement.clientHeight,o=e.documentElement.scrollTop||e.body&&e.body.scrollTop||0,n=e.documentElement.scrollLeft||e.body&&e.body.scrollLeft||0;return new Dt(i,r,o,n)},Nt.prototype.getSlotPosition=function(t){var e=t.impId,i=document.getElementById(e);if(null!==i){var r=i.getBoundingClientRect();return new Bt(r.top,r.left)}},Nt);function Nt(){}var Ft,Ut,qt=function(){return(qt=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};(Ut=Ft=Ft||{}).Native="native",Ut.Banner="banner",Ut.Video="video";var Wt=(Ht.prototype.hasValidNativeParams=function(t){return!(t.nativeParams&&(t.nativeParams.image&&!0!==t.nativeParams.image.sendId||t.nativeParams.icon&&!0!==t.nativeParams.icon.sendId||t.nativeParams.clickUrl&&!0!==t.nativeParams.clickUrl.sendId||t.nativeParams.displayUrl&&!0!==t.nativeParams.displayUrl.sendId||t.nativeParams.privacyLink&&!0!==t.nativeParams.privacyLink.sendId||t.nativeParams.privacyIcon&&!0!==t.nativeParams.privacyIcon.sendId))},Ht.prototype.setEnableSendAllBids=function(t){this.enableSendAllBids=t},Ht.prototype.buildCdbUrl=function(){return this.url},Ht.prototype.buildCdbRequest=function(){if(this.cache.silentModeEnabled())return R.Debug("Request ignored because the global silent mode is enabled"),void this.metricsManager.incSilentModeRequestCount();if(this.requestBuilder.isValid()){var t=Math.min((this.timeout||5e3)+1e3,5e3);return this.adBlockFlagManager.setAdBlockFlagTimer(t),this.timer.sendRequest(this.url),this.requestBuilder.getRequest()}R.Debug("Request ignored because it doesnt contain any slot")},Ht.GetAllAdapters=function(){return window.Criteo.prebid_adapters},Ht.GetAdapter=function(t){var e="string"==typeof t?t:t.bidRequests[0].auctionId,i=Ht.GetAllAdapters();if(i&&e in i)return i[e]},Ht.createCriteoNativeAdWithCallback=function(t,e,i){return window.criteo_prebid_native_slots=window.criteo_prebid_native_slots||{},window.criteo_prebid_native_slots[t]={callback:i,payload:e},'<script type="text/javascript">\n            var win = window;\n            for (var i = 0; i < 10; ++i) {\n                win = win.parent;\n                if (win.criteo_prebid_native_slots) {\n                    var responseSlot = win.criteo_prebid_native_slots["'+t+'"];\n                    responseSlot.callback(responseSlot.payload);\n                    break;\n                }\n            }\n        <\/script>'},Ht.createPrebidNativeAd=function(t){return{title:t.products[0].title,body:t.products[0].description,sponsoredBy:t.advertiser.description,icon:t.advertiser.logo,image:t.products[0].image,clickUrl:t.products[0].click_url,privacyLink:t.privacy.optout_click_url,privacyIcon:t.privacy.optout_image_url,cta:t.products[0].call_to_action,price:t.products[0].price,impressionTrackers:t.impression_pixels.map(function(t){return t.url})}},Ht.prototype.getBidRequestForSlot=function(t){for(var e=0,i=this.bidRequests;e<i.length;e++){var r=i[e];if(r.adUnitCode===t.impid&&(!r.params.zoneId||parseInt(r.params.zoneId,10)===t.zoneid))return r}},Ht.prototype.getSlotForAdUnitCode=function(t){for(var e=0,i=this.slots;e<i.length;e++){var r=i[e];if(r&&r.impId===t)return r}},Ht.getVideoInfoFromBidRequest=function(t){if(Ht.hasVideoMediaType(t))return new Tt(t.mediaTypes.video.playerSize,t.mediaTypes.video.mimes,t.mediaTypes.video.protocols,t.mediaTypes.video.maxduration,t.mediaTypes.video.api,t.params.video.skip,t.params.video.placement,t.params.video.playbackmethod,t.params.video.minduration,t.params.video.startdelay)},Ht.hasVideoMediaType=function(t){return void 0!==t.params&&void 0!==t.params.video&&!(void 0===t.mediaTypes||void 0===t.mediaTypes.video)},Ht.prototype.interpretResponse=function(t,e){this.timer.requestReceived(),this.adBlockFlagManager.disableAdBlockFlagTimer();var i=_t(t),r={};if(void 0!==i.slots)for(var o=0,n=i.slots;o<n.length;o++)r[(C=n[o]).imp_id]=C;var a,s,d,c,l,u,p,h,f,v,g,m=[];if(t.slots&&Array.isArray(t.slots))for(var y=0,E=t.slots;y<E.length;y++){var C=E[y],I=this.getBidRequestForSlot(C);if(I)if(!0===window.criteo_pubtag.context.isAdBlocked){if(void 0!==(a=C.slotid,s=C.impid,d=C.cpm,c=C.width,l=C.height,u=C.zoneid,p=I.params.nativeCallback,h=C.native,f=C.displayurl,v=C.creative,g=C.deal,T=void 0!==p&&void 0!==h?new et(a,s,d,c,l,u,p,h,g):void 0===f||void 0!==v&&"<script"!==v.substr(0,7)?void 0!==v?new Z(a,s,d,c,l,u,v,g):void 0:new j(a,s,d,c,l,u,f,g))&&Et.tryInsertPlaceholder(I.adUnitCode,!0)){var b=Et.insertAdIFrame(I.adUnitCode);if(null!=b){var _=new M(b.contentDocument);T.GenerateEvent(_).eval(window.criteo_pubtag)}}}else{var S=I.bidId,w=C.ttl||r[C.slotid]&&r[C.slotid].ttl||60,T={requestId:S,adId:St(),cpm:C.cpm,currency:C.currency,netRevenue:!0,ttl:w,creativeId:S,width:C.width,height:C.height,dealId:C.deal};if(C.native)if(I.params.nativeCallback)T.ad=Ht.createCriteoNativeAdWithCallback(S,C.native,I.params.nativeCallback);else{if(this.enableSendAllBids){R.Error("Not supporting non mediation mode");continue}T.native=Ht.createPrebidNativeAd(C.native),T.mediaType=Ft.Native}else C.video?(T.vastUrl=C.displayurl,T.mediaType=Ft.Video):T.ad=C.creative;m.push(T)}else R.Error("Unable to bid request for slot "+C)}return this.cache.handleResponse(this.slots,t,i,!1),this.metricsManager.storeMetric(this.timer.finish(i.slots)),this.cache.clearExpiredItems(),m},Ht.prototype.handleBidWon=function(t){this.updateMetric(t,function(t){t.adapterBidWon=!0})},Ht.prototype.handleBidTimeout=function(){this.timer.requestReceived(!0),this.metricsManager.sendMetric(this.timer.finish()),this.cache.clearExpiredItems()},Ht.prototype.handleSetTargeting=function(t){var e=this;this.timer.setTargeting(),this.updateMetric(t,function(){return e.timer.build()})},Ht.prototype.updateMetric=function(t,e){for(var i=this.metricsManager.getMetrics(!1),r=0;r<i.length;++r)for(var o=0,n=i[r].slots;o<n.length;o++){var a=n[o];if(a.adUnitId===t.adUnitCode){var s=e(a);s&&(i[r]=s)}}this.metricsManager.setMetrics(i)},Ht.prototype.getSizes=function(t){var e,i,r,o,n,a,s,d=(null===(i=null===(e=t.mediaTypes)||void 0===e?void 0:e.banner)||void 0===i?void 0:i.sizes)||t.sizes,c=(null==d?void 0:d.map(function(t){return new g(t[0],t[1])}))||[],l=(null===(a=null===(n=null===(o=null===(r=t.mediaTypes)||void 0===r?void 0:r.native)||void 0===o?void 0:o.image)||void 0===n?void 0:n.sizes)||void 0===a?void 0:a.map(function(t){return new g(t[0],t[1])}))||[],u=c.concat(l);return(null===(s=t.mediaTypes)||void 0===s?void 0:s.native)&&(0===u.length?u=[new g(2,2)]:u.forEach(function(t,e,i){void 0===t.height&&void 0===t.width&&(i[e]=new g(2,2))})),u.filter(function(t,e,i){return i.indexOf(t)===e})},Ht);function Ht(t,e,i,r,o){this.enableSendAllBids=!0;var n,a,s,d=St();this.timeout=Ot(r.timeout),this.metricsManager=new mt(t,e,o),this.metricBuilder=new at(this.metricsManager),this.timer=new At(this.metricBuilder,r.start,this.timeout,d),this.adBlockFlagManager=m.create(),this.adBlockFlagManager.adBlockFlagEnabled()&&(t=280,window.criteo_pubtag.context.isAdBlocked=!0,n=new Lt),this.auctionId=r.auctionId,this.bidRequests=i,this.slots=[];for(var c,l=!0,u=0,p=i;u<p.length;u++){var h=p[u],f=void 0;h.fpd&&h.fpd.context&&(f=h.fpd.context),h.params.ext&&(f=qt(qt({},f),h.params.ext)),l=this.hasValidNativeParams(h),this.slots.push(new wt(h.adUnitCode,h.params.zoneId,h.params.nativeCallback,h.transactionId,this.getSizes(h),h.params.publisherSubId,h.mediaTypes,Ht.getVideoInfoFromBidRequest(h),f)),a=h.params.networkId||a,c=r.ceh,window.criteo_pubtag.context.ceh=c,h.params.integrationMode&&(s=ft(h.params.integrationMode))}l||R.Warning("All native assets containing URL should be sent as placeholders with sendId(icon, image, clickUrl, privacyLink, privacyIcon)");var v={};r.gdprConsent&&(void 0!==r.gdprConsent.consentString&&(v.consentData=r.gdprConsent.consentString),void 0!==r.gdprConsent.gdprApplies&&(v.gdprApplies=!!r.gdprConsent.gdprApplies),v.version=r.gdprConsent.apiVersion);var g={uspString:r.uspConsent};window.criteo_pubtag.context.publisherExt=r.publisherExt,window.criteo_pubtag.context.userExt=r.userExt,this.cache=new k(window.criteo_pubtag.context,this.slots,a),this.requestBuilder=new It(this.cache.filterNoBidSlots(this.slots),window.criteo_pubtag.context,this.metricsManager,new vt(!1),t,s,a,e,{ccpaIabConsent:g,gdprConsent:v},o,n,this.timeout,d),this.url=this.requestBuilder.getUrl(),window.Criteo.prebid_adapters=window.Criteo.prebid_adapters||{},window.Criteo.prebid_adapters[this.auctionId]=this}var Gt=(Kt.prototype.getCMPFrame=function(){for(var t,e=this.currentWindow,i=0;i<10;++i){try{e.frames.__uspapiLocator&&(t=e)}catch(t){}if(e===this.currentWindow.top)break;e=e.parent}return t},Kt.prototype.hasCallerFunctionInWindow=function(){return"function"==typeof this.currentWindow.__uspapi},Kt.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInWindow()||void 0!==this.getCMPFrame()},Kt.prototype.retrieveConsent=function(i){var t=this,r=Mt.CreateRunning(),o=!1,n=setTimeout(function(){o=!0,R.Warning("Timeout: Unable to resolve CCPA consent after "+t.timeout+"ms"),i(void 0)},this.timeout);this.executeCommand("getUSPData",1,function(t,e){o||(clearTimeout(n),e?(R.Debug("CCPA consent retrieved in "+r.elapsed()+"ms"),Kt.processResponseData(t,i)):(R.Warning("Error retrieving CCPA consent data from CMP"),i(void 0)))})},Kt.processResponseData=function(t,e){t?e(t):(R.Warning("Unable to read CCPA consent data from CMP"),e(void 0))},Kt.prototype.executeCommand=function(t,e,i){var n=this;if(!this.hasCallerFunctionInWindow()){R.Debug("No CCPA CMP defined on current frame");var a=this.getCMPFrame();this.currentWindow.__uspapi=function(t,e,i){if(!a)return R.Warning("CCPA CMP not found in any frame"),void i({msg:"CCPA CMP not found in any frame"},!1);var r=Math.random().toString(10),o={__uspapiCall:{command:t,parameter:e,callId:r}};n.uspapiCallbacks[r]=i,a.postMessage(o,"*")},this.currentWindow.addEventListener("message",function(t){var e="string"==typeof t.data?f(t.data):t.data;if(e&&e.__uspapiReturn&&e.__uspapiReturn.callId&&e.__uspapiReturn.returnValue){var i=e.__uspapiReturn;n.uspapiCallbacks&&n.uspapiCallbacks[i.callId]&&(n.uspapiCallbacks[i.callId](i.returnValue,i.success),delete n.uspapiCallbacks[i.callId])}},!1)}this.currentWindow.__uspapi(t,e,i)},Kt.prototype.hasUserOptOut=function(t){return!(!t||!t.uspString||"1YNY"===t.uspString.toUpperCase()||"1YNN"===t.uspString.toUpperCase()||"1YN-"===t.uspString.toUpperCase()||"1-N-"===t.uspString.toUpperCase()||"1---"===t.uspString)},Kt);function Kt(t,e){void 0===e&&(e=parseInt("50",10)),this.uspapiCallbacks={},this.currentWindow=t,this.timeout=e}var Vt=(zt.prototype.getReadyToRetrieveProvider=function(){return this.tcfv2PrivacyProvider.hasCallerFunctionInFrame()?this.tcfv2PrivacyProvider:this.gdprPrivacyProvider.hasCallerFunctionInFrame()?this.gdprPrivacyProvider:void 0!==this.tcfv2PrivacyProvider.getCMPFrame()?this.tcfv2PrivacyProvider:void 0!==this.gdprPrivacyProvider.getCMPFrame()?this.gdprPrivacyProvider:void 0},zt.prototype.retrieveConsentForPassback=function(t){var e=this.getReadyToRetrieveProvider();void 0===e&&(R.Warning("No compatible GDPR privacy provider found"),t(void 0)),e===this.gdprPrivacyProvider?this.gdprPrivacyProvider.retrieveConsentForPassback(t):e===this.tcfv2PrivacyProvider&&this.tcfv2PrivacyProvider.retrieveConsent(t)},zt.prototype.retrieveConsent=function(t){var e=this.getReadyToRetrieveProvider();void 0===e&&(R.Warning("No compatible GDPR privacy provider found"),t(void 0)),null==e||e.retrieveConsent(t)},zt.prototype.readyToRetrieve=function(){return this.tcfv2PrivacyProvider.readyToRetrieve()||this.gdprPrivacyProvider.readyToRetrieve()},zt);function zt(t,e){this.gdprPrivacyProvider=t,this.tcfv2PrivacyProvider=e}var jt=(Yt.prototype.getCMPFrame=function(){for(var t,e=this.currentWindow,i=0;i<10;++i){try{e.frames.__cmpLocator&&(t=e)}catch(t){}if(e===this.currentWindow.top)break;e=e.parent}return t},Yt.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__cmp},Yt.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},Yt.prototype.pingWithTimeout=function(r,o,t,e,i){function n(t,e){R.Warning(e),clearTimeout(t),i()}var a=this;return setTimeout(function(){var i=setTimeout(function(){n(o,"Timeout: Unable to get ping return after "+t+"ms")},t);a.executeCommand("ping",null,function(t,e){clearTimeout(i),e?(R.Debug("GDPR CMP ping returned in "+r.elapsed()+"ms"),!0!==t.cmpLoaded&&n(o,"GDPR ping returned cmpLoaded which is not true"),R.Debug("GDPR ping returned cmpLoaded which is true")):n(o,"Error sending ping to GDPR CMP")})},e)},Yt.prototype.retrieveConsent=function(i){var t=this,r=Mt.CreateRunning(),o=!1,n=setTimeout(function(){o=!0,R.Warning("Timeout: Unable to resolve GDPR consent after "+t.timeout+"ms"),i(void 0)},this.timeout),a=this.pingWithTimeout(r,n,this.pingTimeout,this.pingDelay,function(){o=!0,R.Warning("Timeout: Unable to ping GDPR API after "+t.pingTimeout+"ms"),i(void 0)});this.executeCommand("getConsentData",null,function(t,e){clearTimeout(a),o||(clearTimeout(n),e?(R.Debug("GDPR consent retrieved in "+r.elapsed()+"ms"),Yt.processConsentData(t,i)):(R.Warning("Error retrieving GDPR consent data from CMP"),i(void 0)))})},Yt.prototype.retrieveConsentForPassback=function(i){var t=this,r=Mt.CreateRunning(),o=!1,n=setTimeout(function(){o=!0,R.Warning("Timeout: Unable to resolve GDPR consent after "+t.timeout+"ms"),i(void 0)},this.timeout),a=this.pingWithTimeout(r,n,this.pingTimeout,this.pingDelay,function(){o=!0,R.Warning("Timeout: Unable to ping GDPR API after "+t.pingTimeout+"ms"),i(void 0)});this.executeCommand("getVendorConsents",[91],function(t,e){clearTimeout(a),o||(clearTimeout(n),e?(R.Debug("Consent (getVendorConsents) retrieved in "+r.elapsed()+"ms"),Yt.processConsentData(t,i)):(R.Warning("Error while calling getVendorConsents from CMP"),i(void 0)))})},Yt.processConsentData=function(t,e){if(t){var i={};void 0!==t.consentData&&(i.consentData=t.consentData),void 0!==t.gdprApplies&&(i.gdprApplies=!!t.gdprApplies),e(i)}else R.Warning("Unable to read GDPR consent data from CMP"),e(void 0)},Yt.prototype.executeCommand=function(t,e,i){var n=this;if(!this.hasCallerFunctionInFrame()){R.Debug("No GDPR CMP defined on current frame");var a=this.getCMPFrame();this.currentWindow.__cmp=function(t,e,i){if(!a)return R.Warning("GDPR CMP not found in any frame"),void i({msg:"GDPR CMP not found in any frame"},!1);var r=Math.random().toString(10),o={__cmpCall:{command:t,parameter:e,callId:r}};n.cmpCallbacks[r]=i,a.postMessage(o,"*")},this.currentWindow.addEventListener("message",function(t){var e="string"==typeof t.data?f(t.data):t.data;if(e&&e.__cmpReturn&&e.__cmpReturn.callId&&e.__cmpReturn.returnValue){var i=e.__cmpReturn;n.cmpCallbacks&&n.cmpCallbacks[i.callId]&&(n.cmpCallbacks[i.callId](i.returnValue,i.success),delete n.cmpCallbacks[i.callId])}},!1)}this.currentWindow.__cmp(t,e,i)},Yt);function Yt(t,e,i,r){void 0===e&&(e=parseInt("10000",10)),void 0===i&&(i=Math.min(e,parseInt("50",10))),void 0===r&&(r=Math.min(e,parseInt("1000",10))),this.cmpCallbacks={},this.currentWindow=t,this.timeout=e,this.pingTimeout=i,this.pingDelay=r}var Xt=(Jt.prototype.getCMPFrame=function(){for(var t,e=this.currentWindow,i=0;i<10;++i){try{e.frames.__tcfapiLocator&&(t=e)}catch(t){}if(e===this.currentWindow.top)break;e=e.parent}return t},Jt.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__tcfapi},Jt.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},Jt.prototype.pingWithTimeout=function(i,r,t,e,o){function n(t,e){R.Warning(e),clearTimeout(t),o()}var a=this;return setTimeout(function(){var e=setTimeout(function(){n(r,"Timeout: Unable to get TCFv2 ping return after "+t+"ms")},t);a.executeCommand("ping",2,function(t){clearTimeout(e),R.Debug("TCFv2 CMP ping returned in "+i.elapsed()+"ms"),"error"===t.cmpStatus?n(r,"Error status on ping to TCFv2 CMP"):(!0!==t.cmpLoaded&&n(r,"TCFv2 ping returned cmpLoaded which is not true"),R.Debug("TCFv2 ping returned cmpLoaded which is true"))})},e)},Jt.prototype.retrieveConsent=function(i){var t=this,r=Mt.CreateRunning(),o=!1,n=setTimeout(function(){o=!0,R.Warning("Timeout: Unable to resolve TCFv2 consent after "+t.timeout+"ms"),i(void 0)},this.timeout),a=this.pingWithTimeout(r,n,this.pingTimeout,this.pingDelay,function(){o=!0,R.Warning("Timeout: Unable to ping TCFv2 API after "+t.pingTimeout+"ms"),i(void 0)});this.executeCommand("getTCData",2,function(t,e){clearTimeout(a),o||(clearTimeout(n),e?(R.Debug("TCFv2 consent retrieved in "+r.elapsed()+"ms"),Jt.processResponseData(t,i)):(R.Warning("Error retrieving TCFv2 consent data from CMP"),i(void 0)))},[91])},Jt.processResponseData=function(t,e){if(t){var i={};void 0!==t.tcData&&(i.consentData=t.tcData),void 0!==t.gdprApplies&&(i.gdprApplies=!!t.gdprApplies),i.version=t.tcfPolicyVersion?t.tcfPolicyVersion:2,e(i)}else R.Warning("Unable to read GDPR consent data from CMP"),e(void 0)},Jt.prototype.executeCommand=function(t,e,i,r){var a=this;if(!this.hasCallerFunctionInFrame()){R.Debug("No TCFv2 CMP defined on current frame");var s=this.getCMPFrame();this.currentWindow.__tcfapi=function(t,e,i,r){if(!s)return R.Warning("TCFv2 CMP not found in any frame"),void i({msg:"TCFv2 CMP not found in any frame"},!1);var o=Math.random().toString(10),n={__tcfapiCall:{command:t,version:e,parameter:r,callId:o}};a.cmpCallbacks[o]=i,s.postMessage(n,"*")},this.currentWindow.addEventListener("message",function(t){var e="string"==typeof t.data?f(t.data):t.data;if(e&&e.__tcfapiReturn&&e.__tcfapiReturn.callId&&e.__tcfapiReturn.returnValue){var i=e.__tcfapiReturn;a.cmpCallbacks&&a.cmpCallbacks[i.callId]&&"function"==typeof a.cmpCallbacks[i.callId]&&(a.cmpCallbacks[i.callId](i.returnValue,i.success),delete a.cmpCallbacks[i.callId])}},!1)}this.currentWindow.__tcfapi(t,e,i,r)},Jt);function Jt(t,e,i,r){void 0===e&&(e=parseInt("10000",10)),void 0===i&&(i=Math.min(e,parseInt("50",10))),void 0===r&&(r=Math.min(e,parseInt("1000",10))),this.cmpCallbacks={},this.currentWindow=t,this.timeout=e,this.pingTimeout=i,this.pingDelay=r}var Zt=(Qt.prototype.send=function(t,e,i,r){var o=void 0!==this.data?"POST":"GET",n=this.getXMLHttpRequest(o,t,e,i,r);if(void 0!==n)n.send(this.data);else{var a=this.getXDomainRequest(o,t,e,i,r);void 0!==a&&a.send(this.data)}},Qt.prototype.getXMLHttpRequest=function(t,e,i,r,o){var n=new XMLHttpRequest;if("withCredentials"in n)return n.open(t,this.url,!0),n.timeout=o||Qt.LOCAL_PASSBACK_TIMEOUT,this.contentType?n.setRequestHeader("Content-type",this.contentType):"POST"===t&&n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.withCredentials=this.withCredentials,n.onload=function(){4===n.readyState&&200===n.status?e(n.responseText):i(n.readyState,n.status)},n.onerror=function(){i(void 0,void 0)},r&&(n.ontimeout=r),n},Qt.prototype.getXDomainRequest=function(t,e,i,r,o){if("undefined"!=typeof XDomainRequest){var n=new XDomainRequest;return n.timeout=o||Qt.LOCAL_PASSBACK_TIMEOUT,n.open(t,this.url),n.onload=function(){void 0!==n.responseText?e(n.responseText):i(void 0,void 0)},n.onerror&&(n.onerror=function(){i(void 0,void 0)}),n.ontimeout&&r&&(n.ontimeout=r),n}},Qt.LOCAL_PASSBACK_TIMEOUT=3e4,Qt);function Qt(t,e,i,r){void 0===r&&(r=!0),this.url=t,this.data=e,this.contentType=i,this.withCredentials=r}var $t,te,ee=(($t=function(t,e){return($t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}$t(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(ie,te=N),ie.prototype.setGDPRConsent=function(t){this.gdprConsent=t},ie.prototype.setCCPAIabConsent=function(t){this.ccpaIabConsent=t},ie.prototype.getMetricBuilder=function(){return this.metricBuilder},ie.prototype.getMetricsManager=function(){return this.metricsManager},ie.prototype.eval=function(t){this.evalWithTimeout(t,void 0)},ie.prototype.evalWithTimeout=function(r,t){var o=this,n=St(),e=ie.getCriteoAdapterBidRequest(),i=ie.getRequestAuctionStart(e),a=t||Ot(e&&e.timeout),s=new At(this.metricBuilder,i,a,n),d=new It(this.slots,r.context,this.metricsManager,this.urlBuilder,this.profileId,this.integrationMode,this.networkId,this.adapterVersion,{ccpaIabConsent:this.ccpaIabConsent,gdprConsent:this.gdprConsent},void 0,this.viewportComputer,a,n);if(d.isValid()&&"undefined"!=typeof JSON){var c=d.getRequest(),l=JSON.stringify(c),u=d.getUrl(),p=new Zt(u,l,"application/x-www-form-urlencoded");s.sendRequest(u),p.send(function(t){try{s.requestReceived();var e=f(t)||{},i=_t(e);void 0!==o.callbackSuccess&&o.callbackSuccess(JSON.stringify(e),i),o.metricsManager.storeMetric(s.finish(i.slots))}catch(t){o.reportAsyncRequestException(r,"onSuccess",t)}r.context.remoteLogging.sendErrorReport(o.urlBuilder,n)},function(t,e){try{s.requestReceived(),void 0!==o.callbackError&&o.callbackError(t,e),o.metricsManager.storeMetric(s.finish())}catch(t){o.reportAsyncRequestException(r,"onError",t)}r.context.remoteLogging.sendErrorReport(o.urlBuilder,n)},function(){try{s.requestReceived(!0),void 0!==o.callbackTimeout&&o.callbackTimeout(),o.metricsManager.storeMetric(s.finish())}catch(t){o.reportAsyncRequestException(r,"onTimeout",t)}r.context.remoteLogging.sendErrorReport(o.urlBuilder,n)},this.timeout)}else{if(!d.isValid()){var h="Request builder invalid";R.Error(h),r.context.remoteLogging.log("Error",h),r.context.remoteLogging.sendErrorReport(this.urlBuilder,n)}this.callbackError(void 0,void 0)}},ie.prototype.reportAsyncRequestException=function(t,e,i){var r=i.stack?i.stack:i.toString();t.context.remoteLogging.log("Exception","Exception caught in AsyncRequest "+e+" callback:\n"+r),R.Error("Error "+e+":\n\t"+r)},ie.getCriteoAdapterBidRequest=function(){try{return window.pbjs._bidsRequested.find(function(t){return"criteo"===t.bidderCode})}catch(t){return}},ie.getRequestAuctionStart=function(t){return t&&t.auctionStart},ie.NAME="directbidding",ie);function ie(t,e,i,r,o,n,a,s,d,c,l,u){var p=te.call(this,ie.NAME)||this;return p.profileId=t,p.urlBuilder=e,p.slots=i,p.metricsManager=u||new mt(t),p.metricBuilder=new at(p.metricsManager),p.callbackSuccess=r,p.callbackError=o,p.callbackTimeout=n,p.timeout=a,p.networkId=s,p.integrationMode=d,p.adapterVersion=c,p.viewportComputer=l,p}var re,oe,ne=((re=function(t,e){return(re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}re(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})(ae,oe=N),ae.prototype.eval=function(e){var i=this,t=this.gdprPrivacyProvider.readyToRetrieve(),r=this.ccpaPrivacyProvider.readyToRetrieve();if(t||r){var o,n,a=[];t&&a.push(jt),r&&a.push(Gt),t&&this.gdprPrivacyProvider.retrieveConsent(function(t){a.splice(a.indexOf("GDPR"),1),0===a.length?i.evalWithCmp(e,t,n):o=t}),r&&this.ccpaPrivacyProvider.retrieveConsent(function(t){a.splice(a.indexOf("CCPA"),1),0===a.length?i.evalWithCmp(e,o,t):n=t})}else this.evalWithCmp(e,void 0,void 0)},ae.prototype.evalWithCmp=function(t,e,i){var r=this;if(this.cache.silentModeEnabled())return R.Debug("Request ignored because the global silent mode is enabled"),this.getMetricsManager().incSilentModeRequestCount(),void this.callbackSuccess("",void 0);setTimeout(function(){return r.onTimeout()},this.timeout||3e3),this.directBiddingEvent.setGDPRConsent(e),this.directBiddingEvent.setCCPAIabConsent(i),this.directBiddingEvent.evalWithTimeout(t,this.timeout)},ae.prototype.onSuccess=function(t,e){if(this.hasResponded=!0,void 0!==e){var i=f(t);this.cache.handleResponse(this.slots,i,e,this.hasTimeouted)}this.hasTimeouted||this.callbackSuccess(t,e),this.cache.clearExpiredItems()},ae.prototype.onError=function(t,e){this.hasResponded=!0,this.hasTimeouted||this.callbackError(t,e),this.cache.clearExpiredItems()},ae.prototype.onHttpTimeout=function(){this.hasResponded=!0,this.hasTimeouted||this.callbackTimeout(),this.cache.clearExpiredItems()},ae.prototype.onTimeout=function(){if(!this.hasResponded){this.hasTimeouted=!0;var e=this.cache.getCachedBids(this.slots),t=Object.keys(e),i=t.map(function(t){return e[t]});0===Object.keys(e).length?this.callbackTimeout():(R.Debug("Cached bids returned because of timeout: ['"+i.map(function(t){return t.impid}).join("', '")+"']"),this.getMetricBuilder().withSlotIdsMatchedByCache(t),this.callbackSuccess(JSON.stringify({slots:i}),void 0))}},ae.prototype.getMetricBuilder=function(){return this.directBiddingEvent.getMetricBuilder()},ae.prototype.getMetricsManager=function(){return this.directBiddingEvent.getMetricsManager()},ae.prototype.getBidCache=function(){return this.cache},ae.NAME="directbidding",ae);function ae(t,e,i,r,o,n,a,s,d,c,l,u,p,h){var f=oe.call(this,ae.NAME)||this,v=Math.max(10*(a||3e3),3e3);return f.cache=new k(window.criteo_pubtag.context,i,s),f.directBiddingEvent=new ee(t,e,f.cache.filterNoBidSlots(i),function(t,e){return f.onSuccess(t,e)},function(t,e){return f.onError(t,e)},function(){return f.onHttpTimeout()},v,s,d,c,l,u),f.slots=i,f.callbackSuccess=r,f.callbackError=o,f.callbackTimeout=n,f.timeout=a,f.hasTimeouted=!1,f.hasResponded=!1,f.gdprPrivacyProvider=p||new Vt(new jt(window),new Xt(window)),f.ccpaPrivacyProvider=h||new Gt(window),f}var se={prebid:"criteo_fast_bid",standalone:"criteo_fast_bid_standalone",index:"criteo_fast_bid_index"};var de=(ce.LoadPolyfills=function(){ce.DefineIsArray(),ce.DefineIndexOf(),ce.DefineFilter()},ce.DefineIsArray=function(){Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)})},ce.DefineIndexOf=function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){if(void 0===e&&(e=0),void 0===this)throw new TypeError("'this' is null or not defined");var i=this.length;if(0===i)return-1;if(i<=e)return-1;for(var r=Math.max(0<=e?e:i-Math.abs(e),0);r<i;){if(r in this&&this[r]===t)return r;r++}return-1})},ce.DefineFilter=function(){Array.prototype.filter||(Array.prototype.filter=function(t){if(void 0===this||void 0===this)throw new TypeError;var e=this.length;if("function"!=typeof t)throw new TypeError;for(var i=[],r=2<=arguments.length?arguments[1]:void 0,o=0;o<e;o++)if(o in this){var n=this[o];t.call(r,n,o,this)&&i.push(n)}return i})},ce);function ce(){}var le,ue,pe=(he.SetCookie=function(t,e,i,r,o){void 0===o&&(o=!1);var n=r||document,a=n.location.hostname,s=new Date;s.setTime(s.getTime()+60*i*60*1e3);var d="expires="+s.toUTCString();if(!o)return he.setCookieString(t,e,d,void 0,n),a;for(var c=a.split("."),l=0;l<c.length;++l){var u=c.slice(c.length-l-1,c.length).join(".");he.setCookieString(t,e,d,u,n);var p=he.GetCookie(t,r);if(p&&p===e)return u}return a},he.DeleteCookie=function(t,e,i){void 0===i&&(i=!1),he.SetCookie(t,"",0,e,i)},he.GetCookie=function(t,e){for(var i=0,r=(e||document).cookie.split(";");i<r.length;i++){var o=r[i],n=o.substr(0,o.indexOf("=")).replace(/^\s+|\s+$/g,""),a=o.substr(o.indexOf("=")+1);if(n===t)return decodeURIComponent(a)}},he.setCookieString=function(t,e,i,r,o){var n=t+"="+encodeURIComponent(e)+";"+i+";";r&&""!==r&&(n+="domain=."+r+";"),o.cookie=n+"path=/"},he);function he(){}function fe(e,i){try{return decodeURIComponent(e)}catch(t){return void 0!==i?i:e}}(ue=le=le||{})[ue.None=0]="None",ue[ue.Cookie=1]="Cookie",ue[ue.LocalStorage=2]="LocalStorage";var ve=(ge.isSafariBrowser=function(){return null!==navigator.userAgent.match(ge.SAFARI_CHECK_REGEX)},ge.isAndroidBrowser=function(){return-1<navigator.userAgent.toLowerCase().indexOf("android")},ge.isFirefoxBrowser=function(){return-1<navigator.userAgent.toLowerCase().indexOf("firefox")},ge.isEdgeChromiumBrowser=function(){return-1<navigator.userAgent.toLowerCase().indexOf("edg/")},ge.isEdgeLegacyBrowser=function(){return-1<navigator.userAgent.toLowerCase().indexOf("edge/")},ge.prototype.synchronizeCriteoUid=function(t,e){var i=this;if((t||ge.isSafariBrowser()||ge.isAndroidBrowser()||ge.isFirefoxBrowser()||ge.isEdgeChromiumBrowser()||ge.isEdgeLegacyBrowser())&&(e&&(this.tcfV2ConsentString=e),this.topWin.addEventListener))if("complete"===this.topDoc.readyState)this.appendGumIframeIfDoesNotExist();else{var r=function(){i.topDoc.removeEventListener("DOMContentLoaded",r),i.topWin.removeEventListener("load",r),i.appendGumIframeIfDoesNotExist()};this.topWin.addEventListener("load",r,!1),this.topDoc.addEventListener("DOMContentLoaded",r,!1)}},ge.prototype.appendGumIframeIfDoesNotExist=function(){var n=this,t=this.createGumIframe();this.topDoc.getElementById(ge.SYNCFRAME_ID)||(this.topWin.addEventListener("message",function(t){var e=t.data;if(e&&e.isCriteoMessage)if(t.stopImmediatePropagation(),e.optout)n.setClientSideOptOut(),n.deleteClientSideUid(),n.deleteClientSideSecureId(),n.deleteBundle();else{if(e.uid&&n.setClientSideUid(e.uid),e.callbacks)for(var i=0,r="string"==typeof e.callbacks?[e.callbacks]:e.callbacks;i<r.length;i++){var o=r[i];(new Image).src=o}else e.bundle&&n.setBundle(e.bundle);e.removeSid?n.deleteClientSideSecureId():e.sid&&n.setClientSideSecureId(e.sid)}},!0),this.topDoc.body.appendChild(t))},ge.prototype.getClientSideUid=function(){return this.getFromAllStorages(ge.GUID_COOKIE_NAME)},ge.prototype.setClientSideUid=function(t){this.writeOnAllStorages(ge.GUID_COOKIE_NAME,t,ge.GUID_RETENTION_TIME_HOUR)},ge.prototype.deleteClientSideUid=function(){this.deleteFromAllStorage(ge.GUID_COOKIE_NAME)},ge.prototype.getBundle=function(){return this.getFromAllStorages(ge.BUNDLE_COOKIE_NAME)},ge.prototype.setBundle=function(t){this.writeOnAllStorages(ge.BUNDLE_COOKIE_NAME,t,ge.GUID_RETENTION_TIME_HOUR)},ge.prototype.deleteBundle=function(){this.deleteFromAllStorage(ge.BUNDLE_COOKIE_NAME)},ge.prototype.getClientSideOptOut=function(){var t=this.getFromAllStorages(ge.OPTOUT_COOKIE_NAME);return{value:"1"===t.value,origin:t.origin}},ge.prototype.setClientSideOptOut=function(){this.writeOnAllStorages(ge.OPTOUT_COOKIE_NAME,"1",ge.OPTOUT_RETENTION_TIME_HOUR)},ge.prototype.getClientSideSecureId=function(){return this.getFromAllStorages(ge.SECURE_ID_COOKIE_NAME)},ge.prototype.setClientSideSecureId=function(t){this.writeOnAllStorages(ge.SECURE_ID_COOKIE_NAME,t,ge.GUID_RETENTION_TIME_HOUR)},ge.prototype.deleteClientSideSecureId=function(){this.deleteFromAllStorage(ge.SECURE_ID_COOKIE_NAME)},ge.prototype.getClientSideLocalWebId=function(){return this.getFromAllStorages(ge.LOCAL_WEB_ID_COOKIE_NAME)},ge.prototype.checkCookiesAreWriteable=function(){var t="cto_writeable";pe.SetCookie(t,"1",1,this.topDoc,!0);var e="1"===pe.GetCookie(t,this.topDoc);return pe.DeleteCookie(t,this.topDoc,!0),e},ge.prototype.createGumIframe=function(){var t=this.topDoc.createElement("iframe");return t.src=this.buildSyncframeSrc(),t.id=ge.SYNCFRAME_ID,t.style.display="none",t},ge.prototype.writeOnAllStorages=function(t,e,i){this.localStorageEnabled&&this.localStorageHelper.setItem(t,e),pe.SetCookie(t,e,i,this.topDoc,!0)},ge.prototype.getFromAllStorages=function(t){var e,i=pe.GetCookie(t,this.topDoc);return this.localStorageEnabled&&(e=this.localStorageHelper.getItem(t)||void 0),{value:i||e,origin:(i&&le.Cookie)|(e&&le.LocalStorage)}},ge.prototype.deleteFromAllStorage=function(t){pe.DeleteCookie(t,this.topDoc,!0),this.localStorageEnabled&&this.localStorageHelper.removeItem(t)},ge.prototype.getTld=function(){var t=pe.SetCookie(ge.TLD_TEST_COOKIE_NAME,"test",1,this.topDoc,!0);return pe.DeleteCookie(ge.TLD_TEST_COOKIE_NAME,this.topDoc,!0),t},ge.prototype.buildSyncframeSrc=function(){var t,e,i=this.getClientSideUid(),r=this.getClientSideOptOut(),o=this.getClientSideSecureId(),n=this.getClientSideLocalWebId(),a=this.getBundle(),s=this.getTld(),d=encodeURIComponent((t=this.topUrl,(e=document.createElement("a")).href=t,{protocol:e.protocol,host:e.host,hostname:e.hostname,pathname:"/"===e.pathname[0]?e.pathname.slice(1):e.pathname,search:e.search,href:e.href}).hostname),c=this.canWriteCookies,l="https://gum.criteo.com/syncframe?topUrl="+d+(this.isDebug?"&debug=1":"")+(this.tcfV2ConsentString?"&gdprString="+this.tcfV2ConsentString:"");return l+="#"+JSON.stringify({optout:r,uid:i,sid:o,origin:"publishertag",version:93,lwid:n,tld:s,bundle:a,topUrl:d,cw:c})},ge.GUID_COOKIE_NAME="cto_idcpy",ge.GUID_RETENTION_TIME_HOUR=9360,ge.SECURE_ID_COOKIE_NAME="cto_sid",ge.LOCAL_WEB_ID_COOKIE_NAME="cto_lwid",ge.BUNDLE_COOKIE_NAME="cto_bundle",ge.OPTOUT_COOKIE_NAME="cto_optout",ge.OPTOUT_RETENTION_TIME_HOUR=43200,ge.TLD_TEST_COOKIE_NAME="cto_pub_test_tld",ge.SYNCFRAME_ID="criteo-syncframe",ge.SAFARI_CHECK_REGEX=/^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[^ ]+ \(KHTML, like Gecko\) Version\/([^ ]+)( Mobile\/[^ ]+)? Safari\/[^ ]+$/i,ge);function ge(t,e,i){this.isDebug=e,this.topWin=t,this.topDoc=t.document,this.localStorageHelper=new o(this.topWin),this.localStorageEnabled=this.localStorageHelper.checkLocalStorage(),this.canWriteCookies=this.checkCookiesAreWriteable(),this.topUrl=i}var me=function(t,e){this.errorType=t,this.messages=e},ye=function(t,e,i){this.environment=t,this.errors=e,this.requestId=i},Ee=(Ce.prototype.withMessage=function(t,e){return t in this.messages||(this.messages[t]=new Array),this.messages[t].push(e),this},Ce.prototype.withRequestId=function(t){return this.requestId=t,this},Ce.prototype.build=function(){var t=Array();for(var e in this.messages)null!=e&&t.push(new me(e,this.messages[e]));return new ye(this.environment,t,this.requestId)},Ce);function Ce(t){this.messages={},this.environment=t}var Ie,be,_e=(Se.prototype.reportPending=function(){return this.shouldSend},Se.prototype.sendErrorReport=function(t,e){if(this.shouldSend){void 0!==e&&this.builder.withRequestId(e);var i=this.builder.build(),r=t.buildErrorUrl();r+=this.debug?"?debug=1":"";var o=JSON.stringify(i);navigator.sendBeacon&&navigator.sendBeacon(r,o),this.shouldSend=!1,this.builder=new Ee(Se.environment)}},Se.prototype.log=function(t,e){this.shouldSend=!0,this.builder.withMessage(t,e)},Se.environment="PublisherTag Version 93",Se);function Se(t){void 0===t&&(t=!1),this.builder=new Ee(Se.environment),this.shouldSend=!1,this.debug=t}(be=Ie=Ie||{})[be.InFriendlyIframe=1]="InFriendlyIframe",be[be.InUnfriendlyIframe=2]="InUnfriendlyIframe",be[be.DirectIntegration=3]="DirectIntegration";var we=(Te.prototype.getContextFlags=function(){var t="";return t+=this.debugMode?"&debug=1":"",t+=this.noLog?"&nolog=1":""},Te.prototype.getDisplayContext=function(t){return xt.inIframe()?t.err?Ie.InUnfriendlyIframe:Ie.InFriendlyIframe:Ie.DirectIntegration},Te.prototype.getQueryStringParams=function(t){var e={},i=t.split("?");if(1<i.length)for(var r=0,o=i[1].split("&");r<o.length;r++){var n=o[r].split("=");e[fe(n[0])]=fe(n[1])}return e},Te.prototype.synchronizeCriteoUid=function(t){var e=this.cookieSynchronizerFactory();this.ctoIdOnPublisherDomain=e.getClientSideUid().value,this.isOptOut=e.getClientSideOptOut().value,this.secureId=e.getClientSideSecureId().value,this.bundle=e.getBundle().value,e.synchronizeCriteoUid(!1,t)},Te.prototype.getIdfs=function(){return["",this.secureId].join(":")},Te.prototype.setIdfs=function(t){var e=t.split(":");e[1]&&(this.secureId=e[1])},Te.prototype.computeShouldIgnoreSilentMode=function(){return Math.floor(100*Math.random())<5},Te.prototype.setSilentModeIgnored=function(){this.silentModeIgnored=!0},Te.prototype.retrievePrivacyConsent=function(e){var t=this.tcfv2PrivacyProvider.readyToRetrieve(),i=this.ccpaPrivacyProvider.readyToRetrieve();t||i||e(void 0,void 0);var r,o,n=[];t&&n.push(Xt),i&&n.push(Gt),t&&this.tcfv2PrivacyProvider.retrieveConsent(function(t){n.splice(n.indexOf("TCF"),1),0===n.length?e(o,t):r=t}),i&&this.ccpaPrivacyProvider.retrieveConsent(function(t){n.splice(n.indexOf("CCPA"),1),0===n.length?e(t,r):o=t})},Te);function Te(t,e,i,r,o){var n=this;this.charset=t.charset||t.characterSet||"";var a=xt.getHighestAccessibleWindow(e);this.displayContext=this.getDisplayContext(a),this.highestAccessibleUrl=xt.getHighestAccessibleUrl(a),this.ccpaPrivacyProvider=i||new Gt(e),this.tcfv2PrivacyProvider=o||new Xt(e),this.cookieSynchronizerFactory=r||function(){return new ve(a.topFrame,n.debugMode,n.highestAccessibleUrl)},this.retrievePrivacyConsent(function(t,e){n.ccpaPrivacyProvider.hasUserOptOut(t)||n.synchronizeCriteoUid(null===e||void 0===e?void 0:e.consentData)});var s,d=this.getQueryStringParams(this.highestAccessibleUrl);this.debugMode="1"===d.pbt_debug||!1,this.noLog="1"===d.pbt_nolog||!1,this.shouldIgnoreSilentMode=this.computeShouldIgnoreSilentMode(),this.silentModeIgnored=!1,this.remoteLogging=new _e(this.debugMode),this.debugMode&&(s=c.Debug,R.LOGLEVEL=s),this.location=e.location,this.dising=!1,this.ct0=void 0,this.wpdt0=void 0,this.isAdBlocked=void 0,this.rtaVarNames=[]}var Me=function(){this.bids={},this.lineItemRanges=[],this.impIds=[]};var Re,Ae,Pe,Oe,Be,De=(xe.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,r=t;i<r.length;i++){var o=r[i];this.events.push(o)}this.evalEvents()},xe.prototype.evalEvents=function(){for(var t=0;t<this.events.length;){var e=this.events[t];if("conditionalEvent"!==e.name||e.canEval()){var i=this.events.splice(t,1);try{i[0].eval(this)}catch(t){R.Error("An exception occurred processing an event: "+t.toString())}}else t++}},xe.VERSION=rt,xe);function xe(){this.standaloneBidder=new Me,this.events=[],this.context=new we(document,window),R.Debug("Publisher Tag loaded")}function ke(t){function e(){try{return i.apply(this,arguments)}catch(t){R.Error("Exception caught: "+t.toString())}}var i=t;for(var r in e.prototype=i.prototype,i)i.hasOwnProperty(r)&&(e[r]=i[r]);return e}window.criteo_pubtag||(de.LoadPolyfills(),window.criteo_pubtag=new De),window.Criteo=function t(e){for(var i in e)if(i in e){var r=e[i];"function"==typeof r?e[i]=ke(r):"object"==typeof r&&(e[i]=t(r))}return e}({PubTag:{Adapters:{Prebid:Wt},DirectBidding:{DirectBiddingEvent:ne,DirectBiddingSlot:wt,DirectBiddingUrlBuilder:vt,Size:g}},events:window.Criteo?window.Criteo.events:[],passbackEvents:window.Criteo?window.Criteo.passbackEvents:[],usePrebidEvents:!window.Criteo||window.Criteo.usePrebidEvents}),!1!==window.Criteo.usePrebidEvents&&(window.Criteo.events=(Re=window.Criteo.events,Ae={push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(void 0!==t)for(var i=0,r=t;i<r.length;i++){var o=r[i];"function"==typeof o&&ke(o)()}}},Re&&Array.isArray(Re)&&Ae.push.apply(Ae,Re),Ae)),Pe="prebid",Oe=new o,Be=se[Pe],Oe.checkLocalStorage()&&null===Oe.getItem(Be,864e5)&&new Zt("https://static.criteo.net/js/ld/publishertag."+Pe+".js",void 0,void 0,!1).send(function(t){Oe.setItem(Be,t,864e5)},function(t,e){R.Error("Could not update FastBid"+(e?" ("+e+")":""))})}();