@wirecat/tg-cli 0.128.0 → 0.129.0
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/contracts/wirecat.json +26 -0
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-JOI34QLS.js → adapter-2XFPXBTA.js} +60 -52
- package/dist/bundle/{all-profiles-2BZEE7J2.js → all-profiles-GXFPZLYU.js} +9 -9
- package/dist/bundle/{anthropic-NW7DL3S3.js → anthropic-FHS5XNK5.js} +5 -5
- package/dist/bundle/{app-server-RUTYKELF.js → app-server-IZMFSFP2.js} +54 -46
- package/dist/bundle/{bot-api-DW6NAZAQ.js → bot-api-LQP75V5I.js} +61 -53
- package/dist/bundle/{bot-history-FAJ2W42U.js → bot-history-EJQOD4AQ.js} +22 -18
- package/dist/bundle/{bun-IVP5LSVI.js → bun-GBAZFRCV.js} +2 -2
- package/dist/bundle/{bun-sqlite-ATPCJ4CT.js → bun-sqlite-JB4BX6X7.js} +6 -6
- package/dist/bundle/chunk-2JZJPVBH.js +334 -0
- package/dist/bundle/{chunk-FHGAJK4I.js → chunk-2LPODKIF.js} +15 -15
- package/dist/bundle/chunk-3KZG63EH.js +170 -0
- package/dist/bundle/chunk-3XMUP55N.js +372 -0
- package/dist/bundle/{chunk-MDGLKMLD.js → chunk-4BJAQNJ5.js} +9 -9
- package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-66PL7P4C.js} +1 -1
- package/dist/bundle/{chunk-MOUPWPNL.js → chunk-66UG67CE.js} +12 -12
- package/dist/bundle/{chunk-R4QVV3LN.js → chunk-6JBRQ6PM.js} +41 -19
- package/dist/bundle/{chunk-GYO4WXLG.js → chunk-6M3FAHPS.js} +3 -3
- package/dist/bundle/{chunk-2QHIOPSA.js → chunk-7F3LOHRB.js} +261 -501
- package/dist/bundle/{chunk-XS5C5TQ7.js → chunk-AUNNJDVD.js} +25 -8
- package/dist/bundle/{chunk-7D6LI2N7.js → chunk-B5RGPZDZ.js} +7 -7
- package/dist/bundle/{chunk-YRZXOQOB.js → chunk-B6NQJAUC.js} +2 -2
- package/dist/bundle/{chunk-IV2KJQ5F.js → chunk-BMSS3PCY.js} +58 -33
- package/dist/bundle/{chunk-LTADKMP5.js → chunk-C4ALE7CH.js} +1 -1
- package/dist/bundle/{chunk-WG3BF7SA.js → chunk-CKJ73EF3.js} +1 -1
- package/dist/bundle/{chunk-IX3GUNGV.js → chunk-CLG2ISQH.js} +4 -4
- package/dist/bundle/{chunk-G3PL3R45.js → chunk-EB2JE722.js} +1 -1
- package/dist/bundle/{chunk-J3SX36NE.js → chunk-EUL7HMUL.js} +2 -2
- package/dist/bundle/{chunk-PJA43HVE.js → chunk-F6CV4KUN.js} +2 -2
- package/dist/bundle/{chunk-7KCBPAQS.js → chunk-F6MLJ3V5.js} +2 -2
- package/dist/bundle/{chunk-3UGRMFWK.js → chunk-FH4YIBBH.js} +4 -4
- package/dist/bundle/chunk-FIO5NMK3.js +771 -0
- package/dist/bundle/{chunk-7I5NMVX7.js → chunk-G2SMVYBU.js} +2 -2
- package/dist/bundle/{chunk-FIVFP53N.js → chunk-GA3URWIF.js} +1 -1
- package/dist/bundle/{chunk-2A3TC52A.js → chunk-GGGBPWUS.js} +10 -15
- package/dist/bundle/{chunk-KKZQK6IK.js → chunk-GSHTLLCJ.js} +2 -2
- package/dist/bundle/{chunk-F4UIBEQK.js → chunk-GYCKRIRK.js} +3 -3
- package/dist/bundle/{chunk-WPMJQIEU.js → chunk-HHUK3XO5.js} +1 -1
- package/dist/bundle/{chunk-NM5GBJME.js → chunk-HT6OFANN.js} +19 -19
- package/dist/bundle/{chunk-ODBK56ZR.js → chunk-I5PILOTU.js} +1 -1
- package/dist/bundle/chunk-IBSHQWIJ.js +29 -0
- package/dist/bundle/{chunk-RZFIQMOA.js → chunk-IRWSZJYL.js} +60 -58
- package/dist/bundle/{chunk-BVCRDHI2.js → chunk-IV6SIKVH.js} +4 -4
- package/dist/bundle/{chunk-URFBZNLU.js → chunk-JUFLELQ7.js} +2 -2
- package/dist/bundle/{chunk-XYAH6QQO.js → chunk-KY3JLXW2.js} +4 -4
- package/dist/bundle/{chunk-YSXDCSBP.js → chunk-LPT5T6PU.js} +29 -30
- package/dist/bundle/chunk-LQPZDDDP.js +259 -0
- package/dist/bundle/{chunk-JI2PFQFL.js → chunk-M327UNS6.js} +6 -6
- package/dist/bundle/{chunk-SDLJJF7E.js → chunk-MS6YEIG5.js} +13 -13
- package/dist/bundle/{chunk-WMUPZ3IY.js → chunk-MVFSWKTM.js} +12 -12
- package/dist/bundle/{chunk-YVV5S2QA.js → chunk-NRCY3WBC.js} +2 -2
- package/dist/bundle/{chunk-2IL4YDGG.js → chunk-O2ULG7OO.js} +3 -3
- package/dist/bundle/{chunk-E56QE3UC.js → chunk-OJMDKWWL.js} +627 -503
- package/dist/bundle/{chunk-UURJO46N.js → chunk-OKTRB4ZQ.js} +1 -1
- package/dist/bundle/{chunk-OX6574YV.js → chunk-OOQVHMCS.js} +15 -15
- package/dist/bundle/{chunk-IIHCSJV2.js → chunk-OWVQMK7G.js} +700 -837
- package/dist/bundle/{chunk-WMF6SL5D.js → chunk-P4FZJO5F.js} +2 -2
- package/dist/bundle/{chunk-LD42OGKK.js → chunk-PS7ZS5HD.js} +4 -4
- package/dist/bundle/{chunk-EAUHYQUK.js → chunk-PWQKGFS2.js} +36 -34
- package/dist/bundle/{chunk-MGBVVQTU.js → chunk-QBNEWEJC.js} +3 -3
- package/dist/bundle/{chunk-QYN5RDTZ.js → chunk-QDEP2QOA.js} +3 -3
- package/dist/bundle/{chunk-QO4ON2X7.js → chunk-QFVIHBLD.js} +1 -1
- package/dist/bundle/{chunk-ZVLYK6CZ.js → chunk-QJDHRBXL.js} +7 -7
- package/dist/bundle/{chunk-IHLNXL2D.js → chunk-QJLCEOAP.js} +1 -1
- package/dist/bundle/{chunk-KF2Q776U.js → chunk-RAFK5KXU.js} +9 -9
- package/dist/bundle/{chunk-RIGNCUZD.js → chunk-RPWYTOLI.js} +5 -5
- package/dist/bundle/{chunk-4DSIGS2E.js → chunk-RZPMFVWM.js} +6 -6
- package/dist/bundle/chunk-S5UTBEV3.js +1974 -0
- package/dist/bundle/{chunk-MC6FOTCV.js → chunk-SYZXOEHY.js} +3 -3
- package/dist/bundle/{chunk-5AP25FMW.js → chunk-SZB5WRMI.js} +2 -2
- package/dist/bundle/{chunk-Q3ZO6Q3M.js → chunk-TGRB4SSZ.js} +4 -4
- package/dist/bundle/{chunk-TQFUAKU6.js → chunk-VSPSHBAC.js} +2 -2
- package/dist/bundle/{chunk-TGUXKG4B.js → chunk-VTJ3AOTT.js} +17 -17
- package/dist/bundle/{chunk-T2CWSFGY.js → chunk-VXWDQDRU.js} +6341 -6902
- package/dist/bundle/{chunk-JJGPU24U.js → chunk-X5H5NERR.js} +6 -6
- package/dist/bundle/{chunk-AF2XVV5P.js → chunk-XHX5D5VE.js} +727 -2598
- package/dist/bundle/chunk-XXW6PFAX.js +16 -0
- package/dist/bundle/{chunk-NXDQXDRN.js → chunk-ZRQQOGAZ.js} +4 -4
- package/dist/bundle/command-contract-G752BLKA.js +37 -0
- package/dist/bundle/{command-server-entry-BU3X4XNL.js → command-server-entry-YR6ONDWO.js} +27 -24
- package/dist/bundle/decode-VUKGWFSW.js +296 -0
- package/dist/bundle/{dispatch-PRAIGIFS.js → dispatch-ST5FK2KI.js} +8 -8
- package/dist/bundle/{echarts-NAXLKJLA.js → echarts-GOV5M733.js} +2 -2
- package/dist/bundle/{embed-LB6ONWHX.js → embed-2IVIYNAJ.js} +6 -6
- package/dist/bundle/{embedder-WE7B2RU5.js → embedder-2HU7JYZK.js} +9 -9
- package/dist/bundle/{entry-W6Y52ZRN.js → entry-CSTCXYI5.js} +9 -9
- package/dist/bundle/{failure-7Y34AUJT.js → failure-GMUQKQ5K.js} +2 -2
- package/dist/bundle/{first-run-NVYNZZA6.js → first-run-3IZGXZT5.js} +12 -11
- package/dist/bundle/first-screen-7QSNCZIK.js +35 -0
- package/dist/bundle/{instructions-MRUC57NS.js → instructions-YSXV6FAC.js} +1 -1
- package/dist/bundle/{mcp-TDKGDB4V.js → mcp-VFIOZDVY.js} +2 -2
- package/dist/bundle/meeting-combined-X4E3LSIJ.js +23 -0
- package/dist/bundle/meeting-model-FQBDHGRU.js +24 -0
- package/dist/bundle/meeting-semantic-ONNEOJX5.js +21 -0
- package/dist/bundle/{node-G7PMDYQV.js → node-FMQWCZRS.js} +2 -2
- package/dist/bundle/{node-sqlite-RXWQ3SES.js → node-sqlite-YN5OKOC6.js} +7 -7
- package/dist/bundle/{oauth-6ZWOL6KX.js → oauth-EW7PTZVT.js} +7 -7
- package/dist/bundle/{open-V7LMZCFI.js → open-Q2RDY344.js} +5 -5
- package/dist/bundle/{openai-P472V4ZM.js → openai-STON6G3O.js} +28 -26
- package/dist/bundle/{process-GSNPENHL.js → process-OQUC2TW3.js} +1 -1
- package/dist/bundle/{program-IELITPKT.js → program-7JJHTZ25.js} +66 -57
- package/dist/bundle/{prompt-2CP6CQ5N.js → prompt-WHVF7UTW.js} +5 -5
- package/dist/bundle/{proxy-transport-DP7SIMIC.js → proxy-transport-A4MRO3PF.js} +5 -5
- package/dist/bundle/{recognize-R2DEQ5TC.js → recognize-YDQWMXNI.js} +4 -4
- package/dist/bundle/{remote-JG3POFES.js → remote-477LQHP6.js} +9 -9
- package/dist/bundle/{rerank-TVMR3OLL.js → rerank-4YPB26FG.js} +7 -7
- package/dist/bundle/{serve-DBWSMLPH.js → serve-FXJNUOTS.js} +9 -9
- package/dist/bundle/{server-EXJ2WNZY.js → server-2S6HFBGR.js} +44 -36
- package/dist/bundle/server-UOSUTZNE.js +69 -0
- package/dist/bundle/{sqlite-runtime-AWMY7W4Q.js → sqlite-runtime-RXYNJYMC.js} +6 -6
- package/dist/bundle/{state-HN44BWNQ.js → state-I2GGYGRL.js} +6 -6
- package/dist/bundle/{store-LOVKYQDC.js → store-KX3AAQZH.js} +25 -20
- package/dist/bundle/{store-GIYS3LHV.js → store-VQXIB6KV.js} +17 -13
- package/dist/bundle/store-maintenance-command-LW2MMDLY.js +60 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-3BSXDYBC.js +0 -34
- package/dist/bundle/decode-NXB7E46F.js +0 -162
- package/dist/bundle/first-screen-Z6TVHK6I.js +0 -32
- package/dist/bundle/server-SXNFFAIR.js +0 -61
- package/dist/bundle/store-maintenance-command-X3VOYNCG.js +0 -52
- /package/dist/bundle/{chunk-XWBPP2HX.js → chunk-ZI3YTXSF.js} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/normalize.js
|
|
8
|
+
var NORMALIZER_VERSION = 1;
|
|
9
|
+
var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
|
|
10
|
+
var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
NORMALIZER_VERSION,
|
|
14
|
+
fold,
|
|
15
|
+
normalize
|
|
16
|
+
};
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
} from "./chunk-Y5E2WNWB.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-F6MLJ3V5.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/speech/recognize.js
|
|
14
14
|
import { createRequire } from "node:module";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
|
|
17
17
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "local transcription needs a complete mono or stereo Ogg Opus recording"), "invalid");
|
|
18
18
|
var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
|
|
19
19
|
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
@@ -70,7 +70,7 @@ var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
|
|
|
70
70
|
throw invalid();
|
|
71
71
|
}, "checkOggDuration");
|
|
72
72
|
|
|
73
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
73
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/speech/recognize.js
|
|
74
74
|
var SAMPLE_RATE = 16e3;
|
|
75
75
|
var LEAD = SAMPLE_RATE / 2;
|
|
76
76
|
var toModelRate = /* @__PURE__ */ __name((samples, rate) => {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
SCHEMA_DIALECT,
|
|
5
|
+
commandContract,
|
|
6
|
+
commandPathOf,
|
|
7
|
+
findCommand,
|
|
8
|
+
outputOf
|
|
9
|
+
} from "./chunk-KY3JLXW2.js";
|
|
10
|
+
import "./chunk-7F3LOHRB.js";
|
|
11
|
+
import "./chunk-QJDHRBXL.js";
|
|
12
|
+
import "./chunk-QDEP2QOA.js";
|
|
13
|
+
import "./chunk-NRCY3WBC.js";
|
|
14
|
+
import "./chunk-QFVIHBLD.js";
|
|
15
|
+
import "./chunk-GYCKRIRK.js";
|
|
16
|
+
import "./chunk-2JZJPVBH.js";
|
|
17
|
+
import "./chunk-RPWYTOLI.js";
|
|
18
|
+
import "./chunk-IV6SIKVH.js";
|
|
19
|
+
import "./chunk-S5UTBEV3.js";
|
|
20
|
+
import "./chunk-QBNEWEJC.js";
|
|
21
|
+
import "./chunk-IBSHQWIJ.js";
|
|
22
|
+
import "./chunk-B5RGPZDZ.js";
|
|
23
|
+
import "./chunk-XHX5D5VE.js";
|
|
24
|
+
import "./chunk-ZI3YTXSF.js";
|
|
25
|
+
import "./chunk-VSPSHBAC.js";
|
|
26
|
+
import "./chunk-HT6OFANN.js";
|
|
27
|
+
import "./chunk-AUNNJDVD.js";
|
|
28
|
+
import "./chunk-Y5E2WNWB.js";
|
|
29
|
+
import "./chunk-F6MLJ3V5.js";
|
|
30
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
31
|
+
export {
|
|
32
|
+
SCHEMA_DIALECT,
|
|
33
|
+
commandContract,
|
|
34
|
+
commandPathOf,
|
|
35
|
+
findCommand,
|
|
36
|
+
outputOf
|
|
37
|
+
};
|
|
@@ -4,47 +4,50 @@ import {
|
|
|
4
4
|
COMMAND_SERVER_CONCURRENT,
|
|
5
5
|
enterCommandServer,
|
|
6
6
|
serveCommands
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-4BJAQNJ5.js";
|
|
8
|
+
import "./chunk-I5PILOTU.js";
|
|
9
|
+
import "./chunk-OKTRB4ZQ.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureSqlite
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-F6CV4KUN.js";
|
|
13
|
+
import "./chunk-M327UNS6.js";
|
|
14
|
+
import "./chunk-C4ALE7CH.js";
|
|
15
|
+
import "./chunk-KY3JLXW2.js";
|
|
16
16
|
import {
|
|
17
17
|
commandServerRequest,
|
|
18
18
|
exitCodeSet,
|
|
19
19
|
inCommandServerRequest
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-7F3LOHRB.js";
|
|
21
|
+
import "./chunk-QJDHRBXL.js";
|
|
22
|
+
import "./chunk-QDEP2QOA.js";
|
|
23
|
+
import "./chunk-NRCY3WBC.js";
|
|
24
|
+
import "./chunk-QFVIHBLD.js";
|
|
25
|
+
import "./chunk-GYCKRIRK.js";
|
|
26
|
+
import "./chunk-2JZJPVBH.js";
|
|
27
|
+
import "./chunk-RPWYTOLI.js";
|
|
28
|
+
import "./chunk-IV6SIKVH.js";
|
|
28
29
|
import {
|
|
29
30
|
asOwnProcess
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-S5UTBEV3.js";
|
|
32
|
+
import "./chunk-QBNEWEJC.js";
|
|
33
|
+
import "./chunk-IBSHQWIJ.js";
|
|
34
|
+
import "./chunk-B5RGPZDZ.js";
|
|
35
|
+
import "./chunk-XHX5D5VE.js";
|
|
36
|
+
import "./chunk-ZI3YTXSF.js";
|
|
37
|
+
import "./chunk-VSPSHBAC.js";
|
|
38
|
+
import "./chunk-HT6OFANN.js";
|
|
36
39
|
import {
|
|
37
40
|
catchCrashes
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-AUNNJDVD.js";
|
|
39
42
|
import "./chunk-Y5E2WNWB.js";
|
|
40
43
|
import {
|
|
41
44
|
CliError
|
|
42
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-F6MLJ3V5.js";
|
|
43
46
|
import {
|
|
44
47
|
__name
|
|
45
48
|
} from "./chunk-ZVVMGPBJ.js";
|
|
46
49
|
|
|
47
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/cli/command-server-entry.js
|
|
48
51
|
import { PassThrough } from "node:stream";
|
|
49
52
|
var route = /* @__PURE__ */ __name((stream, sink) => {
|
|
50
53
|
const original = stream.write;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
SAMPLE_RATE,
|
|
5
|
+
decodeOgg
|
|
6
|
+
} from "./chunk-ZRQQOGAZ.js";
|
|
7
|
+
import "./chunk-HT6OFANN.js";
|
|
8
|
+
import "./chunk-AUNNJDVD.js";
|
|
9
|
+
import {
|
|
10
|
+
importFrom
|
|
11
|
+
} from "./chunk-Y5E2WNWB.js";
|
|
12
|
+
import {
|
|
13
|
+
CliError
|
|
14
|
+
} from "./chunk-F6MLJ3V5.js";
|
|
15
|
+
import {
|
|
16
|
+
__name
|
|
17
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
18
|
+
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/speech/decode.js
|
|
20
|
+
import { spawn } from "node:child_process";
|
|
21
|
+
import { mkdtemp, open, readFile, rm, writeFile } from "node:fs/promises";
|
|
22
|
+
import { createRequire } from "node:module";
|
|
23
|
+
import { tmpdir } from "node:os";
|
|
24
|
+
import { join } from "node:path";
|
|
25
|
+
import { pathToFileURL } from "node:url";
|
|
26
|
+
var LONGEST_AUDIO_SECONDS = 3600;
|
|
27
|
+
var FFMPEG_TIMEOUT_MS = 12e4;
|
|
28
|
+
var FFMPEG_FORMATS = "mov,mp4,m4a,3gp,3g2,mj2,aac,mp3,wav,amr,caf,aiff,flac,ogg,matroska,webm,asf";
|
|
29
|
+
var text = /* @__PURE__ */ __name((bytes, from, length) => String.fromCharCode(...bytes.subarray(from, from + length)), "text");
|
|
30
|
+
var contains = /* @__PURE__ */ __name((bytes, needle, within) => Buffer.from(bytes.buffer, bytes.byteOffset, Math.min(bytes.length, within)).includes(needle, 0, "latin1"), "contains");
|
|
31
|
+
var formatOf = /* @__PURE__ */ __name((bytes) => {
|
|
32
|
+
if (text(bytes, 0, 4) === "OggS") {
|
|
33
|
+
if (contains(bytes, "OpusHead", 128))
|
|
34
|
+
return "opus";
|
|
35
|
+
if (contains(bytes, "vorbis", 128))
|
|
36
|
+
return "vorbis";
|
|
37
|
+
return "other";
|
|
38
|
+
}
|
|
39
|
+
if (text(bytes, 0, 4) === "fLaC")
|
|
40
|
+
return "flac";
|
|
41
|
+
const frame = bytes[0] === 255 && ((bytes[1] ?? 0) & 224) === 224 && ((bytes[1] ?? 0) >> 1 & 3) !== 0;
|
|
42
|
+
if (text(bytes, 0, 3) === "ID3" || frame)
|
|
43
|
+
return "mp3";
|
|
44
|
+
return "other";
|
|
45
|
+
}, "formatOf");
|
|
46
|
+
var everyChannel = /* @__PURE__ */ __name((decoded) => {
|
|
47
|
+
if (!decoded.channelData[0] || decoded.samplesDecoded === 0)
|
|
48
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
49
|
+
return decoded.channelData.map((samples) => ({ samples, rate: decoded.sampleRate }));
|
|
50
|
+
}, "everyChannel");
|
|
51
|
+
var load = /* @__PURE__ */ __name((name) => importFrom(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href, pathToFileURL(createRequire(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href).resolve(name)).href), "load");
|
|
52
|
+
var decodeVorbis = /* @__PURE__ */ __name(async (bytes) => {
|
|
53
|
+
const { OggVorbisDecoder } = await load("@wasm-audio-decoders/ogg-vorbis");
|
|
54
|
+
const decoder = new OggVorbisDecoder();
|
|
55
|
+
await decoder.ready;
|
|
56
|
+
try {
|
|
57
|
+
return everyChannel(await decoder.decodeFile(bytes));
|
|
58
|
+
} finally {
|
|
59
|
+
decoder.free();
|
|
60
|
+
}
|
|
61
|
+
}, "decodeVorbis");
|
|
62
|
+
var decodeFlac = /* @__PURE__ */ __name(async (bytes) => {
|
|
63
|
+
const { FLACDecoder } = await load("@wasm-audio-decoders/flac");
|
|
64
|
+
const decoder = new FLACDecoder();
|
|
65
|
+
await decoder.ready;
|
|
66
|
+
try {
|
|
67
|
+
return everyChannel(await decoder.decodeFile(bytes));
|
|
68
|
+
} finally {
|
|
69
|
+
decoder.free();
|
|
70
|
+
}
|
|
71
|
+
}, "decodeFlac");
|
|
72
|
+
var decodeMp3 = /* @__PURE__ */ __name(async (bytes) => {
|
|
73
|
+
const { MPEGDecoder } = await load("mpg123-decoder");
|
|
74
|
+
const decoder = new MPEGDecoder();
|
|
75
|
+
await decoder.ready;
|
|
76
|
+
try {
|
|
77
|
+
return everyChannel(decoder.decode(bytes));
|
|
78
|
+
} finally {
|
|
79
|
+
decoder.free();
|
|
80
|
+
}
|
|
81
|
+
}, "decodeMp3");
|
|
82
|
+
var tooLongError = /* @__PURE__ */ __name(() => new CliError("validation_error", `the audio is longer than ${LONGEST_AUDIO_SECONDS / 60} minutes`), "tooLongError");
|
|
83
|
+
var FLOAT = 3;
|
|
84
|
+
var LONGEST_HEADER = 64 * 1024;
|
|
85
|
+
var EXTENSIBLE = 65534;
|
|
86
|
+
var wavStream = /* @__PURE__ */ __name((most) => {
|
|
87
|
+
let head = Buffer.alloc(0);
|
|
88
|
+
let channels = 0;
|
|
89
|
+
let rate = 0;
|
|
90
|
+
let rest = Buffer.alloc(0);
|
|
91
|
+
let length = 0;
|
|
92
|
+
let parts = [];
|
|
93
|
+
const header = /* @__PURE__ */ __name(() => {
|
|
94
|
+
if (head.length < 12)
|
|
95
|
+
return false;
|
|
96
|
+
if (head.toString("latin1", 0, 4) !== "RIFF" || head.toString("latin1", 8, 12) !== "WAVE")
|
|
97
|
+
throw new CliError("validation_error", "ffmpeg did not answer with WAV audio");
|
|
98
|
+
for (let at = 12; at + 8 <= head.length; ) {
|
|
99
|
+
const id = head.toString("latin1", at, at + 4);
|
|
100
|
+
const size = head.readUInt32LE(at + 4);
|
|
101
|
+
if (id === "data") {
|
|
102
|
+
rest = head.subarray(at + 8);
|
|
103
|
+
head = Buffer.alloc(0);
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
if (at + 8 + size > head.length)
|
|
107
|
+
return false;
|
|
108
|
+
if (id === "fmt ") {
|
|
109
|
+
const tag = head.readUInt16LE(at + 8);
|
|
110
|
+
channels = head.readUInt16LE(at + 10);
|
|
111
|
+
rate = head.readUInt32LE(at + 12);
|
|
112
|
+
if (tag !== FLOAT && tag !== EXTENSIBLE || head.readUInt16LE(at + 22) !== 32 || channels < 1)
|
|
113
|
+
throw new CliError("validation_error", "ffmpeg did not answer with 32-bit float samples");
|
|
114
|
+
parts = Array.from({ length: channels }, () => []);
|
|
115
|
+
}
|
|
116
|
+
at += 8 + size + size % 2;
|
|
117
|
+
}
|
|
118
|
+
return false;
|
|
119
|
+
}, "header");
|
|
120
|
+
return {
|
|
121
|
+
push: /* @__PURE__ */ __name((chunk) => {
|
|
122
|
+
if (channels === 0 || head.length > 0) {
|
|
123
|
+
head = Buffer.concat([head, chunk]);
|
|
124
|
+
if (head.length > LONGEST_HEADER)
|
|
125
|
+
throw new CliError("validation_error", "ffmpeg's WAV header never ended");
|
|
126
|
+
if (!header())
|
|
127
|
+
return true;
|
|
128
|
+
chunk = Buffer.alloc(0);
|
|
129
|
+
}
|
|
130
|
+
const bytes = rest.length ? Buffer.concat([rest, chunk]) : chunk;
|
|
131
|
+
const frame = channels * 4;
|
|
132
|
+
const frames = Math.floor(bytes.length / frame);
|
|
133
|
+
rest = Buffer.from(bytes.subarray(frames * frame));
|
|
134
|
+
if (frames === 0)
|
|
135
|
+
return length <= most;
|
|
136
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, frames * frame);
|
|
137
|
+
for (let channel = 0; channel < channels; channel++) {
|
|
138
|
+
const samples = new Float32Array(frames);
|
|
139
|
+
for (let index = 0; index < frames; index++)
|
|
140
|
+
samples[index] = view.getFloat32(index * frame + channel * 4, true);
|
|
141
|
+
parts[channel]?.push(samples);
|
|
142
|
+
}
|
|
143
|
+
length += frames;
|
|
144
|
+
return length <= most;
|
|
145
|
+
}, "push"),
|
|
146
|
+
end: /* @__PURE__ */ __name(() => {
|
|
147
|
+
if (channels === 0)
|
|
148
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
149
|
+
return parts.map((pieces, channel) => {
|
|
150
|
+
const samples = new Float32Array(length);
|
|
151
|
+
let at = 0;
|
|
152
|
+
for (const piece of pieces) {
|
|
153
|
+
samples.set(piece, at);
|
|
154
|
+
at += piece.length;
|
|
155
|
+
}
|
|
156
|
+
parts[channel] = [];
|
|
157
|
+
return { samples, rate };
|
|
158
|
+
});
|
|
159
|
+
}, "end")
|
|
160
|
+
};
|
|
161
|
+
}, "wavStream");
|
|
162
|
+
var runFfmpegFile = /* @__PURE__ */ __name((path) => new Promise((resolve, reject) => {
|
|
163
|
+
const child = spawn("ffmpeg", [
|
|
164
|
+
"-nostdin",
|
|
165
|
+
"-hide_banner",
|
|
166
|
+
"-loglevel",
|
|
167
|
+
"error",
|
|
168
|
+
"-protocol_whitelist",
|
|
169
|
+
"file",
|
|
170
|
+
"-format_whitelist",
|
|
171
|
+
FFMPEG_FORMATS,
|
|
172
|
+
"-i",
|
|
173
|
+
path,
|
|
174
|
+
"-vn",
|
|
175
|
+
"-af",
|
|
176
|
+
"aformat=channel_layouts=mono|stereo",
|
|
177
|
+
"-ar",
|
|
178
|
+
String(SAMPLE_RATE),
|
|
179
|
+
"-c:a",
|
|
180
|
+
"pcm_f32le",
|
|
181
|
+
"-bitexact",
|
|
182
|
+
"-f",
|
|
183
|
+
"wav",
|
|
184
|
+
"pipe:1"
|
|
185
|
+
], { stdio: ["ignore", "pipe", "pipe"], timeout: FFMPEG_TIMEOUT_MS });
|
|
186
|
+
const wav = wavStream(LONGEST_AUDIO_SECONDS * SAMPLE_RATE);
|
|
187
|
+
let long = false;
|
|
188
|
+
let broken;
|
|
189
|
+
let errors = "";
|
|
190
|
+
child.stdout.on("data", (chunk) => {
|
|
191
|
+
if (long || broken)
|
|
192
|
+
return;
|
|
193
|
+
try {
|
|
194
|
+
long = !wav.push(chunk);
|
|
195
|
+
} catch (error) {
|
|
196
|
+
broken = error;
|
|
197
|
+
}
|
|
198
|
+
if (long || broken)
|
|
199
|
+
child.kill();
|
|
200
|
+
});
|
|
201
|
+
child.stderr.on("data", (chunk) => {
|
|
202
|
+
errors = (errors + chunk.toString()).slice(-500);
|
|
203
|
+
});
|
|
204
|
+
child.on("error", (error) => reject(error.code === "ENOENT" ? new CliError("validation_error", "only ffmpeg reads this audio format, and ffmpeg is not installed") : error));
|
|
205
|
+
child.on("close", (code) => {
|
|
206
|
+
if (long)
|
|
207
|
+
return reject(tooLongError());
|
|
208
|
+
if (broken)
|
|
209
|
+
return reject(broken);
|
|
210
|
+
if (code !== 0)
|
|
211
|
+
return reject(new CliError("validation_error", `ffmpeg could not read the audio: ${errors.trim() || code}`));
|
|
212
|
+
try {
|
|
213
|
+
resolve(wav.end());
|
|
214
|
+
} catch (error) {
|
|
215
|
+
reject(error);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}), "runFfmpegFile");
|
|
219
|
+
var runFfmpeg = /* @__PURE__ */ __name(async (bytes) => {
|
|
220
|
+
const directory = await mkdtemp(join(tmpdir(), "wirecat-audio-"));
|
|
221
|
+
try {
|
|
222
|
+
const input = join(directory, "audio");
|
|
223
|
+
await writeFile(input, bytes, { mode: 384 });
|
|
224
|
+
return await runFfmpegFile(input);
|
|
225
|
+
} finally {
|
|
226
|
+
await rm(directory, { recursive: true, force: true });
|
|
227
|
+
}
|
|
228
|
+
}, "runFfmpeg");
|
|
229
|
+
var BUNDLED = {
|
|
230
|
+
opus: decodeOgg,
|
|
231
|
+
vorbis: decodeVorbis,
|
|
232
|
+
flac: decodeFlac,
|
|
233
|
+
mp3: decodeMp3
|
|
234
|
+
};
|
|
235
|
+
var tooLong = /* @__PURE__ */ __name((pcm) => pcm.samples.length / pcm.rate > LONGEST_AUDIO_SECONDS, "tooLong");
|
|
236
|
+
var fromFfmpeg = /* @__PURE__ */ __name((answer) => Array.isArray(answer) ? { channels: answer, mixed: false } : { channels: [answer], mixed: true }, "fromFfmpeg");
|
|
237
|
+
var decodeChannels = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => {
|
|
238
|
+
const format = formatOf(bytes);
|
|
239
|
+
const decoded = format === "other" ? fromFfmpeg(await ffmpeg(bytes)) : await BUNDLED[format](bytes).then((channels) => ({ channels, mixed: false }), (error) => ffmpeg(bytes).then(fromFfmpeg, () => {
|
|
240
|
+
throw error;
|
|
241
|
+
}));
|
|
242
|
+
if (decoded.channels.length === 0)
|
|
243
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
244
|
+
if (decoded.channels.some(tooLong))
|
|
245
|
+
throw tooLongError();
|
|
246
|
+
return decoded;
|
|
247
|
+
}, "decodeChannels");
|
|
248
|
+
var decodeChannelsFile = /* @__PURE__ */ __name(async (path, { maxBytes = 64 * 1024 * 1024, ffmpegFile = runFfmpegFile } = {}) => {
|
|
249
|
+
const file = await open(path, "r");
|
|
250
|
+
let start;
|
|
251
|
+
let size;
|
|
252
|
+
try {
|
|
253
|
+
size = (await file.stat()).size;
|
|
254
|
+
const head = Buffer.alloc(Math.min(size, 128));
|
|
255
|
+
await file.read(head, 0, head.length, 0);
|
|
256
|
+
start = head;
|
|
257
|
+
} finally {
|
|
258
|
+
await file.close();
|
|
259
|
+
}
|
|
260
|
+
if (formatOf(start) === "other") {
|
|
261
|
+
const channels = await ffmpegFile(path);
|
|
262
|
+
if (channels.some(tooLong))
|
|
263
|
+
throw tooLongError();
|
|
264
|
+
return { channels, mixed: false };
|
|
265
|
+
}
|
|
266
|
+
if (size > maxBytes)
|
|
267
|
+
throw new CliError("validation_error", `the audio file is larger than ${Math.round(maxBytes / 1024 / 1024)} MB`, {
|
|
268
|
+
reason: "file.too-large"
|
|
269
|
+
});
|
|
270
|
+
return decodeChannels(new Uint8Array(await readFile(path)), () => ffmpegFile(path));
|
|
271
|
+
}, "decodeChannelsFile");
|
|
272
|
+
var mixDown = /* @__PURE__ */ __name((channels) => {
|
|
273
|
+
const [first] = channels;
|
|
274
|
+
if (!first)
|
|
275
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
276
|
+
if (channels.length === 1)
|
|
277
|
+
return first;
|
|
278
|
+
const length = channels.reduce((longest, { samples: samples2 }) => Math.max(longest, samples2.length), 0);
|
|
279
|
+
const samples = new Float32Array(length);
|
|
280
|
+
for (const channel of channels)
|
|
281
|
+
for (let index = 0; index < channel.samples.length; index++)
|
|
282
|
+
samples[index] = (samples[index] ?? 0) + (channel.samples[index] ?? 0) / channels.length;
|
|
283
|
+
return { samples, rate: first.rate };
|
|
284
|
+
}, "mixDown");
|
|
285
|
+
var decodeAudio = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => mixDown((await decodeChannels(bytes, ffmpeg)).channels), "decodeAudio");
|
|
286
|
+
export {
|
|
287
|
+
LONGEST_AUDIO_SECONDS,
|
|
288
|
+
decodeAudio,
|
|
289
|
+
decodeChannels,
|
|
290
|
+
decodeChannelsFile,
|
|
291
|
+
formatOf,
|
|
292
|
+
mixDown,
|
|
293
|
+
runFfmpeg,
|
|
294
|
+
runFfmpegFile,
|
|
295
|
+
wavStream
|
|
296
|
+
};
|
|
@@ -14,22 +14,22 @@ import {
|
|
|
14
14
|
parseDescribe,
|
|
15
15
|
shimFiles,
|
|
16
16
|
writeShim
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CLG2ISQH.js";
|
|
18
18
|
import "./chunk-Y5E2WNWB.js";
|
|
19
19
|
import {
|
|
20
20
|
CliError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-F6MLJ3V5.js";
|
|
22
22
|
import {
|
|
23
23
|
__name,
|
|
24
24
|
__toESM
|
|
25
25
|
} from "./chunk-ZVVMGPBJ.js";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
28
28
|
var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
|
|
29
29
|
import { randomUUID } from "node:crypto";
|
|
30
30
|
import { constants } from "node:os";
|
|
31
31
|
|
|
32
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/path.js
|
|
33
33
|
import { readdirSync, statSync } from "node:fs";
|
|
34
34
|
import { join } from "node:path";
|
|
35
35
|
var variable = /* @__PURE__ */ __name((env, name, platform) => platform === "win32" ? Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1] : env[name], "variable");
|
|
@@ -101,7 +101,7 @@ var findTools = /* @__PURE__ */ __name((search) => {
|
|
|
101
101
|
}, "findTools");
|
|
102
102
|
var isBuiltIn = /* @__PURE__ */ __name((name) => name === "wcat" || BUILT_IN_COMMANDS.includes(name), "isBuiltIn");
|
|
103
103
|
|
|
104
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
104
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/probe.js
|
|
105
105
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
106
106
|
import { readFileSync } from "node:fs";
|
|
107
107
|
var probeDescribe = /* @__PURE__ */ __name((path, { env, timeoutMs }) => new Promise((resolve) => {
|
|
@@ -149,7 +149,7 @@ var baseVersion = /* @__PURE__ */ __name(() => {
|
|
|
149
149
|
}
|
|
150
150
|
}, "baseVersion");
|
|
151
151
|
|
|
152
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
152
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shortcuts.js
|
|
153
153
|
import { closeSync, openSync, readSync, realpathSync, rmSync } from "node:fs";
|
|
154
154
|
import { basename, dirname } from "node:path";
|
|
155
155
|
var WIRECAT_PACKAGE = /node_modules[\\/]+@wirecat[\\/]/;
|
|
@@ -241,7 +241,7 @@ var removeShortcuts = /* @__PURE__ */ __name((search, names) => listShortcuts(se
|
|
|
241
241
|
return { ...statusOf(shortcut.name, shortcut.program, search), changed: true };
|
|
242
242
|
}), "removeShortcuts");
|
|
243
243
|
|
|
244
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
244
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
245
245
|
var DEFAULT_DESCRIBE_TIMEOUT_MS = 2e3;
|
|
246
246
|
var listTools = /* @__PURE__ */ __name(async (context) => {
|
|
247
247
|
const installed = installedPrograms(context);
|
|
@@ -338,7 +338,7 @@ var runTool = /* @__PURE__ */ __name((path, args, context) => new Promise((resol
|
|
|
338
338
|
});
|
|
339
339
|
}), "runTool");
|
|
340
340
|
var fail = /* @__PURE__ */ __name(async (error, json, context) => {
|
|
341
|
-
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-
|
|
341
|
+
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-GMUQKQ5K.js");
|
|
342
342
|
const object = errorObjectOf(error);
|
|
343
343
|
context.stderr.write(`${renderError(object, { cli: "wcat", interactive: !json })}
|
|
344
344
|
`);
|
|
@@ -42399,7 +42399,7 @@ function install11(registers) {
|
|
|
42399
42399
|
}
|
|
42400
42400
|
__name(install11, "install");
|
|
42401
42401
|
|
|
42402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/charts/echarts-option.js
|
|
42403
42403
|
var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
42404
42404
|
animation: false,
|
|
42405
42405
|
backgroundColor: "#111827",
|
|
@@ -42447,7 +42447,7 @@ var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
|
42447
42447
|
} : {}
|
|
42448
42448
|
}), "echartsOption");
|
|
42449
42449
|
|
|
42450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/charts/echarts.js
|
|
42451
42451
|
use([install2, install, install6, install5, install10, install7, install11]);
|
|
42452
42452
|
var echartsRenderer = {
|
|
42453
42453
|
render: /* @__PURE__ */ __name(async (chart, size) => {
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
truncated,
|
|
14
14
|
unit,
|
|
15
15
|
warmEmbedders
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-RZPMFVWM.js";
|
|
17
|
+
import "./chunk-IV6SIKVH.js";
|
|
18
|
+
import "./chunk-VSPSHBAC.js";
|
|
19
|
+
import "./chunk-HT6OFANN.js";
|
|
20
|
+
import "./chunk-AUNNJDVD.js";
|
|
21
21
|
import "./chunk-Y5E2WNWB.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-F6MLJ3V5.js";
|
|
23
23
|
import "./chunk-ZVVMGPBJ.js";
|
|
24
24
|
export {
|
|
25
25
|
WARM_IDLE_MS,
|
|
@@ -4,26 +4,26 @@ import {
|
|
|
4
4
|
openSession,
|
|
5
5
|
truncated,
|
|
6
6
|
unit
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-RZPMFVWM.js";
|
|
8
|
+
import "./chunk-IV6SIKVH.js";
|
|
9
|
+
import "./chunk-VSPSHBAC.js";
|
|
10
|
+
import "./chunk-HT6OFANN.js";
|
|
11
|
+
import "./chunk-AUNNJDVD.js";
|
|
12
12
|
import {
|
|
13
13
|
importFrom
|
|
14
14
|
} from "./chunk-Y5E2WNWB.js";
|
|
15
15
|
import {
|
|
16
16
|
CliError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-F6MLJ3V5.js";
|
|
18
18
|
import {
|
|
19
19
|
__name
|
|
20
20
|
} from "./chunk-ZVVMGPBJ.js";
|
|
21
21
|
|
|
22
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
23
23
|
import { readFileSync } from "node:fs";
|
|
24
24
|
import { join } from "node:path";
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/images/picture/preprocess.js
|
|
27
27
|
var SIZE = 224;
|
|
28
28
|
var MEAN = [0.48145466, 0.4578275, 0.40821073];
|
|
29
29
|
var STD = [0.26862954, 0.26130258, 0.27577711];
|
|
@@ -62,7 +62,7 @@ var preprocess = /* @__PURE__ */ __name(async (bytes, load = importCanvas) => {
|
|
|
62
62
|
return pixels;
|
|
63
63
|
}, "preprocess");
|
|
64
64
|
|
|
65
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
66
66
|
var openPictureEmbedder = /* @__PURE__ */ __name(async (model, directory, { threads = 4, canvas } = {}) => {
|
|
67
67
|
const { Tokenizer } = await importFrom(new URL("images/picture/embedder.js", import.meta.resolve("@wirecat/cli-core")).href, "@huggingface/tokenizers");
|
|
68
68
|
const path = /* @__PURE__ */ __name((name) => join(directory, model.id, name), "path");
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
firstRunAt,
|
|
5
5
|
openBrowser,
|
|
6
6
|
startCli
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-MVFSWKTM.js";
|
|
8
|
+
import "./chunk-OKTRB4ZQ.js";
|
|
9
|
+
import "./chunk-F6CV4KUN.js";
|
|
10
|
+
import "./chunk-M327UNS6.js";
|
|
11
|
+
import "./chunk-C4ALE7CH.js";
|
|
12
|
+
import "./chunk-NRCY3WBC.js";
|
|
13
|
+
import "./chunk-HT6OFANN.js";
|
|
14
|
+
import "./chunk-AUNNJDVD.js";
|
|
15
15
|
import "./chunk-Y5E2WNWB.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-F6MLJ3V5.js";
|
|
17
17
|
import "./chunk-ZVVMGPBJ.js";
|
|
18
18
|
export {
|
|
19
19
|
firstRunAt,
|