decord/source/lib/Record.tsx

184 lines
4.2 KiB
TypeScript
Raw Normal View History

// Module ID: 1386
// Function ID: 1387
// Name: Record
2026-07-29 08:29:29 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Module 1386 (Record)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
2026-07-29 08:29:29 +00:00
let Record;
class Record {
}
const prototype = Record.prototype;
prototype["toJS"] = function toJS() {
const merged = Object.assign(this);
return {};
};
prototype["set"] = function set(arg0, getTime) {
const self = this;
if (getTime instanceof Date) {
const _Date = Date;
if (obj instanceof Date) {
const time = getTime.getTime();
let tmp2 = self;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let constructor = self;
if (this[arg0] !== getTime) {
const obj2 = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(self);
obj2[arg0] = getTime;
constructor = new self.constructor(obj2);
2026-07-29 08:29:29 +00:00
}
tmp2 = constructor;
};
prototype["merge"] = function merge(arg0) {
const self = this;
let tmp2 = null;
let tmp3 = null;
const keys = Object.keys();
if (keys !== undefined) {
tmp3 = tmp2;
while (keys[tmp] !== undefined) {
if (!arg0.hasOwnProperty(tmp6)) {
continue;
} else {
let obj = self[tmp6];
let obj2 = arg0[tmp6];
let _Date = Date;
let tmp7 = obj2 instanceof Date;
if (tmp7) {
let _Date2 = Date;
tmp7 = obj instanceof Date;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp7) {
let time = obj2.getTime();
tmp7 = time === obj.getTime();
}
tmp2 = tmp5;
if (tmp7) {
continue;
} else {
let tmp9 = tmp5;
if (obj !== obj2) {
let tmp10 = tmp5;
if (null == tmp5) {
let obj3 = {};
2026-07-29 08:29:29 +00:00
let merged = Object.assign(self);
tmp10 = obj3;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp10[tmp6] = arg0[tmp6];
tmp9 = tmp10;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2 = tmp9;
2026-07-20 16:05:17 +00:00
continue;
}
2026-07-29 08:29:29 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
continue;
}
}
let constructor = self;
if (null != tmp3) {
constructor = new self.constructor(tmp3);
}
return constructor;
};
prototype["update"] = function update(arg0, arg1, arg2) {
let tmp = arg2;
if (null == arg2) {
tmp = arg1;
}
const self = this;
let tmp4 = tmp3;
if (this[arg0] instanceof Record) {
if (undefined === tmp4) {
tmp4 = arg1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return self.set(arg0, tmp(tmp4));
} else {
const _Array = Array;
if (tmp3 instanceof Array) {
const items = [];
HermesBuiltin.arraySpread(tmp3, 0);
} else {
const _Object = Object;
if (tmp3 instanceof Object) {
const obj = {};
const merged = Object.assign(tmp3);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
}
};
const result = size.fileFinishedImporting("lib/Record.tsx");
2026-07-29 08:29:29 +00:00
class TypedRecord {
}
const prototype2 = TypedRecord.prototype;
prototype2["toJS"] = function toJS() {
const merged = Object.assign(this);
return {};
};
prototype2["set"] = function set(arg0, arg1) {
return this.merge({ [arg0]: arg1 });
};
prototype2["merge"] = function merge(arg0) {
const self = this;
let tmp2 = null;
let tmp3 = null;
const keys = Object.keys();
if (keys !== undefined) {
tmp3 = tmp2;
while (keys[tmp] !== undefined) {
if (!arg0.hasOwnProperty(tmp6)) {
continue;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp2 = tmp5;
if (self[tmp6] === arg0[tmp6]) {
continue;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
let toJSResult = tmp5;
if (null == tmp5) {
toJSResult = self.toJS();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
toJSResult[tmp6] = arg0[tmp6];
tmp2 = toJSResult;
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let constructor = self;
if (null != tmp3) {
constructor = new self.constructor(tmp3);
}
return constructor;
};
prototype2["update"] = function update(arg0, arg1, fn) {
2026-07-29 08:29:29 +00:00
const self = this;
let tmp2 = tmp;
if (this[arg0] instanceof Record) {
if (undefined === tmp2) {
tmp2 = arg1;
2026-07-20 16:05:17 +00:00
}
return self.set(arg0, fn(tmp2));
2026-07-29 08:29:29 +00:00
} else {
const _Array = Array;
if (tmp instanceof Array) {
const items = [];
HermesBuiltin.arraySpread(tmp, 0);
} else {
const _Object = Object;
if (tmp instanceof Object) {
const obj = {};
const merged = Object.assign(tmp);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
}
};
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
export default Record;
export { TypedRecord };