decord/source/4669_StringToNumber.js

74 lines
2.2 KiB
JavaScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 4669
// Function ID: 4670
2026-07-20 16:05:17 +00:00
// Name: StringToNumber
2026-08-25 06:04:03 +00:00
// Dependencies: [540, 574, 1414, 541, 4670]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 4669 (StringToNumber)
2026-08-24 06:08:38 +00:00
import getEvalledConstructor from "getEvalledConstructor" /* 540 */;
import _mod541 from "module_541" /* 541 */;
import callBoundIntrinsic from "callBoundIntrinsic" /* 574 */;
import regexTester from "regexTester" /* 1414 */;
2026-08-25 06:04:03 +00:00
import trim from "trim" /* 4670 */;
2026-08-24 06:08:38 +00:00
let tmp = getEvalledConstructor("%RegExp%");
let closure_2 = getEvalledConstructor("%parseInt%");
let closure_3 = callBoundIntrinsic("String.prototype.slice");
let closure_4 = regexTester(/^0b[01]+$/i);
let closure_5 = regexTester(/^0o[0-7]+$/i);
let closure_6 = regexTester(/^[-+]0x[0-9a-f]+$/i);
2026-07-23 10:11:24 +00:00
const items = ["\u0085", "\u200B", "\uFFFE"];
2026-07-20 16:05:17 +00:00
tmp = new tmp("[" + items.join("") + "]", "g");
2026-08-24 06:08:38 +00:00
let closure_7 = regexTester(tmp);
2026-07-20 16:05:17 +00:00
class StringToNumber {
constructor(arg0) {
2026-08-04 21:03:28 +00:00
if (typeof global !== "string") {
2026-07-29 08:29:29 +00:00
tmp13 = closure_0;
tmp14 = closure_1;
tmp15 = new.target;
2026-07-20 16:05:17 +00:00
str = "Assertion failed: `argument` is not a String";
2026-07-29 08:29:29 +00:00
tmp16 = new.target;
tmp17 = new require("module_541")("Assertion failed: `argument` is not a String");
tmp18 = tmp17;
throw tmp17;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp19 = closure_4;
2026-07-20 16:05:17 +00:00
if (closure_4(global)) {
2026-08-24 06:08:38 +00:00
tmp11 = closure_2;
tmp12 = closure_3;
2026-07-20 16:05:17 +00:00
num4 = 2;
2026-08-24 06:08:38 +00:00
return +closure_2(closure_3(global, 2), 2);
2026-07-20 16:05:17 +00:00
} else {
tmp = closure_5;
if (closure_5(global)) {
2026-08-24 06:08:38 +00:00
tmp9 = closure_2;
tmp10 = closure_3;
2026-07-20 16:05:17 +00:00
num2 = 2;
num3 = 8;
2026-08-24 06:08:38 +00:00
return +closure_2(closure_3(global, 2), 8);
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
tmp2 = closure_7;
if (!closure_7(global)) {
2026-07-20 16:05:17 +00:00
tmp3 = closure_6;
if (!closure_6(global)) {
2026-07-23 10:11:24 +00:00
tmp4 = closure_0;
tmp5 = closure_1;
tmp6 = require("trim")(global);
2026-07-20 16:05:17 +00:00
if (tmp6 !== global) {
tmp8 = StringToNumber;
tmp7 = StringToNumber(tmp6);
} else {
tmp7 = +global;
}
return tmp7;
}
}
2026-07-29 08:29:29 +00:00
num = NaN;
2026-07-20 16:05:17 +00:00
return NaN;
}
}
}
}
}
export default StringToNumber;