From e75daddef6f325df8c5bb5d585f22a3dd99432a4 Mon Sep 17 00:00:00 2001 From: Demetrio Girardi Date: Fri, 28 Jan 2022 09:07:02 -0800 Subject: [PATCH] Multiple Adapters & Modules: replace corejs polyfills with simpler stubs (#7942) * Replace core-js polyfills with simpler stubs * Update allowedModules / validateImports * Move stubs to their own package to keep npm imports working without changes --- allowedModules.js | 11 +- modules/adagioBidAdapter.js | 2 +- modules/adbookpspBidAdapter.js | 4 +- modules/adhashBidAdapter.js | 2 +- modules/adkernelBidAdapter.js | 4 +- modules/adlooxAnalyticsAdapter.js | 2 +- modules/adlooxRtdProvider.js | 2 +- modules/adnowBidAdapter.js | 2 +- modules/adomikAnalyticsAdapter.js | 4 +- modules/adotBidAdapter.js | 2 +- modules/adpod.js | 5 +- modules/adrelevantisBidAdapter.js | 4 +- modules/adtargetBidAdapter.js | 2 +- modules/adtelligentBidAdapter.js | 2 +- modules/advangelistsBidAdapter.js | 4 +- modules/adxpremiumAnalyticsAdapter.js | 2 +- modules/adyoulikeBidAdapter.js | 2 +- modules/afpBidAdapter.js | 2 +- modules/appnexusBidAdapter.js | 4 +- modules/beachfrontBidAdapter.js | 4 +- modules/betweenBidAdapter.js | 2 +- modules/bidViewability.js | 2 +- modules/bluebillywigBidAdapter.js | 2 +- modules/bridgewellBidAdapter.js | 2 +- modules/browsiRtdProvider.js | 4 +- modules/cleanmedianetBidAdapter.js | 2 +- modules/connectIdSystem.js | 2 +- modules/consentManagement.js | 5 +- modules/craftBidAdapter.js | 4 +- modules/criteoBidAdapter.js | 2 +- modules/cwireBidAdapter.js | 2 +- modules/dailyhuntBidAdapter.js | 2 +- modules/dchain.js | 2 +- modules/emx_digitalBidAdapter.js | 4 +- modules/fluctBidAdapter.js | 1 - modules/gamoshiBidAdapter.js | 2 +- modules/gdprEnforcement.js | 4 +- modules/glomexBidAdapter.js | 2 +- modules/goldbachBidAdapter.js | 4 +- modules/gptPreAuction.js | 2 +- modules/gumgumBidAdapter.js | 2 +- modules/hybridBidAdapter.js | 2 +- modules/improvedigitalBidAdapter.js | 2 +- modules/insticatorBidAdapter.js | 2 +- modules/intersectionRtdProvider.js | 2 +- modules/ixBidAdapter.js | 4 +- modules/jwplayerRtdProvider.js | 2 +- modules/livewrappedBidAdapter.js | 2 +- modules/mass.js | 2 +- modules/mediakeysBidAdapter.js | 4 +- modules/medianetAnalyticsAdapter.js | 2 +- modules/medianetRtdProvider.js | 2 +- modules/nextrollBidAdapter.js | 2 +- modules/onetagBidAdapter.js | 2 +- modules/openwebBidAdapter.js | 2 +- modules/openxAnalyticsAdapter.js | 4 +- modules/openxBidAdapter.js | 2 +- modules/parrableIdSystem.js | 2 +- modules/permutiveRtdProvider.js | 2 +- modules/pixfutureBidAdapter.js | 4 +- modules/prebidServerBidAdapter/index.js | 4 +- modules/priceFloors.js | 2 +- modules/quantcastBidAdapter.js | 2 +- modules/reconciliationRtdProvider.js | 2 +- modules/roxotAnalyticsAdapter.js | 2 +- modules/rtbhouseBidAdapter.js | 2 +- modules/rtdModule/index.js | 2 +- modules/rubiconBidAdapter.js | 2 +- modules/saambaaBidAdapter.js | 840 +- modules/sigmoidAnalyticsAdapter.js | 2 +- modules/sirdataRtdProvider.js | 2 +- modules/sizeMappingV2.js | 2 +- modules/smarticoBidAdapter.js | 2 +- modules/sovrnAnalyticsAdapter.js | 4 +- modules/sspBCBidAdapter.js | 2 +- modules/synacormediaBidAdapter.js | 2 +- modules/targetVideoBidAdapter.js | 2 +- modules/userId/index.js | 4 +- modules/ventesBidAdapter.js | 2 +- modules/verizonMediaIdSystem.js | 2 +- modules/viewability.js | 2 +- modules/viewdeosDXBidAdapter.js | 2 +- modules/voxBidAdapter.js | 2 +- modules/waardexBidAdapter.js | 2 +- modules/widespaceBidAdapter.js | 4 +- modules/winrBidAdapter.js | 14 +- modules/yieldlabBidAdapter.js | 2 +- modules/yieldmoBidAdapter.js | 4 +- modules/yuktamediaAnalyticsAdapter.js | 2 +- package-lock.json | 20640 +++++----------- package.json | 1 + plugins/poly/arrayFrom.js | 3 + plugins/poly/find.js | 3 + plugins/poly/findIndex.js | 3 + plugins/poly/includes.js | 3 + plugins/poly/package.json | 8 + src/Renderer.js | 2 +- src/adapterManager.js | 4 +- src/adapters/bidderFactory.js | 2 +- src/adloader.js | 2 +- src/auction.js | 4 +- src/auctionManager.js | 2 +- src/config.js | 7 +- src/cpmBucketManager.js | 2 +- src/native.js | 2 +- src/prebid.js | 2 +- src/secureCreatives.js | 4 +- src/sizeMapping.js | 2 +- src/storageManager.js | 2 +- src/targeting.js | 4 +- src/userSync.js | 2 +- src/utils.js | 4 +- src/video.js | 2 +- test/spec/auctionmanager_spec.js | 2 +- .../longform/basic_w_bidderSettings.spec.js | 2 +- ...asic_w_custom_adserver_translation.spec.js | 2 +- .../e2e/longform/basic_w_priceGran.spec.js | 2 +- .../basic_w_requireExactDuration.spec.js | 2 +- .../basic_wo_brandCategoryExclusion.spec.js | 2 +- .../basic_wo_requireExactDuration.spec.js | 2 +- test/spec/modules/afpBidAdapter_spec.js | 2 +- .../modules/deepintentDpesIdsystem_spec.js | 2 +- .../modules/eplanningAnalyticsAdapter_spec.js | 2 +- .../modules/fintezaAnalyticsAdapter_spec.js | 2 +- test/spec/modules/idxIdSystem_spec.js | 2 +- test/spec/modules/mediakeysBidAdapter_spec.js | 2 +- test/spec/modules/multibid_spec.js | 2 +- test/spec/modules/onetagBidAdapter_spec.js | 2 +- .../modules/openxAnalyticsAdapter_spec.js | 2 +- test/spec/modules/parrableIdSystem_spec.js | 2 +- test/spec/modules/rubiconBidAdapter_spec.js | 2 +- .../modules/stroeerCoreBidAdapter_spec.js | 2 +- test/spec/modules/userId_spec.js | 2 +- test/spec/modules/widespaceBidAdapter_spec.js | 2 +- .../spec/modules/zeotapIdPlusIdSystem_spec.js | 2 +- test/spec/sizeMapping_spec.js | 2 +- test/spec/unit/core/adapterManager_spec.js | 4 +- test/spec/unit/pbjs_api_spec.js | 2 +- webpack.conf.js | 2 +- 139 files changed, 6660 insertions(+), 15188 deletions(-) create mode 100644 plugins/poly/arrayFrom.js create mode 100644 plugins/poly/find.js create mode 100644 plugins/poly/findIndex.js create mode 100644 plugins/poly/includes.js create mode 100644 plugins/poly/package.json diff --git a/allowedModules.js b/allowedModules.js index 81920cdc15f..a8e1968a841 100644 --- a/allowedModules.js +++ b/allowedModules.js @@ -1,12 +1,9 @@ const sharedWhiteList = [ - 'core-js-pure/features/array/find', // no ie11 - 'core-js-pure/features/array/includes', // no ie11 - 'core-js-pure/features/set', // ie11 supports Set but not Set#values - 'core-js-pure/features/string/includes', // no ie11 - 'core-js-pure/features/number/is-integer', // no ie11, - 'core-js-pure/features/array/from', // no ie11 - 'core-js-pure/web/url-search-params' // no ie11 + 'prebidjs-polyfill/arrayFrom', + 'prebidjs-polyfill/find', + 'prebidjs-polyfill/findIndex', + 'prebidjs-polyfill/includes', ]; module.exports = { diff --git a/modules/adagioBidAdapter.js b/modules/adagioBidAdapter.js index 3381f00ff8f..1a7677b98b2 100644 --- a/modules/adagioBidAdapter.js +++ b/modules/adagioBidAdapter.js @@ -1,4 +1,4 @@ -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { isInteger, isArray, deepAccess, mergeDeep, logWarn, logInfo, logError, getWindowTop, getWindowSelf, generateUUID, _map, getDNT, parseUrl, getUniqueIdentifierStr, isNumber, cleanObj, isFn, inIframe, deepClone, getGptSlotInfoForAdUnitCode diff --git a/modules/adbookpspBidAdapter.js b/modules/adbookpspBidAdapter.js index 1b93d4fe1c6..dc6d316d05a 100644 --- a/modules/adbookpspBidAdapter.js +++ b/modules/adbookpspBidAdapter.js @@ -1,5 +1,5 @@ -import includes from 'core-js-pure/features/array/includes.js'; -import find from 'core-js-pure/features/array/find'; +import includes from 'prebidjs-polyfill/includes.js'; +import find from 'prebidjs-polyfill/find.js'; import { config } from '../src/config.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; import { getStorageManager } from '../src/storageManager.js'; diff --git a/modules/adhashBidAdapter.js b/modules/adhashBidAdapter.js index 6a8c98650c0..2a8d06ef3b1 100644 --- a/modules/adhashBidAdapter.js +++ b/modules/adhashBidAdapter.js @@ -1,5 +1,5 @@ import { registerBidder } from '../src/adapters/bidderFactory.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { BANNER } from '../src/mediaTypes.js'; const VERSION = '1.0'; diff --git a/modules/adkernelBidAdapter.js b/modules/adkernelBidAdapter.js index c23eca2f96a..80a83720f53 100644 --- a/modules/adkernelBidAdapter.js +++ b/modules/adkernelBidAdapter.js @@ -4,8 +4,8 @@ import { } from '../src/utils.js'; import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; import {config} from '../src/config.js'; /* diff --git a/modules/adlooxAnalyticsAdapter.js b/modules/adlooxAnalyticsAdapter.js index 781b8db830a..56affa6b847 100644 --- a/modules/adlooxAnalyticsAdapter.js +++ b/modules/adlooxAnalyticsAdapter.js @@ -10,7 +10,7 @@ import { loadExternalScript } from '../src/adloader.js'; import { auctionManager } from '../src/auctionManager.js'; import { AUCTION_COMPLETED } from '../src/auction.js'; import CONSTANTS from '../src/constants.json'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { deepAccess, logInfo, isPlainObject, logError, isStr, isNumber, getGptSlotInfoForAdUnitCode, isFn, mergeDeep, logMessage, insertElement, logWarn, getUniqueIdentifierStr, parseUrl diff --git a/modules/adlooxRtdProvider.js b/modules/adlooxRtdProvider.js index 34d1428ea1d..43e2b536322 100644 --- a/modules/adlooxRtdProvider.js +++ b/modules/adlooxRtdProvider.js @@ -20,7 +20,7 @@ import { getAdUnitSizes, logInfo, isPlainObject, logError, isStr, isInteger, isArray, isBoolean, mergeDeep, deepAccess, _each, deepSetValue, logWarn, getGptSlotInfoForAdUnitCode } from '../src/utils.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const MODULE_NAME = 'adloox'; const MODULE = `${MODULE_NAME}RtdProvider`; diff --git a/modules/adnowBidAdapter.js b/modules/adnowBidAdapter.js index badf57ed5c9..f0e50bab420 100644 --- a/modules/adnowBidAdapter.js +++ b/modules/adnowBidAdapter.js @@ -1,7 +1,7 @@ import { registerBidder } from '../src/adapters/bidderFactory.js'; import { NATIVE, BANNER } from '../src/mediaTypes.js'; import { parseSizesInput, deepAccess, parseQueryStringParameters } from '../src/utils.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const BIDDER_CODE = 'adnow'; const ENDPOINT = 'https://n.ads3-adnow.com/a'; diff --git a/modules/adomikAnalyticsAdapter.js b/modules/adomikAnalyticsAdapter.js index e81f6e50054..7c1611f183e 100644 --- a/modules/adomikAnalyticsAdapter.js +++ b/modules/adomikAnalyticsAdapter.js @@ -2,8 +2,8 @@ import adapter from '../src/AnalyticsAdapter.js'; import CONSTANTS from '../src/constants.json'; import adapterManager from '../src/adapterManager.js'; import { logInfo } from '../src/utils.js'; -import find from 'core-js-pure/features/array/find.js'; -import findIndex from 'core-js-pure/features/array/find-index.js'; +import find from 'prebidjs-polyfill/find.js'; +import findIndex from 'prebidjs-polyfill/findIndex.js'; // Events used in adomik analytics adapter const auctionInit = CONSTANTS.EVENTS.AUCTION_INIT; diff --git a/modules/adotBidAdapter.js b/modules/adotBidAdapter.js index ddd9531eb43..174b2c61d37 100644 --- a/modules/adotBidAdapter.js +++ b/modules/adotBidAdapter.js @@ -2,7 +2,7 @@ import {Renderer} from '../src/Renderer.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js'; import {isStr, isArray, isNumber, isPlainObject, isBoolean, logError, replaceAuctionPrice} from '../src/utils.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { config } from '../src/config.js'; const ADAPTER_VERSION = 'v1.0.0'; diff --git a/modules/adpod.js b/modules/adpod.js index ddceed1c344..6507154ba89 100644 --- a/modules/adpod.js +++ b/modules/adpod.js @@ -23,12 +23,11 @@ import { setupBeforeHookFnOnce, module } from '../src/hook.js'; import { store } from '../src/videoCache.js'; import { config } from '../src/config.js'; import { ADPOD } from '../src/mediaTypes.js'; -import Set from 'core-js-pure/features/set'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { auctionManager } from '../src/auctionManager.js'; import CONSTANTS from '../src/constants.json'; -const from = require('core-js-pure/features/array/from.js'); +const from = require('prebidjs-polyfill/arrayFrom.js'); const TARGETING_KEY_PB_CAT_DUR = 'hb_pb_cat_dur'; const TARGETING_KEY_CACHE_ID = 'hb_cache_id'; diff --git a/modules/adrelevantisBidAdapter.js b/modules/adrelevantisBidAdapter.js index 649031d1e3b..153a6f3a612 100644 --- a/modules/adrelevantisBidAdapter.js +++ b/modules/adrelevantisBidAdapter.js @@ -6,8 +6,8 @@ import { import { config } from '../src/config.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { OUTSTREAM, INSTREAM } from '../src/video.js'; const BIDDER_CODE = 'adrelevantis'; diff --git a/modules/adtargetBidAdapter.js b/modules/adtargetBidAdapter.js index 0ad0177815a..42225b1d3af 100644 --- a/modules/adtargetBidAdapter.js +++ b/modules/adtargetBidAdapter.js @@ -2,7 +2,7 @@ import { deepAccess, isArray, chunk, _map, flatten, logError, parseSizesInput } import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, VIDEO } from '../src/mediaTypes.js'; import { config } from '../src/config.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const ENDPOINT = 'https://ghb.console.adtarget.com.tr/v2/auction/'; const BIDDER_CODE = 'adtarget'; diff --git a/modules/adtelligentBidAdapter.js b/modules/adtelligentBidAdapter.js index 44a9c90d438..9c844a75ee9 100644 --- a/modules/adtelligentBidAdapter.js +++ b/modules/adtelligentBidAdapter.js @@ -3,7 +3,7 @@ import { registerBidder } from '../src/adapters/bidderFactory.js'; import { ADPOD, BANNER, VIDEO } from '../src/mediaTypes.js'; import { config } from '../src/config.js'; import { Renderer } from '../src/Renderer.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const subdomainSuffixes = ['', 1, 2]; const AUCTION_PATH = '/v2/auction/'; diff --git a/modules/advangelistsBidAdapter.js b/modules/advangelistsBidAdapter.js index 854c65b1f22..31b78f8366e 100755 --- a/modules/advangelistsBidAdapter.js +++ b/modules/advangelistsBidAdapter.js @@ -2,8 +2,8 @@ import { isEmpty, deepAccess, isFn, parseSizesInput, generateUUID, parseUrl } fr import { config } from '../src/config.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { VIDEO, BANNER } from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; const ADAPTER_VERSION = '1.0'; const BIDDER_CODE = 'advangelists'; diff --git a/modules/adxpremiumAnalyticsAdapter.js b/modules/adxpremiumAnalyticsAdapter.js index 3e30de14052..7de5d0b77d2 100644 --- a/modules/adxpremiumAnalyticsAdapter.js +++ b/modules/adxpremiumAnalyticsAdapter.js @@ -3,7 +3,7 @@ import { ajax } from '../src/ajax.js'; import adapter from '../src/AnalyticsAdapter.js'; import adapterManager from '../src/adapterManager.js'; import CONSTANTS from '../src/constants.json'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const analyticsType = 'endpoint'; const defaultUrl = 'https://adxpremium.services/graphql'; diff --git a/modules/adyoulikeBidAdapter.js b/modules/adyoulikeBidAdapter.js index 155e8ca3c7a..6a6bd9a45bf 100644 --- a/modules/adyoulikeBidAdapter.js +++ b/modules/adyoulikeBidAdapter.js @@ -2,7 +2,7 @@ import { deepAccess, buildUrl, parseSizesInput } from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { config } from '../src/config.js'; import { createEidsArray } from './userId/eids.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js'; const VERSION = '1.0'; diff --git a/modules/afpBidAdapter.js b/modules/afpBidAdapter.js index 68941ff17c9..9efa7cf8454 100644 --- a/modules/afpBidAdapter.js +++ b/modules/afpBidAdapter.js @@ -1,4 +1,4 @@ -import includes from 'core-js-pure/features/array/includes.js' +import includes from 'prebidjs-polyfill/includes.js' import { registerBidder } from '../src/adapters/bidderFactory.js' import { Renderer } from '../src/Renderer.js' import { BANNER, VIDEO } from '../src/mediaTypes.js' diff --git a/modules/appnexusBidAdapter.js b/modules/appnexusBidAdapter.js index 1829323df2a..dc2eadbfee9 100644 --- a/modules/appnexusBidAdapter.js +++ b/modules/appnexusBidAdapter.js @@ -4,8 +4,8 @@ import { config } from '../src/config.js'; import { registerBidder, getIabSubCategory } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE, VIDEO, ADPOD } from '../src/mediaTypes.js'; import { auctionManager } from '../src/auctionManager.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { OUTSTREAM, INSTREAM } from '../src/video.js'; import { getStorageManager } from '../src/storageManager.js'; import { bidderSettings } from '../src/bidderSettings.js'; diff --git a/modules/beachfrontBidAdapter.js b/modules/beachfrontBidAdapter.js index e705156d4a2..69bf4afeae5 100644 --- a/modules/beachfrontBidAdapter.js +++ b/modules/beachfrontBidAdapter.js @@ -3,8 +3,8 @@ import { config } from '../src/config.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { Renderer } from '../src/Renderer.js'; import { VIDEO, BANNER } from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; const ADAPTER_VERSION = '1.19'; const ADAPTER_NAME = 'BFIO_PREBID'; diff --git a/modules/betweenBidAdapter.js b/modules/betweenBidAdapter.js index b2f63488e12..0e88950c118 100644 --- a/modules/betweenBidAdapter.js +++ b/modules/betweenBidAdapter.js @@ -6,7 +6,7 @@ const BIDDER_CODE = 'between'; let ENDPOINT = 'https://ads.betweendigital.com/adjson?t=prebid'; const CODE_TYPES = ['inpage', 'preroll', 'midroll', 'postroll']; -const includes = require('core-js-pure/features/array/includes.js'); +const includes = require('prebidjs-polyfill/includes.js'); export const spec = { code: BIDDER_CODE, aliases: ['btw'], diff --git a/modules/bidViewability.js b/modules/bidViewability.js index 545d57940da..7072d837105 100644 --- a/modules/bidViewability.js +++ b/modules/bidViewability.js @@ -8,7 +8,7 @@ import CONSTANTS from '../src/constants.json'; import { logWarn, isFn, triggerPixel } from '../src/utils.js'; import { getGlobal } from '../src/prebidGlobal.js'; import adapterManager, { gdprDataHandler, uspDataHandler } from '../src/adapterManager.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const MODULE_NAME = 'bidViewability'; const CONFIG_ENABLED = 'enabled'; diff --git a/modules/bluebillywigBidAdapter.js b/modules/bluebillywigBidAdapter.js index 03fb0b92c8f..95f3ff92525 100644 --- a/modules/bluebillywigBidAdapter.js +++ b/modules/bluebillywigBidAdapter.js @@ -1,5 +1,5 @@ import { deepAccess, deepSetValue, deepClone, logWarn, logError } from '../src/utils.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { VIDEO } from '../src/mediaTypes.js'; import { config } from '../src/config.js'; diff --git a/modules/bridgewellBidAdapter.js b/modules/bridgewellBidAdapter.js index 5d545b6f722..ced9f48b7da 100644 --- a/modules/bridgewellBidAdapter.js +++ b/modules/bridgewellBidAdapter.js @@ -1,7 +1,7 @@ import { _each, inIframe, deepSetValue } from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE } from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const BIDDER_CODE = 'bridgewell'; const REQUEST_ENDPOINT = 'https://prebid.scupio.com/recweb/prebid.aspx?cb='; diff --git a/modules/browsiRtdProvider.js b/modules/browsiRtdProvider.js index a1943afda8d..49504efbe0a 100644 --- a/modules/browsiRtdProvider.js +++ b/modules/browsiRtdProvider.js @@ -20,9 +20,9 @@ import {submodule} from '../src/hook.js'; import {ajaxBuilder} from '../src/ajax.js'; import {loadExternalScript} from '../src/adloader.js'; import {getStorageManager} from '../src/storageManager.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import {getGlobal} from '../src/prebidGlobal.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const storage = getStorageManager(); diff --git a/modules/cleanmedianetBidAdapter.js b/modules/cleanmedianetBidAdapter.js index 3c2d3c51bf5..090bc9a7a54 100644 --- a/modules/cleanmedianetBidAdapter.js +++ b/modules/cleanmedianetBidAdapter.js @@ -3,7 +3,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js'; import {config} from '../src/config.js'; import {Renderer} from '../src/Renderer.js'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; export const helper = { getTopWindowDomain: function (url) { diff --git a/modules/connectIdSystem.js b/modules/connectIdSystem.js index ac44a8b5a2d..db1ae9804a0 100644 --- a/modules/connectIdSystem.js +++ b/modules/connectIdSystem.js @@ -8,7 +8,7 @@ import {ajax} from '../src/ajax.js'; import {submodule} from '../src/hook.js'; import {logError, formatQS} from '../src/utils.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const MODULE_NAME = 'connectId'; const VENDOR_ID = 25; diff --git a/modules/consentManagement.js b/modules/consentManagement.js index ecd0c0eec4b..c304ed739bb 100644 --- a/modules/consentManagement.js +++ b/modules/consentManagement.js @@ -8,8 +8,7 @@ import { logInfo, isFn, getAdUnitSizes, logWarn, isStr, isPlainObject, logError, isNumber } from '../src/utils.js'; import { config } from '../src/config.js'; import { gdprDataHandler } from '../src/adapterManager.js'; -import includes from 'core-js-pure/features/array/includes.js'; -import strIncludes from 'core-js-pure/features/string/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const DEFAULT_CMP = 'iab'; const DEFAULT_CONSENT_TIMEOUT = 10000; @@ -249,7 +248,7 @@ function lookupIabConsent(cmpSuccess, cmpError, hookConfig) { function readPostMessageResponse(event) { let cmpDataPkgName = `${apiName}Return`; - let json = (typeof event.data === 'string' && strIncludes(event.data, cmpDataPkgName)) ? JSON.parse(event.data) : event.data; + let json = (typeof event.data === 'string' && includes(event.data, cmpDataPkgName)) ? JSON.parse(event.data) : event.data; if (json[cmpDataPkgName] && json[cmpDataPkgName].callId) { let payload = json[cmpDataPkgName]; // TODO - clean up this logic (move listeners?); we have duplicate messages responses because 2 eventlisteners are active from the 2 cmp requests running in parallel diff --git a/modules/craftBidAdapter.js b/modules/craftBidAdapter.js index 812ec53d686..fd9d202840b 100644 --- a/modules/craftBidAdapter.js +++ b/modules/craftBidAdapter.js @@ -2,8 +2,8 @@ import { logError, convertTypes, convertCamelToUnderscore, isArray, deepAccess, import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; import { auctionManager } from '../src/auctionManager.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { getStorageManager } from '../src/storageManager.js'; import {ajax} from '../src/ajax.js'; diff --git a/modules/criteoBidAdapter.js b/modules/criteoBidAdapter.js index 0285ab6be5b..63b5970a947 100644 --- a/modules/criteoBidAdapter.js +++ b/modules/criteoBidAdapter.js @@ -3,7 +3,7 @@ import {loadExternalScript} from '../src/adloader.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import {config} from '../src/config.js'; import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { verify } from 'criteo-direct-rsa-validate/build/verify.js'; // ref#2 import { getStorageManager } from '../src/storageManager.js'; diff --git a/modules/cwireBidAdapter.js b/modules/cwireBidAdapter.js index c9caa78e5e7..88f1fb01e6b 100644 --- a/modules/cwireBidAdapter.js +++ b/modules/cwireBidAdapter.js @@ -16,7 +16,7 @@ import { logWarn, } from '../src/utils.js'; import { Renderer } from '../src/Renderer.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; // ------------------------------------ const BIDDER_CODE = 'cwire'; diff --git a/modules/dailyhuntBidAdapter.js b/modules/dailyhuntBidAdapter.js index cdcc9f1d038..3679c164ba5 100644 --- a/modules/dailyhuntBidAdapter.js +++ b/modules/dailyhuntBidAdapter.js @@ -2,7 +2,7 @@ import { registerBidder } from '../src/adapters/bidderFactory.js'; import * as mediaTypes from '../src/mediaTypes.js'; import {deepAccess, _map, isEmpty} from '../src/utils.js'; import { ajax } from '../src/ajax.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { OUTSTREAM, INSTREAM } from '../src/video.js'; const BIDDER_CODE = 'dailyhunt'; diff --git a/modules/dchain.js b/modules/dchain.js index 6a1bd1ebf70..7f13e28165e 100644 --- a/modules/dchain.js +++ b/modules/dchain.js @@ -1,4 +1,4 @@ -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { config } from '../src/config.js'; import { getHook } from '../src/hook.js'; import { _each, isStr, isArray, isPlainObject, hasOwn, deepClone, deepAccess, logWarn, logError } from '../src/utils.js'; diff --git a/modules/emx_digitalBidAdapter.js b/modules/emx_digitalBidAdapter.js index 0ed23f11631..52bbd711e53 100644 --- a/modules/emx_digitalBidAdapter.js +++ b/modules/emx_digitalBidAdapter.js @@ -2,8 +2,8 @@ import { isArray, logWarn, logError, parseUrl, deepAccess, isStr, _each, getBidI import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, VIDEO } from '../src/mediaTypes.js'; import { Renderer } from '../src/Renderer.js'; -import includes from 'core-js-pure/features/array/includes.js'; -import find from 'core-js-pure/features/array/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; +import find from 'prebidjs-polyfill/find.js'; const BIDDER_CODE = 'emx_digital'; const ENDPOINT = 'hb.emxdgt.com'; diff --git a/modules/fluctBidAdapter.js b/modules/fluctBidAdapter.js index 2aa86077991..5b4434ea109 100644 --- a/modules/fluctBidAdapter.js +++ b/modules/fluctBidAdapter.js @@ -1,6 +1,5 @@ import { _each, isEmpty } from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; -import URLSearchParams from 'core-js-pure/web/url-search-params' const BIDDER_CODE = 'fluct'; const END_POINT = 'https://hb.adingo.jp/prebid'; diff --git a/modules/gamoshiBidAdapter.js b/modules/gamoshiBidAdapter.js index 34b164f26ca..043b0b52a0c 100644 --- a/modules/gamoshiBidAdapter.js +++ b/modules/gamoshiBidAdapter.js @@ -3,7 +3,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js'; import {config} from '../src/config.js'; import {Renderer} from '../src/Renderer.js'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const ENDPOINTS = { 'gamoshi': 'https://rtb.gamoshi.io' diff --git a/modules/gdprEnforcement.js b/modules/gdprEnforcement.js index 978bd8de9e3..4c2e373c1da 100644 --- a/modules/gdprEnforcement.js +++ b/modules/gdprEnforcement.js @@ -5,8 +5,8 @@ import { deepAccess, logWarn, isArray, hasDeviceAccess } from '../src/utils.js'; import { config } from '../src/config.js'; import adapterManager, { gdprDataHandler } from '../src/adapterManager.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { registerSyncInner } from '../src/adapters/bidderFactory.js'; import { getHook } from '../src/hook.js'; import { validateStorageEnforcement } from '../src/storageManager.js'; diff --git a/modules/glomexBidAdapter.js b/modules/glomexBidAdapter.js index 617a1a3d721..ce329e78c31 100644 --- a/modules/glomexBidAdapter.js +++ b/modules/glomexBidAdapter.js @@ -1,5 +1,5 @@ import { registerBidder } from '../src/adapters/bidderFactory.js' -import find from 'core-js-pure/features/array/find.js' +import find from 'prebidjs-polyfill/find.js' import { BANNER } from '../src/mediaTypes.js' const ENDPOINT = 'https://prebid.mes.glomex.cloud/request-bid' diff --git a/modules/goldbachBidAdapter.js b/modules/goldbachBidAdapter.js index 8057925a62c..07b0bd79898 100644 --- a/modules/goldbachBidAdapter.js +++ b/modules/goldbachBidAdapter.js @@ -27,8 +27,8 @@ import { config } from '../src/config.js'; import { registerBidder, getIabSubCategory } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE, VIDEO, ADPOD } from '../src/mediaTypes.js'; import { auctionManager } from '../src/auctionManager.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { OUTSTREAM, INSTREAM } from '../src/video.js'; const BIDDER_CODE = 'goldbach'; diff --git a/modules/gptPreAuction.js b/modules/gptPreAuction.js index 88f90419aeb..14831ffae65 100644 --- a/modules/gptPreAuction.js +++ b/modules/gptPreAuction.js @@ -1,7 +1,7 @@ import { isGptPubadsDefined, isAdUnitCodeMatchingSlot, deepAccess, pick, logInfo } from '../src/utils.js'; import { config } from '../src/config.js'; import { getHook } from '../src/hook.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const MODULE_NAME = 'GPT Pre-Auction'; export let _currentConfig = {}; diff --git a/modules/gumgumBidAdapter.js b/modules/gumgumBidAdapter.js index 8e06eb43c14..bfa7a52f74d 100644 --- a/modules/gumgumBidAdapter.js +++ b/modules/gumgumBidAdapter.js @@ -3,7 +3,7 @@ import { _each, deepAccess, logError, logWarn, parseSizesInput } from '../src/ut import { config } from '../src/config.js' import { getStorageManager } from '../src/storageManager.js'; -import includes from 'core-js-pure/features/array/includes'; +import includes from 'prebidjs-polyfill/includes.js'; import { registerBidder } from '../src/adapters/bidderFactory.js' const storage = getStorageManager(); diff --git a/modules/hybridBidAdapter.js b/modules/hybridBidAdapter.js index 4383e62c16e..96a0c201786 100644 --- a/modules/hybridBidAdapter.js +++ b/modules/hybridBidAdapter.js @@ -3,7 +3,7 @@ import { registerBidder } from '../src/adapters/bidderFactory.js' import { auctionManager } from '../src/auctionManager.js' import { BANNER, VIDEO } from '../src/mediaTypes.js' import {Renderer} from '../src/Renderer.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const BIDDER_CODE = 'hybrid'; const DSP_ENDPOINT = 'https://hbe198.hybrid.ai/prebidhb'; diff --git a/modules/improvedigitalBidAdapter.js b/modules/improvedigitalBidAdapter.js index a68e90754fb..6917a1fd7b2 100644 --- a/modules/improvedigitalBidAdapter.js +++ b/modules/improvedigitalBidAdapter.js @@ -4,7 +4,7 @@ import { config } from '../src/config.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; import {Renderer} from '../src/Renderer.js'; import { createEidsArray } from './userId/eids.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const BIDDER_CODE = 'improvedigital'; const RENDERER_URL = 'https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js'; diff --git a/modules/insticatorBidAdapter.js b/modules/insticatorBidAdapter.js index 47a3353a897..746ae3d1562 100644 --- a/modules/insticatorBidAdapter.js +++ b/modules/insticatorBidAdapter.js @@ -7,7 +7,7 @@ import { logError, } from '../src/utils.js'; import { getStorageManager } from '../src/storageManager.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const BIDDER_CODE = 'insticator'; const ENDPOINT = 'https://ex.ingage.tech/v1/openrtb'; // production endpoint diff --git a/modules/intersectionRtdProvider.js b/modules/intersectionRtdProvider.js index 4404c4148fe..d75faec36c4 100644 --- a/modules/intersectionRtdProvider.js +++ b/modules/intersectionRtdProvider.js @@ -2,7 +2,7 @@ import {submodule} from '../src/hook.js'; import {isFn, logError} from '../src/utils.js'; import {config} from '../src/config.js'; import {getGlobal} from '../src/prebidGlobal.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import '../src/adapterManager.js'; let observerAvailable = true; function getIntersectionData(requestBidsObject, onDone, providerConfig, userConsent) { diff --git a/modules/ixBidAdapter.js b/modules/ixBidAdapter.js index 4e5606ce476..14a99e4070d 100644 --- a/modules/ixBidAdapter.js +++ b/modules/ixBidAdapter.js @@ -4,10 +4,10 @@ import { config } from '../src/config.js'; import CONSTANTS from '../src/constants.json'; import { getStorageManager, validateStorageEnforcement } from '../src/storageManager.js'; import events from '../src/events.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { INSTREAM, OUTSTREAM } from '../src/video.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { Renderer } from '../src/Renderer.js'; const BIDDER_CODE = 'ix'; diff --git a/modules/jwplayerRtdProvider.js b/modules/jwplayerRtdProvider.js index 5a7e9f13686..12f31525cde 100644 --- a/modules/jwplayerRtdProvider.js +++ b/modules/jwplayerRtdProvider.js @@ -13,7 +13,7 @@ import { submodule } from '../src/hook.js'; import { config } from '../src/config.js'; import { ajaxBuilder } from '../src/ajax.js'; import { logError } from '../src/utils.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { getGlobal } from '../src/prebidGlobal.js'; const SUBMODULE_NAME = 'jwplayer'; diff --git a/modules/livewrappedBidAdapter.js b/modules/livewrappedBidAdapter.js index 6b7c055b295..fa36546690f 100644 --- a/modules/livewrappedBidAdapter.js +++ b/modules/livewrappedBidAdapter.js @@ -1,7 +1,7 @@ import { isSafariBrowser, deepAccess, getWindowTop, mergeDeep } from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { config } from '../src/config.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; import { getStorageManager } from '../src/storageManager.js'; diff --git a/modules/mass.js b/modules/mass.js index 01135e7ddff..1f500a91f81 100644 --- a/modules/mass.js +++ b/modules/mass.js @@ -4,7 +4,7 @@ import { config } from '../src/config.js'; import { getHook } from '../src/hook.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const defaultCfg = { dealIdPattern: /^MASS/i diff --git a/modules/mediakeysBidAdapter.js b/modules/mediakeysBidAdapter.js index 72dca2f1add..9361e8b7050 100644 --- a/modules/mediakeysBidAdapter.js +++ b/modules/mediakeysBidAdapter.js @@ -1,5 +1,5 @@ -import find from 'core-js-pure/features/array/find.js'; -import arrayFrom from 'core-js-pure/features/array/from'; +import find from 'prebidjs-polyfill/find.js'; +import arrayFrom from 'prebidjs-polyfill/arrayFrom.js'; import { getWindowTop, isFn, logWarn, getDNT, deepAccess, isArray, inIframe, mergeDeep, isStr, isEmpty, deepSetValue, deepClone, parseUrl, cleanObj, logError, triggerPixel, isInteger, isNumber } from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { config } from '../src/config.js'; diff --git a/modules/medianetAnalyticsAdapter.js b/modules/medianetAnalyticsAdapter.js index e281dde8ad0..56c1b23cfda 100644 --- a/modules/medianetAnalyticsAdapter.js +++ b/modules/medianetAnalyticsAdapter.js @@ -5,7 +5,7 @@ import CONSTANTS from '../src/constants.json'; import { ajax } from '../src/ajax.js'; import { getRefererInfo } from '../src/refererDetection.js'; import { AUCTION_COMPLETED, AUCTION_IN_PROGRESS, getPriceGranularity } from '../src/auction.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const analyticsType = 'endpoint'; const ENDPOINT = 'https://pb-logs.media.net/log?logid=kfk&evtid=prebid_analytics_events_client'; diff --git a/modules/medianetRtdProvider.js b/modules/medianetRtdProvider.js index cd86bf891f3..45666cd451c 100644 --- a/modules/medianetRtdProvider.js +++ b/modules/medianetRtdProvider.js @@ -1,7 +1,7 @@ import { isStr, isEmptyStr, logError, mergeDeep, isFn, insertElement } from '../src/utils.js'; import { submodule } from '../src/hook.js'; import { getGlobal } from '../src/prebidGlobal.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const MODULE_NAME = 'medianet'; const SOURCE = MODULE_NAME + 'rtd'; diff --git a/modules/nextrollBidAdapter.js b/modules/nextrollBidAdapter.js index b5af7ec1486..52aa3edbaae 100644 --- a/modules/nextrollBidAdapter.js +++ b/modules/nextrollBidAdapter.js @@ -12,7 +12,7 @@ import { import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE } from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const BIDDER_CODE = 'nextroll'; const BIDDER_ENDPOINT = 'https://d.adroll.com/bid/prebid/'; diff --git a/modules/onetagBidAdapter.js b/modules/onetagBidAdapter.js index 5642dce9018..4ef23cbd782 100644 --- a/modules/onetagBidAdapter.js +++ b/modules/onetagBidAdapter.js @@ -3,7 +3,7 @@ import { BANNER, VIDEO } from '../src/mediaTypes.js'; import { INSTREAM, OUTSTREAM } from '../src/video.js'; import { Renderer } from '../src/Renderer.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { getStorageManager } from '../src/storageManager.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { createEidsArray } from './userId/eids.js'; diff --git a/modules/openwebBidAdapter.js b/modules/openwebBidAdapter.js index 9476d2d2914..4f06c2a31fc 100644 --- a/modules/openwebBidAdapter.js +++ b/modules/openwebBidAdapter.js @@ -2,7 +2,7 @@ import { isNumber, deepAccess, isArray, flatten, convertTypes, parseSizesInput } import { registerBidder } from '../src/adapters/bidderFactory.js'; import { ADPOD, BANNER, VIDEO } from '../src/mediaTypes.js'; import { config } from '../src/config.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const ENDPOINT = 'https://ghb.spotim.market/v2/auction'; const BIDDER_CODE = 'openweb'; diff --git a/modules/openxAnalyticsAdapter.js b/modules/openxAnalyticsAdapter.js index f67f8bd0c75..7efe1c9d487 100644 --- a/modules/openxAnalyticsAdapter.js +++ b/modules/openxAnalyticsAdapter.js @@ -3,8 +3,8 @@ import adapter from '../src/AnalyticsAdapter.js'; import CONSTANTS from '../src/constants.json'; import adapterManager from '../src/adapterManager.js'; import { ajax } from '../src/ajax.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; export const AUCTION_STATES = { INIT: 'initialized', // auction has initialized diff --git a/modules/openxBidAdapter.js b/modules/openxBidAdapter.js index 60b441e2c10..e5c4289ab99 100644 --- a/modules/openxBidAdapter.js +++ b/modules/openxBidAdapter.js @@ -2,7 +2,7 @@ import { deepAccess, convertTypes, isArray, inIframe, _map, deepSetValue, _each, import {config} from '../src/config.js'; import {registerBidder} from '../src/adapters/bidderFactory.js'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; -import includes from 'core-js-pure/features/array/includes.js' +import includes from 'prebidjs-polyfill/includes.js' const SUPPORTED_AD_TYPES = [BANNER, VIDEO]; const VIDEO_TARGETING = ['startdelay', 'mimes', 'minduration', 'maxduration', diff --git a/modules/parrableIdSystem.js b/modules/parrableIdSystem.js index b1553bcb134..40e6368556e 100644 --- a/modules/parrableIdSystem.js +++ b/modules/parrableIdSystem.js @@ -8,7 +8,7 @@ // ci trigger: 1 import { timestamp, logError, logWarn, isEmpty, contains, inIframe, deepClone, isPlainObject } from '../src/utils.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { ajax } from '../src/ajax.js'; import { submodule } from '../src/hook.js'; import { getRefererInfo } from '../src/refererDetection.js'; diff --git a/modules/permutiveRtdProvider.js b/modules/permutiveRtdProvider.js index 40282567506..fdff3343615 100644 --- a/modules/permutiveRtdProvider.js +++ b/modules/permutiveRtdProvider.js @@ -10,7 +10,7 @@ import { submodule } from '../src/hook.js' import { getStorageManager } from '../src/storageManager.js' import { deepSetValue, deepAccess, isFn, mergeDeep, logError } from '../src/utils.js' import { config } from '../src/config.js' -import includes from 'core-js-pure/features/array/includes.js' +import includes from 'prebidjs-polyfill/includes.js' const MODULE_NAME = 'permutive' export const storage = getStorageManager(null, MODULE_NAME) diff --git a/modules/pixfutureBidAdapter.js b/modules/pixfutureBidAdapter.js index e9db875fc2f..b0924ebcac5 100644 --- a/modules/pixfutureBidAdapter.js +++ b/modules/pixfutureBidAdapter.js @@ -2,10 +2,10 @@ import { registerBidder } from '../src/adapters/bidderFactory.js'; import { getStorageManager } from '../src/storageManager.js'; import { BANNER } from '../src/mediaTypes.js'; import { config } from '../src/config.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { convertCamelToUnderscore, isArray, isNumber, isPlainObject, deepAccess, isEmpty, transformBidderParamKeywords, isFn } from '../src/utils.js'; import { auctionManager } from '../src/auctionManager.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const SOURCE = 'pbjs'; const storageManager = getStorageManager(); diff --git a/modules/prebidServerBidAdapter/index.js b/modules/prebidServerBidAdapter/index.js index efe2576efd5..4fb5b4b3571 100644 --- a/modules/prebidServerBidAdapter/index.js +++ b/modules/prebidServerBidAdapter/index.js @@ -13,10 +13,10 @@ import { VIDEO, NATIVE } from '../../src/mediaTypes.js'; import { processNativeAdUnitParams } from '../../src/native.js'; import { isValid } from '../../src/adapters/bidderFactory.js'; import events from '../../src/events.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { S2S_VENDORS } from './config.js'; import { ajax } from '../../src/ajax.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const getConfig = config.getConfig; diff --git a/modules/priceFloors.js b/modules/priceFloors.js index 961749cc102..c3a8042d55a 100644 --- a/modules/priceFloors.js +++ b/modules/priceFloors.js @@ -6,7 +6,7 @@ import events from '../src/events.js'; import CONSTANTS from '../src/constants.json'; import { getHook } from '../src/hook.js'; import { createBid } from '../src/bidfactory.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { getRefererInfo } from '../src/refererDetection.js'; import {bidderSettings} from '../src/bidderSettings.js'; diff --git a/modules/quantcastBidAdapter.js b/modules/quantcastBidAdapter.js index e168339426d..7c087753a24 100644 --- a/modules/quantcastBidAdapter.js +++ b/modules/quantcastBidAdapter.js @@ -3,7 +3,7 @@ import { ajax } from '../src/ajax.js'; import { config } from '../src/config.js'; import { getStorageManager } from '../src/storageManager.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const BIDDER_CODE = 'quantcast'; const DEFAULT_BID_FLOOR = 0.0000000001; diff --git a/modules/reconciliationRtdProvider.js b/modules/reconciliationRtdProvider.js index fc5f0ab621a..f3ba8c4ab9a 100644 --- a/modules/reconciliationRtdProvider.js +++ b/modules/reconciliationRtdProvider.js @@ -19,7 +19,7 @@ import { submodule } from '../src/hook.js'; import { ajaxBuilder } from '../src/ajax.js'; import { isGptPubadsDefined, timestamp, generateUUID, logError } from '../src/utils.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; /** @type {Object} */ const MessageType = { diff --git a/modules/roxotAnalyticsAdapter.js b/modules/roxotAnalyticsAdapter.js index c9245d4ae08..c511521851c 100644 --- a/modules/roxotAnalyticsAdapter.js +++ b/modules/roxotAnalyticsAdapter.js @@ -2,7 +2,7 @@ import { deepClone, getParameterByName, logInfo, logError } from '../src/utils.j import adapter from '../src/AnalyticsAdapter.js'; import CONSTANTS from '../src/constants.json'; import adapterManager from '../src/adapterManager.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import {ajaxBuilder} from '../src/ajax.js'; import { getStorageManager } from '../src/storageManager.js'; diff --git a/modules/rtbhouseBidAdapter.js b/modules/rtbhouseBidAdapter.js index 40389b1e1e0..cd6b14d897c 100644 --- a/modules/rtbhouseBidAdapter.js +++ b/modules/rtbhouseBidAdapter.js @@ -1,7 +1,7 @@ import { isArray, deepAccess, getOrigin, logError } from '../src/utils.js'; import { BANNER, NATIVE } from '../src/mediaTypes.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const BIDDER_CODE = 'rtbhouse'; const REGIONS = ['prebid-eu', 'prebid-us', 'prebid-asia']; diff --git a/modules/rtdModule/index.js b/modules/rtdModule/index.js index 6c88d66999a..ff544fd783b 100644 --- a/modules/rtdModule/index.js +++ b/modules/rtdModule/index.js @@ -156,7 +156,7 @@ import {logError, logInfo, logWarn} from '../../src/utils.js'; import events from '../../src/events.js'; import CONSTANTS from '../../src/constants.json'; import {gdprDataHandler, uspDataHandler} from '../../src/adapterManager.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import {getGlobal} from '../../src/prebidGlobal.js'; /** @type {string} */ diff --git a/modules/rubiconBidAdapter.js b/modules/rubiconBidAdapter.js index 28e491900f8..d2f91898833 100644 --- a/modules/rubiconBidAdapter.js +++ b/modules/rubiconBidAdapter.js @@ -2,7 +2,7 @@ import { mergeDeep, _each, logError, deepAccess, deepSetValue, isStr, isNumber, import {registerBidder} from '../src/adapters/bidderFactory.js'; import {config} from '../src/config.js'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { Renderer } from '../src/Renderer.js'; import { getGlobal } from '../src/prebidGlobal.js'; diff --git a/modules/saambaaBidAdapter.js b/modules/saambaaBidAdapter.js index 2810853532d..125a71e76c0 100644 --- a/modules/saambaaBidAdapter.js +++ b/modules/saambaaBidAdapter.js @@ -1,420 +1,420 @@ -import { deepAccess, isFn, generateUUID, parseUrl, isEmpty, parseSizesInput } from '../src/utils.js'; -import { config } from '../src/config.js'; -import { registerBidder } from '../src/adapters/bidderFactory.js'; -import { VIDEO, BANNER } from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; - -const ADAPTER_VERSION = '1.0'; -const BIDDER_CODE = 'saambaa'; - -export const VIDEO_ENDPOINT = 'https://nep.advangelists.com/xp/get?pubid='; -export const BANNER_ENDPOINT = 'https://nep.advangelists.com/xp/get?pubid='; -export const OUTSTREAM_SRC = 'https://player-cdn.beachfrontmedia.com/playerapi/loader/outstream.js'; -export const VIDEO_TARGETING = ['mimes', 'playbackmethod', 'maxduration', 'skip', 'playerSize', 'context']; -export const DEFAULT_MIMES = ['video/mp4', 'application/javascript']; - -let pubid = ''; - -export const spec = { - code: BIDDER_CODE, - supportedMediaTypes: [BANNER, VIDEO], - - isBidRequestValid(bidRequest) { - if (typeof bidRequest != 'undefined') { - if (bidRequest.bidder !== BIDDER_CODE && typeof bidRequest.params === 'undefined') { return false; } - if (bidRequest === '' || bidRequest.params.placement === '' || bidRequest.params.pubid === '') { return false; } - return true; - } else { return false; } - }, - - buildRequests(bids, bidderRequest) { - let requests = []; - let videoBids = bids.filter(bid => isVideoBidValid(bid)); - let bannerBids = bids.filter(bid => isBannerBidValid(bid)); - videoBids.forEach(bid => { - pubid = getVideoBidParam(bid, 'pubid'); - requests.push({ - method: 'POST', - url: VIDEO_ENDPOINT + pubid, - data: createVideoRequestData(bid, bidderRequest), - bidRequest: bid - }); - }); - - bannerBids.forEach(bid => { - pubid = getBannerBidParam(bid, 'pubid'); - - requests.push({ - method: 'POST', - url: BANNER_ENDPOINT + pubid, - data: createBannerRequestData(bid, bidderRequest), - bidRequest: bid - }); - }); - return requests; - }, - - interpretResponse(serverResponse, {bidRequest}) { - let response = serverResponse.body; - if (response !== null && isEmpty(response) == false) { - if (isVideoBid(bidRequest)) { - let bidResponse = { - requestId: response.id, - bidderCode: BIDDER_CODE, - cpm: response.seatbid[0].bid[0].price, - width: response.seatbid[0].bid[0].w, - height: response.seatbid[0].bid[0].h, - ttl: response.seatbid[0].bid[0].ttl || 60, - creativeId: response.seatbid[0].bid[0].crid, - currency: response.cur, - meta: { 'advertiserDomains': response.seatbid[0].bid[0].adomain }, - mediaType: VIDEO, - netRevenue: true - } - - if (response.seatbid[0].bid[0].adm) { - bidResponse.vastXml = response.seatbid[0].bid[0].adm; - bidResponse.adResponse = { - content: response.seatbid[0].bid[0].adm - }; - } else { - bidResponse.vastUrl = response.seatbid[0].bid[0].nurl; - } - - return bidResponse; - } else { - return { - requestId: response.id, - bidderCode: BIDDER_CODE, - cpm: response.seatbid[0].bid[0].price, - width: response.seatbid[0].bid[0].w, - height: response.seatbid[0].bid[0].h, - ad: response.seatbid[0].bid[0].adm, - ttl: response.seatbid[0].bid[0].ttl || 60, - creativeId: response.seatbid[0].bid[0].crid, - currency: response.cur, - meta: { 'advertiserDomains': response.seatbid[0].bid[0].adomain }, - mediaType: BANNER, - netRevenue: true - } - } - } - } -}; - -function isBannerBid(bid) { - return deepAccess(bid, 'mediaTypes.banner') || !isVideoBid(bid); -} - -function isVideoBid(bid) { - return deepAccess(bid, 'mediaTypes.video'); -} - -function getBannerBidFloor(bid) { - let floorInfo = isFn(bid.getFloor) ? bid.getFloor({ currency: 'USD', mediaType: 'banner', size: '*' }) : {}; - return floorInfo.floor || getBannerBidParam(bid, 'bidfloor'); -} - -function getVideoBidFloor(bid) { - let floorInfo = isFn(bid.getFloor) ? bid.getFloor({ currency: 'USD', mediaType: 'video', size: '*' }) : {}; - return floorInfo.floor || getVideoBidParam(bid, 'bidfloor'); -} - -function isVideoBidValid(bid) { - return isVideoBid(bid) && getVideoBidParam(bid, 'pubid') && getVideoBidParam(bid, 'placement'); -} - -function isBannerBidValid(bid) { - return isBannerBid(bid) && getBannerBidParam(bid, 'pubid') && getBannerBidParam(bid, 'placement'); -} - -function getVideoBidParam(bid, key) { - return deepAccess(bid, 'params.video.' + key) || deepAccess(bid, 'params.' + key); -} - -function getBannerBidParam(bid, key) { - return deepAccess(bid, 'params.banner.' + key) || deepAccess(bid, 'params.' + key); -} - -function isMobile() { - return (/(ios|ipod|ipad|iphone|android)/i).test(navigator.userAgent); -} - -function isConnectedTV() { - return (/(smart[-]?tv|hbbtv|appletv|googletv|hdmi|netcast\.tv|viera|nettv|roku|\bdtv\b|sonydtv|inettvbrowser|\btv\b)/i).test(navigator.userAgent); -} - -function getDoNotTrack() { - return navigator.doNotTrack === '1' || window.doNotTrack === '1' || navigator.msDoNoTrack === '1' || navigator.doNotTrack === 'yes'; -} - -function findAndFillParam(o, key, value) { - try { - if (typeof value === 'function') { - o[key] = value(); - } else { - o[key] = value; - } - } catch (ex) {} -} - -function getOsVersion() { - let clientStrings = [ - { s: 'Android', r: /Android/ }, - { s: 'iOS', r: /(iPhone|iPad|iPod)/ }, - { s: 'Mac OS X', r: /Mac OS X/ }, - { s: 'Mac OS', r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ }, - { s: 'Linux', r: /(Linux|X11)/ }, - { s: 'Windows 10', r: /(Windows 10.0|Windows NT 10.0)/ }, - { s: 'Windows 8.1', r: /(Windows 8.1|Windows NT 6.3)/ }, - { s: 'Windows 8', r: /(Windows 8|Windows NT 6.2)/ }, - { s: 'Windows 7', r: /(Windows 7|Windows NT 6.1)/ }, - { s: 'Windows Vista', r: /Windows NT 6.0/ }, - { s: 'Windows Server 2003', r: /Windows NT 5.2/ }, - { s: 'Windows XP', r: /(Windows NT 5.1|Windows XP)/ }, - { s: 'UNIX', r: /UNIX/ }, - { s: 'Search Bot', r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/ } - ]; - let cs = find(clientStrings, cs => cs.r.test(navigator.userAgent)); - return cs ? cs.s : 'unknown'; -} - -function getFirstSize(sizes) { - return (sizes && sizes.length) ? sizes[0] : { w: undefined, h: undefined }; -} - -function parseSizes(sizes) { - return parseSizesInput(sizes).map(size => { - let [ width, height ] = size.split('x'); - return { - w: parseInt(width, 10) || undefined, - h: parseInt(height, 10) || undefined - }; - }); -} - -function getVideoSizes(bid) { - return parseSizes(deepAccess(bid, 'mediaTypes.video.playerSize') || bid.sizes); -} - -function getBannerSizes(bid) { - return parseSizes(deepAccess(bid, 'mediaTypes.banner.sizes') || bid.sizes); -} - -function getTopWindowReferrer() { - try { - return window.top.document.referrer; - } catch (e) { - return ''; - } -} - -function getVideoTargetingParams(bid) { - const result = {}; - const excludeProps = ['playerSize', 'context', 'w', 'h']; - Object.keys(Object(bid.mediaTypes.video)) - .filter(key => !includes(excludeProps, key)) - .forEach(key => { - result[ key ] = bid.mediaTypes.video[ key ]; - }); - Object.keys(Object(bid.params.video)) - .filter(key => includes(VIDEO_TARGETING, key)) - .forEach(key => { - result[ key ] = bid.params.video[ key ]; - }); - return result; -} - -function createVideoRequestData(bid, bidderRequest) { - let topLocation = getTopWindowLocation(bidderRequest); - let topReferrer = getTopWindowReferrer(); - - // if size is explicitly given via adapter params - let paramSize = getVideoBidParam(bid, 'size'); - let sizes = []; - let coppa = config.getConfig('coppa'); - - if (typeof paramSize !== 'undefined' && paramSize != '') { - sizes = parseSizes(paramSize); - } else { - sizes = getVideoSizes(bid); - } - const firstSize = getFirstSize(sizes); - let floor = (getVideoBidFloor(bid) == null || typeof getVideoBidFloor(bid) == 'undefined') ? 0.5 : getVideoBidFloor(bid); - let video = getVideoTargetingParams(bid); - const o = { - 'device': { - 'langauge': (global.navigator.language).split('-')[0], - 'dnt': (global.navigator.doNotTrack === 1 ? 1 : 0), - 'devicetype': isMobile() ? 4 : isConnectedTV() ? 3 : 2, - 'js': 1, - 'os': getOsVersion() - }, - 'at': 2, - 'site': {}, - 'tmax': 3000, - 'cur': ['USD'], - 'id': bid.bidId, - 'imp': [], - 'regs': { - 'ext': { - } - }, - 'user': { - 'ext': { - } - } - }; - - o.site['page'] = topLocation.href; - o.site['domain'] = topLocation.hostname; - o.site['search'] = topLocation.search; - o.site['domain'] = topLocation.hostname; - o.site['ref'] = topReferrer; - o.site['mobile'] = isMobile() ? 1 : 0; - const secure = topLocation.protocol.indexOf('https') === 0 ? 1 : 0; - - o.device['dnt'] = getDoNotTrack() ? 1 : 0; - - findAndFillParam(o.site, 'name', function() { - return global.top.document.title; - }); - - findAndFillParam(o.device, 'h', function() { - return global.screen.height; - }); - findAndFillParam(o.device, 'w', function() { - return global.screen.width; - }); - - let placement = getVideoBidParam(bid, 'placement'); - - for (let j = 0; j < sizes.length; j++) { - o.imp.push({ - 'id': '' + j, - 'displaymanager': '' + BIDDER_CODE, - 'displaymanagerver': '' + ADAPTER_VERSION, - 'tagId': placement, - 'bidfloor': floor, - 'bidfloorcur': 'USD', - 'secure': secure, - 'video': Object.assign({ - 'id': generateUUID(), - 'pos': 0, - 'w': firstSize.w, - 'h': firstSize.h, - 'mimes': DEFAULT_MIMES - }, video) - - }); - } - if (coppa) { - o.regs.ext = {'coppa': 1}; - } - if (bidderRequest && bidderRequest.gdprConsent) { - let { gdprApplies, consentString } = bidderRequest.gdprConsent; - o.regs.ext = {'gdpr': gdprApplies ? 1 : 0}; - o.user.ext = {'consent': consentString}; - } - - return o; -} - -function getTopWindowLocation(bidderRequest) { - let url = bidderRequest && bidderRequest.refererInfo && bidderRequest.refererInfo.referer; - return parseUrl(config.getConfig('pageUrl') || url, { decodeSearchAsString: true }); -} - -function createBannerRequestData(bid, bidderRequest) { - let topLocation = getTopWindowLocation(bidderRequest); - let topReferrer = getTopWindowReferrer(); - - // if size is explicitly given via adapter params - - let paramSize = getBannerBidParam(bid, 'size'); - let sizes = []; - let coppa = config.getConfig('coppa'); - if (typeof paramSize !== 'undefined' && paramSize != '') { - sizes = parseSizes(paramSize); - } else { - sizes = getBannerSizes(bid); - } - - let floor = (getBannerBidFloor(bid) == null || typeof getBannerBidFloor(bid) == 'undefined') ? 0.1 : getBannerBidFloor(bid); - const o = { - 'device': { - 'langauge': (global.navigator.language).split('-')[0], - 'dnt': (global.navigator.doNotTrack === 1 ? 1 : 0), - 'devicetype': isMobile() ? 4 : isConnectedTV() ? 3 : 2, - 'js': 1 - }, - 'at': 2, - 'site': {}, - 'tmax': 3000, - 'cur': ['USD'], - 'id': bid.bidId, - 'imp': [], - 'regs': { - 'ext': { - } - }, - 'user': { - 'ext': { - } - } - }; - - o.site['page'] = topLocation.href; - o.site['domain'] = topLocation.hostname; - o.site['search'] = topLocation.search; - o.site['domain'] = topLocation.hostname; - o.site['ref'] = topReferrer; - o.site['mobile'] = isMobile() ? 1 : 0; - const secure = topLocation.protocol.indexOf('https') === 0 ? 1 : 0; - - o.device['dnt'] = getDoNotTrack() ? 1 : 0; - - findAndFillParam(o.site, 'name', function() { - return global.top.document.title; - }); - - findAndFillParam(o.device, 'h', function() { - return global.screen.height; - }); - findAndFillParam(o.device, 'w', function() { - return global.screen.width; - }); - - let placement = getBannerBidParam(bid, 'placement'); - for (let j = 0; j < sizes.length; j++) { - let size = sizes[j]; - - o.imp.push({ - 'id': '' + j, - 'displaymanager': '' + BIDDER_CODE, - 'displaymanagerver': '' + ADAPTER_VERSION, - 'tagId': placement, - 'bidfloor': floor, - 'bidfloorcur': 'USD', - 'secure': secure, - 'banner': { - 'id': generateUUID(), - 'pos': 0, - 'w': size['w'], - 'h': size['h'] - } - }); - } - if (coppa) { - o.regs.ext = {'coppa': 1}; - } - if (bidderRequest && bidderRequest.gdprConsent) { - let { gdprApplies, consentString } = bidderRequest.gdprConsent; - o.regs.ext = {'gdpr': gdprApplies ? 1 : 0}; - o.user.ext = {'consent': consentString}; - } - - return o; -} -registerBidder(spec); +import { deepAccess, isFn, generateUUID, parseUrl, isEmpty, parseSizesInput } from '../src/utils.js'; +import { config } from '../src/config.js'; +import { registerBidder } from '../src/adapters/bidderFactory.js'; +import { VIDEO, BANNER } from '../src/mediaTypes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; + +const ADAPTER_VERSION = '1.0'; +const BIDDER_CODE = 'saambaa'; + +export const VIDEO_ENDPOINT = 'https://nep.advangelists.com/xp/get?pubid='; +export const BANNER_ENDPOINT = 'https://nep.advangelists.com/xp/get?pubid='; +export const OUTSTREAM_SRC = 'https://player-cdn.beachfrontmedia.com/playerapi/loader/outstream.js'; +export const VIDEO_TARGETING = ['mimes', 'playbackmethod', 'maxduration', 'skip', 'playerSize', 'context']; +export const DEFAULT_MIMES = ['video/mp4', 'application/javascript']; + +let pubid = ''; + +export const spec = { + code: BIDDER_CODE, + supportedMediaTypes: [BANNER, VIDEO], + + isBidRequestValid(bidRequest) { + if (typeof bidRequest != 'undefined') { + if (bidRequest.bidder !== BIDDER_CODE && typeof bidRequest.params === 'undefined') { return false; } + if (bidRequest === '' || bidRequest.params.placement === '' || bidRequest.params.pubid === '') { return false; } + return true; + } else { return false; } + }, + + buildRequests(bids, bidderRequest) { + let requests = []; + let videoBids = bids.filter(bid => isVideoBidValid(bid)); + let bannerBids = bids.filter(bid => isBannerBidValid(bid)); + videoBids.forEach(bid => { + pubid = getVideoBidParam(bid, 'pubid'); + requests.push({ + method: 'POST', + url: VIDEO_ENDPOINT + pubid, + data: createVideoRequestData(bid, bidderRequest), + bidRequest: bid + }); + }); + + bannerBids.forEach(bid => { + pubid = getBannerBidParam(bid, 'pubid'); + + requests.push({ + method: 'POST', + url: BANNER_ENDPOINT + pubid, + data: createBannerRequestData(bid, bidderRequest), + bidRequest: bid + }); + }); + return requests; + }, + + interpretResponse(serverResponse, {bidRequest}) { + let response = serverResponse.body; + if (response !== null && isEmpty(response) == false) { + if (isVideoBid(bidRequest)) { + let bidResponse = { + requestId: response.id, + bidderCode: BIDDER_CODE, + cpm: response.seatbid[0].bid[0].price, + width: response.seatbid[0].bid[0].w, + height: response.seatbid[0].bid[0].h, + ttl: response.seatbid[0].bid[0].ttl || 60, + creativeId: response.seatbid[0].bid[0].crid, + currency: response.cur, + meta: { 'advertiserDomains': response.seatbid[0].bid[0].adomain }, + mediaType: VIDEO, + netRevenue: true + } + + if (response.seatbid[0].bid[0].adm) { + bidResponse.vastXml = response.seatbid[0].bid[0].adm; + bidResponse.adResponse = { + content: response.seatbid[0].bid[0].adm + }; + } else { + bidResponse.vastUrl = response.seatbid[0].bid[0].nurl; + } + + return bidResponse; + } else { + return { + requestId: response.id, + bidderCode: BIDDER_CODE, + cpm: response.seatbid[0].bid[0].price, + width: response.seatbid[0].bid[0].w, + height: response.seatbid[0].bid[0].h, + ad: response.seatbid[0].bid[0].adm, + ttl: response.seatbid[0].bid[0].ttl || 60, + creativeId: response.seatbid[0].bid[0].crid, + currency: response.cur, + meta: { 'advertiserDomains': response.seatbid[0].bid[0].adomain }, + mediaType: BANNER, + netRevenue: true + } + } + } + } +}; + +function isBannerBid(bid) { + return deepAccess(bid, 'mediaTypes.banner') || !isVideoBid(bid); +} + +function isVideoBid(bid) { + return deepAccess(bid, 'mediaTypes.video'); +} + +function getBannerBidFloor(bid) { + let floorInfo = isFn(bid.getFloor) ? bid.getFloor({ currency: 'USD', mediaType: 'banner', size: '*' }) : {}; + return floorInfo.floor || getBannerBidParam(bid, 'bidfloor'); +} + +function getVideoBidFloor(bid) { + let floorInfo = isFn(bid.getFloor) ? bid.getFloor({ currency: 'USD', mediaType: 'video', size: '*' }) : {}; + return floorInfo.floor || getVideoBidParam(bid, 'bidfloor'); +} + +function isVideoBidValid(bid) { + return isVideoBid(bid) && getVideoBidParam(bid, 'pubid') && getVideoBidParam(bid, 'placement'); +} + +function isBannerBidValid(bid) { + return isBannerBid(bid) && getBannerBidParam(bid, 'pubid') && getBannerBidParam(bid, 'placement'); +} + +function getVideoBidParam(bid, key) { + return deepAccess(bid, 'params.video.' + key) || deepAccess(bid, 'params.' + key); +} + +function getBannerBidParam(bid, key) { + return deepAccess(bid, 'params.banner.' + key) || deepAccess(bid, 'params.' + key); +} + +function isMobile() { + return (/(ios|ipod|ipad|iphone|android)/i).test(navigator.userAgent); +} + +function isConnectedTV() { + return (/(smart[-]?tv|hbbtv|appletv|googletv|hdmi|netcast\.tv|viera|nettv|roku|\bdtv\b|sonydtv|inettvbrowser|\btv\b)/i).test(navigator.userAgent); +} + +function getDoNotTrack() { + return navigator.doNotTrack === '1' || window.doNotTrack === '1' || navigator.msDoNoTrack === '1' || navigator.doNotTrack === 'yes'; +} + +function findAndFillParam(o, key, value) { + try { + if (typeof value === 'function') { + o[key] = value(); + } else { + o[key] = value; + } + } catch (ex) {} +} + +function getOsVersion() { + let clientStrings = [ + { s: 'Android', r: /Android/ }, + { s: 'iOS', r: /(iPhone|iPad|iPod)/ }, + { s: 'Mac OS X', r: /Mac OS X/ }, + { s: 'Mac OS', r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ }, + { s: 'Linux', r: /(Linux|X11)/ }, + { s: 'Windows 10', r: /(Windows 10.0|Windows NT 10.0)/ }, + { s: 'Windows 8.1', r: /(Windows 8.1|Windows NT 6.3)/ }, + { s: 'Windows 8', r: /(Windows 8|Windows NT 6.2)/ }, + { s: 'Windows 7', r: /(Windows 7|Windows NT 6.1)/ }, + { s: 'Windows Vista', r: /Windows NT 6.0/ }, + { s: 'Windows Server 2003', r: /Windows NT 5.2/ }, + { s: 'Windows XP', r: /(Windows NT 5.1|Windows XP)/ }, + { s: 'UNIX', r: /UNIX/ }, + { s: 'Search Bot', r: /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/ } + ]; + let cs = find(clientStrings, cs => cs.r.test(navigator.userAgent)); + return cs ? cs.s : 'unknown'; +} + +function getFirstSize(sizes) { + return (sizes && sizes.length) ? sizes[0] : { w: undefined, h: undefined }; +} + +function parseSizes(sizes) { + return parseSizesInput(sizes).map(size => { + let [ width, height ] = size.split('x'); + return { + w: parseInt(width, 10) || undefined, + h: parseInt(height, 10) || undefined + }; + }); +} + +function getVideoSizes(bid) { + return parseSizes(deepAccess(bid, 'mediaTypes.video.playerSize') || bid.sizes); +} + +function getBannerSizes(bid) { + return parseSizes(deepAccess(bid, 'mediaTypes.banner.sizes') || bid.sizes); +} + +function getTopWindowReferrer() { + try { + return window.top.document.referrer; + } catch (e) { + return ''; + } +} + +function getVideoTargetingParams(bid) { + const result = {}; + const excludeProps = ['playerSize', 'context', 'w', 'h']; + Object.keys(Object(bid.mediaTypes.video)) + .filter(key => !includes(excludeProps, key)) + .forEach(key => { + result[ key ] = bid.mediaTypes.video[ key ]; + }); + Object.keys(Object(bid.params.video)) + .filter(key => includes(VIDEO_TARGETING, key)) + .forEach(key => { + result[ key ] = bid.params.video[ key ]; + }); + return result; +} + +function createVideoRequestData(bid, bidderRequest) { + let topLocation = getTopWindowLocation(bidderRequest); + let topReferrer = getTopWindowReferrer(); + + // if size is explicitly given via adapter params + let paramSize = getVideoBidParam(bid, 'size'); + let sizes = []; + let coppa = config.getConfig('coppa'); + + if (typeof paramSize !== 'undefined' && paramSize != '') { + sizes = parseSizes(paramSize); + } else { + sizes = getVideoSizes(bid); + } + const firstSize = getFirstSize(sizes); + let floor = (getVideoBidFloor(bid) == null || typeof getVideoBidFloor(bid) == 'undefined') ? 0.5 : getVideoBidFloor(bid); + let video = getVideoTargetingParams(bid); + const o = { + 'device': { + 'langauge': (global.navigator.language).split('-')[0], + 'dnt': (global.navigator.doNotTrack === 1 ? 1 : 0), + 'devicetype': isMobile() ? 4 : isConnectedTV() ? 3 : 2, + 'js': 1, + 'os': getOsVersion() + }, + 'at': 2, + 'site': {}, + 'tmax': 3000, + 'cur': ['USD'], + 'id': bid.bidId, + 'imp': [], + 'regs': { + 'ext': { + } + }, + 'user': { + 'ext': { + } + } + }; + + o.site['page'] = topLocation.href; + o.site['domain'] = topLocation.hostname; + o.site['search'] = topLocation.search; + o.site['domain'] = topLocation.hostname; + o.site['ref'] = topReferrer; + o.site['mobile'] = isMobile() ? 1 : 0; + const secure = topLocation.protocol.indexOf('https') === 0 ? 1 : 0; + + o.device['dnt'] = getDoNotTrack() ? 1 : 0; + + findAndFillParam(o.site, 'name', function() { + return global.top.document.title; + }); + + findAndFillParam(o.device, 'h', function() { + return global.screen.height; + }); + findAndFillParam(o.device, 'w', function() { + return global.screen.width; + }); + + let placement = getVideoBidParam(bid, 'placement'); + + for (let j = 0; j < sizes.length; j++) { + o.imp.push({ + 'id': '' + j, + 'displaymanager': '' + BIDDER_CODE, + 'displaymanagerver': '' + ADAPTER_VERSION, + 'tagId': placement, + 'bidfloor': floor, + 'bidfloorcur': 'USD', + 'secure': secure, + 'video': Object.assign({ + 'id': generateUUID(), + 'pos': 0, + 'w': firstSize.w, + 'h': firstSize.h, + 'mimes': DEFAULT_MIMES + }, video) + + }); + } + if (coppa) { + o.regs.ext = {'coppa': 1}; + } + if (bidderRequest && bidderRequest.gdprConsent) { + let { gdprApplies, consentString } = bidderRequest.gdprConsent; + o.regs.ext = {'gdpr': gdprApplies ? 1 : 0}; + o.user.ext = {'consent': consentString}; + } + + return o; +} + +function getTopWindowLocation(bidderRequest) { + let url = bidderRequest && bidderRequest.refererInfo && bidderRequest.refererInfo.referer; + return parseUrl(config.getConfig('pageUrl') || url, { decodeSearchAsString: true }); +} + +function createBannerRequestData(bid, bidderRequest) { + let topLocation = getTopWindowLocation(bidderRequest); + let topReferrer = getTopWindowReferrer(); + + // if size is explicitly given via adapter params + + let paramSize = getBannerBidParam(bid, 'size'); + let sizes = []; + let coppa = config.getConfig('coppa'); + if (typeof paramSize !== 'undefined' && paramSize != '') { + sizes = parseSizes(paramSize); + } else { + sizes = getBannerSizes(bid); + } + + let floor = (getBannerBidFloor(bid) == null || typeof getBannerBidFloor(bid) == 'undefined') ? 0.1 : getBannerBidFloor(bid); + const o = { + 'device': { + 'langauge': (global.navigator.language).split('-')[0], + 'dnt': (global.navigator.doNotTrack === 1 ? 1 : 0), + 'devicetype': isMobile() ? 4 : isConnectedTV() ? 3 : 2, + 'js': 1 + }, + 'at': 2, + 'site': {}, + 'tmax': 3000, + 'cur': ['USD'], + 'id': bid.bidId, + 'imp': [], + 'regs': { + 'ext': { + } + }, + 'user': { + 'ext': { + } + } + }; + + o.site['page'] = topLocation.href; + o.site['domain'] = topLocation.hostname; + o.site['search'] = topLocation.search; + o.site['domain'] = topLocation.hostname; + o.site['ref'] = topReferrer; + o.site['mobile'] = isMobile() ? 1 : 0; + const secure = topLocation.protocol.indexOf('https') === 0 ? 1 : 0; + + o.device['dnt'] = getDoNotTrack() ? 1 : 0; + + findAndFillParam(o.site, 'name', function() { + return global.top.document.title; + }); + + findAndFillParam(o.device, 'h', function() { + return global.screen.height; + }); + findAndFillParam(o.device, 'w', function() { + return global.screen.width; + }); + + let placement = getBannerBidParam(bid, 'placement'); + for (let j = 0; j < sizes.length; j++) { + let size = sizes[j]; + + o.imp.push({ + 'id': '' + j, + 'displaymanager': '' + BIDDER_CODE, + 'displaymanagerver': '' + ADAPTER_VERSION, + 'tagId': placement, + 'bidfloor': floor, + 'bidfloorcur': 'USD', + 'secure': secure, + 'banner': { + 'id': generateUUID(), + 'pos': 0, + 'w': size['w'], + 'h': size['h'] + } + }); + } + if (coppa) { + o.regs.ext = {'coppa': 1}; + } + if (bidderRequest && bidderRequest.gdprConsent) { + let { gdprApplies, consentString } = bidderRequest.gdprConsent; + o.regs.ext = {'gdpr': gdprApplies ? 1 : 0}; + o.user.ext = {'consent': consentString}; + } + + return o; +} +registerBidder(spec); diff --git a/modules/sigmoidAnalyticsAdapter.js b/modules/sigmoidAnalyticsAdapter.js index da0ca9e38e5..d65e25bd06a 100644 --- a/modules/sigmoidAnalyticsAdapter.js +++ b/modules/sigmoidAnalyticsAdapter.js @@ -1,6 +1,6 @@ /* Sigmoid Analytics Adapter for prebid.js v1.1.0-pre Updated : 2018-03-28 */ -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import adapter from '../src/AnalyticsAdapter.js'; import CONSTANTS from '../src/constants.json'; import adapterManager from '../src/adapterManager.js'; diff --git a/modules/sirdataRtdProvider.js b/modules/sirdataRtdProvider.js index 344357bcb62..23eecc18a11 100644 --- a/modules/sirdataRtdProvider.js +++ b/modules/sirdataRtdProvider.js @@ -10,7 +10,7 @@ import {getGlobal} from '../src/prebidGlobal.js'; import { deepAccess, logError, deepEqual, deepSetValue, isEmpty, mergeDeep } from '../src/utils.js'; import {submodule} from '../src/hook.js'; import {ajax} from '../src/ajax.js'; -import findIndex from 'core-js-pure/features/array/find-index.js'; +import findIndex from 'prebidjs-polyfill/findIndex.js'; import { getRefererInfo } from '../src/refererDetection.js'; import { config } from '../src/config.js'; diff --git a/modules/sizeMappingV2.js b/modules/sizeMappingV2.js index 95f0eea4075..8f0f26469ab 100644 --- a/modules/sizeMappingV2.js +++ b/modules/sizeMappingV2.js @@ -7,7 +7,7 @@ import { isArray, logError, isArrayOfNums, deepClone, logWarn, getWindowTop, deepEqual, logInfo, isValidMediaTypes, deepAccess, getDefinedParams, getUniqueIdentifierStr, flatten } from '../src/utils.js'; import { processNativeAdUnitParams } from '../src/native.js'; import { adunitCounter } from '../src/adUnits.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { getHook } from '../src/hook.js'; import { adUnitSetupChecks } from '../src/prebid.js'; diff --git a/modules/smarticoBidAdapter.js b/modules/smarticoBidAdapter.js index 2399a12f932..a43424ff793 100644 --- a/modules/smarticoBidAdapter.js +++ b/modules/smarticoBidAdapter.js @@ -1,6 +1,6 @@ import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER } from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const SMARTICO_CONFIG = { bidRequestUrl: 'https://trmads.eu/preBidRequest', diff --git a/modules/sovrnAnalyticsAdapter.js b/modules/sovrnAnalyticsAdapter.js index aee7ddd2690..305c1ff4556 100644 --- a/modules/sovrnAnalyticsAdapter.js +++ b/modules/sovrnAnalyticsAdapter.js @@ -4,8 +4,8 @@ import adaptermanager from '../src/adapterManager.js' import CONSTANTS from '../src/constants.json' import {ajaxBuilder} from '../src/ajax.js' import {config} from '../src/config.js' -import find from 'core-js-pure/features/array/find.js' -import includes from 'core-js-pure/features/array/includes.js' +import find from 'prebidjs-polyfill/find.js' +import includes from 'prebidjs-polyfill/includes.js' const ajax = ajaxBuilder(0) diff --git a/modules/sspBCBidAdapter.js b/modules/sspBCBidAdapter.js index c8f3c138ce4..3a22b185955 100644 --- a/modules/sspBCBidAdapter.js +++ b/modules/sspBCBidAdapter.js @@ -2,7 +2,7 @@ import { isArray, deepAccess, logWarn, parseUrl } from '../src/utils.js'; import { ajax } from '../src/ajax.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; -import strIncludes from 'core-js-pure/features/string/includes.js'; +import strIncludes from 'prebidjs-polyfill/includes.js'; const BIDDER_CODE = 'sspBC'; const BIDDER_URL = 'https://ssp.wp.pl/bidder/'; diff --git a/modules/synacormediaBidAdapter.js b/modules/synacormediaBidAdapter.js index 96616bb6a48..d8c8e2504ac 100644 --- a/modules/synacormediaBidAdapter.js +++ b/modules/synacormediaBidAdapter.js @@ -3,7 +3,7 @@ import { getAdUnitSizes, logWarn, deepSetValue, isFn, isPlainObject } from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, VIDEO } from '../src/mediaTypes.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; import {config} from '../src/config.js'; const BID_SCHEME = 'https://'; diff --git a/modules/targetVideoBidAdapter.js b/modules/targetVideoBidAdapter.js index 5714916c131..87fe318b13d 100644 --- a/modules/targetVideoBidAdapter.js +++ b/modules/targetVideoBidAdapter.js @@ -1,4 +1,4 @@ -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { getBidRequest } from '../src/utils.js'; import { BANNER, VIDEO } from '../src/mediaTypes.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; diff --git a/modules/userId/index.js b/modules/userId/index.js index 42fff2cd16c..2ed4825013c 100644 --- a/modules/userId/index.js +++ b/modules/userId/index.js @@ -130,7 +130,7 @@ * @property {(string[]|undefined)} submoduleNames - submodules to refresh */ -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { config } from '../../src/config.js'; import events from '../../src/events.js'; import { getGlobal } from '../../src/prebidGlobal.js'; @@ -143,7 +143,7 @@ import { getPrebidInternal, isPlainObject, logError, isArray, cyrb53Hash, deepAccess, timestamp, delayExecution, logInfo, isFn, logWarn, isEmptyStr, isNumber, isGptPubadsDefined } from '../../src/utils.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const MODULE_NAME = 'User ID'; const COOKIE = 'cookie'; diff --git a/modules/ventesBidAdapter.js b/modules/ventesBidAdapter.js index a9de52a86ba..53d282dbe63 100644 --- a/modules/ventesBidAdapter.js +++ b/modules/ventesBidAdapter.js @@ -11,7 +11,7 @@ import { isPlainObject, replaceAuctionPrice } from '../src/utils.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; diff --git a/modules/verizonMediaIdSystem.js b/modules/verizonMediaIdSystem.js index 280a6c47894..23b6bb9c63d 100644 --- a/modules/verizonMediaIdSystem.js +++ b/modules/verizonMediaIdSystem.js @@ -8,7 +8,7 @@ import {ajax} from '../src/ajax.js'; import {submodule} from '../src/hook.js'; import { logError, formatQS } from '../src/utils.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import includes from 'prebidjs-polyfill/includes.js'; const MODULE_NAME = 'verizonMediaId'; const VENDOR_ID = 25; diff --git a/modules/viewability.js b/modules/viewability.js index b12c53b7f59..4a8bea688a8 100644 --- a/modules/viewability.js +++ b/modules/viewability.js @@ -1,6 +1,6 @@ import { logWarn, logInfo, isStr, isFn, triggerPixel, insertHtmlIntoIframe } from '../src/utils.js'; import { getGlobal } from '../src/prebidGlobal.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; export const MODULE_NAME = 'viewability'; diff --git a/modules/viewdeosDXBidAdapter.js b/modules/viewdeosDXBidAdapter.js index e3d02938c5b..47dcbaa8cf4 100644 --- a/modules/viewdeosDXBidAdapter.js +++ b/modules/viewdeosDXBidAdapter.js @@ -2,7 +2,7 @@ import { deepAccess, isArray, flatten, logError, parseSizesInput } from '../src/ import {registerBidder} from '../src/adapters/bidderFactory.js'; import {VIDEO, BANNER} from '../src/mediaTypes.js'; import {Renderer} from '../src/Renderer.js'; -import findIndex from 'core-js-pure/features/array/find-index.js'; +import findIndex from 'prebidjs-polyfill/findIndex.js'; const URL = 'https://ghb.sync.viewdeos.com/auction/'; const OUTSTREAM_SRC = 'https://player.sync.viewdeos.com/outstream-unit/2.01/outstream.min.js'; diff --git a/modules/voxBidAdapter.js b/modules/voxBidAdapter.js index 8db97800630..c75392e59e1 100644 --- a/modules/voxBidAdapter.js +++ b/modules/voxBidAdapter.js @@ -1,7 +1,7 @@ import { _map, logWarn, deepAccess, isArray } from '../src/utils.js'; import { registerBidder } from '../src/adapters/bidderFactory.js' import {BANNER, VIDEO} from '../src/mediaTypes.js' -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; import {auctionManager} from '../src/auctionManager.js'; import {Renderer} from '../src/Renderer.js'; diff --git a/modules/waardexBidAdapter.js b/modules/waardexBidAdapter.js index ee17a71dd35..82932951f7c 100644 --- a/modules/waardexBidAdapter.js +++ b/modules/waardexBidAdapter.js @@ -2,7 +2,7 @@ import { logError, isArray, deepAccess, getBidIdParameter } from '../src/utils.j import {registerBidder} from '../src/adapters/bidderFactory.js'; import {BANNER, VIDEO} from '../src/mediaTypes.js'; import {config} from '../src/config.js'; -import find from 'core-js-pure/features/array/find.js'; +import find from 'prebidjs-polyfill/find.js'; const ENDPOINT = `https://hb.justbidit.xyz:8843/prebid`; const BIDDER_CODE = 'waardex'; diff --git a/modules/widespaceBidAdapter.js b/modules/widespaceBidAdapter.js index 7890628f94b..21876542d43 100644 --- a/modules/widespaceBidAdapter.js +++ b/modules/widespaceBidAdapter.js @@ -4,8 +4,8 @@ import { parseQueryStringParameters, parseSizesInput } from '../src/utils.js'; -import includes from 'core-js-pure/features/array/includes.js'; -import find from 'core-js-pure/features/array/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; +import find from 'prebidjs-polyfill/find.js'; import { getStorageManager } from '../src/storageManager.js'; export const storage = getStorageManager(); diff --git a/modules/winrBidAdapter.js b/modules/winrBidAdapter.js index 9213c113460..fa3b7311478 100644 --- a/modules/winrBidAdapter.js +++ b/modules/winrBidAdapter.js @@ -2,8 +2,8 @@ import { convertCamelToUnderscore, isArray, isNumber, isPlainObject, deepAccess, import { config } from '../src/config.js'; import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER } from '../src/mediaTypes.js'; -import find from 'core-js-pure/features/array/find.js'; -import includes from 'core-js-pure/features/array/includes.js'; +import find from 'prebidjs-polyfill/find.js'; +import includes from 'prebidjs-polyfill/includes.js'; import { getStorageManager } from '../src/storageManager.js'; export const storage = getStorageManager(); @@ -39,9 +39,9 @@ function wrapAd(bid, position) { - +