static.criteo.net Open in urlscan Pro
2a02:2638:3::3  Public Scan

URL: https://static.criteo.net/js/ld/publishertag.prebid.123.js
Submission: On October 25 via api from IT — Scanned from FR

Form analysis 0 forms found in the DOM

Text Content

// Hash: cTplQbNEGjHIs2LjwY2rJAU4CAz6EUjjV96Hx2ZZhMf3/5lR3y0ULEJOYQ7d9Zm6vsQwId08aVEty9l4rGnD7FW2r/U/zMnekb/hYkFLA/YrmcNXiHYcN7F1FkQQrjOT0Eg/rYwcAYhWBJjHg4FV3qWdimFfHvh632Uh5iuYiAU=
!function(e){"use strict";var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function t(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var I=function(){return(I=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function i(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i}function r(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(o<3?r(s):3<o?r(t,i,s):r(t,i))||s);return 3<o&&s&&Object.defineProperty(t,i,s),s}function o(i,n){return function(e,t){n(e,t,i)}}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function a(e,s,a,c){return new(a=a||Promise)(function(i,t){function n(e){try{o(c.next(e))}catch(e){t(e)}}function r(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?i(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,r)}o((c=c.apply(e,s||[])).next())})}function c(i,n){var r,o,s,e,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=n.call(i,a)}catch(e){t=[6,e],o=0}finally{r=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function u(e,t){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}function l(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,o=i.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function h(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;var n=Array(e),r=0;for(t=0;t<i;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function f(e,t,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=i.apply(e,t||[]),s=[];return r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r;function n(n){o[n]&&(r[n]=function(i){return new Promise(function(e,t){1<s.push([n,i,e,t])||a(n,i)})})}function a(e,t){try{(i=o[e](t)).value instanceof v?Promise.resolve(i.value.v).then(c,u):l(s[0][2],i)}catch(e){l(s[0][3],e)}var i}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function m(n){var e,r;return e={},t("next"),t("throw",function(e){throw e}),t("return"),e[Symbol.iterator]=function(){return this},e;function t(t,i){e[t]=n[t]?function(e){return(r=!r)?{value:v(n[t](e)),done:"return"===t}:i?i(e):e}:i}}function g(c){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=c[Symbol.asyncIterator];return t?t.call(c):(c="function"==typeof l?l(c):c[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(a){e[a]=c[a]&&function(s){return new Promise(function(e,t){var i,n,r,o;s=c[a](s),i=e,n=t,r=s.done,o=s.value,Promise.resolve(o).then(function(e){i({value:e,done:r})},n)})}}}function y(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function _(e,t,i){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,i),i}var E=(S.prototype.isAdBlocked=function(e){var t=this;this.createPixel(S.allowedPixelUrl,function(){(t.allowedPixelLoaded=!0)===t.blockedPixelFailed&&e(!0)},function(){}),this.createPixel(S.blockedPixelUrl,function(){e(!1)},function(){(t.blockedPixelFailed=!0)===t.allowedPixelLoaded&&e(!0)})},S.prototype.createPixel=function(e,t,i){var n=document.createElement("img");n.src=e,n.height=1,n.width=1,n.style.display="none",n.onload=t,n.onerror=i},S.allowedPixelUrl="https://static.criteo.net/images/pixel.gif?ch=1",S.blockedPixelUrl="https://static.criteo.net/images/pixel.gif?ch=2",S);function S(){this.allowedPixelLoaded=!1,this.blockedPixelFailed=!1}var T=(A.create=function(e){return new A(e)},A.prototype.adBlockFlagEnabled=function(){var e=A.ADBLOCK_FLAG_KEY;return null!==this.localStorageHelper.getItem(e)},A.prototype.enableAdBlockFlag=function(){var e=A.ADBLOCK_FLAG_KEY;this.localStorageHelper.setItem(e,"1",A.ADBLOCK_FLAG_LIFETIME)},A.prototype.disableAdBlockFlag=function(){var e=A.ADBLOCK_FLAG_KEY;this.localStorageHelper.removeItem(e)},A.prototype.setAdBlockFlagTimer=function(e){var t=this;this.adBlockFlagEnabled()||!this.timerEnabled||this.timerStarted||(this.timerStarted=!0,setTimeout(function(){t.timerEnabled&&(t.refreshAdblockFlag(),t.timerEnabled=!1)},e))},A.prototype.disableAdBlockFlagTimer=function(){this.timerEnabled=!1,this.adBlockFlagEnabled()&&this.refreshAdblockFlag()},A.prototype.refreshAdblockFlag=function(){var t=this;(new E).isAdBlocked(function(e){e?t.enableAdBlockFlag():t.disableAdBlockFlag()})},A.ADBLOCK_FLAG_KEY="criteo_adblock_flag",A.ADBLOCK_FLAG_LIFETIME=864e5,A);function A(e){this.timerEnabled=!0,this.timerStarted=!1,this.localStorageHelper=e}function x(){return(window.criteo_pubtag_prebid_123||window.criteo_pubtag).context.getIdfs()}function P(e){(window.criteo_pubtag_prebid_123||window.criteo_pubtag).context.setIdfs(e)}function R(e){(window.criteo_pubtag_prebid_123||window.criteo_pubtag).context.ceh=e}var D=function(){};function k(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var O=(M=D,t(U,M),U.prototype.ResizeFrame=function(e,t){if(this.document.defaultView&&this.document.defaultView.frameElement){var i=this.document.defaultView.frameElement;i.width=e.toString(),i.height=t.toString()}},U.prototype.Write=function(e){this.document.open(),this.document.write(e),this.document.close()},U.prototype.LoadScript=function(e){this.Write("<script type='text/javascript' src='"+k(e)+"'><\/script>")},U),M;function U(e){var t=M.call(this)||this;return t.document=e,t}var F=(L.prototype.eval=function(e){},L);function L(e){this.name=e}var B=(N=F,t(H,N),H.prototype.eval=function(e){this.callback&&this.callback.apply(this)},H.NAME="genericEvent",H),N;function H(e){var t=N.call(this,H.NAME)||this;return t.callback=e,t}var W=(q.prototype.generateRandomId=function(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,6)},q);function q(e,t,i,n,r,o,s,a){this.id=this.generateRandomId(),this.slotId=e,this.impressionId=t,this.cpm=i,this.width=n,this.height=r,this.zoneId=o,this.dealCode=s,this.useSafeframe=null!=a&&a}var z=(G=W,t(V,G),V.prototype.GenerateEvent=function(e){var t=this;return e.ResizeFrame(this.width,this.height),new B(function(){return e.LoadScript(t.displayUrl)})},V.prototype.GenerateMessage=function(){return{displayUrl:this.displayUrl}},V),G;function V(e,t,i,n,r,o,s,a,c){var u=G.call(this,e,t,i,n,r,o,a,c)||this;return u.displayUrl=s,u}var j=(K=W,t(J,K),J.prototype.GenerateEvent=function(e){var t=this;return e.ResizeFrame(this.width,this.height),new B(function(){return e.Write(t.creative)})},J.prototype.GenerateMessage=function(){return{creative:this.creative}},J),K,X,Y;function J(e,t,i,n,r,o,s,a,c){var u=K.call(this,e,t,i,n,r,o,a,c)||this;return u.creative=s,u}Y=X=X||{},Y[Y.Error=0]="Error",Y[Y.Warning=1]="Warning",Y[Y.Debug=2]="Debug";var Q=["color: #fff;","background: #ff8f1c;","display: inline-block;","padding: 1px 4px;","border-radius: 3px;"].join(" "),$=(Z.Log=function(e,t){if(!(Z.LOGLEVEL<e)){var i=X[e].toUpperCase(),n=window.navigator.userAgent,r=0<n.indexOf("MSIE ")||0<n.indexOf("Trident/");window.console&&(r?console.log("[PubTag] "+i+": "+t):console.log("%cPubTag",Q,i+": "+t))}},Z.Debug=function(e){Z.Log(X.Debug,e)},Z.Warning=function(e){Z.Log(X.Warning,e)},Z.Error=function(e){Z.Log(X.Error,e)},Z.LOGLEVEL=X.Error,Z);function Z(){}function ee(e){$.LOGLEVEL=e}var te=(ie=W,t(ne,ie),ne.prototype.GenerateEvent=function(e){var t=this;return"function"!=typeof this.nativeCallback?($.Error("'nativeCallback' parameter is not a function in placements object"),new B(void 0)):"object"!=typeof this.nativePayload?($.Error("'nativePayload' parameter is not an object in placements object"),new B(void 0)):new B(function(){return t.nativeCallback(t.nativePayload)})},ne.prototype.GenerateMessage=function(){return{nativePayload:this.nativePayload}},ne),ie;function ne(e,t,i,n,r,o,s,a,c){var u=ie.call(this,e,t,i,n,r,o,c)||this;return u.nativeCallback=s,u.nativePayload=a,u}var re=(oe=W,t(se,oe),se.prototype.GenerateEvent=function(e){var t=this;return"function"!=typeof this.videoCallback?($.Error("'videoCallback' parameter is not a function in video object"),new B(void 0)):new B(function(){return t.videoCallback(t.GenerateMessage())})},se.prototype.GenerateMessage=function(){return{vastUrl:this.vastUrl,vastXml:this.vastXml,slotid:this.impressionId,cpm:this.cpm}},se),oe;function se(e,t,i,n,r,o,s,a,c,u){var l=oe.call(this,e,t,i,n,r,o,a)||this;return l.videoCallback=s,l.vastUrl=c,l.vastXml=u,l}function ae(e,t,i,n,r,o,s,a,c,u,l,d,p,h){if(d)return new re(e,t,i,n,r,o,p,l,c,u);if(void 0!==s&&void 0!==a)return new te(e,t,i,n,r,o,s,a,l);if(void 0!==u&&0!==u.indexOf("<script"))return new j(e,t,i,n,r,o,u,l,h);if(void 0!==u&&0===u.indexOf("<script")){var v=new RegExp("(?<=src='|\")(.*)(?='|\")"),f=u.match(v);if(null!==f&&0<f.length)return new z(e,t,i,n,r,o,f[0],l,h)}return void 0!==c?new z(e,t,i,n,r,o,c,l,h):void 0}var ce=(ue.prototype.getMetricsManager=function(){return this.metricsManager},ue.prototype.withElapsed=function(e){return this.elapsed=Math.round(e),this},ue.prototype.withIsTimeout=function(e){return(this.isTimeout=e)&&this.events.push({eventId:"CdbCallTimeout"}),this},ue.prototype.withAdapterStartElapsed=function(e){return this.adapterStartElapsed=Math.round(e),this.events.push({eventId:"AdapterBidStart",elapsed:this.adapterStartElapsed}),this},ue.prototype.withCdbCallStartElapsed=function(e){return this.cdbCallStartElapsed=Math.round(e),this.events.push({eventId:"CdbCallStart",elapsed:this.cdbCallStartElapsed}),this},ue.prototype.withCdbCallEndElapsed=function(e){return this.cdbCallEndElapsed=Math.round(e),this.events.push({eventId:"CdbCallEnd",elapsed:this.cdbCallEndElapsed}),this},ue.prototype.withAdapterEndElapsed=function(e){return this.adapterEndElapsed=Math.round(e),this.events.push({eventId:"AdapterBidEnd",elapsed:this.adapterEndElapsed}),this},ue.prototype.withAdapterTimeout=function(e){return this.adapterTimeout=e&&Math.round(e),this},ue.prototype.withTimeToFirstByte=function(e){return this.timeToFirstByte=e&&Math.round(e),this.timeToFirstByte&&this.events.push({eventId:"TimeToFirstByte",elapsed:this.timeToFirstByte}),this},ue.prototype.withConnectionEstablishmentTime=function(e){return this.connectionEstablishmentTime=e&&Math.round(e),this.connectionEstablishmentTime&&this.events.push({eventId:"TcpConnectionElapsedTime",elapsed:this.connectionEstablishmentTime}),this},ue.prototype.withDomainLookupTime=function(e){return this.domainLookupTime=e&&Math.round(e),this.domainLookupTime&&this.events.push({eventId:"DomainLookupElapsedTime",elapsed:this.domainLookupTime}),this},ue.prototype.withUserPreviousTimestamp=function(e){return e&&this.events.push({eventId:"UserReturnTime",elapsed:(new Date).getTime()-e}),this},ue.prototype.buildEvents=function(e){if(this.events.length){var t={requestId:e,events:this.events};return void 0!==this.adapterTimeout&&this.adapterEndElapsed>this.adapterTimeout&&t.events.push({eventId:"AdapterTimeout"}),t}},ue.prototype.clear=function(){this.events=[]},ue);function ue(e){this.elapsed=0,this.isTimeout=!1,this.adapterStartElapsed=0,this.cdbCallStartElapsed=0,this.cdbCallEndElapsed=0,this.adapterEndElapsed=0,this.slotIdsMatchedByCache=[],this.events=[],this.metricsManager=e}function le(e){try{return JSON.parse(e)}catch(e){return}}var de=(ve.generateCacheBuster=function(){return Math.floor(99999999999*Math.random())},ve),pe,he;function ve(){}function fe(e){switch(e.toLowerCase()){case"amp":return pe.AMP;default:return pe.Unspecified}}he=pe=pe||{},he[he.Unspecified=0]="Unspecified",he[he.AMP=1]="AMP";var me=123,ge=(ye.prototype.buildUrl=function(e,t,i,n,r){void 0===i&&(i=pe.Unspecified);var o=ye.CRITEO_BIDDER_URL+this.getHandlerPath();return o+="?ptv="+me,!0===t.isAdBlocked&&(o+="&abp=1"),o=this.appendCommonParameters(o,e,n,r),o+=t.ctoIdOnPublisherDomain?"&idcpy="+t.ctoIdOnPublisherDomain:"",o+=t.secureId?"&sid="+t.secureId:"",o+=t.isOptOut?"&optout=1":"",o+=t.bundle?"&bundle="+t.bundle:"",i!==pe.Unspecified&&(o+="&im="+i),o+="&cb="+String(de.generateCacheBuster()),o+=t.getContextFlags()},ye.prototype.buildErrorUrl=function(){return ye.CRITEO_BIDDER_URL+ye.CRITEO_ERROR_HANDLER},ye.prototype.buildCsmEventsUrl=function(){return ye.CRITEO_BIDDER_URL+ye.CRITEO_CSM_EVENTS_HANDLER},ye.prototype.buildCsmCountersUrl=function(){return ye.CRITEO_BIDDER_URL+ye.CRITEO_CSM_COUNTERS_HANDLER},ye.prototype.appendCommonParameters=function(e,t,i,n){return e+="&profileId="+String(t),void 0!==i&&(e+="&av="+String(i)),void 0!==n&&(e+="&wv="+encodeURIComponent(n)),e},ye.prototype.getHandlerPath=function(){return this.auditMode?ye.CRITEO_BIDDER_AUDIT_HANDLER:ye.CRITEO_BIDDER_HANDLER},ye.CRITEO_BIDDER_URL="https://bidder.criteo.com/",ye.CRITEO_BIDDER_HANDLER="cdb",ye.CRITEO_CSM_HANDLER="csm",ye.CRITEO_CSM_EVENTS_HANDLER="csm/events",ye.CRITEO_CSM_COUNTERS_HANDLER="csm/counters",ye.CRITEO_ERROR_HANDLER="error",ye.CRITEO_BIDDER_AUDIT_HANDLER="prebid/audit",ye);function ye(e){void 0===e&&(e=!1),this.auditMode=e}var we=(be.prototype.sendEventsToBeacon=function(e,t){navigator.sendBeacon&&e&&navigator.sendBeacon(t,JSON.stringify(e))},be);function be(){this.urlBuilder=new ge}var Ce=(_e=we,t(Ee,_e),Ee.prototype.getManagerMetrics=function(){var e=this.localStorageHelper.getItem(Ee.MANAGER_METRICS_STORAGE_KEY);if(null==e)return{};var t=le(e);return void 0===t?{}:t},Ee.prototype.setManagerMetrics=function(e){this.localStorageHelper.setItem(Ee.MANAGER_METRICS_STORAGE_KEY,JSON.stringify(e))},Ee.prototype.getLocalStorageKeyCount=function(){return this.localStorageHelper.getAllItemsByPrefix("criteo_").length+this.localStorageHelper.getAllItemsByPrefix("cto_").length},Ee.prototype.getPreviousBuildRequestTimestamp=function(){var e=this.getManagerMetrics().previousBuildRequestTimestamp;return isNaN(e)?void 0:e},Ee.prototype.resetPreviousBuildRequestTimestamp=function(){var e=this.getManagerMetrics();e.previousBuildRequestTimestamp=(new Date).getTime().toString(),this.setManagerMetrics(e)},Ee.prototype.sendEvents=function(e,t,i){void 0===i&&(i=!1),i&&(e.withUserPreviousTimestamp(this.getPreviousBuildRequestTimestamp()),this.resetPreviousBuildRequestTimestamp()),this.sendEventsToBeacon(e.buildEvents(t),this.urlBuilder.buildCsmEventsUrl()),e.clear()},Ee.MANAGER_METRICS_STORAGE_KEY="criteo_pt_cdb_mngr_metrics",Ee),_e;function Ee(e){var t=_e.call(this)||this;return t.localStorageHelper=e,t}var Se=(Ie.tryInsertPlaceholder=function(e,t,i){var n=document.getElementById(e);if(null===n)return $.Warning("Unable to insert ad placeholder : impression id "+e+" not found."),!1;if(n.appendChild(this.createPlaceholder()),!t&&this.isVisible(n))return!0;this.removePlaceholder(e,i);var r=n.parentElement;if(null===r)return!1;var o=this.createClone(n);return r.insertBefore(o,n),o.appendChild(this.createPlaceholder()),this.isVisible(o)?(i[e]=o,!0):($.Warning("Ad placeholder created but not visible : can't render."),r.removeChild(o),!1)},Ie.isVisible=function(e){return 0!==e.offsetWidth&&0!==e.offsetHeight&&0!==e.getClientRects().length},Ie.createClone=function(e){var t=e.cloneNode(!1);return t.id=this.generateRandomId(),t.className="","none"===t.style.display&&t.style.removeProperty("display"),"SPAN"===t.tagName&&(t.style.display="block"),e.style.display="none",t},Ie.generateRandomId=function(){for(var e="1234567890abcdefghijklmnopqrstuvwxyz",t="",i=0;i<20;i++){var n=Math.floor(Math.random()*e.length);t+=e.charAt(n)}return t},Ie.createPlaceholder=function(){var e=document.createElement("div");return e.style.width="1px",e.style.height="1px",e.style.display="block",e.className=Ie.PLACEHOLDER_NAME,e},Ie.removePlaceholder=function(e,t){var i=t[e];void 0!==i&&null!==i.parentNode&&i.parentNode.removeChild(i);var n=document.getElementById(e);if(null!==n)for(var r=0,o=n.getElementsByClassName(Ie.PLACEHOLDER_NAME);r<o.length;r++){var s=o[r];null!==s.parentNode&&s.parentNode.removeChild(s)}},Ie.insertAdIFrame=function(e,t){var i,n=t[e];if(void 0!==n)i=n;else{var r=document.getElementById(e);if(null===r)return null;i=r}for(var o=0,s=i.getElementsByClassName(Ie.PLACEHOLDER_NAME);o<s.length;o++){for(var a=s[o],c=0,u=a.childNodes;c<u.length;c++){var l=u[c];null!==l.parentNode&&l.parentNode.removeChild(l)}var d=this.createAdIFrame();return a.appendChild(d),a.style.width="",a.style.height="",a.style.display="",d}return null},Ie.createAdIFrame=function(){var e=document.createElement("iframe");return e.scrolling="no",e.marginWidth="0",e.marginHeight="0",e.frameBorder="0",e.style.border="0",e.style.verticalAlign="bottom",e},Ie.removePlaceholders=function(e,t,i){for(var n=0,r=e;n<r.length;n++){var o=r[n].impId;-1===t.indexOf(o)&&Ie.removePlaceholder(o,i)}},Ie.tryInsertPlaceholders=function(e,t,i){for(var n=[],r=0,o=e;r<o.length;r++){var s=o[r],a=s.impId;Ie.tryInsertPlaceholder(a,t,i)&&n.push(s)}return n},Ie.PLACEHOLDER_NAME="criteo_placeholder",Ie);function Ie(){}var Te=(Ae.prototype.isValid=function(){return 0<this.slots.length},Ae.prototype.getRequest=function(){for(var e=[],t=0,i=this.slots;t<i.length;t++){var n=i[t],r={slotid:n.slotId,impid:n.impId};if(void 0!==n.zoneId&&(r.zoneid=n.zoneId),void 0!==n.nativeCallback&&(r.native=!0),void 0!==n.transactionId&&(r.transactionid=n.transactionId),void 0!==n.publisherSubId&&(r.publishersubid=n.publisherSubId),void 0!==n.sizes){for(var o=[],s=0,a=n.sizes;s<a.length;s++){var c=a[s];o.push(c.width+"x"+c.height)}r.sizes=o}if(void 0!==n.video){var u={playersizes:this.parsePlayerSizes(n.video.playersize),mimes:n.video.mimes,protocols:n.video.protocols,maxduration:n.video.maxduration,api:n.video.api,skip:n.video.skip,placement:n.video.placement,playbackmethod:n.video.playbackmethod,minduration:n.video.minduration,startdelay:n.video.startdelay};r.video=u}if(void 0!==this.viewportComputer){var l=this.viewportComputer.getSlotPosition(n);void 0!==l&&(r.position={top:l.top,left:l.left})}void 0!==n.ext&&(r.ext=n.ext),e.push(r)}var d={ceh:this.context.ceh,uspOptout:this.context.ccpaOptout,ext:this.context.getUserExtWithContextualData()},p={publisher:{url:this.context.highestAccessibleUrl,ext:this.context.getPublisherExt()},slots:e,user:d};if(void 0!==this.networkId&&(p.publisher.networkid=this.networkId),this.privacyWrapper&&(this.privacyWrapper.gdprConsent&&(p.gdprConsent=this.privacyWrapper.gdprConsent),this.privacyWrapper.ccpaIabConsent&&(d.uspIab=this.privacyWrapper.ccpaIabConsent.uspString)),void 0!==this.viewportComputer){var h=this.viewportComputer.getViewport();p.viewport={width:h.width,height:h.height,scrollTop:h.scrollTop,scrollLeft:h.scrollLeft}}return void 0!==this.adapterTimeout&&(p.tmax=this.adapterTimeout),void 0!==this.auctionStart&&(p.auctionStart=this.auctionStart),void 0!==this.clientRequestId&&(p.id=this.clientRequestId),void 0!==this.userIds&&(p.eids=this.userIds),void 0!==this.schain&&(p.source={ext:{schain:this.schain}}),p},Ae.parsePlayerSize=function(e){return e[0]+"x"+e[1]},Ae.prototype.parsePlayerSizes=function(e){return e?Array.isArray(e[0])?e.map(function(e){return Ae.parsePlayerSize(e)}):[Ae.parsePlayerSize(e)]:e},Ae.prototype.getUrl=function(){return this.urlBuilder.buildUrl(this.profileId,this.context,this.integrationMode,this.adapterVersion,this.wrapperVersion)},Ae);function Ae(e,t,i,n,r,o,s,a,c,u,l,d,p,h,v){this.slots=e,this.context=t,this.urlBuilder=i,this.profileId=n,this.integrationMode=r||pe.Unspecified,this.networkId=o,this.adapterVersion=s,this.privacyWrapper=a,this.wrapperVersion=c,this.viewportComputer=u,this.adapterTimeout=l,this.clientRequestId=d,this.userIds=p,this.auctionStart=h,this.schain=v}function xe(e){var t={slots:void 0,time_to_next_call:0};return void 0!==e.exd&&(void 0!==e.exd.time_to_next_call&&(t.time_to_next_call=e.exd.time_to_next_call),t.slots=e.exd.slots,delete e.exd),t}function Pe(){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(e){var t=(i+16*Math.random())%16|0;return i=Math.floor(i/16),("x"===e?t:3&t|8).toString(16)})}var Re=function(e,t,i,n,r,o,s,a,c){this.slotId=Pe().replace(/-/g,""),this.impId=e,this.zoneId=t,this.nativeCallback=i,this.transactionId=n,this.sizes=r,this.publisherSubId=o,this.mediaTypes=s,this.video=a,this.ext=c},De=function(e,t,i,n,r,o,s,a,c,u,l){this.playersize=e,this.mimes=t,this.protocols=i,this.maxduration=n,this.api=r,this.skip=o,this.placement=s,this.playbackmethod=a,this.minduration=c,this.startdelay=u,this.videoCallback=l},ke=(Oe.CreateRunning=function(){var e=new Oe;return e.start(),e},Oe.CreateWithStartTime=function(e){var t=new Oe(!1);return t.startTime=e,t},Oe.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},Oe.prototype.start=function(){this.startTime=this.now()},Oe.prototype.elapsed=function(){return this.now()-this.startTime},Oe);function Oe(e){void 0===e&&(e=!0),e&&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()}}function Me(e){if(window.performance&&window.performance.getEntries)for(var t=window.performance.getEntries(),i=t.length-1;0<=i;--i){var n=t[i];if(n.name===e&&n.duration)return Math.round(n.duration)}}var Ue=(Fe.prototype.sendRequest=function(e){this.url=e,this.sendTime=ke.CreateRunning(),this.builder.withCdbCallStartElapsed(this.timer.elapsed())},Fe.prototype.requestReceived=function(e){void 0===e&&(e=!1),this.builder.withElapsed(Me(this.url)||this.sendTime.elapsed()),this.builder.withCdbCallEndElapsed(this.timer.elapsed()),this.builder.withIsTimeout(e)},Fe.prototype.finish=function(){this.builder.withAdapterEndElapsed(this.timer.elapsed());var e=Fe.getLastCdbTiming();void 0!==e&&(this.builder.withTimeToFirstByte(Fe.computeTimeToFirstByte(e)),this.builder.withConnectionEstablishmentTime(Fe.computeConnectionEstablishmentTime(e)),this.builder.withDomainLookupTime(Fe.computeDomainLookupTime(e)))},Fe.getLastCdbTiming=function(){if(void 0!==window.performance&&void 0!==window.performance.getEntriesByType&&"function"==typeof window.performance.getEntriesByType){var e=window.performance.getEntriesByType("resource");if(void 0!==e){var t=e.filter(function(e){return 0<=e.name.indexOf("cdb")});return void 0!==t&&0<t.length?t[t.length-1]:void 0}}},Fe.computeTimeToFirstByte=function(e){var t=e.responseStart,i=e.requestStart;if(void 0!==t&&void 0!==i)return t-i},Fe.computeConnectionEstablishmentTime=function(e){var t=e.connectEnd-e.connectStart;return isNaN(t)?void 0:t},Fe.computeDomainLookupTime=function(e){var t=e.domainLookupEnd-e.domainLookupStart;return isNaN(t)?void 0:t},Fe);function Fe(e,t,i){this.builder=e,this.timer=void 0!==t?ke.CreateWithStartTime(t):ke.CreateRunning();var n=this.timer.elapsed();this.builder.withAdapterStartElapsed(n),void 0!==i&&this.builder.withAdapterTimeout(i)}var Le=(Be.prototype.toString=function(){return this.width+"x"+this.height},Be);function Be(e,t){this.width=e,this.height=t}function Ne(e){var t="number"==typeof window.PREBID_TIMEOUT?window.PREBID_TIMEOUT:void 0;return e&&t?Math.min(e,t):e||t||void 0}var He=function(e,t){this.top=e,this.left=t},We=function(e,t,i,n){this.width=e,this.height=t,this.scrollTop=i,this.scrollLeft=n},qe=(ze.getHighestAccessibleWindow=function(e){var t=e,i=!1;try{for(;t.parent.document!==t.document;){if(!t.parent.document){i=!0;break}t=t.parent}}catch(e){i=!0}return{topFrame:t,err:i}},ze.getHighestAccessibleUrl=function(e){var t=e.topFrame;if(!e.err)return t.location.href;try{var i=t.top.location.href;if(i)return i}catch(e){}try{var n=t.location.ancestorOrigins;if(n)return n[n.length-1]}catch(e){}return t.document.referrer},ze.inIframe=function(){try{return window.self!==window.top}catch(e){return!0}},ze);function ze(){}var Ge=(Ve.prototype.getViewport=function(){var e=qe.getHighestAccessibleWindow(window).topFrame,t=e.document,i=e.innerWidth||t.documentElement.clientWidth,n=e.innerHeight||t.documentElement.clientHeight,r=t.documentElement.scrollTop||t.body&&t.body.scrollTop||0,o=t.documentElement.scrollLeft||t.body&&t.body.scrollLeft||0;return new We(i,n,r,o)},Ve.prototype.getSlotPosition=function(e){var t=e.impId,i=document.getElementById(t);if(null!==i){var n=i.getBoundingClientRect();return new He(n.top,n.left)}},Ve);function Ve(){}function je(e){try{return e.localStorage}catch(e){return}}var Ke=(Xe.prototype.checkLocalStorage=function(e){if(!this.localStorage)return!1;var t=this.CHECK_STORAGE_KEY;try{return this.localStorage.setItem(t,t),this.localStorage.removeItem(t),!!this.checkTcfPurposeOne(e)||($.Debug("Purpose One not granted"),!1)}catch(e){return!1}},Xe.prototype.checkTcfPurposeOne=function(e){return!e||!e.purposes||!0===e.purposes[1]},Xe.prototype.removeItem=function(e){this.localStorageEnabled&&(this.localStorage.removeItem(e),this.localStorage.removeItem(e+this.EXPIRE_SUFFIX))},Xe.prototype.getItem=function(e,t){if(!this.localStorageEnabled)return null;var i=(new Date).getTime(),n=this.localStorage.getItem(e+this.EXPIRE_SUFFIX),r=n?parseInt(n,10):-1;return-1!==r&&r<i||t&&(-1===r||t<r-i)?(this.removeItem(e),null):this.localStorage.getItem(e)},Xe.prototype.setItem=function(e,t,i){if(this.localStorageEnabled)try{if(this.localStorage.setItem(e,t),i){var n=(new Date).getTime()+i;this.localStorage.setItem(e+this.EXPIRE_SUFFIX,n.toString())}}catch(e){}},Xe.prototype.getAllItemsByPrefix=function(e){var t=[];if(this.localStorageEnabled)for(var i in localStorage)0===i.indexOf(e)&&t.push(i);return t},Xe);function Xe(e,t){this.EXPIRE_SUFFIX="_expires",this.CHECK_STORAGE_KEY="criteo_localstorage_check",this.localStorage=je(e||window),this.localStorageEnabled=this.checkLocalStorage(t)}var Ye=(Je.prototype.send=function(e,t,i,n){var r=void 0!==this.data?"POST":"GET",o=this.getXMLHttpRequest(r,e,t,i,n);if(void 0!==o)o.send(this.data);else{var s=this.getXDomainRequest(r,e,t,i,n);void 0!==s&&s.send(this.data)}},Je.prototype.getXMLHttpRequest=function(e,t,i,n,r){var o=new XMLHttpRequest;if("withCredentials"in o)return o.open(e,this.url,!0),o.timeout=r||Je.LOCAL_PASSBACK_TIMEOUT,this.contentType?o.setRequestHeader("Content-type",this.contentType):"POST"===e&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.withCredentials=this.withCredentials,o.onload=function(){4===o.readyState&&200===o.status?t(o.responseText):i(o.readyState,o.status)},o.onerror=function(){i(void 0,void 0)},n&&(o.ontimeout=n),o},Je.prototype.getXDomainRequest=function(e,t,i,n,r){if("undefined"!=typeof XDomainRequest){var o=new XDomainRequest;return o.timeout=r||Je.LOCAL_PASSBACK_TIMEOUT,o.open(e,this.url),o.onload=function(){void 0!==o.responseText?t(o.responseText):i(void 0,void 0)},o.onerror&&(o.onerror=function(){i(void 0,void 0)}),o.ontimeout&&n&&(o.ontimeout=n),o}},Je.LOCAL_PASSBACK_TIMEOUT=3e4,Je);function Je(e,t,i,n){void 0===n&&(n=!0),this.url=e,this.data=t,this.contentType=i,this.withCredentials=n}var Qe=($e.prototype.retrievePixels=function(e,t,i){var n=this;new Ye(this.getUserSyncUrl(e,t,i)).send(function(e){if(e){var t=$e.parseUserSyncResponse(e);t?n.onPixelsRetrieved(t):n.errorReporter.log("Error","Unable to parse response from user sync")}},function(e,t){$.Warning("User Sync Pixel endpoint error; readyState "+e+"; requestStatus "+t)},function(){$.Warning("User Sync Pixel endpoint timeout")},this.pixelSyncTimeout)},$e.prototype.getUserSyncUrl=function(e,t,i){var n=[];return(null==e?void 0:e.consentData)&&n.push("gdpr="+e.consentData),(null==e?void 0:e.gdprApplies)&&n.push("gdprapplies="+e.gdprApplies),(null==t?void 0:t.uspString)&&n.push("ccpa="+t.uspString),(null==i?void 0:i.country_code)&&n.push("countrycode="+i.country_code),this.debug&&n.push("debug=1"),this.pixelSyncEndpoint+(n.length?"?"+n.join("&"):"")},$e.parseUserSyncResponse=function(e){var t=le(e);return t?("pixels"in t?Array.isArray(t.pixels)?t.pixels=t.pixels.filter(function(t){try{return new URL(t),!0}catch(e){return $.Warning("Failed to parse User Sync Pixel URL: "+t),!1}}):($.Warning("pixels field in user sync response is not an array: "+t.pixels),t.pixels=[]):t.pixels=[],t):void $.Warning("Failed to parse user sync pixel JSON payload")},$e);function $e(e,t,i){void 0===i&&(i=!1),this.pixelSyncEndpoint="https://ssp-sync.criteo.com/user-sync/pixels",this.pixelSyncTimeout=2e3,this.errorReporter=t,this.onPixelsRetrieved=e,this.debug=i}var Ze=(et.execUserSync=function(e,t,i,n,r){void 0===r&&(r=!1),new Qe(et.appendUserSyncPixels,e,r).retrievePixels(t,i,n)},et.getOrCreateTagContainer=function(){var e=document.getElementById(et.tagElementName);if(e)return e;var t=document.createElement("div");return t.setAttribute("id",et.tagElementName),t.style.display="none",document.body.appendChild(t),t},et.appendUserSyncPixels=function(e){if(e.pixels.length)for(var t=et.getOrCreateTagContainer(),i=0,n=e.pixels;i<n.length;i++){var r=n[i],o=new Image;o.src=r,o.alt="",t.appendChild(o)}},et.tagElementName="criteoUserSyncTagsContainer",et);function et(){}function tt(e,t){if(e){var i;try{i=eval("(function(){return "+e+"})()")}catch(e){return void $.Error("Error evaluating the function: "+e)}if("function"==typeof i)return i.apply(i,t);$.Error("The passed value is not a function")}else $.Error("Cannot execute an empty function")}var it=280,nt=5e3,rt,ot;ot=rt=rt||{},ot.Native="native",ot.Banner="banner",ot.Video="video";var st=(at.prototype.hasValidNativeParams=function(e){return!(e.nativeParams&&(e.nativeParams.image&&(!0!==e.nativeParams.image.sendId||!0===e.nativeParams.image.sendTargetingKeys)||e.nativeParams.icon&&(!0!==e.nativeParams.icon.sendId||!0===e.nativeParams.icon.sendTargetingKeys)||e.nativeParams.clickUrl&&(!0!==e.nativeParams.clickUrl.sendId||!0===e.nativeParams.clickUrl.sendTargetingKeys)||e.nativeParams.displayUrl&&(!0!==e.nativeParams.displayUrl.sendId||!0===e.nativeParams.displayUrl.sendTargetingKeys)||e.nativeParams.privacyLink&&(!0!==e.nativeParams.privacyLink.sendId||!0===e.nativeParams.privacyLink.sendTargetingKeys)||e.nativeParams.privacyIcon&&(!0!==e.nativeParams.privacyIcon.sendId||!0===e.nativeParams.privacyIcon.sendTargetingKeys)))},at.prototype.buildCdbUrl=function(){return this.url},at.prototype.buildCdbRequest=function(){if(this.requestBuilder.isValid()){var e=Math.min((this.timeout||nt)+1e3,nt);return this.adBlockFlagManager.setAdBlockFlagTimer(e),this.timer.sendRequest(this.url),this.requestBuilder.getRequest()}$.Debug("Request ignored because it doesnt contain any slot")},at.GetAllAdapters=function(){return(window.Criteo_prebid_123||window.Criteo).prebid_adapters},at.GetAdapter=function(e){var t="string"==typeof e?e:e.bidRequests[0].auctionId,i=at.GetAllAdapters();if(i&&t in i)return i[t]},at.isPrebid3OrAbove=function(e){if(null==e)return!1;var t=parseInt(e,10);return t!=Number.NaN&&3<=t},at.createCriteoNativeAdWithCallback=function(e,t,i){var n=k(e);return window.criteo_prebid_native_slots=window.criteo_prebid_native_slots||{},window.criteo_prebid_native_slots[n]={callback:i,payload:t},'<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["'+n+'"];\n                    responseSlot.callback(responseSlot.payload);\n                    break;\n                }\n            }\n        <\/script>'},at.createPrebidNativeAd=function(e){return{sendTargetingKeys:!1,title:e.products[0].title,body:e.products[0].description,sponsoredBy:e.advertiser.description,icon:e.advertiser.logo,image:e.products[0].image,clickUrl:e.products[0].click_url,privacyLink:e.privacy.optout_click_url,privacyIcon:e.privacy.optout_image_url,cta:e.products[0].call_to_action,price:e.products[0].price,impressionTrackers:e.impression_pixels.map(function(e){return e.url})}},at.prototype.getBidRequestForSlot=function(e){for(var t=0,i=this.bidRequests;t<i.length;t++){var n=i[t];if(n.adUnitCode===e.impid&&(!n.params.zoneId||parseInt(n.params.zoneId,10)===e.zoneid))return n}},at.prototype.getSlotForAdUnitCode=function(e){for(var t=0,i=this.slots;t<i.length;t++){var n=i[t];if(n&&n.impId===e)return n}},at.getVideoInfoFromBidRequest=function(e){var t,i,n,r,o;if(at.hasVideoMediaType(e))return new De(e.mediaTypes.video.playerSize,e.mediaTypes.video.mimes,e.mediaTypes.video.protocols,e.mediaTypes.video.maxduration,e.mediaTypes.video.api,e.mediaTypes.video.skip||(null===(t=e.params.video)||void 0===t?void 0:t.skip)||0,e.mediaTypes.video.placement||(null===(i=e.params.video)||void 0===i?void 0:i.placement),e.mediaTypes.video.playbackmethod||(null===(n=e.params.video)||void 0===n?void 0:n.playbackmethod),e.mediaTypes.video.minduration||(null===(r=e.params.video)||void 0===r?void 0:r.minduration),e.mediaTypes.video.startdelay||(null===(o=e.params.video)||void 0===o?void 0:o.startdelay)||0)},at.hasVideoMediaType=function(e){var t,i,n;return 0<(null===(n=null===(i=null===(t=null==e?void 0:e.mediaTypes)||void 0===t?void 0:t.video)||void 0===i?void 0:i.playerSize)||void 0===n?void 0:n.length)},at.prototype.interpretResponse=function(e,t){var i,n,r,o,s,a,c,u=window.criteo_pubtag_prebid_123||window.criteo_pubtag;this.timer.requestReceived(),this.adBlockFlagManager.disableAdBlockFlagTimer();var l=xe(e),d={};if(void 0!==l.slots)for(var p=0,h=l.slots;p<h.length;p++)d[(g=h[p]).imp_id]=g;var v=[];if(e.slots&&Array.isArray(e.slots))for(var f=0,m=e.slots;f<m.length;f++){var g=m[f],y=this.getBidRequestForSlot(g);if(y)if(!0===u.context.isAdBlocked){if(void 0!==(E=ae(g.slotid,g.impid,g.cpm,g.width,g.height,g.zoneid,y.params.nativeCallback,g.native,g.displayurl,g.creative,g.deal,null===(i=d[g.slotid])||void 0===i?void 0:i.enable_safeframe))&&Se.tryInsertPlaceholder(y.adUnitCode,!0,u.context.cloneByImpressionId)){var w=Se.insertAdIFrame(y.adUnitCode,u.context.cloneByImpressionId);if(null!=w){var b=new O(w.contentDocument);E.GenerateEvent(b).eval(window.criteo_pubtag_prebid_123)}}}else{var C=y.bidId,_=g.ttl||d[g.slotid]&&d[g.slotid].ttl||60,E={requestId:C,adId:Pe(),cpm:g.cpm,currency:g.currency,netRevenue:!0,ttl:_,creativeId:g.creativecode||C,width:g.width,height:g.height,dealId:g.deal};if((null===(r=null===(n=e.ext)||void 0===n?void 0:n.paf)||void 0===r?void 0:r.transmission)&&(null===(s=null===(o=g.ext)||void 0===o?void 0:o.paf)||void 0===s?void 0:s.content_id)){var S={content_id:g.ext.paf.content_id,transmission:e.ext.paf.transmission};E.meta=I(I({},E.meta),{paf:S})}g.adomain&&(E.meta=I(I({},E.meta),{advertiserDomains:g.adomain})),g.native?y.params.nativeCallback?E.ad=at.createCriteoNativeAdWithCallback(C,g.native,y.params.nativeCallback):(E.native=at.createPrebidNativeAd(g.native),E.mediaType=rt.Native):g.video?(E.vastUrl=g.displayurl,E.mediaType=rt.Video,"outstream"===(null===(c=null===(a=y.mediaTypes)||void 0===a?void 0:a.video)||void 0===c?void 0:c.context)&&(E.renderer=this.createOutstreamVideoRenderer(g))):E.ad=g.creative,v.push(E)}else $.Error("Unable to bid request for slot "+g)}return this.timer.finish(),this.metricsManager.sendEvents(this.metricBuilder,this.clientRequestId,!0),!0===e.user_sync&&Ze.execUserSync(u.context.remoteLogging,this.gdprConsent,this.ccpaIabConsent,e),v},at.prototype.handleBidWon=function(){},at.prototype.handleBidTimeout=function(){this.timer.requestReceived(!0),this.timer.finish(),this.metricsManager.sendEvents(this.metricBuilder,this.clientRequestId,!0)},at.prototype.handleSetTargeting=function(){},at.prototype.getBannerSizes=function(e,t){var i,n;return(null===(n=null===(i=e.mediaTypes)||void 0===i?void 0:i.banner)||void 0===n?void 0:n.sizes)||(t?e.sizes:[])||[]},at.prototype.getNativeSizes=function(e){var t,i,n;return(null===(n=null===(i=null===(t=e.mediaTypes)||void 0===t?void 0:t.native)||void 0===i?void 0:i.image)||void 0===n?void 0:n.sizes)||[]},at.prototype.getSizes=function(e,t){var i,n=this.getBannerSizes(e,!t).map(function(e){return new Le(e[0],e[1])}),r=this.getNativeSizes(e).map(function(e){return new Le(e[0],e[1])}),o=n.concat(r);return(null===(i=e.mediaTypes)||void 0===i?void 0:i.native)&&(0===o.length?o=[new Le(2,2)]:o.forEach(function(e,t,i){void 0===e.height&&void 0===e.width&&(i[t]=new Le(2,2))})),o.filter(function(e,t,i){return i.indexOf(e)===t})},at.prototype.getFloorsForSizes=function(e,r,o){var s={},t=o.getFloor({currency:"USD",size:"*",mediaType:r});if("USD"!==t.currency)throw new Error("Currency for floors is not in USD, or cannot be converted to USD");return s["*"]=t.floor,e.forEach(function(e,t,i){var n=new Le(e[0],e[1]);s[n.toString()]=o.getFloor({currency:"USD",size:e,mediaType:r}).floor}),s},at.prototype.createOutstreamVideoRenderer=function(t){if(void 0!==t.video_callback)return{url:"#",render:function(e){tt(t.video_callback,[{slotid:t.impid,vastUrl:t.displayurl,vastXml:t.creative}])}}},at);function at(e,t,i,n,r){var o,s,a,c,u=window.criteo_pubtag_prebid_123||window.criteo_pubtag;this.clientRequestId=Pe(),this.gdprConsent={},n.gdprConsent&&(void 0!==n.gdprConsent.consentString&&(this.gdprConsent.consentData=n.gdprConsent.consentString),void 0!==n.gdprConsent.gdprApplies&&(this.gdprConsent.gdprApplies=!!n.gdprConsent.gdprApplies),this.gdprConsent.version=n.gdprConsent.apiVersion),this.ccpaIabConsent={uspString:n.uspConsent};var l=new Ke(void 0,this.gdprConsent);this.timeout=Ne(n.timeout),this.metricsManager=new Ce(l),this.metricBuilder=new ce(this.metricsManager),this.timer=new Ue(this.metricBuilder,n.start,this.timeout);var d,p,h,v=new Ge;this.adBlockFlagManager=T.create(l),this.adBlockFlagManager.adBlockFlagEnabled()&&(e=it,u.context.isAdBlocked=!0),this.auctionId=n.auctionId,this.bidRequests=i,this.slots=[];for(var f=!0,m=0,g=i;m<g.length;m++){var y=void 0;(E=g[m]).fpd&&E.fpd.context&&(y=E.fpd.context),(null===(o=E.ortb2Imp)||void 0===o?void 0:o.ext)&&((null==y?void 0:y.data)&&E.ortb2Imp.ext.data&&(y.data=I(I({},y.data),E.ortb2Imp.ext.data)),y=I(I({},E.ortb2Imp.ext),y)),E.params.ext&&((null==y?void 0:y.data)&&E.params.ext.data&&(y.data=I(I({},y.data),E.params.ext.data)),y=I(I({},E.params.ext),y)),f=this.hasValidNativeParams(E);var w=at.isPrebid3OrAbove(r);try{var b={};if(E.getFloor&&((null===(s=E.mediaTypes)||void 0===s?void 0:s.banner)&&(b.banner=this.getFloorsForSizes(this.getBannerSizes(E,!w),"banner",E)),(null===(a=E.mediaTypes)||void 0===a?void 0:a.native)&&(b.native=this.getFloorsForSizes(this.getNativeSizes(E),"native",E)),null===(c=E.mediaTypes)||void 0===c?void 0:c.video)){var C=E.mediaTypes.video.playerSize||[];b.video=0<C.length&&"number"==typeof C[0]?this.getFloorsForSizes([C],"video",E):this.getFloorsForSizes(C,"video",E)}Object.keys(b).length&&(y=I(I({},y),{floors:b}))}catch(e){$.Debug("Could not parse floors from Prebid: "+e)}this.slots.push(new Re(E.adUnitCode,E.params.zoneId,E.params.nativeCallback,E.transactionId,this.getSizes(E,w),E.params.publisherSubId,E.mediaTypes,at.getVideoInfoFromBidRequest(E),y)),d=E.params.networkId||d,p=E.schain||p,R(n.ceh),E.params.integrationMode&&(h=fe(E.params.integrationMode))}f||$.Warning("All native assets containing URL should be sent as placeholders with sendId(icon, image, clickUrl, privacyLink, privacyIcon)");var _,E,S=new ge(!1);0<i.length&&(E=i[0]).userIdAsEids&&0<E.userIdAsEids.length&&(_=E.userIdAsEids);"function"==typeof u.context.setPublisherExt&&"function"==typeof u.context.setUserExt?(u.context.setPublisherExt(n.publisherExt),u.context.setUserExt(n.userExt)):(u.context.publisherExt=n.publisherExt,u.context.userExt=n.userExt),this.requestBuilder=new Te(this.slots,u.context,S,e,h,d,t,{ccpaIabConsent:this.ccpaIabConsent,gdprConsent:this.gdprConsent},r,v,this.timeout,this.clientRequestId,_,n.start,p),this.url=this.requestBuilder.getUrl(),(window.Criteo_prebid_123||window.Criteo).prebid_adapters=(window.Criteo_prebid_123||window.Criteo).prebid_adapters||{},(window.Criteo_prebid_123||window.Criteo).prebid_adapters[this.auctionId]=this}function ct(e){try{return JSON.parse(e)}catch(e){return}}var ut=1,lt=(dt.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,i=0;i<10;++i){try{t.frames.__uspapiLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},dt.prototype.hasCallerFunctionInWindow=function(){return"function"==typeof this.currentWindow.__uspapi},dt.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInWindow()||void 0!==this.getCMPFrame()},dt.prototype.retrieveConsent=function(i){var n=this,r=!1,o=window.setTimeout(function(){r=!0,n.logger("Timeout: Unable to resolve CCPA consent after "+n.timeout+"ms"),i(void 0)},this.timeout);this.executeCommand("getUSPData",ut,function(e,t){r||(clearTimeout(o),t?(n.logger("CCPA consent retrieved"),n.processResponseData(e,i)):(n.logger("Error retrieving CCPA consent data from CMP"),i(void 0)))})},dt.prototype.processResponseData=function(e,t){e?t(e):(this.logger("Unable to read CCPA consent data from CMP"),t(void 0))},dt.prototype.executeCommand=function(e,t,i){var o=this;if(!this.hasCallerFunctionInWindow()){this.logger("No CCPA CMP defined on current frame");var s=this.getCMPFrame();this.currentWindow.__uspapi=function(e,t,i){if(!s)return o.logger("CCPA CMP not found in any frame"),void i({msg:"CCPA CMP not found in any frame"},!1);var n=Math.random().toString(10),r={__uspapiCall:{command:e,parameter:t,callId:n}};o.uspapiCallbacks[n]=i,s.postMessage(r,"*")},this.currentWindow.addEventListener("message",function(e){var t="string"==typeof e.data?ct(e.data):e.data;if(t&&t.__uspapiReturn&&t.__uspapiReturn.callId&&t.__uspapiReturn.returnValue){var i=t.__uspapiReturn;o.uspapiCallbacks&&o.uspapiCallbacks[i.callId]&&(o.uspapiCallbacks[i.callId](i.returnValue,i.success),delete o.uspapiCallbacks[i.callId])}},!1)}this.currentWindow.__uspapi(e,t,i)},dt.prototype.hasUserOptOut=function(e){return!(!e||!e.uspString||"1YNY"===e.uspString.toUpperCase()||"1YNN"===e.uspString.toUpperCase()||"1YN-"===e.uspString.toUpperCase()||"1-N-"===e.uspString.toUpperCase()||"1---"===e.uspString)},dt);function dt(e,t,i){void 0===i&&(i=function(e){}),this.uspapiCallbacks={},this.currentWindow=e,this.timeout=t.uspApiTimeout,this.logger=i}var pt=(ht.prototype.getReadyToRetrieveProvider=function(){return this.tcfv2ConsentProvider.hasCallerFunctionInFrame()?this.tcfv2ConsentProvider:this.tcfv1ConsentProvider.hasCallerFunctionInFrame()?this.tcfv1ConsentProvider:void 0!==this.tcfv2ConsentProvider.getCMPFrame()?this.tcfv2ConsentProvider:void 0!==this.tcfv1ConsentProvider.getCMPFrame()?this.tcfv1ConsentProvider:void 0},ht.prototype.retrieveConsentForPassback=function(e){var t=this.getReadyToRetrieveProvider();void 0===t&&(this.logger("No compatible GDPR privacy provider found"),e(void 0)),t===this.tcfv1ConsentProvider?this.tcfv1ConsentProvider.retrieveConsentForPassback(e):t===this.tcfv2ConsentProvider&&this.tcfv2ConsentProvider.retrieveConsent(e)},ht.prototype.retrieveConsent=function(e){var t=this.getReadyToRetrieveProvider();void 0===t&&(this.logger("No compatible GDPR privacy provider found"),e(void 0)),null==t||t.retrieveConsent(e)},ht.prototype.readyToRetrieve=function(){return this.tcfv2ConsentProvider.readyToRetrieve()||this.tcfv1ConsentProvider.readyToRetrieve()},ht);function ht(e,t,i){void 0===i&&(i=function(e){}),this.tcfv1ConsentProvider=e,this.tcfv2ConsentProvider=t,this.logger=i}var vt=91,ft=(mt.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,i=0;i<10;++i){try{t.frames.__cmpLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},mt.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__cmp},mt.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},mt.prototype.pingWithTimeout=function(n,e,t,i){function r(e,t){o.logger(t),clearTimeout(e),i()}var o=this;return window.setTimeout(function(){var i=window.setTimeout(function(){r(n,"Timeout: Unable to get ping return after "+e+"ms")},e);o.executeCommand("ping",null,function(e,t){clearTimeout(i),t?(o.logger("GDPR CMP ping returned"),!0!==e.cmpLoaded&&r(n,"GDPR ping returned cmpLoaded which is not true"),o.logger("GDPR ping returned cmpLoaded which is true")):r(n,"Error sending ping to GDPR CMP")})},t)},mt.prototype.retrieveConsent=function(e){this.executeRetrieveConsent("getConsentData",null,e)},mt.prototype.retrieveConsentForPassback=function(e){this.executeRetrieveConsent("getVendorConsents",[vt],e)},mt.prototype.executeRetrieveConsent=function(e,t,i){var n=this,r=!1,o=window.setTimeout(function(){r=!0,n.logger("Timeout: Unable to resolve GDPR consent after "+n.timeout+"ms"),i(void 0)},this.timeout),s=!1!==this.cmpAutoDetect?this.pingWithTimeout(o,this.pingTimeout,this.pingDelay,function(){r=!0,n.logger("Timeout: Unable to ping GDPR API after "+n.pingTimeout+"ms"),i(void 0)}):void 0;this.executeCommand(e,t,function(e,t){clearTimeout(s),r||(clearTimeout(o),t?(n.logger("GDPR consent retrieved"),n.processConsentData(e,i)):(n.logger("Error retrieving GDPR consent data from CMP"),i(void 0)))})},mt.prototype.processConsentData=function(e,t){if(e){var i={};void 0!==e.consentData&&(i.consentData=e.consentData),void 0!==e.gdprApplies&&(i.gdprApplies=!!e.gdprApplies),t(i)}else this.logger("Unable to read GDPR consent data from CMP"),t(void 0)},mt.prototype.executeCommand=function(e,t,i){var o=this;if(!this.hasCallerFunctionInFrame()){this.logger("No GDPR CMP defined on current frame");var s=this.getCMPFrame();this.currentWindow.__cmp=function(e,t,i){if(!s)return o.logger("GDPR CMP not found in any frame"),void i({msg:"GDPR CMP not found in any frame"},!1);var n=Math.random().toString(10),r={__cmpCall:{command:e,parameter:t,callId:n}};o.cmpCallbacks[n]=i,s.postMessage(r,"*")},this.currentWindow.addEventListener("message",function(e){var t="string"==typeof e.data?ct(e.data):e.data;if(t&&t.__cmpReturn&&t.__cmpReturn.callId&&t.__cmpReturn.returnValue){var i=t.__cmpReturn;o.cmpCallbacks&&o.cmpCallbacks[i.callId]&&(o.cmpCallbacks[i.callId](i.returnValue,i.success),delete o.cmpCallbacks[i.callId])}},!1)}this.currentWindow.__cmp(e,t,i)},mt);function mt(e,t,i){void 0===i&&(i=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.tcfTimeout,this.pingTimeout=t.tcfPingTimeout,this.pingDelay=t.tcfPingDelay,this.cmpAutoDetect=t.cmpAutoDetect,this.logger=i}var gt=91,yt=2,wt=(bt.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,i=0;i<10;++i){try{t.frames.__tcfapiLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},bt.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__tcfapi},bt.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},bt.prototype.pingWithTimeout=function(i,e,t,n){function r(e,t){o.logger(t),clearTimeout(e),n()}var o=this;return window.setTimeout(function(){var t=window.setTimeout(function(){r(i,"Timeout: Unable to get TCFv2 ping return after "+e+"ms")},e);o.executeCommand("ping",yt,function(e){clearTimeout(t),o.logger("TCFv2 CMP ping returned in ms"),"error"===e.cmpStatus?r(i,"Error status on ping to TCFv2 CMP"):!0!==e.cmpLoaded?r(i,"TCFv2 ping returned cmpLoaded = false"):o.logger("TCFv2 ping returned cmpLoaded = true")})},t)},bt.prototype.retrieveConsent=function(i){var n=this,r=!1,o=window.setTimeout(function(){r=!0,n.logger("Timeout: Unable to resolve TCFv2 consent after "+n.timeout+"ms"),i(void 0)},this.timeout),s=!1!==this.cmpAutoDetect?this.pingWithTimeout(o,this.pingTimeout,this.pingDelay,function(){r=!0,n.logger("Timeout: Unable to ping TCFv2 API after "+n.pingTimeout+"ms"),i(void 0)}):void 0;this.executeCommand("getTCData",yt,function(e,t){clearTimeout(s),r||(clearTimeout(o),t?(n.logger("TCFv2 consent retrieved in ms"),n.processResponseData(e,i)):(n.logger("Error retrieving TCFv2 consent data from CMP"),i(void 0)))},[gt])},bt.prototype.processResponseData=function(e,t){var i,n;if(e){var r={};void 0!==e.tcString&&(r.consentData=e.tcString),void 0!==e.gdprApplies&&(r.gdprApplies=!!e.gdprApplies),r.version=e.tcfPolicyVersion?e.tcfPolicyVersion:yt,r.purposes=null===(i=null==e?void 0:e.purpose)||void 0===i?void 0:i.consents,r.vendorConsents=null===(n=null==e?void 0:e.vendor)||void 0===n?void 0:n.consents,t(r)}else this.logger("Unable to read GDPR consent data from CMP"),t(void 0)},bt.prototype.executeCommand=function(e,t,i,n){var s=this;if(!this.hasCallerFunctionInFrame()){this.logger("No TCFv2 CMP defined on current frame");var a=this.getCMPFrame();this.currentWindow.__tcfapi=function(e,t,i,n){if(!a)return s.logger("TCFv2 CMP not found in any frame"),void i({msg:"TCFv2 CMP not found in any frame"},!1);var r=Math.random().toString(10),o={__tcfapiCall:{command:e,version:t,parameter:n,callId:r}};s.cmpCallbacks[r]=i,a.postMessage(o,"*")},this.currentWindow.addEventListener("message",function(e){var t="string"==typeof e.data?ct(e.data):e.data;if(t&&t.__tcfapiReturn&&t.__tcfapiReturn.callId&&t.__tcfapiReturn.returnValue){var i=t.__tcfapiReturn;s.cmpCallbacks&&s.cmpCallbacks[i.callId]&&"function"==typeof s.cmpCallbacks[i.callId]&&(s.cmpCallbacks[i.callId](i.returnValue,i.success),delete s.cmpCallbacks[i.callId])}},!1)}this.currentWindow.__tcfapi(e,t,i,n)},bt);function bt(e,t,i){void 0===i&&(i=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.tcfTimeout,this.pingTimeout=t.tcfPingTimeout,this.pingDelay=t.tcfPingDelay,this.cmpAutoDetect=t.cmpAutoDetect,this.logger=i}function Ct(e){return{uspApiTimeout:parseInt("50",10),tcfTimeout:parseInt("10000",10),tcfPingTimeout:Math.min(parseInt("10000",10),parseInt("50",10)),tcfPingDelay:Math.min(parseInt("10000",10),parseInt("1000",10)),cmpAutoDetect:null==e?void 0:e.cmpAutoDetect}}var _t=(Et.prototype.checkTcfPurposeOne=function(e){return!e||!e.purposes||!0===e.purposes[1]},Et.prototype.setCookie=function(e,t,i,n,r){void 0===r&&(r=!1);var o=n||document,s=o.location.hostname,a=new Date;a.setTime(a.getTime()+60*i*60*1e3);var c="expires="+a.toUTCString();if(!r)return this.setCookieString(e,t,c,void 0,o),s;for(var u=s.split("."),l=1;l<u.length;++l){var d=u.slice(u.length-l-1,u.length).join(".");if(!(-1<this.publicTopTlds.indexOf(d)))try{this.setCookieString(e,t,c,d,o);var p=this.getCookie(e,n);if(p&&p===t)return d}catch(e){}}return s},Et.prototype.deleteCookie=function(e,t,i){void 0===i&&(i=!1),this.setCookie(e,"",0,t,i)},Et.prototype.getCookie=function(e,t){if(this.cookiesEnabled)for(var i=0,n=(t||document).cookie.split(";");i<n.length;i++){var r=n[i],o=r.substr(0,r.indexOf("=")).replace(/^\s+|\s+$/g,""),s=r.substr(r.indexOf("=")+1);if(o===e)return decodeURIComponent(s)}},Et.prototype.setCookieString=function(e,t,i,n,r){if(this.cookiesEnabled){var o=e+"="+encodeURIComponent(t)+";"+i+";";n&&""!==n&&(o+="domain=."+n+";"),r.cookie=o+"path=/"}},Et);function Et(e){this.publicTopTlds=["co.id","co.il","co.jp","co.kr","co.nz","co.th","co.uk","com.au","com.br","com.mx","com.my","com.pl","com.sg","com.tr","com.vn"],this.cookiesEnabled=this.checkTcfPurposeOne(e)}var St=(It.prototype.initializeServices=function(){var n=this;this.initializing=!0,this.retrievePrivacyConsent(function(e,t){var i={localStorageHelper:new Ke(n.topFrame,t),gdprConsent:t,ccpaConsentProvider:n.ccpaConsentProvider,ccpaConsent:e,cookieHelper:new _t(t)};n.services=i,n.initialized=!0,n.initializing=!1,n.postInitiliazeServicesCallbacks.forEach(function(e){e(i)})})},It.prototype.getServicesAsync=function(e){this.initialized?e(this.services):(this.postInitiliazeServicesCallbacks.push(e),this.initializing||this.initializeServices())},It.prototype.retrievePrivacyConsent=function(t){var e=this.tcfCompatibleConsentProvider.readyToRetrieve(),i=this.ccpaConsentProvider.readyToRetrieve();e||i||t(void 0,void 0);var n,r,o=[];e&&o.push(pt),i&&o.push(lt),e&&this.tcfCompatibleConsentProvider.retrieveConsent(function(e){o.splice(o.indexOf(pt),1),0===o.length?t(r,e):n=e}),i&&this.ccpaConsentProvider.retrieveConsent(function(e){o.splice(o.indexOf(lt),1),0===o.length?t(e,n):r=e})},It);function It(e,t,i,n){this.initializing=!1,this.initialized=!1,this.postInitiliazeServicesCallbacks=[],this.topFrame=e||window;var r=Ct(n);this.ccpaConsentProvider=t||new lt(window,r,$.Warning);var o=new ft(window,r,$.Warning),s=new wt(window,r,$.Warning);this.tcfCompatibleConsentProvider=i||new pt(o,s,$.Warning),this.initializeServices()}var Tt=(At=F,t(xt,At),xt.prototype.getMetricBuilder=function(){return this.metricBuilder},xt.prototype.eval=function(e){this.evalWithTimeout(e,void 0)},xt.prototype.evalWithTimeout=function(t,i){var n=this;(this.serviceProvider||new St).getServicesAsync(function(e){n.metricsManager||(n.metricsManager=new Ce(e.localStorageHelper)),n.metricBuilder||(n.metricBuilder=new ce(n.metricsManager)),n.innerEval(t,n.metricBuilder,e.gdprConsent,e.ccpaConsent,i)})},xt.prototype.innerEval=function(n,r,o,s,e){var a=this,c=Pe(),t=xt.getCriteoAdapterBidRequest(),i=xt.getRequestAuctionStart(t),u=e||Ne(t&&t.timeout),l=new Ue(r,i,u),d=new Te(this.slots,n.context,this.urlBuilder,this.profileId,this.integrationMode,this.networkId,this.adapterVersion,{ccpaIabConsent:s,gdprConsent:o},void 0,this.viewportComputer,u,c,n.context.userIds,Math.round(new Date/1e3));if(!d.isValid()||"undefined"==typeof JSON)return $.Debug("Request ignored because it doesnt contain any slot"),void this.callbackError(void 0,void 0);var p=d.getRequest(),h=JSON.stringify(p),v=d.getUrl(),f=new Ye(v,h,"application/x-www-form-urlencoded");l.sendRequest(v),f.send(function(e){try{l.requestReceived();var t=le(e)||{},i=xe(t);void 0!==a.callbackSuccess&&a.callbackSuccess(JSON.stringify(t),i),l.finish(),!0===t.user_sync&&Ze.execUserSync(n.context.remoteLogging,o,s,t),r.getMetricsManager().sendEvents(r,c,!0)}catch(e){a.reportAsyncRequestException(n,"onSuccess",e)}n.context.remoteLogging.sendErrorReport(a.urlBuilder,c),a.metricBuilder=void 0},function(e,t){try{l.requestReceived(),void 0!==a.callbackError&&a.callbackError(e,t),l.finish(),r.getMetricsManager().sendEvents(r,c,!0)}catch(e){a.reportAsyncRequestException(n,"onError",e)}n.context.remoteLogging.sendErrorReport(a.urlBuilder,c),a.metricBuilder=void 0},function(){try{l.requestReceived(!0),void 0!==a.callbackTimeout&&a.callbackTimeout(),l.finish(),r.getMetricsManager().sendEvents(r,c,!0)}catch(e){a.reportAsyncRequestException(n,"onTimeout",e)}n.context.remoteLogging.sendErrorReport(a.urlBuilder,c),a.metricBuilder=void 0},this.timeout)},xt.prototype.reportAsyncRequestException=function(e,t,i){var n=i.stack?i.stack:i.toString();e.context.remoteLogging.log("Exception","Exception caught in AsyncRequest "+t+" callback:\n"+n),$.Error("Error "+t+":\n\t"+n)},xt.getCriteoAdapterBidRequest=function(){try{return window.pbjs._bidsRequested.find(function(e){return"criteo"===e.bidderCode})}catch(e){return}},xt.getRequestAuctionStart=function(e){return e&&e.auctionStart},xt.NAME="directbidding",xt),At;function xt(e,t,i,n,r,o,s,a,c,u,l,d,p){var h=At.call(this,xt.NAME)||this;return h.profileId=e,h.urlBuilder=t,h.slots=i,h.callbackSuccess=n,h.callbackError=r,h.callbackTimeout=o,h.serviceProvider=s,h.timeout=c,h.networkId=u,h.integrationMode=l,h.adapterVersion=d,h.viewportComputer=p,h.metricsManager=a,h.metricsManager&&(h.metricBuilder=new ce(h.metricsManager)),h}var Pt=(Rt=F,t(Dt,Rt),Dt.prototype.eval=function(e){var t=this;setTimeout(function(){return t.onTimeout()},this.timeout),this.directBiddingEvent.evalWithTimeout(e,this.timeout)},Dt.prototype.onSuccess=function(e,t){this.hasResponded=!0,this.hasTimeouted||this.callbackSuccess(e,t)},Dt.prototype.onError=function(e,t){this.hasResponded=!0,this.hasTimeouted||this.callbackError(e,t)},Dt.prototype.onHttpTimeout=function(){this.hasResponded=!0,this.hasTimeouted||this.callbackTimeout()},Dt.prototype.onTimeout=function(){this.hasResponded||(this.hasTimeouted=!0,this.callbackTimeout())},Dt.prototype.getMetricBuilder=function(){return this.directBiddingEvent.getMetricBuilder()},Dt.NAME="directbidding",Dt),Rt;function Dt(e,t,i,n,r,o,s,a,c,u,l,d,p){var h=Rt.call(this,Dt.NAME)||this,v=Math.max(10*(c||3e3),3e3);return h.directBiddingEvent=new Tt(e,t,i,function(e,t){return h.onSuccess(e,t)},function(e,t){return h.onError(e,t)},function(){return h.onHttpTimeout()},a,s,v,u,l,d,p),h.slots=i,h.callbackSuccess=n,h.callbackError=r,h.callbackTimeout=o,h.timeout=0===c?0:c||3e3,h.hasTimeouted=!1,h.hasResponded=!1,h}var kt={prebid:"criteo_fast_bid",index:"criteo_fast_bid_index"};function Ot(t,e){var i=kt[e];null===t.getItem(i,864e5)&&new Ye("https://static.criteo.net/js/ld/publishertag."+e+".123.js",void 0,void 0,!1).send(function(e){t.setItem(i,e,864e5)},function(e,t){$.Error("Could not update FastBid"+(t?" ("+t+")":""))})}function Mt(e){function t(){try{return i.apply(this,arguments)}catch(e){$.Error("Exception caught: "+e.toString())}}var i=e;for(var n in t.prototype=i.prototype,i)i.hasOwnProperty(n)&&(t[n]=i[n]);return t}function Ut(e){for(var t in e)if(t in e){var i=e[t];"function"==typeof i?e[t]=Mt(i):"object"==typeof i&&(e[t]=Ut(i))}return e}function Ft(e){var t={push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(void 0!==e)for(var i=0,n=e;i<n.length;i++){var r=n[i];"function"==typeof r&&Mt(r)()}}};return e&&Array.isArray(e)&&t.push.apply(t,e),t}var Lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Bt(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ht(e,t){return e(t={exports:{}},t.exports),t.exports}function Wt(e){return e&&e.default||e}var qt=Ht(function(e,t){var i;i=function(){function c(e){return"function"==typeof e}var i=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,t=void 0,r=void 0,s=function(e,t){p[n]=e,p[n+1]=t,2===(n+=2)&&(r?r(h):y())};var e="undefined"!=typeof window?window:void 0,o=e||{},a=o.MutationObserver||o.WebKitMutationObserver,u="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var e=setTimeout;return function(){return e(h,1)}}var p=new Array(1e3);function h(){for(var e=0;e<n;e+=2){(0,p[e])(p[e+1]),p[e]=void 0,p[e+1]=void 0}n=0}var v,f,m,g,y=void 0;function w(e,t){var i=this,n=new this.constructor(_);void 0===n[C]&&F(n);var r=i._state;if(r){var o=arguments[r-1];s(function(){return M(r,n,o,i._result)})}else k(i,n,e,t);return n}function b(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(_);return x(t,e),t}y=u?function(){return process.nextTick(h)}:a?(f=0,m=new a(h),g=document.createTextNode(""),m.observe(g,{characterData:!0}),function(){g.data=f=++f%2}):l?((v=new MessageChannel).port1.onmessage=h,function(){return v.port2.postMessage(0)}):(void 0===e&&"function"==typeof Bt?function(){try{var e=Function("return this")().require("vertx");return void 0!==(t=e.runOnLoop||e.runOnContext)?function(){t(h)}:d()}catch(e){return d()}}:d)();var C=Math.random().toString(36).substring(2);function _(){}var E=void 0,S=1,I=2;function T(e,n,r){s(function(t){var i=!1,e=function(e,t,i,n){try{e.call(t,i,n)}catch(e){return e}}(r,n,function(e){i||(i=!0,(n!==e?x:R)(t,e))},function(e){i||(i=!0,D(t,e))},t._label);!i&&e&&(i=!0,D(t,e))},e)}function A(e,t,i){var n,r;t.constructor===e.constructor&&i===w&&t.constructor.resolve===b?(n=e,(r=t)._state===S?R(n,r._result):r._state===I?D(n,r._result):k(r,void 0,function(e){return x(n,e)},function(e){return D(n,e)})):void 0===i?R(e,t):c(i)?T(e,t,i):R(e,t)}function x(t,e){if(t===e)D(t,new TypeError("You cannot resolve a promise with itself"));else if(r=typeof(n=e),null===n||"object"!=r&&"function"!=r)R(t,e);else{var i=void 0;try{i=e.then}catch(e){return void D(t,e)}A(t,e,i)}var n,r}function P(e){e._onerror&&e._onerror(e._result),O(e)}function R(e,t){e._state===E&&(e._result=t,e._state=S,0!==e._subscribers.length&&s(O,e))}function D(e,t){e._state===E&&(e._state=I,e._result=t,s(P,e))}function k(e,t,i,n){var r=e._subscribers,o=r.length;e._onerror=null,r[o]=t,r[o+S]=i,r[o+I]=n,0===o&&e._state&&s(O,e)}function O(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n=void 0,r=void 0,o=e._result,s=0;s<t.length;s+=3)n=t[s],r=t[s+i],n?M(i,n,r,o):r(o);e._subscribers.length=0}}function M(e,t,i,n){var r=c(i),o=void 0,s=void 0,a=!0;if(r){try{o=i(n)}catch(e){a=!1,s=e}if(t===o)return void D(t,new TypeError("A promises callback cannot return that same promise."))}else o=n;t._state!==E||(r&&a?x(t,o):!1===a?D(t,s):e===S?R(t,o):e===I&&D(t,o))}var U=0;function F(e){e[C]=U++,e._state=void 0,e._result=void 0,e._subscribers=[]}var L=(B.prototype._enumerate=function(e){for(var t=0;this._state===E&&t<e.length;t++)this._eachEntry(e[t],t)},B.prototype._eachEntry=function(t,e){var i=this._instanceConstructor,n=i.resolve;if(n===b){var r=void 0,o=void 0,s=!1;try{r=t.then}catch(e){s=!0,o=e}if(r===w&&t._state!==E)this._settledAt(t._state,e,t._result);else if("function"!=typeof r)this._remaining--,this._result[e]=t;else if(i===N){var a=new i(_);s?D(a,o):A(a,t,r),this._willSettleAt(a,e)}else this._willSettleAt(new i(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},B.prototype._settledAt=function(e,t,i){var n=this.promise;n._state===E&&(this._remaining--,e===I?D(n,i):this._result[t]=i),0===this._remaining&&R(n,this._result)},B.prototype._willSettleAt=function(e,t){var i=this;k(e,void 0,function(e){return i._settledAt(S,t,e)},function(e){return i._settledAt(I,t,e)})},B);function B(e,t){this._instanceConstructor=e,this.promise=new e(_),this.promise[C]||F(this.promise),i(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?R(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&R(this.promise,this._result))):D(this.promise,new Error("Array Methods must be provided an Array"))}var N=(H.prototype.catch=function(e){return this.then(null,e)},H.prototype.finally=function(t){var i=this.constructor;return c(t)?this.then(function(e){return i.resolve(t()).then(function(){return e})},function(e){return i.resolve(t()).then(function(){throw e})}):this.then(t,t)},H);function H(e){this[C]=U++,this._result=this._state=void 0,this._subscribers=[],_!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof H?function(t,e){try{e(function(e){x(t,e)},function(e){D(t,e)})}catch(e){D(t,e)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return N.prototype.then=w,N.all=function(e){return new L(this,e).promise},N.race=function(r){var o=this;return i(r)?new o(function(e,t){for(var i=r.length,n=0;n<i;n++)o.resolve(r[n]).then(e,t)}):new o(function(e,t){return t(new TypeError("You must pass an array to race."))})},N.resolve=b,N.reject=function(e){var t=new this(_);return D(t,e),t},N._setScheduler=function(e){r=e},N._setAsap=function(e){s=e},N._asap=s,N.polyfill=function(){var e=void 0;if(void 0!==Lt)e=Lt;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var i=null;try{i=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===i&&!t.cast)return}e.Promise=N},N.Promise=N},e.exports=i()}),zt=qt.polyfill,Gt=(Vt.LoadPolyfills=function(){Vt.DefineIsArray(),Vt.DefineIndexOf(),Vt.DefineFilter(),Vt.DefinePromise()},Vt.DefinePromise=function(){window.Promise||zt()},Vt.DefineIsArray=function(){Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)})},Vt.DefineIndexOf=function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){if(void 0===t&&(t=0),void 0===this)throw new TypeError("'this' is null or not defined");var i=this.length;if(0===i)return-1;if(i<=t)return-1;for(var n=Math.max(0<=t?t:i-Math.abs(t),0);n<i;){if(n in this&&this[n]===e)return n;n++}return-1})},Vt.DefineFilter=function(){Array.prototype.filter||(Array.prototype.filter=function(e){if(void 0===this||void 0===this)throw new TypeError;var t=this.length;if("function"!=typeof e)throw new TypeError;for(var i=[],n=2<=arguments.length?arguments[1]:void 0,r=0;r<t;r++)if(r in this){var o=this[r];e.call(n,o,r,this)&&i.push(o)}return i})},Vt);function Vt(){}var jt=function(e,t){this.errorType=e,this.messages=t},Kt=function(e,t,i){this.environment=e,this.errors=t,this.requestId=i},Xt=(Yt.prototype.withMessage=function(e,t){return e in this.messages||(this.messages[e]=new Array),this.messages[e].push(t),this},Yt.prototype.withRequestId=function(e){return this.requestId=e,this},Yt.prototype.build=function(){var e=Array();for(var t in this.messages)null!=t&&e.push(new jt(t,this.messages[t]));return new Kt(this.environment,e,this.requestId)},Yt);function Yt(e){this.messages={},this.environment=e}var Jt=(Zt.prototype.reportPending=function(){return this.shouldSend},Zt.prototype.sendErrorReport=function(e,t){if(this.shouldSend){void 0!==t&&this.builder.withRequestId(t);var i=this.builder.build(),n=e.buildErrorUrl();n+=this.debug?"?debug=1":"";var r=JSON.stringify(i);navigator.sendBeacon&&navigator.sendBeacon(n,r),this.shouldSend=!1,this.builder=new Xt(Zt.environment)}},Zt.prototype.log=function(e,t){this.shouldSend=!0,this.builder.withMessage(e,t)},Zt.environment="PublisherTag Version "+me,Zt),Qt,$t;function Zt(e){void 0===e&&(e=!1),this.builder=new Xt(Zt.environment),this.shouldSend=!1,this.debug=e}function ei(t,i){try{return decodeURIComponent(t)}catch(e){return void 0!==i?i:t}}function ti(e){var t=document.createElement("a");return t.href=e,{protocol:t.protocol,host:t.host,hostname:t.hostname,pathname:"/"===t.pathname[0]?t.pathname.slice(1):t.pathname,search:t.search,href:t.href}}function ii(e,t){var i=document.createElement("a");t&&"noDecodeWholeURL"in t&&t.noDecodeWholeURL?i.href=e:i.href=decodeURIComponent(e);var n=t&&"decodeSearchAsString"in t&&t.decodeSearchAsString;return{href:i.href,protocol:(i.protocol||"").replace(/:$/,""),hostname:i.hostname,port:+i.port,pathname:i.pathname.replace(/^(?!\/)/,"/"),search:n?i.search:oi(i.search||""),hash:(i.hash||"").replace(/^#/,""),host:i.host||window.location.host}}function ni(t){return Object.keys(t).map(function(e){return e+"="+t[e]}).join("&")}function ri(e){return(e.protocol||"http")+"://"+(e.host||e.hostname+(e.port?":"+e.port:""))+(e.pathname||"")+(e.search?"?"+ni(e.search||""):"")+(e.hash?"#"+e.hash:"")}function oi(e){return e?e.replace(/^\?/,"").split("&").reduce(function(e,t){var i=t.split("="),n=i[0],r=i[1];return/\[\]$/.test(n)||(e[n]=r||""),e},{}):{}}function si(e){var t={},i=e.split("?");if(1<i.length)for(var n=0,r=i[1].split("&");n<r.length;n++){var o=r[n].split("=");t[ei(o[0])]=ei(o[1])}return t}$t=Qt=Qt||{},$t[$t.InFriendlyIframe=1]="InFriendlyIframe",$t[$t.InUnfriendlyIframe=2]="InUnfriendlyIframe",$t[$t.DirectIntegration=3]="DirectIntegration";var ai=(ci.prototype.getUserContextualData=function(){var e,t,i,n,r,o,s,a,c,u,l,d,p,h;return{data:{contentLanguage:this.getContentLanguage(),navigatorLanguage:null===(t=null===(e=this.window)||void 0===e?void 0:e.navigator)||void 0===t?void 0:t.language,orientation:this.getOrientation(),windowInnerWidth:null===(i=this.window)||void 0===i?void 0:i.innerWidth,windowInnerHeight:null===(n=this.window)||void 0===n?void 0:n.innerHeight,pageWidth:null===(s=null===(o=null===(r=this.window)||void 0===r?void 0:r.document)||void 0===o?void 0:o.documentElement)||void 0===s?void 0:s.scrollWidth,pageHeight:null===(u=null===(c=null===(a=this.window)||void 0===a?void 0:a.document)||void 0===c?void 0:c.documentElement)||void 0===u?void 0:u.scrollHeight,sessionDuration:ke.TimeSincePageLoad()},device:{w:null===(d=null===(l=this.window)||void 0===l?void 0:l.screen)||void 0===d?void 0:d.width,h:null===(h=null===(p=this.window)||void 0===p?void 0:p.screen)||void 0===h?void 0:h.height}}},ci.prototype.getOrientation=function(){var e,t,i,n,r,o;return((null===(t=null===(e=this.window)||void 0===e?void 0:e.screen)||void 0===t?void 0:t.orientation)||{}).type||(null===(n=null===(i=this.window)||void 0===i?void 0:i.screen)||void 0===n?void 0:n.mozOrientation)||(null===(o=null===(r=this.window)||void 0===r?void 0:r.screen)||void 0===o?void 0:o.msOrientation)},ci.prototype.getContentLanguage=function(){var e,t,i,n,r,o=null===(i=null===(t=null===(e=this.window)||void 0===e?void 0:e.document)||void 0===t?void 0:t.documentElement)||void 0===i?void 0:i.lang;if(!o&&"function"==typeof(null===(r=null===(n=this.window)||void 0===n?void 0:n.document)||void 0===r?void 0:r.querySelector)){var s=this.window.document.querySelector('meta[http-equiv="Content-Language"]');o=null==s?void 0:s.content}return o},ci);function ci(e){this.window=e}var ui=(li=we,t(fi,li),fi.prototype.sendEvents=function(e){var t={requestId:this.context.getClientSessionId(),events:[e]};this.context.isEligibleForCsmEvents()&&this.sendEventsToBeacon(t,this.urlBuilder.buildCsmEventsUrl())},fi),li,di,pi,hi,vi;function fi(e){var t=li.call(this)||this;return t.context=e,t}pi=di=di||{},pi[pi.None=0]="None",pi[pi.Cookie=1]="Cookie",pi[pi.LocalStorage=2]="LocalStorage",pi[pi.Delegation=4]="Delegation",vi=hi=hi||{},vi[vi.Unknown=0]="Unknown",vi[vi.Deactivated=1]="Deactivated",vi[vi.Activated=2]="Activated";var mi=(gi.prototype.getSid=function(){return this.userDataHandlers.sid().fromAllStorages()},gi.prototype.getIdCpy=function(){return this.userDataHandlers.idCpy().fromAllStorages()},gi.prototype.getLocalWebId=function(){return this.userDataHandlers.localWebId().fromAllStorages()},gi.prototype.getOptOut=function(){return this.userDataHandlers.optOut().fromAllStorages()},gi.prototype.getBundle=function(){return this.userDataHandlers.bundle().fromAllStorages()},gi);function gi(e){this.userDataHandlers=e}var yi=(wi.fromUserIdentificationData=function(e){return new wi(e.value,e.origin)},wi.fromValue=function(e){return new wi(e,di.None)},wi.prototype.hasValue=function(){return""!==String(this.value)&&null!==this.value&&void 0!==this.value},wi);function wi(e,t){this.value=e,this.origin=t}var bi=(Ci=yi,t(_i,Ci),_i.prototype.hasValue=function(){return""!==String(this.value)&&null!==this.value&&void 0!==this.value},_i.prototype.saveOnAllStorages=function(){if(this.hasValue()){var e="boolean"==typeof this.value?this.value?"1":"0":String(this.value);this.storageAdapter.writeToAllStorages(this.storageKey,e,this.expirationTimeHours)}},_i.prototype.toJSON=function(){return{value:this.value,origin:this.origin}},_i),Ci;function _i(e,t,i,n,r){var o=Ci.call(this,i,n)||this;return o.storageKey=e,o.expirationTimeHours=t,o.storageAdapter=r,o}var Ei=(Si.prototype.sid=function(){return this.createGuid(Si.SID_COOKIE_NAME)},Si.prototype.idCpy=function(){return this.createGuid(Si.IDCPY_COOKIE_NAME)},Si.prototype.localWebId=function(){return this.createGuid(Si.LWID_COOKIE_NAME)},Si.prototype.optOut=function(){return new Ii(Boolean,Si.OPTOUT_COOKIE_NAME,Si.OPTOUT_RETENTION_TIME_HOUR,this.storageAdapter)},Si.prototype.bundle=function(){return this.createGuid(Si.BUNDLE_COOKIE_NAME)},Si.prototype.createGuid=function(e){return new Ii(String,e,Si.GUID_RETENTION_TIME_HOUR,this.storageAdapter)},Si.SID_COOKIE_NAME="cto_sid",Si.IDCPY_COOKIE_NAME="cto_idcpy",Si.LWID_COOKIE_NAME="cto_lwid",Si.OPTOUT_COOKIE_NAME="cto_optout",Si.BUNDLE_COOKIE_NAME="cto_bundle",Si.GUID_RETENTION_TIME_HOUR=9360,Si.OPTOUT_RETENTION_TIME_HOUR=43200,Si);function Si(e){this.storageAdapter=e}var Ii=(Ti.prototype.fromAllStorages=function(){var e=this.storageAdapter.readFromAllStorages(this.storageKey),t="boolean"==typeof(new this.type).valueOf()?"1"===e.value:e.value;return this.create(t,e.origin)},Ti.prototype.fromValue=function(e){return this.create(e,di.None)},Ti.prototype.removeFromAllStorages=function(){this.storageAdapter.removeFromAllStorages(this.storageKey)},Ti.prototype.create=function(e,t){return new bi(this.storageKey,this.expirationTimeHours,e,t,this.storageAdapter)},Ti);function Ti(e,t,i,n){this.type=e,this.storageKey=t,this.expirationTimeHours=i,this.storageAdapter=n}var Ai=(xi.prototype.getSyncframeListener=function(i,n){var r=this;return function(e){if(!r.discardMessageFromOtherFrames(e)||r.window.criteo_syncframe_state.ForceSyncframeMessageHandling){var t=e.data;(null==t?void 0:t.requestId)===i&&(e.stopImmediatePropagation(),r.handleSyncframeResponse(t,n),r.window.criteo_syncframe_state.firstSyncframeCompleted=!0,r.window.criteo_syncframe_state.syncframeRequested=!1,r.tryUnqueueAppendSyncframeRequests())}}},xi.prototype.userBundleHasAlreadyBeenRetrieved=function(){return this.userDataHandlers.bundle().fromAllStorages().hasValue()},xi.prototype.canDropSyncframe=function(){return!this.window.criteo_syncframe_state.syncframeRequested},xi.prototype.discardMessageFromOtherFrames=function(e){return!e.data||e.origin!=this.syncframeOrigin},xi.prototype.appendGumIframeIfDoesNotExist=function(e,t,i){var n,r=this;!0===(null===(n=this.window.criteo_syncframe_state)||void 0===n?void 0:n.firstSyncframeCompleted)||this.userBundleHasAlreadyBeenRetrieved()||this.canDropSyncframe()?this.appendGumIframe(e,t,i):this.queueAppendSyncframeRequest(function(){return r.appendGumIframeIfDoesNotExist(e,t,i)})},xi.prototype.doOnCompletedDom=function(e){var t=this;if(this.window.addEventListener)if("complete"===this.document.readyState)e();else{var i=function(){t.window.removeEventListener("load",i),t.document.removeEventListener("DOMContentLoaded",i),e()};this.window.addEventListener("load",i,!1),this.document.addEventListener("DOMContentLoaded",i,!1)}},xi.prototype.appendGumIframe=function(e,t,i){t();var n=e();if(this.consentAllowsSyncframeToBeDropped(n.consent)){this.window.addEventListener("message",this.getSyncframeListener(n.requestId,i),!0);var r=this.createIFrame(n);this.document.body.appendChild(r),this.window.criteo_syncframe_state.syncframeRequested=!0}else this.handleSyncframeResponse({},i)},xi.prototype.consentAllowsSyncframeToBeDropped=function(e){var t;return 2!==(null==e?void 0:e.gdprVersion)||!0!==(null==e?void 0:e.gdprApplies)||!0===(null===(t=null==e?void 0:e.vendorConsents)||void 0===t?void 0:t[this.criteoGlobalVendorListId])},xi.prototype.queueAppendSyncframeRequest=function(e){void 0!==this.window.criteo_syncframe_state.appendSyncframeRequestQueue&&this.window.criteo_syncframe_state.appendSyncframeRequestQueue.push(e)},xi.prototype.tryUnqueueAppendSyncframeRequests=function(){for(var e,t,i=null===(e=this.window.criteo_syncframe_state.appendSyncframeRequestQueue)||void 0===e?void 0:e.shift();void 0!==i;)i(),i=null===(t=this.window.criteo_syncframe_state.appendSyncframeRequestQueue)||void 0===t?void 0:t.shift()},xi.prototype.createIFrame=function(e){var t,i=this.document.createElement("iframe"),n={uid:e.uid,lwid:e.localWebId,bundle:e.bundle,optout:e.optoutCookie,sid:e.secureIdCookie,tld:e.topLevelDomain,topUrl:e.topUrl,version:"string"==typeof e.version?null===(t=e.version)||void 0===t?void 0:t.replace(/\./g,"_"):e.version,cw:e.canWriteCookie,lsw:e.canWriteLocalStorage,origin:e.origin,pm:e.privateMode,rtusCallerId:e.rtusCallerId,requestId:e.requestId},r=[];return r.push("origin="+e.origin),r.push("topUrl="+e.topUrl),e.consent&&(void 0!==e.consent.gdprApplies&&r.push("gdpr="+(e.consent.gdprApplies?1:0)),void 0!==e.consent.consentData&&r.push("gdpr_consent="+e.consent.consentData),void 0!==e.consent.uspString&&r.push("us_privacy="+e.consent.uspString)),e.isDebug&&r.push("debug=1"),i.src=this.syncframeEndpoint+"?"+r.join("&")+"#"+JSON.stringify(n),i.width="0",i.height="0",i.frameBorder="0",i.style.borderWidth="0px",i.style.margin="0px",i.style.display="none",i.title="Criteo GUM iframe",i},xi);function xi(e,t,i){this.syncframeOrigin=i,this.criteoGlobalVendorListId=91,this.window=e,this.document=e.document,this.userDataHandlers=new Ei(t),this.syncframeEndpoint=(null!=i?i:"https://gum.criteo.com")+"/syncframe",this.window.criteo_syncframe_state||(this.window.criteo_syncframe_state={syncframeRequested:!1}),this.window.criteo_syncframe_state.appendSyncframeRequestQueue||(this.window.criteo_syncframe_state.appendSyncframeRequestQueue=[])}var Pi=(Ri=Ai,t(Di,Ri),Di.prototype.handleSyncframeResponse=function(e,t){var i;if(e.optout)this.userDataHandlers.idCpy().removeFromAllStorages(),this.userDataHandlers.sid().removeFromAllStorages(),this.userDataHandlers.bundle().removeFromAllStorages(),this.userDataHandlers.optOut().fromValue(!0).saveOnAllStorages(),null===(i=null==t?void 0:t.resolve)||void 0===i||i.call(t,"");else{if(e.uid&&this.userDataHandlers.idCpy().fromValue(e.uid).saveOnAllStorages(),e.callbacks)for(var n=0,r="string"==typeof e.callbacks?[e.callbacks]:e.callbacks;n<r.length;n++){var o=r[n],s=this.document.createElement("img");s.style.display="none",s.width=1,s.height=1,s.setAttribute("data-owner","criteo-tag"),s.src=o}else e.bundle&&this.userDataHandlers.bundle().fromValue(e.bundle).saveOnAllStorages();e.removeSid?this.userDataHandlers.sid().removeFromAllStorages():e.sid&&this.userDataHandlers.sid().fromValue(e.sid).saveOnAllStorages(),(null==t?void 0:t.resolve)&&t.resolve(e.bundle?e.bundle:"")}},Di.prototype.appendGumIFrameOnCompletedDomIfItDoesNotExist=function(e,t){function i(){return n.appendGumIframeIfDoesNotExist(function(){return n.createSyncframeRequest(e(),r)},function(){},{resolve:t})}var n=this,r=Math.random().toString();this.adapter.isPubTagIds?i():this.doOnCompletedDom(i)},Di.prototype.createSyncframeRequest=function(e,t){return{uid:this.userDataHandlers.idCpy().fromAllStorages().toJSON(),localWebId:this.userDataHandlers.localWebId().fromAllStorages().toJSON(),bundle:this.userDataHandlers.bundle().fromAllStorages().toJSON(),optoutCookie:this.userDataHandlers.optOut().fromAllStorages().toJSON(),secureIdCookie:this.userDataHandlers.sid().fromAllStorages().toJSON(),topLevelDomain:e.topLevelDomain,topUrl:e.topUrl,version:e.version,canWriteCookie:e.canWriteCookie,canWriteLocalStorage:e.canWriteLocalStorage,origin:this.adapter.isPubTagIds?"publishertagids":"publishertag",privateMode:void 0,consent:e.consent,rtusCallerId:void 0,isDebug:this.adapter.isDebug,requestId:t}},Di.prototype.fetchUserData=function(){return new mi(this.userDataHandlers)},Di),Ri;function Di(e,t){var i=Ri.call(this,t,e.storageAdapter,"https://gum.criteo.com")||this;return i.adapter=e,i}var ki=(Oi.prototype.synchronizeCriteoUid=function(e,t){var i=this;this.syncframe.appendGumIFrameOnCompletedDomIfItDoesNotExist(function(){return{topLevelDomain:i.getTld(),topUrl:encodeURIComponent(ti(i.topUrl).hostname),version:me,canWriteCookie:i.canWriteCookies,canWriteLocalStorage:i.localStorageHelper.localStorageEnabled,consent:{gdprApplies:null==e?void 0:e.gdprApplies,consentData:null==e?void 0:e.consentData||"",gdprVersion:null==e?void 0:e.version,vendorConsents:null==e?void 0:e.vendorConsents,uspString:void 0,ccpaVersion:void 0}}},t)},Oi.prototype.checkCookiesAreWriteable=function(){var e="cto_writeable";this.cookieHelper.setCookie(e,"1",1,this.topDoc,!0);var t="1"===this.cookieHelper.getCookie(e,this.topDoc);return this.cookieHelper.deleteCookie(e,this.topDoc,!0),t},Oi.prototype.writeOnAllStorages=function(e,t,i){this.localStorageHelper.setItem(e,t),this.cookieHelper.setCookie(e,t,i,this.topDoc,!0)},Oi.prototype.getFromAllStorages=function(e){var t=this.cookieHelper.getCookie(e,this.topDoc),i=this.localStorageHelper.getItem(e)||void 0;return{value:t||i,origin:(t&&di.Cookie)|(i&&di.LocalStorage)}},Oi.prototype.deleteFromAllStorage=function(e){this.cookieHelper.deleteCookie(e,this.topDoc,!0),this.localStorageHelper.removeItem(e)},Oi.prototype.getTld=function(){var e=this.cookieHelper.setCookie(Oi.TLD_TEST_COOKIE_NAME,"test",1,this.topDoc,!0);return this.cookieHelper.deleteCookie(Oi.TLD_TEST_COOKIE_NAME,this.topDoc,!0),e},Oi.prototype.fetchUserData=function(){return this.syncframe.fetchUserData()},Oi.TLD_TEST_COOKIE_NAME="cto_pub_test_tld",Oi);function Oi(e,t,i,n,r,o){var s=this;this.topDoc=i.document,this.cookieHelper=e,this.localStorageHelper=t,this.canWriteCookies=this.checkCookiesAreWriteable(),this.topUrl=r,this.syncframe=new Pi({storageAdapter:{readFromAllStorages:function(e){var t=s.getFromAllStorages(e);return{value:t.value,origin:t.origin}},writeToAllStorages:function(e,t,i){s.writeOnAllStorages(e,t,i)},removeFromAllStorages:function(e){s.deleteFromAllStorage(e)}},isPubTagIds:null!=o&&o,isDebug:n},i)}var Mi=(Ui.prototype.synchronizeCriteoUid=function(e,t,i,n){var r,o=(null===(r=this.cookieSynchronizerFactory)||void 0===r?void 0:r.call(this))||new ki(t,e,this.highestAccessibleWindowStruct.topFrame,this.debugMode,this.highestAccessibleUrl,!1),s=o.fetchUserData();i(s.getIdCpy().value,s.getOptOut().value,s.getSid().value,s.getBundle().value),o.synchronizeCriteoUid(n)},Ui.prototype.getServicesAndSyncCriteoUid=function(i){var n=this;void 0===i&&(i=function(e,t,i,n){}),this.serviceProvider.getServicesAsync(function(e){var t;(null===(t=e.ccpaConsentProvider)||void 0===t?void 0:t.hasUserOptOut(e.ccpaConsent))||n.synchronizeCriteoUid(e.localStorageHelper,e.cookieHelper,i,e.gdprConsent)})},Ui.setIdentities=function(){return 42},Ui);function Ui(e,t,i,n,r){this.highestAccessibleWindowStruct=qe.getHighestAccessibleWindow(t),this.highestAccessibleUrl=qe.getHighestAccessibleUrl(this.highestAccessibleWindowStruct);var o=si(this.highestAccessibleUrl);this.debugMode="1"===o.pbt_debug||!1,this.debugMode&&ee(X.Debug),this.cookieSynchronizerFactory=i,this.serviceProvider=n||new St(this.highestAccessibleWindowStruct.topFrame,void 0,void 0,r)}var Fi=(Li.prototype.getContextFlags=function(){var e="";return e+=this.debugMode?"&debug=1":"",e+=this.noLog?"&nolog=1":""},Li.prototype.isEligibleForCsmEvents=function(){return this.sessionRandomId%100==0},Li.prototype.getClientSessionId=function(){return this.clientSessionId},Li.prototype.getMetricsManager=function(){return this.contextMetricsManager},Li.prototype.getDisplayContext=function(e){return qe.inIframe()?e.err?Qt.InUnfriendlyIframe:Qt.InFriendlyIframe:Qt.DirectIntegration},Li.prototype.synchronizeCriteoUid=function(){var r=this;this.identityHelper.getServicesAndSyncCriteoUid(function(e,t,i,n){r.ctoIdOnPublisherDomain=e,r.isOptOut=t,r.secureId=i,r.bundle=n})},Li.prototype.getIdfs=function(){return["",this.secureId].join(":")},Li.prototype.setIdfs=function(e){var t=e.split(":");t[1]&&(this.secureId=t[1])},Li.prototype.setPublisherExt=function(e){this.publisherExt=e},Li.prototype.getPublisherExt=function(){return this.publisherExt},Li.prototype.setUserExt=function(e){this.userExt=e},Li.prototype.getUserExtWithContextualData=function(){this.userExt=this.userExt||{};var e=this.userContextualDataManager.getUserContextualData();return this.userExt.data=I(I({},this.userExt.data),null==e?void 0:e.data),this.userExt.device=I(I({},this.userExt.device),null==e?void 0:e.device),this.userExt},Li);function Li(e,t,i,n,r,o,s,a){void 0===s&&(s=(new Date).getUTCMilliseconds()),void 0===a&&(a=Pe()),this.cloneByImpressionId={},this.sessionRandomId=s,this.clientSessionId=a,this.contextMetricsManager=new ui(this),this.charset=e.charset||e.characterSet||"",this.highestAccessibleWindowStruct=qe.getHighestAccessibleWindow(t),this.displayContext=this.getDisplayContext(this.highestAccessibleWindowStruct),this.highestAccessibleUrl=qe.getHighestAccessibleUrl(this.highestAccessibleWindowStruct);var c=si(this.highestAccessibleUrl);this.debugMode="1"===c.pbt_debug||!1,this.noLog="1"===c.pbt_nolog||!1,this.remoteLogging=new Jt(this.debugMode),this.debugMode&&ee(X.Debug),this.location=t.location,this.dising=!1,this.ct0=void 0,this.wpdt0=void 0,this.isAdBlocked=void 0,this.rtaVarNames=[],this.identityHelper=new Mi(e,t,i,n,r),this.serviceProvider=this.identityHelper.serviceProvider,this.synchronizeCriteoUid(),this.userContextualDataManager=o||new ai(t)}var Bi=function(){this.bids={},this.lineItemRanges=[],this.impIds=[]};function Ni(e){return"conditionalEvent"===e.name}var Hi=(Wi.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=0,n=e;i<n.length;i++){var r=n[i];this.events.push(r)}this.evalEvents()},Wi.prototype.evalEvents=function(){for(var e=0;e<this.events.length;){var t=this.events[e];if(Ni(t)&&!t.canEval())e++;else{var i=this.events.splice(e,1);try{i[0].eval(this)}catch(e){$.Error("An exception occurred processing an event: "+e.toString())}}}},Wi.VERSION=me,Wi);function Wi(e){var t;void 0===e&&(e=null===(t=window.Criteo_prebid_123||window.Criteo)||void 0===t?void 0:t.config),this.standaloneBidder=new Bi,this.events=[],this.context=new Fi(document,window,void 0,void 0,e),$.Debug("Publisher Tag loaded")}function qi(e){window.criteo_pubtag&&"serviceProvider"in window.criteo_pubtag.context||(Gt.LoadPolyfills(),window.criteo_pubtag=new Hi,window.criteo_pubtag_prebid_123=window.criteo_pubtag),window.Criteo=zi(window.Criteo||{},e),window.Criteo_prebid_123=window.Criteo,$.Debug("Publisher Tag initialized with window.criteo_pubtag|criteo_pubtag_prebid_123, window.Criteo|Criteo_prebid_123")}function zi(e,t){if(Gi(e)&&Gi(t))for(var i in t)if(Gi(t[i])){if(!Gi(e[i])&&void 0!==e[i])continue;Gi(e[i])||(e[i]={}),zi(e[i],t[i])}else void 0===e[i]&&(e[i]=t[i]);return e}function Gi(e){return e&&"object"==typeof e&&!Array.isArray(e)}function Vi(){var e,t,i,n,r,o;qi(Ut({PubTag:{Adapters:{Prebid:st},DirectBidding:{DirectBiddingEvent:Pt,DirectBiddingSlot:Re,DirectBiddingUrlBuilder:ge,Size:Le}},events:null!==(t=null===(e=window.Criteo)||void 0===e?void 0:e.events)&&void 0!==t?t:[],passbackEvents:null!==(n=null===(i=window.Criteo)||void 0===i?void 0:i.passbackEvents)&&void 0!==n?n:[],usePrebidEvents:null===(o=null===(r=window.Criteo)||void 0===r?void 0:r.usePrebidEvents)||void 0===o||o})),!1!==window.Criteo.usePrebidEvents&&(window.Criteo.events=Ft(window.Criteo.events)),window.criteo_pubtag.context.serviceProvider.getServicesAsync(function(e){Ot(e.localStorageHelper,"prebid")})}Vi(),e.DeclarePrebid=Vi}({});