<commit_before>import * as utils from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';

const BIDDER_CODE = 'districtmDMX';

const DMXURI = 'https://dmx.districtm.io/b/v1';

const VIDEO_MAPPING = {
  playback_method: {
    'auto_play_sound_on': 1,
    'auto_play_sound_off': 2,
    'click_to_play': 3,
    'mouse_over': 4,
    'viewport_sound_on': 5,
    'viewport_sound_off': 6
  }
};
export const spec = {
  code: BIDDER_CODE,
  supportedFormat: [BANNER, VIDEO],
  supportedMediaTypes: [VIDEO, BANNER],
  isBidRequestValid(bid) {
    return !!(bid.params.memberid);
  },
  interpretResponse(response, bidRequest) {
    response = response.body || {};
    if (response.seatbid) {
      if (utils.isArray(response.seatbid)) {
        const { seatbid } = response;
        let winners = seatbid.reduce((bid, ads) => {
          let ad = ads.bid.reduce(function (oBid, nBid) {
            if (oBid.price < nBid.price) {
              const bid = matchRequest(nBid.impid, bidRequest);
              const { width, height } = defaultSize(bid);
              nBid.cpm = parseFloat(nBid.price).toFixed(2);
              nBid.bidId = nBid.impid;
              nBid.requestId = nBid.impid;
              nBid.width = nBid.w || width;
              nBid.height = nBid.h || height;
              nBid.ttl = 360;
              nBid.mediaType = bid.mediaTypes && bid.mediaTypes.video ? 'video' : 'banner';
              if (nBid.mediaType) {
                nBid.vastXml = cleanVast(nBid.adm, nBid.nurl);
                nBid.ttl = 3600;<commit_msg>update banner ttl (#6228)<commit_after>import * as utils from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';

const BIDDER_CODE = 'districtmDMX';

const DMXURI = 'https://dmx.districtm.io/b/v1';

const VIDEO_MAPPING = {
  playback_method: {
    'auto_play_sound_on': 1,
    'auto_play_sound_off': 2,
    'click_to_play': 3,
    'mouse_over': 4,
    'viewport_sound_on': 5,
    'viewport_sound_off': 6
  }
};
export const spec = {
  code: BIDDER_CODE,
  supportedFormat: [BANNER, VIDEO],
  supportedMediaTypes: [VIDEO, BANNER],
  isBidRequestValid(bid) {
    return !!(bid.params.memberid);
  },
  interpretResponse(response, bidRequest) {
    response = response.body || {};
    if (response.seatbid) {
      if (utils.isArray(response.seatbid)) {
        const { seatbid } = response;
        let winners = seatbid.reduce((bid, ads) => {
          let ad = ads.bid.reduce(function (oBid, nBid) {
            if (oBid.price < nBid.price) {
              const bid = matchRequest(nBid.impid, bidRequest);
              const { width, height } = defaultSize(bid);
              nBid.cpm = parseFloat(nBid.price).toFixed(2);
              nBid.bidId = nBid.impid;
              nBid.requestId = nBid.impid;
              nBid.width = nBid.w || width;
              nBid.height = nBid.h || height;
              nBid.ttl = 300;
              nBid.mediaType = bid.mediaTypes && bid.mediaTypes.video ? 'video' : 'banner';
              if (nBid.mediaType) {
                nBid.vastXml = cleanVast(nBid.adm, nBid.nurl);
                nBid.ttl = 3600;
{'fraction_non_alphanumeric': 0.142814549791294, 'fraction_numerical': 0.010137149672033392, 'mean_word_length': 2.388888888888889, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5195865', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1189, 'n_words': 222}