decord/source/1288__isNativeReflectConstruct.js

109 lines
2.9 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1288
// Function ID: 1289
// Name: _isNativeReflectConstruct
// Dependencies: [41, 42, 93, 95, 98, 1278]
// Exports: formatToPlainString
// Module 1288 (_isNativeReflectConstruct)
2026-08-24 06:08:38 +00:00
import _isNativeReflectConstruct2 from "_isNativeReflectConstruct" /* 1278 */;
import StringBuilder from "_classCallCheck" /* 41 */;
import _createClass from "_createClass" /* 42 */;
import closure_1 from "_possibleConstructorReturn" /* 93 */;
import closure_2 from "_getPrototypeOf" /* 95 */;
import _inherits from "_inherits" /* 98 */;
2026-07-29 08:29:29 +00:00
function _isNativeReflectConstruct() {
try {
const _Boolean = Boolean;
const call = valueOf.call;
const _Reflect = Reflect;
const _Boolean2 = Boolean;
if (typeof call === "unknown") {
let callResult = valueOf();
} else {
callResult = call(constructResult);
}
2026-08-24 06:08:38 +00:00
closure_0 = !callResult;
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
2026-07-29 08:29:29 +00:00
return closure_0;
2026-08-24 06:08:38 +00:00
};
2026-07-29 08:29:29 +00:00
return _isNativeReflectConstruct();
} catch (err) {
}
}
2026-07-30 10:14:41 +00:00
function formatToPlainString(k2UNz_, maxSettingsForPreset) {
let first = k2UNz_;
2026-08-04 21:03:28 +00:00
if (typeof k2UNz_ !== "string") {
2026-07-29 08:29:29 +00:00
const self = this;
2026-07-30 10:14:41 +00:00
first = this.bindFormatValues(closure_4, k2UNz_, maxSettingsForPreset)[0];
2026-07-29 08:29:29 +00:00
}
return first;
}
class StringBuilder {
constructor() {
self = this;
tmp = StringBuilder(this, StringBuilder);
2026-08-24 06:08:38 +00:00
tmp2 = closure_2;
obj = closure_2(StringBuilder);
tmp3 = closure_1;
2026-07-29 08:29:29 +00:00
if (_isNativeReflectConstruct()) {
tmp7 = globalThis;
_Reflect = Reflect;
tmp8 = arguments;
constructResult = Reflect.construct(obj, arguments, tmp2(self).constructor);
} else {
tmp4 = arguments;
tmp5 = arguments;
constructResult = obj(...arguments);
}
tmp3Result = tmp3(self, constructResult);
tmp3Result.result = "";
return tmp3Result;
}
}
2026-08-24 06:08:38 +00:00
_inherits(StringBuilder, _isNativeReflectConstruct2.FormatBuilder);
2026-07-29 08:29:29 +00:00
let items = [
{
key: "pushRichTextTag",
value: function pushRichTextTag(arg0, arg1, arg2) {
const self = this;
while (tmp !== undefined) {
self.result = self.result + tmp2;
continue;
}
}
},
{
key: "pushLiteralText",
value: function pushLiteralText(arg0) {
this.result = this.result + arg0;
}
},
{
key: "pushObject",
value: function pushObject(arg0) {
let tmp = null != arg0;
if (tmp) {
tmp = "toString" in arg0;
}
if (tmp) {
const self = this;
this.result = this.result + arg0.toString();
}
}
},
{
key: "finish",
value: function finish() {
const items = [this.result];
return items;
}
}
];
const _moduleResult = _createClass(StringBuilder, items);
let c4 = _moduleResult;
export { formatToPlainString };
export const StringBuilder = _moduleResult;
export const stringFormatter = { format: formatToPlainString, builder: _moduleResult };