@brndts/brndts-ads 1.14.8 → 1.14.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -72269,6 +72269,15 @@ var GPT = /*#__PURE__*/ function() {
|
|
72269
72269
|
]);
|
72270
72270
|
return GPT;
|
72271
72271
|
}();
|
72272
|
+
var tcf_ready = false;
|
72273
|
+
function handleTCFApiEvent(data, success) {
|
72274
|
+
if (!success) return;
|
72275
|
+
var ready = (data === null || data === void 0 ? void 0 : data.eventStatus) === "tcloaded" || (data === null || data === void 0 ? void 0 : data.eventStatus) === "useractioncomplete";
|
72276
|
+
var hasTC = !!(data === null || data === void 0 ? void 0 : data.tcString);
|
72277
|
+
if (ready && hasTC) {
|
72278
|
+
tcf_ready = true;
|
72279
|
+
}
|
72280
|
+
}
|
72272
72281
|
var PrebidGAM = /*#__PURE__*/ function() {
|
72273
72282
|
"use strict";
|
72274
72283
|
function _PrebidGAM() {
|
@@ -72303,6 +72312,13 @@ var PrebidGAM = /*#__PURE__*/ function() {
|
|
72303
72312
|
key: "configure",
|
72304
72313
|
value: function configure(context, options) {
|
72305
72314
|
var _window_pbjs_que, _window_pbjs;
|
72315
|
+
if (window.__tcfApi) {
|
72316
|
+
var _window___tcfapi, _window, _window___tcfapi1, _window1;
|
72317
|
+
(_window___tcfapi = (_window = window).__tcfapi) === null || _window___tcfapi === void 0 ? void 0 : _window___tcfapi.call(_window, "getTCData", 2, handleTCFApiEvent);
|
72318
|
+
(_window___tcfapi1 = (_window1 = window).__tcfapi) === null || _window___tcfapi1 === void 0 ? void 0 : _window___tcfapi1.call(_window1, "addEventListener", 2, handleTCFApiEvent);
|
72319
|
+
} else {
|
72320
|
+
tcf_ready = true;
|
72321
|
+
}
|
72306
72322
|
(_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : (_window_pbjs_que = _window_pbjs.que) === null || _window_pbjs_que === void 0 ? void 0 : _window_pbjs_que.push(function() {
|
72307
72323
|
var _context_config_getAdsConfig_general_debug_mode, _context_config_getAdsConfig_general, _window_pbjs, _window_pbjs1, _window_pbjs2;
|
72308
72324
|
var configBuilder = new PrebidConfigBuilder();
|