pptx-ts 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +147 -114
  2. package/dist/{autopage-odPz7zZO.js → autopage-D4kyVp11.js} +5 -5
  3. package/dist/{autopage-odPz7zZO.js.map → autopage-D4kyVp11.js.map} +1 -1
  4. package/dist/{body-insets-Dw_BeWD_.js → body-insets-kVHmjGc6.js} +2 -2
  5. package/dist/{body-insets-Dw_BeWD_.js.map → body-insets-kVHmjGc6.js.map} +1 -1
  6. package/dist/browser.d.ts +7 -7
  7. package/dist/browser.js +5 -5
  8. package/dist/{clip-Bl01BPcN.d.ts → clip-DHDlnHUq.d.ts} +2 -2
  9. package/dist/{clip-Bl01BPcN.d.ts.map → clip-DHDlnHUq.d.ts.map} +1 -1
  10. package/dist/{diagnostics-D8ot4Ei7.d.ts → diagnostics-DiMmBU8P.d.ts} +6 -6
  11. package/dist/{diagnostics-D8ot4Ei7.d.ts.map → diagnostics-DiMmBU8P.d.ts.map} +1 -1
  12. package/dist/{embedded-fonts-DarT9aoa.d.ts → embedded-fonts-CI_YGW2d.d.ts} +2 -2
  13. package/dist/{embedded-fonts-DarT9aoa.d.ts.map → embedded-fonts-CI_YGW2d.d.ts.map} +1 -1
  14. package/dist/{entry-compose-DCnvBZz2.d.ts → entry-compose-6hF9aTmT.d.ts} +19 -17
  15. package/dist/{entry-compose-DCnvBZz2.d.ts.map → entry-compose-6hF9aTmT.d.ts.map} +1 -1
  16. package/dist/{enums-BUKTUB6V.d.ts → enums-DQRpVOLh.d.ts} +3 -3
  17. package/dist/{enums-BUKTUB6V.d.ts.map → enums-DQRpVOLh.d.ts.map} +1 -1
  18. package/dist/{errors-C4oENPcu.js → errors-Da2nXCJm.js} +6 -6
  19. package/dist/{errors-C4oENPcu.js.map → errors-Da2nXCJm.js.map} +1 -1
  20. package/dist/families.d.ts +6 -6
  21. package/dist/families.js +2 -2
  22. package/dist/{fit-Cb7naFj6.js → fit-CcXbg__l.js} +10 -10
  23. package/dist/{fit-Cb7naFj6.js.map → fit-CcXbg__l.js.map} +1 -1
  24. package/dist/{font-metrics-v5fn7s7e.d.ts → font-metrics-CBGmhLo0.d.ts} +6 -6
  25. package/dist/{font-metrics-v5fn7s7e.d.ts.map → font-metrics-CBGmhLo0.d.ts.map} +1 -1
  26. package/dist/{grid-DikTjFey.js → grid-9B2w5EaY.js} +2 -2
  27. package/dist/{grid-DikTjFey.js.map → grid-9B2w5EaY.js.map} +1 -1
  28. package/dist/{html-dom-Iuog2wdK.js → html-dom-DvJmuHt2.js} +10 -10
  29. package/dist/html-dom-DvJmuHt2.js.map +1 -0
  30. package/dist/html.d.ts +3 -3
  31. package/dist/html.js +2 -2
  32. package/dist/{image-size-CvN2iCA4.js → image-size-DwDbakcl.js} +64 -5
  33. package/dist/image-size-DwDbakcl.js.map +1 -0
  34. package/dist/index.d.ts +7 -7
  35. package/dist/index.js +3 -3
  36. package/dist/inspect.d.ts +4 -4
  37. package/dist/inspect.js +4 -4
  38. package/dist/inspect.js.map +1 -1
  39. package/dist/math.d.ts +1 -1
  40. package/dist/math.js +1 -1
  41. package/dist/measure.d.ts +3 -3
  42. package/dist/measure.js +2 -2
  43. package/dist/node.d.ts +7 -7
  44. package/dist/node.js +3 -3
  45. package/dist/{notes-Dh12JAbn.js → notes-BcT571R4.js} +19 -18
  46. package/dist/notes-BcT571R4.js.map +1 -0
  47. package/dist/options-internal-WqgMf720.js.map +1 -1
  48. package/dist/{package-J49Ck6S2.d.ts → package-KoEgVwII.d.ts} +6 -2
  49. package/dist/{package-J49Ck6S2.d.ts.map → package-KoEgVwII.d.ts.map} +1 -1
  50. package/dist/{pres-C6qgOFAa.d.ts → pres-BA9_lJbY.d.ts} +32 -12
  51. package/dist/pres-BA9_lJbY.d.ts.map +1 -0
  52. package/dist/{presentation-DGYlAWhl.js → presentation-Cyl74rq2.js} +70 -35
  53. package/dist/presentation-Cyl74rq2.js.map +1 -0
  54. package/dist/{presentation-types-8jLQHI4M.d.ts → presentation-types-B3VQH4Bz.d.ts} +19 -15
  55. package/dist/presentation-types-B3VQH4Bz.d.ts.map +1 -0
  56. package/dist/read.d.ts +6 -6
  57. package/dist/read.js +3 -3
  58. package/dist/script.d.ts +2 -2
  59. package/dist/script.d.ts.map +1 -1
  60. package/dist/script.js +11 -11
  61. package/dist/script.js.map +1 -1
  62. package/dist/{shapes-re0KyQk_.js → shapes-BcyFdZpp.js} +14 -10
  63. package/dist/shapes-BcyFdZpp.js.map +1 -0
  64. package/dist/{slide-Dx2ZeVZ6.d.ts → slide-BqPtyKmb.d.ts} +12 -7
  65. package/dist/slide-BqPtyKmb.d.ts.map +1 -0
  66. package/dist/{table-cell-margins-EVg0EwxT.js → table-cell-margins-PDshga8T.js} +4 -4
  67. package/dist/{table-cell-margins-EVg0EwxT.js.map → table-cell-margins-PDshga8T.js.map} +1 -1
  68. package/dist/{table-dom-BTDP3lEP.js → table-dom-CVbvUfgh.js} +3 -3
  69. package/dist/{table-dom-BTDP3lEP.js.map → table-dom-CVbvUfgh.js.map} +1 -1
  70. package/dist/{text-KnLOtEEu.js → text-BvFFMMFQ.js} +38 -36
  71. package/dist/{text-KnLOtEEu.js.map → text-BvFFMMFQ.js.map} +1 -1
  72. package/dist/{text-anchor-CrYXAfUu.js → text-anchor-BgLPbwbL.js} +2 -2
  73. package/dist/{text-anchor-CrYXAfUu.js.map → text-anchor-BgLPbwbL.js.map} +1 -1
  74. package/dist/{units-internal-XJlf-hOl.js → units-internal-DFcUYjh3.js} +11 -6
  75. package/dist/units-internal-DFcUYjh3.js.map +1 -0
  76. package/dist/{zip-C0leZZMj.d.ts → zip-CTll_dr0.d.ts} +2 -2
  77. package/dist/{zip-C0leZZMj.d.ts.map → zip-CTll_dr0.d.ts.map} +1 -1
  78. package/dist/{zip-CKd8ihcf.js → zip-CYZ0F6BV.js} +2 -2
  79. package/dist/{zip-CKd8ihcf.js.map → zip-CYZ0F6BV.js.map} +1 -1
  80. package/dist/zip.d.ts +2 -2
  81. package/dist/zip.js +2 -2
  82. package/dist/{zoom-cX9sllpH.js → zoom-BoNyOlPm.js} +66 -52
  83. package/dist/zoom-BoNyOlPm.js.map +1 -0
  84. package/package.json +39 -31
  85. package/skills/ts-pptx-upstream/SKILL.md +18 -18
  86. package/dist/html-dom-Iuog2wdK.js.map +0 -1
  87. package/dist/image-size-CvN2iCA4.js.map +0 -1
  88. package/dist/notes-Dh12JAbn.js.map +0 -1
  89. package/dist/pres-C6qgOFAa.d.ts.map +0 -1
  90. package/dist/presentation-DGYlAWhl.js.map +0 -1
  91. package/dist/presentation-types-8jLQHI4M.d.ts.map +0 -1
  92. package/dist/shapes-re0KyQk_.js.map +0 -1
  93. package/dist/slide-Dx2ZeVZ6.d.ts.map +0 -1
  94. package/dist/units-internal-XJlf-hOl.js.map +0 -1
  95. package/dist/zoom-cX9sllpH.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"image-size-CvN2iCA4.js","names":[],"sources":["../src/media/image-formats.ts","../src/media/base64.ts","../src/ooxml/namespaces.ts","../src/ooxml/rel-types.ts","../src/ooxml/st-enums.ts","../src/hex-color.ts","../src/ooxml/xsd-boolean.ts","../src/ooxml/check-enum.ts","../src/ooxml/line-cap.ts","../src/ooxml/text-align.ts","../src/media/image-size.ts"],"sourcesContent":["/**\n * The image formats this library recognises, one row each.\n *\n * Four tables used to answer overlapping questions about the same nine formats in three\n * directions — extension → content type on the write path, content type → extension on the read\n * and script paths, magic bytes → both in the sniffer — and a fifth partial re-derived the same\n * signatures to read pixel dimensions. They had already drifted: `image/jpeg` resolved to `jpeg`\n * in one and `jpg` in another, `image/tiff` to `tiff` and `tif`, and the GIF signature was four\n * bytes in one place and three in another, so a file could be measured but not sniffed.\n *\n * A row states every spelling once, so the directions cannot disagree. Where two spellings are\n * both wanted they are separate *columns* with separate reasons ({@link ImageFormat.ext} vs\n * {@link ImageFormat.filenameExt}), never separate tables.\n *\n * Content types are what PowerPoint authors, not what IANA prefers: EMF and WMF keep the `x-`\n * prefix and SVG is `image/svg+xml`. A package that disagrees is the kind of thing PowerPoint\n * offers to repair.\n */\n\n/** One image format, in every spelling the library needs it in. */\ninterface ImageFormat {\n\t/**\n\t * The extension a *media part* carries (`/ppt/media/image1.<ext>`), and the canonical answer\n\t * when a content type is turned back into an extension. Changing one of these changes emitted\n\t * package bytes.\n\t */\n\treadonly ext: string\n\t/** The OPC content type, as PowerPoint authors it. */\n\treadonly contentType: string\n\t/** Other extensions a caller may spell the format with; each resolves to {@link contentType}. */\n\treadonly altExts: readonly string[]\n\t/**\n\t * The extension for a *file on disk* — the asset a printed script writes beside itself. It\n\t * differs from {@link ext} for two formats (`jpg`, `tif`) because those are the spellings\n\t * desktop viewers and file managers recognise, and an asset directory is read by people. It\n\t * names no part and is in no package, so it is free to differ.\n\t */\n\treadonly filenameExt: string\n\t/**\n\t * Whether these leading bytes are this format's signature, or `null` for a format with no\n\t * usable one (SVG is text; EMF and WMF are not sniffed).\n\t */\n\treadonly magic: ((b: Uint8Array) => boolean) | null\n}\n\n/**\n * Every recognised format, keyed by its canonical extension. Iteration order is sniffing order;\n * no two signatures overlap, so it only has to be stable, not carefully chosen.\n */\nexport const IMAGE_FORMATS = Object.freeze({\n\tpng: {\n\t\text: 'png',\n\t\tcontentType: 'image/png',\n\t\taltExts: [],\n\t\tfilenameExt: 'png',\n\t\tmagic: (b) => b.length >= 8 && b[0] === 0x89 && b[1] === 0x50 && b[2] === 0x4e && b[3] === 0x47,\n\t},\n\tjpeg: {\n\t\text: 'jpeg',\n\t\tcontentType: 'image/jpeg',\n\t\taltExts: ['jpg'],\n\t\tfilenameExt: 'jpg',\n\t\tmagic: (b) => b.length >= 3 && b[0] === 0xff && b[1] === 0xd8 && b[2] === 0xff,\n\t},\n\tgif: {\n\t\text: 'gif',\n\t\tcontentType: 'image/gif',\n\t\taltExts: [],\n\t\tfilenameExt: 'gif',\n\t\t// `GIF8`, not `GIF`: both released versions are GIF87a and GIF89a, and the fourth byte is\n\t\t// what tells a header apart from a file that merely starts with those three letters.\n\t\tmagic: (b) => b.length >= 4 && b[0] === 0x47 && b[1] === 0x49 && b[2] === 0x46 && b[3] === 0x38,\n\t},\n\tbmp: {\n\t\text: 'bmp',\n\t\tcontentType: 'image/bmp',\n\t\taltExts: [],\n\t\tfilenameExt: 'bmp',\n\t\tmagic: (b) => b.length >= 2 && b[0] === 0x42 && b[1] === 0x4d,\n\t},\n\ttiff: {\n\t\text: 'tiff',\n\t\tcontentType: 'image/tiff',\n\t\taltExts: ['tif'],\n\t\tfilenameExt: 'tif',\n\t\t// Both byte orders: `II*\\0` little-endian, `MM\\0*` big-endian.\n\t\tmagic: (b) =>\n\t\t\tb.length >= 4 &&\n\t\t\t((b[0] === 0x49 && b[1] === 0x49 && b[2] === 0x2a && b[3] === 0x00) ||\n\t\t\t\t(b[0] === 0x4d && b[1] === 0x4d && b[2] === 0x00 && b[3] === 0x2a)),\n\t},\n\twebp: {\n\t\text: 'webp',\n\t\tcontentType: 'image/webp',\n\t\taltExts: [],\n\t\tfilenameExt: 'webp',\n\t\t// `RIFF` then `WEBP` at offset 8; the chunk fourCC after it is the codec, not the format.\n\t\tmagic: (b) =>\n\t\t\tb.length >= 12 &&\n\t\t\tb[0] === 0x52 &&\n\t\t\tb[1] === 0x49 &&\n\t\t\tb[2] === 0x46 &&\n\t\t\tb[3] === 0x46 &&\n\t\t\tb[8] === 0x57 &&\n\t\t\tb[9] === 0x45 &&\n\t\t\tb[10] === 0x42 &&\n\t\t\tb[11] === 0x50,\n\t},\n\tsvg: { ext: 'svg', contentType: 'image/svg+xml', altExts: [], filenameExt: 'svg', magic: null },\n\temf: { ext: 'emf', contentType: 'image/x-emf', altExts: [], filenameExt: 'emf', magic: null },\n\twmf: { ext: 'wmf', contentType: 'image/x-wmf', altExts: [], filenameExt: 'wmf', magic: null },\n}) satisfies Readonly<Record<string, ImageFormat>>\n\nconst BY_EXTENSION: ReadonlyMap<string, ImageFormat> = new Map(\n\tObject.values(IMAGE_FORMATS).flatMap((f) => [f.ext, ...f.altExts].map((e) => [e, f] as const))\n)\n\nconst BY_CONTENT_TYPE: ReadonlyMap<string, ImageFormat> = new Map(\n\tObject.values(IMAGE_FORMATS).map((f) => [f.contentType, f] as const)\n)\n\n/** The format a caller's file extension names, or `null` for one the registry does not carry. */\nexport function imageFormatForExtension(extn: string): ImageFormat | null {\n\treturn BY_EXTENSION.get((extn || '').toLowerCase()) ?? null\n}\n\n/** The format a content type names, or `null` for one the registry does not carry. */\nexport function imageFormatForContentType(contentType: string): ImageFormat | null {\n\treturn BY_CONTENT_TYPE.get((contentType || '').toLowerCase()) ?? null\n}\n\n/** The format these leading bytes are the header of, or `null` when nothing matches. */\nexport function imageFormatForBytes(bytes: Uint8Array): ImageFormat | null {\n\tif (!bytes) return null\n\tfor (const format of Object.values(IMAGE_FORMATS)) {\n\t\tif (format.magic?.(bytes)) return format\n\t}\n\treturn null\n}\n","/**\n * Base64 payload handling for media parts — isomorphic across Node and browsers\n * (`TextEncoder`/`atob`/`btoa` only, no `Buffer`).\n */\n\n/**\n * Encode raw SVG markup as a base64 `image/svg+xml` data URI.\n * - lets callers pass inline SVG to `addImage({ svg })` without hand-rolling base64\n * - isomorphic and UTF-8 safe: uses the global `TextEncoder`/`btoa` (Node and browsers)\n * @param {string} svg - SVG markup, e.g. `'<svg ...>...</svg>'`\n * @returns {string} a `data:image/svg+xml;base64,...` URI\n */\nimport { bytesToBinaryString } from './binary-string.js'\n\nexport function svgMarkupToDataUri(svg: string): string {\n\treturn `data:image/svg+xml;base64,${bytesToBase64(new TextEncoder().encode(svg))}`\n}\n\n/**\n * Encode raw bytes as base64 (no `data:` prefix) using only `btoa`, so the result is the same\n * on Node, in a browser, and in a runtime that has neither `Buffer` nor `FileReader`.\n * @param {Uint8Array} bytes - the payload\n * @returns {string} base64 text\n */\nexport function bytesToBase64(bytes: Uint8Array): string {\n\treturn btoa(bytesToBinaryString(bytes))\n}\n\n/**\n * Present a freshly loaded media payload as a `data:` URI.\n *\n * A {@link RuntimeAdapter.loadMedia} implementation returns whichever encoding its host\n * makes cheap — the browser adapter a full URI, because `FileReader.readAsDataURL` is what\n * decodes a blob without blocking; Node and the neutral adapter raw base64, because neither\n * has a `FileReader`. This is where the two become one, so nothing downstream of the load\n * has to ask which it got.\n *\n * The mime label is documentary: {@link decodeBase64ToBytes} ignores it, and the one consumer\n * that needs a real URI (`image.src`, in the browser adapter's SVG preview) is handed the\n * adapter's own. It is taken from the rel anyway rather than hard-coded, so an already-correct\n * label is not overwritten with a wrong one.\n * @param {string} payload - what the adapter returned: raw base64, or an already-formed URI\n * @param {string} contentType - the rel's content type, e.g. `image/png`\n * @returns {string} a `data:` URI\n */\nexport function toMediaDataUri(payload: string, contentType: string): string {\n\treturn payload.startsWith('data:') ? payload : `data:${contentType};base64,${payload}`\n}\n\n/**\n * Where the payload begins in an inline `data:` URI, or `-1` when the value carries no\n * `base64,` header and is therefore raw base64 already.\n *\n * The one reading of that header, because the two functions below used to spell it separately and\n * disagree: {@link hasBase64Header} lower-cased before looking, {@link decodeBase64ToBytes} did\n * not. RFC 2397 does not case the `;base64` token, so `data:image/png;BASE64,…` passed every\n * definer's check and then decoded from index 0, which `atob` rejects. The media part was written\n * empty, with nothing said. One search means the two can no longer answer differently.\n *\n * Matched with a regular expression rather than by lower-casing and indexing, because\n * `toLowerCase` is not length-preserving for every code point and a shifted index would slice the\n * payload apart.\n */\nfunction base64PayloadStart(data: string): number {\n\tconst match = /base64,/i.exec(data)\n\treturn match ? match.index + match[0].length : -1\n}\n\n/**\n * Decode a base64 image payload (raw base64 or a `data:` URI) to bytes.\n * - tolerant of the `data:[mime];base64,` prefix and of whitespace in the payload\n * @param {string} b64 - base64 string or data URI\n * @returns {Uint8Array | null} decoded bytes, or `null` when the payload is empty/undecodable\n */\nexport function decodeBase64ToBytes(b64: string): Uint8Array | null {\n\tif (!b64) return null\n\t// Strip any `data:...;base64,` prefix and surrounding whitespace\n\tconst start = base64PayloadStart(b64)\n\tconst payload = (start >= 0 ? b64.slice(start) : b64).replace(/\\s/g, '')\n\tif (!payload) return null\n\ttry {\n\t\tconst binary = atob(payload)\n\t\tconst bytes = new Uint8Array(binary.length)\n\t\tfor (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i)\n\t\treturn bytes\n\t} catch {\n\t\treturn null\n\t}\n}\n\n/**\n * Whether an inline payload carries the `base64,` header the definers ask image and media bytes\n * to arrive with. A value that is not a string has none.\n * @param data - the caller's `data`\n */\nexport function hasBase64Header(data: unknown): boolean {\n\treturn typeof data === 'string' && base64PayloadStart(data) >= 0\n}\n","/**\n * OOXML namespace URIs, by their canonical prefix.\n *\n * A namespace URI is a fact about the format, not about reading or writing one, so it belongs\n * here rather than on either side — the same reasoning `rel-types.ts` states at length, and for\n * the same failure mode: these are long, near-identical strings, and a typo does not throw. It\n * silently matches nothing on the read side and produces a part PowerPoint ignores on the write\n * side.\n *\n * The table lived in `read/oxml/dom.ts` and could not be reached from `gen/`, because that\n * module imports `@xmldom/xmldom` at module scope and pulling an XML DOM into the write-only\n * bundle is a real cost. So the write side hand-wrote the URIs instead: three separate `A_NS`\n * constants and seven copies of the same `xmlns:a`/`xmlns:r`/`xmlns:p` triple. This module has\n * **no runtime imports**, and no module beside it imports from `gen/` or `read/`, so both sides can\n * reach it and neither pays for the other's dependencies. The two that fail loudly reach outside\n * `ooxml/` for that alone: `sequence.ts` for `errors.ts`, and `check-enum.ts` for `errors.ts` and\n * `diagnostics.ts`. `read/oxml/dom.ts` re-exports it, so no read-side import path changed.\n */\n\n/** Canonical OOXML prefix → namespace URI registry. */\nexport const OOXML_NS = Object.freeze({\n\ta: 'http://schemas.openxmlformats.org/drawingml/2006/main',\n\ta14: 'http://schemas.microsoft.com/office/drawing/2010/main',\n\tasvg: 'http://schemas.microsoft.com/office/drawing/2016/SVG/main',\n\tc: 'http://schemas.openxmlformats.org/drawingml/2006/chart',\n\tc15: 'http://schemas.microsoft.com/office/drawing/2012/chart',\n\tcp: 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties',\n\tct: 'http://schemas.openxmlformats.org/package/2006/content-types',\n\tcx: 'http://schemas.microsoft.com/office/drawing/2014/chartex',\n\tdc: 'http://purl.org/dc/elements/1.1/',\n\tdcterms: 'http://purl.org/dc/terms/',\n\tdgm: 'http://schemas.openxmlformats.org/drawingml/2006/diagram',\n\tdsp: 'http://schemas.microsoft.com/office/drawing/2008/diagram',\n\tep: 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties',\n\tm: 'http://schemas.openxmlformats.org/officeDocument/2006/math',\n\tmc: 'http://schemas.openxmlformats.org/markup-compatibility/2006',\n\tp: 'http://schemas.openxmlformats.org/presentationml/2006/main',\n\tp14: 'http://schemas.microsoft.com/office/powerpoint/2010/main',\n\tp15: 'http://schemas.microsoft.com/office/powerpoint/2012/main',\n\tp159: 'http://schemas.microsoft.com/office/powerpoint/2015/9/main',\n\tp188: 'http://schemas.microsoft.com/office/powerpoint/2018/8/main',\n\tpr: 'http://schemas.openxmlformats.org/package/2006/relationships',\n\tr: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',\n\tvt: 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes',\n})\n\n/**\n * `a:graphicData/@uri` for a DrawingML table.\n *\n * The other three payloads a `p:graphicFrame` can hold name a URI that is also a namespace, so\n * they read it off {@link OOXML_NS} (`c`, `cx`, `dgm`). A table's does not: nothing binds a\n * prefix to it, and the table elements themselves are in the `a` namespace. So it lives beside\n * the registry rather than in it, which keeps every entry there a prefix a document can declare.\n */\nexport const TABLE_GRAPHIC_DATA_URI = 'http://schemas.openxmlformats.org/drawingml/2006/table'\n\n/**\n * The `xmlns` declarations every PresentationML part root carries, in the order the emitters\n * have always written them.\n *\n * Spread this **first** in a root element's attribute map: `el()` serializes attributes in\n * object-key order, so the three keys have to keep the positions the literals occupied or the\n * emitted bytes move. A root with extra attributes (`show` on `p:sld`, `def` on `a:tblStyleLst`)\n * lists them after the spread, which is where they already were.\n */\nexport const PML_ROOT_NS = Object.freeze({\n\t'xmlns:a': OOXML_NS.a,\n\t'xmlns:r': OOXML_NS.r,\n\t'xmlns:p': OOXML_NS.p,\n})\n","/**\n * OPC relationship type URIs and part content types, and the schema-URI bases they are built from.\n *\n * These are long, near-identical strings that differ in one path segment, which makes a typo\n * both easy to write and invisible on review — a wrong URI does not throw, it silently matches\n * nothing on the read side and produces a part PowerPoint ignores or rejects on the write side.\n *\n * **Why this module is neither `gen/` nor `read/`.** Both halves need the same URIs, and for a\n * while each kept its own copy (`gen/oxml/schema-uris.ts`, `read/api/rel-types.ts`), with a note\n * in both saying a shared home was \"a separate decision\". It is this module: a rel type is a fact\n * about the OOXML package format, not about writing or reading one, so neither side should own it.\n * A divergence between the two copies would mean the writer emitting a rel the reader cannot find\n * — a round-trip bug with no compile-time signal.\n *\n * Only types used by more than one module live here. A rel type exactly one module cares about\n * (`tags`, `oleObject`, the modern comments part, …) stays declared next to the code that reads or\n * emits it — hoisting those would trade a definition you can see for one you have to go and find,\n * and buy nothing. A writer and a reader of the same part count as two modules even when each\n * names the string once: that pair is exactly the divergence this module exists to prevent.\n *\n * The same reasoning covers **part content types**, which are the same kind of fact and fail the\n * same silent way, including every entry the writer's `[Content_Types].xml` declares.\n */\n\nimport { OOXML_NS } from './namespaces.js'\n\n/** Root of every ECMA-376 schema URI. Private: callers want one of the prefixes below. */\nconst SCHEMA_BASE = 'http://schemas.openxmlformats.org/'\n\n/**\n * Prefix for `.rels` `Type` URIs — append the type name (`slide`, `image`, `theme`, …).\n * Exported for the write side, which builds one-off rel types at their call sites.\n */\nexport const OFFICE_REL = SCHEMA_BASE + 'officeDocument/2006/relationships/'\n\n/** `xmlns` of every `<Relationships>` part. Also the prefix of the package-scoped rel types. */\nexport const PACKAGE_REL_NS = OOXML_NS.pr\n\n/**\n * Prefix for the Microsoft rel types this library emits and reads. Exported for the same reason\n * as {@link OFFICE_REL}: a rel type only one module names is built from it at that module's call site.\n */\nexport const MS_REL = 'http://schemas.microsoft.com/office/'\n\n/** `p:sldIdLst` → a slide part. */\nexport const SLIDE_REL = OFFICE_REL + 'slide'\n/** A slide → its layout; a master → each of its layouts. */\nexport const SLIDE_LAYOUT_REL = OFFICE_REL + 'slideLayout'\n/** A layout → its master; the presentation → each master. */\nexport const SLIDE_MASTER_REL = OFFICE_REL + 'slideMaster'\n/** A slide → its notes slide. */\nexport const NOTES_SLIDE_REL = OFFICE_REL + 'notesSlide'\n/** A notes slide → the notes master; the presentation → the notes master. */\nexport const NOTES_MASTER_REL = OFFICE_REL + 'notesMaster'\n/** A master or notes master → its theme. Layouts and slides inherit it rather than holding one. */\nexport const THEME_REL = OFFICE_REL + 'theme'\n/** The package root → `ppt/presentation.xml`. The entry point to everything above. */\nexport const OFFICE_DOCUMENT_REL = OFFICE_REL + 'officeDocument'\n/** Any part → an image in `ppt/media/`. */\nexport const IMAGE_REL = OFFICE_REL + 'image'\n/** Any part → an external or internal jump target. External ones carry `TargetMode=\"External\"`. */\nexport const HYPERLINK_REL = OFFICE_REL + 'hyperlink'\n/** The presentation → `ppt/tableStyles.xml`. */\nexport const TABLE_STYLES_REL = OFFICE_REL + 'tableStyles'\n/** The package root → `docProps/core.xml`. Package-scoped, so not under {@link OFFICE_REL}. */\nexport const CORE_PROPS_REL = PACKAGE_REL_NS + '/metadata/core-properties'\n/** The package root → `docProps/app.xml`. */\nexport const EXTENDED_PROPS_REL = OFFICE_REL + 'extended-properties'\n/** The package root → `docProps/custom.xml`. */\nexport const CUSTOM_PROPS_REL = OFFICE_REL + 'custom-properties'\n/** A slide → its legacy comments part (`ppt/comments/commentN.xml`). */\nexport const COMMENTS_REL = OFFICE_REL + 'comments'\n/** The presentation → the deck-wide legacy comment-author registry (`ppt/commentAuthors.xml`). */\nexport const COMMENT_AUTHORS_REL = OFFICE_REL + 'commentAuthors'\n/** The presentation → the 2018 comment-author registry (`ppt/authors.xml`), a Microsoft rel type. */\nexport const MODERN_COMMENT_AUTHORS_REL = MS_REL + '2018/10/relationships/authors'\n/** The presentation → `ppt/presProps.xml`. */\nexport const PRES_PROPS_REL = OFFICE_REL + 'presProps'\n/** The presentation → `ppt/viewProps.xml`. */\nexport const VIEW_PROPS_REL = OFFICE_REL + 'viewProps'\n/** The presentation → the handout master. */\nexport const HANDOUT_MASTER_REL = OFFICE_REL + 'handoutMaster'\n/** A part → a theme override, which replaces the deck theme for that part alone. */\nexport const THEME_OVERRIDE_REL = OFFICE_REL + 'themeOverride'\n/** The presentation → an embedded font part, one per face. */\nexport const FONT_REL = OFFICE_REL + 'font'\n\n// --- Media -----------------------------------------------------------------\n\n/** A slide → an audio blob in `ppt/media/`. Paired with {@link MS_MEDIA_REL} on the same target. */\nexport const AUDIO_REL = OFFICE_REL + 'audio'\n/** A slide → a video blob in `ppt/media/`, or an online-video placeholder. Paired with {@link MS_MEDIA_REL}. */\nexport const VIDEO_REL = OFFICE_REL + 'video'\n/**\n * The MS-2007 `media` rel every audio/video shape carries alongside the ECMA one, pointing at the\n * same target. It is what `<p14:media r:embed>` resolves, so a media shape needs both.\n */\nexport const MS_MEDIA_REL = MS_REL + '2007/relationships/media'\n/** A slide → an embedded 3D model (`.glb`). Note `2017/06`, not the `2017` of the model3d namespace. */\nexport const MODEL3D_REL = MS_REL + '2017/06/relationships/model3d'\n\n// --- Charts and embeddings -------------------------------------------------\n\n/** A slide → a classic (`c:`) chart part. */\nexport const CHART_REL = OFFICE_REL + 'chart'\n/** A slide → a chartEx (`cx:`, Office 2016) chart part — an MS rel, not the ECMA `chart` one. */\nexport const CHARTEX_REL = MS_REL + '2014/relationships/chartEx'\n/** A chart part → its mandatory style sidecar. */\nexport const CHART_STYLE_REL = MS_REL + '2011/relationships/chartStyle'\n/** A chart part → its mandatory colour-style sidecar. */\nexport const CHART_COLOR_STYLE_REL = MS_REL + '2011/relationships/chartColorStyle'\n/** Any part → an embedded OPC package (an Office file, itself a zip): a chart's workbook, an OLE payload. */\nexport const PACKAGE_REL = OFFICE_REL + 'package'\n\n// --- Part content types ----------------------------------------------------\n\n/**\n * Root of the ECMA-376 content types. Exported for a content type only one module names, which is\n * built from it at that module's call site; a shared one is a constant below.\n */\nexport const OD_CONTENT = 'application/vnd.openxmlformats-officedocument.'\n/** Root of the OPC package-level content types. Private: callers want one of the constants below. */\nconst PACKAGE_CONTENT = 'application/vnd.openxmlformats-package.'\n/** Root of the Microsoft Office content types the chartEx family uses. Private. */\nconst MS_OFFICE_CONTENT = 'application/vnd.ms-office.'\n/** Root of the PowerPoint-specific Microsoft content types. Exported for the same reason as {@link OD_CONTENT}. */\nexport const MS_POWERPOINT_CONTENT = 'application/vnd.ms-powerpoint.'\n\n/** `ppt/slides/slideN.xml`. */\nexport const SLIDE_CONTENT_TYPE = OD_CONTENT + 'presentationml.slide+xml'\n\n/** `ppt/slideMasters/slideMasterN.xml`. */\nexport const SLIDE_MASTER_CONTENT_TYPE = OD_CONTENT + 'presentationml.slideMaster+xml'\n/** `ppt/slideLayouts/slideLayoutN.xml`. */\nexport const SLIDE_LAYOUT_CONTENT_TYPE = OD_CONTENT + 'presentationml.slideLayout+xml'\n/** `ppt/notesSlides/notesSlideN.xml`. */\nexport const NOTES_SLIDE_CONTENT_TYPE = OD_CONTENT + 'presentationml.notesSlide+xml'\n/** `ppt/notesMasters/notesMasterN.xml`. */\nexport const NOTES_MASTER_CONTENT_TYPE = OD_CONTENT + 'presentationml.notesMaster+xml'\n/** `ppt/theme/themeN.xml`. Not `presentationml.`: a theme is a DrawingML part. */\nexport const THEME_CONTENT_TYPE = OD_CONTENT + 'theme+xml'\n/** `ppt/tableStyles.xml`. */\nexport const TABLE_STYLES_CONTENT_TYPE = OD_CONTENT + 'presentationml.tableStyles+xml'\n/** `ppt/presentation.xml` in an editable `.pptx`. A `.potx` template's main part is a different one. */\nexport const PRESENTATION_MAIN_CONTENT_TYPE = OD_CONTENT + 'presentationml.presentation.main+xml'\n/** Every `.rels` part. Declared once as a `Default` for the `rels` extension, never as an Override. */\nexport const RELATIONSHIPS_CONTENT_TYPE = PACKAGE_CONTENT + 'relationships+xml'\n/** `ppt/presProps.xml`. */\nexport const PRES_PROPS_CONTENT_TYPE = OD_CONTENT + 'presentationml.presProps+xml'\n/** `ppt/viewProps.xml`. */\nexport const VIEW_PROPS_CONTENT_TYPE = OD_CONTENT + 'presentationml.viewProps+xml'\n/** `ppt/comments/commentN.xml`, a legacy comments part. */\nexport const COMMENTS_CONTENT_TYPE = OD_CONTENT + 'presentationml.comments+xml'\n/** `ppt/commentAuthors.xml`. */\nexport const COMMENT_AUTHORS_CONTENT_TYPE = OD_CONTENT + 'presentationml.commentAuthors+xml'\n/** `docProps/core.xml`. Package-scoped, so not under the officedocument prefix. */\nexport const CORE_PROPS_CONTENT_TYPE = PACKAGE_CONTENT + 'core-properties+xml'\n/** `docProps/app.xml`. */\nexport const EXTENDED_PROPS_CONTENT_TYPE = OD_CONTENT + 'extended-properties+xml'\n/** `docProps/custom.xml`. */\nexport const CUSTOM_PROPS_CONTENT_TYPE = OD_CONTENT + 'custom-properties+xml'\n/** `ppt/charts/chartN.xml`, a classic (`c:`) chart. */\nexport const CHART_CONTENT_TYPE = OD_CONTENT + 'drawingml.chart+xml'\n/** `ppt/charts/chartExN.xml`. A chartEx part carries a Microsoft content type, not an `openxmlformats` one. */\nexport const CHARTEX_CONTENT_TYPE = MS_OFFICE_CONTENT + 'chartex+xml'\n/** A chart's mandatory `style{N}.xml` sidecar. */\nexport const CHART_STYLE_CONTENT_TYPE = MS_OFFICE_CONTENT + 'chartstyle+xml'\n/** A chart's mandatory `colors{N}.xml` sidecar. */\nexport const CHART_COLOR_STYLE_CONTENT_TYPE = MS_OFFICE_CONTENT + 'chartcolorstyle+xml'\n/** An embedded `.xlsx` workbook: a chart's data, or an OLE payload. */\nexport const XLSX_CONTENT_TYPE = OD_CONTENT + 'spreadsheetml.sheet'\n/**\n * A whole `.pptx` package: the MIME type of a written deck, and of one embedded as an OLE payload.\n * Declared in `pptx-content-type.ts`, so the `zip` entry can import it without this table.\n */\nexport { PPTX_CONTENT_TYPE } from './pptx-content-type.js'\n/** The handout master part. */\nexport const HANDOUT_MASTER_CONTENT_TYPE = OD_CONTENT + 'presentationml.handoutMaster+xml'\n/** A theme override part. Not `presentationml.`: like a theme, it is a DrawingML part. */\nexport const THEME_OVERRIDE_CONTENT_TYPE = OD_CONTENT + 'themeOverride+xml'\n/** The 2018 comment-author registry. A PowerPoint content type, not an `openxmlformats` one. */\nexport const MODERN_COMMENT_AUTHORS_CONTENT_TYPE = MS_POWERPOINT_CONTENT + 'authors+xml'\n\n// --- Parts a page points at without owning ---------------------------------\n\n/**\n * How far a shared part's ownership reaches.\n *\n * - `deck`: chrome the whole deck owns — masters, layouts, themes, the property parts, the author\n * registries. A page points at it and never owns it, and it is not an orphan just because the\n * slide that last reached it is gone.\n * - `media`: a blob PowerPoint stores once and points every shape that shows it at. Page copies\n * share it, but one that nothing references any more is an orphan.\n * - `page`: another page, or an external link. A page copy points at whichever copy of the target\n * the import chose.\n */\nexport type SharedPartScope = 'deck' | 'media' | 'page'\n\n/** One kind of part a page may point at without owning it. */\nexport interface SharedPartKind {\n\t/** The relationship type a page reaches it by. */\n\treadonly relType: string\n\t/** Its content type, or `null` where nothing matches a part of this kind by content type. */\n\treadonly contentType: string | null\n\treadonly scope: SharedPartScope\n}\n\n/**\n * Every kind of part a page points at without owning it.\n *\n * Two questions read this table, under different keys. Copying a page asks whether a relationship's\n * target may be shared by the copies rather than copied (every row, by `relType`). Pruning after a\n * slide is removed asks whether a part is deck chrome that stays even while nothing reaches it (the\n * `deck` rows, by `contentType`). They were two hand-kept lists, and the two author registries were\n * on the first and missing from the second.\n */\nexport const SHARED_PARTS: readonly SharedPartKind[] = [\n\t{ relType: SLIDE_LAYOUT_REL, contentType: SLIDE_LAYOUT_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: SLIDE_MASTER_REL, contentType: SLIDE_MASTER_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: NOTES_MASTER_REL, contentType: NOTES_MASTER_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: THEME_REL, contentType: THEME_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: THEME_OVERRIDE_REL, contentType: THEME_OVERRIDE_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: HANDOUT_MASTER_REL, contentType: HANDOUT_MASTER_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: PRES_PROPS_REL, contentType: PRES_PROPS_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: VIEW_PROPS_REL, contentType: VIEW_PROPS_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: TABLE_STYLES_REL, contentType: TABLE_STYLES_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: OFFICE_DOCUMENT_REL, contentType: PRESENTATION_MAIN_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: COMMENT_AUTHORS_REL, contentType: COMMENT_AUTHORS_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: MODERN_COMMENT_AUTHORS_REL, contentType: MODERN_COMMENT_AUTHORS_CONTENT_TYPE, scope: 'deck' },\n\t{ relType: IMAGE_REL, contentType: null, scope: 'media' },\n\t{ relType: AUDIO_REL, contentType: null, scope: 'media' },\n\t{ relType: VIDEO_REL, contentType: null, scope: 'media' },\n\t{ relType: MS_MEDIA_REL, contentType: null, scope: 'media' },\n\t{ relType: MODEL3D_REL, contentType: null, scope: 'media' },\n\t{ relType: FONT_REL, contentType: null, scope: 'media' },\n\t{ relType: SLIDE_REL, contentType: null, scope: 'page' },\n\t{ relType: HYPERLINK_REL, contentType: null, scope: 'page' },\n]\n","/**\n * `ST_` simple-type enumerations from ECMA-376, declared once as the single source of both the\n * TypeScript union a caller is checked against and the runtime list a value is validated against.\n *\n * **The problem this solves.** Each of these used to exist twice: a hand-written string union in\n * `src/types/` (what the compiler enforces) and a hand-written array in `src/gen/` or `src/read/`\n * (what the validator checks at run time). Nothing tied the two together, so adding a member to\n * one and not the other produced either a value TypeScript accepts and the validator drops, or a\n * value the validator passes and the type rejects. Two of them had already diverged in *order*,\n * which is harmless, but nothing would have caught a divergence in *content*.\n *\n * **The shape.** Every entry is a `readonly` tuple declared `as const`, with its union derived via\n * `(typeof X)[number]`. Widening the tuple widens the union in the same edit — they cannot drift.\n * This is the idiom `EXTRA_SHAPE_PRESETS` already used; this module brings the stragglers onto it,\n * and holds a few closed schema lists that are not `ST_` types, such as `EMBEDDED_FONT_SLOTS`.\n *\n * **Why this module is neither `gen/` nor `read/`.** `src/types/` needs the unions for the public\n * write API, `src/gen/` needs the tuples to vet a value before emitting it, and `src/read/` needs\n * them to vet a value before writing it into a loaded part. It is a fact about the schema, so it\n * belongs to none of the three.\n *\n * Values are listed in **schema declaration order**, which is the order the diagnostics print\n * when they tell a caller what is legal.\n *\n * **The chart option bag reads its enumerations from here**: `BarDirection`, `BarGrouping`,\n * `Bar3DShape`, `LegendPosition`, `DisplayBlanksAs`, `DataLabelPosition` and `LineDataSymbol`\n * first, then the axis and error-bar ones. They were the half of this consolidation that went\n * unfinished for a while. `src/types/chart.ts`\n * hand-wrote four of those unions beside the option that takes them and typed the other three as\n * bare `string`, so `barDir` carried no compile-time check at all, and `dataLabelPosition`'s\n * hand-written union was missing `inBase` — a value the validator accepts on a stacked bar, so\n * the two spellings had already diverged in content. Both are gone: for every option here, the\n * type a caller is checked against and the tuple the validator checks are one declaration.\n */\n\n/** `ST_TextAutonumberScheme` — the numbering an auto-numbered bullet counts in (`a:buAutoNum/@type`). */\nexport const TEXT_AUTONUM_SCHEMES = [\n\t'alphaLcParenBoth',\n\t'alphaUcParenBoth',\n\t'alphaLcParenR',\n\t'alphaUcParenR',\n\t'alphaLcPeriod',\n\t'alphaUcPeriod',\n\t'arabicParenBoth',\n\t'arabicParenR',\n\t'arabicPeriod',\n\t'arabicPlain',\n\t'romanLcParenBoth',\n\t'romanUcParenBoth',\n\t'romanLcParenR',\n\t'romanUcParenR',\n\t'romanLcPeriod',\n\t'romanUcPeriod',\n\t'circleNumDbPlain',\n\t'circleNumWdBlackPlain',\n\t'circleNumWdWhitePlain',\n\t'arabicDbPeriod',\n\t'arabicDbPlain',\n\t'ea1ChsPeriod',\n\t'ea1ChsPlain',\n\t'ea1ChtPeriod',\n\t'ea1ChtPlain',\n\t'ea1JpnChsDbPeriod',\n\t'ea1JpnKorPlain',\n\t'ea1JpnKorPeriod',\n\t'arabic1Minus',\n\t'arabic2Minus',\n\t'hebrew2Minus',\n\t'thaiAlphaPeriod',\n\t'thaiAlphaParenR',\n\t'thaiAlphaParenBoth',\n\t'thaiNumPeriod',\n\t'thaiNumParenR',\n\t'thaiNumParenBoth',\n\t'hindiAlphaPeriod',\n\t'hindiNumPeriod',\n\t'hindiNumParenR',\n\t'hindiAlpha1Period',\n] as const\n\n/** `ST_TextStrikeType` — a run's strikethrough (`a:rPr/@strike`). */\nexport const TEXT_STRIKE_TYPES = ['noStrike', 'sngStrike', 'dblStrike'] as const\n\n/** `ST_TextCapsType` — a run's capitalization (`a:rPr/@cap`). */\nexport const TEXT_CAPS_TYPES = ['none', 'small', 'all'] as const\n\n/** `ST_TextUnderlineType` — a run's underline (`a:rPr/@u`). */\nexport const TEXT_UNDERLINE_TYPES = [\n\t'none',\n\t'words',\n\t'sng',\n\t'dbl',\n\t'heavy',\n\t'dotted',\n\t'dottedHeavy',\n\t'dash',\n\t'dashHeavy',\n\t'dashLong',\n\t'dashLongHeavy',\n\t'dotDash',\n\t'dotDashHeavy',\n\t'dotDotDash',\n\t'dotDotDashHeavy',\n\t'wavy',\n\t'wavyHeavy',\n\t'wavyDbl',\n] as const\n\n/** `ST_TextTabAlignType` — a tab stop's alignment (`a:tab/@algn`). */\nexport const TEXT_TAB_ALIGN_TYPES = ['l', 'ctr', 'r', 'dec'] as const\n\n/**\n * `ST_SchemeColorVal` — a theme colour reference (`a:schemeClr/@val`). Wider than\n * {@link THEME_COLOR_SLOTS}: it adds the `bg1`/`tx1`/`bg2`/`tx2` aliases the colour map resolves,\n * and `phClr`, the colour a theme style-matrix entry is applied in.\n */\nexport const SCHEME_COLOR_VALUES = [\n\t'bg1',\n\t'tx1',\n\t'bg2',\n\t'tx2',\n\t'accent1',\n\t'accent2',\n\t'accent3',\n\t'accent4',\n\t'accent5',\n\t'accent6',\n\t'hlink',\n\t'folHlink',\n\t'phClr',\n\t'dk1',\n\t'lt1',\n\t'dk2',\n\t'lt2',\n] as const\n\n/** `ST_TransitionSpeed` — a transition's coarse speed bucket (`p:transition/@spd`). */\nexport const TRANSITION_SPEEDS = ['slow', 'med', 'fast'] as const\n\n/**\n * The base slide transitions: the `p:` type elements of `CT_SlideTransition`'s choice, in its\n * declaration order. The writer emits the type as `<p:TYPE/>`, so this is also the list a type is\n * checked against before it becomes an element name, and the list the script converter uses to\n * decide which read transitions the write API can express. PowerPoint's modern transitions live in\n * other namespaces and are not here.\n */\nexport const TRANSITION_TYPES = [\n\t'blinds',\n\t'checker',\n\t'circle',\n\t'dissolve',\n\t'comb',\n\t'cover',\n\t'cut',\n\t'diamond',\n\t'fade',\n\t'newsflash',\n\t'plus',\n\t'pull',\n\t'push',\n\t'random',\n\t'randomBar',\n\t'split',\n\t'strips',\n\t'wedge',\n\t'wheel',\n\t'wipe',\n\t'zoom',\n] as const\n\n/**\n * The attributes each of {@link TRANSITION_TYPES} declares, which is every key a transition's\n * `variant` can write. Seven are `CT_Empty` and take none.\n */\nexport const TRANSITION_VARIANT_ATTRIBUTES: Readonly<Record<(typeof TRANSITION_TYPES)[number], readonly string[]>> = {\n\tblinds: ['dir'],\n\tchecker: ['dir'],\n\tcircle: [],\n\tdissolve: [],\n\tcomb: ['dir'],\n\tcover: ['dir'],\n\tcut: ['thruBlk'],\n\tdiamond: [],\n\tfade: ['thruBlk'],\n\tnewsflash: [],\n\tplus: [],\n\tpull: ['dir'],\n\tpush: ['dir'],\n\trandom: [],\n\trandomBar: ['dir'],\n\tsplit: ['orient', 'dir'],\n\tstrips: ['dir'],\n\twedge: [],\n\twheel: ['spokes'],\n\twipe: ['dir'],\n\tzoom: ['dir'],\n}\n\n/**\n * `ST_BevelPresetType` — the bevel profile applied to a 3-D edge.\n * @see ECMA-376 Part 1 §20.1.10.9\n */\nexport const BEVEL_PRESETS = [\n\t'relaxedInset',\n\t'circle',\n\t'slope',\n\t'cross',\n\t'angle',\n\t'softRound',\n\t'convex',\n\t'coolSlant',\n\t'divot',\n\t'riblet',\n\t'hardEdge',\n\t'artDeco',\n] as const\nexport type BevelPresetType = (typeof BEVEL_PRESETS)[number]\n\n/**\n * `ST_PresetMaterialType` — how a 3-D surface responds to light.\n * @see ECMA-376 Part 1 §20.1.10.50\n */\nexport const PRESET_MATERIALS = [\n\t'legacyMatte',\n\t'legacyPlastic',\n\t'legacyMetal',\n\t'legacyWireframe',\n\t'matte',\n\t'plastic',\n\t'metal',\n\t'warmMatte',\n\t'translucentPowder',\n\t'powder',\n\t'dkEdge',\n\t'softEdge',\n\t'clear',\n\t'flat',\n\t'softmetal',\n] as const\nexport type PresetMaterialType = (typeof PRESET_MATERIALS)[number]\n\n/**\n * `ST_LightRigType` — the preset lighting scene.\n * @see ECMA-376 Part 1 §20.1.10.35\n */\nexport const LIGHT_RIGS = [\n\t'legacyFlat1',\n\t'legacyFlat2',\n\t'legacyFlat3',\n\t'legacyFlat4',\n\t'legacyNormal1',\n\t'legacyNormal2',\n\t'legacyNormal3',\n\t'legacyNormal4',\n\t'legacyHarsh1',\n\t'legacyHarsh2',\n\t'legacyHarsh3',\n\t'legacyHarsh4',\n\t'threePt',\n\t'balanced',\n\t'soft',\n\t'harsh',\n\t'flood',\n\t'contrasting',\n\t'morning',\n\t'sunrise',\n\t'sunset',\n\t'chilly',\n\t'freezing',\n\t'flat',\n\t'twoPt',\n\t'glow',\n\t'brightRoom',\n] as const\nexport type LightRigType = (typeof LIGHT_RIGS)[number]\n\n/**\n * `ST_LightRigDirection` — where the light rig sits relative to the scene.\n * @see ECMA-376 Part 1 §20.1.10.33\n */\nexport const LIGHT_RIG_DIRECTIONS = ['tl', 't', 'tr', 'l', 'r', 'bl', 'b', 'br'] as const\nexport type LightRigDirection = (typeof LIGHT_RIG_DIRECTIONS)[number]\n\n/**\n * `ST_TextHorzOverflowType` — `a:bodyPr/@horzOverflow` and `a:tcPr/@horzOverflow`.\n * @see ECMA-376 Part 1 §20.1.10.68\n */\nexport const TEXT_HORZ_OVERFLOW = ['clip', 'overflow'] as const\nexport type TextHorzOverflowType = (typeof TEXT_HORZ_OVERFLOW)[number]\n\n/**\n * `ST_TextAnchoringType` — `a:bodyPr/@anchor` and `a:tcPr/@anchor`.\n * @see ECMA-376 Part 1 §20.1.10.60\n */\nexport const TEXT_ANCHORS = ['t', 'ctr', 'b', 'just', 'dist'] as const\n\n/** `ST_TextAlignType` — `a:pPr/@algn` and `a:lvlNpPr/@algn`. */\nexport const TEXT_ALIGN_TYPES = ['l', 'ctr', 'r', 'just', 'justLow', 'dist', 'thaiDist'] as const\n\n/**\n * `ST_TextVerticalType` — `a:bodyPr/@vert` and `a:tcPr/@vert`.\n * @see ECMA-376 Part 1 §20.1.10.83\n */\nexport const TEXT_VERTICAL = [\n\t'horz',\n\t'vert',\n\t'vert270',\n\t'wordArtVert',\n\t'eaVert',\n\t'mongolianVert',\n\t'wordArtVertRtl',\n] as const\nexport type TextVerticalType = (typeof TEXT_VERTICAL)[number]\n\n/**\n * `ST_LineEndType` — the arrowhead at either end of a stroke (`a:headEnd/@type`,\n * `a:tailEnd/@type`).\n * @see ECMA-376 Part 1 §20.1.10.33\n */\nexport const LINE_END_TYPES = ['none', 'triangle', 'stealth', 'diamond', 'oval', 'arrow'] as const\n\n/** `ST_LineCap` — how a stroke's ends are drawn (`a:ln/@cap`). */\nexport const LINE_CAPS = ['rnd', 'sq', 'flat'] as const\n\n/**\n * The four face slots of `CT_EmbeddedFontListEntry`, in schema child order (`p:font` first, then\n * these). Not an `ST_` type, but a closed, ordered set the schema declares, like\n * {@link THEME_COLOR_SLOTS}. The read and write sides iterate it so their emitters agree on\n * element order, and `sequence.ts` derives `EMBEDDED_FONT_ENTRY_SEQUENCE` from it, so the order\n * the serializer writes and the order the insertion points are computed from are one fact.\n * `embedded-fonts.ts` re-exports it.\n */\nexport const EMBEDDED_FONT_SLOTS = ['regular', 'bold', 'italic', 'boldItalic'] as const\nexport type LineEndType = (typeof LINE_END_TYPES)[number]\n\n/**\n * `ST_TextShapeType` — the preset path text is bent along (`a:prstTxWarp/@prst`), which\n * PowerPoint calls WordArt.\n *\n * `textNoShape` is the identity member: it is legal, and it warps nothing. The library does not\n * narrow this set — every member is a shape PowerPoint draws.\n * @see ECMA-376 Part 1 §20.1.10.76\n */\nexport const TEXT_SHAPE_TYPES = [\n\t'textNoShape',\n\t'textPlain',\n\t'textStop',\n\t'textTriangle',\n\t'textTriangleInverted',\n\t'textChevron',\n\t'textChevronInverted',\n\t'textRingInside',\n\t'textRingOutside',\n\t'textArchUp',\n\t'textArchDown',\n\t'textCircle',\n\t'textButton',\n\t'textArchUpPour',\n\t'textArchDownPour',\n\t'textCirclePour',\n\t'textButtonPour',\n\t'textCurveUp',\n\t'textCurveDown',\n\t'textCanUp',\n\t'textCanDown',\n\t'textWave1',\n\t'textWave2',\n\t'textDoubleWave1',\n\t'textWave4',\n\t'textInflate',\n\t'textDeflate',\n\t'textInflateBottom',\n\t'textDeflateBottom',\n\t'textInflateTop',\n\t'textDeflateTop',\n\t'textDeflateInflate',\n\t'textDeflateInflateDeflate',\n\t'textFadeRight',\n\t'textFadeLeft',\n\t'textFadeUp',\n\t'textFadeDown',\n\t'textSlantUp',\n\t'textSlantDown',\n\t'textCascadeUp',\n\t'textCascadeDown',\n] as const\nexport type TextShapeType = (typeof TEXT_SHAPE_TYPES)[number]\n\n/**\n * `ST_PresetLineDashVal` — the dash pattern of a line or border (`a:prstDash/@val`).\n *\n * The `sys*` members are the \"system\" dashes whose exact dot/gap ratio the renderer picks; the\n * rest are defined by the spec. Both `BorderProps.dashType` and `ShapeLineProps.dashType` accept\n * this whole set, so a caller who knows one knows the other.\n * @see ECMA-376 Part 1 §20.1.10.49\n */\nexport const PRESET_LINE_DASHES = [\n\t'solid',\n\t'dot',\n\t'dash',\n\t'lgDash',\n\t'dashDot',\n\t'lgDashDot',\n\t'lgDashDotDot',\n\t'sysDash',\n\t'sysDot',\n\t'sysDashDot',\n\t'sysDashDotDot',\n] as const\nexport type PresetLineDashVal = (typeof PRESET_LINE_DASHES)[number]\n\n/**\n * `ST_BarDir` — whether a bar/column plot runs horizontally or vertically (`c:barDir/@val`).\n * @see ECMA-376 Part 1 §21.2.3.3\n */\nexport const BAR_DIRECTIONS = ['bar', 'col'] as const\nexport type BarDirection = (typeof BAR_DIRECTIONS)[number]\n\n/**\n * `ST_BarGrouping` — how a bar/column plot stacks its series (`c:grouping/@val` inside\n * `c:barChart`/`c:bar3DChart`).\n * @see ECMA-376 Part 1 §21.2.3.4\n */\nexport const BAR_GROUPINGS = ['percentStacked', 'clustered', 'standard', 'stacked'] as const\nexport type BarGrouping = (typeof BAR_GROUPINGS)[number]\n\n/**\n * `ST_Grouping` — the same decision for the plots that have no clustered form\n * (`c:areaChart`, `c:lineChart`).\n * @see ECMA-376 Part 1 §21.2.3.17\n */\nexport const GROUPINGS = ['percentStacked', 'standard', 'stacked'] as const\nexport type Grouping = (typeof GROUPINGS)[number]\n\n/**\n * `ST_Shape` — the solid a 3-D bar is drawn as (`c:shape/@val`).\n * @see ECMA-376 Part 1 §21.2.3.35\n */\nexport const BAR_3D_SHAPES = ['cone', 'coneToMax', 'box', 'cylinder', 'pyramid', 'pyramidToMax'] as const\nexport type Bar3DShape = (typeof BAR_3D_SHAPES)[number]\n\n/**\n * `ST_RadarStyle` — how a radar plot is drawn (`c:radarStyle/@val`).\n * @see ECMA-376 Part 1 §21.2.3.33\n */\nexport const RADAR_STYLES = ['standard', 'marker', 'filled'] as const\nexport type RadarStyle = (typeof RADAR_STYLES)[number]\n\n/**\n * This library's own names for two of the three radar styles, mapped to the wire spelling each\n * one means. They are the PowerPoint UI's words (\"Radar\", \"Radar with Markers\"), which is why\n * they were chosen; `filled` needed no rename and is already the schema's own spelling, which is\n * what made the other two read as typos rather than as a second vocabulary.\n *\n * Both spellings are accepted on the public option and normalized to the wire one at definition\n * time. Before that, `radarStyle: 'marker'` — the schema's word, and the obvious guess for anyone\n * reading a chart part — failed the enum check and silently fell back to `standard`, so a caller\n * asking for markers got a plain radar.\n */\nexport const RADAR_STYLE_ALIASES = { radar: 'standard', markers: 'marker' } as const\nexport type RadarStyleAlias = keyof typeof RADAR_STYLE_ALIASES\n/**\n * The alias spellings alone, for the definer's enum check. Derived from the map rather than\n * written out again — the whole point of this module is that the list a value is validated\n * against and the union it is typed against cannot drift apart.\n */\nexport const RADAR_STYLE_ALIAS_NAMES = Object.keys(RADAR_STYLE_ALIASES) as readonly RadarStyleAlias[]\n\n/**\n * `ST_LegendPos` — where the legend sits relative to the plot area (`c:legendPos/@val`).\n * @see ECMA-376 Part 1 §21.2.3.24\n */\nexport const LEGEND_POSITIONS = ['b', 'tr', 'l', 'r', 't'] as const\nexport type LegendPosition = (typeof LEGEND_POSITIONS)[number]\n\n/**\n * `ST_DispBlanksAs` — what a plot draws where a value is missing (`c:dispBlanksAs/@val`).\n * @see ECMA-376 Part 1 §21.2.3.10\n */\nexport const DISPLAY_BLANKS_AS = ['span', 'gap', 'zero'] as const\nexport type DisplayBlanksAs = (typeof DISPLAY_BLANKS_AS)[number]\n\n/**\n * `ST_DLblPos` — where a data label sits relative to its point (`c:dLblPos/@val`).\n *\n * The whole set is legal on the attribute, but only a subset of it is legal *per plot type* —\n * PowerPoint offers a pie chart `bestFit`/`ctr`/`inEnd`/`outEnd` and nothing else. Those subsets\n * are a fact about the chart types rather than about the attribute, so they live beside the\n * chart definer that applies them; this is the value space they are drawn from.\n * @see ECMA-376 Part 1 §21.2.3.13\n */\nexport const DATA_LABEL_POSITIONS = ['bestFit', 'b', 'ctr', 'inBase', 'inEnd', 'l', 'outEnd', 'r', 't'] as const\nexport type DataLabelPosition = (typeof DATA_LABEL_POSITIONS)[number]\n\n/**\n * `ST_MarkerStyle`, **narrowed** to what the library authors (`c:symbol/@val`).\n *\n * The schema also has `plus`, `star`, `x`, `picture` and `auto`. Neither PowerPoint 2013 nor\n * PowerPoint Online draws the first three, `picture` needs a `c:spPr` blip this API has no\n * spelling for, and `auto` is what leaving the option off already means — so the accepted set is\n * deliberately smaller than the type. Widen it only with evidence that the member renders.\n * @see ECMA-376 Part 1 §21.2.3.27\n */\nexport const LINE_DATA_SYMBOLS = ['circle', 'dash', 'diamond', 'dot', 'none', 'square', 'triangle'] as const\nexport type LineDataSymbol = (typeof LINE_DATA_SYMBOLS)[number]\n\n/** `ST_TickLblPos` — where an axis draws its tick labels (`c:tickLblPos/@val`). */\nexport const TICK_LABEL_POSITIONS = ['high', 'low', 'nextTo', 'none'] as const\nexport type TickLabelPosition = (typeof TICK_LABEL_POSITIONS)[number]\n\n/** `ST_Orientation` — which way an axis runs (`c:orientation/@val`). */\nexport const AXIS_ORIENTATIONS = ['maxMin', 'minMax'] as const\nexport type AxisOrientation = (typeof AXIS_ORIENTATIONS)[number]\n\n/** `ST_TickMark` — an axis' major or minor tick marks (`c:majorTickMark/@val`, `c:minorTickMark/@val`). */\nexport const TICK_MARKS = ['cross', 'in', 'none', 'out'] as const\nexport type TickMark = (typeof TICK_MARKS)[number]\n\n/** `ST_CrossBetween` — whether a value axis crosses its category axis between or on categories (`c:crossBetween/@val`). */\nexport const CROSS_BETWEEN = ['between', 'midCat'] as const\nexport type CrossBetween = (typeof CROSS_BETWEEN)[number]\n\n/** `ST_BuiltInUnit` — the unit a value axis displays its labels in (`c:builtInUnit/@val`). */\nexport const BUILT_IN_UNITS = [\n\t'hundreds',\n\t'thousands',\n\t'tenThousands',\n\t'hundredThousands',\n\t'millions',\n\t'tenMillions',\n\t'hundredMillions',\n\t'billions',\n\t'trillions',\n] as const\nexport type BuiltInUnit = (typeof BUILT_IN_UNITS)[number]\n\n/** `ST_TimeUnit` — a date axis' base, major or minor time unit (`c:baseTimeUnit/@val` and its two siblings). */\nexport const TIME_UNITS = ['days', 'months', 'years'] as const\nexport type TimeUnit = (typeof TIME_UNITS)[number]\n\n/** `ST_ErrDir` — the axis an error bar measures along (`c:errDir/@val`). */\nexport const ERROR_BAR_DIRECTIONS = ['x', 'y'] as const\nexport type ErrorBarDirection = (typeof ERROR_BAR_DIRECTIONS)[number]\n\n/** `ST_ErrBarType` — which sides of a point draw an error bar (`c:errBarType/@val`). */\nexport const ERROR_BAR_TYPES = ['both', 'minus', 'plus'] as const\nexport type ErrorBarType = (typeof ERROR_BAR_TYPES)[number]\n\n/** `ST_ErrValType` — how an error bar's amount is read (`c:errValType/@val`). */\nexport const ERROR_BAR_VALUE_TYPES = ['cust', 'fixedVal', 'percentage', 'stdDev', 'stdErr'] as const\nexport type ErrorBarValueType = (typeof ERROR_BAR_VALUE_TYPES)[number]\n\n/**\n * The twelve theme colour slots (`a:clrScheme` children) a `p:clrMap` token can point at.\n *\n * Not an `ST_` type — these are element names inside `a:CT_ColorScheme`, which the schema\n * declares as a fixed sequence rather than an enumeration. The effect is the same: a closed,\n * ordered set of twelve names, in the order the scheme declares them.\n * @see ECMA-376 Part 1 §20.1.6.2\n */\nexport const THEME_COLOR_SLOTS = [\n\t'dk1',\n\t'lt1',\n\t'dk2',\n\t'lt2',\n\t'accent1',\n\t'accent2',\n\t'accent3',\n\t'accent4',\n\t'accent5',\n\t'accent6',\n\t'hlink',\n\t'folHlink',\n] as const\nexport type ThemeColorSlot = (typeof THEME_COLOR_SLOTS)[number]\n\n/**\n * The twelve colour-map tokens (`p:clrMap` attributes), in schema attribute order.\n *\n * A slide's `schemeClr val=\"tx1\"` names a *token*, not a slot: the master's `p:clrMap` is the\n * indirection that sends it to a {@link ThemeColorSlot}. Which is why the two lists look alike\n * and are not the same list — `bg1`/`tx1` are tokens, `lt1`/`dk1` are slots.\n * @see ECMA-376 Part 1 §19.3.1.6\n */\nexport const COLOR_MAP_TOKENS = [\n\t'bg1',\n\t'tx1',\n\t'bg2',\n\t'tx2',\n\t'accent1',\n\t'accent2',\n\t'accent3',\n\t'accent4',\n\t'accent5',\n\t'accent6',\n\t'hlink',\n\t'folHlink',\n] as const\nexport type ColorMapToken = (typeof COLOR_MAP_TOKENS)[number]\n\n/**\n * The identity colour map: the `p:clrMap` this library emits on every master and notes master,\n * and the one the script printer recognises so it can skip printing a map that is the default.\n *\n * \"Identity\" up to the light/dark naming: each token points at the slot of the same name, with\n * `bg`/`tx` reading as light/dark. A deck that maps them anywhere else — swapping the light and\n * dark slots is the usual case — resolves every `schemeClr` in the deck differently.\n *\n * Typed `Record<ColorMapToken, ThemeColorSlot>` so a token added to {@link COLOR_MAP_TOKENS}\n * without a mapping, or a slot misspelled, is a compile error rather than a theme that opens\n * fine and paints one script in the wrong colour. Declared in the same order as the tokens,\n * because it is emitted by iterating this object and the attribute order is part of the bytes.\n */\nexport const DEFAULT_COLOR_MAP: Readonly<Record<ColorMapToken, ThemeColorSlot>> = {\n\tbg1: 'lt1',\n\ttx1: 'dk1',\n\tbg2: 'lt2',\n\ttx2: 'dk2',\n\taccent1: 'accent1',\n\taccent2: 'accent2',\n\taccent3: 'accent3',\n\taccent4: 'accent4',\n\taccent5: 'accent5',\n\taccent6: 'accent6',\n\thlink: 'hlink',\n\tfolHlink: 'folHlink',\n}\n","/**\n * ts-pptx: hex colour text, in the one spelling both halves use.\n *\n * A caller may write a colour with or without a leading `#`, and the library accepts both\n * everywhere — which means every site that validates or parses one strips it first. Those\n * strips had drifted into three spellings across six sites, and one of them was not\n * anchored: `.replace('#', '')` takes the `#` out of `'FF00#0'` and hands `'FF000'` on, which\n * then fails the six-digit test and takes a different branch than the anchored forms would.\n * No caller is known to reach that, which is exactly why it wants one spelling rather than a\n * test at each site.\n *\n * This lives at the root rather than under `gen/` or `read/` because both halves need it:\n * the emitters strip on the way in, the readers strip on the way back out — and for the same\n * reason the *validation* belongs here too. `REGEX_HEX_COLOR` used to live in\n * `constants-internal.ts`, which is a write-side module the read path cannot import, so the read\n * path re-spelled the regex; so did one write-side site. Six sites, three spellings of one fact.\n */\n\n/**\n * A colour written as six hex digits, `#` already stripped.\n *\n * Not exported: {@link isHexColor} is the whole of what the call sites want, and a shared mutable\n * `RegExp` object is a worse export than a predicate.\n */\nconst REGEX_HEX_COLOR = /^[0-9a-fA-F]{6}$/\n\n/** An 8-hex RGBA colour, `#` already stripped — {@link splitRgbaHex}'s test. */\nconst REGEX_ARGB_HEX = /^[0-9a-fA-F]{8}$/\n\n/** Strip a single leading `#` from a colour, leaving any other character alone. */\nexport function stripHash(value: string): string {\n\treturn value.startsWith('#') ? value.slice(1) : value\n}\n\n/**\n * Is `value` a 6-hex RGB colour? A leading `#` is stripped first, so both spellings agree.\n *\n * This is the *shape* test only. Whether the caller may also name a scheme colour there is the\n * call site's question, and each still asks it: `createColorElement` falls back to the default\n * font colour, `makeXmlTheme` keeps the Office default and warns, `normalizeHex` throws.\n * @param value - the caller's colour, with or without a leading `#`\n */\nexport function isHexColor(value: string): boolean {\n\treturn REGEX_HEX_COLOR.test(stripHash(value))\n}\n\n/**\n * Is `value` an 8-hex RGBA colour? A leading `#` is stripped first.\n *\n * The 8-digit form is RGB followed by one alpha byte; {@link splitRgbaHex} is what takes it apart.\n * @param value - the caller's colour, with or without a leading `#`\n */\nfunction isArgbHex(value: string): boolean {\n\treturn REGEX_ARGB_HEX.test(stripHash(value))\n}\n\n/**\n * Split an 8-hex RGBA colour into its 6-hex RGB and a 0–1 alpha; anything else passes through\n * unchanged with no alpha.\n *\n * `#` is stripped first, so both spellings reach the same answer. Two sites parsed this by\n * hand — `createColorElement`, which turns the alpha into an `<a:alpha>` sibling, and\n * `normalizeShadowOptions`, which turns it into a shadow's `_alpha` — and they divided by 255 at\n * different points in their arithmetic.\n * @param value - the caller's colour, with or without a leading `#`\n */\nexport function splitRgbaHex(value: string): { rgb: string; alpha?: number } {\n\tconst hex = stripHash(value)\n\tif (!isArgbHex(hex)) return { rgb: hex }\n\treturn { rgb: hex.slice(0, 6), alpha: parseInt(hex.slice(6, 8), 16) / 255 }\n}\n","/**\n * Parsing an `xsd:boolean` attribute value.\n *\n * **Why a function at all.** `xsd:boolean` has four lexical forms — `1`, `0`, `true`, `false` —\n * and OOXML attributes typed with it accept every one of them. PowerPoint writes only `1` and\n * `0`, so a hand-rolled `=== '1'` test passes against every deck this library produces and\n * against every deck PowerPoint produces, and silently misreads the other producers. That is the\n * worst shape a bug can have: invisible to the fixtures, visible only on a customer's file.\n *\n * **Why this module is neither `gen/` nor `read/`.** The lexical space of a schema type is a fact\n * about the schema, like `sequence.ts`'s document order and `body-insets.ts`'s defaults. The\n * parser lived in `read/oxml/dom.ts` because reading is where most of the demand is, and three\n * private copies had collapsed into it — but `read/oxml/dom.ts` imports `@xmldom/xmldom`, so\n * anything outside `read/` that wants this five-line function has to take a DOM dependency to get\n * it, or write a fourth copy. `script/from-read/detect.ts` hit exactly that and wrote the copy.\n *\n * The DOM-typed convenience wrapper stays behind in `read/oxml/dom.ts` as `boolAttr`, because\n * *that* one really is about reading an element.\n *\n * **The write direction is here too**, and it is where the interesting distinction lives: an\n * emitter writing a boolean has THREE useful shapes, not one — see {@link xsdBool} and\n * {@link xsdBoolIfTrue}. Sixty-odd inline ternaries spelled them in three ways with nothing\n * naming which was which.\n */\n\n/**\n * Parse an `xsd:boolean` OOXML attribute (`1`/`0`/`true`/`false`); else `null`.\n *\n * `null` for an absent *or* unparseable value is deliberate and load-bearing at the call sites:\n * several attributes have a schema default of `true`, so they test `!== false` rather than\n * `=== true` and an unset attribute has to be distinguishable from an explicit `0`.\n */\nexport function boolValue(value: string | null | undefined): boolean | null {\n\tif (value === '1' || value === 'true') return true\n\tif (value === '0' || value === 'false') return false\n\treturn null\n}\n\n/**\n * The lexical form this library writes for an `xsd:boolean`.\n *\n * A string rather than `0 | 1`: the attribute builder stringifies either, but naming one form\n * is what stops a helper's signature and its callers spelling the same value two ways.\n */\nexport type XsdBool = '1' | '0'\n\n/**\n * A boolean as the `1`/`0` an `xsd:boolean` attribute takes.\n *\n * Writes the attribute either way, so `false` is *stated*. Use this wherever the schema\n * default is `true`, or wherever the absence of the attribute would mean something other\n * than `false` — a value inherited from a list style, a layout or the theme.\n * @param value - the resolved boolean\n */\nexport function xsdBool(value: boolean | undefined | null): XsdBool {\n\treturn value ? '1' : '0'\n}\n\n/**\n * A boolean as `1`, or `null` so the attribute is left out entirely.\n *\n * **Correct only where the schema default is `false`.** It collapses \"false\" and \"unset\" into\n * one output, which is the two-spellings-for-three-states shape the API policy warns about: the\n * next attribute with a `true` default written this way reads as correct and is wrong. Every\n * current caller is on a `false`-defaulting attribute, so the collapse costs nothing today —\n * naming it is what makes the next one visible.\n * @param value - the resolved boolean\n */\nexport function xsdBoolIfTrue(value: boolean | undefined | null): '1' | null {\n\treturn value ? '1' : null\n}\n","/**\n * Validating a value against an `ST_` enumeration, under the two policies the library uses.\n *\n * **Why validate at all.** A value outside its `ST_` union makes the containing part\n * schema-invalid, and PowerPoint reports that as a *corrupt file* rather than as a mis-set\n * option — so the cost of letting one through is a deck that will not open, attributed to\n * nothing in particular. Both halves therefore check before a value reaches the XML.\n *\n * **Why two policies.** They differ deliberately, and the difference is about where the value\n * came from:\n *\n * - {@link checkEnumOrWarn} (write path) reports and **drops** the attribute, leaving the\n * renderer on the schema default. An option here comes from a deck being built, and losing one\n * attribute is better than failing an entire build over it.\n * - {@link checkEnumOrThrow} (read/edit path) **throws**. A value here comes from a caller\n * editing one attribute of a loaded deck, so silently doing nothing would leave them looking at\n * an unchanged file with no explanation.\n *\n * Before this module the two policies were spread across three near-identical private validators\n * (two in `gen/`, one in `read/`), each with its own wording; adding an enum meant writing a\n * fourth. The policy split is worth keeping — the triplication was not.\n */\n\nimport type { DiagnosticCode, InvalidOptionErrorCode } from '../codes.js'\nimport { warnOnce } from '../diagnostics.js'\nimport { InvalidOptionError } from '../errors.js'\n\n/**\n * Check a value against its `ST_` union, reporting and dropping it when outside (the write-path\n * policy — see the module note).\n *\n * `undefined`/`null` returns `null` without reporting: an unset option is not an invalid one, and\n * it is by far the common case.\n *\n * The offending value is interpolated into the message deliberately. {@link warnOnce} dedups on\n * code **and** message, so keeping the value in the text is what lets a second, *different* bad\n * value under the same code still get reported.\n * @param value - the value the caller supplied, if any\n * @param valid - the enum's members\n * @param code - the condition to report\n * @param label - how to name the offending option in the message, e.g. ``'table cell: cell3D `preset`'``\n * @param detail - extra structured context to merge into the diagnostic's `detail`\n * @returns the value when legal, else `null`\n */\nexport function checkEnumOrWarn<T extends string>(\n\tvalue: string | undefined | null,\n\tvalid: readonly T[],\n\tcode: DiagnosticCode,\n\tlabel: string,\n\tdetail?: Readonly<Record<string, unknown>>\n): T | null {\n\tif (value === undefined || value === null) return null\n\tif ((valid as readonly string[]).includes(value)) return value as T\n\twarnOnce(code, `${label} value \\`${String(value)}\\` is not valid and is ignored — use one of ${valid.join(', ')}.`, {\n\t\treceived: value,\n\t\tvalid,\n\t\t...detail,\n\t})\n\treturn null\n}\n\n/**\n * Check a value against its `ST_` union, throwing when outside (the read/edit-path policy — see\n * the module note).\n * @param value - the value the caller asked for\n * @param valid - the enum's members\n * @param attribute - the attribute's name, for the message\n * @param code - the condition to report\n * @returns `value`, when it is legal\n */\nexport function checkEnumOrThrow<T extends string>(\n\tvalue: string,\n\tvalid: readonly T[],\n\tattribute: string,\n\tcode: InvalidOptionErrorCode\n): T {\n\tif ((valid as readonly string[]).includes(value)) return value as T\n\tthrow new InvalidOptionError(\n\t\tcode,\n\t\t`Invalid ${attribute}: ${JSON.stringify(value)}. Expected one of: ${valid.join(', ')}.`\n\t)\n}\n","/**\n * `a:ln/@cap`, and the write API's `cap` on the other side of it.\n *\n * `createLineCap` in `gen/drawingml/line.ts` and its inverse `CAP_TOKENS` in\n * `script/from-read/shape-paint.ts` stated the same three pairs in opposite directions. One table\n * here, both directions derived from it, as `ooxml/text-anchor.ts` does for `valign`.\n *\n * This module keeps `ooxml/`'s no-runtime-imports property: both references below are type-only.\n */\n\nimport type { LineCap } from '../types/chart.js'\nimport type { LINE_CAPS } from './st-enums.js'\n\n/** An `ST_LineCap` token. */\nexport type LineCapToken = (typeof LINE_CAPS)[number]\n\n/**\n * Every `cap` the write API names and the token it writes. `satisfies` over `Record<LineCap, …>`\n * makes a member added to `LineCap` without a token a compile error, and `ST_LineCap` has exactly\n * these three members, so the inverse covers every token too.\n */\nconst TOKEN_BY_LINE_CAP = {\n\tflat: 'flat',\n\tsquare: 'sq',\n\tround: 'rnd',\n} as const satisfies Record<LineCap, LineCapToken>\n\n/** The `cap` token a `LineCap` writes, or `undefined` for a value the write API does not name. */\nexport function lineCapToken(cap: string): LineCapToken | undefined {\n\treturn Object.hasOwn(TOKEN_BY_LINE_CAP, cap) ? TOKEN_BY_LINE_CAP[cap as LineCap] : undefined\n}\n\n/** A `cap` token back to the `LineCap` that authors it. */\nexport const LINE_CAP_BY_TOKEN: Readonly<Record<string, LineCap>> = Object.fromEntries(\n\tObject.entries(TOKEN_BY_LINE_CAP).map(([cap, token]) => [token, cap as LineCap])\n)\n","/**\n * `a:pPr/@algn` and `a:lvlNpPr/@algn`, and the write API's `align` on the other side of it.\n *\n * Three places stated the same correspondence: the paragraph emitter's switch in\n * `gen/drawingml/text-run.ts`, `masterAlignAttr` in `gen/slide/master.ts`, and the script\n * converter's inverse in `script/from-read/text.ts`, which cannot import `gen/`. One table here,\n * both directions derived from it, as `ooxml/text-anchor.ts` does for `valign`.\n *\n * This module keeps `ooxml/`'s no-runtime-imports property: {@link TEXT_ALIGN_TYPES} comes from a\n * module with none, and the {@link HAlign} reference is type-only, so it is erased.\n */\n\nimport type { HAlign } from '../types/core.js'\nimport type { TEXT_ALIGN_TYPES } from './st-enums.js'\n\n/** An `ST_TextAlignType` token. */\nexport type TextAlignToken = (typeof TEXT_ALIGN_TYPES)[number]\n\n/**\n * Every `align` the write API names and the token it writes. `satisfies` over `Record<HAlign, …>`\n * makes a member added to `HAlign` without a token a compile error. `justLow`, `dist` and\n * `thaiDist` have no `align` spelling.\n */\nconst ALGN_BY_ALIGN = {\n\tleft: 'l',\n\tcenter: 'ctr',\n\tright: 'r',\n\tjustify: 'just',\n} as const satisfies Record<HAlign, TextAlignToken>\n\n/** The `algn` token an `align` value writes, or `undefined` for a value the write API does not name. */\nexport function textAlignToken(align: string): TextAlignToken | undefined {\n\treturn Object.hasOwn(ALGN_BY_ALIGN, align) ? ALGN_BY_ALIGN[align as HAlign] : undefined\n}\n\n/** An `algn` token back to the `align` a generated script writes. */\nexport const HALIGN_BY_TEXT_ALIGN: Readonly<Record<string, HAlign>> = Object.fromEntries(\n\tObject.entries(ALGN_BY_ALIGN).map(([align, token]) => [token, align as HAlign])\n)\n","/**\n * Intrinsic image geometry: reading a natural pixel size out of header bytes, and the\n * `<a:srcRect>` crop math that fits that natural size into a display box.\n *\n * Shared by both sides of the library — the write path (`addImage({ sizing })`) and the read\n * API's `Picture.setImage({ fit })` — which is why it lives outside `gen/` and `read/`.\n * Everything here is synchronous and pure: headers only, never pixel decoding.\n */\n\nimport { decodeBase64ToBytes } from './base64.js'\nimport { PERCENT_SCALE } from '../units.js'\nimport { IMAGE_FORMATS } from './image-formats.js'\n\n/**\n * Read the intrinsic dimensions of an image from its header bytes.\n * - synchronous: parses only file-format headers, never decodes pixels\n * - raster: PNG, JPEG, GIF, BMP, TIFF, and WebP (VP8 / VP8L / VP8X) — natural pixels\n * - vector: SVG — intrinsic size from the root `<svg>` width/height or viewBox\n * - unrecognized formats return `null` (no measurable intrinsic size)\n *\n * Used by image `sizing: 'cover' | 'contain'` to compute an aspect-correct\n * `<a:srcRect>` crop from the *natural* image ratio rather than the displayed box.\n * @param {string} dataB64 - base64 image payload or `data:` URI\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBase64(dataB64: string): { w: number; h: number } | null {\n\tconst b = decodeBase64ToBytes(dataB64)\n\treturn b ? getImageSizeFromBytes(b) : null\n}\n\n/**\n * Read the intrinsic dimensions of an image from raw header bytes — the\n * byte-level core shared by {@link getImageSizeFromBase64} and the read API's\n * `Picture.setImage({ fit })`, which already holds the media bytes.\n * @param {Uint8Array} b - image bytes\n * @returns {{ w: number, h: number } | null} natural size, or `null` when unmeasurable\n */\nexport function getImageSizeFromBytes(b: Uint8Array): { w: number; h: number } | null {\n\tif (!b || b.length < 24) return null\n\n\t// A byte read that turns an index past the end into 0 rather than `undefined`. That keeps the\n\t// arithmetic below defined, but a zero is not a real field: each format checks the length its own\n\t// fields need before it trusts a value, and the 24-byte floor above covers only the shortest.\n\tconst u = (n: number): number => b[n] ?? 0\n\n\t// PNG: 8-byte signature, then IHDR with width@16 / height@20 (big-endian uint32)\n\tif (IMAGE_FORMATS.png.magic?.(b)) {\n\t\tconst w = (u(16) << 24) | (u(17) << 16) | (u(18) << 8) | u(19)\n\t\tconst h = (u(20) << 24) | (u(21) << 16) | (u(22) << 8) | u(23)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// GIF: \"GIF87a\"/\"GIF89a\", width@6 / height@8 (little-endian uint16)\n\tif (IMAGE_FORMATS.gif.magic?.(b)) {\n\t\tconst w = u(6) | (u(7) << 8)\n\t\tconst h = u(8) | (u(9) << 8)\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// BMP: \"BM\", then a DIB header whose size at offset 14 says which layout the dimensions use.\n\tif (IMAGE_FORMATS.bmp.magic?.(b)) {\n\t\tconst dibHeaderSize = u(14) | (u(15) << 8) | (u(16) << 16) | (u(17) << 24)\n\t\t// An OS/2 BITMAPCOREHEADER (12 bytes) stores width@18 / height@20 as unsigned 16-bit values.\n\t\t// Read as 32-bit, the width swallowed the height's bytes and the height ran into the planes and\n\t\t// bit-count fields, so the image measured tens of thousands of pixels wide.\n\t\tif (dibHeaderSize === 12) {\n\t\t\tconst w = u(18) | (u(19) << 8)\n\t\t\tconst h = u(20) | (u(21) << 8)\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\t// Every later header: width@18 / height@22 as little-endian int32, the height negative for a\n\t\t// top-down bitmap. The height ends at byte 25, past the 24-byte floor, so it is checked here.\n\t\tif (b.length < 26) return null\n\t\tconst w = u(18) | (u(19) << 8) | (u(20) << 16) | (u(21) << 24)\n\t\tconst h = u(22) | (u(23) << 8) | (u(24) << 16) | (u(25) << 24)\n\t\tconst aw = Math.abs(w)\n\t\tconst ah = Math.abs(h)\n\t\treturn aw > 0 && ah > 0 ? { w: aw, h: ah } : null\n\t}\n\n\t// WebP: \"RIFF\"....\"WEBP\" then a VP8 / VP8L / VP8X chunk\n\tif (IMAGE_FORMATS.webp.magic?.(b)) {\n\t\tconst fourCC = String.fromCharCode(u(12), u(13), u(14), u(15))\n\t\tif (fourCC === 'VP8 ' && b.length >= 30) {\n\t\t\t// Lossy: 14-bit width/height at offset 26/28 (little-endian, mask off scale bits)\n\t\t\tconst w = (u(26) | (u(27) << 8)) & 0x3fff\n\t\t\tconst h = (u(28) | (u(29) << 8)) & 0x3fff\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8L' && b.length >= 25) {\n\t\t\t// Lossless: 14-bit width/height packed starting at bit 0 of offset 21\n\t\t\tconst bits = u(21) | (u(22) << 8) | (u(23) << 16) | (u(24) << 24)\n\t\t\tconst w = (bits & 0x3fff) + 1\n\t\t\tconst h = ((bits >> 14) & 0x3fff) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\tif (fourCC === 'VP8X' && b.length >= 30) {\n\t\t\t// Extended: 24-bit canvas width/height minus one at offset 24/27 (little-endian)\n\t\t\tconst w = (u(24) | (u(25) << 8) | (u(26) << 16)) + 1\n\t\t\tconst h = (u(27) | (u(28) << 8) | (u(29) << 16)) + 1\n\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t}\n\t\treturn null\n\t}\n\n\t// JPEG: \"FFD8FF\", scan segment markers for a Start-Of-Frame (SOFn) and read height@5 / width@7\n\tif (IMAGE_FORMATS.jpeg.magic?.(b)) {\n\t\tlet i = 2\n\t\twhile (i + 9 < b.length) {\n\t\t\tif (b[i] !== 0xff) {\n\t\t\t\ti++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst marker = u(i + 1)\n\t\t\t// Any marker may be preceded by 0xFF fill bytes. Taken as a marker of its own, the next two\n\t\t\t// bytes read as a segment length and the walk jumped clean past the frame header.\n\t\t\tif (marker === 0xff) {\n\t\t\t\ti++\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// SOF0..SOF15 carry frame dimensions, excluding DHT(C4)/JPG(C8)/DAC(CC)\n\t\t\tif (marker >= 0xc0 && marker <= 0xcf && marker !== 0xc4 && marker !== 0xc8 && marker !== 0xcc) {\n\t\t\t\tconst h = (u(i + 5) << 8) | u(i + 6)\n\t\t\t\tconst w = (u(i + 7) << 8) | u(i + 8)\n\t\t\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t\t\t}\n\t\t\t// Standalone markers (RSTn / SOI / EOI / TEM) have no length payload\n\t\t\tif ((marker >= 0xd0 && marker <= 0xd9) || marker === 0x01) {\n\t\t\t\ti += 2\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// Otherwise skip this segment using its 2-byte big-endian length\n\t\t\tconst segLen = (u(i + 2) << 8) | u(i + 3)\n\t\t\tif (segLen < 2) break\n\t\t\ti += 2 + segLen\n\t\t}\n\t\treturn null\n\t}\n\n\t// TIFF: an 8-byte header pointing at the first IFD, whose entries carry ImageWidth (0x0100)\n\t// and ImageLength (0x0101). Every other format above reads its size from a fixed offset; this\n\t// one has to walk, because a TIFF states where its directory is rather than where its pixels\n\t// are. Added because the sniffer already recognised TIFF and this did not, so a `.tif` got a\n\t// content type and then silently no intrinsic size.\n\tif (IMAGE_FORMATS.tiff.magic(b)) {\n\t\tconst little = b[0] === 0x49\n\t\tconst u16 = (n: number): number => (little ? u(n) | (u(n + 1) << 8) : (u(n) << 8) | u(n + 1))\n\t\tconst u32 = (n: number): number =>\n\t\t\tlittle\n\t\t\t\t? (u(n) | (u(n + 1) << 8) | (u(n + 2) << 16) | (u(n + 3) << 24)) >>> 0\n\t\t\t\t: ((u(n) << 24) | (u(n + 1) << 16) | (u(n + 2) << 8) | u(n + 3)) >>> 0\n\n\t\tconst ifd = u32(4)\n\t\tif (ifd + 2 > b.length) return null\n\t\tconst entries = u16(ifd)\n\t\tlet w = 0\n\t\tlet h = 0\n\t\tfor (let i = 0; i < entries; i++) {\n\t\t\tconst entry = ifd + 2 + i * 12\n\t\t\tif (entry + 12 > b.length) return null\n\t\t\tconst tag = u16(entry)\n\t\t\tif (tag !== 0x0100 && tag !== 0x0101) continue\n\t\t\t// The value sits inline in the last four bytes. A SHORT (type 3) occupies the first two\n\t\t\t// of them, which on a big-endian file is not where a LONG (type 4) starts.\n\t\t\tconst value = u16(entry + 2) === 3 ? u16(entry + 8) : u32(entry + 8)\n\t\t\tif (tag === 0x0100) w = value\n\t\t\telse h = value\n\t\t}\n\t\treturn w > 0 && h > 0 ? { w, h } : null\n\t}\n\n\t// SVG: text-based vector with no binary signature. When the payload is an\n\t// `<svg>` document, read its intrinsic size from the root element so that\n\t// `sizing: 'cover' | 'contain'` is aspect-correct for SVG, not just rasters.\n\tconst text = utf8Decode(b)\n\tif (/<svg[\\s>]/i.test(text)) return getSvgSizeFromMarkup(text)\n\n\treturn null\n}\n\n/**\n * Compute the `<a:srcRect>` crop percentages (each in 1/1000 of a percent, the\n * OOXML unit) for fitting an image of natural size `img` into a display `box`,\n * assuming the cropped region is then stretched to fill the box (`<a:stretch>`).\n *\n * - `cover`: fill the box, cropping the overflowing axis (positive l/r or t/b)\n * - `contain`: fit inside the box, letterboxing the short axis (negative l/r or t/b)\n *\n * Single source of truth for the crop math shared by the write side\n * (`ImageSizingXml`) and the read API's `Picture.setImage({ fit })`. `l`/`r` and\n * `t`/`b` are symmetric (centered crop).\n *\n * There is no fit for a side that is not greater than zero: a zero-size box gave every percentage\n * as `NaN`, and a zero-width one gave `-Infinity`, both written straight into the part.\n * @param {'cover' | 'contain'} type - fit mode\n * @param {{ w: number, h: number }} img - natural image pixel size\n * @param {{ w: number, h: number }} box - displayed frame size (any consistent unit)\n * @returns {{ l: number, r: number, t: number, b: number } | null} srcRect percentages, or `null`\n * when any of the four sizes is not greater than zero\n */\nexport function fitSrcRectPercents(\n\ttype: 'cover' | 'contain',\n\timg: { w: number; h: number },\n\tbox: { w: number; h: number }\n): { l: number; r: number; t: number; b: number } | null {\n\tif (!(img.w > 0 && img.h > 0 && box.w > 0 && box.h > 0)) return null\n\tconst imgRatio = img.h / img.w\n\tconst boxRatio = box.h / box.w\n\tlet width: number\n\tlet height: number\n\tif (type === 'cover') {\n\t\tconst isBoxBased = boxRatio > imgRatio\n\t\twidth = isBoxBased ? box.h / imgRatio : box.w\n\t\theight = isBoxBased ? box.h : box.w * imgRatio\n\t} else {\n\t\tconst widthBased = boxRatio > imgRatio\n\t\twidth = widthBased ? box.w : box.h / imgRatio\n\t\theight = widthBased ? box.w * imgRatio : box.h\n\t}\n\tconst hz = Math.round(PERCENT_SCALE * 0.5 * (1 - box.w / width))\n\tconst vz = Math.round(PERCENT_SCALE * 0.5 * (1 - box.h / height))\n\treturn { l: hz, r: hz, t: vz, b: vz }\n}\n\n/**\n * Read the intrinsic size of an SVG document from its root `<svg>` element.\n * Follows the SVG sizing model: an explicit absolute `width`/`height` pair wins;\n * otherwise the `viewBox` width/height defines the size (and thus aspect ratio).\n * Percentage or missing `width`/`height` fall through to `viewBox`.\n * @param {string} svg - SVG markup\n * @returns {{ w: number, h: number } | null} intrinsic size, or `null` when undeterminable\n */\nfunction getSvgSizeFromMarkup(svg: string): { w: number; h: number } | null {\n\tconst openTag = /<svg\\b[^>]*>/i.exec(svg)?.[0]\n\tif (!openTag) return null\n\t// Anchored on the whitespace before the name. A word boundary also matched inside a longer name,\n\t// between its `-` and the rest, so `stroke-width=\"2\"` was read as the width and `data-height` as\n\t// the height whenever it came first.\n\tconst attr = (name: string): string | null =>\n\t\tnew RegExp(`(?:^|\\\\s)${name}\\\\s*=\\\\s*([\"'])(.*?)\\\\1`, 'i').exec(openTag)?.[2] ?? null\n\t// Leading number with an optional absolute unit; a percentage is not an intrinsic length.\n\tconst absLength = (val: string | null): number => {\n\t\tif (val == null || /%\\s*$/.test(val)) return NaN\n\t\tconst m = /^\\s*\\+?(\\d*\\.?\\d+)/.exec(val)\n\t\treturn m ? parseFloat(m[1] ?? '') : NaN\n\t}\n\tlet w = absLength(attr('width'))\n\tlet h = absLength(attr('height'))\n\tif (!(w > 0 && h > 0)) {\n\t\tconst vb = attr('viewBox')\n\t\tconst p = vb\n\t\t\t? vb\n\t\t\t\t\t.trim()\n\t\t\t\t\t.split(/[\\s,]+/)\n\t\t\t\t\t.map(Number)\n\t\t\t: []\n\t\tconst vw = p[2]\n\t\tconst vh = p[3]\n\t\tif (p.length === 4 && vw != null && vh != null && vw > 0 && vh > 0) {\n\t\t\tw = vw\n\t\t\th = vh\n\t\t}\n\t}\n\treturn w > 0 && h > 0 ? { w, h } : null\n}\n\n/** Decode UTF-8 bytes to a string, isomorphic across Node and browsers. */\nfunction utf8Decode(bytes: Uint8Array): string {\n\treturn new TextDecoder().decode(bytes)\n}\n"],"mappings":";;;;;;;;AAiDA,MAAa,gBAAgB,OAAO,OAAO;CAC1C,KAAK;EACJ,KAAK;EACL,aAAa;EACb,SAAS,CAAC;EACV,aAAa;EACb,QAAQ,MAAM,EAAE,UAAU,KAAK,EAAE,OAAO,OAAQ,EAAE,OAAO,MAAQ,EAAE,OAAO,MAAQ,EAAE,OAAO;CAC5F;CACA,MAAM;EACL,KAAK;EACL,aAAa;EACb,SAAS,CAAC,KAAK;EACf,aAAa;EACb,QAAQ,MAAM,EAAE,UAAU,KAAK,EAAE,OAAO,OAAQ,EAAE,OAAO,OAAQ,EAAE,OAAO;CAC3E;CACA,KAAK;EACJ,KAAK;EACL,aAAa;EACb,SAAS,CAAC;EACV,aAAa;EAGb,QAAQ,MAAM,EAAE,UAAU,KAAK,EAAE,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AAuB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAGA,MAAa,uBAAuB;CAAC;CAAK;CAAO;CAAK;AAAK;;;;;;AAO3D,MAAa,sBAAsB;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;;;;AAYA,MAAa,mBAAmB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AAMA,MAAa,gCAAwG;CACpH,QAAQ,CAAC,KAAK;CACd,SAAS,CAAC,KAAK;CACf,QAAQ,CAAC;CACT,UAAU,CAAC;CACX,MAAM,CAAC,KAAK;CACZ,OAAO,CAAC,KAAK;CACb,KAAK,CAAC,SAAS;CACf,SAAS,CAAC;CACV,MAAM,CAAC,SAAS;CAChB,WAAW,CAAC;CACZ,MAAM,CAAC;CACP,MAAM,CAAC,KAAK;CACZ,MAAM,CAAC,KAAK;CACZ,QAAQ,CAAC;CACT,WAAW,CAAC,KAAK;CACjB,OAAO,CAAC,UAAU,KAAK;CACvB,QAAQ,CAAC,KAAK;CACd,OAAO,CAAC;CACR,OAAO,CAAC,QAAQ;CAChB,MAAM,CAAC,KAAK;CACZ,MAAM,CAAC,KAAK;AACb;;;;;AAMA,MAAa,gBAAgB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AAOA,MAAa,mBAAmB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;;AAOA,MAAa,aAAa;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAC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