@office-kit/pptx 0.24.0 → 0.25.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/CHANGELOG.md +23 -0
- package/README.md +4 -3
- package/dist/{api-BNwRBemN.js → api-DQMkljVK.js} +746 -281
- package/dist/api-DQMkljVK.js.map +1 -0
- package/dist/{index-WCK8v0WT.d.ts → index-DVqlSlMs.d.ts} +86 -22
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +2 -2
- package/package.json +1 -1
- package/dist/api-BNwRBemN.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Inflate, inflateSync, strFromU8, zipSync } from "fflate";
|
|
2
2
|
//#region src/api/units.ts
|
|
3
3
|
const EMU_PER_INCH = 914400;
|
|
4
4
|
const EMU_PER_CM = 36e4;
|
|
@@ -557,13 +557,46 @@ const rawName = (prefix, localName) => prefix === "" ? localName : `${prefix}:${
|
|
|
557
557
|
const writeAttr = (a) => {
|
|
558
558
|
return ` ${rawName(a.name.prefix, a.name.localName)}="${escapeAttr$1(a.value)}"`;
|
|
559
559
|
};
|
|
560
|
-
const
|
|
560
|
+
const DOCUMENT_SCOPE = new Map([["xml", NS.xml]]);
|
|
561
|
+
const missingDecls = (e, scope) => {
|
|
562
|
+
let added = null;
|
|
563
|
+
for (let i = -1; i < e.attrs.length; i++) {
|
|
564
|
+
const name = i < 0 ? e.name : e.attrs[i].name;
|
|
565
|
+
if (i >= 0 && name.prefix === "") continue;
|
|
566
|
+
const own = e.prefixDecls.get(name.prefix) ?? added?.get(name.prefix);
|
|
567
|
+
if (own === void 0) {
|
|
568
|
+
if ((scope.get(name.prefix) ?? "") === name.namespaceURI) continue;
|
|
569
|
+
added ??= /* @__PURE__ */ new Map();
|
|
570
|
+
added.set(name.prefix, name.namespaceURI);
|
|
571
|
+
} else if (own !== name.namespaceURI) throw new Error(`prefix "${name.prefix}" on <${rawName(e.name.prefix, e.name.localName)}> is bound to both ${own} and ${name.namespaceURI}`);
|
|
572
|
+
}
|
|
573
|
+
return added;
|
|
574
|
+
};
|
|
575
|
+
const writeDecls = (decls, parts) => {
|
|
576
|
+
for (const [prefix, uri] of decls) {
|
|
577
|
+
const decl = prefix === "" ? "xmlns" : `xmlns:${prefix}`;
|
|
578
|
+
parts.push(` ${decl}="${escapeAttr$1(uri)}"`);
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
const withDecls = (scope, decls) => {
|
|
582
|
+
if (decls.size === 0) return scope;
|
|
583
|
+
const next = new Map(scope);
|
|
584
|
+
for (const [prefix, uri] of decls) next.set(prefix, uri);
|
|
585
|
+
return next;
|
|
586
|
+
};
|
|
587
|
+
const writeElement = (e, parts, scope) => {
|
|
561
588
|
const name = rawName(e.name.prefix, e.name.localName);
|
|
562
589
|
parts.push("<");
|
|
563
590
|
parts.push(name);
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
591
|
+
writeDecls(e.prefixDecls, parts);
|
|
592
|
+
let childScope = scope;
|
|
593
|
+
if (scope) {
|
|
594
|
+
const added = missingDecls(e, scope);
|
|
595
|
+
childScope = withDecls(scope, e.prefixDecls);
|
|
596
|
+
if (added) {
|
|
597
|
+
writeDecls(added, parts);
|
|
598
|
+
childScope = withDecls(childScope, added);
|
|
599
|
+
}
|
|
567
600
|
}
|
|
568
601
|
for (const a of e.attrs) parts.push(writeAttr(a));
|
|
569
602
|
if (e.children.length === 0) {
|
|
@@ -571,15 +604,15 @@ const writeElement = (e, parts) => {
|
|
|
571
604
|
return;
|
|
572
605
|
}
|
|
573
606
|
parts.push(">");
|
|
574
|
-
for (const child of e.children) writeNode(child, parts);
|
|
607
|
+
for (const child of e.children) writeNode(child, parts, childScope);
|
|
575
608
|
parts.push("</");
|
|
576
609
|
parts.push(name);
|
|
577
610
|
parts.push(">");
|
|
578
611
|
};
|
|
579
|
-
const writeNode = (n, parts) => {
|
|
612
|
+
const writeNode = (n, parts, scope) => {
|
|
580
613
|
switch (n.kind) {
|
|
581
614
|
case "element":
|
|
582
|
-
writeElement(n, parts);
|
|
615
|
+
writeElement(n, parts, scope);
|
|
583
616
|
return;
|
|
584
617
|
case "text":
|
|
585
618
|
parts.push(escapeText$1(n.data));
|
|
@@ -605,6 +638,7 @@ const writeNode = (n, parts) => {
|
|
|
605
638
|
return;
|
|
606
639
|
}
|
|
607
640
|
};
|
|
641
|
+
const XML_DECLARATION = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
|
|
608
642
|
const writeDeclaration = (doc, parts) => {
|
|
609
643
|
if (!doc.decl) return;
|
|
610
644
|
parts.push("<?xml version=\"");
|
|
@@ -625,15 +659,15 @@ const writeDeclaration = (doc, parts) => {
|
|
|
625
659
|
const serializeXml = (doc, options = {}) => {
|
|
626
660
|
const parts = [];
|
|
627
661
|
if (doc.decl) writeDeclaration(doc, parts);
|
|
628
|
-
else if (options.standaloneDeclaration ?? true) parts.push(
|
|
629
|
-
for (const p of doc.prolog) writeNode(p, parts);
|
|
630
|
-
writeElement(doc.root, parts);
|
|
631
|
-
for (const e of doc.epilog) writeNode(e, parts);
|
|
662
|
+
else if (options.standaloneDeclaration ?? true) parts.push(XML_DECLARATION);
|
|
663
|
+
for (const p of doc.prolog) writeNode(p, parts, null);
|
|
664
|
+
writeElement(doc.root, parts, DOCUMENT_SCOPE);
|
|
665
|
+
for (const e of doc.epilog) writeNode(e, parts, null);
|
|
632
666
|
return parts.join("");
|
|
633
667
|
};
|
|
634
668
|
const serializeFragment = (element) => {
|
|
635
669
|
const parts = [];
|
|
636
|
-
writeElement(element, parts);
|
|
670
|
+
writeElement(element, parts, null);
|
|
637
671
|
return parts.join("");
|
|
638
672
|
};
|
|
639
673
|
//#endregion
|
|
@@ -1274,7 +1308,7 @@ const PRESET_MATERIALS = [
|
|
|
1274
1308
|
//#region src/internal/drawingml/color.ts
|
|
1275
1309
|
const NAME_SRGB_CLR$4 = qname("a", "srgbClr", NS.dml);
|
|
1276
1310
|
const NAME_SCHEME_CLR$2 = qname("a", "schemeClr", NS.dml);
|
|
1277
|
-
const ATTR_VAL$
|
|
1311
|
+
const ATTR_VAL$13 = qname("", "val", "");
|
|
1278
1312
|
const SCHEME_TOKENS = new Set([
|
|
1279
1313
|
"bg1",
|
|
1280
1314
|
"tx1",
|
|
@@ -1344,7 +1378,7 @@ const parseSrgbHex = (value) => normalizeSrgbHex(value);
|
|
|
1344
1378
|
const buildColorElement = (value) => {
|
|
1345
1379
|
const parsed = parseColor(value);
|
|
1346
1380
|
if (parsed === null) throw new Error(`unrecognized color: ${value}`);
|
|
1347
|
-
return parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$4, { attrs: [attr(ATTR_VAL$
|
|
1381
|
+
return parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$4, { attrs: [attr(ATTR_VAL$13, parsed.hex)] }) : elem(NAME_SCHEME_CLR$2, { attrs: [attr(ATTR_VAL$13, parsed.token)] });
|
|
1348
1382
|
};
|
|
1349
1383
|
/**
|
|
1350
1384
|
* Narrows a color read back from a deck to one that can be written again,
|
|
@@ -1372,7 +1406,7 @@ const editSolidColor = (previous, options) => {
|
|
|
1372
1406
|
if (options.color !== void 0 && previous) color.children = previous.children.filter((child) => child.kind === "element" && isAlpha(child));
|
|
1373
1407
|
if (options.opacity !== void 0) {
|
|
1374
1408
|
color.children = color.children.filter((child) => child.kind !== "element" || !isAlpha(child));
|
|
1375
|
-
color.children.push(elem(qname("a", "alpha", NS.dml), { attrs: [attr(ATTR_VAL$
|
|
1409
|
+
color.children.push(elem(qname("a", "alpha", NS.dml), { attrs: [attr(ATTR_VAL$13, String(Math.round(options.opacity * 1e5)))] }));
|
|
1376
1410
|
}
|
|
1377
1411
|
return color;
|
|
1378
1412
|
};
|
|
@@ -1495,7 +1529,7 @@ const ATTR_SX = qname("", "sx", "");
|
|
|
1495
1529
|
const ATTR_SY = qname("", "sy", "");
|
|
1496
1530
|
const ATTR_KX = qname("", "kx", "");
|
|
1497
1531
|
const ATTR_KY = qname("", "ky", "");
|
|
1498
|
-
const ATTR_VAL$
|
|
1532
|
+
const ATTR_VAL$12 = qname("", "val", "");
|
|
1499
1533
|
const PERCENTAGE_UNITS = 1e5;
|
|
1500
1534
|
const ALPHA_TRANSFORMS = new Set([
|
|
1501
1535
|
"alpha",
|
|
@@ -1592,7 +1626,7 @@ const effectColor = (options, caller) => {
|
|
|
1592
1626
|
base.children = buildColorTransforms(transforms);
|
|
1593
1627
|
if (opacity !== void 0 && (colorTransforms === void 0 || opacity !== colorTransformOpacity(transforms))) {
|
|
1594
1628
|
base.children = base.children.filter((c) => !(c.kind === "element" && ALPHA_TRANSFORMS.has(c.name.localName)));
|
|
1595
|
-
if (opacity >= 0 && opacity < 1) base.children.push(elem(NAME_ALPHA, { attrs: [attr(ATTR_VAL$
|
|
1629
|
+
if (opacity >= 0 && opacity < 1) base.children.push(elem(NAME_ALPHA, { attrs: [attr(ATTR_VAL$12, String(Math.round(opacity * PERCENTAGE_UNITS)))] }));
|
|
1596
1630
|
}
|
|
1597
1631
|
return base;
|
|
1598
1632
|
};
|
|
@@ -2063,7 +2097,7 @@ const clearStroke = (spPr) => {
|
|
|
2063
2097
|
spPr.children = spPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "ln"));
|
|
2064
2098
|
};
|
|
2065
2099
|
const NAME_PRST_DASH = qname("a", "prstDash", NS.dml);
|
|
2066
|
-
const ATTR_VAL$
|
|
2100
|
+
const ATTR_VAL$11 = qname("", "val", "");
|
|
2067
2101
|
/**
|
|
2068
2102
|
* Sets `<a:prstDash val="..."/>` inside the shape's `<a:ln>`. Creates
|
|
2069
2103
|
* `<a:ln>` if absent. Replacing the dash choice on subsequent calls.
|
|
@@ -2072,7 +2106,7 @@ const setStrokeDash = (spPr, dash) => {
|
|
|
2072
2106
|
oneOf(dash, LINE_DASHES, "setShapeStrokeDash: dash");
|
|
2073
2107
|
const ln = ensureLn(spPr);
|
|
2074
2108
|
ln.children = ln.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "prstDash"));
|
|
2075
|
-
insertLnChild(ln, elem(NAME_PRST_DASH, { attrs: [attr(ATTR_VAL$
|
|
2109
|
+
insertLnChild(ln, elem(NAME_PRST_DASH, { attrs: [attr(ATTR_VAL$11, dash)] }));
|
|
2076
2110
|
};
|
|
2077
2111
|
const ATTR_TYPE$7 = qname("", "type", "");
|
|
2078
2112
|
const ATTR_LEN = qname("", "len", "");
|
|
@@ -2270,7 +2304,7 @@ const ATTR_NORMALIZE_H = qname("", "normalizeH", "");
|
|
|
2270
2304
|
const ATTR_BASELINE = qname("", "baseline", "");
|
|
2271
2305
|
const ATTR_CAP = qname("", "cap", "");
|
|
2272
2306
|
const ATTR_TYPEFACE$3 = qname("", "typeface", "");
|
|
2273
|
-
const ATTR_VAL$
|
|
2307
|
+
const ATTR_VAL$10 = qname("", "val", "");
|
|
2274
2308
|
const NAME_HIGHLIGHT = qname("a", "highlight", NS.dml);
|
|
2275
2309
|
const NAME_NO_FILL$1 = qname("a", "noFill", NS.dml);
|
|
2276
2310
|
const NAME_BLIP_FILL$2 = qname("a", "blipFill", NS.dml);
|
|
@@ -2417,7 +2451,7 @@ const setSolidFill = (rPr, value, transforms) => {
|
|
|
2417
2451
|
const parsed = parseColor(value);
|
|
2418
2452
|
if (parsed === null) throw new Error(`unrecognized color: ${value}`);
|
|
2419
2453
|
removeAnyFill(rPr);
|
|
2420
|
-
const inner = parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$
|
|
2454
|
+
const inner = parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$10, parsed.hex)] }) : elem(NAME_SCHEME_CLR$1, { attrs: [attr(ATTR_VAL$10, parsed.token)] });
|
|
2421
2455
|
if (transforms !== void 0) inner.children = buildColorTransforms(transforms);
|
|
2422
2456
|
insertChildByRank(rPr, elem(NAME_SOLID_FILL$4, { children: [inner] }), rprChildRank);
|
|
2423
2457
|
};
|
|
@@ -2453,7 +2487,7 @@ const setUnderlineFill = (rPr, value) => {
|
|
|
2453
2487
|
insertChildByRank(rPr, value === null ? elem(NAME_U_FILL_TX) : (() => {
|
|
2454
2488
|
const parsed = parseColor(value);
|
|
2455
2489
|
if (parsed === null) throw new Error(`unrecognized underline color: ${value}`);
|
|
2456
|
-
return elem(NAME_U_FILL, { children: [elem(NAME_SOLID_FILL$4, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$
|
|
2490
|
+
return elem(NAME_U_FILL, { children: [elem(NAME_SOLID_FILL$4, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$10, parsed.hex)] }) : elem(NAME_SCHEME_CLR$1, { attrs: [attr(ATTR_VAL$10, parsed.token)] })] })] });
|
|
2457
2491
|
})(), rprChildRank);
|
|
2458
2492
|
};
|
|
2459
2493
|
const setLatin = (rPr, font) => {
|
|
@@ -2476,7 +2510,7 @@ const setHighlight = (rPr, value) => {
|
|
|
2476
2510
|
if (value === null) return;
|
|
2477
2511
|
const parsed = parseColor(value);
|
|
2478
2512
|
if (parsed === null) throw new Error(`unrecognized highlight color: ${value}`);
|
|
2479
|
-
insertChildByRank(rPr, elem(NAME_HIGHLIGHT, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$
|
|
2513
|
+
insertChildByRank(rPr, elem(NAME_HIGHLIGHT, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$10, parsed.hex)] }) : elem(NAME_SCHEME_CLR$1, { attrs: [attr(ATTR_VAL$10, parsed.token)] })] }), rprChildRank);
|
|
2480
2514
|
};
|
|
2481
2515
|
const validateFormatEnums = (format, caller, images) => {
|
|
2482
2516
|
if (format.underline != null && typeof format.underline !== "boolean") oneOf(format.underline, UNDERLINES, `${caller}: underline`);
|
|
@@ -25668,7 +25702,7 @@ const NAME_TX_BODY$11 = qname("p", "txBody", NS.pml);
|
|
|
25668
25702
|
const ATTR_ID$19 = qname("", "id", "");
|
|
25669
25703
|
const ATTR_NAME$16 = qname("", "name", "");
|
|
25670
25704
|
const ATTR_TYPE$6 = qname("", "type", "");
|
|
25671
|
-
const ATTR_IDX$
|
|
25705
|
+
const ATTR_IDX$7 = qname("", "idx", "");
|
|
25672
25706
|
const NV_BY_KIND = {
|
|
25673
25707
|
shape: NAME_NV_SP_PR$5,
|
|
25674
25708
|
picture: NAME_NV_PIC_PR$3,
|
|
@@ -25706,7 +25740,7 @@ const extractShape = (element, kind) => {
|
|
|
25706
25740
|
const ph = firstChildElement(nvPr, NAME_PH$3);
|
|
25707
25741
|
if (ph !== null) {
|
|
25708
25742
|
placeholderType = getAttrValue(ph, ATTR_TYPE$6);
|
|
25709
|
-
const idxRaw = getAttrValue(ph, ATTR_IDX$
|
|
25743
|
+
const idxRaw = getAttrValue(ph, ATTR_IDX$7);
|
|
25710
25744
|
if (idxRaw !== null) placeholderIdx = Number.parseInt(idxRaw, 10);
|
|
25711
25745
|
}
|
|
25712
25746
|
}
|
|
@@ -26088,8 +26122,8 @@ const NAME_FILL_REF$1 = qname("a", "fillRef", NS.dml);
|
|
|
26088
26122
|
const NAME_EFFECT_REF$1 = qname("a", "effectRef", NS.dml);
|
|
26089
26123
|
const NAME_FONT_REF$1 = qname("a", "fontRef", NS.dml);
|
|
26090
26124
|
const NAME_SCHEME_CLR = qname("a", "schemeClr", NS.dml);
|
|
26091
|
-
const ATTR_IDX$
|
|
26092
|
-
const ATTR_VAL$
|
|
26125
|
+
const ATTR_IDX$6 = qname("", "idx", "");
|
|
26126
|
+
const ATTR_VAL$9 = qname("", "val", "");
|
|
26093
26127
|
const ATTR_ID$15 = qname("", "id", "");
|
|
26094
26128
|
const ATTR_NAME$11 = qname("", "name", "");
|
|
26095
26129
|
const ATTR_X$6 = qname("", "x", "");
|
|
@@ -26137,8 +26171,8 @@ const buildConnector = (opts) => {
|
|
|
26137
26171
|
const children = [nvCxnSpPr, elem(NAME_SP_PR$3, { children: spPrChildren })];
|
|
26138
26172
|
if (!hasExplicitLine) {
|
|
26139
26173
|
const styleRef = (name, idx, clr) => elem(name, {
|
|
26140
|
-
attrs: [attr(ATTR_IDX$
|
|
26141
|
-
children: [elem(NAME_SCHEME_CLR, { attrs: [attr(ATTR_VAL$
|
|
26174
|
+
attrs: [attr(ATTR_IDX$6, idx)],
|
|
26175
|
+
children: [elem(NAME_SCHEME_CLR, { attrs: [attr(ATTR_VAL$9, clr)] })]
|
|
26142
26176
|
});
|
|
26143
26177
|
children.push(elem(NAME_STYLE$2, { children: [
|
|
26144
26178
|
styleRef(NAME_LN_REF$1, "1", "accent1"),
|
|
@@ -26407,7 +26441,7 @@ const NAME_SRGB_CLR$2 = qname("a", "srgbClr", NS.dml);
|
|
|
26407
26441
|
const NAME_T$2 = qname("a", "t", NS.dml);
|
|
26408
26442
|
const NAME_PPR = qname("a", "pPr", NS.dml);
|
|
26409
26443
|
const NAME_BU_NONE = qname("a", "buNone", NS.dml);
|
|
26410
|
-
const ATTR_VAL$
|
|
26444
|
+
const ATTR_VAL$8 = qname("", "val", "");
|
|
26411
26445
|
const ATTR_MAR_L = qname("", "marL", "");
|
|
26412
26446
|
const ATTR_MAR_R = qname("", "marR", "");
|
|
26413
26447
|
const ATTR_MAR_T = qname("", "marT", "");
|
|
@@ -26429,7 +26463,7 @@ const ATTR_LANG$2 = qname("", "lang", "");
|
|
|
26429
26463
|
const buildCellRunProps = (textColorHex) => {
|
|
26430
26464
|
const langAttr = attr(ATTR_LANG$2, "en-US");
|
|
26431
26465
|
if (textColorHex === void 0) return elem(NAME_RPR$2, { attrs: [langAttr] });
|
|
26432
|
-
const solidFill = elem(NAME_SOLID_FILL$2, { children: [elem(NAME_SRGB_CLR$2, { attrs: [attr(ATTR_VAL$
|
|
26466
|
+
const solidFill = elem(NAME_SOLID_FILL$2, { children: [elem(NAME_SRGB_CLR$2, { attrs: [attr(ATTR_VAL$8, (textColorHex.startsWith("#") ? textColorHex.slice(1) : textColorHex).toUpperCase())] })] });
|
|
26433
26467
|
return elem(NAME_RPR$2, {
|
|
26434
26468
|
attrs: [langAttr],
|
|
26435
26469
|
children: [solidFill]
|
|
@@ -27344,7 +27378,7 @@ const ATTR_NO_GRP = qname("", "noGrp", "");
|
|
|
27344
27378
|
const ATTR_NO_ROT = qname("", "noRot", "");
|
|
27345
27379
|
const ATTR_NO_CHANGE_ASPECT = qname("", "noChangeAspect", "");
|
|
27346
27380
|
const ATTR_TYPE$3 = qname("", "type", "");
|
|
27347
|
-
const ATTR_IDX$
|
|
27381
|
+
const ATTR_IDX$5 = qname("", "idx", "");
|
|
27348
27382
|
const ATTR_LANG$1 = qname("", "lang", "");
|
|
27349
27383
|
const buildRootGroup = () => {
|
|
27350
27384
|
return elem(NAME_NV_GRP_SP_PR, { children: [
|
|
@@ -27374,7 +27408,7 @@ const buildNotesBodyPlaceholder = (id, notes) => {
|
|
|
27374
27408
|
const nvSpPr = elem(NAME_NV_SP_PR$1, { children: [
|
|
27375
27409
|
elem(NAME_C_NV_PR, { attrs: [attr(ATTR_ID$10, String(id)), attr(ATTR_NAME$7, `Notes Placeholder ${id - 1}`)] }),
|
|
27376
27410
|
elem(NAME_C_NV_SP_PR, { children: [elem(NAME_SP_LOCKS, { attrs: [attr(ATTR_NO_GRP, "1")] })] }),
|
|
27377
|
-
elem(NAME_NV_PR$3, { children: [elem(NAME_PH$1, { attrs: [attr(ATTR_TYPE$3, "body"), attr(ATTR_IDX$
|
|
27411
|
+
elem(NAME_NV_PR$3, { children: [elem(NAME_PH$1, { attrs: [attr(ATTR_TYPE$3, "body"), attr(ATTR_IDX$5, "1")] })] })
|
|
27378
27412
|
] });
|
|
27379
27413
|
const txBody = elem(NAME_TX_BODY$6, { children: [
|
|
27380
27414
|
elem(NAME_BODY_PR$2),
|
|
@@ -28535,7 +28569,7 @@ const ATTR_FROM = qname("", "from", "");
|
|
|
28535
28569
|
const ATTR_TO = qname("", "to", "");
|
|
28536
28570
|
const ATTR_X$2 = qname("", "x", "");
|
|
28537
28571
|
const ATTR_Y$2 = qname("", "y", "");
|
|
28538
|
-
const ATTR_VAL$
|
|
28572
|
+
const ATTR_VAL$7 = qname("", "val", "");
|
|
28539
28573
|
const ATTR_PR_LST = qname("", "prLst", "");
|
|
28540
28574
|
const behavioursOf$1 = (effectCTn) => {
|
|
28541
28575
|
const list = firstChildElement(effectCTn, NAME_CHILD_TN_LST$6);
|
|
@@ -28613,7 +28647,7 @@ const readColor = (host) => {
|
|
|
28613
28647
|
const elements = host.children.filter((c) => c.kind === "element");
|
|
28614
28648
|
const el = elements[0];
|
|
28615
28649
|
if (elements.length !== 1 || el === void 0 || el.name.namespaceURI !== NS.dml) return null;
|
|
28616
|
-
const val = getAttrValue(el, ATTR_VAL$
|
|
28650
|
+
const val = getAttrValue(el, ATTR_VAL$7);
|
|
28617
28651
|
if (val === null) return null;
|
|
28618
28652
|
const base = el.name.localName === "srgbClr" ? asColor(`#${val.toUpperCase()}`) : el.name.localName === "schemeClr" ? asColor(`scheme:${val}`) : null;
|
|
28619
28653
|
if (base === null) return null;
|
|
@@ -28669,7 +28703,7 @@ const readAnimationEmphasisOptions = (effect, effectCTn) => {
|
|
|
28669
28703
|
const set = behaviours.find((b) => isPml$5(b, "set") && attrNameOf$1(b) === "style.opacity");
|
|
28670
28704
|
const to = set === void 0 ? null : firstChildElement(set, NAME_TO$1);
|
|
28671
28705
|
const strVal = to === null ? null : firstChildElement(to, NAME_STR_VAL$1);
|
|
28672
|
-
const raw = strVal === null ? null : getAttrValue(strVal, ATTR_VAL$
|
|
28706
|
+
const raw = strVal === null ? null : getAttrValue(strVal, ATTR_VAL$7);
|
|
28673
28707
|
const opacity = raw === null || !/^\d*\.?\d+$/.test(raw.trim()) ? NaN : Number(raw);
|
|
28674
28708
|
if (!(opacity >= 0 && opacity <= 1)) return null;
|
|
28675
28709
|
return withOptions({ transparencyPercent: Number(((1 - opacity) * PERCENT).toFixed(OPACITY_DIGITS - 2)) });
|
|
@@ -29500,7 +29534,7 @@ const ATTR_CONCURRENT = qname("", "concurrent", "");
|
|
|
29500
29534
|
const ATTR_NEXT_AC = qname("", "nextAc", "");
|
|
29501
29535
|
const ATTR_SPID$3 = qname("", "spid", "");
|
|
29502
29536
|
const ATTR_EVT$2 = qname("", "evt", "");
|
|
29503
|
-
const ATTR_VAL$
|
|
29537
|
+
const ATTR_VAL$6 = qname("", "val", "");
|
|
29504
29538
|
const ATTR_GRP_ID$3 = qname("", "grpId", "");
|
|
29505
29539
|
const ATTR_BUILD$1 = qname("", "build", "");
|
|
29506
29540
|
const ATTR_ANIM_BG = qname("", "animBg", "");
|
|
@@ -29881,7 +29915,7 @@ const setAttrValue = (el, name, value) => {
|
|
|
29881
29915
|
const hidesTarget = (behaviour) => {
|
|
29882
29916
|
const to = firstChildElement(behaviour.element, NAME_TO);
|
|
29883
29917
|
const strVal = to === null ? null : firstChildElement(to, NAME_STR_VAL);
|
|
29884
|
-
return strVal !== null && getAttrValue(strVal, ATTR_VAL$
|
|
29918
|
+
return strVal !== null && getAttrValue(strVal, ATTR_VAL$6) === "hidden";
|
|
29885
29919
|
};
|
|
29886
29920
|
/**
|
|
29887
29921
|
* Retimes an effect to run for `durationMs`, in place: every behaviour's length
|
|
@@ -30075,7 +30109,7 @@ const ATTR_LAST_IDX = qname("", "lastIdx", "");
|
|
|
30075
30109
|
const ATTR_CLR_IDX = qname("", "clrIdx", "");
|
|
30076
30110
|
const ATTR_AUTHOR_ID$1 = qname("", "authorId", "");
|
|
30077
30111
|
const ATTR_DT = qname("", "dt", "");
|
|
30078
|
-
const ATTR_IDX$
|
|
30112
|
+
const ATTR_IDX$4 = qname("", "idx", "");
|
|
30079
30113
|
const ATTR_X$1 = qname("", "x", "");
|
|
30080
30114
|
const ATTR_Y$1 = qname("", "y", "");
|
|
30081
30115
|
const readCommentAuthorList = (root) => {
|
|
@@ -30105,7 +30139,7 @@ const readCommentList = (root) => {
|
|
|
30105
30139
|
const comments = [];
|
|
30106
30140
|
for (const el of allChildElements(root, NAME_CM$1)) {
|
|
30107
30141
|
const authorIdRaw = getAttrValue(el, ATTR_AUTHOR_ID$1);
|
|
30108
|
-
const idxRaw = getAttrValue(el, ATTR_IDX$
|
|
30142
|
+
const idxRaw = getAttrValue(el, ATTR_IDX$4);
|
|
30109
30143
|
const dtVal = getAttrValue(el, ATTR_DT);
|
|
30110
30144
|
if (authorIdRaw === null || idxRaw === null) continue;
|
|
30111
30145
|
const authorId = Number.parseInt(authorIdRaw, 10);
|
|
@@ -30138,7 +30172,7 @@ const readCommentList = (root) => {
|
|
|
30138
30172
|
const identifier = threading && firstChildElement(threading, NAME_PARENT);
|
|
30139
30173
|
if (!identifier) continue;
|
|
30140
30174
|
const author = getAttrValue(identifier, ATTR_AUTHOR_ID$1);
|
|
30141
|
-
const index = getAttrValue(identifier, ATTR_IDX$
|
|
30175
|
+
const index = getAttrValue(identifier, ATTR_IDX$4);
|
|
30142
30176
|
if (author !== null && index !== null && /^\d+$/.test(author) && /^\d+$/.test(index) && Number(author) <= 4294967295 && Number(index) <= 4294967295) parent = {
|
|
30143
30177
|
authorId: Number(author),
|
|
30144
30178
|
idx: Number(index)
|
|
@@ -30186,7 +30220,7 @@ const DEFAULT_COMMENT_POSITION = {
|
|
|
30186
30220
|
y: 0
|
|
30187
30221
|
};
|
|
30188
30222
|
const commentElement = (c) => {
|
|
30189
|
-
const attrs = [attr(ATTR_AUTHOR_ID$1, String(c.authorId)), attr(ATTR_IDX$
|
|
30223
|
+
const attrs = [attr(ATTR_AUTHOR_ID$1, String(c.authorId)), attr(ATTR_IDX$4, String(c.idx))];
|
|
30190
30224
|
if (c.dt !== null) attrs.push(attr(ATTR_DT, c.dt));
|
|
30191
30225
|
const position = c.position ?? DEFAULT_COMMENT_POSITION;
|
|
30192
30226
|
const children = [elem(NAME_POS$1, { attrs: [attr(ATTR_X$1, String(position.x)), attr(ATTR_Y$1, String(position.y))] })];
|
|
@@ -30195,7 +30229,7 @@ const commentElement = (c) => {
|
|
|
30195
30229
|
attrs: [attr(ATTR_URI$2, THREADING_URI)],
|
|
30196
30230
|
children: [elem(NAME_THREADING, {
|
|
30197
30231
|
prefixDecls: new Map([["p15", P15]]),
|
|
30198
|
-
children: [elem(NAME_PARENT, { attrs: [attr(ATTR_AUTHOR_ID$1, String(c.parent.authorId)), attr(ATTR_IDX$
|
|
30232
|
+
children: [elem(NAME_PARENT, { attrs: [attr(ATTR_AUTHOR_ID$1, String(c.parent.authorId)), attr(ATTR_IDX$4, String(c.parent.idx))] })]
|
|
30199
30233
|
})]
|
|
30200
30234
|
})] }));
|
|
30201
30235
|
return elem(NAME_CM$1, {
|
|
@@ -30518,20 +30552,173 @@ const extensionOf = (name) => {
|
|
|
30518
30552
|
* negligible savings.
|
|
30519
30553
|
*/
|
|
30520
30554
|
const shouldStore = (name) => STORE_BY_EXTENSION.has(extensionOf(name));
|
|
30555
|
+
const SIG_LOCAL_HEADER = 67324752;
|
|
30556
|
+
const SIG_CENTRAL_HEADER = 33639248;
|
|
30557
|
+
const SIG_EOCD = 101010256;
|
|
30558
|
+
const SIG_ZIP64_EOCD = 101075792;
|
|
30559
|
+
const SIG_ZIP64_LOCATOR = 117853008;
|
|
30560
|
+
const EOCD_SIZE = 22;
|
|
30561
|
+
const MAX_COMMENT_LENGTH = 65535;
|
|
30562
|
+
const ZIP64_LOCATOR_SIZE = 20;
|
|
30563
|
+
const ZIP64_EOCD_MIN_SIZE = 56;
|
|
30564
|
+
const CENTRAL_HEADER_SIZE = 46;
|
|
30565
|
+
const LOCAL_HEADER_SIZE = 30;
|
|
30566
|
+
const ZIP64_EXTRA_ID = 1;
|
|
30567
|
+
const ZIP64_SENTINEL_32 = 4294967295;
|
|
30568
|
+
const FLAG_UTF8 = 2048;
|
|
30569
|
+
const METHOD_STORE = 0;
|
|
30570
|
+
const METHOD_DEFLATE = 8;
|
|
30571
|
+
const INFLATE_CHUNK_SIZE = 16 * 1024;
|
|
30572
|
+
const MAX_DEFLATE_RATIO = 1032;
|
|
30573
|
+
const DEFLATE_RATIO_SLACK = 1024;
|
|
30574
|
+
const invalid = (reason) => /* @__PURE__ */ new Error(`invalid ZIP: ${reason}`);
|
|
30575
|
+
const u16 = (d, at) => d[at] | d[at + 1] << 8;
|
|
30576
|
+
const u32 = (d, at) => (d[at] | d[at + 1] << 8 | d[at + 2] << 16 | d[at + 3] << 24) >>> 0;
|
|
30577
|
+
const u64 = (d, at) => {
|
|
30578
|
+
const value = u32(d, at) + u32(d, at + 4) * 2 ** 32;
|
|
30579
|
+
if (!Number.isSafeInteger(value)) throw invalid("ZIP64 value out of range");
|
|
30580
|
+
return value;
|
|
30581
|
+
};
|
|
30582
|
+
const requireRange = (d, at, length, what) => {
|
|
30583
|
+
if (at < 0 || length < 0 || at + length > d.length) throw invalid(`${what} is out of bounds`);
|
|
30584
|
+
};
|
|
30585
|
+
const findEocd = (d) => {
|
|
30586
|
+
const lowest = Math.max(0, d.length - EOCD_SIZE - MAX_COMMENT_LENGTH);
|
|
30587
|
+
for (let at = d.length - EOCD_SIZE; at >= lowest; at--) if (u32(d, at) === SIG_EOCD) return at;
|
|
30588
|
+
throw invalid("end of central directory not found");
|
|
30589
|
+
};
|
|
30590
|
+
const readCentralDirectoryLocation = (d) => {
|
|
30591
|
+
const eocd = findEocd(d);
|
|
30592
|
+
const locator = eocd - ZIP64_LOCATOR_SIZE;
|
|
30593
|
+
if (locator >= 0 && u32(d, locator) === SIG_ZIP64_LOCATOR) {
|
|
30594
|
+
const zip64Eocd = u32(d, locator + 8) + u32(d, locator + 12) * 2 ** 32;
|
|
30595
|
+
if (zip64Eocd + ZIP64_EOCD_MIN_SIZE <= d.length && u32(d, zip64Eocd) === SIG_ZIP64_EOCD) return {
|
|
30596
|
+
count: u64(d, zip64Eocd + 32),
|
|
30597
|
+
offset: u64(d, zip64Eocd + 48)
|
|
30598
|
+
};
|
|
30599
|
+
}
|
|
30600
|
+
return {
|
|
30601
|
+
count: u16(d, eocd + 10),
|
|
30602
|
+
offset: u32(d, eocd + 16)
|
|
30603
|
+
};
|
|
30604
|
+
};
|
|
30605
|
+
const resolveZip64Sizes = (d, extraStart, extraEnd, sizes) => {
|
|
30606
|
+
const needUncompressed = sizes.uncompressedSize === ZIP64_SENTINEL_32;
|
|
30607
|
+
const needCompressed = sizes.compressedSize === ZIP64_SENTINEL_32;
|
|
30608
|
+
const needOffset = sizes.localHeaderOffset === ZIP64_SENTINEL_32;
|
|
30609
|
+
if (!needUncompressed && !needCompressed && !needOffset) return sizes;
|
|
30610
|
+
for (let at = extraStart; at + 4 <= extraEnd; at += 4 + u16(d, at + 2)) {
|
|
30611
|
+
if (u16(d, at) !== ZIP64_EXTRA_ID) continue;
|
|
30612
|
+
const fieldEnd = at + 4 + u16(d, at + 2);
|
|
30613
|
+
if (fieldEnd > extraEnd) break;
|
|
30614
|
+
let cursor = at + 4;
|
|
30615
|
+
const next = () => {
|
|
30616
|
+
if (cursor + 8 > fieldEnd) throw invalid("ZIP64 extra field is truncated");
|
|
30617
|
+
const value = u64(d, cursor);
|
|
30618
|
+
cursor += 8;
|
|
30619
|
+
return value;
|
|
30620
|
+
};
|
|
30621
|
+
return {
|
|
30622
|
+
uncompressedSize: needUncompressed ? next() : sizes.uncompressedSize,
|
|
30623
|
+
compressedSize: needCompressed ? next() : sizes.compressedSize,
|
|
30624
|
+
localHeaderOffset: needOffset ? next() : sizes.localHeaderOffset
|
|
30625
|
+
};
|
|
30626
|
+
}
|
|
30627
|
+
throw invalid("ZIP64 sizes without a ZIP64 extra field");
|
|
30628
|
+
};
|
|
30629
|
+
const overflowError = (name, declaredSize) => invalid(`entry "${name}" inflates beyond its declared size of ${declaredSize} bytes`);
|
|
30630
|
+
const corruptError = (name, error) => {
|
|
30631
|
+
return invalid(`entry "${name}" is not valid DEFLATE data: ${error instanceof Error ? error.message : String(error)}`);
|
|
30632
|
+
};
|
|
30633
|
+
const inflateSmallEntry = (compressed, declaredSize, name) => {
|
|
30634
|
+
if (compressed.length === 0) return new Uint8Array(0);
|
|
30635
|
+
let out;
|
|
30636
|
+
try {
|
|
30637
|
+
out = inflateSync(compressed, { out: new Uint8Array(declaredSize + 1) });
|
|
30638
|
+
} catch (error) {
|
|
30639
|
+
if (error instanceof RangeError) throw overflowError(name, declaredSize);
|
|
30640
|
+
throw corruptError(name, error);
|
|
30641
|
+
}
|
|
30642
|
+
if (out.length > declaredSize) throw overflowError(name, declaredSize);
|
|
30643
|
+
return out;
|
|
30644
|
+
};
|
|
30645
|
+
const inflateLargeEntry = (compressed, declaredSize, name) => {
|
|
30646
|
+
const out = new Uint8Array(declaredSize);
|
|
30647
|
+
let overflowed = false;
|
|
30648
|
+
let produced = 0;
|
|
30649
|
+
const inflater = new Inflate((chunk) => {
|
|
30650
|
+
if (produced + chunk.length > declaredSize) {
|
|
30651
|
+
overflowed = true;
|
|
30652
|
+
throw overflowError(name, declaredSize);
|
|
30653
|
+
}
|
|
30654
|
+
out.set(chunk, produced);
|
|
30655
|
+
produced += chunk.length;
|
|
30656
|
+
});
|
|
30657
|
+
for (let at = 0; at < compressed.length; at += INFLATE_CHUNK_SIZE) {
|
|
30658
|
+
const end = Math.min(at + INFLATE_CHUNK_SIZE, compressed.length);
|
|
30659
|
+
try {
|
|
30660
|
+
inflater.push(compressed.subarray(at, end), end === compressed.length);
|
|
30661
|
+
} catch (error) {
|
|
30662
|
+
if (overflowed) throw error;
|
|
30663
|
+
throw corruptError(name, error);
|
|
30664
|
+
}
|
|
30665
|
+
}
|
|
30666
|
+
return out.subarray(0, produced);
|
|
30667
|
+
};
|
|
30668
|
+
const inflateEntry = (compressed, declaredSize, name) => {
|
|
30669
|
+
if (declaredSize > compressed.length * MAX_DEFLATE_RATIO + DEFLATE_RATIO_SLACK) throw invalid(`entry "${name}" declares ${declaredSize} bytes, more than ${compressed.length} compressed bytes can hold`);
|
|
30670
|
+
const out = compressed.length <= INFLATE_CHUNK_SIZE ? inflateSmallEntry(compressed, declaredSize, name) : inflateLargeEntry(compressed, declaredSize, name);
|
|
30671
|
+
if (out.length !== declaredSize) throw invalid(`entry "${name}" inflates to ${out.length} bytes, not its declared ${declaredSize}`);
|
|
30672
|
+
return out;
|
|
30673
|
+
};
|
|
30521
30674
|
/**
|
|
30522
30675
|
* Reads a ZIP archive (a `.pptx` file is a ZIP) and returns entries in
|
|
30523
|
-
* central-directory order. Throws if `input` is not a valid ZIP
|
|
30676
|
+
* central-directory order. Throws if `input` is not a valid ZIP, if two
|
|
30677
|
+
* entries share a name, or if an entry's data does not match the size its
|
|
30678
|
+
* central-directory record declares.
|
|
30524
30679
|
*/
|
|
30525
30680
|
const readZip = (input) => {
|
|
30526
|
-
const
|
|
30681
|
+
const { offset, count } = readCentralDirectoryLocation(input);
|
|
30527
30682
|
const entries = [];
|
|
30528
|
-
|
|
30529
|
-
|
|
30530
|
-
|
|
30531
|
-
|
|
30683
|
+
const seen = /* @__PURE__ */ new Set();
|
|
30684
|
+
let cursor = offset;
|
|
30685
|
+
for (let i = 0; i < count; i++) {
|
|
30686
|
+
requireRange(input, cursor, CENTRAL_HEADER_SIZE, "central directory");
|
|
30687
|
+
if (u32(input, cursor) !== SIG_CENTRAL_HEADER) throw invalid("bad central directory signature");
|
|
30688
|
+
const flags = u16(input, cursor + 8);
|
|
30689
|
+
const method = u16(input, cursor + 10);
|
|
30690
|
+
const nameLength = u16(input, cursor + 28);
|
|
30691
|
+
const extraLength = u16(input, cursor + 30);
|
|
30692
|
+
const commentLength = u16(input, cursor + 32);
|
|
30693
|
+
const nameStart = cursor + CENTRAL_HEADER_SIZE;
|
|
30694
|
+
const extraStart = nameStart + nameLength;
|
|
30695
|
+
const recordEnd = extraStart + extraLength + commentLength;
|
|
30696
|
+
requireRange(input, cursor, recordEnd - cursor, "central directory");
|
|
30697
|
+
const name = strFromU8(input.subarray(nameStart, extraStart), (flags & FLAG_UTF8) === 0);
|
|
30698
|
+
const { compressedSize, uncompressedSize, localHeaderOffset } = resolveZip64Sizes(input, extraStart, extraStart + extraLength, {
|
|
30699
|
+
compressedSize: u32(input, cursor + 20),
|
|
30700
|
+
uncompressedSize: u32(input, cursor + 24),
|
|
30701
|
+
localHeaderOffset: u32(input, cursor + 42)
|
|
30702
|
+
});
|
|
30703
|
+
cursor = recordEnd;
|
|
30704
|
+
if (seen.has(name)) throw invalid(`duplicate entry "${name}"`);
|
|
30705
|
+
seen.add(name);
|
|
30706
|
+
requireRange(input, localHeaderOffset, LOCAL_HEADER_SIZE, `local header of "${name}"`);
|
|
30707
|
+
if (u32(input, localHeaderOffset) !== SIG_LOCAL_HEADER) throw invalid(`bad local header signature for "${name}"`);
|
|
30708
|
+
const dataStart = localHeaderOffset + LOCAL_HEADER_SIZE + u16(input, localHeaderOffset + 26) + u16(input, localHeaderOffset + 28);
|
|
30709
|
+
requireRange(input, dataStart, compressedSize, `data of "${name}"`);
|
|
30710
|
+
const compressed = input.subarray(dataStart, dataStart + compressedSize);
|
|
30711
|
+
if (method === METHOD_STORE) {
|
|
30712
|
+
if (compressedSize !== uncompressedSize) throw invalid(`stored entry "${name}" has mismatched sizes`);
|
|
30713
|
+
entries.push({
|
|
30714
|
+
name,
|
|
30715
|
+
data: compressed.slice()
|
|
30716
|
+
});
|
|
30717
|
+
} else if (method === METHOD_DEFLATE) entries.push({
|
|
30532
30718
|
name,
|
|
30533
|
-
data
|
|
30719
|
+
data: inflateEntry(compressed, uncompressedSize, name)
|
|
30534
30720
|
});
|
|
30721
|
+
else throw invalid(`entry "${name}" uses unsupported compression method ${method}`);
|
|
30535
30722
|
}
|
|
30536
30723
|
return { entries };
|
|
30537
30724
|
};
|
|
@@ -30601,7 +30788,7 @@ const relsPartNameFor = (name) => {
|
|
|
30601
30788
|
};
|
|
30602
30789
|
/**
|
|
30603
30790
|
* Resolves a relationship Target (which may be relative) against a base part
|
|
30604
|
-
* name. Returns the absolute part name (always starts with `/`).
|
|
30791
|
+
* name, or against `PACKAGE_ROOT` for a package-root relationship. Returns the absolute part name (always starts with `/`).
|
|
30605
30792
|
*
|
|
30606
30793
|
* `target` is from a Relationship element's `Target` attribute when
|
|
30607
30794
|
* `TargetMode="Internal"`. External targets must not be passed through here.
|
|
@@ -30609,7 +30796,7 @@ const relsPartNameFor = (name) => {
|
|
|
30609
30796
|
const resolveTarget = (basePart, target) => {
|
|
30610
30797
|
if (target === "") throw new Error("relationship target is empty");
|
|
30611
30798
|
if (target.startsWith("/")) return partName(target);
|
|
30612
|
-
const baseDir = dirname(basePart);
|
|
30799
|
+
const baseDir = basePart === "/" ? "/" : dirname(basePart);
|
|
30613
30800
|
const stack = baseDir === "/" ? [] : baseDir.slice(1).split("/");
|
|
30614
30801
|
for (const segment of target.split("/")) {
|
|
30615
30802
|
if (segment === "" || segment === ".") continue;
|
|
@@ -30695,8 +30882,13 @@ const serializeContentTypes = (ct) => {
|
|
|
30695
30882
|
epilog: []
|
|
30696
30883
|
});
|
|
30697
30884
|
};
|
|
30885
|
+
const defaultKeyOf = (name) => {
|
|
30886
|
+
const file = basename(name);
|
|
30887
|
+
const dot = file.lastIndexOf(".");
|
|
30888
|
+
return dot < 0 ? null : file.slice(dot + 1).toLowerCase();
|
|
30889
|
+
};
|
|
30698
30890
|
/**
|
|
30699
|
-
*
|
|
30891
|
+
* Builds a resolver for many part names against one `ContentTypes`.
|
|
30700
30892
|
*
|
|
30701
30893
|
* 1. The first Override whose PartName matches case-insensitively wins.
|
|
30702
30894
|
* 2. Otherwise, the first Default whose Extension matches the part's
|
|
@@ -30704,13 +30896,35 @@ const serializeContentTypes = (ct) => {
|
|
|
30704
30896
|
* 3. Returns `null` if neither rule matches — `[Content_Types].xml` is
|
|
30705
30897
|
* required to cover every part, so a null here indicates a malformed
|
|
30706
30898
|
* package.
|
|
30899
|
+
*
|
|
30900
|
+
* The resolver snapshots `ct`; later edits to it are not reflected.
|
|
30901
|
+
*/
|
|
30902
|
+
const contentTypeResolver = (ct) => {
|
|
30903
|
+
const overrides = /* @__PURE__ */ new Map();
|
|
30904
|
+
for (const o of ct.overrides) {
|
|
30905
|
+
const key = o.partName.toLowerCase();
|
|
30906
|
+
if (!overrides.has(key)) overrides.set(key, o.contentType);
|
|
30907
|
+
}
|
|
30908
|
+
const defaults = /* @__PURE__ */ new Map();
|
|
30909
|
+
for (const d of ct.defaults) {
|
|
30910
|
+
const key = d.extension.toLowerCase();
|
|
30911
|
+
if (!defaults.has(key)) defaults.set(key, d.contentType);
|
|
30912
|
+
}
|
|
30913
|
+
return (name) => {
|
|
30914
|
+
const override = overrides.get(name.toLowerCase());
|
|
30915
|
+
if (override !== void 0) return override;
|
|
30916
|
+
const ext = defaultKeyOf(name);
|
|
30917
|
+
return ext === null ? null : defaults.get(ext) ?? null;
|
|
30918
|
+
};
|
|
30919
|
+
};
|
|
30920
|
+
/**
|
|
30921
|
+
* Resolves the content type of one part name by the rules of
|
|
30922
|
+
* `contentTypeResolver`, scanning without building maps.
|
|
30707
30923
|
*/
|
|
30708
30924
|
const lookupContentType = (ct, name) => {
|
|
30709
30925
|
for (const o of ct.overrides) if (partNamesEqual(o.partName, name)) return o.contentType;
|
|
30710
|
-
const
|
|
30711
|
-
|
|
30712
|
-
if (dot < 0) return null;
|
|
30713
|
-
const ext = file.slice(dot + 1).toLowerCase();
|
|
30926
|
+
const ext = defaultKeyOf(name);
|
|
30927
|
+
if (ext === null) return null;
|
|
30714
30928
|
for (const d of ct.defaults) if (d.extension.toLowerCase() === ext) return d.contentType;
|
|
30715
30929
|
return null;
|
|
30716
30930
|
};
|
|
@@ -31083,9 +31297,9 @@ const detectAudioFormat = (bytes) => {
|
|
|
31083
31297
|
};
|
|
31084
31298
|
//#endregion
|
|
31085
31299
|
//#region src/internal/parts/package.ts
|
|
31086
|
-
const TEXT_DECODER$
|
|
31300
|
+
const TEXT_DECODER$2 = new TextDecoder();
|
|
31087
31301
|
const TEXT_ENCODER$3 = new TextEncoder();
|
|
31088
|
-
const decode$2 = (b) => TEXT_DECODER$
|
|
31302
|
+
const decode$2 = (b) => TEXT_DECODER$2.decode(b);
|
|
31089
31303
|
const encode$3 = (s) => TEXT_ENCODER$3.encode(s);
|
|
31090
31304
|
const parsedRels = /* @__PURE__ */ new WeakMap();
|
|
31091
31305
|
const readRels = (bytes) => {
|
|
@@ -31105,16 +31319,29 @@ const CONTENT_TYPES_PART = "[Content_Types].xml";
|
|
|
31105
31319
|
var OpcPackage = class OpcPackage {
|
|
31106
31320
|
/**
|
|
31107
31321
|
* Ordered list of parts. The order is the order parts will be written to
|
|
31108
|
-
* the ZIP central directory on `save()`.
|
|
31109
|
-
*
|
|
31110
|
-
*
|
|
31322
|
+
* the ZIP central directory on `save()`. Read-only so every change goes
|
|
31323
|
+
* through `addPart` / `removePart` / `retainParts`, which keep the name
|
|
31324
|
+
* index in sync.
|
|
31111
31325
|
*/
|
|
31112
|
-
parts
|
|
31326
|
+
get parts() {
|
|
31327
|
+
return this.partList;
|
|
31328
|
+
}
|
|
31329
|
+
partList;
|
|
31113
31330
|
/** Mutable Content_Types map. Direct mutation is allowed. */
|
|
31114
31331
|
contentTypes;
|
|
31332
|
+
/** Lowercased part name → first part with that name, for `getPart`. */
|
|
31333
|
+
partsByName = /* @__PURE__ */ new Map();
|
|
31115
31334
|
constructor(parts, contentTypes) {
|
|
31116
|
-
this.
|
|
31335
|
+
this.partList = parts;
|
|
31117
31336
|
this.contentTypes = contentTypes;
|
|
31337
|
+
this.indexParts();
|
|
31338
|
+
}
|
|
31339
|
+
indexParts() {
|
|
31340
|
+
this.partsByName.clear();
|
|
31341
|
+
for (const part of this.parts) {
|
|
31342
|
+
const key = part.name.toLowerCase();
|
|
31343
|
+
if (!this.partsByName.has(key)) this.partsByName.set(key, part);
|
|
31344
|
+
}
|
|
31118
31345
|
}
|
|
31119
31346
|
/**
|
|
31120
31347
|
* Builds an empty package containing only the two default content-type
|
|
@@ -31150,8 +31377,9 @@ var OpcPackage = class OpcPackage {
|
|
|
31150
31377
|
});
|
|
31151
31378
|
}
|
|
31152
31379
|
if (contentTypes === null) throw new Error("package is missing [Content_Types].xml");
|
|
31380
|
+
const resolveContentType = contentTypeResolver(contentTypes);
|
|
31153
31381
|
for (const part of parts) {
|
|
31154
|
-
const ct =
|
|
31382
|
+
const ct = resolveContentType(part.name);
|
|
31155
31383
|
if (ct === null) throw new Error(`part "${part.name}" has no content type registered in [Content_Types].xml`);
|
|
31156
31384
|
part.contentType = ct;
|
|
31157
31385
|
}
|
|
@@ -31174,8 +31402,7 @@ var OpcPackage = class OpcPackage {
|
|
|
31174
31402
|
* Looks up a part by name (case-insensitive per OPC §9.1.1.7).
|
|
31175
31403
|
*/
|
|
31176
31404
|
getPart(name) {
|
|
31177
|
-
|
|
31178
|
-
return null;
|
|
31405
|
+
return this.partsByName.get(name.toLowerCase()) ?? null;
|
|
31179
31406
|
}
|
|
31180
31407
|
/**
|
|
31181
31408
|
* Adds a new part. Throws if a part with the same name (case-insensitive)
|
|
@@ -31189,7 +31416,8 @@ var OpcPackage = class OpcPackage {
|
|
|
31189
31416
|
contentType,
|
|
31190
31417
|
data
|
|
31191
31418
|
};
|
|
31192
|
-
this.
|
|
31419
|
+
this.partList.push(part);
|
|
31420
|
+
this.partsByName.set(name.toLowerCase(), part);
|
|
31193
31421
|
if (lookupContentType(this.contentTypes, name) !== contentType) this.contentTypes.overrides.push({
|
|
31194
31422
|
partName: name,
|
|
31195
31423
|
contentType
|
|
@@ -31203,14 +31431,35 @@ var OpcPackage = class OpcPackage {
|
|
|
31203
31431
|
*/
|
|
31204
31432
|
removePart(name) {
|
|
31205
31433
|
let removed = false;
|
|
31206
|
-
for (let i = this.
|
|
31207
|
-
const p = this.
|
|
31434
|
+
for (let i = this.partList.length - 1; i >= 0; i--) {
|
|
31435
|
+
const p = this.partList[i];
|
|
31208
31436
|
if (p && partNamesEqual(p.name, name)) {
|
|
31209
|
-
this.
|
|
31437
|
+
this.partList.splice(i, 1);
|
|
31210
31438
|
removed = true;
|
|
31211
31439
|
}
|
|
31212
31440
|
}
|
|
31213
|
-
if (removed)
|
|
31441
|
+
if (removed) {
|
|
31442
|
+
this.partsByName.delete(name.toLowerCase());
|
|
31443
|
+
this.contentTypes.overrides = this.contentTypes.overrides.filter((o) => !partNamesEqual(o.partName, name));
|
|
31444
|
+
}
|
|
31445
|
+
return removed;
|
|
31446
|
+
}
|
|
31447
|
+
/**
|
|
31448
|
+
* Keeps only the parts `keep` accepts and drops the `Override` entries of
|
|
31449
|
+
* the removed ones, in one pass (`removePart` per part would be O(n²)).
|
|
31450
|
+
* Returns the removed part names in package order.
|
|
31451
|
+
*/
|
|
31452
|
+
retainParts(keep) {
|
|
31453
|
+
const removed = [];
|
|
31454
|
+
let kept = 0;
|
|
31455
|
+
for (const part of this.partList) if (keep(part)) this.partList[kept++] = part;
|
|
31456
|
+
else removed.push(part.name);
|
|
31457
|
+
this.partList.length = kept;
|
|
31458
|
+
if (removed.length > 0) {
|
|
31459
|
+
this.indexParts();
|
|
31460
|
+
const gone = new Set(removed.map((name) => name.toLowerCase()));
|
|
31461
|
+
this.contentTypes.overrides = this.contentTypes.overrides.filter((o) => !gone.has(o.partName.toLowerCase()));
|
|
31462
|
+
}
|
|
31214
31463
|
return removed;
|
|
31215
31464
|
}
|
|
31216
31465
|
/**
|
|
@@ -31414,9 +31663,9 @@ const savePresentation = (pres) => {
|
|
|
31414
31663
|
};
|
|
31415
31664
|
//#endregion
|
|
31416
31665
|
//#region src/api/fn/_helpers.ts
|
|
31417
|
-
const TEXT_DECODER = new TextDecoder();
|
|
31666
|
+
const TEXT_DECODER$1 = new TextDecoder();
|
|
31418
31667
|
const TEXT_ENCODER$1 = new TextEncoder();
|
|
31419
|
-
const decode$1 = (b) => TEXT_DECODER.decode(b);
|
|
31668
|
+
const decode$1 = (b) => TEXT_DECODER$1.decode(b);
|
|
31420
31669
|
const encode$1 = (s) => TEXT_ENCODER$1.encode(s);
|
|
31421
31670
|
const SLIDE_LAYOUT_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml";
|
|
31422
31671
|
const SLIDE_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.presentationml.slide+xml";
|
|
@@ -32677,7 +32926,7 @@ const NAME_THEME_ELEMENTS = qname("a", "themeElements", NS.dml);
|
|
|
32677
32926
|
const NAME_CLR_SCHEME = qname("a", "clrScheme", NS.dml);
|
|
32678
32927
|
const NAME_SRGB_CLR$1 = qname("a", "srgbClr", NS.dml);
|
|
32679
32928
|
const NAME_SYS_CLR = qname("a", "sysClr", NS.dml);
|
|
32680
|
-
const ATTR_VAL$
|
|
32929
|
+
const ATTR_VAL$5 = qname("", "val", "");
|
|
32681
32930
|
const ATTR_NAME$4 = qname("", "name", "");
|
|
32682
32931
|
const ATTR_TYPEFACE$1 = qname("", "typeface", "");
|
|
32683
32932
|
const CLR_SCHEME_SLOTS = [
|
|
@@ -32865,7 +33114,7 @@ const setPresentationTheme = (pres, theme) => {
|
|
|
32865
33114
|
const slotName = qname("a", local, NS.dml);
|
|
32866
33115
|
const idx = clrScheme.children.findIndex((c) => c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === local);
|
|
32867
33116
|
if (idx < 0) throw new Error(`setPresentationTheme: clrScheme is missing <a:${local}>`);
|
|
32868
|
-
clrScheme.children[idx] = elem(slotName, { children: [elem(NAME_SRGB_CLR$1, { attrs: [attr(ATTR_VAL$
|
|
33117
|
+
clrScheme.children[idx] = elem(slotName, { children: [elem(NAME_SRGB_CLR$1, { attrs: [attr(ATTR_VAL$5, hex)] })] });
|
|
32869
33118
|
}
|
|
32870
33119
|
themePart.data = encode$1(serializeXml(doc));
|
|
32871
33120
|
};
|
|
@@ -34699,11 +34948,11 @@ const NS_R = NS.officeDocRels;
|
|
|
34699
34948
|
const c = (local) => qname("c", local, NS_C$1);
|
|
34700
34949
|
const a$2 = (local) => qname("a", local, NS_A$1);
|
|
34701
34950
|
const r = (local) => qname("r", local, NS_R);
|
|
34702
|
-
const ATTR_VAL$
|
|
34703
|
-
const ATTR_IDX$
|
|
34704
|
-
const valNode = (name, val) => elem(name, { attrs: [attr(ATTR_VAL$
|
|
34951
|
+
const ATTR_VAL$4 = qname("", "val", "");
|
|
34952
|
+
const ATTR_IDX$3 = qname("", "idx", "");
|
|
34953
|
+
const valNode = (name, val) => elem(name, { attrs: [attr(ATTR_VAL$4, String(val))] });
|
|
34705
34954
|
const ptNode = (idx, value) => elem(c("pt"), {
|
|
34706
|
-
attrs: [attr(ATTR_IDX$
|
|
34955
|
+
attrs: [attr(ATTR_IDX$3, String(idx))],
|
|
34707
34956
|
children: [elem(c("v"), { children: [text(value)] })]
|
|
34708
34957
|
});
|
|
34709
34958
|
const strRef = (formula, points) => {
|
|
@@ -34719,7 +34968,7 @@ const numRef = (formula, points, formatCode = "General") => elem(c("numRef"), {
|
|
|
34719
34968
|
const multiLvlStrRef = (formula, levels, pointCount) => elem(c("multiLvlStrRef"), { children: [elem(c("f"), { children: [text(formula)] }), elem(c("multiLvlStrCache"), { children: [valNode(c("ptCount"), pointCount), ...levels.map((level, depth) => elem(c("lvl"), { children: level.map((label, i) => depth > 0 && label === "" ? null : ptNode(i, label)).filter((n) => n !== null) }))] })] });
|
|
34720
34969
|
const hexOf = (color) => color.replace(/^#/, "").toUpperCase();
|
|
34721
34970
|
const solidFill = (color, opacity) => elem(a$2("solidFill"), { children: [elem(a$2("srgbClr"), {
|
|
34722
|
-
attrs: [attr(ATTR_VAL$
|
|
34971
|
+
attrs: [attr(ATTR_VAL$4, hexOf(color))],
|
|
34723
34972
|
children: opacity !== void 0 ? [valNode(a$2("alpha"), boundedInt(opacity * 1e5, "percent100000", "chart series: fillOpacity"))] : []
|
|
34724
34973
|
})] });
|
|
34725
34974
|
const solidFillSpPr = (color, opacity) => elem(c("spPr"), { children: [solidFill(color, opacity)] });
|
|
@@ -34901,8 +35150,7 @@ const seriesElement = (spec, seriesIdx, layout) => {
|
|
|
34901
35150
|
children.push(markerElement(series.markerSymbol ?? (markersOff ? "none" : void 0), series.markerSizePt, markerColor, markerLineColor));
|
|
34902
35151
|
}
|
|
34903
35152
|
for (const dPt of dPtElements(series.pointColors, series.pointExplosions, series.fillOpacity, spec.bubble3D === true)) children.push(dPt);
|
|
34904
|
-
|
|
34905
|
-
const serDLbls = buildDLblsFromLabels(series.dataLabels, series.pointDataLabels);
|
|
35153
|
+
const serDLbls = buildDLblsFromLabels(series.dataLabels ?? (series.pointDataLabels !== void 0 ? spec.dataLabels ?? HIDDEN_DATA_LABELS : void 0), series.pointDataLabels);
|
|
34906
35154
|
if (serDLbls !== null) children.push(serDLbls);
|
|
34907
35155
|
if (series.trendline && SHAPES_WITH_TRENDLINE.has(shape) && spec.kind !== "stock") children.push(trendlineElement(series.trendline));
|
|
34908
35156
|
if (series.errorBars !== void 0 || series.xErrorBars !== void 0) {
|
|
@@ -34996,8 +35244,7 @@ const catAxis = (spec) => {
|
|
|
34996
35244
|
if (spec.categoryAxisMinorGridlines) children.push(gridlinesElement("minorGridlines", spec.categoryAxisMinorGridlineColor, spec.categoryAxisMinorGridlineWidthEmu, "chart: categoryAxisMinorGridlineWidthEmu"));
|
|
34997
35245
|
if (spec.categoryAxisTitle !== void 0) children.push(titleElement(spec.categoryAxisTitle, spec.categoryAxisTitleStyle, spec.categoryAxisTitleRotationDeg));
|
|
34998
35246
|
if (spec.categoryAxisNumberFormat !== void 0) children.push(elem(c("numFmt"), { attrs: [attr(qname("", "formatCode", ""), spec.categoryAxisNumberFormat), attr(qname("", "sourceLinked", ""), "0")] }));
|
|
34999
|
-
|
|
35000
|
-
if (spec.categoryAxisMinorTickMark !== void 0) children.push(valNode(c("minorTickMark"), spec.categoryAxisMinorTickMark));
|
|
35247
|
+
children.push(valNode(c("majorTickMark"), spec.categoryAxisMajorTickMark ?? (spec.kind === "bar" || spec.kind === "column" ? "none" : "out")), valNode(c("minorTickMark"), spec.categoryAxisMinorTickMark ?? "none"));
|
|
35001
35248
|
if (spec.categoryAxisTickLabelPos !== void 0) children.push(valNode(c("tickLblPos"), spec.categoryAxisTickLabelPos));
|
|
35002
35249
|
const catLine = lineSpPr(spec.categoryAxisLineColor, spec.categoryAxisLineWidthEmu, "chart: categoryAxisLineWidthEmu", spec.categoryAxisLineHidden === true);
|
|
35003
35250
|
if (catLine !== null) children.push(catLine);
|
|
@@ -35037,8 +35284,7 @@ const valueAxisElement = (f, ids) => {
|
|
|
35037
35284
|
if (f.minorGridlines) children.push(gridlinesElement("minorGridlines", f.minorGridlineColor, f.minorGridlineWidthEmu, `chart: ${f.widthFields.minorGridline}`));
|
|
35038
35285
|
if (f.title !== void 0) children.push(titleElement(f.title, f.titleStyle, f.titleRotationDeg));
|
|
35039
35286
|
if (f.scaling?.numberFormat !== void 0) children.push(elem(c("numFmt"), { attrs: [attr(qname("", "formatCode", ""), f.scaling.numberFormat), attr(qname("", "sourceLinked", ""), "0")] }));
|
|
35040
|
-
|
|
35041
|
-
if (f.minorTickMark !== void 0) children.push(valNode(c("minorTickMark"), f.minorTickMark));
|
|
35287
|
+
children.push(valNode(c("majorTickMark"), f.majorTickMark ?? "out"), valNode(c("minorTickMark"), f.minorTickMark ?? "none"));
|
|
35042
35288
|
if (f.tickLabelPos !== void 0) children.push(valNode(c("tickLblPos"), f.tickLabelPos));
|
|
35043
35289
|
const axisLine = lineSpPr(f.lineColor, f.lineWidthEmu, `chart: ${f.widthFields.line}`, f.lineHidden === true);
|
|
35044
35290
|
if (axisLine !== null) children.push(axisLine);
|
|
@@ -35142,6 +35388,7 @@ const serAxis = (spec) => {
|
|
|
35142
35388
|
];
|
|
35143
35389
|
if (s.majorGridlines) children.push(elem(c("majorGridlines")));
|
|
35144
35390
|
if (s.title !== void 0) children.push(titleElement(s.title, s.titleStyle));
|
|
35391
|
+
children.push(valNode(c("majorTickMark"), "out"), valNode(c("minorTickMark"), "none"));
|
|
35145
35392
|
if (s.tickLabelPos !== void 0) children.push(valNode(c("tickLblPos"), s.tickLabelPos));
|
|
35146
35393
|
const line = lineSpPr(s.lineColor, void 0, "chart: seriesAxis");
|
|
35147
35394
|
if (line !== null) children.push(line);
|
|
@@ -35151,13 +35398,19 @@ const serAxis = (spec) => {
|
|
|
35151
35398
|
if (s.tickLabelSkip !== void 0) children.push(valNode(c("tickLblSkip"), s.tickLabelSkip));
|
|
35152
35399
|
return elem(c("serAx"), { children });
|
|
35153
35400
|
};
|
|
35401
|
+
const HIDDEN_DATA_LABELS = {
|
|
35402
|
+
showValue: false,
|
|
35403
|
+
showCategory: false,
|
|
35404
|
+
showSeriesName: false,
|
|
35405
|
+
showPercent: false
|
|
35406
|
+
};
|
|
35154
35407
|
const buildDLblsFromLabels = (dl, pointLabels = void 0) => {
|
|
35155
35408
|
const children = [];
|
|
35156
35409
|
pointLabels?.forEach((pl, i) => {
|
|
35157
35410
|
if (pl === null) return;
|
|
35158
35411
|
children.push(elem(c("dLbl"), { children: [
|
|
35159
35412
|
valNode(c("idx"), i),
|
|
35160
|
-
...pl.text !== void 0 ? [elem(c("tx"), { children: [richText(pl.text)] })] : [],
|
|
35413
|
+
...pl.text !== void 0 ? [elem(c("tx"), { children: [richText(pl.text, pl.textStyle)] })] : [],
|
|
35161
35414
|
...dLblGroupChildren(pl)
|
|
35162
35415
|
] }));
|
|
35163
35416
|
});
|
|
@@ -35469,11 +35722,15 @@ const manualLayoutElement = (position, size, target) => elem(c("layout"), { chil
|
|
|
35469
35722
|
valNode(c("y"), position.y),
|
|
35470
35723
|
...size !== void 0 ? [valNode(c("w"), size.w), valNode(c("h"), size.h)] : []
|
|
35471
35724
|
] })] });
|
|
35472
|
-
const richText = (value) =>
|
|
35473
|
-
elem(a$2("
|
|
35474
|
-
elem(a$2("
|
|
35475
|
-
|
|
35476
|
-
|
|
35725
|
+
const richText = (value, style) => {
|
|
35726
|
+
const run = elem(a$2("r"), { children: [...style !== void 0 ? [elem(a$2("rPr"), rPrAttrsFromStyle(style))] : [], elem(a$2("t"), { children: [text(value)] })] });
|
|
35727
|
+
const pPr = style !== void 0 ? [elem(a$2("pPr"), { children: [elem(a$2("defRPr"), rPrAttrsFromStyle(style))] })] : [];
|
|
35728
|
+
return elem(c("rich"), { children: [
|
|
35729
|
+
elem(a$2("bodyPr")),
|
|
35730
|
+
elem(a$2("lstStyle")),
|
|
35731
|
+
elem(a$2("p"), { children: [...pPr, run] })
|
|
35732
|
+
] });
|
|
35733
|
+
};
|
|
35477
35734
|
const titleElement = (title, style, rotationDeg, placement) => {
|
|
35478
35735
|
const pPr = elem(a$2("pPr"), { children: [elem(a$2("defRPr"))] });
|
|
35479
35736
|
const { attrs: runAttrs, children: runChildren } = rPrAttrsFromStyle(style);
|
|
@@ -35708,8 +35965,8 @@ const NAME_R_DML = qname("a", "r", NS_A);
|
|
|
35708
35965
|
const NAME_SP_PR_C = qname("c", "spPr", NS_C);
|
|
35709
35966
|
const NAME_SOLID_FILL$1 = qname("a", "solidFill", NS_A);
|
|
35710
35967
|
const NAME_SRGB_CLR = qname("a", "srgbClr", NS_A);
|
|
35711
|
-
const ATTR_VAL$
|
|
35712
|
-
const ATTR_IDX$
|
|
35968
|
+
const ATTR_VAL$3 = qname("", "val", "");
|
|
35969
|
+
const ATTR_IDX$2 = qname("", "idx", "");
|
|
35713
35970
|
/** Kinds a combo plot group can carry (mirrors `ChartSeries.chartKind`). */
|
|
35714
35971
|
const isComboSeriesKind = (kind) => kind === "bar" || kind === "column" || kind === "line" || kind === "area";
|
|
35715
35972
|
const KIND_MAP = [
|
|
@@ -35787,11 +36044,11 @@ const findFirst = (parent, names) => {
|
|
|
35787
36044
|
};
|
|
35788
36045
|
const readPtCount = (host) => {
|
|
35789
36046
|
const ptCountEl = firstChildElement(host, NAME_PT_COUNT);
|
|
35790
|
-
const raw = ptCountEl !== null ? getAttrValue(ptCountEl, ATTR_VAL$
|
|
36047
|
+
const raw = ptCountEl !== null ? getAttrValue(ptCountEl, ATTR_VAL$3) : null;
|
|
35791
36048
|
return raw !== null ? Number.parseInt(raw, 10) : NaN;
|
|
35792
36049
|
};
|
|
35793
36050
|
const readXmlBool = (el) => {
|
|
35794
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
36051
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
35795
36052
|
return v === null || v === "1" || v === "true";
|
|
35796
36053
|
};
|
|
35797
36054
|
const parsePointIndex = (raw, limit) => {
|
|
@@ -35801,14 +36058,14 @@ const parsePointIndex = (raw, limit) => {
|
|
|
35801
36058
|
};
|
|
35802
36059
|
const readPointIndex = (host, pointCount) => {
|
|
35803
36060
|
const idxEl = firstChildElement(host, qname("c", "idx", NS_C));
|
|
35804
|
-
return parsePointIndex(idxEl !== null ? getAttrValue(idxEl, ATTR_VAL$
|
|
36061
|
+
return parsePointIndex(idxEl !== null ? getAttrValue(idxEl, ATTR_VAL$3) : null, pointCount);
|
|
35805
36062
|
};
|
|
35806
36063
|
const readPtArray = (cache, countHost = cache) => {
|
|
35807
36064
|
const out = [];
|
|
35808
36065
|
const ptCount = readPtCount(countHost);
|
|
35809
36066
|
const idxLimit = Number.isFinite(ptCount) ? Math.min(ptCount, MAX_PT_COUNT) : MAX_PT_COUNT;
|
|
35810
36067
|
for (const pt of allChildElements(cache, NAME_PT)) {
|
|
35811
|
-
const idx = parsePointIndex(getAttrValue(pt, ATTR_IDX$
|
|
36068
|
+
const idx = parsePointIndex(getAttrValue(pt, ATTR_IDX$2), idxLimit);
|
|
35812
36069
|
if (idx === null) continue;
|
|
35813
36070
|
const v = firstChildElement(pt, NAME_V);
|
|
35814
36071
|
if (v === null) continue;
|
|
@@ -35877,7 +36134,7 @@ const readDataPointOverrides = (ser, pointCount) => {
|
|
|
35877
36134
|
if (solidFill) {
|
|
35878
36135
|
const srgb = firstChildElement(solidFill, NAME_SRGB_CLR);
|
|
35879
36136
|
if (srgb) {
|
|
35880
|
-
const val = getAttrValue(srgb, ATTR_VAL$
|
|
36137
|
+
const val = getAttrValue(srgb, ATTR_VAL$3);
|
|
35881
36138
|
if (val !== null) {
|
|
35882
36139
|
colors[idx] = `#${val.toUpperCase()}`;
|
|
35883
36140
|
anyColor = true;
|
|
@@ -35887,7 +36144,7 @@ const readDataPointOverrides = (ser, pointCount) => {
|
|
|
35887
36144
|
}
|
|
35888
36145
|
const explEl = firstChildElement(c, qname("c", "explosion", NS_C));
|
|
35889
36146
|
if (explEl) {
|
|
35890
|
-
const v = getAttrValue(explEl, ATTR_VAL$
|
|
36147
|
+
const v = getAttrValue(explEl, ATTR_VAL$3);
|
|
35891
36148
|
if (v !== null) {
|
|
35892
36149
|
const n = Number.parseInt(v, 10);
|
|
35893
36150
|
if (Number.isFinite(n) && n > 0) {
|
|
@@ -35913,7 +36170,7 @@ const readTrendline = (ser) => {
|
|
|
35913
36170
|
if (acc.length > 0) name = acc;
|
|
35914
36171
|
}
|
|
35915
36172
|
const typeEl = firstChildElement(tl, qname("c", "trendlineType", NS_C));
|
|
35916
|
-
const tToken = typeEl ? getAttrValue(typeEl, ATTR_VAL$
|
|
36173
|
+
const tToken = typeEl ? getAttrValue(typeEl, ATTR_VAL$3) : null;
|
|
35917
36174
|
let type;
|
|
35918
36175
|
switch (tToken) {
|
|
35919
36176
|
case "exp":
|
|
@@ -35930,7 +36187,7 @@ const readTrendline = (ser) => {
|
|
|
35930
36187
|
if (type === "movingAvg") {
|
|
35931
36188
|
const pEl = firstChildElement(tl, qname("c", "period", NS_C));
|
|
35932
36189
|
if (pEl) {
|
|
35933
|
-
const v = getAttrValue(pEl, ATTR_VAL$
|
|
36190
|
+
const v = getAttrValue(pEl, ATTR_VAL$3);
|
|
35934
36191
|
if (v !== null) {
|
|
35935
36192
|
const n = Number.parseInt(v, 10);
|
|
35936
36193
|
if (Number.isFinite(n) && n > 0) period = n;
|
|
@@ -35941,7 +36198,7 @@ const readTrendline = (ser) => {
|
|
|
35941
36198
|
if (type === "poly") {
|
|
35942
36199
|
const oEl = firstChildElement(tl, qname("c", "order", NS_C));
|
|
35943
36200
|
if (oEl) {
|
|
35944
|
-
const v = getAttrValue(oEl, ATTR_VAL$
|
|
36201
|
+
const v = getAttrValue(oEl, ATTR_VAL$3);
|
|
35945
36202
|
if (v !== null) {
|
|
35946
36203
|
const n = Number.parseInt(v, 10);
|
|
35947
36204
|
if (Number.isFinite(n) && n >= 2) order = n;
|
|
@@ -35957,7 +36214,7 @@ const readTrendline = (ser) => {
|
|
|
35957
36214
|
if (solid) {
|
|
35958
36215
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
35959
36216
|
if (srgb) {
|
|
35960
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
36217
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
35961
36218
|
if (v !== null) color = `#${v.toUpperCase()}`;
|
|
35962
36219
|
}
|
|
35963
36220
|
}
|
|
@@ -35966,7 +36223,7 @@ const readTrendline = (ser) => {
|
|
|
35966
36223
|
const readExtension = (local) => {
|
|
35967
36224
|
const el = firstChildElement(tl, qname("c", local, NS_C));
|
|
35968
36225
|
if (!el) return void 0;
|
|
35969
|
-
const raw = getAttrValue(el, ATTR_VAL$
|
|
36226
|
+
const raw = getAttrValue(el, ATTR_VAL$3);
|
|
35970
36227
|
if (raw === null) return void 0;
|
|
35971
36228
|
const n = Number.parseFloat(raw);
|
|
35972
36229
|
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
@@ -35976,7 +36233,7 @@ const readTrendline = (ser) => {
|
|
|
35976
36233
|
const readDispBool = (local) => {
|
|
35977
36234
|
const el = firstChildElement(tl, qname("c", local, NS_C));
|
|
35978
36235
|
if (!el) return void 0;
|
|
35979
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
36236
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
35980
36237
|
return v === null || v === "1" || v === "true" ? true : void 0;
|
|
35981
36238
|
};
|
|
35982
36239
|
const displayEquation = readDispBool("dispEq");
|
|
@@ -36000,13 +36257,13 @@ const readSeriesColor = (ser) => {
|
|
|
36000
36257
|
if (!solidFill) return void 0;
|
|
36001
36258
|
const srgb = firstChildElement(solidFill, NAME_SRGB_CLR);
|
|
36002
36259
|
if (!srgb) return void 0;
|
|
36003
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
36260
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
36004
36261
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
36005
36262
|
};
|
|
36006
36263
|
const readSolidSrgb = (host) => {
|
|
36007
36264
|
const fill = host !== null ? firstChildElement(host, NAME_SOLID_FILL$1) : null;
|
|
36008
36265
|
const srgb = fill !== null ? firstChildElement(fill, NAME_SRGB_CLR) : null;
|
|
36009
|
-
const color = srgb !== null ? getAttrValue(srgb, ATTR_VAL$
|
|
36266
|
+
const color = srgb !== null ? getAttrValue(srgb, ATTR_VAL$3) : null;
|
|
36010
36267
|
return color !== null ? `#${color.toUpperCase()}` : void 0;
|
|
36011
36268
|
};
|
|
36012
36269
|
const readSeriesMarker = (ser) => {
|
|
@@ -36020,12 +36277,12 @@ const readSeriesMarker = (ser) => {
|
|
|
36020
36277
|
if (lineColor !== void 0) out.markerLineColor = lineColor;
|
|
36021
36278
|
const symEl = firstChildElement(m, qname("c", "symbol", NS_C));
|
|
36022
36279
|
if (symEl) {
|
|
36023
|
-
const v = getAttrValue(symEl, ATTR_VAL$
|
|
36280
|
+
const v = getAttrValue(symEl, ATTR_VAL$3);
|
|
36024
36281
|
if (v === "none" || v === "auto" || v === "circle" || v === "square" || v === "diamond" || v === "triangle" || v === "star" || v === "x" || v === "plus" || v === "dash" || v === "dot" || v === "picture") out.markerSymbol = v;
|
|
36025
36282
|
}
|
|
36026
36283
|
const sizeEl = firstChildElement(m, qname("c", "size", NS_C));
|
|
36027
36284
|
if (sizeEl) {
|
|
36028
|
-
const v = getAttrValue(sizeEl, ATTR_VAL$
|
|
36285
|
+
const v = getAttrValue(sizeEl, ATTR_VAL$3);
|
|
36029
36286
|
if (v !== null) {
|
|
36030
36287
|
const n = Number.parseInt(v, 10);
|
|
36031
36288
|
if (Number.isFinite(n) && n > 0) out.markerSizePt = n;
|
|
@@ -36041,7 +36298,7 @@ const readSeriesLineProps = (ser) => {
|
|
|
36041
36298
|
const out = {};
|
|
36042
36299
|
const lnFill = firstChildElement(ln, NAME_SOLID_FILL$1);
|
|
36043
36300
|
const lnSrgb = lnFill !== null ? firstChildElement(lnFill, NAME_SRGB_CLR) : null;
|
|
36044
|
-
const lnColor = lnSrgb !== null ? getAttrValue(lnSrgb, ATTR_VAL$
|
|
36301
|
+
const lnColor = lnSrgb !== null ? getAttrValue(lnSrgb, ATTR_VAL$3) : null;
|
|
36045
36302
|
if (lnColor !== null) out.lineColor = `#${lnColor.toUpperCase()}`;
|
|
36046
36303
|
const w = getAttrValue(ln, qname("", "w", ""));
|
|
36047
36304
|
if (w !== null) {
|
|
@@ -36050,7 +36307,7 @@ const readSeriesLineProps = (ser) => {
|
|
|
36050
36307
|
}
|
|
36051
36308
|
const prstDash = firstChildElement(ln, qname("a", "prstDash", NS_A));
|
|
36052
36309
|
if (prstDash) {
|
|
36053
|
-
const v = getAttrValue(prstDash, ATTR_VAL$
|
|
36310
|
+
const v = getAttrValue(prstDash, ATTR_VAL$3);
|
|
36054
36311
|
if (v !== null) out.lineDash = v;
|
|
36055
36312
|
}
|
|
36056
36313
|
return out;
|
|
@@ -36103,7 +36360,7 @@ const readRunStyle = (rPr) => {
|
|
|
36103
36360
|
if (solidFill) {
|
|
36104
36361
|
const srgb = firstChildElement(solidFill, NAME_A_SRGB);
|
|
36105
36362
|
if (srgb) {
|
|
36106
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
36363
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
36107
36364
|
if (v !== null) color = `#${v.toUpperCase()}`;
|
|
36108
36365
|
}
|
|
36109
36366
|
}
|
|
@@ -36172,7 +36429,7 @@ const readTitleRotationDeg = (titleEl) => {
|
|
|
36172
36429
|
const readDataLabelPosition = (dLbls) => {
|
|
36173
36430
|
const el = firstChildElement(dLbls, qname("c", "dLblPos", NS_C));
|
|
36174
36431
|
if (!el) return void 0;
|
|
36175
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
36432
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
36176
36433
|
switch (v) {
|
|
36177
36434
|
case "ctr":
|
|
36178
36435
|
case "inEnd":
|
|
@@ -36291,7 +36548,7 @@ const readValueAxisScaling = (valAx) => {
|
|
|
36291
36548
|
const readNumOn = (parent, local) => {
|
|
36292
36549
|
const el = firstChildElement(parent, qname("c", local, NS_C));
|
|
36293
36550
|
if (!el) return void 0;
|
|
36294
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
36551
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
36295
36552
|
if (v === null) return void 0;
|
|
36296
36553
|
const n = Number.parseFloat(v);
|
|
36297
36554
|
return Number.isFinite(n) ? n : void 0;
|
|
@@ -36308,7 +36565,7 @@ const readValueAxisScaling = (valAx) => {
|
|
|
36308
36565
|
if (dispUnits) {
|
|
36309
36566
|
const builtIn = firstChildElement(dispUnits, qname("c", "builtInUnit", NS_C));
|
|
36310
36567
|
if (builtIn) {
|
|
36311
|
-
const v = getAttrValue(builtIn, ATTR_VAL$
|
|
36568
|
+
const v = getAttrValue(builtIn, ATTR_VAL$3);
|
|
36312
36569
|
switch (v) {
|
|
36313
36570
|
case "hundreds":
|
|
36314
36571
|
case "thousands":
|
|
@@ -36344,7 +36601,7 @@ const readValueAxisScaling = (valAx) => {
|
|
|
36344
36601
|
};
|
|
36345
36602
|
const childVal = (parent, local) => {
|
|
36346
36603
|
const el = firstChildElement(parent, qname("c", local, NS_C));
|
|
36347
|
-
return el !== null ? getAttrValue(el, ATTR_VAL$
|
|
36604
|
+
return el !== null ? getAttrValue(el, ATTR_VAL$3) : null;
|
|
36348
36605
|
};
|
|
36349
36606
|
const childNumber = (parent, local) => {
|
|
36350
36607
|
const raw = childVal(parent, local);
|
|
@@ -36366,7 +36623,7 @@ const readSeriesFillOpacity = (ser) => {
|
|
|
36366
36623
|
const fill = spPr !== null ? firstChildElement(spPr, NAME_SOLID_FILL$1) : null;
|
|
36367
36624
|
const srgb = fill !== null ? firstChildElement(fill, NAME_SRGB_CLR) : null;
|
|
36368
36625
|
const alpha = srgb !== null ? firstChildElement(srgb, qname("a", "alpha", NS_A)) : null;
|
|
36369
|
-
const raw = alpha !== null ? getAttrValue(alpha, ATTR_VAL$
|
|
36626
|
+
const raw = alpha !== null ? getAttrValue(alpha, ATTR_VAL$3) : null;
|
|
36370
36627
|
if (raw === null || !/^\d+$/.test(raw)) return void 0;
|
|
36371
36628
|
const n = Number.parseInt(raw, 10);
|
|
36372
36629
|
return n <= ALPHA_OPAQUE ? n / ALPHA_OPAQUE : void 0;
|
|
@@ -36461,7 +36718,7 @@ const readOfPie = (group) => {
|
|
|
36461
36718
|
const custSplit = firstChildElement(group, qname("c", "custSplit", NS_C));
|
|
36462
36719
|
const customSplit = [];
|
|
36463
36720
|
if (custSplit !== null) for (const pt of allChildElements(custSplit, qname("c", "secondPiePt", NS_C))) {
|
|
36464
|
-
const idx = parsePointIndex(getAttrValue(pt, ATTR_VAL$
|
|
36721
|
+
const idx = parsePointIndex(getAttrValue(pt, ATTR_VAL$3), MAX_PT_COUNT);
|
|
36465
36722
|
if (idx !== null) customSplit.push(idx);
|
|
36466
36723
|
}
|
|
36467
36724
|
const seriesLines = firstChildElement(group, qname("c", "serLines", NS_C)) !== null;
|
|
@@ -36638,7 +36895,7 @@ const readChartSpec = (root) => {
|
|
|
36638
36895
|
let groupKind = mapped.kind;
|
|
36639
36896
|
if (mapped.localName === "barChart" || mapped.localName === "bar3DChart") {
|
|
36640
36897
|
const barDir = firstChildElement(child, qname("c", "barDir", NS_C));
|
|
36641
|
-
groupKind = (barDir !== null ? getAttrValue(barDir, ATTR_VAL$
|
|
36898
|
+
groupKind = (barDir !== null ? getAttrValue(barDir, ATTR_VAL$3) : null) === "bar" ? "bar" : "column";
|
|
36642
36899
|
}
|
|
36643
36900
|
plotGroups.push({
|
|
36644
36901
|
element: child,
|
|
@@ -36652,7 +36909,7 @@ const readChartSpec = (root) => {
|
|
|
36652
36909
|
const groupAxisIds = (group) => {
|
|
36653
36910
|
const ids = [];
|
|
36654
36911
|
for (const axIdEl of allChildElements(group, qname("c", "axId", NS_C))) {
|
|
36655
|
-
const id = getAttrValue(axIdEl, ATTR_VAL$
|
|
36912
|
+
const id = getAttrValue(axIdEl, ATTR_VAL$3);
|
|
36656
36913
|
if (id !== null) ids.push(id);
|
|
36657
36914
|
}
|
|
36658
36915
|
return ids;
|
|
@@ -36660,7 +36917,7 @@ const readChartSpec = (root) => {
|
|
|
36660
36917
|
const valAxisIds = /* @__PURE__ */ new Set();
|
|
36661
36918
|
for (const el of allChildElements(plotArea, NAME_VAL_AX)) {
|
|
36662
36919
|
const axIdEl = firstChildElement(el, qname("c", "axId", NS_C));
|
|
36663
|
-
const id = axIdEl !== null ? getAttrValue(axIdEl, ATTR_VAL$
|
|
36920
|
+
const id = axIdEl !== null ? getAttrValue(axIdEl, ATTR_VAL$3) : null;
|
|
36664
36921
|
if (id !== null) valAxisIds.add(id);
|
|
36665
36922
|
}
|
|
36666
36923
|
const primaryAxisIds = new Set(groupAxisIds(plotted));
|
|
@@ -36748,7 +37005,7 @@ const readChartSpec = (root) => {
|
|
|
36748
37005
|
let secValAx = null;
|
|
36749
37006
|
for (const el of allChildElements(plotArea, NAME_VAL_AX)) {
|
|
36750
37007
|
const axIdEl = firstChildElement(el, qname("c", "axId", NS_C));
|
|
36751
|
-
const id = axIdEl !== null ? getAttrValue(axIdEl, ATTR_VAL$
|
|
37008
|
+
const id = axIdEl !== null ? getAttrValue(axIdEl, ATTR_VAL$3) : null;
|
|
36752
37009
|
if (id !== null && secondaryValAxisIds.has(id)) secValAx ??= el;
|
|
36753
37010
|
else valAx ??= el;
|
|
36754
37011
|
}
|
|
@@ -36777,7 +37034,7 @@ const readChartSpec = (root) => {
|
|
|
36777
37034
|
if (kind === "column" || kind === "bar" || kind === "area" || kind === "line") {
|
|
36778
37035
|
const groupingEl = firstChildElement(plotted, qname("c", "grouping", NS_C));
|
|
36779
37036
|
if (groupingEl) {
|
|
36780
|
-
const g = getAttrValue(groupingEl, ATTR_VAL$
|
|
37037
|
+
const g = getAttrValue(groupingEl, ATTR_VAL$3);
|
|
36781
37038
|
if (g === "clustered" || g === "stacked" || g === "percentStacked" || g === "standard") grouping = g;
|
|
36782
37039
|
}
|
|
36783
37040
|
}
|
|
@@ -36790,7 +37047,7 @@ const readChartSpec = (root) => {
|
|
|
36790
37047
|
const markerEl = firstChildElement(plotted, qname("c", "marker", NS_C));
|
|
36791
37048
|
if (markerEl === null) lineMarkers = false;
|
|
36792
37049
|
else {
|
|
36793
|
-
const v = getAttrValue(markerEl, ATTR_VAL$
|
|
37050
|
+
const v = getAttrValue(markerEl, ATTR_VAL$3);
|
|
36794
37051
|
lineMarkers = v === null ? true : v === "1" || v === "true";
|
|
36795
37052
|
}
|
|
36796
37053
|
}
|
|
@@ -36799,7 +37056,7 @@ const readChartSpec = (root) => {
|
|
|
36799
37056
|
if (kind === "column" || kind === "bar") {
|
|
36800
37057
|
const gwEl = firstChildElement(plotted, qname("c", "gapWidth", NS_C));
|
|
36801
37058
|
if (gwEl) {
|
|
36802
|
-
const v = getAttrValue(gwEl, ATTR_VAL$
|
|
37059
|
+
const v = getAttrValue(gwEl, ATTR_VAL$3);
|
|
36803
37060
|
if (v !== null) {
|
|
36804
37061
|
const n = Number.parseInt(v, 10);
|
|
36805
37062
|
if (Number.isFinite(n)) gapWidthPct = n;
|
|
@@ -36807,7 +37064,7 @@ const readChartSpec = (root) => {
|
|
|
36807
37064
|
}
|
|
36808
37065
|
const ovEl = firstChildElement(plotted, qname("c", "overlap", NS_C));
|
|
36809
37066
|
if (ovEl) {
|
|
36810
|
-
const v = getAttrValue(ovEl, ATTR_VAL$
|
|
37067
|
+
const v = getAttrValue(ovEl, ATTR_VAL$3);
|
|
36811
37068
|
if (v !== null) {
|
|
36812
37069
|
const n = Number.parseInt(v, 10);
|
|
36813
37070
|
if (Number.isFinite(n)) overlapPct = n;
|
|
@@ -36827,7 +37084,7 @@ const readChartSpec = (root) => {
|
|
|
36827
37084
|
const readTickMarkLocal = (axis, local) => {
|
|
36828
37085
|
const el = firstChildElement(axis, qname("c", local, NS_C));
|
|
36829
37086
|
if (!el) return void 0;
|
|
36830
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
37087
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
36831
37088
|
if (v === "in" || v === "out" || v === "cross" || v === "none") return v;
|
|
36832
37089
|
};
|
|
36833
37090
|
const readTickMark = (axis) => readTickMarkLocal(axis, "majorTickMark");
|
|
@@ -36866,7 +37123,7 @@ const readChartSpec = (root) => {
|
|
|
36866
37123
|
if (!solid) return void 0;
|
|
36867
37124
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
36868
37125
|
if (!srgb) return void 0;
|
|
36869
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
37126
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
36870
37127
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
36871
37128
|
};
|
|
36872
37129
|
const readLineWidthEmu = (host) => {
|
|
@@ -36885,14 +37142,14 @@ const readChartSpec = (root) => {
|
|
|
36885
37142
|
if (!solid) return void 0;
|
|
36886
37143
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
36887
37144
|
if (!srgb) return void 0;
|
|
36888
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
37145
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
36889
37146
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
36890
37147
|
};
|
|
36891
37148
|
const catAx = xValAx ?? findFirst(plotArea, ["catAx", "dateAx"]);
|
|
36892
37149
|
const isHidden = (axis) => {
|
|
36893
37150
|
const d = firstChildElement(axis, qname("c", "delete", NS_C));
|
|
36894
37151
|
if (!d) return void 0;
|
|
36895
|
-
const v = getAttrValue(d, ATTR_VAL$
|
|
37152
|
+
const v = getAttrValue(d, ATTR_VAL$3);
|
|
36896
37153
|
return v === null || v === "1" || v === "true";
|
|
36897
37154
|
};
|
|
36898
37155
|
let categoryAxisOrientation;
|
|
@@ -36905,7 +37162,7 @@ const readChartSpec = (root) => {
|
|
|
36905
37162
|
if (!scaling) return void 0;
|
|
36906
37163
|
const orientationEl = firstChildElement(scaling, qname("c", "orientation", NS_C));
|
|
36907
37164
|
if (!orientationEl) return void 0;
|
|
36908
|
-
const v = getAttrValue(orientationEl, ATTR_VAL$
|
|
37165
|
+
const v = getAttrValue(orientationEl, ATTR_VAL$3);
|
|
36909
37166
|
if (v === "minMax" || v === "maxMin") return v;
|
|
36910
37167
|
};
|
|
36911
37168
|
if (catAx) {
|
|
@@ -36948,7 +37205,7 @@ const readChartSpec = (root) => {
|
|
|
36948
37205
|
categoryAxisMinorTickMark = readTickMarkLocal(catAx, "minorTickMark");
|
|
36949
37206
|
const skipEl = firstChildElement(catAx, qname("c", "tickLblSkip", NS_C));
|
|
36950
37207
|
if (skipEl) {
|
|
36951
|
-
const v = getAttrValue(skipEl, ATTR_VAL$
|
|
37208
|
+
const v = getAttrValue(skipEl, ATTR_VAL$3);
|
|
36952
37209
|
if (v !== null) {
|
|
36953
37210
|
const n = Number.parseInt(v, 10);
|
|
36954
37211
|
if (Number.isFinite(n) && n > 1) categoryAxisTickLabelSkip = n;
|
|
@@ -36956,7 +37213,7 @@ const readChartSpec = (root) => {
|
|
|
36956
37213
|
}
|
|
36957
37214
|
const markSkipEl = firstChildElement(catAx, qname("c", "tickMarkSkip", NS_C));
|
|
36958
37215
|
if (markSkipEl) {
|
|
36959
|
-
const v = getAttrValue(markSkipEl, ATTR_VAL$
|
|
37216
|
+
const v = getAttrValue(markSkipEl, ATTR_VAL$3);
|
|
36960
37217
|
if (v !== null) {
|
|
36961
37218
|
const n = Number.parseInt(v, 10);
|
|
36962
37219
|
if (Number.isFinite(n) && n > 1) categoryAxisTickMarkSkip = n;
|
|
@@ -36964,12 +37221,12 @@ const readChartSpec = (root) => {
|
|
|
36964
37221
|
}
|
|
36965
37222
|
const posEl = firstChildElement(catAx, qname("c", "tickLblPos", NS_C));
|
|
36966
37223
|
if (posEl) {
|
|
36967
|
-
const v = getAttrValue(posEl, ATTR_VAL$
|
|
37224
|
+
const v = getAttrValue(posEl, ATTR_VAL$3);
|
|
36968
37225
|
if (v === "none" || v === "low" || v === "high" || v === "nextTo") categoryAxisTickLabelPos = v;
|
|
36969
37226
|
}
|
|
36970
37227
|
const lblOffsetEl = firstChildElement(catAx, qname("c", "lblOffset", NS_C));
|
|
36971
37228
|
if (lblOffsetEl) {
|
|
36972
|
-
const v = getAttrValue(lblOffsetEl, ATTR_VAL$
|
|
37229
|
+
const v = getAttrValue(lblOffsetEl, ATTR_VAL$3);
|
|
36973
37230
|
if (v !== null) {
|
|
36974
37231
|
const n = Number.parseInt(v, 10);
|
|
36975
37232
|
if (Number.isFinite(n) && n !== 100) categoryAxisLabelOffset = n;
|
|
@@ -36977,7 +37234,7 @@ const readChartSpec = (root) => {
|
|
|
36977
37234
|
}
|
|
36978
37235
|
const lblAlgnEl = firstChildElement(catAx, qname("c", "lblAlgn", NS_C));
|
|
36979
37236
|
if (lblAlgnEl) {
|
|
36980
|
-
const v = getAttrValue(lblAlgnEl, ATTR_VAL$
|
|
37237
|
+
const v = getAttrValue(lblAlgnEl, ATTR_VAL$3);
|
|
36981
37238
|
if (v === "ctr" || v === "l" || v === "r") categoryAxisLabelAlign = v;
|
|
36982
37239
|
}
|
|
36983
37240
|
const catNumFmtEl = firstChildElement(catAx, qname("c", "numFmt", NS_C));
|
|
@@ -36987,7 +37244,7 @@ const readChartSpec = (root) => {
|
|
|
36987
37244
|
}
|
|
36988
37245
|
const noMultiLvlEl = firstChildElement(catAx, qname("c", "noMultiLvlLbl", NS_C));
|
|
36989
37246
|
if (noMultiLvlEl) {
|
|
36990
|
-
const v = getAttrValue(noMultiLvlEl, ATTR_VAL$
|
|
37247
|
+
const v = getAttrValue(noMultiLvlEl, ATTR_VAL$3);
|
|
36991
37248
|
if (v === "1" || v === "true") categoryAxisNoMultiLevelLabel = true;
|
|
36992
37249
|
}
|
|
36993
37250
|
}
|
|
@@ -37022,12 +37279,12 @@ const readChartSpec = (root) => {
|
|
|
37022
37279
|
valueAxisMinorTickMark = readTickMarkLocal(valAx, "minorTickMark");
|
|
37023
37280
|
const valPosEl = firstChildElement(valAx, qname("c", "tickLblPos", NS_C));
|
|
37024
37281
|
if (valPosEl) {
|
|
37025
|
-
const v = getAttrValue(valPosEl, ATTR_VAL$
|
|
37282
|
+
const v = getAttrValue(valPosEl, ATTR_VAL$3);
|
|
37026
37283
|
if (v === "none" || v === "low" || v === "high" || v === "nextTo") valueAxisTickLabelPos = v;
|
|
37027
37284
|
}
|
|
37028
37285
|
const crossesAtEl = firstChildElement(valAx, qname("c", "crossesAt", NS_C));
|
|
37029
37286
|
if (crossesAtEl) {
|
|
37030
|
-
const v = getAttrValue(crossesAtEl, ATTR_VAL$
|
|
37287
|
+
const v = getAttrValue(crossesAtEl, ATTR_VAL$3);
|
|
37031
37288
|
if (v !== null) {
|
|
37032
37289
|
const n = Number.parseFloat(v);
|
|
37033
37290
|
if (Number.isFinite(n)) valueAxisCrosses = { at: n };
|
|
@@ -37035,13 +37292,13 @@ const readChartSpec = (root) => {
|
|
|
37035
37292
|
} else {
|
|
37036
37293
|
const crossesEl = firstChildElement(valAx, qname("c", "crosses", NS_C));
|
|
37037
37294
|
if (crossesEl) {
|
|
37038
|
-
const v = getAttrValue(crossesEl, ATTR_VAL$
|
|
37295
|
+
const v = getAttrValue(crossesEl, ATTR_VAL$3);
|
|
37039
37296
|
if (v === "autoZero" || v === "min" || v === "max") valueAxisCrosses = v;
|
|
37040
37297
|
}
|
|
37041
37298
|
}
|
|
37042
37299
|
const crossBetweenEl = firstChildElement(valAx, qname("c", "crossBetween", NS_C));
|
|
37043
37300
|
if (crossBetweenEl) {
|
|
37044
|
-
const v = getAttrValue(crossBetweenEl, ATTR_VAL$
|
|
37301
|
+
const v = getAttrValue(crossBetweenEl, ATTR_VAL$3);
|
|
37045
37302
|
if (v === "between" || v === "midCat") valueAxisCrossBetween = v;
|
|
37046
37303
|
}
|
|
37047
37304
|
const majorGl = firstChildElement(valAx, qname("c", "majorGridlines", NS_C));
|
|
@@ -37073,10 +37330,10 @@ const readChartSpec = (root) => {
|
|
|
37073
37330
|
const majorTickMark = readTickMark(secValAx);
|
|
37074
37331
|
const minorTickMark = readTickMarkLocal(secValAx, "minorTickMark");
|
|
37075
37332
|
const secPosEl = firstChildElement(secValAx, qname("c", "tickLblPos", NS_C));
|
|
37076
|
-
const secPos = secPosEl !== null ? getAttrValue(secPosEl, ATTR_VAL$
|
|
37333
|
+
const secPos = secPosEl !== null ? getAttrValue(secPosEl, ATTR_VAL$3) : null;
|
|
37077
37334
|
const tickLabelPos = secPos === "none" || secPos === "low" || secPos === "high" || secPos === "nextTo" ? secPos : void 0;
|
|
37078
37335
|
const crossBetweenEl = firstChildElement(secValAx, qname("c", "crossBetween", NS_C));
|
|
37079
|
-
const cb = crossBetweenEl !== null ? getAttrValue(crossBetweenEl, ATTR_VAL$
|
|
37336
|
+
const cb = crossBetweenEl !== null ? getAttrValue(crossBetweenEl, ATTR_VAL$3) : null;
|
|
37080
37337
|
const crossBetween = cb === "between" || cb === "midCat" ? cb : void 0;
|
|
37081
37338
|
const fields = {
|
|
37082
37339
|
...scaling !== void 0 ? { scaling } : {},
|
|
@@ -37102,7 +37359,7 @@ const readChartSpec = (root) => {
|
|
|
37102
37359
|
if (!solid) return void 0;
|
|
37103
37360
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
37104
37361
|
if (!srgb) return void 0;
|
|
37105
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
37362
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
37106
37363
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
37107
37364
|
};
|
|
37108
37365
|
const readSpPrStrokeColor = (parent) => {
|
|
@@ -37114,7 +37371,7 @@ const readChartSpec = (root) => {
|
|
|
37114
37371
|
if (!solid) return void 0;
|
|
37115
37372
|
const srgb = firstChildElement(solid, NAME_SRGB_CLR);
|
|
37116
37373
|
if (!srgb) return void 0;
|
|
37117
|
-
const v = getAttrValue(srgb, ATTR_VAL$
|
|
37374
|
+
const v = getAttrValue(srgb, ATTR_VAL$3);
|
|
37118
37375
|
return v !== null ? `#${v.toUpperCase()}` : void 0;
|
|
37119
37376
|
};
|
|
37120
37377
|
const plotAreaFill = readSpPrFill(plotArea);
|
|
@@ -37124,25 +37381,25 @@ const readChartSpec = (root) => {
|
|
|
37124
37381
|
let dispBlanksAs;
|
|
37125
37382
|
const dbaEl = firstChildElement(chart, qname("c", "dispBlanksAs", NS_C));
|
|
37126
37383
|
if (dbaEl) {
|
|
37127
|
-
const v = getAttrValue(dbaEl, ATTR_VAL$
|
|
37384
|
+
const v = getAttrValue(dbaEl, ATTR_VAL$3);
|
|
37128
37385
|
if (v === "gap" || v === "zero" || v === "span") dispBlanksAs = v;
|
|
37129
37386
|
}
|
|
37130
37387
|
let plotVisibleCellsOnly;
|
|
37131
37388
|
const pvoEl = firstChildElement(chart, qname("c", "plotVisOnly", NS_C));
|
|
37132
37389
|
if (pvoEl) {
|
|
37133
|
-
const v = getAttrValue(pvoEl, ATTR_VAL$
|
|
37390
|
+
const v = getAttrValue(pvoEl, ATTR_VAL$3);
|
|
37134
37391
|
if (v === "0" || v === "false") plotVisibleCellsOnly = false;
|
|
37135
37392
|
}
|
|
37136
37393
|
let roundedCorners;
|
|
37137
37394
|
const rcEl = firstChildElement(root, qname("c", "roundedCorners", NS_C));
|
|
37138
37395
|
if (rcEl) {
|
|
37139
|
-
const v = getAttrValue(rcEl, ATTR_VAL$
|
|
37396
|
+
const v = getAttrValue(rcEl, ATTR_VAL$3);
|
|
37140
37397
|
if (v === "1" || v === "true") roundedCorners = true;
|
|
37141
37398
|
}
|
|
37142
37399
|
let chartStyle;
|
|
37143
37400
|
const styleEl = firstChildElement(root, qname("c", "style", NS_C));
|
|
37144
37401
|
if (styleEl) {
|
|
37145
|
-
const v = getAttrValue(styleEl, ATTR_VAL$
|
|
37402
|
+
const v = getAttrValue(styleEl, ATTR_VAL$3);
|
|
37146
37403
|
if (v !== null) {
|
|
37147
37404
|
const n = Number.parseInt(v, 10);
|
|
37148
37405
|
if (Number.isFinite(n) && n >= 1 && n <= 48) chartStyle = n;
|
|
@@ -37151,22 +37408,22 @@ const readChartSpec = (root) => {
|
|
|
37151
37408
|
let language;
|
|
37152
37409
|
const langEl = firstChildElement(root, qname("c", "lang", NS_C));
|
|
37153
37410
|
if (langEl) {
|
|
37154
|
-
const v = getAttrValue(langEl, ATTR_VAL$
|
|
37411
|
+
const v = getAttrValue(langEl, ATTR_VAL$3);
|
|
37155
37412
|
if (v !== null && v.length > 0) language = v;
|
|
37156
37413
|
}
|
|
37157
37414
|
let date1904;
|
|
37158
37415
|
const dateEl = firstChildElement(root, qname("c", "date1904", NS_C));
|
|
37159
37416
|
if (dateEl) {
|
|
37160
|
-
const v = getAttrValue(dateEl, ATTR_VAL$
|
|
37417
|
+
const v = getAttrValue(dateEl, ATTR_VAL$3);
|
|
37161
37418
|
if (v === "1" || v === "true") date1904 = true;
|
|
37162
37419
|
}
|
|
37163
37420
|
let legend;
|
|
37164
37421
|
const legendEl = firstChildElement(chart, qname("c", "legend", NS_C));
|
|
37165
37422
|
if (legendEl) {
|
|
37166
37423
|
const posEl = firstChildElement(legendEl, qname("c", "legendPos", NS_C));
|
|
37167
|
-
const tok = posEl ? getAttrValue(posEl, ATTR_VAL$
|
|
37424
|
+
const tok = posEl ? getAttrValue(posEl, ATTR_VAL$3) : null;
|
|
37168
37425
|
const ovEl = firstChildElement(legendEl, qname("c", "overlay", NS_C));
|
|
37169
|
-
const overlay = ovEl ? getAttrValue(ovEl, ATTR_VAL$
|
|
37426
|
+
const overlay = ovEl ? getAttrValue(ovEl, ATTR_VAL$3) !== "0" : false;
|
|
37170
37427
|
const txPr = firstChildElement(legendEl, qname("c", "txPr", NS_C));
|
|
37171
37428
|
const textStyle = txPr ? readLabelStyle(txPr) : void 0;
|
|
37172
37429
|
const hiddenIndices = [];
|
|
@@ -37175,9 +37432,9 @@ const readChartSpec = (root) => {
|
|
|
37175
37432
|
const idxEl = firstChildElement(c, qname("c", "idx", NS_C));
|
|
37176
37433
|
const delEl = firstChildElement(c, qname("c", "delete", NS_C));
|
|
37177
37434
|
if (!idxEl || !delEl) continue;
|
|
37178
|
-
const delV = getAttrValue(delEl, ATTR_VAL$
|
|
37435
|
+
const delV = getAttrValue(delEl, ATTR_VAL$3);
|
|
37179
37436
|
if (!(delV === null || delV === "1" || delV === "true")) continue;
|
|
37180
|
-
const idxV = getAttrValue(idxEl, ATTR_VAL$
|
|
37437
|
+
const idxV = getAttrValue(idxEl, ATTR_VAL$3);
|
|
37181
37438
|
if (idxV === null) continue;
|
|
37182
37439
|
const n = Number.parseInt(idxV, 10);
|
|
37183
37440
|
if (Number.isFinite(n) && n >= 0) hiddenIndices.push(n);
|
|
@@ -37195,21 +37452,21 @@ const readChartSpec = (root) => {
|
|
|
37195
37452
|
let varyColors;
|
|
37196
37453
|
const vcEl = firstChildElement(plotted, qname("c", "varyColors", NS_C));
|
|
37197
37454
|
if (vcEl) {
|
|
37198
|
-
const v = getAttrValue(vcEl, ATTR_VAL$
|
|
37455
|
+
const v = getAttrValue(vcEl, ATTR_VAL$3);
|
|
37199
37456
|
varyColors = v === null || v === "1" || v === "true";
|
|
37200
37457
|
}
|
|
37201
37458
|
let titleOverlay;
|
|
37202
37459
|
const titleEl = firstChildElement(chart, NAME_TITLE);
|
|
37203
37460
|
if (titleEl) {
|
|
37204
37461
|
const ovEl = firstChildElement(titleEl, qname("c", "overlay", NS_C));
|
|
37205
|
-
if (ovEl) titleOverlay = getAttrValue(ovEl, ATTR_VAL$
|
|
37462
|
+
if (ovEl) titleOverlay = getAttrValue(ovEl, ATTR_VAL$3) !== "0";
|
|
37206
37463
|
}
|
|
37207
37464
|
let firstSliceAngleDeg;
|
|
37208
37465
|
let holeSizePct;
|
|
37209
37466
|
if (kind === "pie" || kind === "doughnut") {
|
|
37210
37467
|
const fsAng = firstChildElement(plotted, qname("c", "firstSliceAng", NS_C));
|
|
37211
37468
|
if (fsAng) {
|
|
37212
|
-
const v = getAttrValue(fsAng, ATTR_VAL$
|
|
37469
|
+
const v = getAttrValue(fsAng, ATTR_VAL$3);
|
|
37213
37470
|
if (v !== null) {
|
|
37214
37471
|
const n = Number.parseInt(v, 10);
|
|
37215
37472
|
if (Number.isFinite(n)) firstSliceAngleDeg = (n % 360 + 360) % 360;
|
|
@@ -37218,7 +37475,7 @@ const readChartSpec = (root) => {
|
|
|
37218
37475
|
if (kind === "doughnut") {
|
|
37219
37476
|
const hs = firstChildElement(plotted, qname("c", "holeSize", NS_C));
|
|
37220
37477
|
if (hs) {
|
|
37221
|
-
const v = getAttrValue(hs, ATTR_VAL$
|
|
37478
|
+
const v = getAttrValue(hs, ATTR_VAL$3);
|
|
37222
37479
|
if (v !== null) {
|
|
37223
37480
|
const n = Number.parseInt(v, 10);
|
|
37224
37481
|
if (Number.isFinite(n)) holeSizePct = Math.max(10, Math.min(90, n));
|
|
@@ -37233,19 +37490,19 @@ const readChartSpec = (root) => {
|
|
|
37233
37490
|
if (kind === "scatter") {
|
|
37234
37491
|
const el = firstChildElement(plotted, qname("c", "scatterStyle", NS_C));
|
|
37235
37492
|
if (el) {
|
|
37236
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
37493
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
37237
37494
|
if (v === "none" || v === "line" || v === "lineMarker" || v === "marker" || v === "smooth" || v === "smoothMarker") scatterStyle = v;
|
|
37238
37495
|
}
|
|
37239
37496
|
} else if (kind === "radar") {
|
|
37240
37497
|
const el = firstChildElement(plotted, qname("c", "radarStyle", NS_C));
|
|
37241
37498
|
if (el) {
|
|
37242
|
-
const v = getAttrValue(el, ATTR_VAL$
|
|
37499
|
+
const v = getAttrValue(el, ATTR_VAL$3);
|
|
37243
37500
|
if (v === "standard" || v === "marker" || v === "filled") radarStyle = v;
|
|
37244
37501
|
}
|
|
37245
37502
|
} else if (kind === "bubble") {
|
|
37246
37503
|
const bsEl = firstChildElement(plotted, qname("c", "bubbleScale", NS_C));
|
|
37247
37504
|
if (bsEl) {
|
|
37248
|
-
const v = getAttrValue(bsEl, ATTR_VAL$
|
|
37505
|
+
const v = getAttrValue(bsEl, ATTR_VAL$3);
|
|
37249
37506
|
if (v !== null) {
|
|
37250
37507
|
const n = Number.parseInt(v, 10);
|
|
37251
37508
|
if (Number.isFinite(n) && n >= 0) bubbleScale = Math.min(300, n);
|
|
@@ -37253,7 +37510,7 @@ const readChartSpec = (root) => {
|
|
|
37253
37510
|
}
|
|
37254
37511
|
const srEl = firstChildElement(plotted, qname("c", "sizeRepresents", NS_C));
|
|
37255
37512
|
if (srEl) {
|
|
37256
|
-
const v = getAttrValue(srEl, ATTR_VAL$
|
|
37513
|
+
const v = getAttrValue(srEl, ATTR_VAL$3);
|
|
37257
37514
|
if (v === "area") bubbleSizeRepresents = "area";
|
|
37258
37515
|
else if (v === "w") bubbleSizeRepresents = "width";
|
|
37259
37516
|
}
|
|
@@ -37733,7 +37990,7 @@ const NAME_NV_SP_PR = qname("p", "nvSpPr", NS.pml);
|
|
|
37733
37990
|
const NAME_NV_PR$2 = qname("p", "nvPr", NS.pml);
|
|
37734
37991
|
const NAME_PH = qname("p", "ph", NS.pml);
|
|
37735
37992
|
const ATTR_TYPE$1 = qname("", "type", "");
|
|
37736
|
-
const ATTR_IDX = qname("", "idx", "");
|
|
37993
|
+
const ATTR_IDX$1 = qname("", "idx", "");
|
|
37737
37994
|
/** The `<p:ph>` of a top-level `<p:sp>`, or `null` for anything else. */
|
|
37738
37995
|
const phOf = (node) => {
|
|
37739
37996
|
if (node.name.namespaceURI !== NS.pml || node.name.localName !== "sp") return null;
|
|
@@ -37752,7 +38009,7 @@ const placeholderIndices = (spTree) => {
|
|
|
37752
38009
|
for (const child of spTree.children) {
|
|
37753
38010
|
if (child.kind !== "element") continue;
|
|
37754
38011
|
const ph = phOf(child);
|
|
37755
|
-
const idx = ph && getAttrValue(ph, ATTR_IDX);
|
|
38012
|
+
const idx = ph && getAttrValue(ph, ATTR_IDX$1);
|
|
37756
38013
|
if (idx) out.push(Number(idx));
|
|
37757
38014
|
}
|
|
37758
38015
|
return out;
|
|
@@ -39877,15 +40134,227 @@ const setChartSpec = (chart, spec) => {
|
|
|
39877
40134
|
const chartPart = pkg.getPart(resolved.partName);
|
|
39878
40135
|
if (!chartPart) throw new Error(`setChartSpec: chart part ${resolved.partName} not found`);
|
|
39879
40136
|
chartPart.data = chartBytes;
|
|
39880
|
-
const
|
|
39881
|
-
if (
|
|
39882
|
-
|
|
39883
|
-
|
|
39884
|
-
|
|
39885
|
-
|
|
39886
|
-
|
|
40137
|
+
const workbook = embeddedWorkbookPart(pkg, resolved.partName);
|
|
40138
|
+
if (workbook) workbook.data = buildEmbeddedXlsx(layoutChartSheet(spec).grid);
|
|
40139
|
+
};
|
|
40140
|
+
const embeddedWorkbookPart = (pkg, chartPartName) => {
|
|
40141
|
+
const xlsxRel = pkg.getRels(chartPartName)?.items.find((r) => r.type === REL_TYPES.package);
|
|
40142
|
+
if (!xlsxRel || xlsxRel.targetMode === "External") return null;
|
|
40143
|
+
const xlsxName = xlsxRel.target.startsWith("/") ? partName(xlsxRel.target) : resolveTarget(chartPartName, xlsxRel.target);
|
|
40144
|
+
return pkg.getPart(xlsxName) ?? null;
|
|
40145
|
+
};
|
|
40146
|
+
const CHART_DATA_KINDS = new Set([
|
|
40147
|
+
"bar",
|
|
40148
|
+
"column",
|
|
40149
|
+
"line",
|
|
40150
|
+
"area",
|
|
40151
|
+
"pie",
|
|
40152
|
+
"doughnut"
|
|
40153
|
+
]);
|
|
40154
|
+
const isChartDataKind = (kind) => CHART_DATA_KINDS.has(kind);
|
|
40155
|
+
const NAME_C_PLOT_AREA = qname("c", "plotArea", NS.chart);
|
|
40156
|
+
const NAME_C_SER = qname("c", "ser", NS.chart);
|
|
40157
|
+
const NAME_C_TX = qname("c", "tx", NS.chart);
|
|
40158
|
+
const NAME_C_CAT = qname("c", "cat", NS.chart);
|
|
40159
|
+
const NAME_C_VAL = qname("c", "val", NS.chart);
|
|
40160
|
+
const NAME_C_F = qname("c", "f", NS.chart);
|
|
40161
|
+
const NAME_C_STR_REF = qname("c", "strRef", NS.chart);
|
|
40162
|
+
const NAME_C_STR_LIT = qname("c", "strLit", NS.chart);
|
|
40163
|
+
const NAME_C_STR_CACHE = qname("c", "strCache", NS.chart);
|
|
40164
|
+
const NAME_C_NUM_REF = qname("c", "numRef", NS.chart);
|
|
40165
|
+
const NAME_C_NUM_LIT = qname("c", "numLit", NS.chart);
|
|
40166
|
+
const NAME_C_NUM_CACHE = qname("c", "numCache", NS.chart);
|
|
40167
|
+
const NAME_C_MULTI_LVL_STR_REF = qname("c", "multiLvlStrRef", NS.chart);
|
|
40168
|
+
const NAME_C_MULTI_LVL_STR_CACHE = qname("c", "multiLvlStrCache", NS.chart);
|
|
40169
|
+
const NAME_C_LVL = qname("c", "lvl", NS.chart);
|
|
40170
|
+
const NAME_C_FORMAT_CODE = qname("c", "formatCode", NS.chart);
|
|
40171
|
+
const NAME_C_PT_COUNT = qname("c", "ptCount", NS.chart);
|
|
40172
|
+
const NAME_C_EXT_LST = qname("c", "extLst", NS.chart);
|
|
40173
|
+
const ATTR_VAL$2 = qname("", "val", "");
|
|
40174
|
+
const ATTR_IDX = qname("", "idx", "");
|
|
40175
|
+
/** A `c:` element named like `sibling`, so it uses the prefix the part already declares. */
|
|
40176
|
+
const chartElem = (sibling, localName, init = {}) => elem(qname(sibling.name.prefix, localName, NS.chart), init);
|
|
40177
|
+
const setFormula = (ref, formula) => {
|
|
40178
|
+
const f = firstChildElement(ref, NAME_C_F);
|
|
40179
|
+
if (f) f.children = [text(formula)];
|
|
40180
|
+
};
|
|
40181
|
+
const setCachePoints = (cache, points) => {
|
|
40182
|
+
const formatCode = allChildElements(cache, NAME_C_FORMAT_CODE);
|
|
40183
|
+
const extLst = allChildElements(cache, NAME_C_EXT_LST);
|
|
40184
|
+
const ptCount = firstChildElement(cache, NAME_C_PT_COUNT) ?? chartElem(cache, "ptCount");
|
|
40185
|
+
ptCount.attrs = [attr(ATTR_VAL$2, String(points.length))];
|
|
40186
|
+
cache.children = [
|
|
40187
|
+
...formatCode,
|
|
40188
|
+
ptCount,
|
|
40189
|
+
...pointElems(cache, points),
|
|
40190
|
+
...extLst
|
|
40191
|
+
];
|
|
40192
|
+
};
|
|
40193
|
+
const pointElems = (sibling, points) => points.flatMap((point, i) => point === null ? [] : [chartElem(sibling, "pt", {
|
|
40194
|
+
attrs: [attr(ATTR_IDX, String(i))],
|
|
40195
|
+
children: [chartElem(sibling, "v", { children: [text(point)] })]
|
|
40196
|
+
})]);
|
|
40197
|
+
/**
|
|
40198
|
+
* Rewrites a `c:cat` / `c:val` / `c:tx` channel: its formula when `formula`
|
|
40199
|
+
* is given, its cached points when `points` is.
|
|
40200
|
+
*/
|
|
40201
|
+
const setChannel = (channel, formula, points) => {
|
|
40202
|
+
for (const [refName, cacheName] of [[NAME_C_STR_REF, NAME_C_STR_CACHE], [NAME_C_NUM_REF, NAME_C_NUM_CACHE]]) {
|
|
40203
|
+
const ref = firstChildElement(channel, refName);
|
|
40204
|
+
if (!ref) continue;
|
|
40205
|
+
if (formula !== null) setFormula(ref, formula);
|
|
40206
|
+
if (points !== null) {
|
|
40207
|
+
let cache = firstChildElement(ref, cacheName);
|
|
40208
|
+
if (!cache) {
|
|
40209
|
+
cache = chartElem(ref, cacheName.localName);
|
|
40210
|
+
ref.children.push(cache);
|
|
40211
|
+
}
|
|
40212
|
+
setCachePoints(cache, points);
|
|
39887
40213
|
}
|
|
40214
|
+
return;
|
|
39888
40215
|
}
|
|
40216
|
+
const literal = firstChildElement(channel, NAME_C_STR_LIT) ?? firstChildElement(channel, NAME_C_NUM_LIT);
|
|
40217
|
+
if (literal && points !== null) setCachePoints(literal, points);
|
|
40218
|
+
const multiLevel = firstChildElement(channel, NAME_C_MULTI_LVL_STR_REF);
|
|
40219
|
+
if (!multiLevel) return;
|
|
40220
|
+
if (formula !== null) setFormula(multiLevel, formula);
|
|
40221
|
+
if (points !== null) setSingleLevelCache(multiLevel, points);
|
|
40222
|
+
};
|
|
40223
|
+
const setSingleLevelCache = (ref, points) => {
|
|
40224
|
+
const cache = firstChildElement(ref, NAME_C_MULTI_LVL_STR_CACHE) ?? chartElem(ref, "multiLvlStrCache");
|
|
40225
|
+
if (!ref.children.includes(cache)) ref.children.push(cache);
|
|
40226
|
+
const lvl = firstChildElement(cache, NAME_C_LVL) ?? chartElem(cache, "lvl");
|
|
40227
|
+
const ptCount = firstChildElement(cache, NAME_C_PT_COUNT) ?? chartElem(cache, "ptCount");
|
|
40228
|
+
ptCount.attrs = [attr(ATTR_VAL$2, String(points.length))];
|
|
40229
|
+
lvl.children = [...pointElems(cache, points), ...allChildElements(lvl, NAME_C_EXT_LST)];
|
|
40230
|
+
cache.children = [
|
|
40231
|
+
ptCount,
|
|
40232
|
+
lvl,
|
|
40233
|
+
...allChildElements(cache, NAME_C_EXT_LST)
|
|
40234
|
+
];
|
|
40235
|
+
};
|
|
40236
|
+
const isNumericChannel = (channel) => firstChildElement(channel, NAME_C_NUM_REF) !== null || firstChildElement(channel, NAME_C_NUM_LIT) !== null;
|
|
40237
|
+
/**
|
|
40238
|
+
* Replaces the data of a bar, column, line, area, pie or doughnut chart.
|
|
40239
|
+
*
|
|
40240
|
+
* When `kind` is the chart's own and `series` names the same series (in any
|
|
40241
|
+
* order), only the values change: everything else in the chart, its
|
|
40242
|
+
* formatting included, is kept. Changing `kind`, or adding, removing or
|
|
40243
|
+
* renaming a series, builds the chart again from its title, axis titles,
|
|
40244
|
+
* legend, series names and colors, and the rest of its formatting returns
|
|
40245
|
+
* to the defaults; to keep it, copy the series names exactly as they are
|
|
40246
|
+
* read. Each series needs one value per category: when changing
|
|
40247
|
+
* `categories`, pass every series with values of the same length. A pie or
|
|
40248
|
+
* doughnut chart takes exactly one series. On a date axis the categories
|
|
40249
|
+
* are read as date serial numbers (days since 1899-12-30, e.g. `"45292"`
|
|
40250
|
+
* for 2024-01-01) and must be passed the same way. The embedded workbook
|
|
40251
|
+
* is rewritten with the new data.
|
|
40252
|
+
*
|
|
40253
|
+
* Throws when the chart is of another kind (scatter, bubble, stock,
|
|
40254
|
+
* surface, radar, or one this library cannot read), when `categories` or
|
|
40255
|
+
* `series` is empty, when a series has more or fewer values than there are
|
|
40256
|
+
* categories, when a date-axis category is not a number, and when
|
|
40257
|
+
* categories change on a chart whose categories have several levels.
|
|
40258
|
+
*/
|
|
40259
|
+
const setChartData = (chart, data) => {
|
|
40260
|
+
const slide = chart.shape[SHAPE_SLIDE];
|
|
40261
|
+
const pkg = slide[INTERNAL_PACKAGE];
|
|
40262
|
+
const resolved = resolveChartPartName(slide, chart.shape);
|
|
40263
|
+
if (!resolved) throw new Error("setChartData: shape is not a chart graphic frame");
|
|
40264
|
+
const part = pkg.getPart(resolved.partName);
|
|
40265
|
+
if (!part) throw new Error(`setChartData: chart part ${resolved.partName} not found`);
|
|
40266
|
+
const doc = parseXml(decode$1(part.data));
|
|
40267
|
+
const current = readChartSpec(doc.root);
|
|
40268
|
+
if (current === null || !isChartDataKind(current.kind)) throw new Error(`setChartData: the data of ${current === null ? "this chart" : `a ${current.kind} chart`} cannot be replaced; build the chart again instead`);
|
|
40269
|
+
if (data.categories?.length === 0 || data.series?.length === 0) throw new Error("setChartData: categories and series must not be empty");
|
|
40270
|
+
const kind = data.kind ?? current.kind;
|
|
40271
|
+
const categories = data.categories ?? current.categories;
|
|
40272
|
+
const series = data.series ?? current.series;
|
|
40273
|
+
for (const s of series) {
|
|
40274
|
+
if (s.values.length !== categories.length) throw new Error(`setChartData: series "${s.name}" has ${s.values.length} values for ${categories.length} categories`);
|
|
40275
|
+
if (s.values.some((v) => v !== null && !Number.isFinite(v))) throw new Error(`setChartData: series "${s.name}" has a value that is not a finite number`);
|
|
40276
|
+
}
|
|
40277
|
+
const byName = new Map(series.map((s) => [s.name, s]));
|
|
40278
|
+
if (data.series !== void 0 && byName.size !== series.length) throw new Error("setChartData: series names must be distinct");
|
|
40279
|
+
const sameSeries = data.series === void 0 || new Set(current.series.map((s) => s.name)).size === series.length && current.series.every((s) => byName.has(s.name));
|
|
40280
|
+
if (kind !== current.kind || !sameSeries) {
|
|
40281
|
+
setChartSpec(chart, rebuiltChartSpec(current, kind, categories, series));
|
|
40282
|
+
return;
|
|
40283
|
+
}
|
|
40284
|
+
if (data.categories !== void 0 && current.categoryGroupLevels !== void 0) throw new Error("setChartData: the categories of a chart with several category levels cannot be replaced");
|
|
40285
|
+
const sers = childElements(firstChildElement(firstChildElement(doc.root, NAME_C_CHART), NAME_C_PLOT_AREA)).flatMap((group) => allChildElements(group, NAME_C_SER));
|
|
40286
|
+
const values = current.series.map((s) => data.series === void 0 ? s.values : byName.get(s.name).values);
|
|
40287
|
+
const numericCategories = sers.some((ser) => {
|
|
40288
|
+
const cat = firstChildElement(ser, NAME_C_CAT);
|
|
40289
|
+
return cat !== null && isNumericChannel(cat);
|
|
40290
|
+
});
|
|
40291
|
+
if (data.categories !== void 0 && numericCategories && categories.some((c) => !Number.isFinite(Number(c)) || c.trim() === "")) throw new Error("setChartData: this chart has numeric (date) categories; pass numbers");
|
|
40292
|
+
const workbook = embeddedWorkbookPart(pkg, resolved.partName);
|
|
40293
|
+
const layout = workbook ? layoutChartSheet({
|
|
40294
|
+
...current,
|
|
40295
|
+
categories,
|
|
40296
|
+
series: current.series.map((s, i) => ({
|
|
40297
|
+
...s,
|
|
40298
|
+
values: values[i]
|
|
40299
|
+
}))
|
|
40300
|
+
}) : null;
|
|
40301
|
+
sers.forEach((ser, i) => {
|
|
40302
|
+
const refs = layout?.series[i];
|
|
40303
|
+
const tx = firstChildElement(ser, NAME_C_TX);
|
|
40304
|
+
if (tx && refs) setChannel(tx, refs.name, null);
|
|
40305
|
+
let cat = firstChildElement(ser, NAME_C_CAT);
|
|
40306
|
+
const val = firstChildElement(ser, NAME_C_VAL);
|
|
40307
|
+
if (!val) throw new Error("setChartData: a series of this chart has no values");
|
|
40308
|
+
if (!cat && data.categories !== void 0) {
|
|
40309
|
+
cat = chartElem(ser, "cat", { children: [layout ? chartElem(ser, "strRef", { children: [chartElem(ser, "f"), chartElem(ser, "strCache")] }) : chartElem(ser, "strLit")] });
|
|
40310
|
+
ser.children.splice(ser.children.indexOf(val), 0, cat);
|
|
40311
|
+
}
|
|
40312
|
+
if (cat) setChannel(cat, layout?.categories ?? null, data.categories === void 0 ? null : isNumericChannel(cat) ? categories.map((c) => String(Number(c))) : categories);
|
|
40313
|
+
setChannel(val, refs?.values ?? null, data.series === void 0 ? null : values[i].map((v) => v === null ? null : String(v)));
|
|
40314
|
+
});
|
|
40315
|
+
part.data = encode$1(serializeXml(doc));
|
|
40316
|
+
if (workbook && layout) workbook.data = buildEmbeddedXlsx(layout.grid);
|
|
40317
|
+
};
|
|
40318
|
+
const rebuiltChartSpec = (current, kind, categories, series) => {
|
|
40319
|
+
const colors = new Map(current.series.map((s) => [s.name, s.color]));
|
|
40320
|
+
const plain = series.map(({ name, values }) => {
|
|
40321
|
+
const color = colors.get(name);
|
|
40322
|
+
return {
|
|
40323
|
+
name,
|
|
40324
|
+
values,
|
|
40325
|
+
...color !== void 0 ? { color } : {}
|
|
40326
|
+
};
|
|
40327
|
+
});
|
|
40328
|
+
const legend = current.legend && {
|
|
40329
|
+
position: current.legend.position,
|
|
40330
|
+
...current.legend.overlay !== void 0 ? { overlay: current.legend.overlay } : {},
|
|
40331
|
+
...current.legend.textStyle !== void 0 ? { textStyle: current.legend.textStyle } : {}
|
|
40332
|
+
};
|
|
40333
|
+
const common = {
|
|
40334
|
+
categories,
|
|
40335
|
+
...current.title !== void 0 ? { title: current.title } : {},
|
|
40336
|
+
...legend !== void 0 ? { legend } : {}
|
|
40337
|
+
};
|
|
40338
|
+
if (kind === "pie" || kind === "doughnut") {
|
|
40339
|
+
const [only, ...rest] = plain;
|
|
40340
|
+
if (only === void 0 || rest.length > 0) throw new Error(`setChartData: a ${kind} chart takes exactly one series`);
|
|
40341
|
+
return kind === "pie" ? {
|
|
40342
|
+
kind,
|
|
40343
|
+
...common,
|
|
40344
|
+
series: [only]
|
|
40345
|
+
} : {
|
|
40346
|
+
kind,
|
|
40347
|
+
...common,
|
|
40348
|
+
series: [only]
|
|
40349
|
+
};
|
|
40350
|
+
}
|
|
40351
|
+
return {
|
|
40352
|
+
kind,
|
|
40353
|
+
...common,
|
|
40354
|
+
series: plain,
|
|
40355
|
+
...current.categoryAxisTitle !== void 0 ? { categoryAxisTitle: current.categoryAxisTitle } : {},
|
|
40356
|
+
...current.valueAxisTitle !== void 0 ? { valueAxisTitle: current.valueAxisTitle } : {}
|
|
40357
|
+
};
|
|
39889
40358
|
};
|
|
39890
40359
|
/**
|
|
39891
40360
|
* Returns every chart on the slide, with its `ChartSpec` parsed from
|
|
@@ -40784,6 +41253,14 @@ const setShapeHyperlink = (shape, url, tooltip, options) => {
|
|
|
40784
41253
|
};
|
|
40785
41254
|
//#endregion
|
|
40786
41255
|
//#region src/api/fn/properties.ts
|
|
41256
|
+
const getRootRelPart = (pkg, type) => {
|
|
41257
|
+
for (const rel of pkg.rootRels()?.items ?? []) {
|
|
41258
|
+
if (rel.type !== type || rel.targetMode !== "Internal") continue;
|
|
41259
|
+
const part = pkg.getPart(resolveTarget("/", rel.target));
|
|
41260
|
+
if (part) return part;
|
|
41261
|
+
}
|
|
41262
|
+
return null;
|
|
41263
|
+
};
|
|
40787
41264
|
const NS_CORE_PROPS = "http://schemas.openxmlformats.org/package/2006/metadata/core-properties";
|
|
40788
41265
|
const NS_DC = "http://purl.org/dc/elements/1.1/";
|
|
40789
41266
|
const NS_DCTERMS = "http://purl.org/dc/terms/";
|
|
@@ -40838,7 +41315,7 @@ const getPresentationModified = (pres) => {
|
|
|
40838
41315
|
return Number.isFinite(d.getTime()) ? d : null;
|
|
40839
41316
|
};
|
|
40840
41317
|
const getCoreProperties = (pres) => {
|
|
40841
|
-
const part = pres[INTERNAL_PACKAGE].
|
|
41318
|
+
const part = getRootRelPart(pres[INTERNAL_PACKAGE], REL_TYPES.coreProperties);
|
|
40842
41319
|
if (!part) return null;
|
|
40843
41320
|
const root = parseXml(decode$1(part.data)).root;
|
|
40844
41321
|
const read = (uri, local) => {
|
|
@@ -40952,7 +41429,7 @@ const buildEmptyCorePropsRoot = () => {
|
|
|
40952
41429
|
*/
|
|
40953
41430
|
const setCoreProperties = (pres, values) => {
|
|
40954
41431
|
const pkg = pres[INTERNAL_PACKAGE];
|
|
40955
|
-
|
|
41432
|
+
const part = getRootRelPart(pkg, REL_TYPES.coreProperties);
|
|
40956
41433
|
let root;
|
|
40957
41434
|
let doc;
|
|
40958
41435
|
if (part) {
|
|
@@ -40985,12 +41462,15 @@ const setCoreProperties = (pres, values) => {
|
|
|
40985
41462
|
part.data = bytes;
|
|
40986
41463
|
return;
|
|
40987
41464
|
}
|
|
41465
|
+
pkg.removePart(CORE_PROPS_PART_NAME);
|
|
41466
|
+
pkg.contentTypes.overrides = pkg.contentTypes.overrides.filter((o) => !partNamesEqual(o.partName, CORE_PROPS_PART_NAME));
|
|
40988
41467
|
pkg.contentTypes.overrides.push({
|
|
40989
41468
|
partName: CORE_PROPS_PART_NAME,
|
|
40990
41469
|
contentType: CORE_PROPS_CONTENT_TYPE
|
|
40991
41470
|
});
|
|
40992
41471
|
pkg.addPart(CORE_PROPS_PART_NAME, CORE_PROPS_CONTENT_TYPE, bytes);
|
|
40993
41472
|
const rootRels = pkg.rootRels() ?? emptyRels();
|
|
41473
|
+
rootRels.items = rootRels.items.filter((r) => r.type !== REL_TYPES.coreProperties);
|
|
40994
41474
|
const rId = nextRelId(rootRels.items.map((r) => r.id));
|
|
40995
41475
|
rootRels.items.push({
|
|
40996
41476
|
id: rId,
|
|
@@ -41001,14 +41481,13 @@ const setCoreProperties = (pres, values) => {
|
|
|
41001
41481
|
pkg.setRootRels(rootRels);
|
|
41002
41482
|
};
|
|
41003
41483
|
const NS_EXT_PROPS = "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties";
|
|
41004
|
-
const EXT_PROPS_PART_NAME = partName("/docProps/app.xml");
|
|
41005
41484
|
/**
|
|
41006
41485
|
* Reads `/docProps/app.xml`. Returns `null` if the package has no
|
|
41007
41486
|
* extended-properties part. Each field is `null` when the
|
|
41008
41487
|
* corresponding element is absent or empty.
|
|
41009
41488
|
*/
|
|
41010
41489
|
const getExtendedProperties = (pres) => {
|
|
41011
|
-
const part = pres[INTERNAL_PACKAGE].
|
|
41490
|
+
const part = getRootRelPart(pres[INTERNAL_PACKAGE], REL_TYPES.extendedProperties);
|
|
41012
41491
|
if (!part) return null;
|
|
41013
41492
|
const root = parseXml(decode$1(part.data)).root;
|
|
41014
41493
|
const read = (local) => {
|
|
@@ -41064,8 +41543,8 @@ const EXT_PROP_FIELDS = [
|
|
|
41064
41543
|
* are left untouched.
|
|
41065
41544
|
*/
|
|
41066
41545
|
const setExtendedProperties = (pres, values) => {
|
|
41067
|
-
const part = pres[INTERNAL_PACKAGE].
|
|
41068
|
-
if (!part) throw new Error("setExtendedProperties:
|
|
41546
|
+
const part = getRootRelPart(pres[INTERNAL_PACKAGE], REL_TYPES.extendedProperties);
|
|
41547
|
+
if (!part) throw new Error("setExtendedProperties: the package has no extended-properties part; cannot bootstrap");
|
|
41069
41548
|
const doc = parseXml(decode$1(part.data));
|
|
41070
41549
|
for (const field of EXT_PROP_FIELDS) {
|
|
41071
41550
|
if (!(field.key in values)) continue;
|
|
@@ -42904,6 +43383,7 @@ const validatePresentationPackage = (pkg) => {
|
|
|
42904
43383
|
const validatePresentation = (pres) => validatePresentationPackage(pres[INTERNAL_PACKAGE]);
|
|
42905
43384
|
//#endregion
|
|
42906
43385
|
//#region src/api/fn/package-introspection.ts
|
|
43386
|
+
const TEXT_DECODER = new TextDecoder();
|
|
42907
43387
|
/**
|
|
42908
43388
|
* Power-user escape hatch. Returns the underlying `OpcPackage`
|
|
42909
43389
|
* backing `pres`. Use this when you need to manipulate parts /
|
|
@@ -42959,45 +43439,69 @@ const getMediaParts = (pres) => {
|
|
|
42959
43439
|
});
|
|
42960
43440
|
return out;
|
|
42961
43441
|
};
|
|
43442
|
+
const ROOT_RELS = "/_rels/.rels";
|
|
43443
|
+
const RELS_PART = /^(.*)\/_rels\/([^/]+)\.rels$/;
|
|
43444
|
+
const resolveClamped = (source, target) => {
|
|
43445
|
+
if (target.startsWith("/")) return target;
|
|
43446
|
+
const segments = source.split("/").slice(1, -1);
|
|
43447
|
+
for (const seg of target.split("/")) if (seg === "..") segments.pop();
|
|
43448
|
+
else if (seg !== "." && seg.length > 0) segments.push(seg);
|
|
43449
|
+
return `/${segments.join("/")}`;
|
|
43450
|
+
};
|
|
43451
|
+
/** `/ppt/slides/_rels/slide1.xml.rels` → `/ppt/slides/slide1.xml`; `null` for other parts. */
|
|
43452
|
+
const relsSourceOf = (name) => {
|
|
43453
|
+
const m = RELS_PART.exec(name);
|
|
43454
|
+
return m ? `${m[1]}/${m[2]}` : null;
|
|
43455
|
+
};
|
|
43456
|
+
const existingPartName = (byName, target) => {
|
|
43457
|
+
const lower = target.toLowerCase();
|
|
43458
|
+
if (byName.has(lower)) return lower;
|
|
43459
|
+
try {
|
|
43460
|
+
const decoded = decodeURIComponent(target).toLowerCase();
|
|
43461
|
+
return byName.has(decoded) ? decoded : null;
|
|
43462
|
+
} catch {
|
|
43463
|
+
return null;
|
|
43464
|
+
}
|
|
43465
|
+
};
|
|
42962
43466
|
/**
|
|
42963
|
-
*
|
|
42964
|
-
*
|
|
42965
|
-
*
|
|
43467
|
+
* Lowercased names of the parts reachable from `/_rels/.rels` through
|
|
43468
|
+
* internal relationships (OPC part names compare case-insensitively), or
|
|
43469
|
+
* `null` when that does not reach `/ppt/presentation.xml`, since the
|
|
43470
|
+
* library opens the presentation part by name and the graph is then unusable.
|
|
43471
|
+
*/
|
|
43472
|
+
const reachablePartNames = (pkg) => {
|
|
43473
|
+
const byName = new Map(pkg.parts.map((p) => [p.name.toLowerCase(), p]));
|
|
43474
|
+
const reachable = /* @__PURE__ */ new Set();
|
|
43475
|
+
const queue = ["/"];
|
|
43476
|
+
while (queue.length > 0) {
|
|
43477
|
+
const source = queue.pop();
|
|
43478
|
+
const relsName = source === "/" ? ROOT_RELS : relsPartNameFor(source).toLowerCase();
|
|
43479
|
+
const relsPart = byName.get(relsName);
|
|
43480
|
+
if (!relsPart) continue;
|
|
43481
|
+
for (const rel of parseRels(TEXT_DECODER.decode(relsPart.data)).items) {
|
|
43482
|
+
if (rel.targetMode === "External" || rel.target === "") continue;
|
|
43483
|
+
const target = existingPartName(byName, resolveClamped(source, rel.target));
|
|
43484
|
+
if (target === null || reachable.has(target)) continue;
|
|
43485
|
+
reachable.add(target);
|
|
43486
|
+
queue.push(partName(target));
|
|
43487
|
+
}
|
|
43488
|
+
}
|
|
43489
|
+
return reachable.has(PRES_PART_NAME) ? reachable : null;
|
|
43490
|
+
};
|
|
43491
|
+
/**
|
|
43492
|
+
* Returns every media part that cannot be reached from the package root
|
|
43493
|
+
* through internal relationships — the media subset of what
|
|
43494
|
+
* `compactPackage` would remove. Non-destructive; the caller decides
|
|
43495
|
+
* whether to delete.
|
|
42966
43496
|
*
|
|
42967
43497
|
* Useful for audit UIs that want to surface bloat before cleaning,
|
|
42968
43498
|
* and for "is this asset still used?" checks.
|
|
42969
43499
|
*/
|
|
42970
43500
|
const getOrphanMediaPartNames = (pres) => {
|
|
42971
43501
|
const pkg = pres[INTERNAL_PACKAGE];
|
|
42972
|
-
const
|
|
42973
|
-
|
|
42974
|
-
|
|
42975
|
-
const dir = sourcePart.split("/").slice(0, -1);
|
|
42976
|
-
const segments = [];
|
|
42977
|
-
for (const seg of [...dir, ...target.split("/")]) if (seg === "..") segments.pop();
|
|
42978
|
-
else if (seg !== "." && seg.length > 0) segments.push(seg);
|
|
42979
|
-
return `/${segments.join("/")}`;
|
|
42980
|
-
};
|
|
42981
|
-
for (const part of pkg.parts) {
|
|
42982
|
-
if (!part.name.endsWith(".rels")) continue;
|
|
42983
|
-
const m = part.name.match(/^(.*)\/_rels\/(.+)\.rels$/);
|
|
42984
|
-
let sourceName;
|
|
42985
|
-
if (part.name === "/_rels/.rels") sourceName = "/";
|
|
42986
|
-
else if (m) sourceName = `${m[1]}/${m[2]}`;
|
|
42987
|
-
else continue;
|
|
42988
|
-
const sourceRels = sourceName === "/" ? pkg.rootRels() : pkg.getRels(sourceName);
|
|
42989
|
-
if (!sourceRels) continue;
|
|
42990
|
-
for (const rel of sourceRels.items) {
|
|
42991
|
-
if (rel.targetMode === "External") continue;
|
|
42992
|
-
referenced.add(resolve(sourceName, rel.target).toLowerCase());
|
|
42993
|
-
}
|
|
42994
|
-
}
|
|
42995
|
-
const out = [];
|
|
42996
|
-
for (const part of pkg.parts) {
|
|
42997
|
-
if (!part.name.startsWith("/ppt/media/")) continue;
|
|
42998
|
-
if (!referenced.has(part.name.toLowerCase())) out.push(part.name);
|
|
42999
|
-
}
|
|
43000
|
-
return out;
|
|
43502
|
+
const reachable = reachablePartNames(pkg);
|
|
43503
|
+
if (reachable === null) return [];
|
|
43504
|
+
return pkg.parts.filter((p) => p.name.startsWith("/ppt/media/") && !reachable.has(p.name.toLowerCase())).map((p) => p.name);
|
|
43001
43505
|
};
|
|
43002
43506
|
/**
|
|
43003
43507
|
* Returns every media part name the slide's rels reference
|
|
@@ -43008,19 +43512,11 @@ const getOrphanMediaPartNames = (pres) => {
|
|
|
43008
43512
|
const getSlideMediaPartNames = (slide) => {
|
|
43009
43513
|
const rels = slide[INTERNAL_PACKAGE].getRels(slide[SLIDE_PART_NAME]);
|
|
43010
43514
|
if (!rels) return [];
|
|
43011
|
-
const resolve = (sourcePart, target) => {
|
|
43012
|
-
if (target.startsWith("/")) return target;
|
|
43013
|
-
const dir = sourcePart.split("/").slice(0, -1);
|
|
43014
|
-
const segments = [];
|
|
43015
|
-
for (const seg of [...dir, ...target.split("/")]) if (seg === "..") segments.pop();
|
|
43016
|
-
else if (seg !== "." && seg.length > 0) segments.push(seg);
|
|
43017
|
-
return `/${segments.join("/")}`;
|
|
43018
|
-
};
|
|
43019
43515
|
const out = [];
|
|
43020
43516
|
const seen = /* @__PURE__ */ new Set();
|
|
43021
43517
|
for (const rel of rels.items) {
|
|
43022
43518
|
if (rel.targetMode === "External") continue;
|
|
43023
|
-
const resolved =
|
|
43519
|
+
const resolved = resolveClamped(slide[SLIDE_PART_NAME], rel.target);
|
|
43024
43520
|
if (!resolved.startsWith("/ppt/media/")) continue;
|
|
43025
43521
|
if (seen.has(resolved)) continue;
|
|
43026
43522
|
seen.add(resolved);
|
|
@@ -43038,64 +43534,37 @@ const getSlideMediaPartNames = (slide) => {
|
|
|
43038
43534
|
*/
|
|
43039
43535
|
const slidesUsingMediaPart = (pres, mediaPartName) => {
|
|
43040
43536
|
const pkg = pres[INTERNAL_PACKAGE];
|
|
43041
|
-
const resolve = (sourcePart, target) => {
|
|
43042
|
-
if (target.startsWith("/")) return target;
|
|
43043
|
-
const dir = sourcePart.split("/").slice(0, -1);
|
|
43044
|
-
const segments = [];
|
|
43045
|
-
for (const seg of [...dir, ...target.split("/")]) if (seg === "..") segments.pop();
|
|
43046
|
-
else if (seg !== "." && seg.length > 0) segments.push(seg);
|
|
43047
|
-
return `/${segments.join("/")}`;
|
|
43048
|
-
};
|
|
43049
43537
|
const out = [];
|
|
43050
43538
|
for (const slide of getSlides(pres)) {
|
|
43051
43539
|
const rels = pkg.getRels(slide[SLIDE_PART_NAME]);
|
|
43052
43540
|
if (!rels) continue;
|
|
43053
|
-
if (rels.items.some((r) => r.targetMode !== "External" &&
|
|
43541
|
+
if (rels.items.some((r) => r.targetMode !== "External" && resolveClamped(slide[SLIDE_PART_NAME], r.target) === mediaPartName)) out.push(slide);
|
|
43054
43542
|
}
|
|
43055
43543
|
return out;
|
|
43056
43544
|
};
|
|
43057
43545
|
/**
|
|
43058
|
-
* Removes
|
|
43059
|
-
*
|
|
43060
|
-
*
|
|
43546
|
+
* Removes every part that cannot be reached from the package root
|
|
43547
|
+
* (`/_rels/.rels`) through internal relationships, together with its
|
|
43548
|
+
* `.rels` part and its `[Content_Types].xml` override. Returns the
|
|
43549
|
+
* removed part names.
|
|
43061
43550
|
*
|
|
43062
|
-
*
|
|
43063
|
-
*
|
|
43064
|
-
*
|
|
43551
|
+
* `removeSlide` removes only the slide and its `.rels`, so the slide's
|
|
43552
|
+
* charts, embedded workbooks, notes slide, tags and media stay in the
|
|
43553
|
+
* package until this runs. Parts still in use — including layouts no
|
|
43554
|
+
* slide uses, which their master references — are kept. Any other part
|
|
43555
|
+
* nothing points at, such as custom data added without a relationship, is
|
|
43556
|
+
* removed too. When `/_rels/.rels` does not reach `/ppt/presentation.xml`,
|
|
43557
|
+
* nothing is removed.
|
|
43065
43558
|
*/
|
|
43066
43559
|
const compactPackage = (pres) => {
|
|
43067
43560
|
const pkg = pres[INTERNAL_PACKAGE];
|
|
43068
|
-
const
|
|
43069
|
-
|
|
43070
|
-
|
|
43071
|
-
const
|
|
43072
|
-
|
|
43073
|
-
|
|
43074
|
-
|
|
43075
|
-
return `/${segments.join("/")}`;
|
|
43076
|
-
};
|
|
43077
|
-
for (const part of pkg.parts) {
|
|
43078
|
-
if (!part.name.endsWith(".rels")) continue;
|
|
43079
|
-
let sourceName = part.name.replace("/_rels/", "/").replace(/\.rels$/, "");
|
|
43080
|
-
if (sourceName === "/" || sourceName === "") sourceName = "/";
|
|
43081
|
-
const rels = sourceName === "/" ? null : pkg.getRels(partName(sourceName));
|
|
43082
|
-
if (!rels) continue;
|
|
43083
|
-
for (const rel of rels.items) {
|
|
43084
|
-
if (rel.targetMode === "External") continue;
|
|
43085
|
-
referenced.add(resolve(sourceName, rel.target).toLowerCase());
|
|
43086
|
-
}
|
|
43087
|
-
}
|
|
43088
|
-
const removed = [];
|
|
43089
|
-
const orphans = [];
|
|
43090
|
-
for (const part of pkg.parts) {
|
|
43091
|
-
if (!part.name.startsWith("/ppt/media/")) continue;
|
|
43092
|
-
if (!referenced.has(part.name.toLowerCase())) orphans.push(part.name);
|
|
43093
|
-
}
|
|
43094
|
-
for (const name of orphans) {
|
|
43095
|
-
pkg.removePart(partName(name));
|
|
43096
|
-
removed.push(name);
|
|
43097
|
-
}
|
|
43098
|
-
return { removed };
|
|
43561
|
+
const reachable = reachablePartNames(pkg);
|
|
43562
|
+
if (reachable === null) return { removed: [] };
|
|
43563
|
+
return { removed: pkg.retainParts((part) => {
|
|
43564
|
+
const lower = part.name.toLowerCase();
|
|
43565
|
+
if (lower === ROOT_RELS) return true;
|
|
43566
|
+
return reachable.has(relsSourceOf(lower) ?? lower);
|
|
43567
|
+
}) };
|
|
43099
43568
|
};
|
|
43100
43569
|
/**
|
|
43101
43570
|
* Replaces the bytes of a media part in place. Returns `true` if the
|
|
@@ -50327,13 +50796,7 @@ const getShapeSlide = (shape) => shape[SHAPE_SLIDE];
|
|
|
50327
50796
|
* sibling of `getSlideXmlString`; useful for snapshot tests, bug
|
|
50328
50797
|
* reports, and before/after dumps during transformations.
|
|
50329
50798
|
*/
|
|
50330
|
-
const getShapeXmlString = (shape) =>
|
|
50331
|
-
kind: "document",
|
|
50332
|
-
decl: null,
|
|
50333
|
-
root: shape[SHAPE_ELEMENT],
|
|
50334
|
-
prolog: [],
|
|
50335
|
-
epilog: []
|
|
50336
|
-
});
|
|
50799
|
+
const getShapeXmlString = (shape) => XML_DECLARATION + serializeFragment(shape[SHAPE_ELEMENT]);
|
|
50337
50800
|
/**
|
|
50338
50801
|
* Returns the 0-based document-order index of `shape` on its slide,
|
|
50339
50802
|
* or `-1` when the shape is stale (e.g. after a `removeShape` that
|
|
@@ -53856,9 +54319,11 @@ const stripSlideReferences = (element, relIds) => {
|
|
|
53856
54319
|
* Links to this slide from other slides are cleared to prevent accidental
|
|
53857
54320
|
* retargeting when a slide part name is reused.
|
|
53858
54321
|
*
|
|
53859
|
-
*
|
|
53860
|
-
*
|
|
53861
|
-
* `
|
|
54322
|
+
* Parts the slide referenced (media, charts and their workbooks, the notes
|
|
54323
|
+
* slide, tags) are left in place because other slides may share them; call
|
|
54324
|
+
* `compactPackage` afterwards to drop the ones nothing references any more.
|
|
54325
|
+
* The freed `sldId` is NOT reused on subsequent `addSlide` calls (the
|
|
54326
|
+
* reference desktop app's quirk, see plan §Risks).
|
|
53862
54327
|
*/
|
|
53863
54328
|
const removeSlide = (pres, slide) => {
|
|
53864
54329
|
const pkg = pres[INTERNAL_PACKAGE];
|
|
@@ -55422,8 +55887,8 @@ const getShapeImageIntrinsicSize = (shape) => {
|
|
|
55422
55887
|
};
|
|
55423
55888
|
//#endregion
|
|
55424
55889
|
//#region src/api/index.ts
|
|
55425
|
-
const VERSION = "0.
|
|
55890
|
+
const VERSION = "0.25.0";
|
|
55426
55891
|
//#endregion
|
|
55427
|
-
export { getHandoutMasterPlaceholders as $, findSlidesByLayoutPartName as $a, getShapeChartCategories as $c, getShapeStrokeCap as $i, getSlideLayouts as $l, findShapesByEffect as $n, getSlideNotesTextFormats as $o, getShapePlaceholderIdx as $r, getTableCellText3D as $s, replaceTextInNotes as $t, isShapeLocked as A, setParagraphBullet as Aa, getThumbnail as Ac, setShapeGradientFill as Ai, getSlideMasterShapes as Al, getShapeTextAutoFitParams as An, clearAllHyperlinks as Ao, getSlidesWithEmptyPlaceholders as Ar, getPresentationSummary as As, findSlidesByText as At, getSlideComments as Au, addSectionHeaderSlide as B, getSlideTitle as Ba, touchModified as Bc, setShapeStroke as Bi, setSlideLayoutBackground as Bl, setShapeText as Bn, getAllNotes as Bo, getMaxShapeIdInPresentation as Br, getTableBackgroundEffective as Bs, getSlideIndex as Bt, savePresentation as Bu, ungroupShapes as C, getShapeRunClickAction as Ca, setTableCellTextDirection as Cc, getShapePatternFill as Ci, getSlideLayoutBackgroundPatternFill as Cl, removeSlideAnimation as Cn, SLIDE_SIZE_16_10 as Co, findSlidePlaceholders as Cr, getShapeMediaPlayback as Cs, setSlideMasterPreserved as Ct, getCommentStatus as Cu, setShapeTextLanguage as D, getShapeRunText as Da, setTableStyleFlags as Dc, setShapeAdjustValues as Di, getSlideMasterBackgroundGradientFill as Dl, getShapeText3D as Dn, getSlideSize as Do, getShapesBounds as Dr, getMediaParts as Ds, findSlideByText as Dt, getPresentationCommentCountsBySlide as Du, getShapeTextLanguage as E, getShapeRunHyperlinkTooltip as Ea, setTableRowHeight as Ec, getShapeStrokeSketch as Ei, getSlideMasterBackground as El, getShapeBodyPrEffective as En, getPresentationFirstSlideNumber as Eo, getShapeXmlString as Er, compactPackage as Es, findSlideByPartName as Et, getPresentationCommentCountsByAuthor as Eu, resetSlideLayout as F, setParagraphTabs as Fa, getPresentationCreated as Fc, setShapePosition as Fi, setSlideBackgroundImageOpacity as Fl, getShapeTextMargins as Fn, findSlidesWithChartTrendlines as Fo, findShapesAtPoint as Fr, slidesUsingMediaPart as Fs, getPresentationTextLength as Ft, getPresentationTheme as Fu, duplicateSlideAt as G, findShapesWithAnimation as Ga, setShapeRunFormat as Gc, setShapeStrokeJoin as Gi, findSlideLayoutByPartName as Gl, setShapeTextColumns as Gn, getPresentationHyperlinkCountsBySlide as Go, getShapeBoundsResolved as Gr, getTableCellBorders as Gs, getSlideText as Gt, asColor as Gu, addSlideAt as H, setSlidePlaceholders as Ha, getShapeHyperlink as Hc, setShapeStrokeCap as Hi, setSlideLayoutPlaceholderBounds as Hl, setShapeTextAnchor as Hn, getDistinctHyperlinkUrls as Ho, getShapeAdjustValues as Hr, getTableCellAlignment as Hs, getSlideLayoutCount as Ht, BUILTIN_TABLE_STYLES as Hu, resetSlidePlaceholderGeometry as I, setParagraphTypography as Ia, getPresentationModified as Ic, setShapePreset as Ii, setSlideBackgroundPatternFill as Il, getShapeTextWrap as In, getAllCharts as Io, findShapesInRect as Ir, validatePresentation as Is, getPresentationTextLengthsBySlide as It, setPresentationFonts as Iu, moveSlide as J, setShapeAnimation as Ja, findChartsBySeriesName as Jc, getShapeFillColor as Ji, getSlideLayoutPartName$1 as Jl, setShapeTextFlat as Jn, getPresentationNotesText as Jo, getShapeDescription as Jr, getTableCellParagraphs as Js, getSlides as Jt, inches as Ju, importSlide as K, getShapeAnimation as Ka, addSlideChart as Kc, setShapeStrokeSketch as Ki, findSlideLayoutByType as Kl, setShapeTextDirection as Kn, getPresentationNotesLength as Ko, getShapeCenter as Kr, getTableCellFill as Ks, getSlideTextLength as Kt, cm as Ku, resetSlidePlaceholderTextFormatting as L, setShapeRunHyperlink as La, incrementRevision as Lc, setShapeRotation as Li, getShapeGradientFill as Ll, setShapeAlignment as Ln, getAllComments as Lo, getGroupChildren as Lr, clearTableCellFill as Ls, getShapeAt as Lt, setPresentationTheme as Lu, setShapeLocked as M, setParagraphLevel as Ma, setThumbnail as Mc, setShapeNoFill as Mi, setSlideBackgroundGradientFill as Ml, getShapeTextColumns as Mn, clearSlideHyperlinks as Mo, setSlideLayout as Mr, listPackageParts as Ms, getOutlineText as Mt, setCommentStatus as Mu, addMissingSlidePlaceholders as N, setParagraphLineSpacing as Na, getCoreProperties as Nc, setShapeNoStroke as Ni, setSlideBackgroundImage as Nl, getShapeTextDirection as Nn, findSlidesByHyperlink as No, translateShapes as Nr, readPackagePart as Ns, getPresentationShapeCountsBySlide as Nt, setCommentText as Nu, setShapeCustomGeometry as O, isParagraphBulletPicture as Oa, setTableStyleId as Oc, setShapeFill as Oi, getSlideMasterBackgroundImageBytes as Ol, getShapeTextAnchor as On, setSlideSize as Oo, getSlideLayout as Or, getOrphanMediaPartNames as Os, findSlideByTitle as Ot, getPresentationCommenters as Ou, addSlidePlaceholder as P, setParagraphSpacing as Pa, getExtendedProperties as Pc, setShapePatternFill as Pi, setSlideBackgroundImageFillLayout as Pl, getShapeTextFlat as Pn, findSlidesWithChartKind as Po, centerShapeOnSlide as Pr, setMediaPartBytes as Ps, getPresentationText as Pt, getPresentationFonts as Pu, swapSlides as Q, findSlidesByLayoutName as Qa, getPresentationChartKindCounts as Qc, getShapeStroke as Qi, getSlideLayoutUsageCountsByType as Ql, clearShapeEffects as Qn, getSlideNotesParagraphEndFormat as Qo, getShapeName as Qr, getTableCellText as Qs, isSlideLayoutBackgroundGraphicsHidden as Qt, addBlankSlide as R, setShapeRunText as Ra, setCoreProperties as Rc, setShapeSize as Ri, getShapeGradientFillEffective as Rl, setShapeBulletStyle as Rn, getAllHyperlinks as Ro, getGroupTransform as Rr, getPresentationTableCountsBySlide as Rs, getSlideAt as Rt, createPresentation as Ru, groupShapes as S, getShapeParagraphElements as Sa, setTableCellText as Sc, clearShapeStroke as Si, getSlideLayoutBackgroundImageBytes as Sl, moveSlideAnimation as Sn, setShapeImageRecolor as So, findSlidePlaceholderByIdx as Sr, getShapeMedia as Ss, setSlideMasterPlaceholderIncluded as St, getCommentSlide as Su, getParagraphElementLanguages as T, getShapeRunHyperlink as Ta, setTableColumnWidth as Tc, getShapeStrokeDash as Ti, getSlideLayoutShapes as Tl, appendShapeText as Tn, SLIDE_SIZE_4_3 as To, getShapeSlide as Tr, _internalPackageOf as Ts, setSlideSections as Tt, getCommentsSortedByDate as Tu, addTitleSlide as U, setSlideTitle as Ua, getShapeRunFormatEffective as Uc, setShapeStrokeCompound as Ui, findLayoutsWithPlaceholderType as Ul, setShapeTextAutoFit as Un, getEmptySlides as Uo, getShapeAltTitle as Ur, getTableCellAnchor as Us, getSlideOutline as Ut, BUILTIN_PICTURE_STYLES as Uu, addSlide as V, setSlideBody as Va, getParagraphPropertiesEffective as Vc, setShapeStrokeArrow as Vi, setSlideLayoutName as Vl, setShapeText3D as Vn, getAllTables as Vo, getPresetGeometry as Vr, getTableCell as Vs, getSlideInfo as Vt, COMMENT_STATUSES as Vu, duplicateSlide as W, clearSlideAnimations as Wa, setShapeHyperlink as Wc, setShapeStrokeDash as Wi, findSlideLayout as Wl, setShapeTextBodyRotationDeg as Wn, getHiddenSlides as Wo, getShapeBounds as Wr, getTableCellAppearanceEffective as Ws, getSlidePartName as Wt, toWritableTextFormat as Wu, reverseSlides as X, findOverlappingShapePairs as Xa, findChartsWithTrendlines as Xc, getShapeFillEffective as Xi, getSlideLayoutType as Xl, setShapeTextMargins as Xn, getSlideNotesLength as Xo, getShapeId as Xr, getTableCellRunFormatEffective as Xs, isSlideBackgroundGraphicsHidden as Xt, pt as Xu, removeSlide as Y, findFlippedShapes as Ya, findChartsWithDataLabels as Yc, getShapeFillColorResolved as Yi, getSlideLayoutPlaceholders as Yl, setShapeTextFormat as Yn, getSlideNotes as Yo, getShapeFlip as Yr, getTableCellPosition as Ys, getSlidesByLayout as Yt, mm as Yu, sortSlides as Z, findShapesOutsideCanvas as Za, getPresentationChartCountsBySlide as Zc, getShapeFillOpacity as Zi, getSlideLayoutUsageCounts as Zl, setShapeTextWrap as Zn, getSlideNotesLineBreaks as Zo, getShapeKind as Zr, getTableCellSpan as Zs, isSlideHidden as Zt, resetShapeVideoFormatting as _, getParagraphLevel as _a, setTableCellBorders as _c, setShapeBounds as _i, getSlideBackgroundImageOpacity as _l, getShapeZIndex as _n, resetShapeImageColorEffects as _o, findShapesByName as _r, getSlideTransitionSound as _s, removeSlideMaster as _t, getCommentAuthors as _u, getCollapsedOutlineSlides as a, getShapeStrokeJoin as aa, getTableSize as ac, getShapeText as ai, setChartSpec as al, setSlideBackgroundGraphicsHidden as an, getShapeImageBytes as ao, setShapeGlow as ar, getSlidesWithOverlap as as, setNotesMasterPlaceholderIncluded as at, setCustomShows as au, setShapeImageCompressionState as b, getShapeHyperlinkTooltip as ba, setTableCellMargins as bc, shapesOverlap as bi, getSlideLayoutBackground as bl, sendShapeToBack as bn, setShapeImageCrop as bo, findShapesWithHyperlinks as br, addSlideMedia as bs, setSlideLayoutTitleIncluded as bt, getCommentParent as bu, getGridSpacing as c, getShapeRunFormat as ca, insertTableColumn as cc, getSlideMasterPartNames as ci, applySlideBackgroundToAll as cl, addSlideImage as cn, getShapeImageDuotone as co, setShapeShadow as cr, hasSlideNotes as cs, setSlideShowProperties as ct, clearAllSlideComments as cu, setDrawingGuidesVisible as d, getParagraphAlignment as da, isTableShape as dc, isShapeHidden as di, getSlideBackground as dl, addSlideTable as dn, getShapeImageLinkUrl as do, findShapeById as dr, resolveSlideNotesTextColor as ds, addSlideMaster as dt, findCommentsAfter as du, getShapeStrokeColor as ea, getTableCellTextDirection as ec, getShapePlaceholderType as ei, getShapeChartKind as el, replaceTextInPresentation as en, findSlidesByLayoutType as eo, getShape3D as er, getSlidesWithCharts as es, getHandoutSlidesPerPage as et, getUnusedSlideLayouts as eu, setGridSpacing as f, getParagraphBullet as fa, mergeTableCells as fc, isShapePlaceholder as fi, getSlideBackgroundGradientFill as fl, addSlideTextBox as fn, getShapeImageOpacity as fo, findShapeByName as fr, setSlideNotes as fs, getSlideMasterLayouts as ft, findCommentsBefore as fu, setSlideMasterBackgroundStyle as g, getParagraphIndent as ga, setTableCellAnchor as gc, setShapeAltTitle as gi, getSlideBackgroundImageIntrinsicSize as gl, copyShape as gn, isShapeImageGrayscale as go, findShapesByKind as gr, getSlideTransition as gs, removeSlideLayout as gt, getCommentAuthor as gu, getSlideMasterBackgroundStyles as h, getParagraphEndFormat as ha, setTableCellAlignment as hc, renameShape as hi, getSlideBackgroundImageFillLayout as hl, clearSlideShapes as hn, hasShapeText as ho, findShapesByHyperlink as hr, clearSlideTransition as hs, isSlideMasterPreserved as ht, findSlidesWithCommentsByAuthor as hu, setShapeImageFillLayout as i, getShapeStrokeGradient as ia, getTableRowHeights as ic, getShapeSize as ii, getSlideCharts as il, searchSlides as in, getShapeImageBrightness as io, setShape3D as ir, getSlidesWithNotes as is, setHandoutSlidesPerPage as it, getCustomShows as iu, setShapeAspectRatioLocked as j, setParagraphIndent as ja, removeThumbnail as jc, setShapeImageFill as ji, setSlideBackground as jl, getShapeTextBodyRotationDeg as jn, clearAllSlideNotes as jo, replaceTokensInSlide as jr, getSlideMediaPartNames as js, getAllShapes as jt, removeSlideComment as ju, isShapeAspectRatioLocked as k, setParagraphAlignment as ka, splitTableCell as kc, setShapeFlip as ki, getSlideMasterBackgroundPatternFill as kl, getShapeTextAutoFit as kn, appendSlideNotes as ko, getSlideShapes as kr, getPackageSize as ks, findSlidesByNotes as kt, getSlideCommentAuthors as ku, getSnapToGrid as l, resolveDrawingColor as la, insertTableRow as lc, getSlideMasterUsageCounts as li, clearSlideBackground as ll, addSlideLine as ln, getShapeImageFillBytes as lo, setShapeSoftEdge as lr, removeSlideNotes as ls, addSlideLayout as lt, clearSlideComments as lu, setSnapToGrid as m, getParagraphBulletStyle as ma, removeTableRow as mc, pointInShape as mi, getSlideBackgroundImageCrop as ml, bringShapeToFront as mn, hasShapeImage as mo, findShapeInPresentation as mr, transformSlideNotesCase as ms, getSlideMasterPlaceholders as mt, findCommentsByText as mu, getShapeImageFillLayout as n, getShapeStrokeCompound as na, getTableColumnWidths as nc, getShapePreset as ni, getShapeChartSeriesValues as nl, replaceTextInSlideNotes as nn, getShapeImageArtisticEffect as no, getShapeEffects as nr, getSlidesWithHyperlinks as ns, getNotesPageSize as nt, getShapeClickAction as nu, getDrawingGuides as o, getShapeStrokeOpacity as oa, getTableStyleFlags as oc, getSlideMasterCount as oi, getEffectiveColorMap as ol, setSlideHidden as on, getShapeImageContrast as oo, setShapeInnerShadow as or, getSlidesWithTables as os, setNotesPageOrientation as ot, setShapeImage as ou, setSlideOutlineCollapsed as p, getParagraphBulletImageBytes as pa, removeTableColumn as pc, isShapeTextBox as pi, getSlideBackgroundImageBytes as pl, bringShapeForward as pn, getShapeImagePartName as po, findShapeByText as pr, setSlideNotesFormat as ps, getSlideMasterName as pt, findCommentsByAuthor as pu, mergePresentations as q, getSlideAnimations as qa, findChartByKind as qc, getShapeFill as qi, getSlideLayoutName as ql, setShapeTextField as qn, getPresentationNotesLengthsBySlide as qo, getShapeCustomGeometry as qr, getTableCellMargins as qs, getSlideXmlString as qt, emu as qu, getShapeImageIntrinsicSize as r, getShapeStrokeEffective as ra, getTableDimensions as rc, getShapeRotation as ri, getShapeChartSpec as rl, replaceTokensInPresentation as rn, getShapeImageBiLevelThreshold as ro, getShapeEffectsEffective as rr, getSlidesWithImages as rs, setHandoutMasterPlaceholderIncluded as rt, setShapeClickAction as ru, getDrawingGuidesVisible as s, getShapeStrokeWidth as sa, getTableStyleId as sc, getSlideMasterPartName as si, resolveDeckBodyTextColor as sl, slideHasAnimations as sn, getShapeImageCrop as so, setShapeReflection as sr, getVisibleSlides as ss, getSlideShowProperties as st, addSlideComment as su, VERSION as t, getShapeStrokeColorResolved as ta, getTableCells as tc, getShapePosition as ti, getShapeChartSeriesNames as tl, replaceTextInSlide as tn, getPresentationImageCountsBySlide as to, getShapeEffect as tr, getSlidesWithComments as ts, getNotesMasterPlaceholders as tt, isChartSpec as tu, setDrawingGuides as u, resolveDrawingColorOpacity as ua, isChartShape as uc, getUnusedSlideMasters as ui, copySlideBackground as ul, addSlideShape as un, getShapeImageFormat as uo, findEmptyPlaceholders as ur, replaceHyperlink as us, addSlideLayoutPlaceholder as ut, findCommentAuthorByName as uu, getShapeImageCompressionState as v, getParagraphLineSpacing as va, setTableCellClickAction as vc, setShapeDescription as vi, getSlideBackgroundPatternFill as vl, removeShape as vn, setShapeImageBrightness as vo, findShapesByPreset as vr, setSlideTransition as vs, setSlideLayoutBackgroundGraphicsHidden as vt, getCommentDate as vu, setShapeStyle as w, getShapeRunCount as wa, setTableCellTextFormat as wc, getShapeStrokeArrow as wi, getSlideLayoutBackgroundShapes as wl, updateSlideAnimation as wn, SLIDE_SIZE_16_9 as wo, getShapeIndex as wr, setShapeMediaPlayback as ws, getSlideSections as wt, getCommentText as wu, setShapePictureStyle as x, getShapeParagraphCount as xa, setTableCellParagraphs as xc, clearShapeFill as xi, getSlideLayoutBackgroundGradientFill as xl, setShapeZIndex as xn, setShapeImageOpacity as xo, findSlidePlaceholder as xr, findShapesWithMedia as xs, setSlideMasterName as xt, getCommentPosition as xu, getShapePictureStyle as y, getParagraphSpacing as ya, setTableCellFill as yc, setShapeHidden as yi, getSlideColorMapOverride as yl, sendShapeBackward as yn, setShapeImageContrast as yo, findShapesByText as yr, setSlideTransitionSound as ys, setSlideLayoutFootersIncluded as yt, getCommentFormat as yu, addContentSlide as z, getSlideBody as za, setExtendedProperties as zc, setShapeSlideBackgroundFill as zi, clearSlideLayoutBackground as zl, setShapeParagraphs as zn, getAllImages as zo, getMaxShapeId as zr, getSlideTables as zs, getSlideCount as zt, loadPresentation as zu };
|
|
55892
|
+
export { getHandoutMasterPlaceholders as $, findSlidesByLayoutPartName as $a, getShapeChartCategories as $c, getShapeStrokeCap as $i, getSlideLayoutUsageCountsByType as $l, findShapesByEffect as $n, getSlideNotesTextFormats as $o, getShapePlaceholderIdx as $r, getTableCellText3D as $s, replaceTextInNotes as $t, isShapeLocked as A, setParagraphBullet as Aa, getThumbnail as Ac, setShapeGradientFill as Ai, getSlideMasterBackgroundPatternFill as Al, getShapeTextAutoFitParams as An, clearAllHyperlinks as Ao, getSlidesWithEmptyPlaceholders as Ar, getPresentationSummary as As, findSlidesByText as At, getSlideCommentAuthors as Au, addSectionHeaderSlide as B, getSlideTitle as Ba, touchModified as Bc, setShapeStroke as Bi, clearSlideLayoutBackground as Bl, setShapeText as Bn, getAllNotes as Bo, getMaxShapeIdInPresentation as Br, getTableBackgroundEffective as Bs, getSlideIndex as Bt, loadPresentation as Bu, ungroupShapes as C, getShapeRunClickAction as Ca, setTableCellTextDirection as Cc, getShapePatternFill as Ci, getSlideLayoutBackgroundImageBytes as Cl, removeSlideAnimation as Cn, SLIDE_SIZE_16_10 as Co, findSlidePlaceholders as Cr, getShapeMediaPlayback as Cs, setSlideMasterPreserved as Ct, getCommentSlide as Cu, setShapeTextLanguage as D, getShapeRunText as Da, setTableStyleFlags as Dc, setShapeAdjustValues as Di, getSlideMasterBackground as Dl, getShapeText3D as Dn, getSlideSize as Do, getShapesBounds as Dr, getMediaParts as Ds, findSlideByText as Dt, getPresentationCommentCountsByAuthor as Du, getShapeTextLanguage as E, getShapeRunHyperlinkTooltip as Ea, setTableRowHeight as Ec, getShapeStrokeSketch as Ei, getSlideLayoutShapes as El, getShapeBodyPrEffective as En, getPresentationFirstSlideNumber as Eo, getShapeXmlString as Er, compactPackage as Es, findSlideByPartName as Et, getCommentsSortedByDate as Eu, resetSlideLayout as F, setParagraphTabs as Fa, getPresentationCreated as Fc, setShapePosition as Fi, setSlideBackgroundImageFillLayout as Fl, getShapeTextMargins as Fn, findSlidesWithChartTrendlines as Fo, findShapesAtPoint as Fr, slidesUsingMediaPart as Fs, getPresentationTextLength as Ft, getPresentationFonts as Fu, duplicateSlideAt as G, findShapesWithAnimation as Ga, setShapeRunFormat as Gc, setShapeStrokeJoin as Gi, findSlideLayout as Gl, setShapeTextColumns as Gn, getPresentationHyperlinkCountsBySlide as Go, getShapeBoundsResolved as Gr, getTableCellBorders as Gs, getSlideText as Gt, toWritableTextFormat as Gu, addSlideAt as H, setSlidePlaceholders as Ha, getShapeHyperlink as Hc, setShapeStrokeCap as Hi, setSlideLayoutName as Hl, setShapeTextAnchor as Hn, getDistinctHyperlinkUrls as Ho, getShapeAdjustValues as Hr, getTableCellAlignment as Hs, getSlideLayoutCount as Ht, COMMENT_STATUSES as Hu, resetSlidePlaceholderGeometry as I, setParagraphTypography as Ia, getPresentationModified as Ic, setShapePreset as Ii, setSlideBackgroundImageOpacity as Il, getShapeTextWrap as In, getAllCharts as Io, findShapesInRect as Ir, validatePresentation as Is, getPresentationTextLengthsBySlide as It, getPresentationTheme as Iu, moveSlide as J, setShapeAnimation as Ja, findChartsBySeriesName as Jc, getShapeFillColor as Ji, getSlideLayoutName as Jl, setShapeTextFlat as Jn, getPresentationNotesText as Jo, getShapeDescription as Jr, getTableCellParagraphs as Js, getSlides as Jt, emu as Ju, importSlide as K, getShapeAnimation as Ka, addSlideChart as Kc, setShapeStrokeSketch as Ki, findSlideLayoutByPartName as Kl, setShapeTextDirection as Kn, getPresentationNotesLength as Ko, getShapeCenter as Kr, getTableCellFill as Ks, getSlideTextLength as Kt, asColor as Ku, resetSlidePlaceholderTextFormatting as L, setShapeRunHyperlink as La, incrementRevision as Lc, setShapeRotation as Li, setSlideBackgroundPatternFill as Ll, setShapeAlignment as Ln, getAllComments as Lo, getGroupChildren as Lr, clearTableCellFill as Ls, getShapeAt as Lt, setPresentationFonts as Lu, setShapeLocked as M, setParagraphLevel as Ma, setThumbnail as Mc, setShapeNoFill as Mi, setSlideBackground as Ml, getShapeTextColumns as Mn, clearSlideHyperlinks as Mo, setSlideLayout as Mr, listPackageParts as Ms, getOutlineText as Mt, removeSlideComment as Mu, addMissingSlidePlaceholders as N, setParagraphLineSpacing as Na, getCoreProperties as Nc, setShapeNoStroke as Ni, setSlideBackgroundGradientFill as Nl, getShapeTextDirection as Nn, findSlidesByHyperlink as No, translateShapes as Nr, readPackagePart as Ns, getPresentationShapeCountsBySlide as Nt, setCommentStatus as Nu, setShapeCustomGeometry as O, isParagraphBulletPicture as Oa, setTableStyleId as Oc, setShapeFill as Oi, getSlideMasterBackgroundGradientFill as Ol, getShapeTextAnchor as On, setSlideSize as Oo, getSlideLayout as Or, getOrphanMediaPartNames as Os, findSlideByTitle as Ot, getPresentationCommentCountsBySlide as Ou, addSlidePlaceholder as P, setParagraphSpacing as Pa, getExtendedProperties as Pc, setShapePatternFill as Pi, setSlideBackgroundImage as Pl, getShapeTextFlat as Pn, findSlidesWithChartKind as Po, centerShapeOnSlide as Pr, setMediaPartBytes as Ps, getPresentationText as Pt, setCommentText as Pu, swapSlides as Q, findSlidesByLayoutName as Qa, getPresentationChartKindCounts as Qc, getShapeStroke as Qi, getSlideLayoutUsageCounts as Ql, clearShapeEffects as Qn, getSlideNotesParagraphEndFormat as Qo, getShapeName as Qr, getTableCellText as Qs, isSlideLayoutBackgroundGraphicsHidden as Qt, addBlankSlide as R, setShapeRunText as Ra, setCoreProperties as Rc, setShapeSize as Ri, getShapeGradientFill as Rl, setShapeBulletStyle as Rn, getAllHyperlinks as Ro, getGroupTransform as Rr, getPresentationTableCountsBySlide as Rs, getSlideAt as Rt, setPresentationTheme as Ru, groupShapes as S, getShapeParagraphElements as Sa, setTableCellText as Sc, clearShapeStroke as Si, getSlideLayoutBackgroundGradientFill as Sl, moveSlideAnimation as Sn, setShapeImageRecolor as So, findSlidePlaceholderByIdx as Sr, getShapeMedia as Ss, setSlideMasterPlaceholderIncluded as St, getCommentPosition as Su, getParagraphElementLanguages as T, getShapeRunHyperlink as Ta, setTableColumnWidth as Tc, getShapeStrokeDash as Ti, getSlideLayoutBackgroundShapes as Tl, appendShapeText as Tn, SLIDE_SIZE_4_3 as To, getShapeSlide as Tr, _internalPackageOf as Ts, setSlideSections as Tt, getCommentText as Tu, addTitleSlide as U, setSlideTitle as Ua, getShapeRunFormatEffective as Uc, setShapeStrokeCompound as Ui, setSlideLayoutPlaceholderBounds as Ul, setShapeTextAutoFit as Un, getEmptySlides as Uo, getShapeAltTitle as Ur, getTableCellAnchor as Us, getSlideOutline as Ut, BUILTIN_TABLE_STYLES as Uu, addSlide as V, setSlideBody as Va, getParagraphPropertiesEffective as Vc, setShapeStrokeArrow as Vi, setSlideLayoutBackground as Vl, setShapeText3D as Vn, getAllTables as Vo, getPresetGeometry as Vr, getTableCell as Vs, getSlideInfo as Vt, savePresentation as Vu, duplicateSlide as W, clearSlideAnimations as Wa, setShapeHyperlink as Wc, setShapeStrokeDash as Wi, findLayoutsWithPlaceholderType as Wl, setShapeTextBodyRotationDeg as Wn, getHiddenSlides as Wo, getShapeBounds as Wr, getTableCellAppearanceEffective as Ws, getSlidePartName as Wt, BUILTIN_PICTURE_STYLES as Wu, reverseSlides as X, findOverlappingShapePairs as Xa, findChartsWithTrendlines as Xc, getShapeFillEffective as Xi, getSlideLayoutPlaceholders as Xl, setShapeTextMargins as Xn, getSlideNotesLength as Xo, getShapeId as Xr, getTableCellRunFormatEffective as Xs, isSlideBackgroundGraphicsHidden as Xt, mm as Xu, removeSlide as Y, findFlippedShapes as Ya, findChartsWithDataLabels as Yc, getShapeFillColorResolved as Yi, getSlideLayoutPartName$1 as Yl, setShapeTextFormat as Yn, getSlideNotes as Yo, getShapeFlip as Yr, getTableCellPosition as Ys, getSlidesByLayout as Yt, inches as Yu, sortSlides as Z, findShapesOutsideCanvas as Za, getPresentationChartCountsBySlide as Zc, getShapeFillOpacity as Zi, getSlideLayoutType as Zl, setShapeTextWrap as Zn, getSlideNotesLineBreaks as Zo, getShapeKind as Zr, getTableCellSpan as Zs, isSlideHidden as Zt, pt as Zu, resetShapeVideoFormatting as _, getParagraphLevel as _a, setTableCellBorders as _c, setShapeBounds as _i, getSlideBackgroundImageIntrinsicSize as _l, getShapeZIndex as _n, resetShapeImageColorEffects as _o, findShapesByName as _r, getSlideTransitionSound as _s, removeSlideMaster as _t, getCommentAuthor as _u, getCollapsedOutlineSlides as a, getShapeStrokeJoin as aa, getTableSize as ac, getShapeText as ai, setChartData as al, setSlideBackgroundGraphicsHidden as an, getShapeImageBytes as ao, setShapeGlow as ar, getSlidesWithOverlap as as, setNotesMasterPlaceholderIncluded as at, getCustomShows as au, setShapeImageCompressionState as b, getShapeHyperlinkTooltip as ba, setTableCellMargins as bc, shapesOverlap as bi, getSlideColorMapOverride as bl, sendShapeToBack as bn, setShapeImageCrop as bo, findShapesWithHyperlinks as br, addSlideMedia as bs, setSlideLayoutTitleIncluded as bt, getCommentFormat as bu, getGridSpacing as c, getShapeRunFormat as ca, insertTableColumn as cc, getSlideMasterPartNames as ci, resolveDeckBodyTextColor as cl, addSlideImage as cn, getShapeImageDuotone as co, setShapeShadow as cr, hasSlideNotes as cs, setSlideShowProperties as ct, addSlideComment as cu, setDrawingGuidesVisible as d, getParagraphAlignment as da, isTableShape as dc, isShapeHidden as di, copySlideBackground as dl, addSlideTable as dn, getShapeImageLinkUrl as do, findShapeById as dr, resolveSlideNotesTextColor as ds, addSlideMaster as dt, findCommentAuthorByName as du, getShapeStrokeColor as ea, getTableCellTextDirection as ec, getShapePlaceholderType as ei, getShapeChartKind as el, replaceTextInPresentation as en, findSlidesByLayoutType as eo, getShape3D as er, getSlidesWithCharts as es, getHandoutSlidesPerPage as et, getSlideLayouts as eu, setGridSpacing as f, getParagraphBullet as fa, mergeTableCells as fc, isShapePlaceholder as fi, getSlideBackground as fl, addSlideTextBox as fn, getShapeImageOpacity as fo, findShapeByName as fr, setSlideNotes as fs, getSlideMasterLayouts as ft, findCommentsAfter as fu, setSlideMasterBackgroundStyle as g, getParagraphIndent as ga, setTableCellAnchor as gc, setShapeAltTitle as gi, getSlideBackgroundImageFillLayout as gl, copyShape as gn, isShapeImageGrayscale as go, findShapesByKind as gr, getSlideTransition as gs, removeSlideLayout as gt, findSlidesWithCommentsByAuthor as gu, getSlideMasterBackgroundStyles as h, getParagraphEndFormat as ha, setTableCellAlignment as hc, renameShape as hi, getSlideBackgroundImageCrop as hl, clearSlideShapes as hn, hasShapeText as ho, findShapesByHyperlink as hr, clearSlideTransition as hs, isSlideMasterPreserved as ht, findCommentsByText as hu, setShapeImageFillLayout as i, getShapeStrokeGradient as ia, getTableRowHeights as ic, getShapeSize as ii, getSlideCharts as il, searchSlides as in, getShapeImageBrightness as io, setShape3D as ir, getSlidesWithNotes as is, setHandoutSlidesPerPage as it, setShapeClickAction as iu, setShapeAspectRatioLocked as j, setParagraphIndent as ja, removeThumbnail as jc, setShapeImageFill as ji, getSlideMasterShapes as jl, getShapeTextBodyRotationDeg as jn, clearAllSlideNotes as jo, replaceTokensInSlide as jr, getSlideMediaPartNames as js, getAllShapes as jt, getSlideComments as ju, isShapeAspectRatioLocked as k, setParagraphAlignment as ka, splitTableCell as kc, setShapeFlip as ki, getSlideMasterBackgroundImageBytes as kl, getShapeTextAutoFit as kn, appendSlideNotes as ko, getSlideShapes as kr, getPackageSize as ks, findSlidesByNotes as kt, getPresentationCommenters as ku, getSnapToGrid as l, resolveDrawingColor as la, insertTableRow as lc, getSlideMasterUsageCounts as li, applySlideBackgroundToAll as ll, addSlideLine as ln, getShapeImageFillBytes as lo, setShapeSoftEdge as lr, removeSlideNotes as ls, addSlideLayout as lt, clearAllSlideComments as lu, setSnapToGrid as m, getParagraphBulletStyle as ma, removeTableRow as mc, pointInShape as mi, getSlideBackgroundImageBytes as ml, bringShapeToFront as mn, hasShapeImage as mo, findShapeInPresentation as mr, transformSlideNotesCase as ms, getSlideMasterPlaceholders as mt, findCommentsByAuthor as mu, getShapeImageFillLayout as n, getShapeStrokeCompound as na, getTableColumnWidths as nc, getShapePreset as ni, getShapeChartSeriesValues as nl, replaceTextInSlideNotes as nn, getShapeImageArtisticEffect as no, getShapeEffects as nr, getSlidesWithHyperlinks as ns, getNotesPageSize as nt, isChartSpec as nu, getDrawingGuides as o, getShapeStrokeOpacity as oa, getTableStyleFlags as oc, getSlideMasterCount as oi, setChartSpec as ol, setSlideHidden as on, getShapeImageContrast as oo, setShapeInnerShadow as or, getSlidesWithTables as os, setNotesPageOrientation as ot, setCustomShows as ou, setSlideOutlineCollapsed as p, getParagraphBulletImageBytes as pa, removeTableColumn as pc, isShapeTextBox as pi, getSlideBackgroundGradientFill as pl, bringShapeForward as pn, getShapeImagePartName as po, findShapeByText as pr, setSlideNotesFormat as ps, getSlideMasterName as pt, findCommentsBefore as pu, mergePresentations as q, getSlideAnimations as qa, findChartByKind as qc, getShapeFill as qi, findSlideLayoutByType as ql, setShapeTextField as qn, getPresentationNotesLengthsBySlide as qo, getShapeCustomGeometry as qr, getTableCellMargins as qs, getSlideXmlString as qt, cm as qu, getShapeImageIntrinsicSize as r, getShapeStrokeEffective as ra, getTableDimensions as rc, getShapeRotation as ri, getShapeChartSpec as rl, replaceTokensInPresentation as rn, getShapeImageBiLevelThreshold as ro, getShapeEffectsEffective as rr, getSlidesWithImages as rs, setHandoutMasterPlaceholderIncluded as rt, getShapeClickAction as ru, getDrawingGuidesVisible as s, getShapeStrokeWidth as sa, getTableStyleId as sc, getSlideMasterPartName as si, getEffectiveColorMap as sl, slideHasAnimations as sn, getShapeImageCrop as so, setShapeReflection as sr, getVisibleSlides as ss, getSlideShowProperties as st, setShapeImage as su, VERSION as t, getShapeStrokeColorResolved as ta, getTableCells as tc, getShapePosition as ti, getShapeChartSeriesNames as tl, replaceTextInSlide as tn, getPresentationImageCountsBySlide as to, getShapeEffect as tr, getSlidesWithComments as ts, getNotesMasterPlaceholders as tt, getUnusedSlideLayouts as tu, setDrawingGuides as u, resolveDrawingColorOpacity as ua, isChartShape as uc, getUnusedSlideMasters as ui, clearSlideBackground as ul, addSlideShape as un, getShapeImageFormat as uo, findEmptyPlaceholders as ur, replaceHyperlink as us, addSlideLayoutPlaceholder as ut, clearSlideComments as uu, getShapeImageCompressionState as v, getParagraphLineSpacing as va, setTableCellClickAction as vc, setShapeDescription as vi, getSlideBackgroundImageOpacity as vl, removeShape as vn, setShapeImageBrightness as vo, findShapesByPreset as vr, setSlideTransition as vs, setSlideLayoutBackgroundGraphicsHidden as vt, getCommentAuthors as vu, setShapeStyle as w, getShapeRunCount as wa, setTableCellTextFormat as wc, getShapeStrokeArrow as wi, getSlideLayoutBackgroundPatternFill as wl, updateSlideAnimation as wn, SLIDE_SIZE_16_9 as wo, getShapeIndex as wr, setShapeMediaPlayback as ws, getSlideSections as wt, getCommentStatus as wu, setShapePictureStyle as x, getShapeParagraphCount as xa, setTableCellParagraphs as xc, clearShapeFill as xi, getSlideLayoutBackground as xl, setShapeZIndex as xn, setShapeImageOpacity as xo, findSlidePlaceholder as xr, findShapesWithMedia as xs, setSlideMasterName as xt, getCommentParent as xu, getShapePictureStyle as y, getParagraphSpacing as ya, setTableCellFill as yc, setShapeHidden as yi, getSlideBackgroundPatternFill as yl, sendShapeBackward as yn, setShapeImageContrast as yo, findShapesByText as yr, setSlideTransitionSound as ys, setSlideLayoutFootersIncluded as yt, getCommentDate as yu, addContentSlide as z, getSlideBody as za, setExtendedProperties as zc, setShapeSlideBackgroundFill as zi, getShapeGradientFillEffective as zl, setShapeParagraphs as zn, getAllImages as zo, getMaxShapeId as zr, getSlideTables as zs, getSlideCount as zt, createPresentation as zu };
|
|
55428
55893
|
|
|
55429
|
-
//# sourceMappingURL=api-
|
|
55894
|
+
//# sourceMappingURL=api-DQMkljVK.js.map
|