text: pbjsChunk([97],{147:function(e,r,i){e.exports=i(148)},148:function(e,r,i){"use strict";var d=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e[d]=i[d])}return e},s=i(4),n=i(0),t=i(3),a=i(2),o=i(5),c=i(9).default;function l(){var e=new c("essens"),r={};function i(){r&&r.bids&&r.bids.forEach(l)}function l(e){var r=t.createBid(s.STATUS.NO_BID,e);r.bidderCode="essens",a.addBidResponse(e.placementCode,r)}return e.callBids=function(e){if(e){r=e;var d=(e.bids||[]).filter((function(e){return (function(e){{if(e.bidId&&e.params&&e.params.placementId)return!0;n.logError("bid requires missing essential params for essens")}})(e)})).map((function(e){var r={};return r.impressionId=e.bidId,r.sizes=n.parseSizesInput(e.sizes),r.placementId=e.params.placementId,e.params.dealId&&(r.deal=e.params.dealId),e.params.floorPrice&&(r.floorPrice=e.params.floorPrice),r})),s=e.bidderRequestId,t=n.getTopWindowUrl(),a=window.navigator.userAgent;if(n.isEmpty(d))i();else{var c={bidderRequestId:s,cur:["USD"],url:t,ua:a,imp:d},l="//bid.essrtb.com/bid/prebid_call?callback=pbjs.essensResponseHandler&bid="+encodeURIComponent(JSON.stringify(c));o.loadScript(l)}}else n.logError("empty bid request received")},pbjs.essensResponseHandler=function(e){var d;(n.logInfo("received bid request from Essens"),(d=e)&&d.id&&d.seatbid)?(function(e){var i=[];e.seatbid.length>0&&e.seatbid.filter((function(e){return e.bid&&0!==e.bid.length})).forEach((function(e){return e.bid.forEach(d)}));function d(e){var d,n=(d=e.impid,r.bids.find((function(e){return e.bidId===d}))),o=(function(e,r){if(i=r,!(i.price&&i.crid&&i.ext&&i.ext.adUrl&&i.w&&i.h&&i.impid))return;var i;var d=t.createBid(s.STATUS.GOOD,e);d.creative_id=r.crid,d.adUrl=r.ext.adUrl,d.bidderCode="essens",d.cpm=parseFloat(r.price),d.width=parseInt(r.w),d.height=parseInt(r.h),r.dealid&&(d.dealId=r.dealid);return d})(n,e);o&&(i.push(n),a.addBidResponse(n.placementCode,o))}r.bids.filter((function(e){return r=e,!n.contains(i,r);var r})).forEach(l)})(e):i()},d(this,{callBids:e.callBids,setBidderCode:e.setBidderCode,getBidderCode:e.getBidderCode})}i(1).registerBidAdapter(new l,"essens"),e.exports=l}},[147]);