@office-open/core 0.12.0 → 0.12.2

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 (40) hide show
  1. package/dist/chart/index.d.mts +2 -2
  2. package/dist/chart/index.mjs +2 -2
  3. package/dist/{chart-DED4tXC9.mjs → chart-DEIF3VZn.mjs} +82 -60
  4. package/dist/chart-DEIF3VZn.mjs.map +1 -0
  5. package/dist/drawing/index.mjs +1 -1
  6. package/dist/{drawing-BCAyrCCw.mjs → drawing-BVwCkNXB.mjs} +7 -2
  7. package/dist/{drawing-BCAyrCCw.mjs.map → drawing-BVwCkNXB.mjs.map} +1 -1
  8. package/dist/{index-BP541uS-.d.mts → index-BwRtWyaP.d.mts} +86 -70
  9. package/dist/index-BwRtWyaP.d.mts.map +1 -0
  10. package/dist/{index-BAxlDUQ1.d.mts → index-DF3lKLF_.d.mts} +3 -1
  11. package/dist/index-DF3lKLF_.d.mts.map +1 -0
  12. package/dist/{index-Di6XPdGl.d.mts → index-DRggxtp7.d.mts} +2 -1
  13. package/dist/{index-Di6XPdGl.d.mts.map → index-DRggxtp7.d.mts.map} +1 -1
  14. package/dist/index-L6AXewfV.d.mts.map +1 -1
  15. package/dist/index.d.mts +27 -4
  16. package/dist/index.d.mts.map +1 -1
  17. package/dist/index.mjs +61 -21
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/smartart/index.d.mts +1 -1
  20. package/dist/smartart/index.mjs +1 -1
  21. package/dist/{smartart-n1kYJ6Jg.mjs → smartart-YH87Emca.mjs} +14 -10
  22. package/dist/smartart-YH87Emca.mjs.map +1 -0
  23. package/dist/{style-matrix-B6jhPAT3.mjs → style-matrix-DjhMuuQg.mjs} +2 -2
  24. package/dist/{style-matrix-B6jhPAT3.mjs.map → style-matrix-DjhMuuQg.mjs.map} +1 -1
  25. package/dist/theme/index.mjs +2 -2
  26. package/dist/{theme-BKnXRmvn.mjs → theme-Dx0Db9bX.mjs} +3 -3
  27. package/dist/{theme-BKnXRmvn.mjs.map → theme-Dx0Db9bX.mjs.map} +1 -1
  28. package/dist/util/index.d.mts +1 -1
  29. package/dist/util/index.mjs +1 -1
  30. package/dist/{util-ptE16MEk.mjs → util-Cr7rwR6t.mjs} +2 -2
  31. package/dist/{util-ptE16MEk.mjs.map → util-Cr7rwR6t.mjs.map} +1 -1
  32. package/dist/vector/index.mjs +1 -1
  33. package/dist/{vector-DhLGZjP5.mjs → vector-DZ_OteHJ.mjs} +93 -78
  34. package/dist/vector-DZ_OteHJ.mjs.map +1 -0
  35. package/package.json +2 -2
  36. package/dist/chart-DED4tXC9.mjs.map +0 -1
  37. package/dist/index-BAxlDUQ1.d.mts.map +0 -1
  38. package/dist/index-BP541uS-.d.mts.map +0 -1
  39. package/dist/smartart-n1kYJ6Jg.mjs.map +0 -1
  40. package/dist/vector-DhLGZjP5.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"theme-BKnXRmvn.mjs","names":[],"sources":["../src/theme/default-colors.ts","../src/theme/color-scheme.ts","../src/theme/custom-color.ts","../src/theme/extra-color-scheme.ts","../src/theme/font-scheme.ts","../src/theme/object-defaults.ts","../src/theme/build-theme-xml.ts","../src/theme/default-theme.ts","../src/theme/theme-descriptors.ts","../src/theme/theme-override.ts"],"sourcesContent":["/**\n * Default Office 2016+ theme colors.\n *\n * @module\n */\nimport type { ColorSchemeOptions } from \"./theme-options\";\n\n/** Office 2016+ default theme colors (hex without #). */\nexport const DEFAULT_COLORS: Record<Exclude<keyof ColorSchemeOptions, \"name\">, string> = {\n dark1: \"000000\",\n light1: \"FFFFFF\",\n dark2: \"44546A\",\n light2: \"E7E6E6\",\n accent1: \"4472C4\",\n accent2: \"ED7D31\",\n accent3: \"A5A5A5\",\n accent4: \"FFC000\",\n accent5: \"5B9BD5\",\n accent6: \"70AD47\",\n hyperlink: \"0563C1\",\n followedHyperlink: \"954F72\",\n};\n","/**\n * Color scheme (a:clrScheme / CT_ColorScheme) stringify + parse.\n *\n * Every slot accepts a hex string (emits a:srgbClr) or a structured\n * SystemColorOptions (emits a:sysClr verbatim). dk1/lt1 default to the\n * conventional windowText/window sysClr form; parse reads both forms back\n * losslessly, so a source's sysClr spelling survives round-trip.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext } from \"../descriptor\";\nimport { systemColorDesc } from \"../drawing\";\nimport type { SystemColorOptions } from \"../drawing\";\nimport { DEFAULT_COLORS } from \"./default-colors\";\nimport type { ColorSchemeOptions } from \"./theme-options\";\n\nexport type { SchemeColorValue } from \"./theme-options\";\n\n/** Color keys excluding the clrScheme/`@name` attribute. */\ntype ColorKey = Exclude<keyof ColorSchemeOptions, \"name\">;\n\n/** clrScheme child tag → ColorSchemeOptions key, in schema order. */\nconst COLOR_TAGS: ReadonlyArray<{ tag: string; key: ColorKey }> = [\n { tag: \"a:dk1\", key: \"dark1\" },\n { tag: \"a:lt1\", key: \"light1\" },\n { tag: \"a:dk2\", key: \"dark2\" },\n { tag: \"a:lt2\", key: \"light2\" },\n { tag: \"a:accent1\", key: \"accent1\" },\n { tag: \"a:accent2\", key: \"accent2\" },\n { tag: \"a:accent3\", key: \"accent3\" },\n { tag: \"a:accent4\", key: \"accent4\" },\n { tag: \"a:accent5\", key: \"accent5\" },\n { tag: \"a:accent6\", key: \"accent6\" },\n { tag: \"a:hlink\", key: \"hyperlink\" },\n { tag: \"a:folHlink\", key: \"followedHyperlink\" },\n];\n\n/** The conventional dk1/lt1 sysClr forms emitted when a slot is unset. */\nconst DEFAULT_SYS_CLR: Partial<Record<ColorKey, string>> = {\n dark1: \"windowText\",\n light1: \"window\",\n};\n\nfunction stringifyColorTag(\n tag: string,\n key: ColorKey,\n opts: ColorSchemeOptions | undefined,\n): string {\n const userValue = opts?.[key];\n if (userValue !== undefined) {\n const colorXml =\n typeof userValue === \"string\"\n ? `<a:srgbClr val=\"${userValue}\"/>`\n : (systemColorDesc.stringify(userValue, undefined as never) ?? \"\");\n return `<${tag}>${colorXml}</${tag}>`;\n }\n const defaultValue = DEFAULT_COLORS[key];\n const sysClr = DEFAULT_SYS_CLR[key];\n if (sysClr) {\n return `<${tag}><a:sysClr val=\"${sysClr}\" lastClr=\"${defaultValue}\"/></${tag}>`;\n }\n return `<${tag}><a:srgbClr val=\"${defaultValue}\"/></${tag}>`;\n}\n\n/** Serialize a:clrScheme. Undefined options emit the full default scheme. */\nexport function stringifyColorScheme(\n opts: ColorSchemeOptions | undefined,\n fallbackName: string,\n): string {\n const name = opts?.name ?? fallbackName;\n const tags = COLOR_TAGS.map(({ tag, key }) => stringifyColorTag(tag, key, opts)).join(\"\");\n return `<a:clrScheme name=\"${name}\">${tags}</a:clrScheme>`;\n}\n\n/** Parse a:clrScheme into the subset of colors explicitly present. */\nexport function parseColorScheme(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): ColorSchemeOptions | undefined {\n if (!el) return undefined;\n const result: Partial<ColorSchemeOptions> = {};\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n for (const { tag, key } of COLOR_TAGS) {\n const colorEl = findChild(el, tag);\n if (!colorEl) continue;\n const sysClr = findChild(colorEl, \"a:sysClr\");\n if (sysClr) {\n result[key] = systemColorDesc.parse(sysClr, ctx) as SystemColorOptions;\n continue;\n }\n const srgb = findChild(colorEl, \"a:srgbClr\");\n const val = srgb?.attributes?.[\"val\"];\n if (val !== undefined) result[key] = String(val);\n }\n return result;\n}\n","/**\n * Custom colors (a:custClr / CT_CustomColor) stringify + parse.\n *\n * Each entry is a named color choice; the list wrapper (a:custClrLst /\n * CT_CustomColorList) sits after extraClrSchemeLst in a theme.\n *\n * @module\n */\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext, WriteContext } from \"../descriptor\";\nimport { parseColorChoice, stringifyColorChoice } from \"../drawing\";\nimport type { SolidFillOptions } from \"../drawing\";\nimport type { CustomColorOptions } from \"./theme-options\";\n\n/** Serialize a:custClrLst. Returns \"\" when no custom colors set (optional element). */\nexport function stringifyCustomColors(\n opts: CustomColorOptions[] | undefined,\n ctx: WriteContext,\n): string {\n if (!opts || opts.length === 0) return \"\";\n const items = opts\n .map((c) => {\n const name = c.name ? ` name=\"${c.name}\"` : \"\";\n return `<a:custClr${name}>${stringifyColorChoice(c.color, ctx)}</a:custClr>`;\n })\n .join(\"\");\n return `<a:custClrLst>${items}</a:custClrLst>`;\n}\n\n/** Parse a:custClrLst. */\nexport function parseCustomColors(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): CustomColorOptions[] | undefined {\n if (!el) return undefined;\n const result: CustomColorOptions[] = [];\n for (const child of el.elements ?? []) {\n if (child.name !== \"a:custClr\") continue;\n const color: SolidFillOptions | undefined = parseColorChoice(child, ctx);\n if (!color) continue;\n const name = child.attributes?.[\"name\"];\n result.push(name !== undefined ? { name: String(name), color } : { color });\n }\n return result.length > 0 ? result : undefined;\n}\n","/**\n * Extra color scheme (a:extraClrScheme / CT_ExtraColorScheme) stringify + parse.\n *\n * Each entry pairs a color scheme with an optional color mapping. The list\n * wrapper (a:extraClrSchemeLst / CT_ColorSchemeList) holds zero or more entries.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext } from \"../descriptor\";\nimport { parseColorMapping, stringifyColorMapping } from \"./color-mapping\";\nimport { parseColorScheme, stringifyColorScheme } from \"./color-scheme\";\nimport type { ExtraColorSchemeOptions } from \"./theme-options\";\n\n/** Serialize a:extraClrSchemeLst. Returns an empty element when no schemes set. */\nexport function stringifyExtraColorSchemes(\n opts: ExtraColorSchemeOptions[] | undefined,\n fallbackName: string,\n): string {\n if (!opts || opts.length === 0) return \"<a:extraClrSchemeLst/>\";\n const items = opts\n .map((scheme) => {\n const clrScheme = stringifyColorScheme(\n scheme.colorScheme,\n scheme.colorScheme.name ?? fallbackName,\n );\n const clrMap = scheme.colorMapping ? stringifyColorMapping(scheme.colorMapping) : \"\";\n return `<a:extraClrScheme>${clrScheme}${clrMap}</a:extraClrScheme>`;\n })\n .join(\"\");\n return `<a:extraClrSchemeLst>${items}</a:extraClrSchemeLst>`;\n}\n\n/** Parse a:extraClrSchemeLst. */\nexport function parseExtraColorSchemes(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): ExtraColorSchemeOptions[] | undefined {\n if (!el) return undefined;\n const result: ExtraColorSchemeOptions[] = [];\n for (const child of el.elements ?? []) {\n if (child.name !== \"a:extraClrScheme\") continue;\n const colorScheme = parseColorScheme(findChild(child, \"a:clrScheme\"), ctx);\n if (!colorScheme) continue;\n const colorMapping = parseColorMapping(findChild(child, \"a:clrMap\"));\n result.push(colorMapping ? { colorScheme, colorMapping } : { colorScheme });\n }\n return result.length > 0 ? result : undefined;\n}\n","/**\n * Font scheme (a:fontScheme / CT_FontScheme) stringify + parse.\n *\n * CT_FontCollection order: latin → ea → cs → font[] (supplemental).\n *\n * @module\n */\nimport { escapeXml } from \"@office-open/xml\";\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type {\n FontCollectionOptions,\n FontSchemeOptions,\n SupplementalFontOptions,\n TextFontOptions,\n} from \"./theme-options\";\n\n// ── TextFont (a:latin / a:ea / a:cs) ──\n\nfunction stringifyTextFont(tag: string, opts: TextFontOptions | undefined): string {\n if (!opts) return \"\";\n const attrs = [`typeface=\"${escapeXml(opts.typeface)}\"`];\n if (opts.panose !== undefined) attrs.push(`panose=\"${escapeXml(opts.panose)}\"`);\n if (opts.pitchFamily !== undefined) attrs.push(`pitchFamily=\"${opts.pitchFamily}\"`);\n if (opts.charset !== undefined) attrs.push(`charset=\"${opts.charset}\"`);\n return `<${tag} ${attrs.join(\" \")}/>`;\n}\n\nfunction parseTextFont(el: XmlElement | undefined): TextFontOptions | undefined {\n if (!el?.attributes) return undefined;\n const typeface = el.attributes[\"typeface\"];\n if (typeface === undefined) return undefined;\n const result: TextFontOptions = { typeface: String(typeface) };\n if (el.attributes[\"panose\"] !== undefined) result.panose = String(el.attributes[\"panose\"]);\n if (el.attributes[\"pitchFamily\"] !== undefined)\n result.pitchFamily = Number(el.attributes[\"pitchFamily\"]);\n if (el.attributes[\"charset\"] !== undefined) result.charset = Number(el.attributes[\"charset\"]);\n return result;\n}\n\n// ── Font collection (a:majorFont / a:minorFont) ──\n\nfunction stringifyFontCollection(tag: string, opts: FontCollectionOptions | undefined): string {\n const latin = stringifyTextFont(\"a:latin\", opts?.latin);\n const eastAsian = stringifyTextFont(\"a:ea\", opts?.eastAsian);\n const complexScript = stringifyTextFont(\"a:cs\", opts?.complexScript);\n const supplemental = (opts?.supplementalFonts ?? [])\n .map((f) => `<a:font script=\"${escapeXml(f.script)}\" typeface=\"${escapeXml(f.typeface)}\"/>`)\n .join(\"\");\n return `<${tag}>${latin}${eastAsian}${complexScript}${supplemental}</${tag}>`;\n}\n\nfunction parseFontCollection(el: XmlElement | undefined): FontCollectionOptions | undefined {\n if (!el) return undefined;\n const result: FontCollectionOptions = {};\n const latin = parseTextFont(findChild(el, \"a:latin\"));\n if (latin) result.latin = latin;\n const eastAsian = parseTextFont(findChild(el, \"a:ea\"));\n if (eastAsian) result.eastAsian = eastAsian;\n const complexScript = parseTextFont(findChild(el, \"a:cs\"));\n if (complexScript) result.complexScript = complexScript;\n const supplementalFonts = (el.elements ?? [])\n .filter((c) => c.name === \"a:font\")\n .map((c): SupplementalFontOptions | undefined => {\n const script = c.attributes?.[\"script\"];\n const typeface = c.attributes?.[\"typeface\"];\n if (script === undefined || typeface === undefined) return undefined;\n return { script: String(script), typeface: String(typeface) };\n })\n .filter((v): v is SupplementalFontOptions => v !== undefined);\n if (supplementalFonts.length > 0) result.supplementalFonts = supplementalFonts;\n return Object.keys(result).length > 0 ? result : undefined;\n}\n\n// ── Fresh defaults (Office theme major/minor fonts) ──\n\nexport const DEFAULT_MAJOR_FONT: FontCollectionOptions = {\n latin: { typeface: \"Calibri Light\", panose: \"020F0302020204030204\" },\n eastAsian: { typeface: \"\" },\n complexScript: { typeface: \"\" },\n};\n\nexport const DEFAULT_MINOR_FONT: FontCollectionOptions = {\n latin: { typeface: \"Calibri\", panose: \"020F0502020204030204\" },\n eastAsian: { typeface: \"\" },\n complexScript: { typeface: \"\" },\n};\n\n// ── Font scheme (a:fontScheme) ──\n\n/** Serialize a:fontScheme. Undefined options emit the Office default scheme. */\nexport function stringifyFontScheme(\n opts: FontSchemeOptions | undefined,\n fallbackName: string,\n): string {\n // Merge defaults so the XSD-required latin/ea/cs slots are always present,\n // even when the caller only customizes one font (e.g. latin typeface).\n const majorFont = stringifyFontCollection(\n \"a:majorFont\",\n opts?.majorFont ? { ...DEFAULT_MAJOR_FONT, ...opts.majorFont } : DEFAULT_MAJOR_FONT,\n );\n const minorFont = stringifyFontCollection(\n \"a:minorFont\",\n opts?.minorFont ? { ...DEFAULT_MINOR_FONT, ...opts.minorFont } : DEFAULT_MINOR_FONT,\n );\n const name = opts?.name ?? fallbackName;\n return `<a:fontScheme name=\"${name}\">${majorFont}${minorFont}</a:fontScheme>`;\n}\n\n/** Parse a:fontScheme. Returns undefined only when neither major nor minor font is present. */\nexport function parseFontScheme(el: XmlElement | undefined): FontSchemeOptions | undefined {\n if (!el) return undefined;\n const result: FontSchemeOptions = {};\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n const majorFont = parseFontCollection(findChild(el, \"a:majorFont\"));\n if (majorFont) result.majorFont = majorFont;\n const minorFont = parseFontCollection(findChild(el, \"a:minorFont\"));\n if (minorFont) result.minorFont = minorFont;\n return Object.keys(result).length > 0 ? result : undefined;\n}\n","/**\n * Object defaults (a:objectDefaults / CT_ObjectStyleDefaults) stringify + parse.\n *\n * Each default definition (spDef/lnDef/txDef) holds shape properties, body\n * properties, list style, and an optional shape style. Reuses core descriptors\n * so defaults round-trip through the same machinery as shapes.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext, WriteContext } from \"../descriptor\";\nimport { bodyPropertiesDesc, shapePropertiesDesc, textListStyleDesc } from \"../drawing\";\nimport { parseShapeStyle, stringifyShapeStyle } from \"./style-matrix\";\nimport type { DefaultShapeDefinitionOptions, ObjectDefaultsOptions } from \"./theme-options\";\n\nfunction stringifyDefaultShapeDefinition(\n tag: string,\n opts: DefaultShapeDefinitionOptions,\n ctx: WriteContext,\n): string {\n // spPr/bodyPr/lstStyle are minOccurs=1 in CT_DefaultShapeDefinition — a\n // present-but-empty section must still emit its (empty) element. The spPr\n // and lstStyle descriptors return inner content only, so the wrapper tags\n // are added here.\n const spPr =\n opts.shapeProperties !== undefined\n ? `<a:spPr>${shapePropertiesDesc.stringify(opts.shapeProperties, ctx) ?? \"\"}</a:spPr>`\n : \"\";\n const bodyPr =\n opts.bodyProperties !== undefined\n ? bodyPropertiesDesc.stringify(opts.bodyProperties, ctx) || \"<a:bodyPr/>\"\n : \"\";\n const lstStyle =\n opts.listStyle !== undefined\n ? `<a:lstStyle>${textListStyleDesc.stringify(opts.listStyle, ctx) ?? \"\"}</a:lstStyle>`\n : \"\";\n const style = opts.shapeStyle ? stringifyShapeStyle(opts.shapeStyle, ctx) : \"\";\n return `<${tag}>${spPr}${bodyPr}${lstStyle}${style}</${tag}>`;\n}\n\nfunction parseDefaultShapeDefinition(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): DefaultShapeDefinitionOptions | undefined {\n if (!el) return undefined;\n const result: Partial<DefaultShapeDefinitionOptions> = {};\n // An empty element still marks the section present (the stringify leg\n // re-emits the empty marker), so `?? {}` — never drop on empty.\n const spPr = findChild(el, \"a:spPr\");\n if (spPr) result.shapeProperties = shapePropertiesDesc.parse(spPr, ctx) ?? {};\n const bodyPr = findChild(el, \"a:bodyPr\");\n if (bodyPr) result.bodyProperties = bodyPropertiesDesc.parse(bodyPr, ctx) ?? {};\n const lstStyle = findChild(el, \"a:lstStyle\");\n if (lstStyle) result.listStyle = textListStyleDesc.parse(lstStyle, ctx) ?? {};\n const style = findChild(el, \"a:style\");\n if (style) {\n const shapeStyle = parseShapeStyle(style, ctx);\n if (shapeStyle) result.shapeStyle = shapeStyle;\n }\n return Object.keys(result).length > 0 ? (result as DefaultShapeDefinitionOptions) : undefined;\n}\n\n/** Serialize a:objectDefaults. Returns an empty element when no defaults set. */\nexport function stringifyObjectDefaults(\n opts: ObjectDefaultsOptions | undefined,\n ctx: WriteContext,\n): string {\n if (!opts) return \"<a:objectDefaults/>\";\n const spDef = opts.shapeDefault\n ? stringifyDefaultShapeDefinition(\"a:spDef\", opts.shapeDefault, ctx)\n : \"\";\n const lnDef = opts.lineDefault\n ? stringifyDefaultShapeDefinition(\"a:lnDef\", opts.lineDefault, ctx)\n : \"\";\n const txDef = opts.textDefault\n ? stringifyDefaultShapeDefinition(\"a:txDef\", opts.textDefault, ctx)\n : \"\";\n if (!spDef && !lnDef && !txDef) return \"<a:objectDefaults/>\";\n return `<a:objectDefaults>${spDef}${lnDef}${txDef}</a:objectDefaults>`;\n}\n\n/** Parse a:objectDefaults. */\nexport function parseObjectDefaults(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): ObjectDefaultsOptions | undefined {\n if (!el) return undefined;\n const result: Partial<ObjectDefaultsOptions> = {};\n const shapeDefault = parseDefaultShapeDefinition(findChild(el, \"a:spDef\"), ctx);\n if (shapeDefault) result.shapeDefault = shapeDefault;\n const lineDefault = parseDefaultShapeDefinition(findChild(el, \"a:lnDef\"), ctx);\n if (lineDefault) result.lineDefault = lineDefault;\n const textDefault = parseDefaultShapeDefinition(findChild(el, \"a:txDef\"), ctx);\n if (textDefault) result.textDefault = textDefault;\n return Object.keys(result).length > 0 ? (result as ObjectDefaultsOptions) : undefined;\n}\n","/**\n * Build theme XML string — structured driver over the CT_BaseStyles parts.\n *\n * Fresh output stays byte-identical to Office by reusing a pre-extracted\n * default fmtScheme fragment (O(1) fast path) unless the caller supplies a\n * structured formatScheme / objectDefaults / extraColorSchemes, in which case\n * the relevant descriptor serializes them.\n *\n * @module\n */\nimport type { WriteContext } from \"../descriptor\";\nimport { stringifyColorScheme } from \"./color-scheme\";\nimport { stringifyCustomColors } from \"./custom-color\";\nimport { stringifyExtraColorSchemes } from \"./extra-color-scheme\";\nimport { stringifyFontScheme } from \"./font-scheme\";\nimport { stringifyObjectDefaults } from \"./object-defaults\";\nimport { stringifyFormatScheme } from \"./style-matrix\";\nimport type { ThemeOptions } from \"./theme-options\";\n\n// Default Office fmtScheme — byte-identical to fresh output, keeps the common\n// path O(1) without running fill/line/effect descriptors.\nconst DEFAULT_FORMAT_SCHEME_XML =\n '<a:fmtScheme name=\"Office\"><a:fillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>' +\n '<a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"110000\"/>' +\n '<a:satMod val=\"105000\"/><a:tint val=\"67000\"/></a:schemeClr></a:gs><a:gs pos=\"50000\"><a:schemeClr val=\"phClr\">' +\n '<a:lumMod val=\"105000\"/><a:satMod val=\"103000\"/><a:tint val=\"73000\"/></a:schemeClr></a:gs>' +\n '<a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"105000\"/><a:satMod val=\"109000\"/><a:tint val=\"81000\"/>' +\n '</a:schemeClr></a:gs></a:gsLst><a:lin ang=\"5400000\" scaled=\"0\"/></a:gradFill><a:gradFill rotWithShape=\"1\">' +\n '<a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"102000\"/><a:satMod val=\"103000\"/><a:tint val=\"94000\"/>' +\n '</a:schemeClr></a:gs><a:gs pos=\"50000\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"100000\"/><a:satMod val=\"110000\"/>' +\n '<a:shade val=\"100000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"99000\"/>' +\n '<a:satMod val=\"120000\"/><a:shade val=\"78000\"/></a:schemeClr></a:gs></a:gsLst><a:lin ang=\"5400000\" scaled=\"0\"/>' +\n '</a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w=\"6350\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill>' +\n '<a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/><a:miter lim=\"800000\"/></a:ln>' +\n '<a:ln w=\"12700\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>' +\n '<a:prstDash val=\"solid\"/><a:miter lim=\"800000\"/></a:ln><a:ln w=\"19050\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\">' +\n '<a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/><a:miter lim=\"800000\"/></a:ln>' +\n \"</a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/>\" +\n '</a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad=\"57150\" dist=\"19050\" dir=\"5400000\" algn=\"ctr\" ' +\n 'rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"63000\"/></a:srgbClr></a:outerShdw></a:effectLst>' +\n '</a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>' +\n '<a:solidFill><a:schemeClr val=\"phClr\"><a:tint val=\"95000\"/><a:satMod val=\"170000\"/></a:schemeClr></a:solidFill>' +\n '<a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"102000\"/>' +\n '<a:satMod val=\"150000\"/><a:tint val=\"93000\"/><a:shade val=\"98000\"/></a:schemeClr></a:gs><a:gs pos=\"50000\">' +\n '<a:schemeClr val=\"phClr\"><a:lumMod val=\"103000\"/><a:satMod val=\"130000\"/><a:tint val=\"98000\"/><a:shade val=\"90000\"/>' +\n '</a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:satMod val=\"120000\"/><a:shade val=\"63000\"/>' +\n '</a:schemeClr></a:gs></a:gsLst><a:lin ang=\"5400000\" scaled=\"0\"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme>';\n\nfunction requireCtx(ctx: WriteContext | undefined, field: string): WriteContext {\n if (!ctx) throw new Error(`buildThemeXml: ${field} requires a WriteContext`);\n return ctx;\n}\n\nexport function buildThemeXml(options?: ThemeOptions, ctx?: WriteContext): string {\n const opts = options ?? {};\n const name = opts.name ?? \"Office Theme\";\n\n const clrScheme = stringifyColorScheme(opts.colorScheme, name);\n const fontScheme = stringifyFontScheme(opts.fontScheme, name);\n const fmtScheme = opts.formatScheme\n ? stringifyFormatScheme(opts.formatScheme, requireCtx(ctx, \"formatScheme\"))\n : DEFAULT_FORMAT_SCHEME_XML;\n const objectDefaults = opts.objectDefaults\n ? stringifyObjectDefaults(opts.objectDefaults, requireCtx(ctx, \"objectDefaults\"))\n : \"<a:objectDefaults/>\";\n const extraClrSchemeLst = stringifyExtraColorSchemes(opts.extraColorSchemes, name);\n const custClrLst = opts.customColors\n ? stringifyCustomColors(opts.customColors, requireCtx(ctx, \"customColors\"))\n : \"\";\n\n return (\n `<a:theme xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" name=\"${name}\">` +\n `<a:themeElements>${clrScheme}${fontScheme}${fmtScheme}</a:themeElements>` +\n `${objectDefaults}${extraClrSchemeLst}${custClrLst}</a:theme>`\n );\n}\n","/**\n * Theme XML generation — pure function.\n *\n * Fresh output (no options) returns a pre-computed default; anything else\n * rebuilds via buildThemeXml (simple customizations don't need a WriteContext).\n *\n * @module\n */\nimport type { WriteContext } from \"../descriptor\";\nimport { buildThemeXml } from \"./build-theme-xml\";\nimport type { ThemeOptions } from \"./theme-options\";\n\n// Pre-computed default theme XML — zero allocation for the common case.\nconst DEFAULT_XML = buildThemeXml();\n\n/**\n * Generate theme XML string from options.\n * Returns the pre-computed default when no options are provided.\n */\nexport function createThemeXml(options?: ThemeOptions, ctx?: WriteContext): string {\n if (!options) return DEFAULT_XML;\n return buildThemeXml(options, ctx);\n}\n","/**\n * Theme descriptor — bidirectional mapping between ThemeOptions and theme XML.\n *\n * stringify delegates to buildThemeXml (structured driver). parse reads the full\n * CT_BaseStyles surface: colorScheme, fontScheme, formatScheme, objectDefaults,\n * and extraClrSchemeLst — so every part round-trips.\n *\n * @module\n */\n\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { CustomDescriptor, ReadContext, WriteContext } from \"../descriptor\";\nimport { buildThemeXml } from \"./build-theme-xml\";\nimport { parseColorScheme } from \"./color-scheme\";\nimport { parseCustomColors } from \"./custom-color\";\nimport { parseExtraColorSchemes } from \"./extra-color-scheme\";\nimport { parseFontScheme } from \"./font-scheme\";\nimport { parseObjectDefaults } from \"./object-defaults\";\nimport { parseFormatScheme } from \"./style-matrix\";\nimport type { ThemeOptions } from \"./theme-options\";\n\nexport const themeDesc: CustomDescriptor<ThemeOptions, WriteContext, ThemeOptions> = {\n kind: \"custom\",\n\n stringify(opts: ThemeOptions, ctx: WriteContext): string | undefined {\n return buildThemeXml(opts, ctx);\n },\n\n parse(el: XmlElement, ctx: ReadContext): ThemeOptions {\n const result: Partial<ThemeOptions> = {};\n\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n\n const themeElements = findChild(el, \"a:themeElements\");\n if (themeElements) {\n const colorScheme = parseColorScheme(findChild(themeElements, \"a:clrScheme\"), ctx);\n if (colorScheme) result.colorScheme = colorScheme;\n const fontScheme = parseFontScheme(findChild(themeElements, \"a:fontScheme\"));\n if (fontScheme) result.fontScheme = fontScheme;\n const formatScheme = parseFormatScheme(findChild(themeElements, \"a:fmtScheme\"), ctx);\n if (formatScheme) result.formatScheme = formatScheme;\n }\n\n const objectDefaults = parseObjectDefaults(findChild(el, \"a:objectDefaults\"), ctx);\n if (objectDefaults) result.objectDefaults = objectDefaults;\n\n const extraColorSchemes = parseExtraColorSchemes(findChild(el, \"a:extraClrSchemeLst\"), ctx);\n if (extraColorSchemes) result.extraColorSchemes = extraColorSchemes;\n\n const customColors = parseCustomColors(findChild(el, \"a:custClrLst\"), ctx);\n if (customColors) result.customColors = customColors;\n\n return result as ThemeOptions;\n },\n};\n","/**\n * Theme override and theme manager descriptors.\n *\n * a:themeOverride (CT_BaseStylesOverride) is the root of a themeOverride{n}.xml\n * part — an optional subset of the base styles that a slide/layout/master can\n * reference to deviate from its owning theme. a:themeManager (CT_EmptyElement)\n * is the root of the legacy themeManager part; it carries no content.\n *\n * @module\n */\n\nimport { findChild } from \"@office-open/xml\";\n\nimport type { CustomDescriptor, WriteContext } from \"../descriptor\";\nimport { parseColorScheme, stringifyColorScheme } from \"./color-scheme\";\nimport { parseFontScheme, stringifyFontScheme } from \"./font-scheme\";\nimport { parseFormatScheme, stringifyFormatScheme } from \"./style-matrix\";\nimport type { ThemeOverrideOptions } from \"./theme-options\";\n\nconst THEME_NS = 'xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"';\n\nexport const themeOverrideDesc: CustomDescriptor<\n ThemeOverrideOptions,\n WriteContext,\n ThemeOverrideOptions\n> = {\n kind: \"custom\",\n\n stringify(opts, ctx) {\n let content = \"\";\n if (opts.colorScheme) {\n content += stringifyColorScheme(opts.colorScheme, opts.colorScheme.name ?? \"Override\");\n }\n if (opts.fontScheme) {\n content += stringifyFontScheme(opts.fontScheme, opts.fontScheme.name ?? \"Override\");\n }\n if (opts.formatScheme) content += stringifyFormatScheme(opts.formatScheme, ctx);\n return `<a:themeOverride ${THEME_NS}>${content}</a:themeOverride>`;\n },\n\n parse(el, ctx) {\n const result: Partial<ThemeOverrideOptions> = {};\n const colorScheme = parseColorScheme(findChild(el, \"a:clrScheme\"), ctx);\n if (colorScheme) result.colorScheme = colorScheme;\n const fontScheme = parseFontScheme(findChild(el, \"a:fontScheme\"));\n if (fontScheme) result.fontScheme = fontScheme;\n const formatScheme = parseFormatScheme(findChild(el, \"a:fmtScheme\"), ctx);\n if (formatScheme) result.formatScheme = formatScheme;\n return result as ThemeOverrideOptions;\n },\n};\n\n/** Options for a themeManager part — CT_EmptyElement has no content or attributes. */\nexport type ThemeManagerOptions = Record<never, never>;\n\nexport const themeManagerDesc: CustomDescriptor<\n ThemeManagerOptions,\n WriteContext,\n ThemeManagerOptions\n> = {\n kind: \"custom\",\n\n stringify(_opts, _ctx) {\n return `<a:themeManager ${THEME_NS}/>`;\n },\n\n parse(_el, _ctx) {\n return {};\n },\n};\n"],"mappings":";;;;;;AAQA,MAAa,iBAA4E;CACvF,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,WAAW;CACX,mBAAmB;AACrB;;;;;;;;;;;;;;ACIA,MAAM,aAA4D;CAChE;EAAE,KAAK;EAAS,KAAK;CAAQ;CAC7B;EAAE,KAAK;EAAS,KAAK;CAAS;CAC9B;EAAE,KAAK;EAAS,KAAK;CAAQ;CAC7B;EAAE,KAAK;EAAS,KAAK;CAAS;CAC9B;EAAE,KAAK;EAAa,KAAK;CAAU;CACnC;EAAE,KAAK;EAAa,KAAK;CAAU;CACnC;EAAE,KAAK;EAAa,KAAK;CAAU;CACnC;EAAE,KAAK;EAAa,KAAK;CAAU;CACnC;EAAE,KAAK;EAAa,KAAK;CAAU;CACnC;EAAE,KAAK;EAAa,KAAK;CAAU;CACnC;EAAE,KAAK;EAAW,KAAK;CAAY;CACnC;EAAE,KAAK;EAAc,KAAK;CAAoB;AAChD;;AAGA,MAAM,kBAAqD;CACzD,OAAO;CACP,QAAQ;AACV;AAEA,SAAS,kBACP,KACA,KACA,MACQ;CACR,MAAM,YAAY,OAAO;CACzB,IAAI,cAAc,KAAA,GAKhB,OAAO,IAAI,IAAI,GAHb,OAAO,cAAc,WACjB,mBAAmB,UA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B,OAAO,oBAAoB;EAElD,MAAM,eAAe,kBAAkB,UAAU,IAAI,cAAc,GAAG,GAAG;EACzE,IAAI,cAAc,OAAO,eAAe;EAExC,OAAO;CACT;AACF;;;;;;;;;;;;;ACtCA,MAAM,WAAW;AAEjB,MAAa,oBAIT;CACF,MAAM;CAEN,UAAU,MAAM,KAAK;EACnB,IAAI,UAAU;EACd,IAAI,KAAK,aACP,WAAW,qBAAqB,KAAK,aAAa,KAAK,YAAY,QAAQ,UAAU;EAEvF,IAAI,KAAK,YACP,WAAW,oBAAoB,KAAK,YAAY,KAAK,WAAW,QAAQ,UAAU;EAEpF,IAAI,KAAK,cAAc,WAAW,sBAAsB,KAAK,cAAc,GAAG;EAC9E,OAAO,oBAAoB,SAAS,GAAG,QAAQ;CACjD;CAEA,MAAM,IAAI,KAAK;EACb,MAAM,SAAwC,CAAC;EAC/C,MAAM,cAAc,iBAAiB,UAAU,IAAI,aAAa,GAAG,GAAG;EACtE,IAAI,aAAa,OAAO,cAAc;EACtC,MAAM,aAAa,gBAAgB,UAAU,IAAI,cAAc,CAAC;EAChE,IAAI,YAAY,OAAO,aAAa;EACpC,MAAM,eAAe,kBAAkB,UAAU,IAAI,aAAa,GAAG,GAAG;EACxE,IAAI,cAAc,OAAO,eAAe;EACxC,OAAO;CACT;AACF;AAKA,MAAa,mBAIT;CACF,MAAM;CAEN,UAAU,OAAO,MAAM;EACrB,OAAO,mBAAmB,SAAS;CACrC;CAEA,MAAM,KAAK,MAAM;EACf,OAAO,CAAC;CACV;AACF"}
1
+ {"version":3,"file":"theme-Dx0Db9bX.mjs","names":[],"sources":["../src/theme/default-colors.ts","../src/theme/color-scheme.ts","../src/theme/custom-color.ts","../src/theme/extra-color-scheme.ts","../src/theme/font-scheme.ts","../src/theme/object-defaults.ts","../src/theme/build-theme-xml.ts","../src/theme/default-theme.ts","../src/theme/theme-descriptors.ts","../src/theme/theme-override.ts"],"sourcesContent":["/**\n * Default Office 2016+ theme colors.\n *\n * @module\n */\nimport type { ColorSchemeOptions } from \"./theme-options\";\n\n/** Office 2016+ default theme colors (hex without #). */\nexport const DEFAULT_COLORS: Record<Exclude<keyof ColorSchemeOptions, \"name\">, string> = {\n dark1: \"000000\",\n light1: \"FFFFFF\",\n dark2: \"44546A\",\n light2: \"E7E6E6\",\n accent1: \"4472C4\",\n accent2: \"ED7D31\",\n accent3: \"A5A5A5\",\n accent4: \"FFC000\",\n accent5: \"5B9BD5\",\n accent6: \"70AD47\",\n hyperlink: \"0563C1\",\n followedHyperlink: \"954F72\",\n};\n","/**\n * Color scheme (a:clrScheme / CT_ColorScheme) stringify + parse.\n *\n * Every slot accepts a hex string (emits a:srgbClr) or a structured\n * SystemColorOptions (emits a:sysClr verbatim). dk1/lt1 default to the\n * conventional windowText/window sysClr form; parse reads both forms back\n * losslessly, so a source's sysClr spelling survives round-trip.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext } from \"../descriptor\";\nimport { systemColorDesc } from \"../drawing\";\nimport type { SystemColorOptions } from \"../drawing\";\nimport { DEFAULT_COLORS } from \"./default-colors\";\nimport type { ColorSchemeOptions } from \"./theme-options\";\n\nexport type { SchemeColorValue } from \"./theme-options\";\n\n/** Color keys excluding the clrScheme/`@name` attribute. */\ntype ColorKey = Exclude<keyof ColorSchemeOptions, \"name\">;\n\n/** clrScheme child tag → ColorSchemeOptions key, in schema order. */\nconst COLOR_TAGS: ReadonlyArray<{ tag: string; key: ColorKey }> = [\n { tag: \"a:dk1\", key: \"dark1\" },\n { tag: \"a:lt1\", key: \"light1\" },\n { tag: \"a:dk2\", key: \"dark2\" },\n { tag: \"a:lt2\", key: \"light2\" },\n { tag: \"a:accent1\", key: \"accent1\" },\n { tag: \"a:accent2\", key: \"accent2\" },\n { tag: \"a:accent3\", key: \"accent3\" },\n { tag: \"a:accent4\", key: \"accent4\" },\n { tag: \"a:accent5\", key: \"accent5\" },\n { tag: \"a:accent6\", key: \"accent6\" },\n { tag: \"a:hlink\", key: \"hyperlink\" },\n { tag: \"a:folHlink\", key: \"followedHyperlink\" },\n];\n\n/** The conventional dk1/lt1 sysClr forms emitted when a slot is unset. */\nconst DEFAULT_SYS_CLR: Partial<Record<ColorKey, string>> = {\n dark1: \"windowText\",\n light1: \"window\",\n};\n\nfunction stringifyColorTag(\n tag: string,\n key: ColorKey,\n opts: ColorSchemeOptions | undefined,\n): string {\n const userValue = opts?.[key];\n if (userValue !== undefined) {\n const colorXml =\n typeof userValue === \"string\"\n ? `<a:srgbClr val=\"${userValue}\"/>`\n : (systemColorDesc.stringify(userValue, undefined as never) ?? \"\");\n return `<${tag}>${colorXml}</${tag}>`;\n }\n const defaultValue = DEFAULT_COLORS[key];\n const sysClr = DEFAULT_SYS_CLR[key];\n if (sysClr) {\n return `<${tag}><a:sysClr val=\"${sysClr}\" lastClr=\"${defaultValue}\"/></${tag}>`;\n }\n return `<${tag}><a:srgbClr val=\"${defaultValue}\"/></${tag}>`;\n}\n\n/** Serialize a:clrScheme. Undefined options emit the full default scheme. */\nexport function stringifyColorScheme(\n opts: ColorSchemeOptions | undefined,\n fallbackName: string,\n): string {\n const name = opts?.name ?? fallbackName;\n const tags = COLOR_TAGS.map(({ tag, key }) => stringifyColorTag(tag, key, opts)).join(\"\");\n return `<a:clrScheme name=\"${name}\">${tags}</a:clrScheme>`;\n}\n\n/** Parse a:clrScheme into the subset of colors explicitly present. */\nexport function parseColorScheme(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): ColorSchemeOptions | undefined {\n if (!el) return undefined;\n const result: Partial<ColorSchemeOptions> = {};\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n for (const { tag, key } of COLOR_TAGS) {\n const colorEl = findChild(el, tag);\n if (!colorEl) continue;\n const sysClr = findChild(colorEl, \"a:sysClr\");\n if (sysClr) {\n result[key] = systemColorDesc.parse(sysClr, ctx) as SystemColorOptions;\n continue;\n }\n const srgb = findChild(colorEl, \"a:srgbClr\");\n const val = srgb?.attributes?.[\"val\"];\n if (val !== undefined) result[key] = String(val);\n }\n return result;\n}\n","/**\n * Custom colors (a:custClr / CT_CustomColor) stringify + parse.\n *\n * Each entry is a named color choice; the list wrapper (a:custClrLst /\n * CT_CustomColorList) sits after extraClrSchemeLst in a theme.\n *\n * @module\n */\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext, WriteContext } from \"../descriptor\";\nimport { parseColorChoice, stringifyColorChoice } from \"../drawing\";\nimport type { SolidFillOptions } from \"../drawing\";\nimport type { CustomColorOptions } from \"./theme-options\";\n\n/** Serialize a:custClrLst. Returns \"\" when no custom colors set (optional element). */\nexport function stringifyCustomColors(\n opts: CustomColorOptions[] | undefined,\n ctx: WriteContext,\n): string {\n if (!opts || opts.length === 0) return \"\";\n const items = opts\n .map((c) => {\n const name = c.name ? ` name=\"${c.name}\"` : \"\";\n return `<a:custClr${name}>${stringifyColorChoice(c.color, ctx)}</a:custClr>`;\n })\n .join(\"\");\n return `<a:custClrLst>${items}</a:custClrLst>`;\n}\n\n/** Parse a:custClrLst. */\nexport function parseCustomColors(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): CustomColorOptions[] | undefined {\n if (!el) return undefined;\n const result: CustomColorOptions[] = [];\n for (const child of el.elements ?? []) {\n if (child.name !== \"a:custClr\") continue;\n const color: SolidFillOptions | undefined = parseColorChoice(child, ctx);\n if (!color) continue;\n const name = child.attributes?.[\"name\"];\n result.push(name !== undefined ? { name: String(name), color } : { color });\n }\n return result.length > 0 ? result : undefined;\n}\n","/**\n * Extra color scheme (a:extraClrScheme / CT_ExtraColorScheme) stringify + parse.\n *\n * Each entry pairs a color scheme with an optional color mapping. The list\n * wrapper (a:extraClrSchemeLst / CT_ColorSchemeList) holds zero or more entries.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext } from \"../descriptor\";\nimport { parseColorMapping, stringifyColorMapping } from \"./color-mapping\";\nimport { parseColorScheme, stringifyColorScheme } from \"./color-scheme\";\nimport type { ExtraColorSchemeOptions } from \"./theme-options\";\n\n/** Serialize a:extraClrSchemeLst. Returns an empty element when no schemes set. */\nexport function stringifyExtraColorSchemes(\n opts: ExtraColorSchemeOptions[] | undefined,\n fallbackName: string,\n): string {\n if (!opts || opts.length === 0) return \"<a:extraClrSchemeLst/>\";\n const items = opts\n .map((scheme) => {\n const clrScheme = stringifyColorScheme(\n scheme.colorScheme,\n scheme.colorScheme.name ?? fallbackName,\n );\n const clrMap = scheme.colorMapping ? stringifyColorMapping(scheme.colorMapping) : \"\";\n return `<a:extraClrScheme>${clrScheme}${clrMap}</a:extraClrScheme>`;\n })\n .join(\"\");\n return `<a:extraClrSchemeLst>${items}</a:extraClrSchemeLst>`;\n}\n\n/** Parse a:extraClrSchemeLst. */\nexport function parseExtraColorSchemes(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): ExtraColorSchemeOptions[] | undefined {\n if (!el) return undefined;\n const result: ExtraColorSchemeOptions[] = [];\n for (const child of el.elements ?? []) {\n if (child.name !== \"a:extraClrScheme\") continue;\n const colorScheme = parseColorScheme(findChild(child, \"a:clrScheme\"), ctx);\n if (!colorScheme) continue;\n const colorMapping = parseColorMapping(findChild(child, \"a:clrMap\"));\n result.push(colorMapping ? { colorScheme, colorMapping } : { colorScheme });\n }\n return result.length > 0 ? result : undefined;\n}\n","/**\n * Font scheme (a:fontScheme / CT_FontScheme) stringify + parse.\n *\n * CT_FontCollection order: latin → ea → cs → font[] (supplemental).\n *\n * @module\n */\nimport { escapeXml } from \"@office-open/xml\";\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type {\n FontCollectionOptions,\n FontSchemeOptions,\n SupplementalFontOptions,\n TextFontOptions,\n} from \"./theme-options\";\n\n// ── TextFont (a:latin / a:ea / a:cs) ──\n\nfunction stringifyTextFont(tag: string, opts: TextFontOptions | undefined): string {\n if (!opts) return \"\";\n const attrs = [`typeface=\"${escapeXml(opts.typeface)}\"`];\n if (opts.panose !== undefined) attrs.push(`panose=\"${escapeXml(opts.panose)}\"`);\n if (opts.pitchFamily !== undefined) attrs.push(`pitchFamily=\"${opts.pitchFamily}\"`);\n if (opts.charset !== undefined) attrs.push(`charset=\"${opts.charset}\"`);\n return `<${tag} ${attrs.join(\" \")}/>`;\n}\n\nfunction parseTextFont(el: XmlElement | undefined): TextFontOptions | undefined {\n if (!el?.attributes) return undefined;\n const typeface = el.attributes[\"typeface\"];\n if (typeface === undefined) return undefined;\n const result: TextFontOptions = { typeface: String(typeface) };\n if (el.attributes[\"panose\"] !== undefined) result.panose = String(el.attributes[\"panose\"]);\n if (el.attributes[\"pitchFamily\"] !== undefined)\n result.pitchFamily = Number(el.attributes[\"pitchFamily\"]);\n if (el.attributes[\"charset\"] !== undefined) result.charset = Number(el.attributes[\"charset\"]);\n return result;\n}\n\n// ── Font collection (a:majorFont / a:minorFont) ──\n\nfunction stringifyFontCollection(tag: string, opts: FontCollectionOptions | undefined): string {\n const latin = stringifyTextFont(\"a:latin\", opts?.latin);\n const eastAsian = stringifyTextFont(\"a:ea\", opts?.eastAsian);\n const complexScript = stringifyTextFont(\"a:cs\", opts?.complexScript);\n const supplemental = (opts?.supplementalFonts ?? [])\n .map((f) => `<a:font script=\"${escapeXml(f.script)}\" typeface=\"${escapeXml(f.typeface)}\"/>`)\n .join(\"\");\n return `<${tag}>${latin}${eastAsian}${complexScript}${supplemental}</${tag}>`;\n}\n\nfunction parseFontCollection(el: XmlElement | undefined): FontCollectionOptions | undefined {\n if (!el) return undefined;\n const result: FontCollectionOptions = {};\n const latin = parseTextFont(findChild(el, \"a:latin\"));\n if (latin) result.latin = latin;\n const eastAsian = parseTextFont(findChild(el, \"a:ea\"));\n if (eastAsian) result.eastAsian = eastAsian;\n const complexScript = parseTextFont(findChild(el, \"a:cs\"));\n if (complexScript) result.complexScript = complexScript;\n const supplementalFonts = (el.elements ?? [])\n .filter((c) => c.name === \"a:font\")\n .map((c): SupplementalFontOptions | undefined => {\n const script = c.attributes?.[\"script\"];\n const typeface = c.attributes?.[\"typeface\"];\n if (script === undefined || typeface === undefined) return undefined;\n return { script: String(script), typeface: String(typeface) };\n })\n .filter((v): v is SupplementalFontOptions => v !== undefined);\n if (supplementalFonts.length > 0) result.supplementalFonts = supplementalFonts;\n return Object.keys(result).length > 0 ? result : undefined;\n}\n\n// ── Fresh defaults (Office theme major/minor fonts) ──\n\nexport const DEFAULT_MAJOR_FONT: FontCollectionOptions = {\n latin: { typeface: \"Calibri Light\", panose: \"020F0302020204030204\" },\n eastAsian: { typeface: \"\" },\n complexScript: { typeface: \"\" },\n};\n\nexport const DEFAULT_MINOR_FONT: FontCollectionOptions = {\n latin: { typeface: \"Calibri\", panose: \"020F0502020204030204\" },\n eastAsian: { typeface: \"\" },\n complexScript: { typeface: \"\" },\n};\n\n// ── Font scheme (a:fontScheme) ──\n\n/** Serialize a:fontScheme. Undefined options emit the Office default scheme. */\nexport function stringifyFontScheme(\n opts: FontSchemeOptions | undefined,\n fallbackName: string,\n): string {\n // Merge defaults so the XSD-required latin/ea/cs slots are always present,\n // even when the caller only customizes one font (e.g. latin typeface).\n const majorFont = stringifyFontCollection(\n \"a:majorFont\",\n opts?.majorFont ? { ...DEFAULT_MAJOR_FONT, ...opts.majorFont } : DEFAULT_MAJOR_FONT,\n );\n const minorFont = stringifyFontCollection(\n \"a:minorFont\",\n opts?.minorFont ? { ...DEFAULT_MINOR_FONT, ...opts.minorFont } : DEFAULT_MINOR_FONT,\n );\n const name = opts?.name ?? fallbackName;\n return `<a:fontScheme name=\"${name}\">${majorFont}${minorFont}</a:fontScheme>`;\n}\n\n/** Parse a:fontScheme. Returns undefined only when neither major nor minor font is present. */\nexport function parseFontScheme(el: XmlElement | undefined): FontSchemeOptions | undefined {\n if (!el) return undefined;\n const result: FontSchemeOptions = {};\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n const majorFont = parseFontCollection(findChild(el, \"a:majorFont\"));\n if (majorFont) result.majorFont = majorFont;\n const minorFont = parseFontCollection(findChild(el, \"a:minorFont\"));\n if (minorFont) result.minorFont = minorFont;\n return Object.keys(result).length > 0 ? result : undefined;\n}\n","/**\n * Object defaults (a:objectDefaults / CT_ObjectStyleDefaults) stringify + parse.\n *\n * Each default definition (spDef/lnDef/txDef) holds shape properties, body\n * properties, list style, and an optional shape style. Reuses core descriptors\n * so defaults round-trip through the same machinery as shapes.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext, WriteContext } from \"../descriptor\";\nimport { bodyPropertiesDesc, shapePropertiesDesc, textListStyleDesc } from \"../drawing\";\nimport { parseShapeStyle, stringifyShapeStyle } from \"./style-matrix\";\nimport type { DefaultShapeDefinitionOptions, ObjectDefaultsOptions } from \"./theme-options\";\n\nfunction stringifyDefaultShapeDefinition(\n tag: string,\n opts: DefaultShapeDefinitionOptions,\n ctx: WriteContext,\n): string {\n // spPr/bodyPr/lstStyle are minOccurs=1 in CT_DefaultShapeDefinition — a\n // present-but-empty section must still emit its (empty) element. The spPr\n // and lstStyle descriptors return inner content only, so the wrapper tags\n // are added here.\n const spPr =\n opts.shapeProperties !== undefined\n ? `<a:spPr>${shapePropertiesDesc.stringify(opts.shapeProperties, ctx) ?? \"\"}</a:spPr>`\n : \"\";\n const bodyPr =\n opts.bodyProperties !== undefined\n ? bodyPropertiesDesc.stringify(opts.bodyProperties, ctx) || \"<a:bodyPr/>\"\n : \"\";\n const lstStyle =\n opts.listStyle !== undefined\n ? `<a:lstStyle>${textListStyleDesc.stringify(opts.listStyle, ctx) ?? \"\"}</a:lstStyle>`\n : \"\";\n const style = opts.shapeStyle ? stringifyShapeStyle(opts.shapeStyle, ctx) : \"\";\n return `<${tag}>${spPr}${bodyPr}${lstStyle}${style}</${tag}>`;\n}\n\nfunction parseDefaultShapeDefinition(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): DefaultShapeDefinitionOptions | undefined {\n if (!el) return undefined;\n const result: Partial<DefaultShapeDefinitionOptions> = {};\n // An empty element still marks the section present (the stringify leg\n // re-emits the empty marker), so `?? {}` — never drop on empty.\n const spPr = findChild(el, \"a:spPr\");\n if (spPr) result.shapeProperties = shapePropertiesDesc.parse(spPr, ctx) ?? {};\n const bodyPr = findChild(el, \"a:bodyPr\");\n if (bodyPr) result.bodyProperties = bodyPropertiesDesc.parse(bodyPr, ctx) ?? {};\n const lstStyle = findChild(el, \"a:lstStyle\");\n if (lstStyle) result.listStyle = textListStyleDesc.parse(lstStyle, ctx) ?? {};\n const style = findChild(el, \"a:style\");\n if (style) {\n const shapeStyle = parseShapeStyle(style, ctx);\n if (shapeStyle) result.shapeStyle = shapeStyle;\n }\n return Object.keys(result).length > 0 ? (result as DefaultShapeDefinitionOptions) : undefined;\n}\n\n/** Serialize a:objectDefaults. Returns an empty element when no defaults set. */\nexport function stringifyObjectDefaults(\n opts: ObjectDefaultsOptions | undefined,\n ctx: WriteContext,\n): string {\n if (!opts) return \"<a:objectDefaults/>\";\n const spDef = opts.shapeDefault\n ? stringifyDefaultShapeDefinition(\"a:spDef\", opts.shapeDefault, ctx)\n : \"\";\n const lnDef = opts.lineDefault\n ? stringifyDefaultShapeDefinition(\"a:lnDef\", opts.lineDefault, ctx)\n : \"\";\n const txDef = opts.textDefault\n ? stringifyDefaultShapeDefinition(\"a:txDef\", opts.textDefault, ctx)\n : \"\";\n if (!spDef && !lnDef && !txDef) return \"<a:objectDefaults/>\";\n return `<a:objectDefaults>${spDef}${lnDef}${txDef}</a:objectDefaults>`;\n}\n\n/** Parse a:objectDefaults. */\nexport function parseObjectDefaults(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): ObjectDefaultsOptions | undefined {\n if (!el) return undefined;\n const result: Partial<ObjectDefaultsOptions> = {};\n const shapeDefault = parseDefaultShapeDefinition(findChild(el, \"a:spDef\"), ctx);\n if (shapeDefault) result.shapeDefault = shapeDefault;\n const lineDefault = parseDefaultShapeDefinition(findChild(el, \"a:lnDef\"), ctx);\n if (lineDefault) result.lineDefault = lineDefault;\n const textDefault = parseDefaultShapeDefinition(findChild(el, \"a:txDef\"), ctx);\n if (textDefault) result.textDefault = textDefault;\n return Object.keys(result).length > 0 ? (result as ObjectDefaultsOptions) : undefined;\n}\n","/**\n * Build theme XML string — structured driver over the CT_BaseStyles parts.\n *\n * Fresh output stays byte-identical to Office by reusing a pre-extracted\n * default fmtScheme fragment (O(1) fast path) unless the caller supplies a\n * structured formatScheme / objectDefaults / extraColorSchemes, in which case\n * the relevant descriptor serializes them.\n *\n * @module\n */\nimport type { WriteContext } from \"../descriptor\";\nimport { stringifyColorScheme } from \"./color-scheme\";\nimport { stringifyCustomColors } from \"./custom-color\";\nimport { stringifyExtraColorSchemes } from \"./extra-color-scheme\";\nimport { stringifyFontScheme } from \"./font-scheme\";\nimport { stringifyObjectDefaults } from \"./object-defaults\";\nimport { stringifyFormatScheme } from \"./style-matrix\";\nimport type { ThemeOptions } from \"./theme-options\";\n\n// Default Office fmtScheme — byte-identical to fresh output, keeps the common\n// path O(1) without running fill/line/effect descriptors.\nconst DEFAULT_FORMAT_SCHEME_XML =\n '<a:fmtScheme name=\"Office\"><a:fillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>' +\n '<a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"110000\"/>' +\n '<a:satMod val=\"105000\"/><a:tint val=\"67000\"/></a:schemeClr></a:gs><a:gs pos=\"50000\"><a:schemeClr val=\"phClr\">' +\n '<a:lumMod val=\"105000\"/><a:satMod val=\"103000\"/><a:tint val=\"73000\"/></a:schemeClr></a:gs>' +\n '<a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"105000\"/><a:satMod val=\"109000\"/><a:tint val=\"81000\"/>' +\n '</a:schemeClr></a:gs></a:gsLst><a:lin ang=\"5400000\" scaled=\"0\"/></a:gradFill><a:gradFill rotWithShape=\"1\">' +\n '<a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"102000\"/><a:satMod val=\"103000\"/><a:tint val=\"94000\"/>' +\n '</a:schemeClr></a:gs><a:gs pos=\"50000\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"100000\"/><a:satMod val=\"110000\"/>' +\n '<a:shade val=\"100000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"99000\"/>' +\n '<a:satMod val=\"120000\"/><a:shade val=\"78000\"/></a:schemeClr></a:gs></a:gsLst><a:lin ang=\"5400000\" scaled=\"0\"/>' +\n '</a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w=\"6350\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill>' +\n '<a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/><a:miter lim=\"800000\"/></a:ln>' +\n '<a:ln w=\"12700\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>' +\n '<a:prstDash val=\"solid\"/><a:miter lim=\"800000\"/></a:ln><a:ln w=\"19050\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\">' +\n '<a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/><a:miter lim=\"800000\"/></a:ln>' +\n \"</a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/>\" +\n '</a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad=\"57150\" dist=\"19050\" dir=\"5400000\" algn=\"ctr\" ' +\n 'rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"63000\"/></a:srgbClr></a:outerShdw></a:effectLst>' +\n '</a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>' +\n '<a:solidFill><a:schemeClr val=\"phClr\"><a:tint val=\"95000\"/><a:satMod val=\"170000\"/></a:schemeClr></a:solidFill>' +\n '<a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"102000\"/>' +\n '<a:satMod val=\"150000\"/><a:tint val=\"93000\"/><a:shade val=\"98000\"/></a:schemeClr></a:gs><a:gs pos=\"50000\">' +\n '<a:schemeClr val=\"phClr\"><a:lumMod val=\"103000\"/><a:satMod val=\"130000\"/><a:tint val=\"98000\"/><a:shade val=\"90000\"/>' +\n '</a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:satMod val=\"120000\"/><a:shade val=\"63000\"/>' +\n '</a:schemeClr></a:gs></a:gsLst><a:lin ang=\"5400000\" scaled=\"0\"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme>';\n\nfunction requireCtx(ctx: WriteContext | undefined, field: string): WriteContext {\n if (!ctx) throw new Error(`buildThemeXml: ${field} requires a WriteContext`);\n return ctx;\n}\n\nexport function buildThemeXml(options?: ThemeOptions, ctx?: WriteContext): string {\n const opts = options ?? {};\n const name = opts.name ?? \"Office Theme\";\n\n const clrScheme = stringifyColorScheme(opts.colorScheme, name);\n const fontScheme = stringifyFontScheme(opts.fontScheme, name);\n const fmtScheme = opts.formatScheme\n ? stringifyFormatScheme(opts.formatScheme, requireCtx(ctx, \"formatScheme\"))\n : DEFAULT_FORMAT_SCHEME_XML;\n const objectDefaults = opts.objectDefaults\n ? stringifyObjectDefaults(opts.objectDefaults, requireCtx(ctx, \"objectDefaults\"))\n : \"<a:objectDefaults/>\";\n const extraClrSchemeLst = stringifyExtraColorSchemes(opts.extraColorSchemes, name);\n const custClrLst = opts.customColors\n ? stringifyCustomColors(opts.customColors, requireCtx(ctx, \"customColors\"))\n : \"\";\n\n return (\n `<a:theme xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" name=\"${name}\">` +\n `<a:themeElements>${clrScheme}${fontScheme}${fmtScheme}</a:themeElements>` +\n `${objectDefaults}${extraClrSchemeLst}${custClrLst}</a:theme>`\n );\n}\n","/**\n * Theme XML generation — pure function.\n *\n * Fresh output (no options) returns a pre-computed default; anything else\n * rebuilds via buildThemeXml (simple customizations don't need a WriteContext).\n *\n * @module\n */\nimport type { WriteContext } from \"../descriptor\";\nimport { buildThemeXml } from \"./build-theme-xml\";\nimport type { ThemeOptions } from \"./theme-options\";\n\n// Pre-computed default theme XML — zero allocation for the common case.\nconst DEFAULT_XML = buildThemeXml();\n\n/**\n * Generate theme XML string from options.\n * Returns the pre-computed default when no options are provided.\n */\nexport function createThemeXml(options?: ThemeOptions, ctx?: WriteContext): string {\n if (!options) return DEFAULT_XML;\n return buildThemeXml(options, ctx);\n}\n","/**\n * Theme descriptor — bidirectional mapping between ThemeOptions and theme XML.\n *\n * stringify delegates to buildThemeXml (structured driver). parse reads the full\n * CT_BaseStyles surface: colorScheme, fontScheme, formatScheme, objectDefaults,\n * and extraClrSchemeLst — so every part round-trips.\n *\n * @module\n */\n\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { CustomDescriptor, ReadContext, WriteContext } from \"../descriptor\";\nimport { buildThemeXml } from \"./build-theme-xml\";\nimport { parseColorScheme } from \"./color-scheme\";\nimport { parseCustomColors } from \"./custom-color\";\nimport { parseExtraColorSchemes } from \"./extra-color-scheme\";\nimport { parseFontScheme } from \"./font-scheme\";\nimport { parseObjectDefaults } from \"./object-defaults\";\nimport { parseFormatScheme } from \"./style-matrix\";\nimport type { ThemeOptions } from \"./theme-options\";\n\nexport const themeDesc: CustomDescriptor<ThemeOptions, WriteContext, ThemeOptions> = {\n kind: \"custom\",\n\n stringify(opts: ThemeOptions, ctx: WriteContext): string | undefined {\n return buildThemeXml(opts, ctx);\n },\n\n parse(el: XmlElement, ctx: ReadContext): ThemeOptions {\n const result: Partial<ThemeOptions> = {};\n\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n\n const themeElements = findChild(el, \"a:themeElements\");\n if (themeElements) {\n const colorScheme = parseColorScheme(findChild(themeElements, \"a:clrScheme\"), ctx);\n if (colorScheme) result.colorScheme = colorScheme;\n const fontScheme = parseFontScheme(findChild(themeElements, \"a:fontScheme\"));\n if (fontScheme) result.fontScheme = fontScheme;\n const formatScheme = parseFormatScheme(findChild(themeElements, \"a:fmtScheme\"), ctx);\n if (formatScheme) result.formatScheme = formatScheme;\n }\n\n const objectDefaults = parseObjectDefaults(findChild(el, \"a:objectDefaults\"), ctx);\n if (objectDefaults) result.objectDefaults = objectDefaults;\n\n const extraColorSchemes = parseExtraColorSchemes(findChild(el, \"a:extraClrSchemeLst\"), ctx);\n if (extraColorSchemes) result.extraColorSchemes = extraColorSchemes;\n\n const customColors = parseCustomColors(findChild(el, \"a:custClrLst\"), ctx);\n if (customColors) result.customColors = customColors;\n\n return result as ThemeOptions;\n },\n};\n","/**\n * Theme override and theme manager descriptors.\n *\n * a:themeOverride (CT_BaseStylesOverride) is the root of a themeOverride{n}.xml\n * part — an optional subset of the base styles that a slide/layout/master can\n * reference to deviate from its owning theme. a:themeManager (CT_EmptyElement)\n * is the root of the legacy themeManager part; it carries no content.\n *\n * @module\n */\n\nimport { findChild } from \"@office-open/xml\";\n\nimport type { CustomDescriptor, WriteContext } from \"../descriptor\";\nimport { parseColorScheme, stringifyColorScheme } from \"./color-scheme\";\nimport { parseFontScheme, stringifyFontScheme } from \"./font-scheme\";\nimport { parseFormatScheme, stringifyFormatScheme } from \"./style-matrix\";\nimport type { ThemeOverrideOptions } from \"./theme-options\";\n\nconst THEME_NS = 'xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"';\n\nexport const themeOverrideDesc: CustomDescriptor<\n ThemeOverrideOptions,\n WriteContext,\n ThemeOverrideOptions\n> = {\n kind: \"custom\",\n\n stringify(opts, ctx) {\n let content = \"\";\n if (opts.colorScheme) {\n content += stringifyColorScheme(opts.colorScheme, opts.colorScheme.name ?? \"Override\");\n }\n if (opts.fontScheme) {\n content += stringifyFontScheme(opts.fontScheme, opts.fontScheme.name ?? \"Override\");\n }\n if (opts.formatScheme) content += stringifyFormatScheme(opts.formatScheme, ctx);\n return `<a:themeOverride ${THEME_NS}>${content}</a:themeOverride>`;\n },\n\n parse(el, ctx) {\n const result: Partial<ThemeOverrideOptions> = {};\n const colorScheme = parseColorScheme(findChild(el, \"a:clrScheme\"), ctx);\n if (colorScheme) result.colorScheme = colorScheme;\n const fontScheme = parseFontScheme(findChild(el, \"a:fontScheme\"));\n if (fontScheme) result.fontScheme = fontScheme;\n const formatScheme = parseFormatScheme(findChild(el, \"a:fmtScheme\"), ctx);\n if (formatScheme) result.formatScheme = formatScheme;\n return result as ThemeOverrideOptions;\n },\n};\n\n/** Options for a themeManager part — CT_EmptyElement has no content or attributes. */\nexport type ThemeManagerOptions = Record<never, never>;\n\nexport const themeManagerDesc: CustomDescriptor<\n ThemeManagerOptions,\n WriteContext,\n ThemeManagerOptions\n> = {\n kind: \"custom\",\n\n stringify(_opts, _ctx) {\n return `<a:themeManager ${THEME_NS}/>`;\n },\n\n parse(_el, _ctx) {\n return {};\n },\n};\n"],"mappings":";;;;;;AAQA,MAAa,iBAA4E;CACvF,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,WAAW;CACX,mBAAmB;AACrB;;;;;;;;;;;;;;ACIA,MAAM,aAA4D;CAChE;EAAE,KAAK;EAAS,KAAK;CAAQ;CAC7B;EAAE,KAAK;EAAS,KAAK;CAAS;CAC9B;EAAE,KAAK;EAAS,KAAK;CAAQ;CAC7B;EAAE,KAAK;EAAS,KAAK;CAAS;CAC9B;EAAE,KAAK;EAAa,KAAK;CAAU;CACnC;EAAE,KAAK;EAAa,KAAK;CAAU;CACnC;EAAE,KAAK;EAAa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;CAEN,UAAU,OAAO,MAAM;EACrB,OAAO,mBAAmB,SAAS;CACrC;CAEA,MAAM,KAAK,MAAM;EACf,OAAO,CAAC;CACV;AACF"}
@@ -1,4 +1,4 @@
1
1
  import { i as toUint8Array, n as ToUint8ArrayOptions, r as isBase64DataURL, t as DataType } from "../data-type-CZMKVaaT.mjs";
2
2
  import { A as positiveUniversalMeasureValue, C as hexColorValue, D as parseOnOff, E as measurementOrPercentValue, F as twipsMeasureValue, I as uCharHexNumber, L as universalMeasureValue, M as signedHpsMeasureValue, N as signedTwipsMeasureValue, O as percentageValue, P as stripColorHashPrefix, R as unsignedDecimalNumber, S as hexBinary, T as longHexNumber, _ as UniversalMeasure, a as HexColor, b as decimalNumber, c as Panose, d as PositiveUniversalMeasure, f as RelativeMeasure, g as UcharHexNumber, h as ThemeFont, i as Guid, j as shortHexNumber, k as pointMeasureValue, l as Percentage, m as ThemeColor, n as Base64, o as HexColorOrAuto, p as ShortHexNumber, r as DateTime, s as LongHexNumber, t as ArgbHexColor, u as PositivePercentage, v as UnsignedShortHex, w as hpsMeasureValue, x as eighthPointMeasureValue, y as dateTimeValue } from "../values-BECDm4zr.mjs";
3
- import { $ as xsdLegendPosition, $t as convertToPt, A as xsdAnimValueType, At as ImageFileType, B as xsdCompoundLine, Bt as randomBytes, C as replacePlaceholders, Ct as xsdTextCaps, D as xsdAnimCalcMode, Dt as xsdTrendlineType, E as invertMap, Et as xsdTotalsRowFunction, F as xsdAxisOrientation, Ft as uniqueNumericIdCreator, G as xsdDiagramDirection, Gt as convertInchesToEmu, H as xsdDashStyle, Ht as convertEmuToPixels, I as xsdAxisPosition, It as uniqueUuid, J as xsdFontAlignment, Jt as convertPixelsToEmu, K as xsdEffectContainer, Kt as convertInchesToTwip, L as xsdBlendMode, Lt as extUriMatches, M as xsdAxisCrossBetween, Mt as UniqueNumericIdCreator, N as xsdAxisCrosses, Nt as hashedId, O as xsdAnimClass, Ot as xsdUnderlineStyle, P as xsdAxisLabelAlignment, Pt as uniqueId, Q as xsdJcAlignment, Qt as convertToInch, R as xsdChartBuild, Rt as derivePasswordHash, S as replaceOlePlaceholders, St as xsdTextBuild, T as replaceVideoPlaceholders, Tt as xsdTextVerticalType, U as xsdDataLabelPosition, Ut as convertEmuToPoints, V as xsdConsolidateFunction, Vt as convertEmuToInches, W as xsdDiagramBuild, Wt as convertEmuToTwip, X as xsdHueDirection, Xt as convertPointsToTwip, Y as xsdHierBranch, Yt as convertPointsToEmu, Z as xsdIterateType, Zt as convertToEmu, _ as replaceImageLinkPlaceholders, _t as xsdSplitType, a as findAndReplaceImagePlaceholders, an as convertUniversalMeasureToPt, at as xsdOnOffStyle, b as replaceNumberingPlaceholders, bt as xsdTextAlign, c as getMediaRefs, cn as emitPercent, ct as xsdPattern, d as getVideoRefs, dn as parsePercent, dt as xsdPresetShadow, en as convertToTwip, et as xsdLightRigDirection, f as hasPlaceholders, fn as parsePercentAttr, ft as xsdRectAlignment, g as replaceHyperlinkPlaceholders, gn as compileMapping, gt as xsdSlideLayoutType, h as replaceChartPlaceholders, hn as addBinaryFile, ht as xsdSizeRepresents, i as collectPlaceholderKeys, in as convertUniversalMeasureToInch, it as xsdMathStyle, j as xsdAnimationDgmBuild, jt as imageTypeFromPath, k as xsdAnimLevel, kt as xsdVerticalMergeRev, l as getOleRefs, ln as mapOptional, lt as xsdPenAlignment, m as replaceAudioPlaceholders, mn as XmlifyedFileEntry, mt as xsdShadingPattern, n as SmartArtRelOptions, nn as convertTwipToPoints, nt as xsdLineEndSize, o as formatId, on as convertUniversalMeasureToTwip, ot as xsdOrient, p as replaceAllPlaceholders, pn as parseUniversalMeasure, pt as xsdResizeHandles, q as xsdErrorValueType, qt as convertMillimetersToTwip, r as addSmartArtRelationships, rn as convertUniversalMeasureToEmu, rt as xsdMaterialType, s as getAudioRefs, sn as emitAngle, st as xsdPathFillMode, t as IdFormat, tn as convertTwipToEmu, tt as xsdLineCap, u as getReferencedMedia, un as parseAngle, ut as xsdPlaceholderType, v as replaceImagePlaceholders, vt as xsdStrikeStyle, w as replaceSmartArtPlaceholders, wt as xsdTextTabAlignment, x as replaceOleLinkPlaceholders, xt as xsdTextAnchor, y as replaceMediaPlaceholders, yt as xsdTableWidthType, z as xsdComments, zt as hashPasswordAgile } from "../index-BAxlDUQ1.mjs";
3
+ import { $ as xsdLegendPosition, $t as convertToPt, A as xsdAnimValueType, At as ImageFileType, B as xsdCompoundLine, Bt as randomBytes, C as replacePlaceholders, Ct as xsdTextCaps, D as xsdAnimCalcMode, Dt as xsdTrendlineType, E as invertMap, Et as xsdTotalsRowFunction, F as xsdAxisOrientation, Ft as uniqueNumericIdCreator, G as xsdDiagramDirection, Gt as convertInchesToEmu, H as xsdDashStyle, Ht as convertEmuToPixels, I as xsdAxisPosition, It as uniqueUuid, J as xsdFontAlignment, Jt as convertPixelsToEmu, K as xsdEffectContainer, Kt as convertInchesToTwip, L as xsdBlendMode, Lt as extUriMatches, M as xsdAxisCrossBetween, Mt as UniqueNumericIdCreator, N as xsdAxisCrosses, Nt as hashedId, O as xsdAnimClass, Ot as xsdUnderlineStyle, P as xsdAxisLabelAlignment, Pt as uniqueId, Q as xsdJcAlignment, Qt as convertToInch, R as xsdChartBuild, Rt as derivePasswordHash, S as replaceOlePlaceholders, St as xsdTextBuild, T as replaceVideoPlaceholders, Tt as xsdTextVerticalType, U as xsdDataLabelPosition, Ut as convertEmuToPoints, V as xsdConsolidateFunction, Vt as convertEmuToInches, W as xsdDiagramBuild, Wt as convertEmuToTwip, X as xsdHueDirection, Xt as convertPointsToTwip, Y as xsdHierBranch, Yt as convertPointsToEmu, Z as xsdIterateType, Zt as convertToEmu, _ as replaceImageLinkPlaceholders, _t as xsdSplitType, a as findAndReplaceImagePlaceholders, an as convertUniversalMeasureToPt, at as xsdOnOffStyle, b as replaceNumberingPlaceholders, bt as xsdTextAlign, c as getMediaRefs, cn as emitPercent, ct as xsdPattern, d as getVideoRefs, dn as parsePercent, dt as xsdPresetShadow, en as convertToTwip, et as xsdLightRigDirection, f as hasPlaceholders, fn as parsePercentAttr, ft as xsdRectAlignment, g as replaceHyperlinkPlaceholders, gn as compileMapping, gt as xsdSlideLayoutType, h as replaceChartPlaceholders, hn as addBinaryFile, ht as xsdSizeRepresents, i as collectPlaceholderKeys, in as convertUniversalMeasureToInch, it as xsdMathStyle, j as xsdAnimationDgmBuild, jt as imageTypeFromPath, k as xsdAnimLevel, kt as xsdVerticalMergeRev, l as getOleRefs, ln as mapOptional, lt as xsdPenAlignment, m as replaceAudioPlaceholders, mn as XmlifyedFileEntry, mt as xsdShadingPattern, n as SmartArtRelOptions, nn as convertTwipToPoints, nt as xsdLineEndSize, o as formatId, on as convertUniversalMeasureToTwip, ot as xsdOrient, p as replaceAllPlaceholders, pn as parseUniversalMeasure, pt as xsdResizeHandles, q as xsdErrorValueType, qt as convertMillimetersToTwip, r as addSmartArtRelationships, rn as convertUniversalMeasureToEmu, rt as xsdMaterialType, s as getAudioRefs, sn as emitAngle, st as xsdPathFillMode, t as IdFormat, tn as convertTwipToEmu, tt as xsdLineCap, u as getReferencedMedia, un as parseAngle, ut as xsdPlaceholderType, v as replaceImagePlaceholders, vt as xsdStrikeStyle, w as replaceSmartArtPlaceholders, wt as xsdTextTabAlignment, x as replaceOleLinkPlaceholders, xt as xsdTextAnchor, y as replaceMediaPlaceholders, yt as xsdTableWidthType, z as xsdComments, zt as hashPasswordAgile } from "../index-DF3lKLF_.mjs";
4
4
  export { ArgbHexColor, Base64, DataType, DateTime, Guid, HexColor, HexColorOrAuto, IdFormat, ImageFileType, LongHexNumber, Panose, Percentage, PositivePercentage, PositiveUniversalMeasure, RelativeMeasure, ShortHexNumber, SmartArtRelOptions, ThemeColor, ThemeFont, ToUint8ArrayOptions, UcharHexNumber, UniqueNumericIdCreator, UniversalMeasure, UnsignedShortHex, XmlifyedFileEntry, addBinaryFile, addSmartArtRelationships, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertEmuToTwip, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertPixelsToEmu, convertPointsToEmu, convertPointsToTwip, convertToEmu, convertToInch, convertToPt, convertToTwip, convertTwipToEmu, convertTwipToPoints, convertUniversalMeasureToEmu, convertUniversalMeasureToInch, convertUniversalMeasureToPt, convertUniversalMeasureToTwip, dateTimeValue, decimalNumber, derivePasswordHash, eighthPointMeasureValue, emitAngle, emitPercent, extUriMatches, findAndReplaceImagePlaceholders, formatId, getAudioRefs, getMediaRefs, getOleRefs, getReferencedMedia, getVideoRefs, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureValue, imageTypeFromPath, invertMap, isBase64DataURL, longHexNumber, mapOptional, measurementOrPercentValue, parseAngle, parseOnOff, parsePercent, parsePercentAttr, parseUniversalMeasure, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, randomBytes, replaceAllPlaceholders, replaceAudioPlaceholders, replaceChartPlaceholders, replaceHyperlinkPlaceholders, replaceImageLinkPlaceholders, replaceImagePlaceholders, replaceMediaPlaceholders, replaceNumberingPlaceholders, replaceOleLinkPlaceholders, replaceOlePlaceholders, replacePlaceholders, replaceSmartArtPlaceholders, replaceVideoPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, stripColorHashPrefix, toUint8Array, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, xsdAnimCalcMode, xsdAnimClass, xsdAnimLevel, xsdAnimValueType, xsdAnimationDgmBuild, xsdAxisCrossBetween, xsdAxisCrosses, xsdAxisLabelAlignment, xsdAxisOrientation, xsdAxisPosition, xsdBlendMode, xsdChartBuild, xsdComments, xsdCompoundLine, xsdConsolidateFunction, xsdDashStyle, xsdDataLabelPosition, xsdDiagramBuild, xsdDiagramDirection, xsdEffectContainer, xsdErrorValueType, xsdFontAlignment, xsdHierBranch, xsdHueDirection, xsdIterateType, xsdJcAlignment, xsdLegendPosition, xsdLightRigDirection, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdMathStyle, xsdOnOffStyle, xsdOrient, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPlaceholderType, xsdPresetShadow, xsdRectAlignment, xsdResizeHandles, xsdShadingPattern, xsdSizeRepresents, xsdSlideLayoutType, xsdSplitType, xsdStrikeStyle, xsdTableWidthType, xsdTextAlign, xsdTextAnchor, xsdTextBuild, xsdTextCaps, xsdTextTabAlignment, xsdTextVerticalType, xsdTotalsRowFunction, xsdTrendlineType, xsdUnderlineStyle, xsdVerticalMergeRev };
@@ -1,3 +1,3 @@
1
- import { C as replaceVideoPlaceholders, D as addBinaryFile, E as randomBytes, O as compileMapping, S as replaceSmartArtPlaceholders, T as hashPasswordAgile, _ as replaceMediaPlaceholders, a as getAudioRefs, b as replaceOlePlaceholders, c as getReferencedMedia, d as replaceAllPlaceholders, f as replaceAudioPlaceholders, g as replaceImagePlaceholders, h as replaceImageLinkPlaceholders, i as formatId, l as getVideoRefs, m as replaceHyperlinkPlaceholders, n as collectPlaceholderKeys, o as getMediaRefs, p as replaceChartPlaceholders, r as findAndReplaceImagePlaceholders, s as getOleRefs, t as addSmartArtRelationships, u as hasPlaceholders, v as replaceNumberingPlaceholders, w as derivePasswordHash, x as replacePlaceholders, y as replaceOleLinkPlaceholders } from "../util-ptE16MEk.mjs";
1
+ import { C as replaceVideoPlaceholders, D as addBinaryFile, E as randomBytes, O as compileMapping, S as replaceSmartArtPlaceholders, T as hashPasswordAgile, _ as replaceMediaPlaceholders, a as getAudioRefs, b as replaceOlePlaceholders, c as getReferencedMedia, d as replaceAllPlaceholders, f as replaceAudioPlaceholders, g as replaceImagePlaceholders, h as replaceImageLinkPlaceholders, i as formatId, l as getVideoRefs, m as replaceHyperlinkPlaceholders, n as collectPlaceholderKeys, o as getMediaRefs, p as replaceChartPlaceholders, r as findAndReplaceImagePlaceholders, s as getOleRefs, t as addSmartArtRelationships, u as hasPlaceholders, v as replaceNumberingPlaceholders, w as derivePasswordHash, x as replacePlaceholders, y as replaceOleLinkPlaceholders } from "../util-Cr7rwR6t.mjs";
2
2
  import { $ as xsdDiagramDirection, $t as pointMeasureValue, A as parseAngle, At as xsdTextBuild, B as xsdAxisCrossBetween, C as convertUniversalMeasureToEmu, Ct as xsdSizeRepresents, D as emitAngle, Dt as xsdTableWidthType, E as convertUniversalMeasureToTwip, Et as xsdStrikeStyle, F as xsdAnimCalcMode, Ft as xsdTrendlineType, G as xsdBlendMode, Gt as eighthPointMeasureValue, H as xsdAxisLabelAlignment, I as xsdAnimClass, It as xsdUnderlineStyle, J as xsdCompoundLine, Jt as hpsMeasureValue, K as xsdChartBuild, Kt as hexBinary, L as xsdAnimLevel, Lt as xsdVerticalMergeRev, M as parsePercentAttr, Mt as xsdTextTabAlignment, N as parseUniversalMeasure, Nt as xsdTextVerticalType, O as emitPercent, Ot as xsdTextAlign, P as invertMap, Pt as xsdTotalsRowFunction, Q as xsdDiagramBuild, Qt as percentageValue, R as xsdAnimValueType, Rt as isBase64DataURL, S as convertTwipToPoints, St as xsdShadingPattern, T as convertUniversalMeasureToPt, Tt as xsdSplitType, U as xsdAxisOrientation, Ut as dateTimeValue, V as xsdAxisCrosses, W as xsdAxisPosition, Wt as decimalNumber, X as xsdDashStyle, Xt as measurementOrPercentValue, Y as xsdConsolidateFunction, Yt as longHexNumber, Z as xsdDataLabelPosition, Zt as parseOnOff, _ as convertToEmu, _t as xsdPenAlignment, a as uniqueNumericIdCreator, an as twipsMeasureValue, at as xsdIterateType, b as convertToTwip, bt as xsdRectAlignment, c as convertEmuToPixels, cn as unsignedDecimalNumber, ct as xsdLightRigDirection, d as convertInchesToEmu, dt as xsdMaterialType, en as positiveUniversalMeasureValue, et as xsdEffectContainer, f as convertInchesToTwip, ft as xsdMathStyle, g as convertPointsToTwip, gt as xsdPattern, h as convertPointsToEmu, ht as xsdPathFillMode, i as uniqueId, in as stripColorHashPrefix, it as xsdHueDirection, j as parsePercent, jt as xsdTextCaps, k as mapOptional, kt as xsdTextAnchor, l as convertEmuToPoints, lt as xsdLineCap, m as convertPixelsToEmu, mt as xsdOrient, n as imageTypeFromPath, nn as signedHpsMeasureValue, nt as xsdFontAlignment, o as uniqueUuid, on as uCharHexNumber, ot as xsdJcAlignment, p as convertMillimetersToTwip, pt as xsdOnOffStyle, q as xsdComments, qt as hexColorValue, r as hashedId, rn as signedTwipsMeasureValue, rt as xsdHierBranch, s as convertEmuToInches, sn as universalMeasureValue, st as xsdLegendPosition, t as extUriMatches, tn as shortHexNumber, tt as xsdErrorValueType, u as convertEmuToTwip, ut as xsdLineEndSize, v as convertToInch, vt as xsdPlaceholderType, w as convertUniversalMeasureToInch, wt as xsdSlideLayoutType, x as convertTwipToEmu, xt as xsdResizeHandles, y as convertToPt, yt as xsdPresetShadow, z as xsdAnimationDgmBuild, zt as toUint8Array } from "../ext-uri-BHBcIrW7.mjs";
3
3
  export { addBinaryFile, addSmartArtRelationships, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertEmuToTwip, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertPixelsToEmu, convertPointsToEmu, convertPointsToTwip, convertToEmu, convertToInch, convertToPt, convertToTwip, convertTwipToEmu, convertTwipToPoints, convertUniversalMeasureToEmu, convertUniversalMeasureToInch, convertUniversalMeasureToPt, convertUniversalMeasureToTwip, dateTimeValue, decimalNumber, derivePasswordHash, eighthPointMeasureValue, emitAngle, emitPercent, extUriMatches, findAndReplaceImagePlaceholders, formatId, getAudioRefs, getMediaRefs, getOleRefs, getReferencedMedia, getVideoRefs, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureValue, imageTypeFromPath, invertMap, isBase64DataURL, longHexNumber, mapOptional, measurementOrPercentValue, parseAngle, parseOnOff, parsePercent, parsePercentAttr, parseUniversalMeasure, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, randomBytes, replaceAllPlaceholders, replaceAudioPlaceholders, replaceChartPlaceholders, replaceHyperlinkPlaceholders, replaceImageLinkPlaceholders, replaceImagePlaceholders, replaceMediaPlaceholders, replaceNumberingPlaceholders, replaceOleLinkPlaceholders, replaceOlePlaceholders, replacePlaceholders, replaceSmartArtPlaceholders, replaceVideoPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, stripColorHashPrefix, toUint8Array, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, xsdAnimCalcMode, xsdAnimClass, xsdAnimLevel, xsdAnimValueType, xsdAnimationDgmBuild, xsdAxisCrossBetween, xsdAxisCrosses, xsdAxisLabelAlignment, xsdAxisOrientation, xsdAxisPosition, xsdBlendMode, xsdChartBuild, xsdComments, xsdCompoundLine, xsdConsolidateFunction, xsdDashStyle, xsdDataLabelPosition, xsdDiagramBuild, xsdDiagramDirection, xsdEffectContainer, xsdErrorValueType, xsdFontAlignment, xsdHierBranch, xsdHueDirection, xsdIterateType, xsdJcAlignment, xsdLegendPosition, xsdLightRigDirection, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdMathStyle, xsdOnOffStyle, xsdOrient, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPlaceholderType, xsdPresetShadow, xsdRectAlignment, xsdResizeHandles, xsdShadingPattern, xsdSizeRepresents, xsdSlideLayoutType, xsdSplitType, xsdStrikeStyle, xsdTableWidthType, xsdTextAlign, xsdTextAnchor, xsdTextBuild, xsdTextCaps, xsdTextTabAlignment, xsdTextVerticalType, xsdTotalsRowFunction, xsdTrendlineType, xsdUnderlineStyle, xsdVerticalMergeRev };
@@ -612,8 +612,8 @@ function hashPasswordAgile(password, salt, spinCount) {
612
612
  initial.set(salt, 0);
613
613
  initial.set(pwBytes, salt.length);
614
614
  let h = sha512(initial);
615
+ const buf = new Uint8Array(h.length + 4);
615
616
  for (let i = 0; i < spinCount; i++) {
616
- const buf = new Uint8Array(h.length + 4);
617
617
  buf.set(h, 0);
618
618
  buf[h.length] = i & 255;
619
619
  buf[h.length + 1] = i >> 8 & 255;
@@ -888,4 +888,4 @@ function replaceOleLinkPlaceholders(xml, links, offset) {
888
888
  //#endregion
889
889
  export { ZIP_STORED_LEVEL as A, OoxmlMimeType as B, replaceVideoPlaceholders as C, addBinaryFile as D, randomBytes as E, strFromU8$1 as F, hasNativeInflate as H, unzipSync$1 as I, zipAndConvert as L, createPacker as M, createZipStream as N, compileMapping as O, levelForMediaName as P, zipSync$1 as R, replaceSmartArtPlaceholders as S, hashPasswordAgile as T, nativeCrc32 as U, convertOutput as V, nativeUnzip as W, replaceMediaPlaceholders as _, getAudioRefs as a, replaceOlePlaceholders as b, getReferencedMedia as c, replaceAllPlaceholders as d, replaceAudioPlaceholders as f, replaceImagePlaceholders as g, replaceImageLinkPlaceholders as h, formatId as i, ZipStreamWriter as j, ZIP_DEFLATE_LEVEL as k, getVideoRefs as l, replaceHyperlinkPlaceholders as m, collectPlaceholderKeys as n, getMediaRefs as o, replaceChartPlaceholders as p, findAndReplaceImagePlaceholders as r, getOleRefs as s, addSmartArtRelationships as t, hasPlaceholders as u, replaceNumberingPlaceholders as v, derivePasswordHash as w, replacePlaceholders as x, replaceOleLinkPlaceholders as y, zipSyncAndConvert as z };
890
890
 
891
- //# sourceMappingURL=util-ptE16MEk.mjs.map
891
+ //# sourceMappingURL=util-Cr7rwR6t.mjs.map