text: pbjsChunk([50],{130:function(e,r,i){i(131),e.exports=i(132)},131:function(e,r,i){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.spec=void 0;var t=c(["//","/pubapi/3.0/","/","/","/","/ADTECH;v=2;cmd=bid;cors=yes;alias=","","",";misc=",""],["//","/pubapi/3.0/","/","/","/","/ADTECH;v=2;cmd=bid;cors=yes;alias=","","",";misc=",""]),a=c(["//","/bidRequest?"],["//","/bidRequest?"]),n=c(["dcn=","&pos=","&cmd=bid",""],["dcn=","&pos=","&cmd=bid",""]),d=(function(e){{if(e&&e.__esModule)return e;var r={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r.default=e,r}})(i(0)),o=i(6),s=i(8),p=i(4);function c(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var u={AOL:"aol",ONEMOBILE:"onemobile",ONEDISPLAY:"onedisplay"},l={DISPLAY:{GET:"display-get"},MOBILE:{GET:"mobile-get",POST:"mobile-post"}},b={IFRAME:{TAG:"iframe",TYPE:"iframe"},IMAGE:{TAG:"img",TYPE:"image"}},m=y(t,"host","network","placement","pageid","sizeid","alias","bidfloor","keyValues","misc"),f=y(a,"host"),v=y(n,"dcn","pos","ext"),E={us:"adserver-us.adtech.advertising.com",eu:"adserver-eu.adtech.advertising.com",as:"adserver-as.adtech.advertising.com"},h="hb.nexage.com",O=60,g=3600;pbjs.aolGlobals={pixelsDropped:!1};var I,x=(I=!0,function(){var e=pbjs.bidderSettings;I&&e&&e.aol&&"function"==typeof e.aol.bidCpmAdjustment&&(d.logWarn("bidCpmAdjustment is active for the AOL adapter. As of Prebid 0.14, AOL can bid in net – please contact your accounts team to enable."),I=!1)});function y(s){for(var e=arguments.length,i=Array(1<e?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return function(){for(var e=arguments.length,a=Array(e),r=0;r<e;r++)a[r]=arguments[r];var n=a[a.length-1]||{},o=[s[0]];return i.forEach((function(e,r){var i,t="number"==typeof(i=e)&&isFinite(i)&&Math.floor(i)===i?a[e]:n[e];o.push(t,s[r+1])})),o.join("")}}function A(e){var r,i,t,a=e.params,n=a.server,o=a.region||"us",s=void 0;return E.hasOwnProperty(o)||(d.logWarn("Unknown region '"+o+"' for AOL bidder."),o="us"),s=n||E[o],a.region=o,m({host:s,network:a.network,placement:parseInt(a.placement),pageid:a.pageId||0,sizeid:a.sizeId||0,alias:a.alias||d.getUniqueIdentifierStr(),bidfloor:(t=a.bidFloor,void 0!==t?";bidfloor="+t.toString():""),keyValues:(r=a.keyValues,i="",d._each(r,(function(e,r){i+=";kv"+r+"="+encodeURIComponent(e)})),i),misc:(new Date).getTime()})}function S(e){return f({host:e.params.host||h})}function T(e){var r=e.params,i=r.dcn,t=r.pos,a=S(e);if(i&&t){var n="";"https:"===document.location.protocol&&(e.params.ext=e.params.ext||{},e.params.ext.secure=1),d._each(e.params.ext,(function(e,r){n+="&"+r+"="+encodeURIComponent(e)})),a+=v({dcn:i,pos:t,ext:n})}return a}function P(e){return e===u.AOL||e===u.ONEMOBILE}function L(e){if(P(e.bidder)&&e.params.id&&e.params.imp&&e.params.imp[0]){var r=e.params.imp[0];return r.id&&r.tagid&&(r.banner&&r.banner.w&&r.banner.h||r.video&&r.video.mimes&&r.video.minduration&&r.video.maxduration)}}function w(e){return P(e.bidder)&&e.params.dcn&&e.params.pos}function G(e){return((r=e.bidder)===u.AOL||r===u.ONEDISPLAY)&&e.params.placement&&e.params.network;var r}var j=r.spec={code:u.AOL,aliases:[u.ONEMOBILE,u.ONEDISPLAY],isBidRequestValid:function(e){return G(e)||(w(r=e)||L(r));var r},buildRequests:function(e){return e.map((function(e){var r,i=w(r=e)?l.MOBILE.GET:L(r)?l.MOBILE.POST:G(r)?l.DISPLAY.GET:void 0;if(i)return (function(e,r){var i=void 0;switch(e){case l.DISPLAY.GET:i={url:A(r),method:"GET",ttl:O};break;case l.MOBILE.GET:i={url:T(r),method:"GET",ttl:g};break;case l.MOBILE.POST:i={url:S(r),method:"POST",ttl:g,data:r.params,options:{contentType:"application/json",customHeaders:{"x-openrtb-version":"2.2"}}}}return i.bidderCode=r.bidder,i.bidId=r.bidId,i.userSyncOn=r.params.userSyncOn,i})(i,e)}))},interpretResponse:function(e,r){var i=e.body;if(x(),i){var t=this._parseBidResponse(i,r);if(t)return t}else d.logError("Empty bid response",r.bidderCode,i)},_formatPixels:function(e){return"<script>var w=window,prebid;for(var i=0;i<10;i++){w = w.parent;prebid=w.pbjs;if(prebid && prebid.aolGlobals && !prebid.aolGlobals.pixelsDropped){try{prebid.aolGlobals.pixelsDropped=true;"+e.replace(/<\/?script( type=('|")text\/javascript('|")|)?>/g,"")+"break;}catch(e){continue;}}}<\/script>"},_parseBidResponse:function(e,r){var i=void 0;try{i=e.seatbid[0].bid[0]}catch(e){return}var t=void 0;if(i.ext&&i.ext.encp)t=i.ext.encp;else if(null===(t=i.price)||isNaN(t))return void d.logError("Invalid price in bid response",u.AOL,bid);var a=i.adm;return e.ext&&e.ext.pixels&&s.config.getConfig("aol.userSyncOn")!==p.EVENTS.BID_RESPONSE&&(a+=this._formatPixels(e.ext.pixels)),{bidderCode:r.bidderCode,requestId:r.bidId,ad:a,cpm:t,width:i.w,height:i.h,creativeId:i.crid,pubapiId:e.id,currency:e.cur,dealId:i.dealid,netRevenue:!0,ttl:r.ttl}},getUserSyncs:function(e,r){var i=r[0];return s.config.getConfig("aol.userSyncOn")===p.EVENTS.BID_RESPONSE&&!pbjs.aolGlobals.pixelsDropped&&i.ext&&i.ext.pixels?(pbjs.aolGlobals.pixelsDropped=!0,(function(e){var t=/\w*(?=\s)/,a=/src=("|')(.*?)\1/,n=[];if(e){var r=e.match(/(img|iframe)[\s\S]*?src\s*=\s*("|')(.*?)\2/gi);r&&r.forEach((function(e){var r=e.match(t)[0],i=e.match(a)[2];r&&r&&n.push({type:r===b.IMAGE.TAG?b.IMAGE.TYPE:b.IFRAME.TYPE,url:i})}))}return n})(i.ext.pixels)):[]}};(0,o.registerBidder)(j)},132:function(e,r){}},[130]);