text: pbjsChunk([18],{187:function(e,t,i){e.exports=i(188)},188:function(e,t,i){"use strict";var r=i(3),n=i(2),d=i(0),o=i(5),s=i(1),a=(function(){function e(){}return e.prototype.callBids=function(e){if(window.tldr&&window.tldr.requestPrebid)this.handleBids(e);else{var t="//cdn.thoughtleadr.com/v4/";window.tldr&&window.tldr.config&&window.tldr.config.root_url&&(t=window.tldr.config.root_url),o.loadScript(t+"page.js",this.handleBids.bind(this,e),!0)}},e.prototype.handleBids=function(t){for(var i=0,r=(t.bids||[]).filter((function(t){return e.valid(t)}));i<r.length;i++){var n=r[i];this.requestPlacement(n)}},e.prototype.requestPlacement=function(t){var i=this,o=d.generateUUID(null),s=e.getSizes(t.sizes);window.tldr.requestPrebid(t.params.placementId,o).then((function(e){var a;e&&e.bid?(i.receiver=function(t){t.origin===location.origin&&t.data&&t.data.TLDR_REQUEST&&t.data.TLDR_REQUEST.rid===o&&(t.source.postMessage({TLDR_RESPONSE:{config:e.config,rid:o}},location.origin),i.stopListen())},window.addEventListener("message",i.receiver,!1),setTimeout((function(){return i.stopListen()}),5e3),1===e.bid.code?((a=r.createBid(e.bid.code)).bidderCode="thoughtleadr",a.cpm=e.bid.cpm,a.ad=e.bid.ad,a.width=s.width,a.height=s.height):(a=r.createBid(e.bid.code)).bidderCode="thoughtleadr",n.addBidResponse(t.placementCode,a)):d.logError("invalid response from tldr.requestPrebid",void 0,void 0)}))},e.prototype.stopListen=function(){this.receiver&&(window.removeEventListener("message",this.receiver),this.receiver=void 0)},e.valid=function(e){return!(!e||!e.params||"string"!=typeof e.params.placementId)},e.getSizes=function(t){var i=t[0];return Array.isArray(i)?e.getSizes(i):{width:t[0],height:t[1]}},e})();s.registerBidAdapter(new a,"thoughtleadr"),e.exports=a}},[187]);