This commit is contained in:
2025-01-04 00:34:03 +01:00
parent 41829408dc
commit 0ca14bbc19
18111 changed files with 1871397 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: !0 });
const WORKER_CODE = `(function() {
"use strict";
const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
async function checkImageBitmap() {
try {
if (typeof createImageBitmap != "function")
return !1;
const imageBlob = await (await fetch(WHITE_PNG)).blob(), imageBitmap = await createImageBitmap(imageBlob);
return imageBitmap.width === 1 && imageBitmap.height === 1;
} catch {
return !1;
}
}
checkImageBitmap().then((result) => {
self.postMessage(result);
});
})();
`;
let WORKER_URL = null;
class WorkerInstance {
constructor() {
WORKER_URL || (WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: "application/javascript" }))), this.worker = new Worker(WORKER_URL);
}
}
WorkerInstance.revokeObjectURL = function() {
WORKER_URL && (URL.revokeObjectURL(WORKER_URL), WORKER_URL = null);
};
exports.default = WorkerInstance;
//# sourceMappingURL=checkImageBitmap.worker.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"checkImageBitmap.worker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1,31 @@
const WORKER_CODE = `(function() {
"use strict";
const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
async function checkImageBitmap() {
try {
if (typeof createImageBitmap != "function")
return !1;
const imageBlob = await (await fetch(WHITE_PNG)).blob(), imageBitmap = await createImageBitmap(imageBlob);
return imageBitmap.width === 1 && imageBitmap.height === 1;
} catch {
return !1;
}
}
checkImageBitmap().then((result) => {
self.postMessage(result);
});
})();
`;
let WORKER_URL = null;
class WorkerInstance {
constructor() {
WORKER_URL || (WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: "application/javascript" }))), this.worker = new Worker(WORKER_URL);
}
}
WorkerInstance.revokeObjectURL = function() {
WORKER_URL && (URL.revokeObjectURL(WORKER_URL), WORKER_URL = null);
};
export {
WorkerInstance as default
};
//# sourceMappingURL=checkImageBitmap.worker.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"checkImageBitmap.worker.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: !0 });
const WORKER_CODE = `(function() {
"use strict";
async function loadImageBitmap(url) {
const response = await fetch(url);
if (!response.ok)
throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \${response.status} \${response.statusText}\`);
const imageBlob = await response.blob();
return await createImageBitmap(imageBlob);
}
self.onmessage = async (event) => {
try {
const imageBitmap = await loadImageBitmap(event.data.data[0]);
self.postMessage({
data: imageBitmap,
uuid: event.data.uuid,
id: event.data.id
}, [imageBitmap]);
} catch (e) {
self.postMessage({
error: e,
uuid: event.data.uuid,
id: event.data.id
});
}
};
})();
`;
let WORKER_URL = null;
class WorkerInstance {
constructor() {
WORKER_URL || (WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: "application/javascript" }))), this.worker = new Worker(WORKER_URL);
}
}
WorkerInstance.revokeObjectURL = function() {
WORKER_URL && (URL.revokeObjectURL(WORKER_URL), WORKER_URL = null);
};
exports.default = WorkerInstance;
//# sourceMappingURL=loadImageBitmap.worker.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"loadImageBitmap.worker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1,40 @@
const WORKER_CODE = `(function() {
"use strict";
async function loadImageBitmap(url) {
const response = await fetch(url);
if (!response.ok)
throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \${response.status} \${response.statusText}\`);
const imageBlob = await response.blob();
return await createImageBitmap(imageBlob);
}
self.onmessage = async (event) => {
try {
const imageBitmap = await loadImageBitmap(event.data.data[0]);
self.postMessage({
data: imageBitmap,
uuid: event.data.uuid,
id: event.data.id
}, [imageBitmap]);
} catch (e) {
self.postMessage({
error: e,
uuid: event.data.uuid,
id: event.data.id
});
}
};
})();
`;
let WORKER_URL = null;
class WorkerInstance {
constructor() {
WORKER_URL || (WORKER_URL = URL.createObjectURL(new Blob([WORKER_CODE], { type: "application/javascript" }))), this.worker = new Worker(WORKER_URL);
}
}
WorkerInstance.revokeObjectURL = function() {
WORKER_URL && (URL.revokeObjectURL(WORKER_URL), WORKER_URL = null);
};
export {
WorkerInstance as default
};
//# sourceMappingURL=loadImageBitmap.worker.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"loadImageBitmap.worker.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}