ooxml-core 1.27.0 → 1.27.1

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.
Files changed (34) hide show
  1. package/dist/{PptxHandler-6ZGALYYM.cjs → PptxHandler-NHOKKZ4S.cjs} +3 -3
  2. package/dist/{PptxHandler-HEPPGI32.mjs → PptxHandler-OIR3ZY4Q.mjs} +2 -2
  3. package/dist/PptxHandler-TZJNIXPX.mjs +4 -0
  4. package/dist/{PresentationBuilder-HFGK2BWN.cjs → PresentationBuilder-EX6DAE5X.cjs} +5 -5
  5. package/dist/{PresentationBuilder-OQOZE76H.mjs → PresentationBuilder-RFTSZUPR.mjs} +2 -2
  6. package/dist/{PresentationBuilder-BCDRASRT.mjs → PresentationBuilder-X5WFSHLB.mjs} +2 -2
  7. package/dist/{chunk-MU3XSASV.cjs → chunk-36TR3PER.cjs} +270 -13
  8. package/dist/{chunk-KE2FUFIU.mjs → chunk-5KJAQKZG.mjs} +41 -271
  9. package/dist/{chunk-VRJOOHWV.mjs → chunk-5NJPYCGO.mjs} +271 -17
  10. package/dist/{chunk-4SGBL2H4.mjs → chunk-BXZF7H5G.mjs} +4 -4
  11. package/dist/{chunk-HYCOBPCC.cjs → chunk-DMJIDRJE.cjs} +1118 -1348
  12. package/dist/{chunk-7E45SAZJ.mjs → chunk-GZ4DIXZZ.mjs} +41 -271
  13. package/dist/{chunk-2XMK5SXU.mjs → chunk-I57SMSU6.mjs} +268 -14
  14. package/dist/{chunk-63GRFYAN.mjs → chunk-QIMNQDON.mjs} +1 -1
  15. package/dist/{chunk-ANIFYTKH.mjs → chunk-ZWTXVWMY.mjs} +1 -1
  16. package/dist/pptx/automation/index.cjs +331 -307
  17. package/dist/pptx/automation/index.d.ts +1 -1
  18. package/dist/pptx/automation/index.mjs +5 -5
  19. package/dist/pptx/chunks/{index-CbFowkp4.d.ts → index-GWpMAY-f.d.ts} +16 -3
  20. package/dist/pptx/chunks/index-GWpMAY-f.d.ts.map +1 -0
  21. package/dist/pptx/cli/index.cjs +331 -307
  22. package/dist/pptx/cli/index.mjs +4 -4
  23. package/dist/pptx/converter/index.mjs +2 -2
  24. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  25. package/dist/pptx/editor/render/find-replace.d.ts +1 -1
  26. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  27. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  28. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  29. package/dist/pptx/index.cjs +333 -307
  30. package/dist/pptx/index.d.ts +2 -2
  31. package/dist/pptx/index.mjs +5 -5
  32. package/package.json +1 -1
  33. package/dist/PptxHandler-NO7MNGOW.mjs +0 -4
  34. package/dist/pptx/chunks/index-CbFowkp4.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { NS, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, themeColorRefFromColorChoice, formatAutoNumberMarker, cloneXmlObject, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, tableCellTextBodyMatches, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, attr, openZip, readChartManualLayoutValues, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, encodeXmlAttributeValue, encodeXmlTextValue, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, formatSchemeKey, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-2XMK5SXU.mjs';
1
+ import { NS, SMART_ART_DEFINITION_PARTS, VML_SHAPE_TAGS, isAlternateContentChoiceXmlSupported, parseVmlElement, unwrapAlternateContent, xmlChild, xmlAttr, parseDrawingMediaReference, cropShapeForPresetGeometry, isHeaderFooterPlaceholder, xmlPath, inheritedPlaceholderFieldType, parseParagraphLevel, xmlHasChild, parseParagraphExtraAttributes, parseParagraphMargins, parseAlignmentAttr, parseParagraphRtl, parseTabStops, resolveParagraphAlignment, xmlText, parseBodyPrBooleanAttrs, selectAlternateContentBranch, parseBulletSizePercent, extractColorChoiceXml, themeColorRefFromColorChoice, formatAutoNumberMarker, cloneXmlObject, parseParagraphSpacingPx, parseOoxmlPercent, createBuiltinVariables, resolveCoordinate, readPathListCommandOrder, parseAdjustmentValues, parseGuideDefinitions, evaluateGuides, orderedPathCommandEntries, ooxmlArcToSvg, inheritCustomGeometryCommandOrder, parseInkMlContent, parseModel3DScene, remapElementShapeIds, parseShapeId, isTemplateElementId, remapShapeIdReferences, reapplyAlternateContentToTree, openPptxZip, buildOle2, SHAPE_TREE_ELEMENT_TAGS, MAX_SHAPE_ID, orderedXmlKey, safeResolveZipPath, parseXml, elements, parseDataUrlToBytes, base64Decode, reorderObjectKeys, encodeCompressedPng, zlibStore, hash, concatArrays, encodePasswordUtf16LE, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, uint32LE, pptxActionToElementAction, buildClrMapOverrideXml, applyActiveXControlsToSlide, BLIP_FILL_ORDER, SP_PR_ORDER, ensureXmlChild, inkElementToStrokes, buildInkMlContent, ensureXmlChildOrCreate, isXmlNode, applyChartLayouts, stripXmlOrderSuffix, serializeTabStop, readCommentMentions, rebaseCommentMentions, applyCommentMentions, colorsEqual, generateFontGuid, applyBubbleChartOptions, applyChartUpDownBars, applyDataLabelsRangeToDLbls, applyChartAxisScaling, applyChartAxisLabelFormatting, upsertChartAxisChild, applyChartDateAxisUnits, applyChartAxisDisplayUnitsToXml, writeChartShapeProps, resolveTxPrDefRPr, buildDefRPrTextProperties, buildChartGradFillXml, applySeriesMarkerToXml, applySeriesDataPointsToXml, chartColorHex, applyChartManualLayout, chartTrendlineType, buildTrendlineLabel, serializeColorChoice, replaceOleEmbedding, findKey, collectAllText, buildNodeGuidMap, buildPresentationGuidMap, regenerateSmartArtDrawingShapes, buildFabricatedDrawingXml, buildFabricatedDiagramDataXml, DIAGRAM_DRAWING_CONTENT_TYPE, DIAGRAM_DRAWING_REL_TYPE, applyDiagramRelationshipIds, applyDrawingMediaReference, DIAGRAM_XML_PROLOG, DIAGRAM_DATA_XMLNS, escapeDiagramXml, writeBodyPrBooleanAttrs, applyTextBodySp3d, customGeometryPathsToXml, ensureArrayValue, lookupPresetShape, writeShapeEffects, SHAPE_STYLE_ORDER, roundCoordinate, scaleVectorToIntegers, P14_GUIDE_URI, P15_GUIDE_URI, buildGuideListExtension, resetSpPrFormattingForStyleMatrix, restorePathListCommandOrder, fillIsPurelyStyleMatrix, serializeColorChoiceWithRef, createLineStyleGate, applyDrawingLineDash, getSignaturePathsToStrip, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, mergeSmartArtPointXml, mergeSmartArtConnectionXml, applySmartArtLayoutDefinition, obfuscateFont, containsConvertibleStrictNamespaceAttribute, convertXmlToStrict, applySeriesPictureOptionsToXml, findChartExtByUri, findChildByLocalName, regenerateClonedUniqueId, buildChartUniqueIdExtLst, createOfficeGuid, isContentPoint, newSmartArtGuid, parseChartUserShapesDrawing, DEFAULT_ROW_HEIGHT_EMU, createDefaultXmlCell, xmlChildren, applyChartGradientToSpPr, setAutoTitleDeleted, insertAt, replaceFirstText, shouldRebuildFromParagraphs, buildPointFromParagraphs, shouldRebuildFromRuns, buildPointFromRuns, buildPointText, tableCellTextBodyMatches, ensureXmlChildren, TC_PR_BORDERS_ORDER, relAttr, buildXml, writeChartColorChoice, first, stripParentDirSegments, children, parseChartUniqueId, buildChartMarkerXml, chartGradientsEqual, chartColorChoiceValue, attr, openZip, readChartManualLayoutValues, buildEffectDagTreeFromXml, syncPictureShapeTypeWithCropShape, buildSrgbColorChoice, fetchUrlToBytes, parseChartWideTextStyle, hasLocalName, parseDefRPrTextStyle, parseChartDataLabelOptions, shadowOffsetToDistanceAndDirection, positiveFixedAngleAttribute, xmlAttrNumber, parseCustomShows, parseShapeProps, parseActiveXControlsFromSlide, convertMetafileToDataUrl, ooxmlGradientAngleToCssDegrees, isAlternateContentChoiceSupported, detectStrictConformance, normalizeStrictXml, relayoutSmartArt, CHART_ERROR_VALUE_TYPES, CHART_ERROR_BAR_TYPES, CHART_ERROR_BAR_DIRECTIONS, themeColorRefToSolidFillWithOpacity, FONT_ADVANCE_TABLES, DEFAULT_FONT_ADVANCE_TABLE, measureTextWidth, applyDrawingColorTransforms, applyThemeToData, detectFileFormat, parseOle2, EncryptedFileError, decryptPptx, encryptPptx, encodeXmlAttributeValue, encodeXmlTextValue, svgToCustomGeometryPaths, IncorrectPasswordError, parseEncryptionInfo, RC4_ALG_ID, isOle2CompoundFile, ENTRY_TYPE_ROOT, supportsChartGradientFill, DEFAULT_CHART_GRADIENT_ANGLE, decodeXmlEntities, preservesXmlWhitespace, annotateCustomGeometryCommandOrder, annotateSmartArtTextOrder, stripXmlOrderMarkers, normalizeStShapeType, applyCustomShows, applySections, reorderObjectKeysByLocalName, PRESENTATION_CHILD_ORDER, applyKinsokuToXml, normalizeNamespaceUri, backgroundStyleRefIsCurrent, backgroundRefNode, captureStyleBaseline, STYLE_MATRIX_FILL_KEYS, STYLE_MATRIX_LINE_KEYS, STYLE_MATRIX_EFFECT_KEYS, detectOleObjectType, inferOleExtensionFromTarget, backgroundStylePreset, isDarkColorMap, backgroundStyleColorMap, reResolveElementsForColorMapChange, deriveSlideTitles, parseP14DirectChild, parseP14FromExtLst, P14_TRANSITION_TYPES, parseSlideDrawingGuides, slideBackgroundStyleRefFromNode, cloneSlide, parseDrawingFraction, scrgbLinearToSrgb8, parseDrawingHueDegrees, hslToRgb, themeColorRefToXml, effectChild, mergeEffectNode, mergeAttributeEffectNode, findThemeEffectScheme, wrapFormatSchemeXml, effectIsPurelyStyleMatrix, prismFamilyFlags, prismFamilyTypeOfNode, prismFamilyTypeForFlags, P14_DIR_IS_ORIENTATION_TYPE, estimateMediaDurationMs, parseVmlElements, parseDrawingLineDash, parseLineSpacingMultiplier, parseLineSpacingExactPt, formatSchemeKey, loadThemeVariants, parsePresentationDrawingGuides, parsePresentationSmartTags, resolveLayoutDisplayName, DEFAULT_MAX_UNCOMPRESSED_BYTES, guardZip, ZipBombError, MAX_ZIP_ENTRY_COUNT, detectDigitalSignatures, unwrapOleEmbedding, mimeTypeForOleFile, oleBytesToDataUrl, themeColorRefFromSchemeClr, extractGuidFromPartName, deobfuscateFont, detectFontFormat, parseKinsoku, parseLineStyle, parseChartUpDownBars, parseDataTable, parseChart3DSurfaces, parseChartAxes, parseBubbleChartOptions, parseChartLayouts, parseCxChartSeries, parseChartDataPointPictureBlipRel, parseSeriesDataPoints, parseMarker, parseSeriesDataLabels, parseChartDataPointPicture, parseImplicitBlipPictureFill, parseEmbeddedXlsx, chartTrendlineKind, parseChartManualLayout, parseDiagramRelationshipIds, parseSmartArtTextParagraphs, firstParagraphRuns, smartArtParagraphsText, parseSmartArtLayoutDefinition, parseSmartArtPresLayoutVars, parseSmartArtConnection, projectSmartArtNodeText, resolveSmartArtNodeStyleRoles, resolveSmartArtNodeCoherent3DOff, parseSmartArtDefinitionMetadata, parseSmartArtColorStyleLabels, buildSmartArtColorLists, buildSmartArtColorRoleMap, parseSmartArtQuickStyleLabels, resolveSmartArtEffectIntensity, parseSmartArtStyleLabelRefs, extractStyleReferenceColorXml, withThemePlaceholderColor, blendColorOntoWhite } from './chunk-I57SMSU6.mjs';
2
2
  import { hasShapeProperties, hasTextProperties } from './chunk-GXHKNSZX.mjs';
3
3
  import { EMU_PER_PX, EMU_PER_PIXEL, SYSTEM_COLOR_MAP, PRESET_COLOR_MAP, OOXML_PERCENT_UNITS, EMU_PER_POINT } from './chunk-CA7KCNL3.mjs';
4
4
  import JSZip from 'jszip';
@@ -773,10 +773,10 @@ var COLOR_ELEMENTS = {
773
773
  hslClr: "hsl"
774
774
  };
775
775
  function colorValue(kind, element) {
776
- const attribute3 = (name) => element.getAttribute(name) ?? "";
777
- if (kind === "scrgb") return `${attribute3("r")},${attribute3("g")},${attribute3("b")}`;
778
- if (kind === "hsl") return `${attribute3("hue")},${attribute3("sat")},${attribute3("lum")}`;
779
- return attribute3("val");
776
+ const attribute2 = (name) => element.getAttribute(name) ?? "";
777
+ if (kind === "scrgb") return `${attribute2("r")},${attribute2("g")},${attribute2("b")}`;
778
+ if (kind === "hsl") return `${attribute2("hue")},${attribute2("sat")},${attribute2("lum")}`;
779
+ return attribute2("val");
780
780
  }
781
781
  function parseDrawingColorIn(container) {
782
782
  if (!container) return void 0;
@@ -1218,10 +1218,10 @@ var PartPatch = class {
1218
1218
  if (kids.length !== children6.length) throw new Error("Property part markup is not supported");
1219
1219
  kids.forEach((kid, index) => this.spans.set(kid, children6[index]));
1220
1220
  this.root = root;
1221
- for (const attribute3 of Array.from(rootElement.attributes)) {
1222
- if (attribute3.name === "xmlns") this.defaultNs = attribute3.value;
1223
- else if (attribute3.namespaceURI === XMLNS || attribute3.name.startsWith("xmlns:"))
1224
- this.prefixes.set(attribute3.value, attribute3.localName);
1221
+ for (const attribute2 of Array.from(rootElement.attributes)) {
1222
+ if (attribute2.name === "xmlns") this.defaultNs = attribute2.value;
1223
+ else if (attribute2.namespaceURI === XMLNS || attribute2.name.startsWith("xmlns:"))
1224
+ this.prefixes.set(attribute2.value, attribute2.localName);
1225
1225
  }
1226
1226
  }
1227
1227
  xml;
@@ -1264,10 +1264,10 @@ var PartPatch = class {
1264
1264
  else this.add(span.openEnd, span.closeStart, content2);
1265
1265
  }
1266
1266
  /** Adds ` name="value"` text to the element's start tag. */
1267
- addAttribute(element, attribute3) {
1267
+ addAttribute(element, attribute2) {
1268
1268
  const span = this.span(element);
1269
1269
  const at = span.openEnd - (span.selfClosing ? 2 : 1);
1270
- this.add(at, at, attribute3);
1270
+ this.add(at, at, attribute2);
1271
1271
  }
1272
1272
  remove(element) {
1273
1273
  const span = this.span(element);
@@ -1488,9 +1488,9 @@ function writeAppProperties(props, sourceXml) {
1488
1488
  }
1489
1489
 
1490
1490
  // opc/properties/custom.ts
1491
- var escape = (text, attribute3 = false) => {
1491
+ var escape = (text, attribute2 = false) => {
1492
1492
  const out = text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1493
- return attribute3 ? out.replace(/"/g, "&quot;") : out;
1493
+ return attribute2 ? out.replace(/"/g, "&quot;") : out;
1494
1494
  };
1495
1495
  var isVt = (element) => element.namespaceURI === NS.vt || element.prefix === "vt";
1496
1496
  function allocateCustomPropertyIds(properties) {
@@ -1721,13 +1721,13 @@ function parseDrawingTextBody(body) {
1721
1721
  const anchor = properties?.getAttribute("anchor");
1722
1722
  if (anchor) result.anchor = anchor;
1723
1723
  const insets = {};
1724
- for (const [key2, attribute3] of [
1724
+ for (const [key2, attribute2] of [
1725
1725
  ["left", "lIns"],
1726
1726
  ["top", "tIns"],
1727
1727
  ["right", "rIns"],
1728
1728
  ["bottom", "bIns"]
1729
1729
  ]) {
1730
- const value = Number.parseInt(properties?.getAttribute(attribute3) ?? "", 10);
1730
+ const value = Number.parseInt(properties?.getAttribute(attribute2) ?? "", 10);
1731
1731
  if (Number.isFinite(value)) insets[key2] = value;
1732
1732
  }
1733
1733
  if (Object.keys(insets).length > 0) result.insetsEmu = insets;
@@ -36568,8 +36568,8 @@ function readPlaceholderFieldType(sp) {
36568
36568
  function readHeaderFooterFromMaster(masterRoot) {
36569
36569
  const result = {};
36570
36570
  const hf = child2(masterRoot, "p:hf");
36571
- const flag = (attribute3, placeholder) => {
36572
- const raw2 = hf?.[attribute3];
36571
+ const flag = (attribute2, placeholder) => {
36572
+ const raw2 = hf?.[attribute2];
36573
36573
  if (raw2 !== void 0) {
36574
36574
  return String(raw2) !== "0" && String(raw2) !== "false";
36575
36575
  }
@@ -38659,11 +38659,11 @@ function readChartAppearance(text, properties) {
38659
38659
  const out = {};
38660
38660
  const size = Number(text?.getAttribute("sz") ?? NaN);
38661
38661
  if (Number.isFinite(size) && size > 0) out.fontSize = size / 100;
38662
- for (const [attribute3, key2] of [
38662
+ for (const [attribute2, key2] of [
38663
38663
  ["b", "bold"],
38664
38664
  ["i", "italic"]
38665
38665
  ]) {
38666
- const value = text?.getAttribute(attribute3);
38666
+ const value = text?.getAttribute(attribute2);
38667
38667
  if (value !== null && value !== void 0) out[key2] = value === "1" || value === "true";
38668
38668
  }
38669
38669
  const typeface = first(text, "latin", NS.a)?.getAttribute("typeface");
@@ -43214,9 +43214,9 @@ function parseChartStyleDefinition(styleRoot, xmlLookup, resolveSchemeColor, par
43214
43214
  return resolveChartStyleDefinition(style, (color2) => {
43215
43215
  const element = parseXml(drawingColorXml(color2)).documentElement;
43216
43216
  const raw2 = {};
43217
- for (const attribute3 of Array.from(element.attributes))
43218
- if (attribute3.localName !== "xmlns" && attribute3.prefix !== "xmlns")
43219
- raw2[`@_${attribute3.localName}`] = attribute3.value;
43217
+ for (const attribute2 of Array.from(element.attributes))
43218
+ if (attribute2.localName !== "xmlns" && attribute2.prefix !== "xmlns")
43219
+ raw2[`@_${attribute2.localName}`] = attribute2.value;
43220
43220
  for (const transform2 of elements(element))
43221
43221
  raw2[`a:${transform2.localName}`] = transform2.hasAttribute("val") ? { "@_val": transform2.getAttribute("val") ?? "" } : {};
43222
43222
  const fill = {};
@@ -43705,242 +43705,6 @@ function modernCommentStatus(comment, hasRaw, hasRawStatus) {
43705
43705
  return comment.status === "resolved" || comment.status === "closed" ? "active" : comment.status || "active";
43706
43706
  }
43707
43707
 
43708
- // pptx/core/utils/modern-comment-mention-read.ts
43709
- var mentionLocalName = (key2) => key2.split(":").pop() || key2;
43710
- var mentionNodesOf = (value) => {
43711
- if (Array.isArray(value)) {
43712
- return value.filter((entry2) => Boolean(entry2) && typeof entry2 === "object");
43713
- }
43714
- return value && typeof value === "object" ? [value] : [];
43715
- };
43716
- var mentionChildrenNamed = (node, name) => {
43717
- if (!node) {
43718
- return [];
43719
- }
43720
- const result = [];
43721
- for (const [key2, value] of Object.entries(node)) {
43722
- if (!key2.startsWith("@_") && mentionLocalName(key2) === name) {
43723
- result.push(...mentionNodesOf(value));
43724
- }
43725
- }
43726
- return result;
43727
- };
43728
- var MENTION_PERSON_KEYS = [
43729
- "@_mentionpersonId",
43730
- "@_mentionPersonId",
43731
- "@_personId",
43732
- "@_authorId"
43733
- ];
43734
- var MENTION_LENGTH_KEYS = ["@_length", "@_mentionCharCount", "@_len"];
43735
- var attribute2 = (node, keys) => {
43736
- for (const key2 of keys) {
43737
- const value = node[key2];
43738
- if (value !== void 0 && value !== null && String(value).length > 0) {
43739
- return String(value);
43740
- }
43741
- }
43742
- return void 0;
43743
- };
43744
- var integer2 = (value) => {
43745
- if (value === void 0) {
43746
- return void 0;
43747
- }
43748
- const parsed = Number.parseInt(value, 10);
43749
- return Number.isFinite(parsed) && parsed >= 0 ? parsed : void 0;
43750
- };
43751
- var readMention = (node, authorName, containerUri) => {
43752
- const personId = attribute2(node, MENTION_PERSON_KEYS);
43753
- const startIndex = integer2(attribute2(node, ["@_startIndex"]));
43754
- const length = integer2(attribute2(node, MENTION_LENGTH_KEYS));
43755
- if (!personId || startIndex === void 0 || length === void 0 || length === 0) {
43756
- return void 0;
43757
- }
43758
- return {
43759
- personId,
43760
- startIndex,
43761
- length,
43762
- id: attribute2(node, ["@_mentionId", "@_id"]),
43763
- authorName: authorName(personId),
43764
- containerUri,
43765
- rawXml: node
43766
- };
43767
- };
43768
- function readCommentMentions(node, authorName) {
43769
- if (!node) {
43770
- return void 0;
43771
- }
43772
- const found = [];
43773
- for (const list2 of mentionChildrenNamed(node, "mentionLst")) {
43774
- for (const entry2 of mentionChildrenNamed(list2, "mention")) {
43775
- const mention = readMention(entry2, authorName);
43776
- if (mention) {
43777
- found.push(mention);
43778
- }
43779
- }
43780
- }
43781
- for (const extension of mentionChildrenNamed(mentionChildrenNamed(node, "extLst")[0], "ext")) {
43782
- const uri = String(extension["@_uri"] || "");
43783
- for (const list2 of mentionChildrenNamed(extension, "mentionLst")) {
43784
- for (const entry2 of mentionChildrenNamed(list2, "mention")) {
43785
- const mention = readMention(entry2, authorName, uri);
43786
- if (mention) {
43787
- found.push(mention);
43788
- }
43789
- }
43790
- }
43791
- }
43792
- found.sort((a, b) => a.startIndex - b.startIndex);
43793
- return found.length > 0 ? found : void 0;
43794
- }
43795
-
43796
- // pptx/core/utils/modern-comment-mentions.ts
43797
- var commonPrefixLength = (a, b) => {
43798
- const max = Math.min(a.length, b.length);
43799
- let index = 0;
43800
- while (index < max && a[index] === b[index]) {
43801
- index += 1;
43802
- }
43803
- return index;
43804
- };
43805
- var commonSuffixLength = (a, b, limit) => {
43806
- let index = 0;
43807
- while (index < limit && a[a.length - 1 - index] === b[b.length - 1 - index]) {
43808
- index += 1;
43809
- }
43810
- return index;
43811
- };
43812
- var nearestOccurrence = (text, span, hint) => {
43813
- let best = -1;
43814
- let bestDistance = Number.POSITIVE_INFINITY;
43815
- let at = text.indexOf(span);
43816
- while (at !== -1) {
43817
- const distance = Math.abs(at - hint);
43818
- if (distance < bestDistance) {
43819
- best = at;
43820
- bestDistance = distance;
43821
- }
43822
- at = text.indexOf(span, at + 1);
43823
- }
43824
- return best;
43825
- };
43826
- function rebaseCommentMentions(mentions, oldText, newText) {
43827
- if (!mentions || mentions.length === 0) {
43828
- return void 0;
43829
- }
43830
- if (oldText === newText) {
43831
- return mentions;
43832
- }
43833
- const prefix = commonPrefixLength(oldText, newText);
43834
- const suffix = commonSuffixLength(
43835
- oldText,
43836
- newText,
43837
- Math.min(oldText.length, newText.length) - prefix
43838
- );
43839
- const changeEnd = oldText.length - suffix;
43840
- const delta = newText.length - oldText.length;
43841
- const result = [];
43842
- for (const mention of mentions) {
43843
- const start = mention.startIndex;
43844
- const end = start + mention.length;
43845
- const span = oldText.slice(start, end);
43846
- if (span.length !== mention.length) {
43847
- continue;
43848
- }
43849
- let next = -1;
43850
- if (end <= prefix) {
43851
- next = start;
43852
- } else if (start >= changeEnd) {
43853
- next = start + delta;
43854
- }
43855
- if (next >= 0 && newText.slice(next, next + mention.length) === span) {
43856
- result.push(next === start ? mention : { ...mention, startIndex: next });
43857
- continue;
43858
- }
43859
- const relocated = nearestOccurrence(newText, span, next >= 0 ? next : start);
43860
- if (relocated >= 0) {
43861
- result.push({ ...mention, startIndex: relocated });
43862
- }
43863
- }
43864
- return result.length > 0 ? result : void 0;
43865
- }
43866
- var buildMention = (mention) => {
43867
- const node = {};
43868
- for (const [key2, value] of Object.entries(mention.rawXml || {})) {
43869
- if (key2.startsWith("@_")) {
43870
- node[key2] = value;
43871
- }
43872
- }
43873
- const personKey = MENTION_PERSON_KEYS.find((key2) => node[key2] !== void 0) || "@_mentionpersonId";
43874
- const lengthKey = MENTION_LENGTH_KEYS.find((key2) => node[key2] !== void 0) || "@_length";
43875
- node[personKey] = mention.personId;
43876
- node[lengthKey] = String(mention.length);
43877
- node["@_startIndex"] = String(mention.startIndex);
43878
- if (mention.id) {
43879
- const idKey = node["@_id"] !== void 0 && node["@_mentionId"] === void 0 ? "@_id" : "@_mentionId";
43880
- node[idKey] = mention.id;
43881
- }
43882
- return node;
43883
- };
43884
- function buildMentionListNode(mentions) {
43885
- if (!mentions || mentions.length === 0) {
43886
- return void 0;
43887
- }
43888
- return { "p188:mention": mentions.map(buildMention) };
43889
- }
43890
- var stripMentionLists = (node) => {
43891
- const result = {};
43892
- for (const [key2, value] of Object.entries(node)) {
43893
- if (key2.startsWith("@_") || mentionLocalName(key2) !== "mentionLst") {
43894
- result[key2] = value;
43895
- }
43896
- }
43897
- return result;
43898
- };
43899
- var groupByContainer = (mentions) => {
43900
- const direct = [];
43901
- const byUri = /* @__PURE__ */ new Map();
43902
- for (const mention of mentions || []) {
43903
- if (!mention.containerUri) {
43904
- direct.push(mention);
43905
- continue;
43906
- }
43907
- const bucket = byUri.get(mention.containerUri);
43908
- if (bucket) {
43909
- bucket.push(mention);
43910
- } else {
43911
- byUri.set(mention.containerUri, [mention]);
43912
- }
43913
- }
43914
- return { direct, byUri };
43915
- };
43916
- function applyCommentMentions(node, mentions, extension, replace) {
43917
- if (!replace) {
43918
- return extension;
43919
- }
43920
- const { direct, byUri } = groupByContainer(mentions);
43921
- const directList = buildMentionListNode(direct);
43922
- if (directList) {
43923
- node["p188:mentionLst"] = directList;
43924
- }
43925
- if (!extension) {
43926
- return void 0;
43927
- }
43928
- const rebuilt = stripMentionLists(extension);
43929
- const extensionKey = Object.keys(rebuilt).find((key2) => mentionLocalName(key2) === "ext") || "p188:ext";
43930
- const entries = mentionNodesOf(rebuilt[extensionKey]).map((entry2) => {
43931
- const list2 = buildMentionListNode(byUri.get(String(entry2["@_uri"] || "")));
43932
- const next = stripMentionLists(entry2);
43933
- if (list2) {
43934
- next["p188:mentionLst"] = list2;
43935
- }
43936
- return next;
43937
- });
43938
- if (entries.length > 0) {
43939
- rebuilt[extensionKey] = entries.length === 1 ? entries[0] : entries;
43940
- }
43941
- return rebuilt;
43942
- }
43943
-
43944
43708
  // pptx/core/utils/modern-comment-text-body.ts
43945
43709
  var localName4 = (key2) => key2.split(":").pop() || key2;
43946
43710
  var keyOf8 = (node, name) => Object.keys(node).find((key2) => localName4(key2) === name);
@@ -43980,7 +43744,7 @@ function flattenBodyText(node) {
43980
43744
  };
43981
43745
  return (paragraphs.length > 0 ? paragraphs : [node]).map((paragraph2) => collect(paragraph2));
43982
43746
  }
43983
- var commonPrefixLength2 = (a, b) => {
43747
+ var commonPrefixLength = (a, b) => {
43984
43748
  const max = Math.min(a.length, b.length);
43985
43749
  let index = 0;
43986
43750
  while (index < max && a[index] === b[index]) {
@@ -43988,7 +43752,7 @@ var commonPrefixLength2 = (a, b) => {
43988
43752
  }
43989
43753
  return index;
43990
43754
  };
43991
- var commonSuffixLength2 = (a, b, limit) => {
43755
+ var commonSuffixLength = (a, b, limit) => {
43992
43756
  let index = 0;
43993
43757
  while (index < limit && a[a.length - 1 - index] === b[b.length - 1 - index]) {
43994
43758
  index += 1;
@@ -44022,8 +43786,8 @@ function spliceParagraph(paragraph2, line) {
44022
43786
  if (runs.length === 0) {
44023
43787
  return { ...paragraph2, "a:r": bareRun(void 0, line) };
44024
43788
  }
44025
- const prefix = commonPrefixLength2(original, line);
44026
- const suffix = commonSuffixLength2(
43789
+ const prefix = commonPrefixLength(original, line);
43790
+ const suffix = commonSuffixLength(
44027
43791
  original,
44028
43792
  line,
44029
43793
  Math.min(original.length, line.length) - prefix
@@ -44235,7 +43999,7 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
44235
43999
  "@_authorId": resolveAuthorId(comment),
44236
44000
  "@_created": modernCommentCreated(comment.createdAt, raw2?.["@_created"])
44237
44001
  };
44238
- for (const [attribute3, value] of [
44002
+ for (const [attribute2, value] of [
44239
44003
  ["status", modernCommentStatus(comment, raw2 !== void 0, raw2?.["@_status"] !== void 0)],
44240
44004
  ["tags", comment.tags?.join(" ")],
44241
44005
  ["likes", comment.likes?.join(" ")],
@@ -44247,9 +44011,9 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
44247
44011
  ["title", comment.title]
44248
44012
  ]) {
44249
44013
  if (value === void 0) {
44250
- delete node[`@_${attribute3}`];
44014
+ delete node[`@_${attribute2}`];
44251
44015
  } else {
44252
- node[`@_${attribute3}`] = String(value);
44016
+ node[`@_${attribute2}`] = String(value);
44253
44017
  }
44254
44018
  }
44255
44019
  const ownsMentions = (comment.mentions?.length ?? 0) > 0;
@@ -44291,7 +44055,13 @@ var buildComment = (comment, resolveAuthorId, emuPerPx, isReply = false) => {
44291
44055
  const originalBody = child8(raw2, "txBody");
44292
44056
  node["p188:txBody"] = applyModernCommentText(originalBody, comment.text);
44293
44057
  const originalText = originalBody ? flattenBodyText(originalBody).join("\n") : comment.text;
44294
- const mentions = rebaseCommentMentions(comment.mentions, originalText, comment.text);
44058
+ const loadedMentions = raw2 ? readCommentMentions(raw2, () => void 0) : void 0;
44059
+ const mentions = rebaseCommentMentions(
44060
+ comment.mentions,
44061
+ originalText,
44062
+ comment.text,
44063
+ loadedMentions ?? []
44064
+ );
44295
44065
  const extension = applyCommentMentions(node, mentions, child8(raw2, "extLst"), ownsMentions);
44296
44066
  if (extension) {
44297
44067
  node["p188:extLst"] = extension;
@@ -53657,8 +53427,8 @@ function applyChartColorMapOverride(chartSpace, value, localName15) {
53657
53427
  return;
53658
53428
  }
53659
53429
  const node = {};
53660
- for (const [attribute3, attrValue] of Object.entries(value)) {
53661
- node[`@_${attribute3}`] = attrValue;
53430
+ for (const [attribute2, attrValue] of Object.entries(value)) {
53431
+ node[`@_${attribute2}`] = attrValue;
53662
53432
  }
53663
53433
  if (existingKey) {
53664
53434
  chartSpace[existingKey] = node;
@@ -70995,15 +70765,15 @@ var PptxHandlerRuntime39 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
70995
70765
  this.applyModel3DTransformFlags(transform2, el);
70996
70766
  }
70997
70767
  applyModel3DTransformFlags(transform2, el) {
70998
- for (const [attribute3, value] of [
70768
+ for (const [attribute2, value] of [
70999
70769
  ["@_rot", el.rotation],
71000
70770
  ["@_skewX", el.skewX],
71001
70771
  ["@_skewY", el.skewY]
71002
70772
  ]) {
71003
70773
  if (value === void 0) {
71004
- delete transform2[attribute3];
70774
+ delete transform2[attribute2];
71005
70775
  } else {
71006
- transform2[attribute3] = String(Math.round(value * 6e4));
70776
+ transform2[attribute2] = String(Math.round(value * 6e4));
71007
70777
  }
71008
70778
  }
71009
70779
  if (el.flipHorizontal) {