39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
// Metro module 4750 (f4751).
|
|
import Module4751 from "../../_bundle/Module4751";
|
|
class DiscordMd5 {
|
|
constructor() {
|
|
return {
|
|
__proto__: new.target.prototype
|
|
};
|
|
}
|
|
static async fromBlob(c14423_0) {
|
|
let c25292_1 = DiscordMd5;
|
|
const fromArrayBuffer2 = DiscordMd5.fromArrayBuffer;
|
|
return fromArrayBuffer2.call(c25292_1, await c14423_0.arrayBuffer());
|
|
}
|
|
static fromArrayBuffer(a0) {
|
|
return Module4751.ArrayBuffer.hash(a0);
|
|
}
|
|
static fromDataURI(c14424_0) {
|
|
return Promise.resolve().then(() => {
|
|
const r13 = /^data:[^;]*;base64,(.*)$/.exec(c14424_0);
|
|
if (r13 == null) {
|
|
throw new Error("Not a base64 data URI");
|
|
}
|
|
const r8 = atob(r13[1]);
|
|
const arrayBuffer = new ArrayBuffer(r8.length);
|
|
const uint8Array = new Uint8Array(arrayBuffer);
|
|
const length = r8.length;
|
|
let r0 = 0;
|
|
if (0 < length) {
|
|
do {
|
|
uint8Array[r0] = r8.charCodeAt(r0);
|
|
r0 = r0 + 1;
|
|
} while (r0 < r8.length);
|
|
}
|
|
return Module4751.ArrayBuffer.hash(arrayBuffer);
|
|
});
|
|
}
|
|
}
|
|
export default DiscordMd5;
|