function pwtCreatePrebidNamespace(preBidNameSpace) { window[preBidNameSpace] = window[preBidNameSpace] || {}; window[preBidNameSpace].que = window[preBidNameSpace].que || [];/* prebid.js v1.13.0Updated : 2018-09-04 */!(function(d){var s=window.pbjsChunk;window.pbjsChunk=function(e,t,n){for(var r,i,o,a=0,u=[];a';c+="",c+="",c+="",c+=n.adHtml,c+="",d.write(c),d.close()}catch(u){g.log("Error in rendering creative in safe frame."),g.log(u),g.log("Rendering synchronously."),g.displayCreative(window.document,msgData.pwt_bid)}else n.adUrl?g.writeIframe(window.document,n.adUrl,n.width,n.height,""):(g.log("creative details are not found"),g.log(n))}}}catch(u){}},e.addMessageEventListenerForSafeFrame=function(t){g.addMessageEventListener(t,g.safeFrameCommunicationProtocol)},e.getElementLocation=function(t){var e,n=0,i=0;if(g.isFunction(t.getBoundingClientRect))e=t.getBoundingClientRect(),n=Math.floor(e.left),i=Math.floor(e.top);else for(;t;)n+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent;return{x:n,y:i}},e.createVLogInfoPanel=function(t,e){var n,i,r,o=window.document;if(g.visualDebugLogIsEnabled&&(n=o.getElementById(t),n&&e.length&&e[0][0]&&e[0][1]&&(r=t+"-pwtc-info",!g.isUndefined(o.getElementById(r))))){var a=g.getElementLocation(n);i=o.createElement("div"),i.id=r,i.style="position: absolute; /*top: "+a.y+"px;*/ left: "+a.x+"px; width: "+e[0][0]+"px; height: "+e[0][1]+"px; border: 1px solid rgb(255, 204, 52); padding-left: 11px; background: rgb(247, 248, 224) none repeat scroll 0% 0%; overflow: auto; z-index: 9999997; visibility: hidden;opacity:0.9;font-size:13px;font-family:monospace;";var s=o.createElement("img");s.src=g.metaInfo.protocol+"ads.pubmatic.com/AdServer/js/pwt/close.png",s.style="cursor:pointer; position: absolute; top: 2px; left: "+(a.x+e[0][0]-16-15)+"px; z-index: 9999998;",s.title="close",s.onclick=function(){i.style.display="none"},i.appendChild(s),i.appendChild(o.createElement("br"));for(var d="Slot: "+t+" | ",c=0;ca&&(a=0),i="Bid: "+e.bidder+(e.s2s?"(s2s)":"")+": "+s.getNetEcpm()+"("+s.getGrossEcpm()+"): "+a+"ms",s.getPostTimeoutStatus()&&(i+=": POST-TIMEOUT");break;case"win-bid":var s=e.bidDetails;i="Winning Bid: "+s.getAdapterID()+": "+s.getNetEcpm();break;case"win-bid-fail":i="There are no bids from PWT";break;case"hr":i="----------------------";break;case"disp":i="Displaying creative from "+e.adapter}n.appendChild(r.createTextNode(i)),n.appendChild(r.createElement("br"))}}},e.getExternalBidderStatus=function(t){var e=!0;return g.forEachOnArray(t,(function(t,n){e=window.OWT.externalBidderStatuses[n]?e&&window.OWT.externalBidderStatuses[n].status:e})),e},e.resetExternalBidderStatus=function(t){g.forEachOnArray(t,(function(t,e){g.log("resetExternalBidderStatus: "+e),window.OWT.externalBidderStatuses[e]=void 0}))}}),(function(t,e){e.COMMON={BID_PRECISION:2,DEAL_KEY_FIRST_PART:"pwtdeal_",DEAL_KEY_VALUE_SEPARATOR:"_-_",PREBID_PREFIX:"PB_",CONFIG:"config",DIV_ID:"divID",PARAMS:"params",SIZES:"sizes",HEIGHT:"height",WIDTH:"width",SLOTS:"slots",KEY_GENERATION_PATTERN_VALUE:"kgpv",KEY_VALUE_PAIRS:"kvp",IMPRESSION_ID:"iid",PARENT_ADAPTER_PREBID:"prebid"},e.CONFIG={GLOBAL:"global",ADAPTERS:"adapters",COMMON:"pwt",TIMEOUT:"t",KEY_GENERATION_PATTERN:"kgp",KEY_LOOKUP_MAP:"klm",SERVER_SIDE_KEY:"sk",PUBLISHER_ID:"pubid",PROFILE_ID:"pid",PROFILE_VERSION_ID:"pdvid",LOGGER_URL:"dataURL",TRACKER_URL:"winURL",REV_SHARE:"rev_share",THROTTLE:"throttle",BID_PASS_THROUGH:"pt",GLOBAL_KEY_VALUE:"gkv",MASK_BIDS:"maksBids",META_DATA_PATTERN:"metaDataPattern",SEND_ALL_BIDS:"sendAllBids",SERVER_SIDE_ENABLED:"serverSideEnabled",GDPR_CONSENT:"gdpr",CONSENT_STRING:"cns",GDPR_CMPAPI:"cmpApi",GDPR_TIMEOUT:"gdprTimeout",GDPR_AWC:"awc",DEFAULT_GDPR_CMPAPI:"iab",DEFAULT_GDPR_TIMEOUT:1e4,DEFAULT_GDPR_AWC:"0",DEFAULT_GDPR_CONSENT:"0",DISABLE_AJAX_TIMEOUT:"disableAjaxTimeout"},e.METADATA_MACROS={WIDTH:"_W_",HEIGHT:"_H_",PARTNER:"_P_",GROSS_ECPM:"_GE_",NET_ECPM:"_NE_",BID_COUNT:"_BC_",PARTNER_COUNT:"_PC_"},e.MACROS={WIDTH:"_W_",HEIGHT:"_H_",AD_UNIT_ID:"_AU_",AD_UNIT_INDEX:"_AUI_",INTEGER:"_I_",DIV:"_DIV_"},e.SLOT_STATUS={CREATED:0,PARTNERS_CALLED:1,TARGETING_ADDED:2,DISPLAYED:3},e.WRAPPER_TARGETING_KEYS={BID_ID:"pwtsid",BID_STATUS:"pwtbst",BID_ECPM:"pwtecp",BID_DEAL_ID:"pwtdid",BID_ADAPTER_ID:"pwtpid",BID_SIZE:"pwtsz",PUBLISHER_ID:"pwtpubid",PROFILE_ID:"pwtprofid",PROFILE_VERSION_ID:"pwtverid",META_DATA:"pwtm"},e.IGNORE_PREBID_KEYS={hb_bidder:1,hb_adid:1,hb_pb:1,hb_size:1,hb_deal:1},e.LOGGER_PIXEL_PARAMS={TIMESTAMP:"tst",PAGE_URL:"purl",TIMEOUT:"to"},e.MESSAGES={M1:": In fetchbids.",M2:": Throttled.",M3:": adapter must implement the fetchBids() function.",M4:"BidManager: entry ",M5:": Callback.",M6:"bidAlreadExists : ",M7:": Exiting from fetchBids.",M8:". Config not found, ignored.",M9:". Config ignored.",M10:"Bid is rejected as ecpm is NULL.",M11:"Bid is rejected as ecpm is NaN: ",M12:"Existing bid ecpm: ",M13:", is lower than new bid ecpm ",M14:", so we are replacing bid.",M15:", is greater than new bid ecpm ",M16:", so we are not replacing bid.",M17:"Post timeout bid, ignored.",M18:"Bid is selected.",M19:": Found winning adapterID: ",M20:"Bid is rejected as ecpm is empty string.",M21:": error in respose handler.",M22:"Bid is rejected as ecpm is <= 0.",M23:"Existing bid is default-bid with zero ecpm, thus replacing it with the new bid from partner.",M24:"Passsed argument is not a bidAdaptor",M25:"Bid details not found for bidID: "}}),(function(t,e,n){function i(t,e){this.adapterID=t,this.kgpv=e,this.bidID=a.getUniqueIdentifierStr(),this.grossEcpm=0,this.netEcpm=0,this.defaultBid=0,this.adHtml="",this.adUrl="",this.height=0,this.width=0,this.creativeID="",this.keyValuePairs={},this.isPostTimeout=!1,this.receivedTime=0,this.dealID="",this.dealChannel="",this.isWinningBid=!1,this.status=0}var r=n(4),o=n(2),a=n(1);i.prototype.getAdapterID=function(){return this.adapterID},i.prototype.getBidID=function(){return this.bidID},i.prototype.setGrossEcpm=function(t){return null===t?(a.log(o.MESSAGES.M10),a.log(this),this):a.isString(t)&&(t=t.replace(/\s/g,""),0===t.length)?(a.log(o.MESSAGES.M20),a.log(this),this):window.isNaN(t)?(a.log(o.MESSAGES.M11+t),a.log(this),this):(t=window.parseFloat(t.toFixed(o.COMMON.BID_PRECISION)),this.grossEcpm=t,this.netEcpm=window.parseFloat((this.grossEcpm*r.getAdapterRevShare(this.getAdapterID())).toFixed(o.COMMON.BID_PRECISION)),this)},i.prototype.getGrossEcpm=function(){return this.grossEcpm},i.prototype.getNetEcpm=function(){return this.netEcpm},i.prototype.setDefaultBidStatus=function(t){return this.defaultBid=t,this},i.prototype.getDefaultBidStatus=function(){return this.defaultBid},i.prototype.setAdHtml=function(t){return this.adHtml=t,this},i.prototype.getAdHtml=function(){return this.adHtml},i.prototype.setAdUrl=function(t){return this.adUrl=t,this},i.prototype.getAdUrl=function(){return this.adUrl},i.prototype.setHeight=function(t){return this.height=t,this},i.prototype.getHeight=function(){return this.height},i.prototype.setWidth=function(t){return this.width=t,this},i.prototype.getWidth=function(){return this.width},i.prototype.getKGPV=function(){return this.kgpv},i.prototype.setKeyValuePair=function(t,e){return this.keyValuePairs[t.substr(0,20)]=e,this},i.prototype.getKeyValuePairs=function(){return this.keyValuePairs},i.prototype.setPostTimeoutStatus=function(){return this.isPostTimeout=!0,this},i.prototype.getPostTimeoutStatus=function(){return this.isPostTimeout},i.prototype.setReceivedTime=function(t){return this.receivedTime=t,this},i.prototype.getReceivedTime=function(){return this.receivedTime},i.prototype.setDealID=function(t){return t&&(this.dealID=t,this.dealChannel=this.dealChannel||"PMP",this.setKeyValuePair(o.COMMON.DEAL_KEY_FIRST_PART+this.adapterID,this.dealChannel+o.COMMON.DEAL_KEY_VALUE_SEPARATOR+this.dealID+o.COMMON.DEAL_KEY_VALUE_SEPARATOR+this.bidID)),this},i.prototype.getDealID=function(){return this.dealID},i.prototype.setDealChannel=function(t){return this.dealID&&t&&(this.dealChannel=t,this.setKeyValuePair(o.COMMON.DEAL_KEY_FIRST_PART+this.adapterID,this.dealChannel+o.COMMON.DEAL_KEY_VALUE_SEPARATOR+this.dealID+o.COMMON.DEAL_KEY_VALUE_SEPARATOR+this.bidID)),this},i.prototype.getDealChannel=function(){return this.dealChannel},i.prototype.setWinningBidStatus=function(){return this.isWinningBid=!0,this},i.prototype.getWinningBidStatus=function(){return this.isWinningBid},i.prototype.setStatus=function(t){return this.status=t,this},i.prototype.getStatus=function(){return this.status},i.prototype.setSendAllBidsKeys=function(){this.setKeyValuePair(o.WRAPPER_TARGETING_KEYS.BID_ID+"_"+this.adapterID,this.bidID),this.setKeyValuePair(o.WRAPPER_TARGETING_KEYS.BID_STATUS+"_"+this.adapterID,this.getNetEcpm()>0?1:0),this.setKeyValuePair(o.WRAPPER_TARGETING_KEYS.BID_ECPM+"_"+this.adapterID,this.getNetEcpm().toFixed(o.COMMON.BID_PRECISION)),this.setKeyValuePair(o.WRAPPER_TARGETING_KEYS.BID_SIZE+"_"+this.adapterID,this.width+"x"+this.height)},t.exports.Bid=i,e.createBid=function(t,e){return new i(t,e)}}),(function(t,e,n){function i(){var t=o.COMMON.PARENT_ADAPTER_PREBID;if(!a.isOwnProperty(r.adapters,t)){var e={};e[o.CONFIG.REV_SHARE]="0.0",e[o.CONFIG.THROTTLE]="100",e[o.CONFIG.KEY_GENERATION_PATTERN]="_DIV_",e[o.CONFIG.KEY_LOOKUP_MAP]={},r.adapters[t]=e}}var r=n(5),o=n(2),a=n(1),s=null;s=this,e.getPublisherId=function(){return a.trim(r.pwt.pubid)||"0"},e.getMataDataPattern=function(){return a.isString(r[o.CONFIG.COMMON][o.CONFIG.META_DATA_PATTERN])?r[o.CONFIG.COMMON][o.CONFIG.META_DATA_PATTERN]:null},e.getSendAllBidsStatus=function(){return window.parseInt(r[o.CONFIG.COMMON][o.CONFIG.SEND_ALL_BIDS])||0},e.getTimeout=function(){return window.parseInt(r.pwt.t)||1e3},e.getDisableAjaxTimeout=function(){var t=r.pwt;return a.isOwnProperty(t,o.CONFIG.DISABLE_AJAX_TIMEOUT)?1==r.pwt.disableAjaxTimeout:!0},e.getAdapterRevShare=function(t){var e=r.adapters;return a.isOwnProperty(e[t],o.CONFIG.REV_SHARE)?1-window.parseFloat(e[t][o.CONFIG.REV_SHARE])/100:1},e.getAdapterThrottle=function(t){var e=r.adapters;return a.isOwnProperty(e[t],o.CONFIG.THROTTLE)?100-window.parseFloat(e[t][o.CONFIG.THROTTLE]):0},e.isServerSideAdapter=function(t){var e=r.adapters;return a.isOwnProperty(e[t],o.CONFIG.SERVER_SIDE_ENABLED)?1===window.parseInt(e[t][o.CONFIG.SERVER_SIDE_ENABLED]):!1},e.getAdapterMaskBidsStatus=function(t){var e=r.adapters,n={audienceNetwork:1};return a.isOwnProperty(n,t)?n[t]:a.isOwnProperty(e[t],o.CONFIG.MASK_BIDS)?window.parseInt(e[t][o.CONFIG.MASK_BIDS])||0:0},e.getBidPassThroughStatus=function(t){var e=r.adapters;return a.isOwnProperty(e[t],o.CONFIG.BID_PASS_THROUGH)?window.parseInt(e[t][o.CONFIG.BID_PASS_THROUGH]):0},e.getProfileID=function(){return a.trim(r.pwt[o.CONFIG.PROFILE_ID])||"0"},e.getProfileDisplayVersionID=function(){return a.trim(r.pwt[o.CONFIG.PROFILE_VERSION_ID])||"0"},e.getAnalyticsPixelURL=function(){return r.pwt[o.CONFIG.LOGGER_URL]||!1},e.getMonetizationPixelURL=function(){return r.pwt[o.CONFIG.TRACKER_URL]||!1},e.forEachAdapter=function(t){a.forEachOnObject(r.adapters,t)},e.getGdpr=function(){var t=r[o.CONFIG.COMMON][o.CONFIG.GDPR_CONSENT]||o.CONFIG.DEFAULT_GDPR_CONSENT;return"1"===t},e.getCmpApi=function(){return r[o.CONFIG.COMMON][o.CONFIG.GDPR_CMPAPI]||o.CONFIG.DEFAULT_GDPR_CMPAPI},e.getGdprTimeout=function(){var t=r[o.CONFIG.COMMON][o.CONFIG.GDPR_TIMEOUT];return t?window.parseInt(t):o.CONFIG.DEFAULT_GDPR_TIMEOUT},e.getAwc=function(){var t=r[o.CONFIG.COMMON][o.CONFIG.GDPR_AWC]||o.CONFIG.DEFAULT_GDPR_AWC;return"1"===t},e.addPrebidAdapter=i,e.initConfig=function(){s.addPrebidAdapter();var t={};a.forEachOnObject(o.CONFIG,(function(e,n){t[n]=""})),a.forEachOnObject(r.adapters,(function(e,n){var i={};a.forEachOnObject(n,(function(e,n){a.isOwnProperty(t,e)||(i[e]=n)})),a.forEachOnObject(n[o.CONFIG.KEY_LOOKUP_MAP],(function(t,e){a.forEachOnObject(i,(function(t,n){e[t]=n}))}))}))}}),(function(t,e){e.pwt={t:"1000",pid:"938",gcv:"61",pdvid:"20",pubid:"156315",dataURL:"t.pubmatic.com/wl?",winURL:"t.pubmatic.com/wt?",metaDataPattern:0,sendAllBids:"0",adserver:"UAS",gdpr:"0",cmp:0,gdprTimeout:0,awc:0,platform:"display"},e.adapters={criteo:{rev_share:"0.0",timeout:"1000",throttle:"100",kgp:"_AU_@_W_x_H_",klm:{"10004559@970x250":{zoneId:"1317730"},"10004560@728x90":{zoneId:"1317745"},"10004561@300x600":{zoneId:"1317728"},"10004562@300x600":{zoneId:"1317727"},"10004563@728x90":{zoneId:"1317744"},"10004576@970x250":{zoneId:"1317729"}}},districtm:{rev_share:"0.0",timeout:"1000",throttle:"100",serverSideEnabled:"0",amp:0,kgp:"_AU_@_W_x_H_",klm:{"10004559@970x250":{placementId:"13857492",member:"1908"},"10004560@728x90":{placementId:"13857489",member:"1908"},"10004561@300x250":{placementId:"13857468",member:"1908"},"10004561@300x600":{placementId:"13857474",member:"1908"},"10004562@300x250":{placementId:"13857468",member:"1908"},"10004562@300x600":{placementId:"13857474",member:"1908"},"10004563@728x90":{placementId:"13857489",member:"1908"},"10004576@970x250":{placementId:"13857492",member:"1908"}}},pubmatic:{publisherId:"156315",rev_share:"0.0",timeout:"1000",throttle:"100",pt:0,serverSideEnabled:"0",amp:0,kgp:"_AU_@_W_x_H_:_AUI_",sk:"true"}}}),(function(t,e,n){function i(t){l.isOwnProperty(window.PWT.bidMap,t)||(window.PWT.bidMap[t]=g.createBMEntry(t))}function r(t,e,n,i){window.PWT.bidMap[t].setNewBid(e,n),window.PWT.bidIdMap[n.getBidID()]={s:t,a:e},0===n.getDefaultBidStatus()&&l.vLogInfo(t,{type:"bid",bidder:e+(0!==u.getBidPassThroughStatus(e)?"(Passthrough)":""),bidDetails:n,latency:i,s2s:u.isServerSideAdapter(e)})}function o(t,e,n){var i="",r=0,o=0,s=p.METADATA_MACROS,d="g";l.forEachOnObject(e.adapters,(function(e,n){""!=n.getLastBidID()&&("pubmaticServer"!==e&&o++,l.forEachOnObject(n.bids,(function(e,n){1!=n.getDefaultBidStatus()&&1!=n.getPostTimeoutStatus()&&(r++,i+=a(t,n))})))})),0==i.length&&(i=t),i=i.replace(new RegExp(s.BID_COUNT,d),r),i=i.replace(new RegExp(s.PARTNER_COUNT,d),o),n[p.WRAPPER_TARGETING_KEYS.META_DATA]=encodeURIComponent(i)}function a(t,e){var n=p.METADATA_MACROS,i="g";return t.replace(new RegExp(n.PARTNER,i),e.getAdapterID()).replace(new RegExp(n.WIDTH,i),e.getWidth()).replace(new RegExp(n.HEIGHT,i),e.getHeight()).replace(new RegExp(n.GROSS_ECPM,i),e.getGrossEcpm()).replace(new RegExp(n.NET_ECPM,i),e.getNetEcpm())}function s(t){var e=null,n={};return l.forEachOnObject(t.adapters,(function(t,i){var r=h.auctionBidsCallBack(t,i,n,e);e=r.winningBid,n=r.keyValuePairs})),null!==u.getMataDataPattern()&&o(u.getMataDataPattern(),t,n),{wb:e,kvp:n}}function d(t,e,n,i){return""!=e.getLastBidID()?(l.forEachOnObject(e.bids,(function(e,r){return r.getPostTimeoutStatus()===!0?{winningBid:i,keyValuePairs:n}:(1!==r.getDefaultBidStatus()&&1==u.getSendAllBidsStatus()&&r.setSendAllBidsKeys(),0===u.getBidPassThroughStatus(t)&&l.copyKeyValueObject(n,r.getKeyValuePairs()),0!==u.getBidPassThroughStatus(t)?(l.copyKeyValueObject(n,r.getKeyValuePairs()),{winningBid:i,keyValuePairs:n}):(null==i?i=r:i.getNetEcpm()0?(e.setStatus(1),e.setWinningBidStatus(),l.vLogInfo(t,{type:"win-bid",bidDetails:e})):l.vLogInfo(t,{type:"win-bid-fail"})}return{wb:e,kvp:n}},e.getBidById=function(t){if(!l.isOwnProperty(window.PWT.bidIdMap,t))return l.log(p.MESSAGES.M25+t),null;var e=window.PWT.bidIdMap[t].s,n=window.PWT.bidIdMap[t].a;if(l.isOwnProperty(window.PWT.bidMap,e)){l.log("BidID: "+t+", DivID: "+e+p.MESSAGES.M19+n);var i=window.PWT.bidMap[e].getBid(n,t);return null==i?null:{bid:i,slotid:e}}return l.log(p.MESSAGES.M25+t),null},e.displayCreative=function(t,e){var n=h.getBidById(e);if(n){var i=n.bid,r=n.slotid;l.displayCreative(t,i),l.vLogInfo(r,{type:"disp",adapter:i.getAdapterID()}),h.executeMonetizationPixel(r,i)}},e.executeAnalyticsPixel=function(){var t={s:[]},e=u.getPublisherId(),n=f.getUserConsentDataFromLS(),i="",r=u.getAnalyticsPixelURL(),o={};r&&(r=l.metaInfo.protocol+r+"pubid="+e,t[p.CONFIG.PUBLISHER_ID]=u.getPublisherId(),t[p.LOGGER_PIXEL_PARAMS.TIMEOUT]=""+u.getTimeout(),t[p.LOGGER_PIXEL_PARAMS.PAGE_URL]=window.decodeURIComponent(l.metaInfo.pageURL),t[p.LOGGER_PIXEL_PARAMS.TIMESTAMP]=l.getCurrentTimestamp(),t[p.CONFIG.PROFILE_ID]=u.getProfileID(),t[p.CONFIG.PROFILE_VERSION_ID]=u.getProfileDisplayVersionID(),u.getGdpr()&&(i=n&&n.c?encodeURIComponent(n.c):"",t[p.CONFIG.GDPR_CONSENT]=n&&n.g,t[p.CONFIG.CONSENT_STRING]=i,r+="&gdEn="+(u.getGdpr()?1:0)),l.forEachOnObject(window.PWT.bidMap,(function(t,e){h.analyticalPixelCallback(t,e,o)})),l.forEachOnObject(o,(function(e,n){n.length>0&&(t.s=n,t[p.COMMON.IMPRESSION_ID]=window.encodeURIComponent(e),(new window.Image).src=r+"&json="+window.encodeURIComponent(JSON.stringify(t)))})))},e.executeMonetizationPixel=function(t,e){var n=u.getMonetizationPixelURL(),i=u.getPublisherId();n&&(n+="pubid="+i,n+="&purl="+window.encodeURIComponent(l.metaInfo.pageURL),n+="&tst="+l.getCurrentTimestamp(),n+="&iid="+window.encodeURIComponent(window.PWT.bidMap[t].getImpressionID()),n+="&bidid="+window.encodeURIComponent(e.getBidID()),n+="&pid="+window.encodeURIComponent(u.getProfileID()),n+="&pdvid="+window.encodeURIComponent(u.getProfileDisplayVersionID()),n+="&slot="+window.encodeURIComponent(t),n+="&pn="+window.encodeURIComponent(e.getAdapterID()),n+="&en="+window.encodeURIComponent(e.getNetEcpm()),n+="&eg="+window.encodeURIComponent(e.getGrossEcpm()),n+="&kgpv="+window.encodeURIComponent(e.getKGPV()),h.setImageSrcToPixelURL(n))},e.analyticalPixelCallback=c,e.setImageSrcToPixelURL=function(t){var e=new window.Image;e.src=l.metaInfo.protocol+t},e.getAllPartnersBidStatuses=function(t,e){var n=!0;return l.forEachOnArray(e,(function(e,i){t[i]&&l.forEachOnObject(t[i].adapters,(function(t,e){l.forEachOnObject(e.bids,(function(t,e){n=n&&0===e.getDefaultBidStatus()}))}))})),n}}),(function(t,e){function n(t,e){return toString.call(t)==="[object "+e+"]"}var i="OpenWrap",r=909090,o=function(t){return n(t,"Function")},a=(function(){try{return window.localStorage&&o(window.localStorage.getItem)&&o(window.localStorage.setItem)}catch(t){return!1}})(),s=function(t,e,n,r){var o;if(a){try{o=window.localStorage.getItem(i)}catch(s){}if(o&&"string"==typeof o)try{o=JSON.parse(o)}catch(s){o={}}else o={};o&&(o.hasOwnProperty(t)||(o[t]={}),o[t].t=(new Date).getTime(),o[t][e]=n,"c"==e&&(o[t].g=r?1:0));try{window.localStorage.setItem(i,JSON.stringify(o))}catch(s){}}};e.setConsentDataInLS=s,e.isCmpFound=function(){return!!window.__cmp},e.getUserConsentDataFromCMP=function(){function t(t){if(t&&t.data&&t.data.__cmp&&t.data.__cmp.result){var e=t.data.__cmp.result;e&&e.consentData?s(n,"c",e.consentData,e.gdprApplies):"string"==typeof e&&s(n,"c",e)}}function e(){window.__cmp("getConsentData","vendorConsents",(function(t){t&&t.consentData?s(n,"c",t.consentData,t.gdprApplies):"string"==typeof t&&s(n,"c",t)}))}var n=r,i=0,o={__cmp:{callId:"iframe:"+ ++i,command:"getConsentData"}};window.__cmp?"function"==typeof window.__cmp?e():setTimeout((function(){"function"==typeof window.__cmp&&e()}),500):(window.top.postMessage(o,"*"),window.addEventListener("message",t))},e.getUserConsentDataFromLS=function(){var t=r,e={c:"",g:0};if(!a)return e;var n;try{n=window.localStorage.getItem(i)}catch(o){}if(n&&"string"==typeof n){try{n=JSON.parse(n)}catch(o){n={}}if(n.hasOwnProperty(t)){var s=n[t];s&&s.c&&s.t&&s.t&&parseInt(s.t,10)>(new Date).getTime()-864e5&&(e.c=s.c,e.g=s.g)}}return e}}),(function(t,e,n){function i(t){this.name=t,this.sizes=[],this.adapters={},this.creationTime=o.getCurrentTimestampInMs(),this.impressionID="",this.analyticsEnabled=!1,this.expired=!1}var r=n(2),o=n(1),a=n(9).AdapterEntry;i.prototype.setExpired=function(){return this.expired=!0,this},i.prototype.getExpiredStatus=function(){return this.expired},i.prototype.setAnalyticEnabled=function(){return this.analyticsEnabled=!0,this},i.prototype.getAnalyticEnabledStatus=function(){return this.analyticsEnabled},i.prototype.setNewBid=function(t,e){o.isOwnProperty(this.adapters,t)||(this.adapters[t]=new a(t)),this.adapters[t].setNewBid(e)},i.prototype.getBid=function(t,e){return o.isOwnProperty(this.adapters,t)?this.adapters[t].getBid(e):void 0},i.prototype.getName=function(){return this.name},i.prototype.getCreationTime=function(){return this.creationTime},i.prototype.setImpressionID=function(t){return this.impressionID=t,this},i.prototype.getImpressionID=function(){return this.impressionID},i.prototype.setSizes=function(t){return this.sizes=t,this},i.prototype.getSizes=function(){return this.sizes},i.prototype.setAdapterEntry=function(t){return o.isOwnProperty(this.adapters,t)||(this.adapters[t]=new a(t),o.log(r.MESSAGES.M4+this.name+" "+t+" "+this.adapters[t].getCallInitiatedTime())),this},i.prototype.getLastBidIDForAdapter=function(t){return o.isOwnProperty(this.adapters,t)?this.adapters[t].getLastBidID():""},t.exports.BMEntry=i,e.createBMEntry=function(t){return new i(t)}}),(function(t,e,n){function i(t){this.adapterID=t,this.callInitiatedTime=r.getCurrentTimestampInMs(),this.bids={},this.lastBidID=""}var r=n(1);i.prototype.getCallInitiatedTime=function(){return this.callInitiatedTime},i.prototype.getLastBidID=function(){return this.lastBidID},i.prototype.getBid=function(t){return r.isOwnProperty(this.bids,t)?this.bids[t]:null},i.prototype.setNewBid=function(t){delete this.bids[this.lastBidID];var e=t.getBidID();this.bids[e]=t,this.lastBidID=e},t.exports.AdapterEntry=i}),(function(t,e,n){function i(t){b.isObject(t)&&(M=t)}function r(){return M}function o(t,e){b.isObject(t)&&b.isFunction(t.getDivID)&&b.isArray(e)&&e[0]&&e[0]==t.getDivID()&&(t.setDisplayFunctionCalled(!0),t.setArguments(e))}function a(t,e){if(!b.isOwnProperty(B.slotsMap,t)){var n=_.createSlot(t);n.setDivID(t),n.setPubAdServerObject(e),n.setAdUnitID(e.getAdUnit()),n.setAdUnitIndex(0),n.setSizes(e.getDimensions()),n.setStatus(v.SLOT_STATUS.CREATED),B.slotsMap[t]=n,b.createVLogInfoPanel(t,n.getSizes())}}function s(t,e,n){b.log("Generating slotsMap"),b.forEachOnArray(t,(function(t,i){var r=i.getId();B.storeInSlotsMap(r,i,n),n&&b.isOwnProperty(B.slotsMap,r)&&B.setDisplayFunctionCalledIfRequired(B.slotsMap[r],e)})),b.log(B.slotsMap)}function d(t){return b.isOwnProperty(B.slotsMap,t)?B.slotsMap[t].getStatus():v.SLOT_STATUS.DISPLAYED}function c(t,e){b.isOwnProperty(B.slotsMap,t)&&B.slotsMap[t].updateStatusAfterRendering(e)}function u(t){var e=A.getBid(t),n=e.wb||null,i=e.kvp||null,r=B.slotsMap[t].getPubAdServerObject(),o=v.IGNORE_PREBID_KEYS;if(b.log("DIV: "+t+" winningBid: "),b.log(n),n&&n.getNetEcpm()>0){B.slotsMap[t].setStatus(v.SLOT_STATUS.TARGETING_ADDED),r.setTargeting(v.WRAPPER_TARGETING_KEYS.BID_ID,n.getBidID()),r.setTargeting(v.WRAPPER_TARGETING_KEYS.BID_STATUS,n.getStatus()),r.setTargeting(v.WRAPPER_TARGETING_KEYS.BID_ECPM,n.getNetEcpm().toFixed(v.COMMON.BID_PRECISION)),r.setWrapperEcpm(n.getNetEcpm().toFixed(v.COMMON.BID_PRECISION));var a=n.getDealID();a&&r.setTargeting(v.WRAPPER_TARGETING_KEYS.BID_DEAL_ID,a),r.setTargeting(v.WRAPPER_TARGETING_KEYS.BID_ADAPTER_ID,n.getAdapterID()),r.setTargeting(v.WRAPPER_TARGETING_KEYS.PUBLISHER_ID,P.getPublisherId()),r.setTargeting(v.WRAPPER_TARGETING_KEYS.PROFILE_ID,P.getProfileID()),r.setTargeting(v.WRAPPER_TARGETING_KEYS.PROFILE_VERSION_ID,P.getProfileDisplayVersionID())}b.forEachOnObject(i,(function(t,e){b.isOwnProperty(o,t)||r.setTargeting(t,e)}))}function p(t,e){var n=e.getStatus();n!=v.SLOT_STATUS.DISPLAYED&&n!=v.SLOT_STATUS.TARGETING_ADDED&&B.findWinningBidAndApplyTargeting(t)}function l(t,e,n,i){b.log(t),b.log(i),B.updateStatusAfterRendering(i[0],!1),n(i[0])}function f(t,e,n){B.getStatusOfSlotForDivId(n[0])!=v.SLOT_STATUS.DISPLAYED?B.updateStatusAndCallOriginalFunction_Display("Calling original display function after timeout with arguments, ",t,e,n):b.log("AdSlot already rendered")}function g(t){var e=[];return b.forEachOnArray(t,(function(t,n){e.push(B.slotsMap[n])})),e}function h(t){var e=[];return b.forEachOnObject(B.slotsMap,(function(n,i){b.isOwnProperty(t,i.getStatus())&&e.push(n)})),e}function m(t){b.forEachOnArray(t,(function(t,e){if(b.isOwnProperty(B.slotsMap,e)){var n=B.slotsMap[e];n.setStatus(v.SLOT_STATUS.PARTNERS_CALLED)}}))}function w(t,e,n){if(t.length>0){B.updateStatusOfQualifyingSlotsBeforeCallingAdapters(t,e,n);var i=B.arrayOfSelectedSlots(t);T.callAdapters(i)}}function I(t,e,n){b.getExternalBidderStatus(e)&&A.getAllPartnersBidStatuses(window.PWT.bidMap,e)?(b.resetExternalBidderStatus(e),n()):t>0&&window.setTimeout((function(){B.executeDisplay(t-10,e,n)}),10)}function y(t,e,n,i){switch(t){case v.SLOT_STATUS.CREATED:case v.SLOT_STATUS.PARTNERS_CALLED:var r=Object.keys(B.slotsMap);"object"==typeof window.OWT.externalBidderStatuses[i[0]]&&window.OWT.externalBidderStatuses[i[0]]&&B.executeDisplay(P.getTimeout(),r,(function(){b.forEachOnObject(B.slotsMap,(function(t,e){B.findWinningBidIfRequired_Display(t,e)})),B.processDisplayCalledSlot(e,n,i)})),setTimeout((function(){b.log("PostTimeout.. back in display function"),b.forEachOnObject(B.slotsMap,(function(t,e){B.findWinningBidIfRequired_Display(t,e)})),B.processDisplayCalledSlot(e,n,i)}),P.getTimeout());break;case v.SLOT_STATUS.TARGETING_ADDED:B.updateStatusAndCallOriginalFunction_Display("As DM processing is already done, Calling original display function with arguments",e,n,i);break;case v.SLOT_STATUS.DISPLAYED:B.updateStatusAndCallOriginalFunction_Display("As slot is already displayed, Calling original display function with arguments",e,n,i)}}function E(t){t.Phoenix.registerPreDisplayHandler((function(t,e){O.getUserConsentDataFromCMP();var n=window.Phoenix||{};B.updateSlotsMapFromPhoenixSlots(n.getSlots(),[e],!0),B.displayFunctionStatusHandler(d(e),{},t,[e]);var i={};i[v.SLOT_STATUS.CREATED]="",B.forQualifyingSlotNamesCallAdapters(h(i),[e],!1),setTimeout((function(){b.realignVLogInfoPanel(e),A.executeAnalyticsPixel()}),2e3+P.getTimeout())}))}function S(t){return b.isObject(t)&&b.isObject(t.PWT)&&b.isFunction(t.PWT.jsLoaded)?(t.PWT.jsLoaded(),!0):!1}function D(t){if(b.isUndefined(t.Phoenix.isJSLoaded)&&b.isObject(t.Phoenix)&&b.isArray(t.Phoenix.EQ)){b.log("Succeeded to load before UAS");var e=this;return t.Phoenix.EQ.unshift((function(){b.log("OpenWrap initialization started"),e.initiateDisplay(t),b.log("OpenWrap initialization completed")})),C.init(t),!0}return b.log("Failed to load before UAS"),!1}var P=n(4),v=n(2),b=n(1),T=n(11),A=n(6),O=n(7),_=n(13),C=n(14),R={};e.slotsMap=R;var M=null,B=this;e.setWindowReference=i,e.getWindowReference=r,e.setDisplayFunctionCalledIfRequired=o,e.storeInSlotsMap=a,e.updateSlotsMapFromPhoenixSlots=s,e.getStatusOfSlotForDivId=d,e.updateStatusAfterRendering=c,e.findWinningBidAndApplyTargeting=u,e.findWinningBidIfRequired_Display=p,e.updateStatusAndCallOriginalFunction_Display=l,e.processDisplayCalledSlot=f,e.arrayOfSelectedSlots=g,e.getSlotNamesByStatus=h,e.updateStatusOfQualifyingSlotsBeforeCallingAdapters=m,e.forQualifyingSlotNamesCallAdapters=w,e.executeDisplay=I,e.displayFunctionStatusHandler=y,e.initiateDisplay=E,e.callJsLoadedIfRequired=S,e.initPhoenixScript=D,e.init=function(t){return P.initConfig(),b.isObject(t)?(B.setWindowReference(t),T.registerAdapters(),B.initPhoenixScript(t),B.callJsLoadedIfRequired(t),!0):!1}}),(function(t,e,n){function i(){return Math.floor(100*Math.random())}function r(t,e,n){l.forEachOnObject(t,(function(t,i){m.setInitTimeForSlotsForAdapter(e,t),i.fB(e,n)}))}function o(t,e){l.forEachOnArray(t,(function(t,n){var i=n.getDivID();f.resetBid(i,e),f.setSizes(i,l.generateSlotNamesFromPattern(n,"_W_x_H_"))}))}function a(t,e){return!(t>=u.getAdapterThrottle(e))}function s(t,e){l.forEachOnObject(t,(function(t,n){f.setCallInitTime(n.getDivID(),e)}))}function d(t){if(t){var e=t.ID();l.isFunction(t.fB)?m.registeredAdapters[e]=t:l.log(e+p.MESSAGES.M3)}else l.log(p.MESSAGES.M3),l.log(t)}function c(){m.registerAdapter(g.register())}var u=n(4),p=n(2),l=n(1),f=n(6),g=n(12),h={};e.registeredAdapters=h;var m=this;e.callAdapters=function(t){var e=l.generateUUID();m.resetSlots(t,e),m.callAdapter(h,t,e)},e.getRandomNumberBelow100=i,e.callAdapter=r,e.resetSlots=o,e.throttleAdapter=a,e.setInitTimeForSlotsForAdapter=s,e.registerAdapter=d,e.registerAdapters=c}),(function(t,e,n){function i(t,e){var n=g.createBid(t.bidderCode,e),i=parseInt(t.pubmaticServerErrorCode);return n.setGrossEcpm(t.cpm),n.setDealID(t.dealId),n.setDealChannel(t.dealChannel),n.setAdHtml(t.ad||""),n.setAdUrl(t.adUrl||""),n.setWidth(t.width),n.setHeight(t.height),n.setReceivedTime(t.responseTimestamp),1===i||2===i?(n.setDefaultBidStatus(0),n.setWidth(0),n.setHeight(0)):3===i||5===i?(n.setDefaultBidStatus(1),n.setPostTimeoutStatus()):i&&n.setDefaultBidStatus(1),h.forEachOnObject(t.adserverTargeting,(function(t,e){"hb_format"!==t&&"hb_source"!==t&&n.setKeyValuePair(t,e)})),n}function r(t){var e=t.adUnitCode||"";if(h.isOwnProperty(S.kgpvMap,e)){if("pubmaticServer"===t.bidderCode&&(t.bidderCode=t.originalBidder),t.bidderCode&&l.isServerSideAdapter(t.bidderCode)){var n=S.kgpvMap[e].divID,i=S.getPBCodeWithWidthAndHeight(n,t.bidderCode,t.width,t.height),r=S.getPBCodeWithoutWidthAndHeight(n,t.bidderCode);if(h.isOwnProperty(S.kgpvMap,i))e=i;else{if(!h.isOwnProperty(S.kgpvMap,r))return h.log("Failed to find kgpv details for S2S-adapter:"+t.bidderCode),void 0;e=r}}t.bidderCode&&m.setBidFromBidder(S.kgpvMap[e].divID,S.transformPBBidToOWBid(t,S.kgpvMap[e].kgpv))}else h.log("Failed to find pbBid.adUnitCode in kgpvMap, pbBid.adUnitCode:"+t.adUnitCode)}function o(t){for(var e in t)if(h.isOwnProperty(t,e)&&h.isOwnProperty(S.kgpvMap,e))for(var n=t[e],r=n.bids||[],o=0;o0&&window[y])try{if(h.isFunction(window[y].setConfig)){var a={debug:h.isDebugLogEnabled(),bidderSequence:"random",userSync:{iframeEnabled:!0,pixelEnabled:!0,enabledBidders:(function(){var t=[];return l.forEachAdapter((function(e){t.push(e)})),t})(),syncDelay:2e3},disableAjaxTimeout:l.getDisableAjaxTimeout()};l.getGdpr()&&(a.consentManagement={cmpApi:l.getCmpApi(),timeout:l.getGdprTimeout(),allowAuctionWithoutConsent:l.getAwc()}),window[y].setConfig(a)}if(!h.isFunction(window[y].requestBids))return h.log("PreBid js requestBids function is not available"),void 0;window[y].requestBids({adUnits:r,bidsBackHandler:function(t){h.log("In PreBid bidsBackHandler with bidResponses: "),h.log(t)},timeout:l.getTimeout()-50})}catch(s){h.log("Error occured in calling PreBid."),h.log(s)}}function p(){return S.parentAdapterID}var l=n(4),f=n(2),g=n(3),h=n(1),m=n(6),w=n(11),I=(n(5),f.COMMON.PARENT_ADAPTER_PREBID),y="pbjs";e.parentAdapterID=I;var E={};e.kgpvMap=E;var S=this;e.transformPBBidToOWBid=i,e.pbBidStreamHandler=r,e.handleBidResponses=o,e.getPBCodeWithWidthAndHeight=a,e.getPBCodeWithoutWidthAndHeight=s,e.generatedKeyCallback=d,e.generatePbConf=c,e.fetchBids=u,e.getParenteAdapterID=p,e.register=function(){return{fB:S.fetchBids,ID:S.getParenteAdapterID}}}),(function(t,e,n){function i(t){this.name=t,this.status=r.SLOT_STATUS.CREATED,this.divID="",this.adUnitID="",this.adUnitIndex=0,this.sizes=[],this.keyValues={},this.arguments=[],this.pubAdServerObject=null,this.displayFunctionCalled=!1,this.refreshFunctionCalled=!1}var r=n(2);i.prototype.getName=function(){return this.name},i.prototype.setStatus=function(t){return this.status=t,this},i.prototype.getStatus=function(){return this.status},i.prototype.setDivID=function(t){return this.divID=t,this},i.prototype.getDivID=function(){return this.divID},i.prototype.setAdUnitID=function(t){return this.adUnitID=t,this},i.prototype.getAdUnitID=function(){return this.adUnitID},i.prototype.setAdUnitIndex=function(t){return this.adUnitIndex=t,this},i.prototype.getAdUnitIndex=function(){return this.adUnitIndex},i.prototype.setSizes=function(t){return this.sizes=t,this},i.prototype.getSizes=function(){return this.sizes},i.prototype.setKeyValue=function(t,e){return this.keyValues[t]=e,this},i.prototype.setKeyValues=function(t){return this.keyValues=t,this},i.prototype.getkeyValues=function(){return this.keyValues},i.prototype.setArguments=function(t){return this.arguments=t,this},i.prototype.getArguments=function(){return this.arguments},i.prototype.setPubAdServerObject=function(t){return this.pubAdServerObject=t,this},i.prototype.getPubAdServerObject=function(){return this.pubAdServerObject},i.prototype.setDisplayFunctionCalled=function(t){return this.displayFunctionCalled=t,this},i.prototype.isDisplayFunctionCalled=function(){return this.displayFunctionCalled},i.prototype.setRefreshFunctionCalled=function(t){return this.refreshFunctionCalled=t,this},i.prototype.isRefreshFunctionCalled=function(){return this.refreshFunctionCalled},i.prototype.updateStatusAfterRendering=function(t){this.status=r.SLOT_STATUS.DISPLAYED,this.arguments=[],t?this.refreshFunctionCalled=!1:this.displayFunctionCalled=!1},t.exports.Slot=i,e.createSlot=function(t){return new i(t)}}),(function(t,e){!(function(e,n){t.exports=n()})("undefined"!=typeof self?self:this,(function(){return (function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=2)})([(function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=!1,r=!1,o="Array",a="String",s="Function",d="Number",c=Object.prototype.toString;e.debugLogIsEnabled=i,e.visualDebugLogIsEnabled=r;var u=function(t,e){return c.call(t)==="[object "+e+"]"};e.isA=u;var p=function(t){return u(t,s)};e.isFunction=p;var l=function(t){return u(t,a)};e.isString=l;var f=function(t){return u(t,o)};e.isArray=f;var g=function(t){return u(t,d)};e.isNumber=g;var h=function(t){return"object"===("undefined"==typeof t?"undefined":n(t))&&null!==t};e.isObject=h;var m=function(t,e){return t.hasOwnProperty?t.hasOwnProperty(e):!1};e.isOwnProperty=m;var w=function(t){return"undefined"==typeof t};e.isUndefined=w;var I=function(){i=!0};e.enableDebugLog=I;var y=function(){return i};e.isDebugLogEnabled=y;var E=function(){i=!0,r=!0};e.enableVisualDebugLog=E;var S="[OpenWrap] : ",D=function(t){i&&console&&this.isFunction(console.log)&&(this.isString(t)?console.log((new Date).getTime()+" : "+S+t):console.log(t))};e.log=D;var P=function(t,e){if(h(t)&&p(e))for(var n in t)m(t,n)&&e(n,t[n])};e.forEachOnObject=P;var v=function(t,e){if(f(t)&&p(e))for(var n=0,i=t.length;i>n;n++)e(n,t[n])};e.forEachOnArray=v;var b=function(t,e){return t.document.createElement(e)};e.createDocElement=b;var T=function _(t){try{if(t.parent.document!=t.document)return _(t.parent)}catch(e){}return t};e.getTopFrameOfSameDomain=T;var A=function(t){var e,n={},i=512;n.pageURL="",n.refURL="",n.protocol="http://",n.secure=0,n.isInIframe=t.self!==t.top;try{e=T(t),n.refURL=(e.refurl||e.document.referrer||"").substr(0,i),n.pageURL=(e!==window.top&&""!=e.document.referrer?e.document.referrer:e.location.href).substr(0,i),n.protocol=("https:"===e.location.protocol?(n.secure=1,"https"):"http")+"://"}catch(r){}return n};e.getMetaInfo=A;var O=function(t){var e=b(window,"iframe");return e.id=t.id,t.src&&(e.src=t.src),e.height=t.height,e.width=t.width,e.scrolling=t.scrolling,e.frameborder=t.frameborder,e.style.cssText=t.cssText,e};e.createFriendlyIframe=O}),(function(t,e){"use strict";e.SLOT_STATUS={CREATED:0,PARTNERS_CALLED:1,TARGETING_ADDED:2,DISPLAYED:3},e.SERVER_PATH="ae.pubmatic.com/ad?"}),(function(t,e,n){"use strict";function i(t){var e=t.Phoenix;return(a.isUndefined(e)||a.isUndefined(e.isJSLoaded))&&(t.Phoenix=new s.PhoenixClass),t.Phoenix}function r(t){1!=Phoenix.isJSLoaded&&(Phoenix=i(t),Phoenix.isJSLoaded=!0,a.log("Phoenix.js is loaded successfully."),Phoenix.EQ.executeQ())}function o(t){t.PubMatic=t.PubMatic||{},t.PubMatic._uidCB=function(t){PubMatic.pm_uid_bc=t.u}}var a=n(0),s=n(3);e.createPhoenixNamespace=i,e.initPhoenix=r,e.createPubMaticNamespace=o;var d=function(t){return a.isObject(t)?(o(t),r(t),!0):!1};e.init=d}),(function(t,e,n){"use strict";function i(){var t=o.getMetaInfo(window);this.singleRequestCall=!1,this.isSingleRequestCallAlreadyFired=!1,this.req_type=219,this.commonKeywordsAnding=0,this.secure=t.secure,this.protocol=t.protocol,this.accountID="",this.commonTargetings={},this.commonKeywords=[],this.customInfo={},this.slotStorage={},this.preDisplayHandlers=[],this.EQ=new s.EexecutionQueue(window.Phoenix),this.userSyncupInitiated=!1;var e=this;this.registerPreDisplayHandler((function(t){var n=!1;if(1==e.customInfo.gdpr)t();else{var i=o.createDocElement(window,"script"),r=window.document.getElementsByTagName("script")[0];i.type="text/javascript",i.async=!0,i.src=e.protocol+"image6.pubmatic.com/AdServer/UCookieSetPug?oid=2&cb=PubMatic._uidCB",r.parentNode.insertBefore(i,r);var a=setInterval((function(){window.PubMatic&&window.PubMatic.hasOwnProperty("._uidCB")&&clearInterval(a)}),50);setTimeout((function(){!n&&t(),n=!0,clearInterval(a)}),500)}}))}var r=n(1),o=n(0),a=n(4),s=n(5),d=n(6),c=n(7),u=n(8);i.prototype.initiateUserSyncup=function(){this.userSyncupInitiated=!0;var t=this;setTimeout((function(){var e,n=t.protocol+"ads.pubmatic.com/AdServer/js/showad.js#PIX&kdntuid=1&bce=1&p="+t.accountID;n+="&gdpr="+t.customInfo.gdpr||0,n+="&gdpr_consent="+t.customInfo.gdpr_consent||"",e=document.createElement("iframe"),e.src=n,e.style.height="0px",e.style.width="0px",e.style.display="none",e.height=0,e.width=0,e.border="0px",e.hspace="0",e.vspace="0",e.marginWidth="0",e.marginHeight="0",e.style.border="0",e.scrolling="no",e.frameBorder="0",window.document.getElementsByTagName("script")[0].parentNode.appendChild(e)}),2e3)},i.prototype.setRequestType=function(t){isNaN(t)||(this.req_type=t)},i.prototype.getAccountId=function(){return this.accountID},i.prototype.enableSingleRequestCallMode=function(){this.singleRequestCall=!0},i.prototype.enableCommonKeywordsAnding=function(){this.commonKeywordsAnding=1},i.prototype.setCommonTargeting=function(t,e){var n=this;n.commonTargetings.hasOwnProperty(t)||(n.commonTargetings[t]=[]),o.isArray(e)?o.forEachOnArray(e,(function(e,i){n.commonTargetings[t].push(i)})):n.commonTargetings[t].push(e)},i.prototype.getCommonTargetingKeys=function(){var t=[];return o.forEachOnObject(this.commonTargetings,(function(e){o.isUndefined(e)||t.push(e)})),t},i.prototype.getCommonTargeting=function(t){return this.commonTargetings.hasOwnProperty(t)?this.commonTargetings[t]:""},i.prototype.setCommonKeywords=function(t){var e=this;o.isArray(t)&&o.forEachOnArray(t,(function(t,n){e.commonKeywords.push(n)}))},i.prototype.getCommonKeywords=function(){return this.commonKeywords},i.prototype.setInfo=function(t,e){var n="";switch(t){case"PAGEURL":n="dpurl";break;case"LAT":n="lat";break;case"LON":n="lon";break;case"SEC":this.secure=1==this.secure?this.secure:e,n="";break;case"ACCID":this.accountID=e,n="",u.getUserConsentDataFromCMP(this.accountID);break;case"LOC":n="loc";break;case"LOC_SRC":n="loc_source";break;case"LOC_SOURCE":n="loc_source";break;case"AMP":n="amp",e=1;break;case"GDPR":n="gdpr",e=1;break;case"GDPR_CONSENT":n="gdpr_consent"}""!=n&&""!=e&&(this.customInfo[n]=encodeURIComponent(e))},i.prototype.defineAdSlot=function(t,e,n){var i=new c.SlotObject(t,e,n);return this.slotStorage[n]=i,i},i.prototype.getSlots=function(){var t=[];return o.forEachOnObject(this.slotStorage,(function(e,n){t.push(n)})),t},i.prototype.originalDisplay=function(t){var e,n={},i=[],s=a.getSlotByDivId(t,this.slotStorage);if(null!==s)if(s.setDisplayFunctionCalled(!0),s.getStatus()===r.SLOT_STATUS.DISPLAYED){var d=s.getResponse();null!==d?(a.createFriendlyIframeAndRenderCreative(t,d),s.setResponse(null),s.setDisplayFunctionCalled(!1),o.log("Rendering the creative for the slot "+t)):o.log("No cached response found for the slot "+t)}else o.log("Already displayed the slot: "+t);this.singleRequestCall?(n[r.SLOT_STATUS.CREATED]="",i=a.getSlotsFilteredByStatus(n,this.slotStorage),i.length>0&&(e=a.generateAdServerCall(i,this.req_type,this.customInfo,this.commonTargetings,this.secure),a.createFriendlyIframeAndTriggerAdServerCall(t,e))):this.slotStorage.hasOwnProperty(t)&&(i.push(this.slotStorage[t]),e=a.generateAdServerCall(i,this.req_type,this.customInfo,this.commonTargetings,this.secure),a.createFriendlyIframeAndTriggerAdServerCall(t,e))},i.prototype.registerPreDisplayHandler=function(t){var e=this;"function"==typeof t&&e.preDisplayHandlers&&e.preDisplayHandlers.push(t)},i.prototype.display=function(t){var e=this,n=u.getUserConsentDataFromLS(e.accountID);e.customInfo.gdpr_consent=n&&n.c?encodeURIComponent(n.c):e.customInfo.gdpr_consent||"",e.customInfo.gdpr=e.customInfo.gdpr_consent?1:u.isCmpFound()?1:e.customInfo.gdpr||0,!e.userSyncupInitiated&&e.initiateUserSyncup();var i=new d.TaskManager(function(){o.isArray(t)?e.originalDisplay(t[0]):e.originalDisplay(t)},e.preDisplayHandlers,t);i.execute()},i.prototype.callback=function(t){var e=this;t.bids&&o.forEachOnObject(t.bids,(function(t,n){if(1==n.isNative)return o.log("Native creative found..."),void 0;if(n.ct&&0!=n.ct.length){o.log("Creative found for "+n.id);var i=a.getSlotByDivId(n.id,e.slotStorage);null!==i?i.getDisplayFunctionCalled()===!0?(a.createFriendlyIframeAndRenderCreative(n.id,n),i.setDisplayFunctionCalled(!1)):i.setResponse(n):o.log("Invalid slot, no slot found defined for div: "+n.id)}else o.log("Creative NOT found for "+n.id)}))},e.PhoenixClass=i}),(function(t,e,n){"use strict";function i(t){var e="";return g.forEachOnObject(t,(function(t,n){e+=t+"="+n.join()+"&"})),e=e.substr(0,e.length-1)}function r(t,e){var n,i="",r={adUnit:"getAdUnit",adDiv:"getDivElement",adSizes:"getDimensions",keywords:"getKeywords",pwtecp:"getWrapperEcpm",keywordsOperation:"getKeywordsOperation",targetings:"getTargetingKeys",targetingByKey:"getTargeting",nativeTemplateID:"getNativeTemplateID",visibility:"getVisibility",extraParameters:"getExtraPatameterKeys",extraPatameterByKey:"getExtraParameters"};switch(t){case"adUnit":case"adDiv":case"nativeTemplateID":case"visibility":case"pwtecp":r.hasOwnProperty(t)&&(i=e[r[t]]());break;case"adSizes":r.hasOwnProperty(t)&&(n=e[r[t]](),g.forEachOnArray(n,(function(t,e){e[0]&&e[1]&&(i+=e[0]+"x"+e[1]+",")})),i=i.substr(0,i.length-1));break;case"keywords":r.hasOwnProperty(t)&&(i=e[r[t]](),i=i.join());break;case"keywordsOperation":r.hasOwnProperty(t)&&(i=e[r[t]]());break;case"targetings":case"extraParameters":r.hasOwnProperty(t)&&(n=e[r[t]](),g.forEachOnArray(n,(function(n,o){var a="";switch(t){case"targetings":a="targetingByKey";break;case"extraParameters":a="extraPatameterByKey"}i+=o+"="+e[r[a]](o).join()+"&"})),i=i.substr(0,i.length-1))}return i}function o(t){var e=[];return g.forEachOnArray(t,(function(t,n){var i=parseFloat(n.getWrapperEcpm());e.push(i>0?i:"")})),e.join("|")}function a(t,e){var n="",i="|",o={};return g.forEachOnArray(e,(function(e,a){n+=r(t,a)+(o.hasOwnProperty(t)?o[t]:i),a.setStatus(f.SLOT_STATUS.DISPLAYED)})),n.substr(0,n.length-1)}function s(t){t=t.indexOf("?")>-1?t.substr(t.indexOf("?")+1):"";var e=t.split("&"),n={},i={uastest:"",uaslineitemid:"",uascrid:""};return g.forEachOnArray(e,(function(t,e){var r=e.split("=");i.hasOwnProperty(r[0])&&(n[r[0]]=r[1])})),n}function d(t,e,n,r,d){var c=[],u=new Date,p=g.getMetaInfo(window),l=s(p.pageURL),h=o(t);return c.push("req_type="+e,"sec="+d,"res_format=2","cback=window.parent.Phoenix.callback","rndn="+Math.random(),"purl="+encodeURIComponent(p.pageURL),"rurl="+encodeURIComponent(p.refURL),"iifr="+(self===top?"0":"1"),"scrn="+encodeURIComponent(screen.width+"x"+screen.height),"tz="+encodeURIComponent(-1*u.getTimezoneOffset()),"kltstamp="+encodeURIComponent(u.getFullYear()+"-"+(u.getMonth()+1)+"-"+u.getDate()+" "+u.getHours()+":"+u.getMinutes()+":"+u.getSeconds()),"au="+encodeURIComponent(a("adUnit",t)),"iid="+encodeURIComponent(a("adDiv",t)),"asz="+encodeURIComponent(a("adSizes",t)),"slt_kv="+encodeURIComponent(a("targetings",t)),"ntid="+encodeURIComponent(a("nativeTemplateID",t)),"visi="+encodeURIComponent(a("visibility",t)),"gkv="+encodeURIComponent(i(r)),"slt_param="+encodeURIComponent(a("extraParameters",t))),h&&c.push("pwtecp="+encodeURIComponent(h)),n.dpurl||(n.dpurl=encodeURIComponent(p.pageURL)),!n.loc&&n.lat&&n.lon&&(n.loc=n.lat+","+n.lon),g.forEachOnObject(n,(function(t,e){n.hasOwnProperty(t)&&"lat"!==t&&"lon"!==t&&c.push(t+"="+e)})),PubMatic.pm_uid_bc&&c.push("bcuid="+PubMatic.pm_uid_bc),g.forEachOnObject(l,(function(t,e){l.hasOwnProperty(t)&&c.push(t+"="+e)})),p.protocol+f.SERVER_PATH+c.join("&")}function c(t,e){var n,i,r;n=window.document.getElementById(t),n&&(r="javascript:document.open();",r+="document.write(\"\");",r+="document.close();",i=g.createFriendlyIframe({id:t+"_adCall",src:r,height:0,width:0,scrolling:"no",frameborder:"0",cssText:"border: 0px; vertical-align: bottom; visibility: hidden; display: none;"}),n.appendChild(i))}function u(t,e){var n,i,r,o;n=window.document.getElementById(t),n&&(r=g.createFriendlyIframe({id:t+"_adDisplay",height:e.h,width:e.w,scrolling:"no",frameborder:"0",cssText:"border: 0px; vertical-align: bottom;"}),r.marginwidth="0",r.marginheight="0",n.appendChild(r),r=window.document.getElementById(t+"_adDisplay"),r&&(o='',o+="",o+="",o+="",i=r.contentWindow.document,i.write(o),i.close())))}function p(t,e){var n=[];return g.forEachOnObject(e,(function(e,i){t.hasOwnProperty(i.getStatus())&&n.push(i)})),n}function l(t,e){return e.hasOwnProperty(t)?e[t]:null}var f=n(1),g=n(0);e.combineGlobalTargetings=i,e.combineSlotSpecificData=r,e.getEcpmFromSlots=o,e.combineSlotsData=a,e.setQueryParamsFromURL=s,e.generateAdServerCall=d,e.createFriendlyIframeAndTriggerAdServerCall=c,e.createFriendlyIframeAndRenderCreative=u,e.getSlotsFilteredByStatus=p,e.getSlotByDivId=l}),(function(t,e,n){"use strict";var i=n(0);e.EexecutionQueue=function(t){this.Phoenix=t,this.internalQ=[],i.isUndefined(this.Phoenix)||i.isUndefined(this.Phoenix.EQ)||(this.internalQ=this.Phoenix.EQ),this.push=function(t){var e=this;i.isFunction(t)&&(i.isUndefined(e.Phoenix)&&i.isUndefined(e.Phoenix.isJSLoaded)?e.internalQ.push(t):t())},this.executeQ=function(){for(var t;t=this.internalQ.shift();)t()}}}),(function(t,e){"use strict";function n(t,e,n){this.count=e.length,this.doneTask=function(){var e=this;e.count>0&&(e.count=e.count-1),0==e.count&&t()},this.execute=function(){var t=this;e.length>0?e.forEach((function(e){e((function(){t.doneTask()}),n)})):t.doneTask()}}e.TaskManager=n}),(function(t,e,n){"use strict";function i(t,e,n){this.adUnit=t,this.dimensionArray=e,this.divElement=n,this.slotTargetings={},this.slotExtraParameters={},this.slotKeywords=[],this.keywordsOperation=0,this.status=0,this.isNative=!1,this.nativeTemplateID=0,this.nativeReqestObject=null,this.nativeRenderingFunction=null,this.id=n,this.isDisplayFunctionCalled=!1,this.response=null,this.visibility=0,this.pwtecp=0}var r=n(0);i.prototype.getWrapperEcpm=function(){return this.pwtecp},i.prototype.setWrapperEcpm=function(t){this.pwtecp=t},i.prototype.setResponse=function(t){return this.response=t,this},i.prototype.getResponse=function(){return this.response},i.prototype.getDisplayFunctionCalled=function(){return this.isDisplayFunctionCalled},i.prototype.setDisplayFunctionCalled=function(t){return this.isDisplayFunctionCalled=t,this},i.prototype.getStatus=function(){return this.status},i.prototype.setStatus=function(t){return this.status=t,this},i.prototype.getId=function(){return this.id},i.prototype.getAdUnit=function(){return this.adUnit},i.prototype.getDimensions=function(){return this.dimensionArray},i.prototype.getDivElement=function(){return this.divElement},i.prototype.setTargeting=function(t,e){return this.setSlotPairs(this.slotTargetings,t,e)},i.prototype.getTargetingKeys=function(){return this.getKeysFromSlotPairs(this.slotTargetings)},i.prototype.getTargeting=function(t){var e="";return this.slotTargetings.hasOwnProperty(t)&&(e=this.slotTargetings[t]),e},i.prototype.setKeywords=function(t){var e=this;return r.isArray(t)&&r.forEachOnArray(t,(function(t,n){e.slotKeywords.push(n)})),this},i.prototype.getKeywords=function(){return this.slotKeywords},i.prototype.enableKeywordsAnding=function(){return this.keywordsOperation=1,this},i.prototype.getKeywordsOperation=function(){return this.keywordsOperation},i.prototype.setNativeTemplateID=function(t){return this.isNative=!0,this.nativeTemplateID=t,this},i.prototype.getNativeTemplateID=function(){return this.nativeTemplateID},i.prototype.setNativeRequestObject=function(t){return this.isNative=!0,this.nativeReuestObject=t,this},i.prototype.setNativeRenderingFunction=function(t){return"function"==typeof t&&(this.isNative=!0,this.nativeRenderingFunction=t),this},i.prototype.setVisibility=function(t){var e={0:0,1:1,2:2,3:3};return this.visibility=e[t]||0,this},i.prototype.getVisibility=function(){return this.visibility},i.prototype.setExtraParameters=function(t,e){return this.setSlotPairs(this.slotExtraParameters,t,e)},i.prototype.getExtraParameters=function(t){var e="";return this.slotExtraParameters.hasOwnProperty(t)&&(e=this.slotExtraParameters[t]),e},i.prototype.getExtraPatameterKeys=function(){return this.getKeysFromSlotPairs(this.slotExtraParameters)},i.prototype.setSlotPairs=function(t,e,n){t.hasOwnProperty(e)||(t[e]=[]),r.isArray(n)?r.forEachOnArray(n,(function(n,i){t[e].push(i)})):t[e].push(n)},i.prototype.getKeyValuesFromSlotPairs=function(t,e){var n="";return t.hasOwnProperty(e)&&(n=t[e]),n},i.prototype.getKeysFromSlotPairs=function(t){var e=[];return r.forEachOnObject(t,(function(t){r.isUndefined(t)||e.push(t)})),e},e.SlotObject=i}),(function(t,e,n){"use strict";var i=n(0),r="PubMatic",o=(function(){try{return window.localStorage&&i.isFunction(window.localStorage.getItem)&&i.isFunction(window.localStorage.setItem)}catch(t){return!1}})(),a=(function(){try{return!!window.__cmp}catch(t){return!1}})(),s=function(t,e){for(var n=0,i=t.length,r=!1;i>n;n++)if(t[n]===e){r=!0;break}return r},d=function(){},c=function(t,e,n){function i(){function e(){d("in afterEach, ",i),i.getConsentData&&i.getVendorConsents&&t(i,n)}var i={};return{consentDataCallback:function(t){d("in consentDataCallback, ",t),i.getConsentData=t,e()},vendorConsentsCallback:function(t){d("in vendorConsentsCallback, ",t),i.getVendorConsents=t,e()}}}function r(){d("calling CMP "),window.__cmp("getConsentData",null,u.consentDataCallback),window.__cmp("getVendorConsents",null,u.vendorConsentsCallback)}function o(){return!(!window.$sf||!window.$sf.ext)}function a(t,e){function n(n,i){if("cmpReturn"===n){var r="getConsentData"===t?i.vendorConsentData:i.vendorConsents;e(r)}}window.$sf.ext.register(1,1,n),window.$sf.ext.cmp(t)}function c(t,i,r){function o(t){var e="string"==typeof t.data&&s(t.data,"cmpReturn")?JSON.parse(t.data):t.data;if(e.__cmpReturn&&e.__cmpReturn.callId){var n=e.__cmpReturn;"undefined"!=typeof p[n.callId]&&(p[n.callId](n.returnValue,n.success),delete p[n.callId])}}function a(){window.removeEventListener("message",o,!1)}function d(t){a(),r(t)}window.__cmp=function(t,r,o){if(!i){a();var s="CMP not found";return e(s,n)}var d=Math.random()+"",c={__cmpCall:{command:t,parameter:r,callId:d}};return p[d]=o,i.postMessage(c,"*"),null},window.addEventListener("message",o,!1),window.__cmp(t,null,d)}var u=i(),p={};if(window.__cmp)"function"==typeof window.__cmp?r():(d("calling CMP after delay"),setTimeout((function(){"function"==typeof window.__cmp&&r()}),500));else if(window!==top)if(d("Tag is executing in iframe"),o()&&"function"==typeof window.$sf.ext.cmp)d("In safe-frame CMP detection"),a("getConsentData",u.consentDataCallback),a("getVendorConsents",u.vendorConsentsCallback);else{d("In iframe CMP detection");for(var l,f=window;!l;){try{f.frames.__cmpLocator&&(l=f)}catch(g){}if(f===window.top)break;f=f.parent}c("getConsentData",l,u.consentDataCallback),c("getVendorConsents",l,u.vendorConsentsCallback)}else d("cmp might not have loaded, calling CMP after delay"),setTimeout((function(){"function"==typeof window.__cmp&&r()}),500)},u=function(t,e,n){var i;if(!o)return d("local storage is not enabled"),void 0;try{i=window.localStorage.getItem(r)}catch(a){d("failed in reading from LS")}if(i&&"string"==typeof i)try{i=JSON.parse(i)}catch(a){i={}}else i={};d("data from ls",i),i&&(i.hasOwnProperty(t)||(i[t]={}),i[t].t=(new Date).getTime(),i[t][e]=n,"c"==e&&(i[t].g=1));try{window.localStorage.setItem(r,JSON.stringify(i)),d("data stored in local storage successfuly")}catch(a){d("local storage reading exception")}};e.isCmpFound=function(){return a},e.getUserConsentDataFromCMP=function(t){function e(e){d("Data received from CMP: ",e),e&&(e.getConsentData&&e.getConsentData.consentData?(d("using getConsentData.consentData: ",e.getConsentData.consentData),u(t,"c",e.getConsentData.consentData)):e.getVendorConsents&&e.getVendorConsents.metadata&&(d("using getVendorConsents.metadata: ",e.getVendorConsents.metadata),u(t,"c",e.getVendorConsents.metadata)))}function n(){d(arguments),d("Failed to retrieve user consent data from CMP for pubId: ",t)}c(e,n)},e.getUserConsentDataFromLS=function(t){var e={c:""};if(!o)return d("LS is not enabled"),e;var n;try{n=window.localStorage.getItem(r)}catch(i){d("failed in reading from LS")}if(n&&"string"==typeof n){try{n=JSON.parse(n)}catch(i){n={}}if(n.hasOwnProperty(t)){var a=n[t];a&&a.c&&a.t&&(a.t&&parseInt(a.t,10)>(new Date).getTime()-864e5?e.c=a.c:d("data in LS had no timestamp or expired timestamp.",a))}}return e}})])}))})]);