hyperframes 0.8.148 → 0.8.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-JAHZJYB7.js → add-MG53577L.js} +12 -12
- package/dist/api.d.ts +209 -0
- package/dist/api.js +75 -0
- package/dist/{asset-SJA7DT6Q.js → asset-3GIBXLLL.js} +3 -3
- package/dist/{auth-RR3OIXLH.js → auth-XQMT727H.js} +4 -4
- package/dist/{autoUpdate-KLDV2XWV.js → autoUpdate-CREZJGMU.js} +2 -2
- package/dist/{backgroundChecks-OVL3E2RK.js → backgroundChecks-K3S5QKR3.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-2SAJGOHU.js → batchRender-42AKNX73.js} +4 -4
- package/dist/{beats-HTYS42CC.js → beats-Y7IKETUS.js} +15 -15
- package/dist/{benchmark-CAHP4GLB.js → benchmark-22SAXSO5.js} +15 -15
- package/dist/{browser-M7I67IGX.js → browser-ABNISCC3.js} +14 -13
- package/dist/{capture-P5SNZ6HL.js → capture-DBNHO4WJ.js} +2 -2
- package/dist/{capture-YZQZ5LKM.js → capture-HQG5W42I.js} +11 -11
- package/dist/{catalog-LREZPRJS.js → catalog-KICZFIDX.js} +28 -28
- package/dist/{catch-up-2MLRYAYP.js → catch-up-ZCQUCI45.js} +13 -13
- package/dist/{check-BH6NUR22.js → check-TGXIICEF.js} +34 -34
- package/dist/{checkBrowser-BM6JBFST.js → checkBrowser-3N23I56J.js} +22 -22
- package/dist/{chunk-A6S35NYA.js → chunk-7IEGPJ4P.js} +1 -1
- package/dist/{chunk-A4Q7W4LV.js → chunk-B3XLIBFL.js} +4 -2
- package/dist/{chunk-VHJPGKUW.js → chunk-BNYRD7PQ.js} +1 -1
- package/dist/{chunk-JN4EK6MC.js → chunk-CNPJHUOX.js} +12 -12
- package/dist/{chunk-54TV77W5.js → chunk-CT6ZQRLD.js} +6 -8
- package/dist/chunk-CYFFYK2F.js +56 -0
- package/dist/{chunk-KVGDFUVO.js → chunk-CZQLCBWY.js} +26 -13
- package/dist/{chunk-6IIGT7BX.js → chunk-DNZMBQTH.js} +1 -1
- package/dist/{chunk-SYUGVPYH.js → chunk-DUUFDLC4.js} +1 -1
- package/dist/{chunk-ASEJ2FBO.js → chunk-GESJSXFH.js} +1 -1
- package/dist/chunk-HU2SPFNG.js +103 -0
- package/dist/{chunk-4OA4LDTU.js → chunk-IYLHJV34.js} +1 -1
- package/dist/{chunk-KBB4RG6F.js → chunk-JZIEZCQM.js} +9 -2
- package/dist/{chunk-BB3HJLHD.js → chunk-K44HCHZN.js} +1 -1
- package/dist/chunk-KGPLIH7B.js +127 -0
- package/dist/{chunk-B4P5VDFQ.js → chunk-KMAAOHLO.js} +1 -1
- package/dist/{chunk-RKBES4XP.js → chunk-KUTT3JXL.js} +88 -28
- package/dist/{chunk-OLENCLFE.js → chunk-L274XRWA.js} +79 -6
- package/dist/{chunk-QX26JK43.js → chunk-LACFOFWX.js} +10 -10
- package/dist/chunk-LCILS4AF.js +329 -0
- package/dist/{chunk-ELACLQPC.js → chunk-LTJDUBSQ.js} +1 -1
- package/dist/{chunk-66SAATRI.js → chunk-M5B42RL5.js} +9 -9
- package/dist/{chunk-YQK445YQ.js → chunk-MI6U3OIN.js} +2 -2
- package/dist/{chunk-S7E2I3HT.js → chunk-MXB6CWVH.js} +1 -1
- package/dist/{chunk-KQESKXAC.js → chunk-OMBSUO4T.js} +2 -2
- package/dist/{chunk-UTBQSOEC.js → chunk-P7NTODQE.js} +2 -2
- package/dist/{chunk-BHVFTYSI.js → chunk-PO2SDVQA.js} +4 -1
- package/dist/{chunk-NT7EK6ET.js → chunk-RMIFSBRV.js} +1 -1
- package/dist/{chunk-URYAKNQ2.js → chunk-SFUBSJFP.js} +1 -1
- package/dist/{chunk-74JDPWQ3.js → chunk-TPIG7ZBX.js} +4 -4
- package/dist/{chunk-24GKVAEE.js → chunk-U7SASZC5.js} +10 -10
- package/dist/{chunk-TLGJRK6Q.js → chunk-VGCEMOQA.js} +5 -5
- package/dist/{normalize-U3SL5VG3.js → chunk-VHZ6DL3M.js} +3 -3
- package/dist/chunk-VX4AL2FQ.js +26 -0
- package/dist/{chunk-6VKQ5JT3.js → chunk-WX7VCRM7.js} +2 -2
- package/dist/{chunk-BYSBRF24.js → chunk-XPQSL5VS.js} +5 -120
- package/dist/{chunk-X2G54Y2V.js → chunk-Y475GD4L.js} +4 -4
- package/dist/{chunk-XIL7KT5Q.js → chunk-YDRX42P3.js} +6 -6
- package/dist/{chunk-4SFGME7K.js → chunk-YJDB4FLT.js} +1 -1
- package/dist/{chunk-QATWIE4K.js → chunk-YU2QRNWN.js} +2 -2
- package/dist/{chunk-CNEYCO24.js → chunk-ZKDKFJCK.js} +13 -13
- package/dist/{clean-K7GYTLQE.js → clean-6QP7VAV4.js} +25 -24
- package/dist/cli.js +55 -55
- package/dist/{cloud-I3J5HTN7.js → cloud-5TME5ROM.js} +4 -4
- package/dist/{cloudrun-MJQ363PB.js → cloudrun-F5VVCVF5.js} +4 -4
- package/dist/{compare-LHW6NEFR.js → compare-XPY2EXX6.js} +21 -21
- package/dist/{component-LTPK2D3K.js → component-OPVL3PUX.js} +4 -4
- package/dist/{compositions-QGEHXGIL.js → compositions-WSEOI454.js} +15 -15
- package/dist/{delete-ATNRBUDJ.js → delete-SLMH57VH.js} +11 -11
- package/dist/{doctor-6B76R5BJ.js → doctor-QZW3EKIH.js} +16 -15
- package/dist/{events-33GOPHSS.js → events-6C3ZG7LS.js} +8 -8
- package/dist/{events-BLABPRD5.js → events-FIFWFRGC.js} +6 -6
- package/dist/{feedback-HLXEG7RT.js → feedback-VKXM7YJ5.js} +22 -22
- package/dist/{ffmpeg-5V4FP3R6.js → ffmpeg-TZB5WAYE.js} +3 -2
- package/dist/{figma-T6W7H23L.js → figma-3UYNADNA.js} +3 -3
- package/dist/fontLocalizeCli.js +4 -4
- package/dist/{get-UDMLOTKJ.js → get-VH7VMRVX.js} +11 -11
- package/dist/{grade-compare-P4CHFVBR.js → grade-compare-OSC2YQWN.js} +26 -25
- package/dist/{help-4MW6L6YB.js → help-DCBFEZPT.js} +3 -3
- package/dist/{history-336VM6SH.js → history-XYJMQE26.js} +15 -15
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-FPMIDMD5.js → info-YEHGENAH.js} +15 -15
- package/dist/{init-IWM4PWLO.js → init-64SML7PY.js} +44 -43
- package/dist/{inspect-IIG7756C.js → inspect-GFOQKRJI.js} +19 -19
- package/dist/{keyframes-TWO4BXBA.js → keyframes-ORYFWKBZ.js} +16 -16
- package/dist/{lambda-2JB2QUK2.js → lambda-DRMOJGTC.js} +6 -6
- package/dist/{layout-TPKEKFQQ.js → layout-ZEQBE6UQ.js} +19 -19
- package/dist/{lint-H3KL7KSX.js → lint-67KGFY63.js} +19 -19
- package/dist/{list-LYPO4KRE.js → list-T6OU5ARJ.js} +11 -11
- package/dist/{login-SQQWKWTD.js → login-2PXIGDP7.js} +9 -9
- package/dist/{logout-B4KS4A7S.js → logout-DKJANASY.js} +3 -3
- package/dist/{manager-5ORDVWJB.js → manager-ES2UFT4X.js} +6 -4
- package/dist/{manager-BPSR6D3V.js → manager-GWU5J6RJ.js} +3 -2
- package/dist/{media-treatment-KSRINVUA.js → media-treatment-NAAHID6M.js} +24 -23
- package/dist/{models-WUBF6GDB.js → models-P6XB6RWK.js} +15 -13
- package/dist/{motionShot-STKG4KYQ.js → motionShot-7MHRIV6V.js} +4 -4
- package/dist/{manager-RFZNG5YT.js → normalize-4UDISLPL.js} +14 -20
- package/dist/{normalize-audio-CA47XZ4I.js → normalize-audio-LWNFYR2F.js} +15 -15
- package/dist/{open-B5WYEM3Z.js → open-DAP5C7UD.js} +13 -13
- package/dist/{parakeetRunner-JBK2JPEH.js → parakeetRunner-3ZVFPOD4.js} +13 -23
- package/dist/{pipeline-FEAAD2RJ.js → pipeline-V4YJCPUX.js} +5 -5
- package/dist/{play-2LC5XRM6.js → play-UDCESJO3.js} +26 -26
- package/dist/{preflight-ONF5AJNO.js → preflight-JOD4OXGC.js} +5 -4
- package/dist/{present-XKYF3VGC.js → present-DXTHBH3F.js} +23 -23
- package/dist/{preview-WDPZRHE5.js → preview-YHXKRXKB.js} +29 -27
- package/dist/{publish-3OYXNY44.js → publish-UEFBFGV3.js} +15 -15
- package/dist/{refresh-PVHBEABE.js → refresh-MGCVWX56.js} +3 -3
- package/dist/{remove-background-F6QTJIPZ.js → remove-background-FMV6IDOH.js} +34 -30
- package/dist/{render-JKB6GZDB.js → render-N7QGX6RJ.js} +28 -28
- package/dist/{render-SC77I7FT.js → render-SYC4RPGT.js} +4 -4
- package/dist/{render-QQ7NUREG.js → render-ZTXNPRGF.js} +51 -50
- package/dist/{render-batch-4F44JFAB.js → render-batch-SZRPCRUJ.js} +4 -4
- package/dist/renderSetupWorker.js +4 -3
- package/dist/{sherpa-FOXB4XBN.js → sherpa-M4Z2Q5Y2.js} +11 -10
- package/dist/sherpaWorker.js +3 -1
- package/dist/{skills-GG756RCG.js → skills-NEHNSHZK.js} +15 -15
- package/dist/{skillsUpdateCheck-N2LDCNAS.js → skillsUpdateCheck-O77QR72A.js} +3 -3
- package/dist/{snapshot-2LDOY65W.js → snapshot-GDVXFBVY.js} +40 -39
- package/dist/{staticProjectServer-QBB6WUAY.js → staticProjectServer-3D2NXQ6W.js} +5 -5
- package/dist/{status-PTKNQD2E.js → status-NBRMGL7D.js} +5 -5
- package/dist/studio/assets/{hyperframes-player-BBBg-uvu.js → hyperframes-player-C-2YwYre.js} +1 -1
- package/dist/studio/assets/{index-BJIpZeuk.js → index-ByJU5J6n.js} +4 -4
- package/dist/studio/assets/{index-BXJLeCqB.js → index-BybGk67U.js} +1 -1
- package/dist/studio/assets/{index-DARhiE_i.js → index-Cfs2r3fz.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-VPTZF2AW.js → studio-api-XIBDLRHB.js} +2 -2
- package/dist/{studioServer-VZKX2MG7.js → studioServer-QIQK47UN.js} +45 -44
- package/dist/{synthesize-UCI4X5O7.js → synthesize-22B7L5GX.js} +6 -6
- package/dist/{telemetry-76XND6XK.js → telemetry-565KDZUW.js} +8 -8
- package/dist/{timeline-UJLTA4AX.js → timeline-E6XB7I6W.js} +18 -18
- package/dist/{tokens-VMWANYJY.js → tokens-3ZAJENSE.js} +3 -3
- package/dist/transcribe-WODP3T77.js +332 -0
- package/dist/{transcribe-JNOG667L.js → transcribe-XWQQCCBG.js} +9 -8
- package/dist/{tts-B6AHFQEO.js → tts-QSAQZVEZ.js} +3 -3
- package/dist/{updateCheck-WI3HYM72.js → updateCheck-QPYU4GRL.js} +2 -2
- package/dist/{upgrade-52RIOKFX.js → upgrade-2FJ5ZEN6.js} +5 -5
- package/dist/{validate-MJVNR7YY.js → validate-SP2VGNEI.js} +16 -16
- package/package.json +8 -1
- package/dist/chunk-6IHWCZ3W.js +0 -54
- package/dist/chunk-SQLK7SJL.js +0 -88
- package/dist/renderCancellation-7OEBNE2L.js +0 -43
- package/dist/transcribe-FD7A2SH3.js +0 -466
- package/dist/{bundleWithLocalizedFonts-EKRXJBXU.js → bundleWithLocalizedFonts-OE5ZI4JE.js} +3 -3
- package/dist/{chunk-DKSDVDXG.js → chunk-NAMGMP3R.js} +3 -3
- package/dist/{chunk-C24LU5XD.js → chunk-NKM53WMI.js} +5 -5
- package/dist/{chunk-O3EALI4M.js → chunk-XHBX7QN6.js} +3 -3
- package/dist/{policies-4FEXMXPK.js → policies-DCSIM4AB.js} +3 -3
- package/dist/{screenshotCapture-3JXXUZND.js → screenshotCapture-TEUIWXWN.js} +3 -3
- package/dist/{telemetry-W5AKPI4R.js → telemetry-CQYHCCPL.js} +3 -3
- package/dist/{video-72VNEQEI.js → video-RVNPFEA6.js} +3 -3
|
@@ -8,14 +8,13 @@ import {
|
|
|
8
8
|
loadOptionalPackage
|
|
9
9
|
} from "./chunk-3DKN5WKL.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "./chunk-SQLK7SJL.js";
|
|
11
|
+
downloadFile
|
|
12
|
+
} from "./chunk-PO2SDVQA.js";
|
|
14
13
|
import {
|
|
15
14
|
findFFmpeg,
|
|
16
15
|
findFFprobe,
|
|
17
16
|
getFFmpegInstallHint
|
|
18
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-DUUFDLC4.js";
|
|
19
18
|
import {
|
|
20
19
|
DEFAULT_VP9_CPU_USED,
|
|
21
20
|
SDR_RGB_TO_BT709_FILTER,
|
|
@@ -26,7 +25,74 @@ import {
|
|
|
26
25
|
import { spawn } from "child_process";
|
|
27
26
|
import { randomUUID } from "crypto";
|
|
28
27
|
import { renameSync, rmSync } from "fs";
|
|
29
|
-
import { basename, dirname, extname, join } from "path";
|
|
28
|
+
import { basename, dirname, extname, join as join2 } from "path";
|
|
29
|
+
|
|
30
|
+
// src/background-removal/manager.ts
|
|
31
|
+
import { existsSync, mkdirSync } from "fs";
|
|
32
|
+
import { homedir, platform, arch } from "os";
|
|
33
|
+
import { join } from "path";
|
|
34
|
+
var MODELS_DIR = join(homedir(), ".cache", "hyperframes", "background-removal", "models");
|
|
35
|
+
var DEFAULT_MODEL = "u2net_human_seg";
|
|
36
|
+
var MODEL_URLS = {
|
|
37
|
+
u2net_human_seg: "https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net_human_seg.onnx"
|
|
38
|
+
};
|
|
39
|
+
var MODEL_MEMORY_MB = {
|
|
40
|
+
u2net_human_seg: 1500
|
|
41
|
+
};
|
|
42
|
+
var DEVICES = ["auto", "cpu", "coreml", "cuda"];
|
|
43
|
+
function isDevice(value) {
|
|
44
|
+
return typeof value === "string" && DEVICES.includes(value);
|
|
45
|
+
}
|
|
46
|
+
function selectProviders(device = "auto") {
|
|
47
|
+
if (device === "cpu") return { providers: ["cpu"], label: "CPU" };
|
|
48
|
+
const available = listAvailableProviders();
|
|
49
|
+
const hasCoreML = available.includes("coreml");
|
|
50
|
+
const hasCUDA = available.includes("cuda");
|
|
51
|
+
if (device === "coreml") {
|
|
52
|
+
if (!hasCoreML) {
|
|
53
|
+
throw new Error(
|
|
54
|
+
"CoreML execution provider not available. Install onnxruntime-node on Apple Silicon, or use --device cpu."
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
return { providers: ["coreml", "cpu"], label: "CoreML" };
|
|
58
|
+
}
|
|
59
|
+
if (device === "cuda") {
|
|
60
|
+
if (!hasCUDA) {
|
|
61
|
+
throw new Error(
|
|
62
|
+
"CUDA execution provider not available. Use --device cpu or install an onnxruntime-node build with CUDA support."
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
return { providers: ["cuda", "cpu"], label: "CUDA" };
|
|
66
|
+
}
|
|
67
|
+
if (hasCoreML && platform() === "darwin" && arch() === "arm64") {
|
|
68
|
+
return { providers: ["coreml", "cpu"], label: "CoreML" };
|
|
69
|
+
}
|
|
70
|
+
if (hasCUDA) return { providers: ["cuda", "cpu"], label: "CUDA" };
|
|
71
|
+
return { providers: ["cpu"], label: "CPU" };
|
|
72
|
+
}
|
|
73
|
+
var _cachedProviders;
|
|
74
|
+
function listAvailableProviders() {
|
|
75
|
+
if (_cachedProviders) return _cachedProviders;
|
|
76
|
+
const out = ["cpu"];
|
|
77
|
+
if (platform() === "darwin" && arch() === "arm64") out.push("coreml");
|
|
78
|
+
if (process.env["HYPERFRAMES_CUDA"] === "1") out.push("cuda");
|
|
79
|
+
_cachedProviders = out;
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
82
|
+
function modelPath(model = DEFAULT_MODEL) {
|
|
83
|
+
return join(MODELS_DIR, `${model}.onnx`);
|
|
84
|
+
}
|
|
85
|
+
async function ensureModel(model = DEFAULT_MODEL, options) {
|
|
86
|
+
const dest = modelPath(model);
|
|
87
|
+
if (existsSync(dest)) return dest;
|
|
88
|
+
mkdirSync(MODELS_DIR, { recursive: true });
|
|
89
|
+
options?.onProgress?.(`Downloading ${model} weights (~168 MB)...`);
|
|
90
|
+
await downloadFile(MODEL_URLS[model], dest);
|
|
91
|
+
if (!existsSync(dest)) {
|
|
92
|
+
throw new Error(`Model download failed: ${model}`);
|
|
93
|
+
}
|
|
94
|
+
return dest;
|
|
95
|
+
}
|
|
30
96
|
|
|
31
97
|
// src/background-removal/inference.ts
|
|
32
98
|
var INPUT_SIZE = 320;
|
|
@@ -374,7 +440,7 @@ async function render(options) {
|
|
|
374
440
|
}
|
|
375
441
|
}
|
|
376
442
|
function tempBeside(path) {
|
|
377
|
-
return
|
|
443
|
+
return join2(dirname(path), `.tmp-${randomUUID()}-${basename(path)}`);
|
|
378
444
|
}
|
|
379
445
|
var RECENT_WINDOW = 30;
|
|
380
446
|
function spawnFfmpeg(ffmpegPath, args, label, stdio) {
|
|
@@ -484,6 +550,13 @@ function waitForExit(proc, label, getStderr) {
|
|
|
484
550
|
}
|
|
485
551
|
|
|
486
552
|
export {
|
|
553
|
+
DEFAULT_MODEL,
|
|
554
|
+
MODEL_MEMORY_MB,
|
|
555
|
+
DEVICES,
|
|
556
|
+
isDevice,
|
|
557
|
+
selectProviders,
|
|
558
|
+
listAvailableProviders,
|
|
559
|
+
modelPath,
|
|
487
560
|
QUALITIES,
|
|
488
561
|
DEFAULT_QUALITY,
|
|
489
562
|
isQuality,
|
|
@@ -14,13 +14,8 @@ import {
|
|
|
14
14
|
getInvocationId
|
|
15
15
|
} from "./chunk-54HJ63Q2.js";
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
canaryFeatureProperties,
|
|
20
|
-
evaluateCanary,
|
|
21
|
-
findCanary,
|
|
22
|
-
parseCanaryOverride
|
|
23
|
-
} from "./chunk-FXMKHHPO.js";
|
|
17
|
+
c
|
|
18
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
24
19
|
import {
|
|
25
20
|
hostAnswers
|
|
26
21
|
} from "./chunk-K4WIOZFP.js";
|
|
@@ -34,10 +29,15 @@ import {
|
|
|
34
29
|
} from "./chunk-XUXGIA7H.js";
|
|
35
30
|
import {
|
|
36
31
|
VERSION
|
|
37
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-OMBSUO4T.js";
|
|
38
33
|
import {
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
CANARIES,
|
|
35
|
+
canaryEnvVar,
|
|
36
|
+
canaryFeatureProperties,
|
|
37
|
+
evaluateCanary,
|
|
38
|
+
findCanary,
|
|
39
|
+
parseCanaryOverride
|
|
40
|
+
} from "./chunk-FXMKHHPO.js";
|
|
41
41
|
|
|
42
42
|
// src/telemetry/transport.ts
|
|
43
43
|
import { spawn } from "child_process";
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
parakeetRunner
|
|
9
|
+
} from "./chunk-VX4AL2FQ.js";
|
|
10
|
+
import {
|
|
11
|
+
DecodeCancelled,
|
|
12
|
+
prepareSherpaWav,
|
|
13
|
+
sherpaUnsupportedReason,
|
|
14
|
+
transcribeWithSherpa
|
|
15
|
+
} from "./chunk-CT6ZQRLD.js";
|
|
16
|
+
import {
|
|
17
|
+
initialModelForLanguage,
|
|
18
|
+
transcribe
|
|
19
|
+
} from "./chunk-KUTT3JXL.js";
|
|
20
|
+
import {
|
|
21
|
+
createRenderCancellationScope,
|
|
22
|
+
stoppedByCancelSignal
|
|
23
|
+
} from "./chunk-P7NTODQE.js";
|
|
24
|
+
import {
|
|
25
|
+
formatSrt,
|
|
26
|
+
formatVtt,
|
|
27
|
+
loadTranscript,
|
|
28
|
+
patchCaptionHtml
|
|
29
|
+
} from "./chunk-VHZ6DL3M.js";
|
|
30
|
+
import {
|
|
31
|
+
DEFAULT_MODEL,
|
|
32
|
+
isWhisperUnavailable
|
|
33
|
+
} from "./chunk-CZQLCBWY.js";
|
|
34
|
+
import {
|
|
35
|
+
normalizeErrorMessage
|
|
36
|
+
} from "./chunk-KNU5COPB.js";
|
|
37
|
+
import {
|
|
38
|
+
PARAKEET_INSTALL_COMMAND,
|
|
39
|
+
PARAKEET_LANGUAGES,
|
|
40
|
+
parakeetSpeaks,
|
|
41
|
+
transcribeWithParakeet
|
|
42
|
+
} from "./chunk-JZIEZCQM.js";
|
|
43
|
+
import {
|
|
44
|
+
TRANSCRIPT_FILE
|
|
45
|
+
} from "./chunk-IR35BCLK.js";
|
|
46
|
+
|
|
47
|
+
// src/api/transcribe.ts
|
|
48
|
+
import { existsSync, realpathSync, rmSync, statSync, writeFileSync } from "fs";
|
|
49
|
+
import { basename, dirname, extname, join, resolve } from "path";
|
|
50
|
+
var MIN_TIMEOUT_MS = 5e3;
|
|
51
|
+
var TranscribeError = class extends Error {
|
|
52
|
+
code;
|
|
53
|
+
/** whisper_unavailable: the command that installs Parakeet, when Parakeet would cover this run. */
|
|
54
|
+
install;
|
|
55
|
+
/** caption_write_failed after transcribing: the transcript, which was saved. */
|
|
56
|
+
transcriptPath;
|
|
57
|
+
constructor(code, message, options = {}) {
|
|
58
|
+
super(message, options.cause === void 0 ? void 0 : { cause: options.cause });
|
|
59
|
+
this.name = "TranscribeError";
|
|
60
|
+
this.code = code;
|
|
61
|
+
if (options.install !== void 0) this.install = options.install;
|
|
62
|
+
if (options.transcriptPath !== void 0) this.transcriptPath = options.transcriptPath;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
async function runTranscribe(options) {
|
|
66
|
+
if (options.signal?.aborted) {
|
|
67
|
+
throw new TranscribeError("cancelled", "Transcription cancelled", {
|
|
68
|
+
cause: options.signal.reason
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const inputPath = resolve(options.input);
|
|
72
|
+
if (!existsSync(inputPath)) {
|
|
73
|
+
throw new TranscribeError("input_not_found", `File not found: ${options.input}`);
|
|
74
|
+
}
|
|
75
|
+
const dir = resolve(options.dir ?? dirname(inputPath));
|
|
76
|
+
const ext = extname(inputPath).toLowerCase();
|
|
77
|
+
const isImport = ext === ".json" || ext === ".srt" || ext === ".vtt";
|
|
78
|
+
const sidecar = parseSidecar(options.captions, inputPath, dir);
|
|
79
|
+
if (sidecar && isImport) return exportTranscript(inputPath, sidecar);
|
|
80
|
+
if (isImport) return importTranscript(inputPath, dir);
|
|
81
|
+
const { timeoutMs } = options;
|
|
82
|
+
if (timeoutMs !== void 0 && !(Number.isInteger(timeoutMs) && timeoutMs >= MIN_TIMEOUT_MS)) {
|
|
83
|
+
throw new TranscribeError(
|
|
84
|
+
"invalid_timeout",
|
|
85
|
+
`Invalid timeoutMs: ${timeoutMs}. Must be an integer >= ${MIN_TIMEOUT_MS} (ms).`
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
return transcribeAudio(inputPath, dir, sidecar, options);
|
|
89
|
+
}
|
|
90
|
+
function parseExportFormat(value) {
|
|
91
|
+
if (!value) return void 0;
|
|
92
|
+
const normalized = value.toLowerCase();
|
|
93
|
+
if (normalized === "srt" || normalized === "vtt") return normalized;
|
|
94
|
+
throw new TranscribeError(
|
|
95
|
+
"invalid_option",
|
|
96
|
+
`Unsupported caption export format: ${value}. Use srt or vtt.`
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function parseSidecar(captions, inputPath, dir) {
|
|
100
|
+
const to = parseExportFormat(captions?.format);
|
|
101
|
+
if (!to) return void 0;
|
|
102
|
+
const output = captions?.outputPath;
|
|
103
|
+
const outPath = resolve(output ?? join(dir, `transcript.${to}`));
|
|
104
|
+
const keep = [inputPath, join(dir, TRANSCRIPT_FILE)];
|
|
105
|
+
const problem = output !== void 0 && outputProblem(output, outPath, to) || overwriteProblem(outPath, keep);
|
|
106
|
+
if (problem) throw new TranscribeError("invalid_option", problem);
|
|
107
|
+
return { to, outPath, preserveCues: captions?.preserveCues === true, keep };
|
|
108
|
+
}
|
|
109
|
+
function outputProblem(output, outPath, to) {
|
|
110
|
+
if (!output) return "--output needs a file path";
|
|
111
|
+
const folder = dirname(outPath);
|
|
112
|
+
if (!existsSync(folder) || !statSync(folder).isDirectory()) {
|
|
113
|
+
return `Output folder not found: ${folder}`;
|
|
114
|
+
}
|
|
115
|
+
if (/[\\/]$/.test(output) || existsSync(outPath) && statSync(outPath).isDirectory()) {
|
|
116
|
+
return `--output is a folder; give a file path such as ${join(outPath, `transcript.${to}`)}`;
|
|
117
|
+
}
|
|
118
|
+
return void 0;
|
|
119
|
+
}
|
|
120
|
+
function overwriteProblem(outPath, keep) {
|
|
121
|
+
const hit = keep.find((file) => sameFile(outPath, file));
|
|
122
|
+
return hit && `The caption file would overwrite ${hit}; choose another file with --output`;
|
|
123
|
+
}
|
|
124
|
+
function sameFile(out, file) {
|
|
125
|
+
if (existsSync(out) && existsSync(file)) {
|
|
126
|
+
const [a, b] = [statSync(out, { bigint: true }), statSync(file, { bigint: true })];
|
|
127
|
+
if (a.ino !== 0n && b.ino !== 0n) return a.dev === b.dev && a.ino === b.ino;
|
|
128
|
+
return realpathSync.native(out) === realpathSync.native(file);
|
|
129
|
+
}
|
|
130
|
+
const realDir = (p) => existsSync(dirname(p)) ? realpathSync.native(dirname(p)) : dirname(p);
|
|
131
|
+
return realDir(out) === realDir(file) && basename(out).toLowerCase() === basename(file).toLowerCase();
|
|
132
|
+
}
|
|
133
|
+
function readTranscript(inputPath) {
|
|
134
|
+
let transcript;
|
|
135
|
+
try {
|
|
136
|
+
transcript = loadTranscript(inputPath);
|
|
137
|
+
} catch (err) {
|
|
138
|
+
throw new TranscribeError("invalid_transcript", normalizeErrorMessage(err), { cause: err });
|
|
139
|
+
}
|
|
140
|
+
if (transcript.words.length === 0) {
|
|
141
|
+
throw new TranscribeError("no_words", "No words found in transcript.");
|
|
142
|
+
}
|
|
143
|
+
return transcript;
|
|
144
|
+
}
|
|
145
|
+
function importTranscript(inputPath, dir) {
|
|
146
|
+
const { words, format } = readTranscript(inputPath);
|
|
147
|
+
const transcriptPath = join(dir, TRANSCRIPT_FILE);
|
|
148
|
+
writeFileSync(transcriptPath, JSON.stringify(words, null, 2));
|
|
149
|
+
patchCaptionHtml(dir, words);
|
|
150
|
+
return { kind: "imported", format, wordCount: words.length, transcriptPath };
|
|
151
|
+
}
|
|
152
|
+
function exportTranscript(inputPath, sidecar) {
|
|
153
|
+
const { words, format } = readTranscript(inputPath);
|
|
154
|
+
try {
|
|
155
|
+
writeCaptionSidecar(words, sidecar, format === "srt" || format === "vtt" || void 0);
|
|
156
|
+
} catch (err) {
|
|
157
|
+
throw new TranscribeError(
|
|
158
|
+
"caption_write_failed",
|
|
159
|
+
`The caption file ${sidecar.outPath} could not be written: ${normalizeErrorMessage(err)}`,
|
|
160
|
+
{ cause: err }
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
kind: "exported",
|
|
165
|
+
format: sidecar.to,
|
|
166
|
+
wordCount: words.length,
|
|
167
|
+
outputPath: sidecar.outPath
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function writeCaptionSidecar(words, { to, outPath, preserveCues, keep }, phraseLevelSource) {
|
|
171
|
+
const hit = keep.find((file) => sameFile(outPath, file));
|
|
172
|
+
if (hit) throw new Error(`it is the same file as ${hit}`);
|
|
173
|
+
const preGrouped = preserveCues || phraseLevelSource;
|
|
174
|
+
const content = to === "srt" ? formatSrt(words, { preGrouped }) : formatVtt(words, { preGrouped });
|
|
175
|
+
writeFileSync(outPath, content);
|
|
176
|
+
}
|
|
177
|
+
function pickRunner(engine, parakeet, language) {
|
|
178
|
+
if (engine === "whisper" || !parakeetSpeaks(language)) return "whisper";
|
|
179
|
+
return parakeet() ?? "whisper";
|
|
180
|
+
}
|
|
181
|
+
var parakeetFallsBack = (engine) => engine === "auto";
|
|
182
|
+
function withoutTrailingDots(text) {
|
|
183
|
+
let end = text.length;
|
|
184
|
+
while (end > 0 && text[end - 1] === ".") end--;
|
|
185
|
+
return text.slice(0, end);
|
|
186
|
+
}
|
|
187
|
+
var engineOf = (runner) => runner === "whisper" ? "whisper" : "parakeet";
|
|
188
|
+
function failureMessage(err) {
|
|
189
|
+
const base = err instanceof Error ? err.message : String(err);
|
|
190
|
+
const stderr = err && typeof err === "object" && "stderr" in err && err.stderr ? String(err.stderr).trim().split("\n").slice(-3).filter((line) => !base.includes(line)).join("\n") : "";
|
|
191
|
+
return stderr ? `${base}
|
|
192
|
+
${stderr}` : base;
|
|
193
|
+
}
|
|
194
|
+
async function transcribeAudio(inputPath, dir, sidecar, options) {
|
|
195
|
+
const engine = (options.engine ?? "auto").toLowerCase();
|
|
196
|
+
if (engine !== "auto" && engine !== "parakeet" && engine !== "whisper") {
|
|
197
|
+
throw new TranscribeError(
|
|
198
|
+
"invalid_option",
|
|
199
|
+
`Unknown --engine: ${options.engine}. Use auto, parakeet, or whisper.`
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
const unsupported = sherpaUnsupportedReason();
|
|
203
|
+
let runner = pickRunner(engine, () => parakeetRunner({ unsupported }), options.language);
|
|
204
|
+
if (engine === "parakeet" && runner === "whisper") {
|
|
205
|
+
throw new TranscribeError(
|
|
206
|
+
"parakeet_unavailable",
|
|
207
|
+
!parakeetSpeaks(options.language) ? `Parakeet does not transcribe --language ${options.language}; it covers ${PARAKEET_LANGUAGES.split(" ").join(", ")}. Use --engine whisper.` : unsupported ?? `Parakeet is not installed. Install it with: ${PARAKEET_INSTALL_COMMAND} (or use --engine whisper)`
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
const model = options.model ?? DEFAULT_MODEL;
|
|
211
|
+
const whisperModel = initialModelForLanguage(model, options.language);
|
|
212
|
+
options.onEngine?.({ runner, engine: engineOf(runner), model: whisperModel });
|
|
213
|
+
const { onStatus, onProgress } = options;
|
|
214
|
+
const startScope = () => options.stopOnProcessSignals ? createRenderCancellationScope() : { signal: options.signal ?? new AbortController().signal, dispose: () => {
|
|
215
|
+
} };
|
|
216
|
+
let wavPath = inputPath;
|
|
217
|
+
let cancellation = runner === "sherpa" || !options.stopOnProcessSignals ? startScope() : null;
|
|
218
|
+
const librarySignal = options.stopOnProcessSignals ? void 0 : cancellation?.signal;
|
|
219
|
+
const run = (r) => {
|
|
220
|
+
switch (r) {
|
|
221
|
+
case "sherpa":
|
|
222
|
+
return transcribeWithSherpa(wavPath, dir, {
|
|
223
|
+
onProgress: onStatus,
|
|
224
|
+
onEvent: onProgress,
|
|
225
|
+
signal: cancellation.signal
|
|
226
|
+
});
|
|
227
|
+
case "parakeet-mlx":
|
|
228
|
+
return transcribeWithParakeet(wavPath, dir, {
|
|
229
|
+
onProgress: onStatus,
|
|
230
|
+
onEvent: onProgress,
|
|
231
|
+
signal: librarySignal
|
|
232
|
+
});
|
|
233
|
+
case "whisper":
|
|
234
|
+
return transcribe(wavPath, dir, {
|
|
235
|
+
model,
|
|
236
|
+
language: options.language,
|
|
237
|
+
onProgress: onStatus,
|
|
238
|
+
onEvent: onProgress,
|
|
239
|
+
timeoutMs: options.timeoutMs,
|
|
240
|
+
installRuntime: options.installRuntime,
|
|
241
|
+
signal: librarySignal,
|
|
242
|
+
startCancellation: () => (cancellation ??= startScope()).signal
|
|
243
|
+
});
|
|
244
|
+
default: {
|
|
245
|
+
const unreachable = r;
|
|
246
|
+
throw new Error(`Unknown transcription runner: ${unreachable}`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
try {
|
|
251
|
+
if (runner === "sherpa") {
|
|
252
|
+
wavPath = await prepareSherpaWav(inputPath, onStatus, librarySignal);
|
|
253
|
+
}
|
|
254
|
+
let result;
|
|
255
|
+
try {
|
|
256
|
+
result = await run(runner);
|
|
257
|
+
} catch (err) {
|
|
258
|
+
if (runner !== "sherpa" || err instanceof DecodeCancelled) throw err;
|
|
259
|
+
const reason = withoutTrailingDots(normalizeErrorMessage(err));
|
|
260
|
+
const parakeetError = `Parakeet failed: ${reason}. To repair it, run: ${PARAKEET_INSTALL_COMMAND}`;
|
|
261
|
+
if (!parakeetFallsBack(engine)) throw new Error(parakeetError);
|
|
262
|
+
runner = pickRunner(
|
|
263
|
+
engine,
|
|
264
|
+
() => parakeetRunner({ unsupported, skipSherpa: true }),
|
|
265
|
+
options.language
|
|
266
|
+
);
|
|
267
|
+
options.onEngine?.({
|
|
268
|
+
runner,
|
|
269
|
+
engine: engineOf(runner),
|
|
270
|
+
model: whisperModel,
|
|
271
|
+
fallbackReason: parakeetError
|
|
272
|
+
});
|
|
273
|
+
try {
|
|
274
|
+
result = await run(runner);
|
|
275
|
+
} catch (fallbackErr) {
|
|
276
|
+
if (stoppedByCancelSignal(fallbackErr)) {
|
|
277
|
+
throw new DecodeCancelled("Transcription cancelled");
|
|
278
|
+
}
|
|
279
|
+
const why = normalizeErrorMessage(fallbackErr);
|
|
280
|
+
throw new Error(`${parakeetError}. The ${runner} fallback failed too: ${why}`);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const { words } = loadTranscript(result.transcriptPath);
|
|
284
|
+
writeFileSync(result.transcriptPath, JSON.stringify(words, null, 2));
|
|
285
|
+
patchCaptionHtml(dir, words);
|
|
286
|
+
if (sidecar) {
|
|
287
|
+
try {
|
|
288
|
+
writeCaptionSidecar(words, sidecar, false);
|
|
289
|
+
} catch (err) {
|
|
290
|
+
throw new TranscribeError(
|
|
291
|
+
"caption_write_failed",
|
|
292
|
+
`Transcript saved to ${result.transcriptPath}, but the caption file ${sidecar.outPath} could not be written: ${normalizeErrorMessage(err)}`,
|
|
293
|
+
{ cause: err, transcriptPath: result.transcriptPath }
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
kind: "transcribed",
|
|
299
|
+
engine: engineOf(runner),
|
|
300
|
+
model: result.model,
|
|
301
|
+
detectedLanguage: result.detectedLanguage,
|
|
302
|
+
wordCount: words.length,
|
|
303
|
+
durationSeconds: result.durationSeconds,
|
|
304
|
+
speechOnsetSeconds: result.speechOnsetSeconds,
|
|
305
|
+
transcriptPath: result.transcriptPath,
|
|
306
|
+
...sidecar && { captions: { format: sidecar.to, outputPath: sidecar.outPath } }
|
|
307
|
+
};
|
|
308
|
+
} catch (err) {
|
|
309
|
+
if (err instanceof TranscribeError) throw err;
|
|
310
|
+
if (err instanceof DecodeCancelled || cancellation?.signal.aborted) {
|
|
311
|
+
throw new TranscribeError("cancelled", "Transcription cancelled", { cause: err });
|
|
312
|
+
}
|
|
313
|
+
const message = failureMessage(err);
|
|
314
|
+
if (isWhisperUnavailable(err)) {
|
|
315
|
+
const install = engine === "auto" && parakeetSpeaks(options.language) && !unsupported ? PARAKEET_INSTALL_COMMAND : void 0;
|
|
316
|
+
throw new TranscribeError("whisper_unavailable", message, { cause: err, install });
|
|
317
|
+
}
|
|
318
|
+
throw new TranscribeError("failed", message, { cause: err });
|
|
319
|
+
} finally {
|
|
320
|
+
cancellation?.dispose();
|
|
321
|
+
if (wavPath !== inputPath) rmSync(wavPath, { force: true });
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export {
|
|
326
|
+
MIN_TIMEOUT_MS,
|
|
327
|
+
TranscribeError,
|
|
328
|
+
runTranscribe
|
|
329
|
+
};
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OMBSUO4T.js";
|
|
10
10
|
|
|
11
11
|
// src/registry/compatibility.ts
|
|
12
12
|
import { compareVersions } from "compare-versions";
|
|
@@ -4,23 +4,23 @@ import { dirname as __hf_dirname } from "node:path";
|
|
|
4
4
|
var require = __hf_createRequire(import.meta.url);
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
|
-
import {
|
|
8
|
-
chromeDepsInstallCommand,
|
|
9
|
-
detectLinuxDistro,
|
|
10
|
-
distroLabel,
|
|
11
|
-
getFFmpegInstallHint,
|
|
12
|
-
parseLddMissingLibs
|
|
13
|
-
} from "./chunk-SYUGVPYH.js";
|
|
14
7
|
import {
|
|
15
8
|
getFreeDiskMb
|
|
16
9
|
} from "./chunk-XBSPQ52S.js";
|
|
17
10
|
import {
|
|
18
11
|
ensureBrowser,
|
|
19
12
|
findBrowser
|
|
20
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7IEGPJ4P.js";
|
|
14
|
+
import {
|
|
15
|
+
chromeDepsInstallCommand,
|
|
16
|
+
detectLinuxDistro,
|
|
17
|
+
distroLabel,
|
|
18
|
+
getFFmpegInstallHint,
|
|
19
|
+
parseLddMissingLibs
|
|
20
|
+
} from "./chunk-DUUFDLC4.js";
|
|
21
21
|
import {
|
|
22
22
|
runCancellableProcess
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XPQSL5VS.js";
|
|
24
24
|
import {
|
|
25
25
|
FFMPEG_PATH_ENV,
|
|
26
26
|
FFPROBE_PATH_ENV,
|
|
@@ -7,10 +7,10 @@ var __dirname = __hf_dirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
trackLintReport,
|
|
9
9
|
trackLintRuleStreak
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y475GD4L.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldTrack
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LACFOFWX.js";
|
|
14
14
|
import {
|
|
15
15
|
LINT_RULE_COUNT,
|
|
16
16
|
LINT_RULE_GROUP_COUNTS
|
|
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
|
|
8
8
|
// src/version.ts
|
|
9
|
-
var VERSION = true ? "0.8.
|
|
10
|
-
var PRODUCER_VERSION = true ? "0.8.
|
|
9
|
+
var VERSION = true ? "0.8.149" : "0.0.0-dev";
|
|
10
|
+
var PRODUCER_VERSION = true ? "0.8.149" : "0.0.0-dev";
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
13
|
VERSION,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
processAncestorSnapshot,
|
|
12
12
|
processIdentity,
|
|
13
13
|
processParentPid
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-B3XLIBFL.js";
|
|
15
15
|
import {
|
|
16
16
|
processIsAlive
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KGPLIH7B.js";
|
|
18
18
|
|
|
19
19
|
// src/utils/renderCancellation.ts
|
|
20
20
|
var RENDER_CANCELLATION_SIGNALS = [
|
|
@@ -46,6 +46,9 @@ function measureDownload(options, contentLength) {
|
|
|
46
46
|
});
|
|
47
47
|
return { stream, complete: () => options.onProgress?.(receivedBytes, totalBytes) };
|
|
48
48
|
}
|
|
49
|
+
function getUrl(url, signal, onResponse) {
|
|
50
|
+
return signal ? httpsGet(url, { signal }, onResponse) : httpsGet(url, onResponse);
|
|
51
|
+
}
|
|
49
52
|
function downloadFile(url, dest, options = {}) {
|
|
50
53
|
const tmp = `${dest}.${process.pid}.${randomUUID()}.tmp`;
|
|
51
54
|
const timeoutMs = options.timeoutMs ?? DEFAULT_DOWNLOAD_TIMEOUT_MS;
|
|
@@ -57,7 +60,7 @@ function downloadFile(url, dest, options = {}) {
|
|
|
57
60
|
let requestError;
|
|
58
61
|
let request;
|
|
59
62
|
try {
|
|
60
|
-
request =
|
|
63
|
+
request = getUrl(u, options.signal, (res) => {
|
|
61
64
|
activeResponse = res;
|
|
62
65
|
if (res.statusCode && REDIRECT_CODES.has(res.statusCode)) {
|
|
63
66
|
const location = res.headers.location;
|
|
@@ -1278,7 +1278,7 @@ async function withFigmaErrors(command, fn) {
|
|
|
1278
1278
|
} catch (err) {
|
|
1279
1279
|
if (err instanceof Error) {
|
|
1280
1280
|
try {
|
|
1281
|
-
const { trackCommandFailure } = await import("./events-
|
|
1281
|
+
const { trackCommandFailure } = await import("./events-6C3ZG7LS.js");
|
|
1282
1282
|
trackCommandFailure(
|
|
1283
1283
|
command,
|
|
1284
1284
|
err,
|
|
@@ -19,6 +19,9 @@ import {
|
|
|
19
19
|
resolveLocalBrowserGpuMode,
|
|
20
20
|
resolveLocalWebGpu
|
|
21
21
|
} from "./chunk-QIJLIULK.js";
|
|
22
|
+
import {
|
|
23
|
+
c
|
|
24
|
+
} from "./chunk-ZTZA4UWZ.js";
|
|
22
25
|
import {
|
|
23
26
|
assertWebGpuAdapterAvailable,
|
|
24
27
|
compositionRequiresWebGpu
|
|
@@ -26,9 +29,6 @@ import {
|
|
|
26
29
|
import {
|
|
27
30
|
normalizeErrorMessage
|
|
28
31
|
} from "./chunk-KNU5COPB.js";
|
|
29
|
-
import {
|
|
30
|
-
c
|
|
31
|
-
} from "./chunk-ZTZA4UWZ.js";
|
|
32
32
|
|
|
33
33
|
// src/capture/captureCompositionFrame.ts
|
|
34
34
|
import { spawn } from "child_process";
|
|
@@ -104,7 +104,7 @@ async function installPageFunctionGuard(page) {
|
|
|
104
104
|
}
|
|
105
105
|
async function openSettledCompositionPage(html, url, options) {
|
|
106
106
|
const viewport = resolveCompositionViewportFromHtml(html);
|
|
107
|
-
const { ensureBrowser, findSystemBrowser } = await import("./manager-
|
|
107
|
+
const { ensureBrowser, findSystemBrowser } = await import("./manager-GWU5J6RJ.js");
|
|
108
108
|
const browser = await ensureBrowser();
|
|
109
109
|
const puppeteer = await import("puppeteer-core");
|
|
110
110
|
const { buildChromeArgs } = await import("./src-VMTHSARJ.js");
|