ooxml-core 1.45.0 → 1.46.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/dist/PptxHandler-FZ43IJFP.mjs +5 -0
- package/dist/{PptxHandler-FXLXIOLT.mjs → PptxHandler-HWEOIHEA.mjs} +2 -2
- package/dist/PptxHandler-XAUKKK36.cjs +14 -0
- package/dist/{PresentationBuilder-CSKLG64K.cjs → PresentationBuilder-2BCCMZW7.cjs} +6 -6
- package/dist/{PresentationBuilder-3FKFRSSV.mjs → PresentationBuilder-66RV4F45.mjs} +2 -2
- package/dist/{PresentationBuilder-DDYHRV26.mjs → PresentationBuilder-AFD72LIG.mjs} +3 -3
- package/dist/automation/index.cjs +12 -7
- package/dist/automation/index.mjs +12 -7
- package/dist/chart/edit/group-options.d.ts +4 -0
- package/dist/chart/edit/group-options.d.ts.map +1 -1
- package/dist/chart/edit/new-chart-minimal.d.ts +13 -0
- package/dist/chart/edit/new-chart-minimal.d.ts.map +1 -0
- package/dist/chart/edit/new-chart.d.ts +34 -1
- package/dist/chart/edit/new-chart.d.ts.map +1 -1
- package/dist/chart/edit/secondary-axis.d.ts +8 -1
- package/dist/chart/edit/secondary-axis.d.ts.map +1 -1
- package/dist/chart/edit/type.d.ts +2 -0
- package/dist/chart/edit/type.d.ts.map +1 -1
- package/dist/chart/index.cjs +414 -263
- package/dist/chart/index.mjs +412 -264
- package/dist/{chunk-3J6VIKLP.cjs → chunk-5TOVSCVT.cjs} +3 -3
- package/dist/{chunk-U5BXJQZG.mjs → chunk-E2TTMUKU.mjs} +225 -38
- package/dist/{chunk-7T3SJQA6.cjs → chunk-E5TGYYKO.cjs} +1 -0
- package/dist/{chunk-VKFKEVHK.mjs → chunk-EI6555OK.mjs} +1 -1
- package/dist/{chunk-R7NS42KQ.mjs → chunk-FKU2Z6ZB.mjs} +1 -1
- package/dist/{chunk-GGJUWJXB.mjs → chunk-G6LEU3Y5.mjs} +1 -1
- package/dist/{chunk-RVYGAYCP.mjs → chunk-H43QQVJU.mjs} +1 -1
- package/dist/{chunk-CVJX6NNO.mjs → chunk-HH3AYM63.mjs} +227 -39
- package/dist/{chunk-YBSNMVSN.cjs → chunk-IBRV3AK3.cjs} +1497 -1309
- package/dist/{chunk-LCXBTJXE.mjs → chunk-L6MJGE3Q.mjs} +4 -4
- package/dist/{chunk-IPV3J3I5.mjs → chunk-LXVE2VKR.mjs} +4 -1
- package/dist/{chunk-QZPOPUI5.cjs → chunk-QUAFASFC.cjs} +4 -0
- package/dist/{chunk-XTUX5RMG.cjs → chunk-T4BVZTII.cjs} +9 -9
- package/dist/{chunk-GXYK3H4O.mjs → chunk-X2DC7XRL.mjs} +17 -16
- package/dist/{chunk-OORQCSVA.mjs → chunk-ZLUHU2SU.mjs} +1 -0
- package/dist/docx/index.cjs +300 -144
- package/dist/docx/index.mjs +300 -144
- package/dist/index.cjs +484 -333
- package/dist/index.mjs +484 -333
- package/dist/pptx/automation/index.cjs +350 -143
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{index-6Ot1b-4U.d.ts → index-BPGaFlm5.d.ts} +4 -4
- package/dist/pptx/chunks/{index-6Ot1b-4U.d.ts.map → index-BPGaFlm5.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-jdZUtLGB.d.ts → index-D4-WJQ1r.d.ts} +3 -3
- package/dist/pptx/chunks/{index-jdZUtLGB.d.ts.map → index-D4-WJQ1r.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-DGKI80Hj.d.ts → index-DtFoPmk7.d.ts} +49 -6
- package/dist/pptx/chunks/index-DtFoPmk7.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-Mek86RBL.d.ts → text-operations-CVHXOSit.d.ts} +18 -3
- package/dist/pptx/chunks/{text-operations-Mek86RBL.d.ts.map → text-operations-CVHXOSit.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +307 -100
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +1 -0
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +4 -4
- package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-reconcile.cjs +8 -8
- package/dist/pptx/editor/render/collaboration-reconcile.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-sync.cjs +14 -14
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.mjs +1 -1
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -15
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +2 -2
- package/dist/pptx/editor/render/slide-operations.cjs +9 -9
- package/dist/pptx/editor/render/slide-operations.mjs +3 -3
- package/dist/pptx/index.cjs +351 -147
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/xlsx/index.cjs +12 -7
- package/dist/xlsx/index.mjs +12 -7
- package/dist/xlsx/ui/index.cjs +12 -7
- package/dist/xlsx/ui/index.mjs +12 -7
- package/package.json +1 -1
- package/dist/PptxHandler-3RDVJFQV.cjs +0 -14
- package/dist/PptxHandler-EI6DMHPM.mjs +0 -5
- package/dist/pptx/chunks/index-DGKI80Hj.d.ts.map +0 -1
package/dist/pptx/cli/index.cjs
CHANGED
|
@@ -408,9 +408,9 @@ function parseFormula(fmla) {
|
|
|
408
408
|
return { op: op2, args };
|
|
409
409
|
}
|
|
410
410
|
function resolveOperand(token3, variables) {
|
|
411
|
-
const
|
|
412
|
-
if (Number.isFinite(
|
|
413
|
-
return
|
|
411
|
+
const num5 = Number(token3);
|
|
412
|
+
if (Number.isFinite(num5)) {
|
|
413
|
+
return num5;
|
|
414
414
|
}
|
|
415
415
|
const value = variables.get(token3);
|
|
416
416
|
if (value !== void 0) {
|
|
@@ -636,9 +636,9 @@ function resolveCoordinate(value, variables) {
|
|
|
636
636
|
return value;
|
|
637
637
|
}
|
|
638
638
|
const trimmed2 = String(value).trim();
|
|
639
|
-
const
|
|
640
|
-
if (Number.isFinite(
|
|
641
|
-
return
|
|
639
|
+
const num5 = Number(trimmed2);
|
|
640
|
+
if (Number.isFinite(num5)) {
|
|
641
|
+
return num5;
|
|
642
642
|
}
|
|
643
643
|
return resolveOperand(trimmed2, variables);
|
|
644
644
|
}
|
|
@@ -11918,9 +11918,9 @@ function resolveToken(token3, vars) {
|
|
|
11918
11918
|
if (trimmed2 === "") {
|
|
11919
11919
|
return 0;
|
|
11920
11920
|
}
|
|
11921
|
-
const
|
|
11922
|
-
if (Number.isFinite(
|
|
11923
|
-
return
|
|
11921
|
+
const num5 = Number(trimmed2);
|
|
11922
|
+
if (Number.isFinite(num5)) {
|
|
11923
|
+
return num5;
|
|
11924
11924
|
}
|
|
11925
11925
|
return resolveOperand(trimmed2, vars);
|
|
11926
11926
|
}
|
|
@@ -13464,6 +13464,7 @@ var init_collaboration_field_schema = __esm({
|
|
|
13464
13464
|
backgroundImage: "scalar",
|
|
13465
13465
|
backgroundImageProperties: "complex",
|
|
13466
13466
|
backgroundGradient: "scalar",
|
|
13467
|
+
backgroundGradientFill: "complex",
|
|
13467
13468
|
backgroundStyleRef: "complex",
|
|
13468
13469
|
backgroundPattern: "complex",
|
|
13469
13470
|
backgroundShadeToTitle: "scalar",
|
|
@@ -14751,6 +14752,9 @@ function normalizeDegrees(deg) {
|
|
|
14751
14752
|
function ooxmlGradientAngleToCssDegrees(angleDegrees) {
|
|
14752
14753
|
return normalizeDegrees(angleDegrees + OOXML_TO_CSS_OFFSET_DEG);
|
|
14753
14754
|
}
|
|
14755
|
+
function cssDegreesToOoxmlGradientAngle(cssDegrees) {
|
|
14756
|
+
return normalizeDegrees(cssDegrees - OOXML_TO_CSS_OFFSET_DEG);
|
|
14757
|
+
}
|
|
14754
14758
|
var OOXML_TO_CSS_OFFSET_DEG;
|
|
14755
14759
|
var init_gradient_angle = __esm({
|
|
14756
14760
|
"pptx/core/utils/gradient-angle.ts"() {
|
|
@@ -41694,18 +41698,18 @@ function groupTransform(group, parent) {
|
|
|
41694
41698
|
const ext = first(xfrm, "ext", NS.a);
|
|
41695
41699
|
const chOff = first(xfrm, "chOff", NS.a);
|
|
41696
41700
|
const chExt = first(xfrm, "chExt", NS.a);
|
|
41697
|
-
const
|
|
41698
|
-
const cx =
|
|
41699
|
-
const cy =
|
|
41700
|
-
const chCx =
|
|
41701
|
-
const chCy =
|
|
41701
|
+
const num5 = (element2, name) => Number.parseInt(element2?.getAttribute(name) ?? "", 10);
|
|
41702
|
+
const cx = num5(ext, "cx");
|
|
41703
|
+
const cy = num5(ext, "cy");
|
|
41704
|
+
const chCx = num5(chExt, "cx");
|
|
41705
|
+
const chCy = num5(chExt, "cy");
|
|
41702
41706
|
if (!off || ![cx, cy, chCx, chCy].every(Number.isFinite) || chCx === 0 || chCy === 0)
|
|
41703
41707
|
return parent;
|
|
41704
41708
|
const scaleX = cx / chCx;
|
|
41705
41709
|
const scaleY = cy / chCy;
|
|
41706
41710
|
const local = {
|
|
41707
|
-
offsetX:
|
|
41708
|
-
offsetY:
|
|
41711
|
+
offsetX: num5(off, "x") - (num5(chOff, "x") || 0) * scaleX,
|
|
41712
|
+
offsetY: num5(off, "y") - (num5(chOff, "y") || 0) * scaleY,
|
|
41709
41713
|
scaleX,
|
|
41710
41714
|
scaleY
|
|
41711
41715
|
};
|
|
@@ -48738,9 +48742,9 @@ function parseValueColorPositions(node, xmlLookup) {
|
|
|
48738
48742
|
const entry2 = { kind };
|
|
48739
48743
|
const rawVal = posNode["@_val"];
|
|
48740
48744
|
if (rawVal !== void 0) {
|
|
48741
|
-
const
|
|
48742
|
-
if (Number.isFinite(
|
|
48743
|
-
entry2.value =
|
|
48745
|
+
const num5 = Number.parseFloat(String(rawVal));
|
|
48746
|
+
if (Number.isFinite(num5)) {
|
|
48747
|
+
entry2.value = num5;
|
|
48744
48748
|
}
|
|
48745
48749
|
}
|
|
48746
48750
|
positions2.push(entry2);
|
|
@@ -49102,8 +49106,8 @@ var init_chart_cx_parser = __esm({
|
|
|
49102
49106
|
// pptx/core/utils/chart-user-shapes-parser.ts
|
|
49103
49107
|
function markerFraction(marker2, axis, xml) {
|
|
49104
49108
|
const raw2 = xml.getScalarChildByLocalName(marker2, axis);
|
|
49105
|
-
const
|
|
49106
|
-
return Number.isFinite(
|
|
49109
|
+
const num5 = Number.parseFloat(String(raw2 ?? ""));
|
|
49110
|
+
return Number.isFinite(num5) ? num5 : 0;
|
|
49107
49111
|
}
|
|
49108
49112
|
function parseShapeParagraphs(shape2, xml, colors) {
|
|
49109
49113
|
const txBody = xml.getChildByLocalName(shape2, "txBody");
|
|
@@ -49226,13 +49230,13 @@ function buildUserShape(shape2, kind, base, xml, colors) {
|
|
|
49226
49230
|
};
|
|
49227
49231
|
}
|
|
49228
49232
|
function parseOffExt(offNode, extNode) {
|
|
49229
|
-
const
|
|
49233
|
+
const num5 = (node, attr6) => {
|
|
49230
49234
|
const raw2 = Number.parseFloat(String(node?.[attr6] ?? ""));
|
|
49231
49235
|
return Number.isFinite(raw2) ? raw2 : 0;
|
|
49232
49236
|
};
|
|
49233
49237
|
return {
|
|
49234
|
-
off: { x:
|
|
49235
|
-
ext: { cx:
|
|
49238
|
+
off: { x: num5(offNode, "@_x"), y: num5(offNode, "@_y") },
|
|
49239
|
+
ext: { cx: num5(extNode, "@_cx"), cy: num5(extNode, "@_cy") }
|
|
49236
49240
|
};
|
|
49237
49241
|
}
|
|
49238
49242
|
function parseGroupTransform(group, xml) {
|
|
@@ -49528,8 +49532,8 @@ function resolveCellValue(cell2, sharedStrings) {
|
|
|
49528
49532
|
case "inlineStr":
|
|
49529
49533
|
return cell2.value;
|
|
49530
49534
|
default: {
|
|
49531
|
-
const
|
|
49532
|
-
return Number.isFinite(
|
|
49535
|
+
const num5 = Number.parseFloat(cell2.value);
|
|
49536
|
+
return Number.isFinite(num5) ? num5 : cell2.value;
|
|
49533
49537
|
}
|
|
49534
49538
|
}
|
|
49535
49539
|
}
|
|
@@ -49614,8 +49618,8 @@ async function parseEmbeddedXlsx(xlsxData) {
|
|
|
49614
49618
|
} else if (typeof cellVal === "number") {
|
|
49615
49619
|
values.push(cellVal);
|
|
49616
49620
|
} else {
|
|
49617
|
-
const
|
|
49618
|
-
values.push(Number.isFinite(
|
|
49621
|
+
const num5 = Number.parseFloat(String(cellVal));
|
|
49622
|
+
values.push(Number.isFinite(num5) ? num5 : 0);
|
|
49619
49623
|
}
|
|
49620
49624
|
}
|
|
49621
49625
|
series.push({ name, values });
|
|
@@ -50129,8 +50133,8 @@ function parseVmlOpacity(value) {
|
|
|
50129
50133
|
const pct = parseFloat(trimmed2.slice(0, -1));
|
|
50130
50134
|
return Number.isFinite(pct) ? pct / 100 : void 0;
|
|
50131
50135
|
}
|
|
50132
|
-
const
|
|
50133
|
-
return Number.isFinite(
|
|
50136
|
+
const num5 = parseFloat(trimmed2);
|
|
50137
|
+
return Number.isFinite(num5) ? Math.min(1, Math.max(0, num5)) : void 0;
|
|
50134
50138
|
}
|
|
50135
50139
|
var NAMED_COLORS;
|
|
50136
50140
|
var init_vml_color_parser = __esm({
|
|
@@ -50173,29 +50177,29 @@ function parseCssDimension(value, containerPx) {
|
|
|
50173
50177
|
if (trimmed2.length === 0) {
|
|
50174
50178
|
return 0;
|
|
50175
50179
|
}
|
|
50176
|
-
const
|
|
50177
|
-
if (!Number.isFinite(
|
|
50180
|
+
const num5 = parseFloat(trimmed2);
|
|
50181
|
+
if (!Number.isFinite(num5)) {
|
|
50178
50182
|
return 0;
|
|
50179
50183
|
}
|
|
50180
50184
|
if (trimmed2.endsWith("pt")) {
|
|
50181
|
-
return
|
|
50185
|
+
return num5 / PT_PER_PX2;
|
|
50182
50186
|
}
|
|
50183
50187
|
if (trimmed2.endsWith("in")) {
|
|
50184
|
-
return
|
|
50188
|
+
return num5 * 96;
|
|
50185
50189
|
}
|
|
50186
50190
|
if (trimmed2.endsWith("cm")) {
|
|
50187
|
-
return
|
|
50191
|
+
return num5 * (96 / 2.54);
|
|
50188
50192
|
}
|
|
50189
50193
|
if (trimmed2.endsWith("mm")) {
|
|
50190
|
-
return
|
|
50194
|
+
return num5 * (96 / 25.4);
|
|
50191
50195
|
}
|
|
50192
50196
|
if (trimmed2.endsWith("emu")) {
|
|
50193
|
-
return
|
|
50197
|
+
return num5 / EMU_PER_PX6;
|
|
50194
50198
|
}
|
|
50195
50199
|
if (trimmed2.endsWith("%")) {
|
|
50196
|
-
return containerPx ?
|
|
50200
|
+
return containerPx ? num5 / 100 * containerPx : 0;
|
|
50197
50201
|
}
|
|
50198
|
-
return
|
|
50202
|
+
return num5;
|
|
50199
50203
|
}
|
|
50200
50204
|
function parseVmlStyle(styleAttr) {
|
|
50201
50205
|
const result = {};
|
|
@@ -60435,6 +60439,130 @@ var init_json = __esm({
|
|
|
60435
60439
|
}
|
|
60436
60440
|
});
|
|
60437
60441
|
|
|
60442
|
+
// pptx/core/utils/slide-background-gradient.ts
|
|
60443
|
+
function cssColor(color3, opacity2) {
|
|
60444
|
+
if (opacity2 === void 0 || opacity2 >= 1) {
|
|
60445
|
+
return color3;
|
|
60446
|
+
}
|
|
60447
|
+
const hex3 = color3.replace("#", "");
|
|
60448
|
+
const channel = (index) => Number.parseInt(hex3.slice(index, index + 2), 16);
|
|
60449
|
+
return `rgba(${channel(0)}, ${channel(2)}, ${channel(4)}, ${num3(opacity2)})`;
|
|
60450
|
+
}
|
|
60451
|
+
function slideBackgroundGradientCss(gradient) {
|
|
60452
|
+
const stops = (gradient.fillGradientStops ?? []).map((stop) => `${cssColor(stop.color, stop.opacity)} ${num3(stop.position)}%`).join(", ");
|
|
60453
|
+
if (gradient.fillGradientType !== "radial") {
|
|
60454
|
+
const angle = ooxmlGradientAngleToCssDegrees(gradient.fillGradientAngle ?? 0);
|
|
60455
|
+
return `linear-gradient(${num3(angle)}deg, ${stops})`;
|
|
60456
|
+
}
|
|
60457
|
+
const focus = gradient.fillGradientFillToRect;
|
|
60458
|
+
const cx = focus ? (focus.l + (1 - focus.r)) / 2 * 100 : 50;
|
|
60459
|
+
const cy = focus ? (focus.t + (1 - focus.b)) / 2 * 100 : 50;
|
|
60460
|
+
const at2 = `at ${num3(cx)}% ${num3(cy)}%`;
|
|
60461
|
+
switch (gradient.fillGradientPathType) {
|
|
60462
|
+
case "rect":
|
|
60463
|
+
return `radial-gradient(${num3(Math.max(cx, 100 - cx))}% ${num3(Math.max(cy, 100 - cy))}% ${at2}, ${stops})`;
|
|
60464
|
+
case "shape":
|
|
60465
|
+
return `radial-gradient(farthest-side ${at2}, ${stops})`;
|
|
60466
|
+
default:
|
|
60467
|
+
return `radial-gradient(circle ${at2}, ${stops})`;
|
|
60468
|
+
}
|
|
60469
|
+
}
|
|
60470
|
+
function slideBackgroundGradientToWrite(slide) {
|
|
60471
|
+
const gradient = slide.backgroundGradientFill;
|
|
60472
|
+
if (!gradient || !slide.backgroundGradient) {
|
|
60473
|
+
return void 0;
|
|
60474
|
+
}
|
|
60475
|
+
return slide.backgroundGradient === slideBackgroundGradientCss(gradient) ? gradient : void 0;
|
|
60476
|
+
}
|
|
60477
|
+
var num3;
|
|
60478
|
+
var init_slide_background_gradient = __esm({
|
|
60479
|
+
"pptx/core/utils/slide-background-gradient.ts"() {
|
|
60480
|
+
init_gradient_angle();
|
|
60481
|
+
num3 = (value) => String(Number(value.toFixed(3)));
|
|
60482
|
+
}
|
|
60483
|
+
});
|
|
60484
|
+
|
|
60485
|
+
// pptx/core/builders/sdk/background-gradient-input.ts
|
|
60486
|
+
function finite3(name, value, min, max) {
|
|
60487
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
60488
|
+
throw new RangeError(`${WHERE}.${name} must be a finite number, got ${String(value)}`);
|
|
60489
|
+
}
|
|
60490
|
+
if (min !== void 0 && value < min || max !== void 0 && value > max) {
|
|
60491
|
+
throw new RangeError(`${WHERE}.${name} must be between ${min} and ${max}, got ${value}`);
|
|
60492
|
+
}
|
|
60493
|
+
return value;
|
|
60494
|
+
}
|
|
60495
|
+
function stopsOf(input) {
|
|
60496
|
+
if (!Array.isArray(input.stops) || input.stops.length < 2) {
|
|
60497
|
+
throw new RangeError(`${WHERE}.stops needs at least two stops (a:gsLst)`);
|
|
60498
|
+
}
|
|
60499
|
+
return input.stops.map((stop, index) => {
|
|
60500
|
+
if (typeof stop.color !== "string" || !HEX.test(stop.color)) {
|
|
60501
|
+
throw new RangeError(
|
|
60502
|
+
`${WHERE}.stops[${index}].color must be #RRGGBB, got ${String(stop.color)}`
|
|
60503
|
+
);
|
|
60504
|
+
}
|
|
60505
|
+
const position4 = finite3(`stops[${index}].position`, stop.position, 0, 1);
|
|
60506
|
+
const opacity2 = stop.opacity === void 0 ? void 0 : finite3(`stops[${index}].opacity`, stop.opacity, 0, 1);
|
|
60507
|
+
return {
|
|
60508
|
+
color: `#${stop.color.replace("#", "").toUpperCase()}`,
|
|
60509
|
+
// The shape gradient model keeps positions in percent.
|
|
60510
|
+
position: position4 * 100,
|
|
60511
|
+
...opacity2 !== void 0 ? { opacity: opacity2 } : {}
|
|
60512
|
+
};
|
|
60513
|
+
});
|
|
60514
|
+
}
|
|
60515
|
+
function mapBackgroundGradientInput(input) {
|
|
60516
|
+
const fillGradientStops = stopsOf(input);
|
|
60517
|
+
let gradient;
|
|
60518
|
+
if (input.path !== void 0) {
|
|
60519
|
+
if (!PATHS.has(input.path)) {
|
|
60520
|
+
throw new RangeError(
|
|
60521
|
+
`${WHERE}.path must be circle, rect or shape, got ${String(input.path)}`
|
|
60522
|
+
);
|
|
60523
|
+
}
|
|
60524
|
+
if (input.angle !== void 0) {
|
|
60525
|
+
throw new RangeError(`${WHERE}.angle applies to a linear gradient, not a path one`);
|
|
60526
|
+
}
|
|
60527
|
+
const focus = input.focus ?? { l: 0.5, t: 0.5, r: 0.5, b: 0.5 };
|
|
60528
|
+
gradient = {
|
|
60529
|
+
fillGradientType: "radial",
|
|
60530
|
+
fillGradientPathType: input.path,
|
|
60531
|
+
fillGradientStops,
|
|
60532
|
+
fillGradientFillToRect: {
|
|
60533
|
+
l: finite3("focus.l", focus.l),
|
|
60534
|
+
t: finite3("focus.t", focus.t),
|
|
60535
|
+
r: finite3("focus.r", focus.r),
|
|
60536
|
+
b: finite3("focus.b", focus.b)
|
|
60537
|
+
}
|
|
60538
|
+
};
|
|
60539
|
+
} else {
|
|
60540
|
+
if (input.focus !== void 0) {
|
|
60541
|
+
throw new RangeError(`${WHERE}.focus needs a path gradient`);
|
|
60542
|
+
}
|
|
60543
|
+
const cssAngle = finite3("angle", input.angle ?? 180);
|
|
60544
|
+
gradient = {
|
|
60545
|
+
fillGradientType: "linear",
|
|
60546
|
+
fillGradientAngle: cssDegreesToOoxmlGradientAngle(cssAngle),
|
|
60547
|
+
fillGradientStops
|
|
60548
|
+
};
|
|
60549
|
+
}
|
|
60550
|
+
return {
|
|
60551
|
+
backgroundGradient: slideBackgroundGradientCss(gradient),
|
|
60552
|
+
backgroundGradientFill: gradient
|
|
60553
|
+
};
|
|
60554
|
+
}
|
|
60555
|
+
var HEX, PATHS, WHERE;
|
|
60556
|
+
var init_background_gradient_input = __esm({
|
|
60557
|
+
"pptx/core/builders/sdk/background-gradient-input.ts"() {
|
|
60558
|
+
init_gradient_angle();
|
|
60559
|
+
init_slide_background_gradient();
|
|
60560
|
+
HEX = /^#?[0-9a-f]{6}$/iu;
|
|
60561
|
+
PATHS = /* @__PURE__ */ new Set(["circle", "rect", "shape"]);
|
|
60562
|
+
WHERE = "BackgroundInput";
|
|
60563
|
+
}
|
|
60564
|
+
});
|
|
60565
|
+
|
|
60438
60566
|
// pptx/core/core/runtime/table-style-defaults.ts
|
|
60439
60567
|
var DEFAULT_POWERPOINT_TABLE_STYLE_ID;
|
|
60440
60568
|
var init_table_style_defaults = __esm({
|
|
@@ -60810,8 +60938,8 @@ function authoredValue(node) {
|
|
|
60810
60938
|
return void 0;
|
|
60811
60939
|
}
|
|
60812
60940
|
const raw2 = node["@_val"];
|
|
60813
|
-
const
|
|
60814
|
-
return Number.isFinite(
|
|
60941
|
+
const num5 = raw2 === void 0 || raw2 === null || raw2 === "" ? NaN : Number.parseFloat(String(raw2));
|
|
60942
|
+
return Number.isFinite(num5) ? num5 : void 0;
|
|
60815
60943
|
}
|
|
60816
60944
|
function applyChartGroupOptionsToXml(container2, containerLocal, chartData, getLocalName2) {
|
|
60817
60945
|
let changed = false;
|
|
@@ -61975,6 +62103,7 @@ var init_ElementFactory = __esm({
|
|
|
61975
62103
|
var SlideBuilder;
|
|
61976
62104
|
var init_SlideBuilder = __esm({
|
|
61977
62105
|
"pptx/core/builders/sdk/SlideBuilder.ts"() {
|
|
62106
|
+
init_background_gradient_input();
|
|
61978
62107
|
init_ElementFactory();
|
|
61979
62108
|
SlideBuilder = class {
|
|
61980
62109
|
/**
|
|
@@ -62085,12 +62214,12 @@ var init_SlideBuilder = __esm({
|
|
|
62085
62214
|
switch (bg.type) {
|
|
62086
62215
|
case "solid":
|
|
62087
62216
|
this.slide.backgroundColor = bg.color;
|
|
62217
|
+
delete this.slide.backgroundGradient;
|
|
62218
|
+
delete this.slide.backgroundGradientFill;
|
|
62088
62219
|
break;
|
|
62089
|
-
case "gradient":
|
|
62090
|
-
|
|
62091
|
-
this.slide.backgroundGradient = `linear-gradient(${bg.angle ?? 180}deg, ${stops})`;
|
|
62220
|
+
case "gradient":
|
|
62221
|
+
Object.assign(this.slide, mapBackgroundGradientInput(bg));
|
|
62092
62222
|
break;
|
|
62093
|
-
}
|
|
62094
62223
|
case "image":
|
|
62095
62224
|
this.slide.backgroundImage = bg.source;
|
|
62096
62225
|
break;
|
|
@@ -65993,7 +66122,15 @@ var init_PptxSlideBackgroundBuilder = __esm({
|
|
|
65993
66122
|
init.reportUnsupportedBackground?.(rawBackgroundImage);
|
|
65994
66123
|
}
|
|
65995
66124
|
}
|
|
65996
|
-
if (backgroundProperties["a:blipFill"] === void 0 &&
|
|
66125
|
+
if (backgroundProperties["a:blipFill"] === void 0 && hasBackgroundGradient) {
|
|
66126
|
+
const gradFill2 = init.buildBackgroundGradientFill?.();
|
|
66127
|
+
if (gradFill2) {
|
|
66128
|
+
backgroundProperties["a:gradFill"] = gradFill2;
|
|
66129
|
+
} else if (!hasBackgroundColor && !hasBackgroundImage) {
|
|
66130
|
+
init.reportUnsupportedGradient?.();
|
|
66131
|
+
}
|
|
66132
|
+
}
|
|
66133
|
+
if (backgroundProperties["a:blipFill"] === void 0 && backgroundProperties["a:gradFill"] === void 0 && hasBackgroundColor && init.slide.backgroundColor) {
|
|
65997
66134
|
backgroundProperties["a:solidFill"] = {
|
|
65998
66135
|
"a:srgbClr": {
|
|
65999
66136
|
"@_val": init.slide.backgroundColor.replace("#", "").toUpperCase()
|
|
@@ -70886,8 +71023,8 @@ function decodeAinkInk(inkRoot) {
|
|
|
70886
71023
|
if (raw2.length === 0) {
|
|
70887
71024
|
return 2;
|
|
70888
71025
|
}
|
|
70889
|
-
const
|
|
70890
|
-
return Number.isFinite(
|
|
71026
|
+
const num5 = Number(raw2);
|
|
71027
|
+
return Number.isFinite(num5) && num5 > 0 ? num5 : 2;
|
|
70891
71028
|
})();
|
|
70892
71029
|
const traces = ensureArrayLike3(inkRoot["aink:trace"]);
|
|
70893
71030
|
for (const trace of traces) {
|
|
@@ -73048,9 +73185,9 @@ async function ensureCustomPropertiesPackagingArtifacts(context) {
|
|
|
73048
73185
|
let maxId = 0;
|
|
73049
73186
|
for (const rel of rels) {
|
|
73050
73187
|
const id = String(rel?.["@_Id"] || "");
|
|
73051
|
-
const
|
|
73052
|
-
if (Number.isFinite(
|
|
73053
|
-
maxId =
|
|
73188
|
+
const num5 = Number.parseInt(id.replace(/^rId/, ""), 10);
|
|
73189
|
+
if (Number.isFinite(num5) && num5 > maxId) {
|
|
73190
|
+
maxId = num5;
|
|
73054
73191
|
}
|
|
73055
73192
|
}
|
|
73056
73193
|
rels.push({
|
|
@@ -73135,11 +73272,11 @@ var init_PptxDocumentPropertiesUpdater = __esm({
|
|
|
73135
73272
|
this.context = context;
|
|
73136
73273
|
}
|
|
73137
73274
|
async updateOnSave(slides, options2) {
|
|
73138
|
-
await this.updateCoreProperties(options2?.coreProperties);
|
|
73275
|
+
await this.updateCoreProperties(options2?.coreProperties, options2?.fixedDate);
|
|
73139
73276
|
await this.updateAppProperties(slides, options2?.appProperties);
|
|
73140
73277
|
await this.updateCustomProperties(options2?.customProperties);
|
|
73141
73278
|
}
|
|
73142
|
-
async updateCoreProperties(overrides) {
|
|
73279
|
+
async updateCoreProperties(overrides, fixedDate) {
|
|
73143
73280
|
const coreFile = this.context.zip.file("docProps/core.xml");
|
|
73144
73281
|
if (!coreFile) {
|
|
73145
73282
|
return;
|
|
@@ -73148,7 +73285,12 @@ var init_PptxDocumentPropertiesUpdater = __esm({
|
|
|
73148
73285
|
const coreXml = await coreFile.async("string");
|
|
73149
73286
|
const core = applyCoreOverrides(parseCoreProperties(coreXml), overrides);
|
|
73150
73287
|
const revision = Number.parseInt(core.revision?.trim() ?? "", 10);
|
|
73151
|
-
const next = {
|
|
73288
|
+
const next = fixedDate ? {
|
|
73289
|
+
...core,
|
|
73290
|
+
revision: overrides?.revision ?? "1",
|
|
73291
|
+
created: overrides?.created ?? formatW3cdtf(fixedDate),
|
|
73292
|
+
modified: overrides?.modified ?? formatW3cdtf(fixedDate)
|
|
73293
|
+
} : {
|
|
73152
73294
|
...core,
|
|
73153
73295
|
revision: String(Number.isFinite(revision) && revision >= 0 ? revision + 1 : 1),
|
|
73154
73296
|
modified: formatW3cdtf(/* @__PURE__ */ new Date())
|
|
@@ -105397,7 +105539,7 @@ var init_type_axes = __esm({
|
|
|
105397
105539
|
});
|
|
105398
105540
|
|
|
105399
105541
|
// chart/edit/type.ts
|
|
105400
|
-
function
|
|
105542
|
+
function chartGroupElement(kind, is3D) {
|
|
105401
105543
|
const match = Object.entries(CHART_GROUP_ELEMENTS).find(
|
|
105402
105544
|
([, value]) => value.kind === kind && value.is3D === is3D
|
|
105403
105545
|
);
|
|
@@ -105412,7 +105554,7 @@ function groupingFor(element2, grouping) {
|
|
|
105412
105554
|
}
|
|
105413
105555
|
function newGroup(base, target, series) {
|
|
105414
105556
|
const is3D = target.is3D ?? (base.is3D && SWITCHABLE[target.kind] === true);
|
|
105415
|
-
const element2 =
|
|
105557
|
+
const element2 = chartGroupElement(target.kind, is3D);
|
|
105416
105558
|
const group = { kind: target.kind, element: element2, is3D, series, axisIds: [] };
|
|
105417
105559
|
const allowed = GROUP_FIELDS[element2] ?? [];
|
|
105418
105560
|
for (const key2 of allowed)
|
|
@@ -105621,6 +105763,11 @@ var init_target = __esm({
|
|
|
105621
105763
|
});
|
|
105622
105764
|
|
|
105623
105765
|
// chart/edit/group-options.ts
|
|
105766
|
+
function assertChartGroupOption(key2, value) {
|
|
105767
|
+
const [min, max] = RANGES[key2];
|
|
105768
|
+
if (!Number.isInteger(value) || value < min || value > max)
|
|
105769
|
+
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
105770
|
+
}
|
|
105624
105771
|
function setChartGroupOptions2(space, seriesIndex, edit) {
|
|
105625
105772
|
return editChartSpace(space, (draft) => {
|
|
105626
105773
|
const { group } = chartSeriesEntryAt(draft, seriesIndex);
|
|
@@ -105633,9 +105780,7 @@ function setChartGroupOptions2(space, seriesIndex, edit) {
|
|
|
105633
105780
|
delete group[key2];
|
|
105634
105781
|
continue;
|
|
105635
105782
|
}
|
|
105636
|
-
|
|
105637
|
-
if (!Number.isInteger(value) || value < min || value > max)
|
|
105638
|
-
throw new RangeError(`Chart ${key2} must be a whole number from ${min} to ${max}`);
|
|
105783
|
+
assertChartGroupOption(key2, value);
|
|
105639
105784
|
group[key2] = value;
|
|
105640
105785
|
}
|
|
105641
105786
|
});
|
|
@@ -107344,8 +107489,8 @@ function titleText(title) {
|
|
|
107344
107489
|
}
|
|
107345
107490
|
function scalingFromNeutral(axis, out) {
|
|
107346
107491
|
const { scaling } = axis;
|
|
107347
|
-
setOrRemove(out, "min",
|
|
107348
|
-
setOrRemove(out, "max",
|
|
107492
|
+
setOrRemove(out, "min", finite4(scaling.min));
|
|
107493
|
+
setOrRemove(out, "max", finite4(scaling.max));
|
|
107349
107494
|
const logBase = scaling.logBase !== void 0 && scaling.logBase > 0 ? scaling.logBase : void 0;
|
|
107350
107495
|
setOrRemove(out, "logBase", logBase);
|
|
107351
107496
|
setOrRemove(out, "logScale", logBase !== void 0 ? true : void 0);
|
|
@@ -107357,7 +107502,7 @@ function labelsFromNeutral(axis, out) {
|
|
|
107357
107502
|
setOrRemove(out, "minorTickMark", oneOf(TICK_MARKS2, axis.minorTickMark));
|
|
107358
107503
|
setOrRemove(out, "tickLblPos", oneOf(["high", "low", "nextTo", "none"], axis.tickLabelPosition));
|
|
107359
107504
|
setOrRemove(out, "crosses", oneOf(["autoZero", "min", "max"], axis.crosses));
|
|
107360
|
-
setOrRemove(out, "crossesAt",
|
|
107505
|
+
setOrRemove(out, "crossesAt", finite4(axis.crossesAt));
|
|
107361
107506
|
const valueAxis = type === "valAx";
|
|
107362
107507
|
const categoryOrDate = type === "catAx" || type === "dateAx";
|
|
107363
107508
|
const skips = type === "catAx" || type === "serAx";
|
|
@@ -107411,8 +107556,8 @@ function axisFromNeutral(axis, out) {
|
|
|
107411
107556
|
setOrRemove(out, "displayUnits", custom ? "custom" : builtIn);
|
|
107412
107557
|
setOrRemove(out, "displayUnitsValue", custom || void 0);
|
|
107413
107558
|
}
|
|
107414
|
-
setOrRemove(out, "majorUnit",
|
|
107415
|
-
setOrRemove(out, "minorUnit",
|
|
107559
|
+
setOrRemove(out, "majorUnit", finite4(axis.majorUnit));
|
|
107560
|
+
setOrRemove(out, "minorUnit", finite4(axis.minorUnit));
|
|
107416
107561
|
setOrRemove(
|
|
107417
107562
|
out,
|
|
107418
107563
|
"baseTimeUnit",
|
|
@@ -107433,12 +107578,12 @@ function axesFromNeutral(axes, styled) {
|
|
|
107433
107578
|
);
|
|
107434
107579
|
});
|
|
107435
107580
|
}
|
|
107436
|
-
var oneOf,
|
|
107581
|
+
var oneOf, finite4, positiveInteger, TICK_MARKS2, TIME_UNITS2, BUILT_IN_UNITS2;
|
|
107437
107582
|
var init_chart_from_neutral_axes = __esm({
|
|
107438
107583
|
"pptx/core/utils/chart-from-neutral-axes.ts"() {
|
|
107439
107584
|
init_chart_from_neutral_labels();
|
|
107440
107585
|
oneOf = (values, value) => value !== void 0 && values.includes(value) ? value : void 0;
|
|
107441
|
-
|
|
107586
|
+
finite4 = (value) => value !== void 0 && Number.isFinite(value) ? value : void 0;
|
|
107442
107587
|
positiveInteger = (value) => value !== void 0 && Number.isInteger(value) && value > 0 ? value : void 0;
|
|
107443
107588
|
TICK_MARKS2 = ["cross", "in", "none", "out"];
|
|
107444
107589
|
TIME_UNITS2 = ["days", "months", "years"];
|
|
@@ -118173,7 +118318,7 @@ async function readSlideMasterPaths(zip) {
|
|
|
118173
118318
|
}
|
|
118174
118319
|
return paths;
|
|
118175
118320
|
}
|
|
118176
|
-
function
|
|
118321
|
+
function num4(xml, pattern) {
|
|
118177
118322
|
const value = pattern.exec(xml)?.[1];
|
|
118178
118323
|
return value === void 0 ? void 0 : Number(value);
|
|
118179
118324
|
}
|
|
@@ -118185,14 +118330,14 @@ function readPlaceholders(masterXml) {
|
|
|
118185
118330
|
continue;
|
|
118186
118331
|
}
|
|
118187
118332
|
const kind = PLACEHOLDER_KINDS[/\btype="([^"]+)"/u.exec(phType)?.[1] ?? "body"];
|
|
118188
|
-
const x =
|
|
118189
|
-
const y =
|
|
118190
|
-
const w =
|
|
118191
|
-
const h2 =
|
|
118333
|
+
const x = num4(sp, /<a:off\b[^>]*\bx="(-?\d+)"/u);
|
|
118334
|
+
const y = num4(sp, /<a:off\b[^>]*\by="(-?\d+)"/u);
|
|
118335
|
+
const w = num4(sp, /<a:ext\b[^>]*\bcx="(\d+)"/u);
|
|
118336
|
+
const h2 = num4(sp, /<a:ext\b[^>]*\bcy="(\d+)"/u);
|
|
118192
118337
|
if (!kind || x === void 0 || y === void 0 || !w || !h2 || out.some((p2) => p2.kind === kind)) {
|
|
118193
118338
|
continue;
|
|
118194
118339
|
}
|
|
118195
|
-
const size =
|
|
118340
|
+
const size = num4(sp, /<a:lvl1pPr\b[\s\S]*?<a:defRPr\b[^>]*\bsz="(\d+)"/u);
|
|
118196
118341
|
out.push({ kind, rect: { x, y, w, h: h2 }, ...size ? { sizePt: size / 100 } : {} });
|
|
118197
118342
|
}
|
|
118198
118343
|
return out;
|
|
@@ -126682,26 +126827,26 @@ function buildImgEffects(effects2) {
|
|
|
126682
126827
|
if (effects2.backgroundRemoval) {
|
|
126683
126828
|
out.push({ "a14:backgroundRemoval": buildBackgroundRemovalNode(effects2.backgroundRemoval) });
|
|
126684
126829
|
}
|
|
126685
|
-
if (
|
|
126830
|
+
if (finite5(effects2.sharpenSoften?.amount)) {
|
|
126686
126831
|
out.push({ "a14:sharpenSoften": { "@_amount": round4(effects2.sharpenSoften.amount) } });
|
|
126687
126832
|
}
|
|
126688
126833
|
const bc = effects2.brightnessContrast;
|
|
126689
|
-
if (bc && (
|
|
126834
|
+
if (bc && (finite5(bc.bright) || finite5(bc.contrast))) {
|
|
126690
126835
|
const node = {};
|
|
126691
|
-
if (
|
|
126836
|
+
if (finite5(bc.bright)) {
|
|
126692
126837
|
node["@_bright"] = round4(bc.bright);
|
|
126693
126838
|
}
|
|
126694
|
-
if (
|
|
126839
|
+
if (finite5(bc.contrast)) {
|
|
126695
126840
|
node["@_contrast"] = round4(bc.contrast);
|
|
126696
126841
|
}
|
|
126697
126842
|
out.push({ "a14:brightnessContrast": node });
|
|
126698
126843
|
}
|
|
126699
|
-
if (
|
|
126844
|
+
if (finite5(effects2.colorTemperature?.colorTemp)) {
|
|
126700
126845
|
out.push({
|
|
126701
126846
|
"a14:colorTemperature": { "@_colorTemp": round4(effects2.colorTemperature.colorTemp) }
|
|
126702
126847
|
});
|
|
126703
126848
|
}
|
|
126704
|
-
if (
|
|
126849
|
+
if (finite5(effects2.colorSaturation?.sat)) {
|
|
126705
126850
|
out.push({ "a14:saturation": { "@_sat": round4(effects2.colorSaturation.sat) } });
|
|
126706
126851
|
}
|
|
126707
126852
|
const artistic = a14ArtisticElementName(effects2.artisticEffect);
|
|
@@ -126751,7 +126896,7 @@ function applyA14ImageExtension(blip, effects2) {
|
|
|
126751
126896
|
extLst[extKey] = entries.length === 1 ? entries[0] : entries;
|
|
126752
126897
|
blip[extLstKey] = extLst;
|
|
126753
126898
|
}
|
|
126754
|
-
var GALLERY_TO_A14, round4,
|
|
126899
|
+
var GALLERY_TO_A14, round4, finite5;
|
|
126755
126900
|
var init_image_a14_effects_writer = __esm({
|
|
126756
126901
|
"pptx/core/core/runtime/image-a14-effects-writer.ts"() {
|
|
126757
126902
|
init_image_a14_effects();
|
|
@@ -126784,7 +126929,7 @@ var init_image_a14_effects_writer = __esm({
|
|
|
126784
126929
|
watercolorSponge: "artisticWatercolorSponge"
|
|
126785
126930
|
};
|
|
126786
126931
|
round4 = (value) => String(Math.round(value));
|
|
126787
|
-
|
|
126932
|
+
finite5 = (value) => typeof value === "number" && Number.isFinite(value);
|
|
126788
126933
|
}
|
|
126789
126934
|
});
|
|
126790
126935
|
|
|
@@ -132861,11 +133006,31 @@ var init_PptxHandlerRuntimeSaveShapeXml = __esm({
|
|
|
132861
133006
|
* default) is correct at depth 0. See `group-xfrm-preservation.ts`'s
|
|
132862
133007
|
* module doc for why a nested group must not re-derive this itself.
|
|
132863
133008
|
*/
|
|
133009
|
+
/**
|
|
133010
|
+
* `PptxHandlerSaveOptions.fixedDate` of the save in progress: set, the save
|
|
133011
|
+
* mints reproducible ids and names (new table columns' `a16:colId`, the
|
|
133012
|
+
* fallback name of a new group) instead of random or time-based ones.
|
|
133013
|
+
*/
|
|
133014
|
+
saveFixedDate;
|
|
133015
|
+
/**
|
|
133016
|
+
* The `p:cNvPr/@name` of a group with neither a name nor one from its
|
|
133017
|
+
* file: its element id, or for a reproducible save (`fixedDate`), which
|
|
133018
|
+
* must not depend on the time-based ids of elements made in code,
|
|
133019
|
+
* `Group <shape id>` as PowerPoint names groups.
|
|
133020
|
+
*/
|
|
133021
|
+
groupFallbackName(group) {
|
|
133022
|
+
return this.saveFixedDate ? `Group ${group.shapeId ?? ""}`.trim() : group.id;
|
|
133023
|
+
}
|
|
132864
133024
|
buildGroupShapeXml(group, ctx, ownEmuOverride) {
|
|
132865
133025
|
if (group.rawXml && group.children.length === 0) {
|
|
132866
133026
|
return {
|
|
132867
133027
|
...group.rawXml,
|
|
132868
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
133028
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
133029
|
+
group.rawXml,
|
|
133030
|
+
group.name,
|
|
133031
|
+
this.groupFallbackName(group),
|
|
133032
|
+
group.shapeId
|
|
133033
|
+
)
|
|
132869
133034
|
};
|
|
132870
133035
|
}
|
|
132871
133036
|
const EMU = _PptxHandlerRuntime.EMU_PER_PX;
|
|
@@ -132874,7 +133039,12 @@ var init_PptxHandlerRuntimeSaveShapeXml = __esm({
|
|
|
132874
133039
|
const xfrm = buildGroupTransformXml(group, EMU, ownEmuOverride, rewrap);
|
|
132875
133040
|
const childSpace = group;
|
|
132876
133041
|
const grpXml2 = {
|
|
132877
|
-
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
133042
|
+
"p:nvGrpSpPr": buildGroupNonVisualXml(
|
|
133043
|
+
rawGroupXml,
|
|
133044
|
+
group.name,
|
|
133045
|
+
this.groupFallbackName(group),
|
|
133046
|
+
group.shapeId
|
|
133047
|
+
),
|
|
132878
133048
|
"p:grpSpPr": buildGroupPropertiesXml(rawGroupXml, xfrm)
|
|
132879
133049
|
};
|
|
132880
133050
|
const rawExtLst = rawGroupXml?.["p:extLst"];
|
|
@@ -135856,7 +136026,15 @@ function slideContainsA16Element(node) {
|
|
|
135856
136026
|
function randomColumnId() {
|
|
135857
136027
|
return String(Math.floor(Math.random() * 4294967295));
|
|
135858
136028
|
}
|
|
135859
|
-
function
|
|
136029
|
+
function deterministicColumnId(index) {
|
|
136030
|
+
let hash2 = 2166136261;
|
|
136031
|
+
for (const ch of `a16:colId:${index}`) {
|
|
136032
|
+
hash2 ^= ch.charCodeAt(0);
|
|
136033
|
+
hash2 = Math.imul(hash2, 16777619) >>> 0;
|
|
136034
|
+
}
|
|
136035
|
+
return String(hash2);
|
|
136036
|
+
}
|
|
136037
|
+
function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn, newColumnId = randomColumnId) {
|
|
135860
136038
|
const existingXmlRows = ensureArrayFn(tbl["a:tr"]);
|
|
135861
136039
|
const existingGridCols = ensureArrayFn(
|
|
135862
136040
|
tbl["a:tblGrid"]?.["a:gridCol"]
|
|
@@ -135887,7 +136065,7 @@ function rebuildTableXmlFromData(tbl, tableData, emuPerPx, ensureArrayFn) {
|
|
|
135887
136065
|
// `ensureA16NamespaceOnSlideRoot`; emitting it here too is
|
|
135888
136066
|
// schema-redundant and PowerPoint flags it.
|
|
135889
136067
|
"a16:colId": {
|
|
135890
|
-
"@_val": existingColIds[i2] ||
|
|
136068
|
+
"@_val": existingColIds[i2] || newColumnId(i2)
|
|
135891
136069
|
}
|
|
135892
136070
|
}
|
|
135893
136071
|
}
|
|
@@ -136201,6 +136379,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
136201
136379
|
init_table_style_change_cell_clear();
|
|
136202
136380
|
init_table_paragraph_save_order();
|
|
136203
136381
|
init_table_structural_ops();
|
|
136382
|
+
init_table_xml_rebuild();
|
|
136204
136383
|
init_table_tblpr_save();
|
|
136205
136384
|
CHART_DATA_DISPLAY_OPTIONS_EXT_URI = "{56B9EC1D-385E-4148-901F-78D8002777C0}";
|
|
136206
136385
|
PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime23 {
|
|
@@ -136237,7 +136416,8 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
136237
136416
|
tbl,
|
|
136238
136417
|
tableData,
|
|
136239
136418
|
_PptxHandlerRuntime.EMU_PER_PX,
|
|
136240
|
-
this.ensureArray.bind(this)
|
|
136419
|
+
this.ensureArray.bind(this),
|
|
136420
|
+
this.saveFixedDate ? deterministicColumnId : void 0
|
|
136241
136421
|
);
|
|
136242
136422
|
const rebuiltRows = this.ensureArray(tbl["a:tr"]);
|
|
136243
136423
|
for (let rIdx = 0; rIdx < tableData.rows.length; rIdx++) {
|
|
@@ -138846,9 +139026,9 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
|
|
|
138846
139026
|
let maxId = 0;
|
|
138847
139027
|
for (const rel of relationships3) {
|
|
138848
139028
|
const id = String(rel?.["@_Id"] || "");
|
|
138849
|
-
const
|
|
138850
|
-
if (Number.isFinite(
|
|
138851
|
-
maxId =
|
|
139029
|
+
const num5 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
139030
|
+
if (Number.isFinite(num5) && num5 > maxId) {
|
|
139031
|
+
maxId = num5;
|
|
138852
139032
|
}
|
|
138853
139033
|
}
|
|
138854
139034
|
const existingFontTargets = /* @__PURE__ */ new Set();
|
|
@@ -138991,9 +139171,9 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
|
|
|
138991
139171
|
let maxId = 0;
|
|
138992
139172
|
for (const rel of relationships3) {
|
|
138993
139173
|
const id = String(rel?.["@_Id"] || "");
|
|
138994
|
-
const
|
|
138995
|
-
if (Number.isFinite(
|
|
138996
|
-
maxId =
|
|
139174
|
+
const num5 = parseInt(id.replace(/^rId/u, ""), 10);
|
|
139175
|
+
if (Number.isFinite(num5) && num5 > maxId) {
|
|
139176
|
+
maxId = num5;
|
|
138997
139177
|
}
|
|
138998
139178
|
}
|
|
138999
139179
|
relationships3.push({
|
|
@@ -143348,6 +143528,7 @@ var init_PptxHandlerRuntimeSaveSlideWriter = __esm({
|
|
|
143348
143528
|
init_slide_name();
|
|
143349
143529
|
init_utils();
|
|
143350
143530
|
init_modern_comment_package();
|
|
143531
|
+
init_slide_background_gradient();
|
|
143351
143532
|
init_slide_synchronization();
|
|
143352
143533
|
init_theme_override_utils();
|
|
143353
143534
|
init_builders();
|
|
@@ -143605,6 +143786,16 @@ var init_PptxHandlerRuntimeSaveSlideWriter = __esm({
|
|
|
143605
143786
|
message: `Slide background image could not be embedded and was preserved as-is or omitted: ${imageUrl.slice(0, 120)}`,
|
|
143606
143787
|
scope: "save",
|
|
143607
143788
|
slideId: slide.id
|
|
143789
|
+
}),
|
|
143790
|
+
buildBackgroundGradientFill: () => {
|
|
143791
|
+
const gradient = slideBackgroundGradientToWrite(slide);
|
|
143792
|
+
return gradient ? this.buildGradientFillXml({ fillMode: "gradient", ...gradient }) : void 0;
|
|
143793
|
+
},
|
|
143794
|
+
reportUnsupportedGradient: () => this.compatibilityService.reportWarning({
|
|
143795
|
+
code: "SAVE_BACKGROUND_GRADIENT_UNSUPPORTED",
|
|
143796
|
+
message: "Slide background gradient has no structured form (backgroundGradientFill) matching its CSS gradient and could not be written; the slide was saved without a background of its own.",
|
|
143797
|
+
scope: "save",
|
|
143798
|
+
slideId: slide.id
|
|
143608
143799
|
})
|
|
143609
143800
|
});
|
|
143610
143801
|
this.slideCommentPartWriter.writeComments({
|
|
@@ -145956,6 +146147,15 @@ var init_PptxHandlerRuntimeSaveStructuralIds = __esm({
|
|
|
145956
146147
|
});
|
|
145957
146148
|
|
|
145958
146149
|
// pptx/core/core/runtime/PptxHandlerRuntimeSavePipeline.ts
|
|
146150
|
+
function validFixedDate(date) {
|
|
146151
|
+
if (date === void 0) {
|
|
146152
|
+
return void 0;
|
|
146153
|
+
}
|
|
146154
|
+
if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
|
|
146155
|
+
throw new RangeError("PptxHandlerSaveOptions.fixedDate must be a valid Date");
|
|
146156
|
+
}
|
|
146157
|
+
return date;
|
|
146158
|
+
}
|
|
145959
146159
|
var PptxHandlerRuntime54;
|
|
145960
146160
|
var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
145961
146161
|
"pptx/core/core/runtime/PptxHandlerRuntimeSavePipeline.ts"() {
|
|
@@ -146001,6 +146201,7 @@ var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
|
146001
146201
|
/** One save, with the package to itself; callers go through {@link save}. */
|
|
146002
146202
|
async saveNow(slides, options2) {
|
|
146003
146203
|
validateSlideGeometry(slides);
|
|
146204
|
+
this.saveFixedDate = validFixedDate(options2?.fixedDate);
|
|
146004
146205
|
const templates = [
|
|
146005
146206
|
...options2?.slideMasters ?? [],
|
|
146006
146207
|
...options2?.slideLayouts ?? [],
|
|
@@ -146191,7 +146392,8 @@ var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
|
146191
146392
|
await this.documentPropertiesUpdater.updateOnSave(slides, {
|
|
146192
146393
|
coreProperties: options2?.coreProperties,
|
|
146193
146394
|
appProperties: options2?.appProperties,
|
|
146194
|
-
customProperties: options2?.customProperties
|
|
146395
|
+
customProperties: options2?.customProperties,
|
|
146396
|
+
fixedDate: this.saveFixedDate
|
|
146195
146397
|
});
|
|
146196
146398
|
await this.applyTagCollectionChanges(options2?.tags);
|
|
146197
146399
|
await this.applyNotesMasterChanges(options2?.notesMaster);
|
|
@@ -146235,6 +146437,11 @@ var init_PptxHandlerRuntimeSavePipeline = __esm({
|
|
|
146235
146437
|
delete this.zip.files[name];
|
|
146236
146438
|
}
|
|
146237
146439
|
}
|
|
146440
|
+
if (this.saveFixedDate) {
|
|
146441
|
+
for (const file of Object.values(this.zip.files)) {
|
|
146442
|
+
file.date = this.saveFixedDate;
|
|
146443
|
+
}
|
|
146444
|
+
}
|
|
146238
146445
|
return await this.zip.generateAsync({
|
|
146239
146446
|
type: "uint8array",
|
|
146240
146447
|
compression: "DEFLATE",
|
|
@@ -156199,8 +156406,8 @@ function parseNumberVal(node) {
|
|
|
156199
156406
|
if (raw2 === void 0 || raw2 === null || raw2 === "") {
|
|
156200
156407
|
return void 0;
|
|
156201
156408
|
}
|
|
156202
|
-
const
|
|
156203
|
-
return Number.isFinite(
|
|
156409
|
+
const num5 = Number.parseFloat(String(raw2));
|
|
156410
|
+
return Number.isFinite(num5) ? num5 : void 0;
|
|
156204
156411
|
}
|
|
156205
156412
|
var CHART_DATA_DISPLAY_OPTIONS_EXT_URI2, PptxHandlerRuntime93;
|
|
156206
156413
|
var init_PptxHandlerRuntimeChartParsingHelpers = __esm({
|
|
@@ -158793,12 +159000,12 @@ var init_PptxHandlerRuntimeThemeEffects = __esm({
|
|
|
158793
159000
|
* in-memory format schemes of the masters on those parts and, when the deck's part is among
|
|
158794
159001
|
* them, the deck's.
|
|
158795
159002
|
*/
|
|
158796
|
-
async writeFormatScheme(
|
|
159003
|
+
async writeFormatScheme(elementFor, themePaths) {
|
|
158797
159004
|
const deckBefore = this.getThemeFormatScheme();
|
|
158798
159005
|
const replaced = /* @__PURE__ */ new Map();
|
|
158799
159006
|
const schemes = /* @__PURE__ */ new Map();
|
|
158800
159007
|
const written = await this.rewriteThemeParts(themePaths, (data, path4) => {
|
|
158801
|
-
const element2 =
|
|
159008
|
+
const element2 = elementFor(path4);
|
|
158802
159009
|
const elements2 = data["a:theme"]?.["a:themeElements"];
|
|
158803
159010
|
if (!element2 || !elements2) {
|
|
158804
159011
|
return false;
|
|
@@ -158836,7 +159043,7 @@ var init_PptxHandlerRuntimeThemeEffects = __esm({
|
|
|
158836
159043
|
this.themeFormatScheme = deck;
|
|
158837
159044
|
this.heldFormatSchemes.holdParts(
|
|
158838
159045
|
deck,
|
|
158839
|
-
new Map(written.map((path4) => [path4,
|
|
159046
|
+
new Map(written.map((path4) => [path4, elementFor(path4)]))
|
|
158840
159047
|
);
|
|
158841
159048
|
}
|
|
158842
159049
|
return this.getThemeFormatScheme();
|
|
@@ -165729,12 +165936,12 @@ var OmmlLatexConverter = class {
|
|
|
165729
165936
|
if (!f6) {
|
|
165730
165937
|
return null;
|
|
165731
165938
|
}
|
|
165732
|
-
const
|
|
165939
|
+
const num5 = this.renderNode(f6["m:num"]).trim();
|
|
165733
165940
|
const den = this.renderNode(f6["m:den"]).trim();
|
|
165734
|
-
if (!
|
|
165941
|
+
if (!num5 && !den) {
|
|
165735
165942
|
return null;
|
|
165736
165943
|
}
|
|
165737
|
-
return `\\frac{${
|
|
165944
|
+
return `\\frac{${num5 || " "}}{${den || " "}}`;
|
|
165738
165945
|
}
|
|
165739
165946
|
trySuperscript(node) {
|
|
165740
165947
|
const value = node["m:sSup"];
|