decord/source/6931__createForOfIteratorHelperLoose.js
2026-07-20 16:05:17 +00:00

270 lines
7.5 KiB
JavaScript

// Module ID: 6931
// Function ID: 55294
// Name: _createForOfIteratorHelperLoose
// Dependencies: []
// Module 6931 (_createForOfIteratorHelperLoose)
function _createForOfIteratorHelperLoose(@@iterator) {
let tmp = Symbol_iterator;
@@iterator = "undefined" !== typeof Symbol;
if (Symbol_iterator) {
const _Symbol = Symbol;
@@iterator = Symbol_iterator[Symbol.iterator];
}
if (!Symbol_iterator) {
@@iterator = Symbol_iterator[Symbol.iterator];
}
if (Symbol_iterator) {
const iter = Symbol_iterator.call(Symbol_iterator);
const next = iter.next;
return next.bind(iter);
} else {
const _Array = Array;
tmp = Symbol_iterator;
if (!Array.isArray(Symbol_iterator)) {
let tmp2;
if (Symbol_iterator) {
if ("string" === typeof Symbol_iterator) {
tmp2 = _arrayLikeToArray(Symbol_iterator, undefined);
} else {
const toString = {}.toString;
const substr = toString.call(Symbol_iterator).slice(8, -1);
let name = substr;
if (tmp3) {
name = Symbol_iterator.constructor.name;
}
if ("Map" !== name) {
if ("Set" !== name) {
if ("Arguments" === name) {
let arr = _arrayLikeToArray(Symbol_iterator, undefined);
} else {
const obj = /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/;
}
}
tmp2 = arr;
}
const _Array2 = Array;
arr = Array.from(Symbol_iterator);
const callResult = toString.call(Symbol_iterator);
const tmp3 = "Object" === substr && Symbol_iterator.constructor;
}
}
tmp = tmp2;
if (!tmp2) {
const _TypeError = TypeError;
const typeError = new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
throw typeError;
}
}
let closure_1 = 0;
return () => {
if (closure_1 >= tmp.length) {
let obj = { done: true };
} else {
obj = { done: false };
closure_1 = tmp3 + 1;
obj.value = tmp[+closure_1];
}
return obj;
};
}
}
function _arrayLikeToArray(arg0, arg1) {
let length;
if (tmp) {
length = arg0.length;
}
const ArrayResult = Array(length);
for (let num = 0; num < length; num = num + 1) {
ArrayResult[num] = arg0[num];
}
return ArrayResult;
}
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
function initializeState() {
let closure_0 = false;
let closure_1 = [];
const set = new Set();
const set1 = new Set();
const map = new Map();
const map1 = new Map();
}
let closure_6 = importDefault(dependencyMap[0]);
let closure_7 = importDefault(dependencyMap[1]);
let closure_8 = importDefault(dependencyMap[2]);
let closure_9 = importDefault(dependencyMap[3]);
let closure_10 = importDefault(dependencyMap[4]);
initializeState();
let tmp3 = (Store) => {
class BountyStore {
constructor() {
self = this;
tmp = closure_6(this, BountyStore);
obj = closure_9(BountyStore);
tmp2 = closure_8;
if (closure_13()) {
tmp6 = globalThis;
_Reflect = Reflect;
tmp7 = closure_9;
tmp8 = arguments;
constructResult = Reflect.construct(obj, arguments, closure_9(self).constructor);
} else {
tmp3 = arguments;
tmp4 = arguments;
constructResult = obj(...arguments);
}
return tmp2(self, constructResult);
}
}
callback2(BountyStore, Store);
let obj = {
key: "isFetchingQuestHomeBounties",
get() {
return BountyStore;
}
};
const items = [obj, , , , , , , ];
obj = {
key: "questHomeBounties",
get() {
return closure_1;
}
};
items[1] = obj;
obj = {
key: "isBountyCompleted",
value(arg0) {
return set.has(arg0);
}
};
items[2] = obj;
items[3] = {
key: "getCompletedBountyCount",
value(arg0) {
let iter3;
const tmp = callback3(arg0);
const iter = tmp();
let iter2 = iter;
let num = 0;
let num2 = 0;
if (!iter.done) {
do {
let tmp2 = closure_2;
let sum = num;
if (closure_2.has(iter2.value.id)) {
sum = num + 1;
}
iter3 = tmp();
num = sum;
iter2 = iter3;
num2 = sum;
} while (!iter3.done);
}
return num2;
}
};
items[4] = {
key: "isClaimingBountyReward",
value(arg0) {
return set2.has(arg0);
}
};
items[5] = {
key: "areAllBountiesCompleted",
value() {
return closure_1.every((id) => set.has(id.id));
}
};
items[6] = {
key: "getAdDecisionByPlacementAndAdCreativeId",
value(arg0, arg1) {
let value = closure_4.get(arg0);
value = undefined;
if (null != value) {
value = value.get(arg1);
}
let tmp3 = null;
if (null != value) {
tmp3 = value;
}
return tmp3;
}
};
items[7] = {
key: "getBountyVideoProgress",
value(arg0) {
const value = closure_5.get(arg0);
let tmp2 = null;
if (null != value) {
tmp2 = value;
}
return tmp2;
}
};
return callback(BountyStore, items);
}(importDefault(dependencyMap[5]).Store);
tmp3.displayName = "BountyStore";
tmp3 = new tmp3(importDefault(dependencyMap[6]), {
LOGOUT: function handleLogout() {
initializeState();
},
BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_BEGIN: function handleFetchQuestHomeBountiesBegin() {
let closure_0 = true;
},
BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_SUCCESS: function handleFetchQuestHomeBountiesSuccess(bounties) {
let adDecisionsByAdCreativeId;
let placement;
let closure_0 = false;
bounties = bounties.bounties;
({ placement, adDecisionsByAdCreativeId } = bounties);
const set = new Set();
const map = new Map();
const map1 = new Map(map1);
const result = map1.set(placement, adDecisionsByAdCreativeId);
},
BOUNTIES_FETCH_QUEST_HOME_BOUNTIES_FAILURE: function handleFetchQuestHomeBountiesFailure(placement) {
let closure_0 = false;
let closure_1 = [];
const set = new Set();
const map = new Map(map);
map.delete(placement.placement);
},
BOUNTIES_CLAIM_REWARD_BEGIN: function handleClaimBountyRewardBegin(bountyId) {
const set = new Set(set);
set.add(bountyId.bountyId);
},
BOUNTIES_CLAIM_REWARD_SUCCESS: function handleClaimBountyRewardSuccess(bountyId) {
bountyId = bountyId.bountyId;
const set = new Set(set);
set.delete(bountyId);
const set1 = new Set(set1);
set1.add(bountyId);
},
BOUNTIES_CLAIM_REWARD_FAILURE: function handleClaimBountyRewardFailure(bountyId) {
const set = new Set(set);
set.delete(bountyId.bountyId);
},
BOUNTIES_VIDEO_PROGRESS_UPDATE: function handleBountyVideoProgressUpdate(arg0) {
let bountyId;
let duration;
let maxTimestampSec;
let timestampSec;
({ bountyId, timestampSec, maxTimestampSec, duration } = arg0);
const map = new Map(map);
const result = map.set(bountyId, { timestampSec, maxTimestampSec, duration });
},
AD_SESSION_RESET: function handleAdSessionReset() {
const map = new Map();
}
});
const result = arg1(dependencyMap[7]).fileFinishedImporting("modules/quests/BountyStore.tsx");
export default tmp3;