decord/source/1081__wrappedIsEnabled.js

49 lines
1.8 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1081
2026-07-28 08:39:19 +00:00
// Function ID: 12450
2026-07-20 16:05:17 +00:00
// Name: _wrappedIsEnabled
2026-07-23 10:11:24 +00:00
// Dependencies: [794, 1048]
2026-07-20 16:05:17 +00:00
// Module 1081 (_wrappedIsEnabled)
2026-07-23 10:11:24 +00:00
import registerSpanErrorInstrumentation from "registerSpanErrorInstrumentation";
2026-07-20 16:05:17 +00:00
function _wrappedIsEnabled(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
if ("string" === typeof first) {
if ("boolean" === typeof applyResult) {
2026-07-23 10:11:24 +00:00
const result = callback(outer1_1[0])._INTERNAL_insertFlagToScope(first, applyResult);
const obj = callback(outer1_1[0]);
const result1 = callback(outer1_1[0])._INTERNAL_addFeatureFlagToActiveSpan(first, applyResult);
const obj2 = callback(outer1_1[0]);
2026-07-20 16:05:17 +00:00
}
return applyResult;
}
2026-07-23 10:11:24 +00:00
if (callback(outer1_1[1]).DEBUG_BUILD) {
const debug = callback(outer1_1[0]).debug;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
debug.error("[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: " + first + " (" + tmp4 + "), result: " + applyResult + " (" + typeof applyResult + ")");
}
};
}
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2026-07-23 10:11:24 +00:00
export const unleashIntegration = registerSpanErrorInstrumentation.defineIntegration((featureFlagClientClass) => {
featureFlagClientClass = featureFlagClientClass.featureFlagClientClass;
2026-07-20 16:05:17 +00:00
return {
name: "Unleash",
setupOnce() {
2026-07-23 10:11:24 +00:00
featureFlagClientClass(outer1_1[0]).fill(featureFlagClientClass.prototype, "isEnabled", outer1_2);
2026-07-20 16:05:17 +00:00
},
processEvent(contexts) {
2026-07-23 10:11:24 +00:00
return featureFlagClientClass(outer1_1[0])._INTERNAL_copyFlagsFromScopeToEvent(contexts);
2026-07-20 16:05:17 +00:00
}
};
});