decord/source/907_growthbookIntegration.js

54 lines
1.8 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 907
2026-07-24 07:16:23 +00:00
// Function ID: 9961
2026-07-20 16:05:17 +00:00
// Name: growthbookIntegration
2026-07-23 10:11:24 +00:00
// Dependencies: [863, 799, 906]
2026-07-20 16:05:17 +00:00
// Module 907 (growthbookIntegration)
2026-07-23 10:11:24 +00:00
import setupIntegration from "setupIntegration";
2026-07-20 16:05:17 +00:00
function _wrapAndCaptureBooleanResult(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
return function() {
const length = arguments.length;
const array = new Array(length);
for (let num = 0; num < length; num = num + 1) {
array[num] = arguments[num];
}
const first = array[0];
2026-07-23 10:11:24 +00:00
const applyResult = callback.apply(this, array);
2026-07-20 16:05:17 +00:00
let tmp4 = "string" === typeof first;
if (tmp4) {
tmp4 = "boolean" === typeof applyResult;
}
if (tmp4) {
2026-07-23 10:11:24 +00:00
const result = callback(outer1_1[2])._INTERNAL_insertFlagToScope(first, applyResult);
const obj = callback(outer1_1[2]);
const result1 = callback(outer1_1[2])._INTERNAL_addFeatureFlagToActiveSpan(first, applyResult);
const obj2 = callback(outer1_1[2]);
2026-07-20 16:05:17 +00:00
}
return applyResult;
};
}
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2026-07-23 10:11:24 +00:00
export const growthbookIntegration = setupIntegration.defineIntegration((growthbookClass) => {
growthbookClass = growthbookClass.growthbookClass;
2026-07-20 16:05:17 +00:00
return {
name: "GrowthBook",
setupOnce() {
const prototype = growthbookClass.prototype;
if ("function" === typeof prototype.isOn) {
2026-07-23 10:11:24 +00:00
growthbookClass(outer1_1[1]).fill(prototype, "isOn", outer1_2);
const obj = growthbookClass(outer1_1[1]);
2026-07-20 16:05:17 +00:00
}
if ("function" === typeof prototype.getFeatureValue) {
2026-07-23 10:11:24 +00:00
growthbookClass(outer1_1[1]).fill(prototype, "getFeatureValue", outer1_2);
const obj2 = growthbookClass(outer1_1[1]);
2026-07-20 16:05:17 +00:00
}
},
processEvent(contexts) {
2026-07-23 10:11:24 +00:00
return growthbookClass(outer1_1[2])._INTERNAL_copyFlagsFromScopeToEvent(contexts);
2026-07-20 16:05:17 +00:00
}
};
});