@poe-platform/safe-bash 0.1.756 → 0.1.758
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/image-ast/index.browser.js +76 -23
- package/dist/image-ast/index.js +76 -23
- package/dist/pdf-ast/ast.d.ts +3 -0
- package/dist/pdf-ast/index.js +88 -36
- package/dist/safe-bash/chunks/{chunk-LESPJ3OG.js → chunk-WNWIBBJZ.js} +15 -2
- package/dist/safe-bash/command-chunks/{chunk-S4J6MSLY.js → chunk-444OTXM7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-F3J5ZLKF.js → chunk-522TDVLS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VFS2MDAB.js → chunk-6YLD37NH.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-YI3GKJ7Q.js → chunk-766IWMTB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-6AIOGLZO.js → chunk-CE6Z2ULX.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-KSH2F6RG.js → chunk-CUFCNL6G.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5VSGEE6J.js → chunk-F4IQCXZG.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-F5MORDSU.js → chunk-FDNCPZQS.js} +32 -1
- package/dist/safe-bash/command-chunks/{chunk-SG3ZDZCX.js → chunk-FLMLM7Y4.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-DVZCHNB5.js → chunk-J2NPH7DO.js} +11 -7
- package/dist/safe-bash/command-chunks/{chunk-CT3FB722.js → chunk-J7UMKBRK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QQOAK7JQ.js → chunk-KKJCKPTA.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7KS6PX4U.js → chunk-KSIGF4AG.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-KBBI4CSU.js → chunk-L2C5TIII.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4HQ7WYSI.js → chunk-MED2BOOW.js} +30 -5
- package/dist/safe-bash/command-chunks/{chunk-JRNLDPLI.js → chunk-OZSWW23M.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-DKQ5REXF.js → chunk-QDPRSPHQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WOPU2VWF.js → chunk-RID3B5RE.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-H2FQA4OU.js → chunk-TCAGGM44.js} +72 -19
- package/dist/safe-bash/command-chunks/{chunk-REYTQLLB.js → chunk-TT2DMDBY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-UGX6MXDD.js → chunk-UIIT4ULR.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-A6NFLWZI.js → chunk-WKPOGTZY.js} +22 -6
- package/dist/safe-bash/command-chunks/{chunk-WI35236J.js → chunk-XYCWDGOG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3DOHQQJR.js → chunk-Y64PA6IA.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-4F6PG2OT.js → chunk-YJWWRCIG.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-6Z7OS3TZ.js → chunk-ZP5KDHB4.js} +7 -7
- package/dist/safe-bash/commands/pandoc/index.d.ts +1 -1
- package/dist/safe-bash/commands/pandoc/index.js +5 -3
- package/dist/safe-bash/commands/python/index.browser.js +1 -1
- package/dist/safe-bash/commands/python/index.js +6 -0
- package/dist/safe-bash/commands/python/jspi.js +11 -2
- package/dist/safe-bash/core.browser.js +6 -4
- package/dist/safe-bash-command-column/column.js +3 -3
- package/dist/safe-bash-command-column/index.js +3 -3
- package/dist/safe-bash-command-column/layout.js +2 -2
- package/dist/safe-bash-command-csvkit/index.js +8 -8
- package/dist/safe-bash-command-factor/command.js +2 -2
- package/dist/safe-bash-command-factor/index.js +2 -2
- package/dist/safe-bash-command-ffmpeg/index.js +5923 -5893
- package/dist/safe-bash-command-imagemagick/index.js +2 -2
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/index.js +3 -3
- package/dist/safe-bash-command-pdfimages/index.js +72 -19
- package/dist/safe-bash-command-pdfinfo/index.js +88 -36
- package/dist/safe-bash-command-pdftk/index.js +72 -19
- package/dist/safe-bash-command-pdftoppm/index.js +88 -36
- package/dist/safe-bash-command-pdftotext/index.js +72 -19
- package/dist/safe-bash-command-qpdf/index.js +72 -19
- package/dist/safe-bash-command-sips/index.js +2 -2
- package/dist/safe-bash-command-soffice/index.js +17 -17
- package/dist/safe-bash-command-ssconvert/command-bindings.d.ts +18 -0
- package/dist/safe-bash-command-ssconvert/command.d.ts +5 -14
- package/dist/safe-bash-command-ssconvert/commands.d.ts +6 -0
- package/dist/safe-bash-command-ssconvert/commands.js +871 -0
- package/dist/safe-bash-command-ssconvert/core.js +8 -8
- package/dist/safe-bash-command-ssconvert/formats/csv.js +9 -9
- package/dist/safe-bash-command-ssconvert/formats/ods.js +8 -8
- package/dist/safe-bash-command-ssconvert/formats/spreadsheetml.js +1 -1
- package/dist/safe-bash-command-ssconvert/formats/xls.js +9 -8
- package/dist/safe-bash-command-ssconvert/formats/xlsx.js +8 -8
- package/dist/safe-bash-command-ssconvert/index.js +376 -236
- package/dist/safe-bash-command-wkhtmltopdf/index.js +72 -19
- package/dist/safe-bash-command-yq/index.js +4 -4
- package/dist/safe-bash-compression-engine/files.js +2 -2
- package/dist/safe-bash-compression-engine/operand.js +4 -4
- package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
- package/dist/safe-bash-contracts/filesystem-output.js +1 -1
- package/dist/safe-bash-markdown-engine/commonmark-blocks.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-inlines.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-syntax.js +2 -2
- package/dist/safe-bash-markdown-engine/gfm-syntax.js +3 -3
- package/dist/safe-bash-markdown-engine/index.js +7 -7
- package/dist/safe-bash-mcp/index.js +4 -4
- package/dist/safe-bash-query-engine/index.js +5 -5
- package/dist/safe-bash-query-engine/interpreter.js +4 -4
- package/dist/safe-bash-query-engine/query-core.js +5 -5
- package/dist/spreadsheet-engine/formulas/ast.d.ts +13 -0
- package/dist/spreadsheet-engine/formulas/conventions.js +1 -1
- package/dist/spreadsheet-engine/formulas/dependencies.js +2 -2
- package/dist/spreadsheet-engine/formulas/evaluator.js +2 -2
- package/dist/spreadsheet-engine/formulas/named-expressions.d.ts +2 -2
- package/dist/spreadsheet-engine/formulas/named-expressions.js +31 -5
- package/dist/spreadsheet-engine/formulas/parser.js +34 -0
- package/dist/spreadsheet-engine/formulas/rewriting.js +19 -1
- package/dist/spreadsheet-engine/formulas/serialization.js +6 -0
- package/dist/spreadsheet-format-xls/biff-write-formulas.js +2 -0
- package/dist/xlsx-ast/formula-semantics.js +2 -0
- package/package.json +6 -2
- package/third-party/pdf-ast/THIRD_PARTY_NOTICES.md +16 -0
- package/dist/safe-bash/chunks/browser-ECQX6GMK.js +0 -6766
- package/dist/safe-bash/chunks/bz2-4OP3OWW3.js +0 -8
- package/dist/safe-bash/chunks/chunk-22XPAAOI.js +0 -173
- package/dist/safe-bash/chunks/chunk-44WUNUPV.js +0 -649
- package/dist/safe-bash/chunks/chunk-4E3SGG37.js +0 -876
- package/dist/safe-bash/chunks/chunk-4QTSSQKP.js +0 -898
- package/dist/safe-bash/chunks/chunk-5UVGPVXP.js +0 -410
- package/dist/safe-bash/chunks/chunk-64OE6Q6X.js +0 -3487
- package/dist/safe-bash/chunks/chunk-6IIFUPN2.js +0 -1526
- package/dist/safe-bash/chunks/chunk-BENDLTQD.js +0 -7065
- package/dist/safe-bash/chunks/chunk-BMO5LWEX.js +0 -534
- package/dist/safe-bash/chunks/chunk-BPMCPTNP.js +0 -1920
- package/dist/safe-bash/chunks/chunk-BRJTAWP5.js +0 -2955
- package/dist/safe-bash/chunks/chunk-C3GEIN7Q.js +0 -20054
- package/dist/safe-bash/chunks/chunk-CBVANNKK.js +0 -174814
- package/dist/safe-bash/chunks/chunk-CEWCRI6H.js +0 -2813
- package/dist/safe-bash/chunks/chunk-CGL53DQQ.js +0 -37
- package/dist/safe-bash/chunks/chunk-CTYJJD4O.js +0 -869
- package/dist/safe-bash/chunks/chunk-CWSS4MQA.js +0 -7
- package/dist/safe-bash/chunks/chunk-DLIGMTCP.js +0 -3266
- package/dist/safe-bash/chunks/chunk-EMAJ7WUW.js +0 -1031
- package/dist/safe-bash/chunks/chunk-FDKIZ2IJ.js +0 -1950
- package/dist/safe-bash/chunks/chunk-FZWJ2A7V.js +0 -3093
- package/dist/safe-bash/chunks/chunk-G2VCIF2J.js +0 -22
- package/dist/safe-bash/chunks/chunk-GVKBUQDX.js +0 -2649
- package/dist/safe-bash/chunks/chunk-IO2OGW3E.js +0 -28051
- package/dist/safe-bash/chunks/chunk-ISCZG7WA.js +0 -2648
- package/dist/safe-bash/chunks/chunk-JCN3FXLP.js +0 -38983
- package/dist/safe-bash/chunks/chunk-KJHDD4A2.js +0 -759
- package/dist/safe-bash/chunks/chunk-LB6HVRXS.js +0 -857
- package/dist/safe-bash/chunks/chunk-LLWAJOZH.js +0 -15
- package/dist/safe-bash/chunks/chunk-LMUKYZIJ.js +0 -708
- package/dist/safe-bash/chunks/chunk-M5SCNKIK.js +0 -2012
- package/dist/safe-bash/chunks/chunk-MJPFHANT.js +0 -3350
- package/dist/safe-bash/chunks/chunk-MZQW2DOL.js +0 -82
- package/dist/safe-bash/chunks/chunk-NB2V7EOY.js +0 -1348
- package/dist/safe-bash/chunks/chunk-NJVGOIYN.js +0 -17
- package/dist/safe-bash/chunks/chunk-OLNZHDIQ.js +0 -5141
- package/dist/safe-bash/chunks/chunk-OSUXMC43.js +0 -2317
- package/dist/safe-bash/chunks/chunk-OUUVROTM.js +0 -38
- package/dist/safe-bash/chunks/chunk-PA6GYKBQ.js +0 -151
- package/dist/safe-bash/chunks/chunk-PEFHZ226.js +0 -6957
- package/dist/safe-bash/chunks/chunk-QBB5P5KW.js +0 -4839
- package/dist/safe-bash/chunks/chunk-RSAWYAEH.js +0 -973
- package/dist/safe-bash/chunks/chunk-UWLYRWT4.js +0 -739
- package/dist/safe-bash/chunks/chunk-V463NBQH.js +0 -13
- package/dist/safe-bash/chunks/chunk-WPUALYUS.js +0 -843
- package/dist/safe-bash/chunks/chunk-XHKFSRGU.js +0 -5747
- package/dist/safe-bash/chunks/chunk-XHRCLZ3N.js +0 -13391
- package/dist/safe-bash/chunks/chunk-XPF5XHLY.js +0 -15
- package/dist/safe-bash/chunks/chunk-ZBFOWARG.js +0 -305
- package/dist/safe-bash/chunks/chunk-ZG7GWQ5P.js +0 -1859
- package/dist/safe-bash/chunks/model-store-EIY3ZQLZ.js +0 -10
- package/dist/safe-bash/chunks/pdf-renderer-CMF3CSVU.js +0 -22
- package/dist/safe-bash/chunks/pptx-ZL6L7KP2-O425BFIU.js +0 -30658
- package/dist/safe-bash/chunks/src-HHEPGR7U.js +0 -18969
- package/dist/safe-bash/chunks/src-MXIKQCIC.js +0 -187
- package/dist/safe-bash/chunks/usage-6TGVA2OM.js +0 -35
- package/dist/safe-bash/chunks/xz-EGQGQUEI.js +0 -8
- package/dist/safe-bash/chunks/xz-K2E2WLM6.js +0 -9
- package/dist/safe-bash/chunks/zstd-6JBLP5EF.js +0 -8
- package/dist/safe-bash/git_rust-C3QYOAZL.wasm +0 -0
- package/dist/safe-bash/command-chunks/{chunk-OQVIJMBY.js → chunk-7HINP7ZK.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-XAYEDOV5.js → chunk-CG4JSOK2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-YIK4ZYQ4.js → chunk-DC52GWRK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-TOTZFBDT.js → chunk-TKACIO4X.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-VTWKS4RM.js → chunk-WF2LSKMI.js} +3 -3
package/dist/pdf-ast/index.js
CHANGED
|
@@ -25603,7 +25603,7 @@ var ParsedCosDocument = class {
|
|
|
25603
25603
|
return void 0;
|
|
25604
25604
|
}
|
|
25605
25605
|
};
|
|
25606
|
-
function parseNodeFromLexer(lexer, bytes, maxDepth,
|
|
25606
|
+
function parseNodeFromLexer(lexer, bytes, maxDepth, repair = false) {
|
|
25607
25607
|
const stack = [];
|
|
25608
25608
|
while (true) {
|
|
25609
25609
|
const tok = lexer.nextToken();
|
|
@@ -25612,7 +25612,7 @@ function parseNodeFromLexer(lexer, bytes, maxDepth, recoverEmptyObject = false)
|
|
|
25612
25612
|
if (!parent) return void 0;
|
|
25613
25613
|
throw new PdfError("E_PARSE", parent.kind === "array" ? "Unterminated PDF array" : "Unterminated PDF dictionary");
|
|
25614
25614
|
}
|
|
25615
|
-
if (!parent &&
|
|
25615
|
+
if (!parent && repair && tok.kind === "keyword" && tok.value === "endobj") {
|
|
25616
25616
|
return { kind: "null", span: tok.span };
|
|
25617
25617
|
}
|
|
25618
25618
|
let node;
|
|
@@ -25627,6 +25627,7 @@ function parseNodeFromLexer(lexer, bytes, maxDepth, recoverEmptyObject = false)
|
|
|
25627
25627
|
parent.key = { kind: "name", rawBytes: tok.rawBytes, decoded: tok.decoded, span: tok.span };
|
|
25628
25628
|
continue;
|
|
25629
25629
|
} else {
|
|
25630
|
+
if (repair) continue;
|
|
25630
25631
|
throw new PdfError("E_PARSE", `Expected dictionary key /Name, got ${tok.kind}`);
|
|
25631
25632
|
}
|
|
25632
25633
|
} else {
|
|
@@ -25795,7 +25796,7 @@ function parseHeaderVersion(bytes) {
|
|
|
25795
25796
|
}
|
|
25796
25797
|
return head.slice(idx + 5, idx + 8);
|
|
25797
25798
|
}
|
|
25798
|
-
function parseObjectAtOffset(bytes, offset, maxRecursionDepth,
|
|
25799
|
+
function parseObjectAtOffset(bytes, offset, maxRecursionDepth, repair = false) {
|
|
25799
25800
|
const lexer = new CosByteLexer(bytes, offset);
|
|
25800
25801
|
const objNumTok = lexer.nextToken();
|
|
25801
25802
|
const genNumTok = lexer.nextToken();
|
|
@@ -25803,7 +25804,7 @@ function parseObjectAtOffset(bytes, offset, maxRecursionDepth, recoverEmptyObjec
|
|
|
25803
25804
|
if (objNumTok?.kind !== "number" || genNumTok?.kind !== "number" || objKwTok?.kind !== "keyword" || objKwTok.value !== "obj") {
|
|
25804
25805
|
throw new PdfError("E_PARSE", `Malformed indirect object header at byte offset ${offset}`);
|
|
25805
25806
|
}
|
|
25806
|
-
const value = parseNodeFromLexer(lexer, bytes, maxRecursionDepth,
|
|
25807
|
+
const value = parseNodeFromLexer(lexer, bytes, maxRecursionDepth, repair);
|
|
25807
25808
|
if (!value) {
|
|
25808
25809
|
throw new PdfError("E_PARSE", `Empty indirect object ${objNumTok.value} at offset ${offset}`);
|
|
25809
25810
|
}
|
|
@@ -25992,7 +25993,7 @@ function repairScanCosDocument(bytes, maxObjects, maxRecursionDepth) {
|
|
|
25992
25993
|
try {
|
|
25993
25994
|
const token = lexer.nextToken();
|
|
25994
25995
|
if (token?.kind === "keyword" && token.value === "trailer") {
|
|
25995
|
-
const trailer = parseNodeFromLexer(lexer, bytes, maxRecursionDepth);
|
|
25996
|
+
const trailer = parseNodeFromLexer(lexer, bytes, maxRecursionDepth, true);
|
|
25996
25997
|
if (trailer?.kind === "dict") trailers.push(trailer);
|
|
25997
25998
|
pos = lexer.offset;
|
|
25998
25999
|
continue;
|
|
@@ -26048,7 +26049,7 @@ function unpackRecoveredObjects(objects, maxObjects, maxDecompressedBytes, maxRe
|
|
|
26048
26049
|
const t = dictGet(obj.value.dict, "Type");
|
|
26049
26050
|
if (t?.kind === "name" && t.decoded === "ObjStm") {
|
|
26050
26051
|
try {
|
|
26051
|
-
for (const [unpackedNum, unpackedVal] of unpackObjectStream(obj.value, maxDecompressedBytes, maxRecursionDepth).entries()) {
|
|
26052
|
+
for (const [unpackedNum, unpackedVal] of unpackObjectStream(obj.value, maxDecompressedBytes, maxRecursionDepth, true).entries()) {
|
|
26052
26053
|
if (!objects.has(unpackedNum)) {
|
|
26053
26054
|
objects.set(unpackedNum, {
|
|
26054
26055
|
objectNumber: unpackedNum,
|
|
@@ -26084,7 +26085,7 @@ function recoveredReferences(objects) {
|
|
|
26084
26085
|
}
|
|
26085
26086
|
return { ...rootRef ? { rootRef } : {}, ...infoRef ? { infoRef } : {} };
|
|
26086
26087
|
}
|
|
26087
|
-
function unpackObjectStream(streamObj, maxDecompressedBytes, maxRecursionDepth) {
|
|
26088
|
+
function unpackObjectStream(streamObj, maxDecompressedBytes, maxRecursionDepth, repair = false) {
|
|
26088
26089
|
const nNode = dictGet(streamObj.dict, "N");
|
|
26089
26090
|
const firstNode = dictGet(streamObj.dict, "First");
|
|
26090
26091
|
if (nNode?.kind !== "number" || firstNode?.kind !== "number") {
|
|
@@ -26104,7 +26105,7 @@ function unpackObjectStream(streamObj, maxDecompressedBytes, maxRecursionDepth)
|
|
|
26104
26105
|
for (const pair of pairs) {
|
|
26105
26106
|
try {
|
|
26106
26107
|
const valLexer = new CosByteLexer(decoded, firstNode.value + pair.relativeOffset);
|
|
26107
|
-
const node = parseNodeFromLexer(valLexer, decoded, maxRecursionDepth);
|
|
26108
|
+
const node = parseNodeFromLexer(valLexer, decoded, maxRecursionDepth, repair);
|
|
26108
26109
|
if (node) {
|
|
26109
26110
|
result.set(pair.objectNumber, node);
|
|
26110
26111
|
}
|
|
@@ -26287,7 +26288,7 @@ function parseCosDocument(bytes, options = {}) {
|
|
|
26287
26288
|
if (!unpacked) {
|
|
26288
26289
|
const stmObj = objects.get(entry.objectStreamNumber)?.value;
|
|
26289
26290
|
if (stmObj?.kind === "stream") {
|
|
26290
|
-
unpacked = unpackObjectStream(stmObj, maxDecompressedBytes, maxRecursionDepth);
|
|
26291
|
+
unpacked = unpackObjectStream(stmObj, maxDecompressedBytes, maxRecursionDepth, recovery === "repair");
|
|
26291
26292
|
objStmCache.set(entry.objectStreamNumber, unpacked);
|
|
26292
26293
|
}
|
|
26293
26294
|
}
|
|
@@ -35143,7 +35144,11 @@ function resolvePageFonts(doc, resourcesDict) {
|
|
|
35143
35144
|
let cmap;
|
|
35144
35145
|
const toUniNode = doc.resolve(dictGet(fObj, "ToUnicode"));
|
|
35145
35146
|
if (toUniNode?.kind === "stream") {
|
|
35146
|
-
|
|
35147
|
+
try {
|
|
35148
|
+
cmap = parseToUnicodeCMap(doc.decodeStream(toUniNode));
|
|
35149
|
+
} catch (error) {
|
|
35150
|
+
if (error instanceof PdfError && error.code === "E_LIMIT") throw error;
|
|
35151
|
+
}
|
|
35147
35152
|
}
|
|
35148
35153
|
const encNode = doc.resolve(dictGet(fObj, "Encoding"));
|
|
35149
35154
|
if (encNode?.kind === "dict") {
|
|
@@ -36267,8 +36272,12 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
36267
36272
|
const images = [];
|
|
36268
36273
|
const operations = [];
|
|
36269
36274
|
const emit = (operation) => {
|
|
36270
|
-
const clipPaths = curState()
|
|
36271
|
-
if (clipPaths) operation = { ...operation, value: {
|
|
36275
|
+
const { clipPaths, clipImages } = curState();
|
|
36276
|
+
if (clipPaths || clipImages) operation = { ...operation, value: {
|
|
36277
|
+
...operation.value,
|
|
36278
|
+
...clipPaths ? { clipPaths } : {},
|
|
36279
|
+
...clipImages ? { clipImages } : {}
|
|
36280
|
+
} };
|
|
36272
36281
|
operations.push(operation);
|
|
36273
36282
|
switch (operation.kind) {
|
|
36274
36283
|
case "path":
|
|
@@ -36532,6 +36541,18 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
36532
36541
|
let hasTextClip = false;
|
|
36533
36542
|
let activeTm = [1, 0, 0, 1, 0, 0];
|
|
36534
36543
|
let activeTlm = [1, 0, 0, 1, 0, 0];
|
|
36544
|
+
const paintImage = (image, patternMask, resources, activeFonts, depth) => {
|
|
36545
|
+
if (!patternMask) {
|
|
36546
|
+
emit({ kind: "image", value: image });
|
|
36547
|
+
return;
|
|
36548
|
+
}
|
|
36549
|
+
const st = curState();
|
|
36550
|
+
stateStack.push({ ...st, clipImages: [...st.clipImages ?? [], image] });
|
|
36551
|
+
walkNodes([{ kind: "path-op", paint: "f", segments: [
|
|
36552
|
+
{ kind: "rect", x: 0, y: 0, width: 1, height: 1 }
|
|
36553
|
+
] }], void 0, void 0, resources, activeFonts, depth);
|
|
36554
|
+
stateStack.pop();
|
|
36555
|
+
};
|
|
36535
36556
|
const walkNodes = (nodes, mcid, actualText, activeResources = params.resourcesDict, activeFonts = fonts, depth = 0) => {
|
|
36536
36557
|
for (const node of nodes) {
|
|
36537
36558
|
switch (node.kind) {
|
|
@@ -36715,7 +36736,8 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
36715
36736
|
st.fillAlpha,
|
|
36716
36737
|
"PatternShading_" + st.fillPatternName,
|
|
36717
36738
|
patClip,
|
|
36718
|
-
shading?.kind === "stream" ? shading : void 0
|
|
36739
|
+
shading?.kind === "stream" ? shading : void 0,
|
|
36740
|
+
st.blendMode
|
|
36719
36741
|
);
|
|
36720
36742
|
if (shImg) {
|
|
36721
36743
|
emit({ kind: "image", value: shImg });
|
|
@@ -36824,18 +36846,20 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
36824
36846
|
const subNode = params.cosDoc.resolve(dictGet(xobjNode.dict, "Subtype"));
|
|
36825
36847
|
const sub = subNode?.kind === "name" ? subNode.decoded : "";
|
|
36826
36848
|
if (sub === "Image") {
|
|
36849
|
+
const maskNode = params.cosDoc.resolve(dictGet(xobjNode.dict, "ImageMask"));
|
|
36850
|
+
const patternMask = !!st.fillPatternName && maskNode?.kind === "boolean" && maskNode.value;
|
|
36827
36851
|
const decoded = decodeXObjectImageToRgba(
|
|
36828
36852
|
params.cosDoc,
|
|
36829
36853
|
xobjNode,
|
|
36830
36854
|
activeResources,
|
|
36831
|
-
{
|
|
36855
|
+
patternMask ? { r: 1, g: 1, b: 1, alpha: 1 } : {
|
|
36832
36856
|
r: st.fillColor.r,
|
|
36833
36857
|
g: st.fillColor.g,
|
|
36834
36858
|
b: st.fillColor.b,
|
|
36835
36859
|
alpha: st.fillAlpha
|
|
36836
36860
|
}
|
|
36837
36861
|
);
|
|
36838
|
-
|
|
36862
|
+
paintImage({
|
|
36839
36863
|
name: node.name,
|
|
36840
36864
|
matrix: [...st.ctm],
|
|
36841
36865
|
width: decoded.width,
|
|
@@ -36845,7 +36869,7 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
36845
36869
|
decodedRgba: decoded.rgba,
|
|
36846
36870
|
...st.blendMode && st.blendMode !== "Normal" ? { blendMode: st.blendMode } : {},
|
|
36847
36871
|
...st.clipRect ? { clipRect: [...st.clipRect] } : {}
|
|
36848
|
-
}
|
|
36872
|
+
}, patternMask, activeResources, activeFonts, depth);
|
|
36849
36873
|
} else if (sub === "Form" && depth < 8) {
|
|
36850
36874
|
const formStreamBytes = params.cosDoc.decodeStream(xobjNode);
|
|
36851
36875
|
const formNodes = parseContentStream(formStreamBytes);
|
|
@@ -36901,19 +36925,22 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
36901
36925
|
}
|
|
36902
36926
|
case "inline-image": {
|
|
36903
36927
|
const st = curState();
|
|
36928
|
+
const maskEntry = dictGet(node.dict, "ImageMask") ?? dictGet(node.dict, "IM");
|
|
36929
|
+
const maskNode = params.cosDoc ? params.cosDoc.resolve(maskEntry) : maskEntry;
|
|
36930
|
+
const patternMask = !!st.fillPatternName && maskNode?.kind === "boolean" && maskNode.value;
|
|
36904
36931
|
const decoded = decodeInlineImageNodeToRgba(
|
|
36905
36932
|
params.cosDoc,
|
|
36906
36933
|
node.dict,
|
|
36907
36934
|
node.data,
|
|
36908
36935
|
activeResources,
|
|
36909
|
-
{
|
|
36936
|
+
patternMask ? { r: 1, g: 1, b: 1, alpha: 1 } : {
|
|
36910
36937
|
r: st.fillColor.r,
|
|
36911
36938
|
g: st.fillColor.g,
|
|
36912
36939
|
b: st.fillColor.b,
|
|
36913
36940
|
alpha: st.fillAlpha
|
|
36914
36941
|
}
|
|
36915
36942
|
);
|
|
36916
|
-
|
|
36943
|
+
paintImage({
|
|
36917
36944
|
name: "InlineImage",
|
|
36918
36945
|
matrix: [...st.ctm],
|
|
36919
36946
|
width: decoded.width,
|
|
@@ -36923,7 +36950,7 @@ function evaluateContentStreamToDisplayList(params) {
|
|
|
36923
36950
|
decodedRgba: decoded.rgba,
|
|
36924
36951
|
...st.blendMode && st.blendMode !== "Normal" ? { blendMode: st.blendMode } : {},
|
|
36925
36952
|
...st.clipRect ? { clipRect: [...st.clipRect] } : {}
|
|
36926
|
-
}
|
|
36953
|
+
}, patternMask, activeResources, activeFonts, depth);
|
|
36927
36954
|
break;
|
|
36928
36955
|
}
|
|
36929
36956
|
case "text-object": {
|
|
@@ -41360,6 +41387,7 @@ function renderDisplayListToBitmap(displayList, options = {}) {
|
|
|
41360
41387
|
const aaVec = options.antialiasVector !== false;
|
|
41361
41388
|
const aaTxt = options.antialiasText !== false;
|
|
41362
41389
|
const clipMasks = /* @__PURE__ */ new Map();
|
|
41390
|
+
const imageClipMasks = /* @__PURE__ */ new Map();
|
|
41363
41391
|
for (const original of paintOperations(displayList)) {
|
|
41364
41392
|
if (original.kind === "glyph" && (original.value.renderMode === 3 || !original.value.outline && !original.value.unicode.trim())) continue;
|
|
41365
41393
|
const operation = original.kind === "glyph" ? { kind: "path", value: glyphPaint(original.value) } : original;
|
|
@@ -41374,6 +41402,31 @@ function renderDisplayListToBitmap(displayList, options = {}) {
|
|
|
41374
41402
|
}
|
|
41375
41403
|
clipMasks.set(clips, clipMask);
|
|
41376
41404
|
}
|
|
41405
|
+
const imageClips = original.value.clipImages;
|
|
41406
|
+
if (imageClips) {
|
|
41407
|
+
let imageMask = imageClipMasks.get(imageClips);
|
|
41408
|
+
if (!imageMask) {
|
|
41409
|
+
imageMask = new Uint8Array(width * height * 4).fill(255);
|
|
41410
|
+
for (const image of imageClips) {
|
|
41411
|
+
const layer = renderDisplayListToBitmap({
|
|
41412
|
+
...displayList,
|
|
41413
|
+
rotation: 0,
|
|
41414
|
+
paths: [],
|
|
41415
|
+
glyphs: [],
|
|
41416
|
+
images: [image],
|
|
41417
|
+
operations: [{ kind: "image", value: image }]
|
|
41418
|
+
}, { scale, transparent: true }).data;
|
|
41419
|
+
for (let i = 3; i < layer.length; i += 4) imageMask[i] = Math.round(imageMask[i] * layer[i] / 255);
|
|
41420
|
+
}
|
|
41421
|
+
imageClipMasks.set(imageClips, imageMask);
|
|
41422
|
+
}
|
|
41423
|
+
if (clipMask) {
|
|
41424
|
+
clipMask = clipMask.slice();
|
|
41425
|
+
for (let i = 3; i < clipMask.length; i += 4) clipMask[i] = Math.round(clipMask[i] * imageMask[i] / 255);
|
|
41426
|
+
} else {
|
|
41427
|
+
clipMask = imageMask;
|
|
41428
|
+
}
|
|
41429
|
+
}
|
|
41377
41430
|
if (operation.kind === "path") {
|
|
41378
41431
|
const path = operation.value;
|
|
41379
41432
|
if (path.fillColor) {
|
|
@@ -41522,6 +41575,15 @@ function escapeXmlText(str) {
|
|
|
41522
41575
|
}
|
|
41523
41576
|
return encodeToXmlString(valid);
|
|
41524
41577
|
}
|
|
41578
|
+
function svgImage(image, pageHeight) {
|
|
41579
|
+
if (!image.decodedRgba) return "";
|
|
41580
|
+
const png = encodeRgbaToPng(image.width, image.height, image.decodedRgba);
|
|
41581
|
+
const chunks = [];
|
|
41582
|
+
for (let offset = 0; offset < png.length; offset += 8192)
|
|
41583
|
+
chunks.push(String.fromCharCode(...png.subarray(offset, offset + 8192)));
|
|
41584
|
+
const [a, b, c, d, e, f] = image.matrix;
|
|
41585
|
+
return `<image width="1" height="1" preserveAspectRatio="none" transform="matrix(${a} ${-b} ${-c} ${d} ${e + c} ${pageHeight - f - d})" href="data:image/png;base64,${btoa(chunks.join(""))}"/>`;
|
|
41586
|
+
}
|
|
41525
41587
|
function svgPathData(segments, height) {
|
|
41526
41588
|
const dParts = [];
|
|
41527
41589
|
for (const seg of segments) {
|
|
@@ -41570,11 +41632,16 @@ function renderDisplayListToSvg(displayList, options = {}) {
|
|
|
41570
41632
|
if (original.kind === "glyph" && (original.value.renderMode === 3 || !original.value.outline && !original.value.unicode.trim())) continue;
|
|
41571
41633
|
const operation = original.kind === "glyph" ? { kind: "path", value: glyphPaint(original.value) } : original;
|
|
41572
41634
|
const clips = original.value.clipPaths ?? [];
|
|
41635
|
+
const imageClips = original.value.clipImages ?? [];
|
|
41573
41636
|
for (const segments of clips) {
|
|
41574
41637
|
const id = `text-clip-${clipId++}`;
|
|
41575
41638
|
const path = `<path d="${svgPathData(segments, displayList.height)}"/>`;
|
|
41576
41639
|
parts.push(`<defs><clipPath id="${id}" clipPathUnits="userSpaceOnUse">${path}</clipPath></defs><g clip-path="url(#${id})">`);
|
|
41577
41640
|
}
|
|
41641
|
+
for (const image of imageClips) {
|
|
41642
|
+
const id = `image-clip-${clipId++}`;
|
|
41643
|
+
parts.push(`<defs><mask id="${id}" maskUnits="userSpaceOnUse" x="0" y="0" width="${displayList.width}" height="${displayList.height}" style="mask-type:alpha">${svgImage(image, displayList.height)}</mask></defs><g mask="url(#${id})">`);
|
|
41644
|
+
}
|
|
41578
41645
|
if (operation.kind === "path") {
|
|
41579
41646
|
const p = operation.value;
|
|
41580
41647
|
const pathData = svgPathData(p.segments, displayList.height);
|
|
@@ -41594,24 +41661,9 @@ function renderDisplayListToSvg(displayList, options = {}) {
|
|
|
41594
41661
|
parts.push(` <path${labelAttr} d="${pathData}" fill="${fill}"${fillRuleAttr}${fillOpacityAttr} stroke="${stroke}"${strokeOpacityAttr}${strokeWidthAttr}${lineCapAttr}${lineJoinAttr}${miterLimitAttr}${dashArrayAttr}${dashOffsetAttr}/>`);
|
|
41595
41662
|
}
|
|
41596
41663
|
} else if (operation.kind === "image") {
|
|
41597
|
-
|
|
41598
|
-
if (!img.decodedRgba) {
|
|
41599
|
-
for (let i = 0; i < clips.length; i++) parts.push("</g>");
|
|
41600
|
-
continue;
|
|
41601
|
-
}
|
|
41602
|
-
const pngBytes = encodeRgbaToPng(img.width, img.height, img.decodedRgba);
|
|
41603
|
-
const chunks = [];
|
|
41604
|
-
for (let offset = 0; offset < pngBytes.length; offset += 8192)
|
|
41605
|
-
chunks.push(String.fromCharCode(...pngBytes.subarray(offset, offset + 8192)));
|
|
41606
|
-
const b64 = btoa(chunks.join(""));
|
|
41607
|
-
const [a, b, c, d, e, f] = img.matrix;
|
|
41608
|
-
const svgTx = e + c;
|
|
41609
|
-
const svgTy = displayList.height - f - d;
|
|
41610
|
-
parts.push(
|
|
41611
|
-
` <image width="1" height="1" preserveAspectRatio="none" transform="matrix(${a} ${-b} ${-c} ${d} ${svgTx} ${svgTy})" href="data:image/png;base64,${b64}"/>`
|
|
41612
|
-
);
|
|
41664
|
+
parts.push(` ${svgImage(operation.value, displayList.height)}`);
|
|
41613
41665
|
}
|
|
41614
|
-
for (let i = 0; i < clips.length; i++) parts.push("</g>");
|
|
41666
|
+
for (let i = 0; i < clips.length + imageClips.length; i++) parts.push("</g>");
|
|
41615
41667
|
}
|
|
41616
41668
|
if (displayList.rotation) parts.push("</g>");
|
|
41617
41669
|
parts.push("</svg>\n");
|
|
@@ -3245,6 +3245,8 @@ function createPythonJspiExecutor(options) {
|
|
|
3245
3245
|
let running;
|
|
3246
3246
|
let retirement;
|
|
3247
3247
|
let schedulerCleanup;
|
|
3248
|
+
let interpreterFinalized = false;
|
|
3249
|
+
let finalizationFailure;
|
|
3248
3250
|
let cleanup;
|
|
3249
3251
|
let runtime;
|
|
3250
3252
|
let native;
|
|
@@ -3500,7 +3502,11 @@ await _safe_quiesce_tasks()
|
|
|
3500
3502
|
await scheduler.close();
|
|
3501
3503
|
} finally {
|
|
3502
3504
|
active.value = native ? 2 : 0;
|
|
3503
|
-
finalized = Number(await engine.promising(runtime._module._Py_FinalizeEx)())
|
|
3505
|
+
finalized = Number(await Promise.resolve().then(() => engine.promising(runtime._module._Py_FinalizeEx)()).catch((reason) => {
|
|
3506
|
+
finalizationFailure = { reason };
|
|
3507
|
+
throw reason;
|
|
3508
|
+
}));
|
|
3509
|
+
interpreterFinalized = true;
|
|
3504
3510
|
}
|
|
3505
3511
|
}
|
|
3506
3512
|
}
|
|
@@ -3540,7 +3546,10 @@ await _safe_quiesce_tasks()
|
|
|
3540
3546
|
});
|
|
3541
3547
|
await cleanup?.catch(() => {
|
|
3542
3548
|
});
|
|
3543
|
-
await schedulerCleanup
|
|
3549
|
+
await schedulerCleanup?.catch((error) => {
|
|
3550
|
+
if (!interpreterFinalized) throw error;
|
|
3551
|
+
});
|
|
3552
|
+
if (finalizationFailure) throw finalizationFailure.reason;
|
|
3544
3553
|
})();
|
|
3545
3554
|
return retirement;
|
|
3546
3555
|
}
|
|
@@ -3690,6 +3699,10 @@ function createPythonCommands(options) {
|
|
|
3690
3699
|
await input.return?.(void 0);
|
|
3691
3700
|
fragment = void 0;
|
|
3692
3701
|
if (packages) environment.finish(packages);
|
|
3702
|
+
if (results[1]?.status === "fulfilled" && admitted) {
|
|
3703
|
+
activeWorkers--;
|
|
3704
|
+
admitted = false;
|
|
3705
|
+
}
|
|
3693
3706
|
for (const result2 of results) if (result2.status === "rejected") throw result2.reason;
|
|
3694
3707
|
})().then(() => {
|
|
3695
3708
|
if (admitted) {
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
parseFormatSections,
|
|
6
6
|
scanFormat,
|
|
7
7
|
selectFormatSection
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WKPOGTZY.js";
|
|
9
9
|
import {
|
|
10
10
|
cellValueFormat
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MED2BOOW.js";
|
|
12
12
|
import {
|
|
13
13
|
SsconvertError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FDNCPZQS.js";
|
|
15
15
|
import {
|
|
16
16
|
init_buffer
|
|
17
17
|
} from "./chunk-HX3SHTCE.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bareAutolink,
|
|
3
3
|
filterGfmHtml
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-522TDVLS.js";
|
|
5
5
|
import {
|
|
6
6
|
asciiPunctuation,
|
|
7
7
|
decodeSyntax,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
readLabel,
|
|
15
15
|
readTitle,
|
|
16
16
|
whitespace
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WF2LSKMI.js";
|
|
18
18
|
import {
|
|
19
19
|
unicodePunctuation,
|
|
20
20
|
unicodeWhitespace
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rewriteReferences
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WKPOGTZY.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_SHEET_SIZE,
|
|
6
6
|
SsconvertError,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isUnicodeAlphanumeric,
|
|
10
10
|
isUnicodeDigit,
|
|
11
11
|
parseExpression
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FDNCPZQS.js";
|
|
13
13
|
import {
|
|
14
14
|
init_buffer
|
|
15
15
|
} from "./chunk-HX3SHTCE.js";
|
|
@@ -6,20 +6,20 @@ import {
|
|
|
6
6
|
expandIndexSheetAreas,
|
|
7
7
|
metadataNode,
|
|
8
8
|
writeRichString
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FLMLM7Y4.js";
|
|
10
10
|
import {
|
|
11
11
|
readGnumericRichText,
|
|
12
12
|
writeGnumericRichText
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-J7UMKBRK.js";
|
|
14
14
|
import {
|
|
15
15
|
recalculateWorkbook,
|
|
16
16
|
rewriteReferences,
|
|
17
17
|
visitFormula
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WKPOGTZY.js";
|
|
19
19
|
import {
|
|
20
20
|
cellValueFormat,
|
|
21
21
|
converterLocale
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MED2BOOW.js";
|
|
23
23
|
import {
|
|
24
24
|
SsconvertError,
|
|
25
25
|
excelGrammar,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
parseExpression,
|
|
30
30
|
serializeExpression,
|
|
31
31
|
snapshotWorkbook
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-FDNCPZQS.js";
|
|
33
33
|
import {
|
|
34
34
|
createZipCodec
|
|
35
35
|
} from "./chunk-MKQVQMXO.js";
|
|
@@ -3133,7 +3133,7 @@ var odfGrammar = Object.freeze({
|
|
|
3133
3133
|
prefixes: Object.freeze(["of:=", "oooc:=", "="]),
|
|
3134
3134
|
functionPrefixes: Object.freeze(["ORG.GNUMERIC.", "COM.MICROSOFT."])
|
|
3135
3135
|
});
|
|
3136
|
-
var internalOdfGrammar = Object.freeze({ ...odfGrammar, internalLabels: true });
|
|
3136
|
+
var internalOdfGrammar = Object.freeze({ ...odfGrammar, internalLabels: true, internalNames: true });
|
|
3137
3137
|
var sylkGrammar = Object.freeze({ ...gnumericGrammar, id: "sylk", address: "r1c1" });
|
|
3138
3138
|
var sylkWriterGrammar = Object.freeze({ ...sylkGrammar, id: "sylk-writer", stringEscape: "raw" });
|
|
3139
3139
|
var legacyOpenOfficeGrammar = Object.freeze({
|
|
@@ -4521,6 +4521,31 @@ function parseExpression(source, options) {
|
|
|
4521
4521
|
if (depth > (options.maximumNodes ?? Infinity)) throw new SsconvertError("resource-limit", "ssconvert formula node limit exceeded");
|
|
4522
4522
|
try {
|
|
4523
4523
|
const c = source[offset];
|
|
4524
|
+
if (source.startsWith("@name.", offset)) {
|
|
4525
|
+
if (grammar.id !== "gnumeric" && !grammar.internalNames) fail("Internal live name in native formula");
|
|
4526
|
+
offset += 6;
|
|
4527
|
+
const relative = source.startsWith("relative", offset);
|
|
4528
|
+
if (!relative && !source.startsWith("absolute", offset)) fail("Invalid live name mode");
|
|
4529
|
+
offset += 8;
|
|
4530
|
+
const fixedSheet = source.startsWith(".fixed-sheet", offset);
|
|
4531
|
+
if (fixedSheet) offset += 12;
|
|
4532
|
+
if (source[offset++] !== "[") fail("Invalid live name mode");
|
|
4533
|
+
const displacement = (separator) => {
|
|
4534
|
+
const start2 = offset;
|
|
4535
|
+
if (source[offset] === "-") offset++;
|
|
4536
|
+
const begin = offset;
|
|
4537
|
+
while (digit(source[offset])) offset++;
|
|
4538
|
+
const value = Number(source.slice(start2, offset));
|
|
4539
|
+
if (offset === begin || !Number.isSafeInteger(value) || source[offset++] !== separator) fail("Invalid live name displacement");
|
|
4540
|
+
return value;
|
|
4541
|
+
};
|
|
4542
|
+
const row = displacement(","), column = displacement(","), sheet = displacement("]");
|
|
4543
|
+
if (!relative && (row !== 0 || column !== 0) || source[offset++] !== ":" || source[offset] !== '"') fail("Invalid live name");
|
|
4544
|
+
const name = quoted('"', grammar.stringEscape);
|
|
4545
|
+
if (!name) fail("Empty live name");
|
|
4546
|
+
options.onName?.(name);
|
|
4547
|
+
return node({ kind: "name", name, workbook: "", relocation: { relative, row, column, sheet, ...fixedSheet ? { sheetRelative: false } : {} }, start, end: offset });
|
|
4548
|
+
}
|
|
4524
4549
|
if (c === "@" && !internalLabels) fail("Internal label reference in native formula");
|
|
4525
4550
|
if (c === "@" && internalLabels) {
|
|
4526
4551
|
offset++;
|
|
@@ -7702,6 +7727,12 @@ function serializeExpression(document, grammar = document.grammar, preserveSourc
|
|
|
7702
7727
|
position
|
|
7703
7728
|
);
|
|
7704
7729
|
case "name": {
|
|
7730
|
+
if (value.relocation) {
|
|
7731
|
+
if (grammar.id !== "gnumeric" && !grammar.internalNames)
|
|
7732
|
+
throw new SsconvertError("unsupported-feature", "Unsupported ssconvert feature: live name relocation in target grammar");
|
|
7733
|
+
const { relative, row, column, sheet } = value.relocation;
|
|
7734
|
+
return `@name.${relative ? "relative" : "absolute"}${value.relocation.sheetRelative === false ? ".fixed-sheet" : ""}[${row},${column},${sheet}]:` + quoteFormulaString(value.name, '"', grammar);
|
|
7735
|
+
}
|
|
7705
7736
|
if (grammar.qualifiedNames === false && (value.sheet !== void 0 || value.workbook !== void 0))
|
|
7706
7737
|
throw new SsconvertError("unsupported-feature", "Unsupported ssconvert feature: qualified formula name in target grammar");
|
|
7707
7738
|
if (value.workbook === "" && grammar.bracketReferences && value.sheet === void 0)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
richTextSegments
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RID3B5RE.js";
|
|
4
4
|
import {
|
|
5
5
|
SsconvertError,
|
|
6
6
|
foldSheetName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FDNCPZQS.js";
|
|
8
8
|
import {
|
|
9
9
|
init_buffer
|
|
10
10
|
} from "./chunk-HX3SHTCE.js";
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
parseRangePrefix,
|
|
7
7
|
relocateFormula,
|
|
8
8
|
resourceUri
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CE6Z2ULX.js";
|
|
10
10
|
import {
|
|
11
11
|
CodecWriteFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OZSWW23M.js";
|
|
13
13
|
import {
|
|
14
14
|
createFormattingCapability
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-444OTXM7.js";
|
|
16
16
|
import {
|
|
17
17
|
exportOptionPairs
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TT2DMDBY.js";
|
|
19
19
|
import {
|
|
20
20
|
FinancialGoalSeek,
|
|
21
21
|
WORK_QUANTUM,
|
|
@@ -38,11 +38,11 @@ import {
|
|
|
38
38
|
serialDate,
|
|
39
39
|
shiftMonths,
|
|
40
40
|
snapshotRuntimeFunctions
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-WKPOGTZY.js";
|
|
42
42
|
import {
|
|
43
43
|
converterLocale,
|
|
44
44
|
runtimeEnvironment
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-MED2BOOW.js";
|
|
46
46
|
import {
|
|
47
47
|
DEFAULT_SHEET_SIZE,
|
|
48
48
|
SsconvertError,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
snapshotWorkbook,
|
|
56
56
|
updateWorkbook,
|
|
57
57
|
validSheetSize
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-FDNCPZQS.js";
|
|
59
59
|
import {
|
|
60
60
|
init_buffer
|
|
61
61
|
} from "./chunk-HX3SHTCE.js";
|
|
@@ -5141,7 +5141,11 @@ function createResourceIO(options) {
|
|
|
5141
5141
|
init_buffer();
|
|
5142
5142
|
|
|
5143
5143
|
export {
|
|
5144
|
+
compareServiceIds,
|
|
5144
5145
|
createRegistry,
|
|
5146
|
+
FileWriteError,
|
|
5147
|
+
ioFailure,
|
|
5148
|
+
imageFormats,
|
|
5145
5149
|
defaultSsconvertLimits,
|
|
5146
5150
|
createEngine,
|
|
5147
5151
|
createResourceIO
|
|
@@ -59,7 +59,7 @@ async function openCommandFile(context, path, options) {
|
|
|
59
59
|
acquisitionSettled?.();
|
|
60
60
|
};
|
|
61
61
|
let scope;
|
|
62
|
-
const close = () => {
|
|
62
|
+
const close = (options2 = {}) => {
|
|
63
63
|
accepting = false;
|
|
64
64
|
closing ??= (async () => {
|
|
65
65
|
if (acquiring) {
|
|
@@ -72,7 +72,7 @@ async function openCommandFile(context, path, options) {
|
|
|
72
72
|
const retained = descriptor;
|
|
73
73
|
descriptor = void 0;
|
|
74
74
|
try {
|
|
75
|
-
await retained?.close();
|
|
75
|
+
await retained?.close(options2);
|
|
76
76
|
} catch (reason) {
|
|
77
77
|
closeFailure = { reason, acknowledged: false, drained: false };
|
|
78
78
|
throw reason;
|
|
@@ -90,7 +90,7 @@ async function openCommandFile(context, path, options) {
|
|
|
90
90
|
return closing;
|
|
91
91
|
};
|
|
92
92
|
const aborted = () => {
|
|
93
|
-
void close().catch(() => {
|
|
93
|
+
void close({ signal: scope ?? context.signal }).catch(() => {
|
|
94
94
|
});
|
|
95
95
|
};
|
|
96
96
|
const check = (signal) => {
|
|
@@ -48,11 +48,11 @@ import {
|
|
|
48
48
|
trimImage,
|
|
49
49
|
unflattenImage,
|
|
50
50
|
unpremultiplyRgbaImage
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-XYCWDGOG.js";
|
|
52
52
|
import {
|
|
53
53
|
PdfDocument,
|
|
54
54
|
encodePng
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-TCAGGM44.js";
|
|
56
56
|
import {
|
|
57
57
|
createLuaFilterCapability
|
|
58
58
|
} from "./chunk-Y2KHC6TZ.js";
|