pptx-react-viewer 1.25.5 → 2.0.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 (230) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +1 -1
  3. package/dist/AiChatPanel-BRGQCYZM.mjs +1087 -0
  4. package/dist/AiChatPanel-BRGQCYZM.mjs.br +0 -0
  5. package/dist/AiChatPanel-BRGQCYZM.mjs.gz +0 -0
  6. package/dist/AiChatPanel-PW5OT25Z.js +1089 -0
  7. package/dist/AiChatPanel-PW5OT25Z.js.br +0 -0
  8. package/dist/AiChatPanel-PW5OT25Z.js.gz +0 -0
  9. package/dist/{GLTFLoader-NMAS6VRH.mjs → GLTFLoader-374ZNTXW.mjs} +1 -1
  10. package/dist/GLTFLoader-374ZNTXW.mjs.br +0 -0
  11. package/dist/GLTFLoader-374ZNTXW.mjs.gz +0 -0
  12. package/dist/{GLTFLoader-GP55DVVS.js → GLTFLoader-Q7BHCGAW.js} +1 -1
  13. package/dist/GLTFLoader-Q7BHCGAW.js.br +0 -0
  14. package/dist/GLTFLoader-Q7BHCGAW.js.gz +0 -0
  15. package/dist/{Model3DScene-Y5ABLO7K.js → Model3DScene-JCGYRKXM.js} +4 -4
  16. package/dist/Model3DScene-JCGYRKXM.js.br +0 -0
  17. package/dist/Model3DScene-JCGYRKXM.js.gz +0 -0
  18. package/dist/{Model3DScene-XVYOISVJ.mjs → Model3DScene-TEF362W2.mjs} +3 -3
  19. package/dist/Model3DScene-TEF362W2.mjs.br +0 -0
  20. package/dist/Model3DScene-TEF362W2.mjs.gz +0 -0
  21. package/dist/{OrbitControls-VH6KILH7.js → OrbitControls-SMYCPLXO.js} +1 -1
  22. package/dist/OrbitControls-SMYCPLXO.js.br +3 -0
  23. package/dist/OrbitControls-SMYCPLXO.js.gz +0 -0
  24. package/dist/{OrbitControls-F5XPYD2Z.mjs → OrbitControls-ZTGHPI5G.mjs} +1 -1
  25. package/dist/OrbitControls-ZTGHPI5G.mjs.br +0 -0
  26. package/dist/{OrbitControls-F5XPYD2Z.mjs.gz → OrbitControls-ZTGHPI5G.mjs.gz} +0 -0
  27. package/dist/{PowerPointViewer-CnADroqZ.d.ts → PowerPointViewer-gmU5rc7K.d.ts} +2 -2
  28. package/dist/PowerPointViewer-gmU5rc7K.d.ts.map +1 -0
  29. package/dist/{SmartArt3DScene-WQIDFZ7X.mjs → SmartArt3DScene-XCFVGCXE.mjs} +1 -1
  30. package/dist/SmartArt3DScene-XCFVGCXE.mjs.br +0 -0
  31. package/dist/SmartArt3DScene-XCFVGCXE.mjs.gz +0 -0
  32. package/dist/{SmartArt3DScene-HCQBDRAM.js → SmartArt3DScene-ZO3KFDI2.js} +1 -1
  33. package/dist/SmartArt3DScene-ZO3KFDI2.js.br +0 -0
  34. package/dist/SmartArt3DScene-ZO3KFDI2.js.gz +0 -0
  35. package/dist/{SurfaceChart3DScene-WMY5JTW4.js → SurfaceChart3DScene-2SHCYZVC.js} +4 -4
  36. package/dist/{SurfaceChart3DScene-WMY5JTW4.js.br → SurfaceChart3DScene-2SHCYZVC.js.br} +0 -0
  37. package/dist/SurfaceChart3DScene-2SHCYZVC.js.gz +0 -0
  38. package/dist/{SurfaceChart3DScene-RXZADECL.mjs → SurfaceChart3DScene-UPDCIMJM.mjs} +3 -3
  39. package/dist/SurfaceChart3DScene-UPDCIMJM.mjs.br +0 -0
  40. package/dist/SurfaceChart3DScene-UPDCIMJM.mjs.gz +0 -0
  41. package/dist/{animation-timeline-CEJJLFqK.d.ts → animation-timeline-eb5z0SHW.d.ts} +250 -8
  42. package/dist/animation-timeline-eb5z0SHW.d.ts.map +1 -0
  43. package/dist/{chunk-M3SIFXWD.mjs → chunk-2X72MOPZ.mjs} +65 -0
  44. package/dist/chunk-2X72MOPZ.mjs.br +0 -0
  45. package/dist/chunk-2X72MOPZ.mjs.gz +0 -0
  46. package/dist/{chunk-QGM4M3NI.js → chunk-4VNS5WPM.js} +5 -0
  47. package/dist/chunk-4VNS5WPM.js.br +0 -0
  48. package/dist/chunk-4VNS5WPM.js.gz +0 -0
  49. package/dist/{chunk-F4WPQRZU.mjs → chunk-5XLLRPMV.mjs} +6901 -14355
  50. package/dist/chunk-5XLLRPMV.mjs.br +0 -0
  51. package/dist/chunk-5XLLRPMV.mjs.gz +0 -0
  52. package/dist/{chunk-FOMF7POV.mjs → chunk-6YXLGMTN.mjs} +2493 -1588
  53. package/dist/chunk-6YXLGMTN.mjs.br +0 -0
  54. package/dist/chunk-6YXLGMTN.mjs.gz +0 -0
  55. package/dist/chunk-B6NRDUHJ.mjs +8029 -0
  56. package/dist/chunk-B6NRDUHJ.mjs.br +0 -0
  57. package/dist/chunk-B6NRDUHJ.mjs.gz +0 -0
  58. package/dist/chunk-BHVCED34.mjs +16664 -0
  59. package/dist/chunk-BHVCED34.mjs.br +0 -0
  60. package/dist/chunk-BHVCED34.mjs.gz +0 -0
  61. package/dist/{chunk-IPYAN574.js → chunk-CLNGAVNH.js} +2495 -1587
  62. package/dist/chunk-CLNGAVNH.js.br +0 -0
  63. package/dist/chunk-CLNGAVNH.js.gz +0 -0
  64. package/dist/{chunk-2EFVXYNA.js → chunk-CUUYYYC5.js} +65 -0
  65. package/dist/chunk-CUUYYYC5.js.br +0 -0
  66. package/dist/chunk-CUUYYYC5.js.gz +0 -0
  67. package/dist/{chunk-L4ZADJOM.mjs → chunk-L63RAVM7.mjs} +1285 -150
  68. package/dist/chunk-L63RAVM7.mjs.br +0 -0
  69. package/dist/chunk-L63RAVM7.mjs.gz +0 -0
  70. package/dist/{chunk-7CSBUYRN.js → chunk-LFXG7SGG.js} +2073 -938
  71. package/dist/chunk-LFXG7SGG.js.br +0 -0
  72. package/dist/chunk-LFXG7SGG.js.gz +0 -0
  73. package/dist/{chunk-TEN35NUX.js → chunk-OKOJVSKJ.js} +3512 -403
  74. package/dist/chunk-OKOJVSKJ.js.br +0 -0
  75. package/dist/chunk-OKOJVSKJ.js.gz +0 -0
  76. package/dist/{chunk-FVQDRA5N.mjs → chunk-R2N2UYT7.mjs} +3455 -362
  77. package/dist/chunk-R2N2UYT7.mjs.br +0 -0
  78. package/dist/chunk-R2N2UYT7.mjs.gz +0 -0
  79. package/dist/chunk-SYPHGLIB.js +16701 -0
  80. package/dist/chunk-SYPHGLIB.js.br +0 -0
  81. package/dist/chunk-SYPHGLIB.js.gz +0 -0
  82. package/dist/{chunk-6DZX6EAA.mjs → chunk-XGB3TDIC.mjs} +5 -1
  83. package/dist/chunk-XGB3TDIC.mjs.br +0 -0
  84. package/dist/chunk-XGB3TDIC.mjs.gz +0 -0
  85. package/dist/chunk-ZB4NZRCI.js +11111 -0
  86. package/dist/chunk-ZB4NZRCI.js.br +0 -0
  87. package/dist/chunk-ZB4NZRCI.js.gz +0 -0
  88. package/dist/chunk-ZKDE3HJI.js +8121 -0
  89. package/dist/chunk-ZKDE3HJI.js.br +0 -0
  90. package/dist/chunk-ZKDE3HJI.js.gz +0 -0
  91. package/dist/{dist-755SJ3ZH.js → dist-4LUVI3SW.js} +578 -566
  92. package/dist/dist-4LUVI3SW.js.br +0 -0
  93. package/dist/dist-4LUVI3SW.js.gz +0 -0
  94. package/dist/dist-J6PC54PZ.mjs +2 -0
  95. package/dist/dist-J6PC54PZ.mjs.br +0 -0
  96. package/dist/dist-J6PC54PZ.mjs.gz +0 -0
  97. package/dist/i18n.js +5 -5
  98. package/dist/i18n.js.br +0 -0
  99. package/dist/i18n.js.gz +0 -0
  100. package/dist/i18n.mjs +2 -2
  101. package/dist/i18n.mjs.br +0 -0
  102. package/dist/i18n.mjs.gz +0 -0
  103. package/dist/{index-J6IuHQ2_.d.ts → index-a8wcFjRJ.d.ts} +4 -4
  104. package/dist/{index-J6IuHQ2_.d.ts.map → index-a8wcFjRJ.d.ts.map} +1 -1
  105. package/dist/index.d.ts +3030 -220
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +41 -39
  108. package/dist/index.js.br +0 -0
  109. package/dist/index.js.gz +0 -0
  110. package/dist/index.mjs +8 -6
  111. package/dist/index.mjs.br +0 -0
  112. package/dist/index.mjs.gz +0 -0
  113. package/dist/{hooks-unstable.d.ts → internals.d.ts} +1238 -974
  114. package/dist/internals.d.ts.map +1 -0
  115. package/dist/{hooks-unstable.js → internals.js} +81 -80
  116. package/dist/internals.js.br +0 -0
  117. package/dist/internals.js.gz +0 -0
  118. package/dist/{hooks-unstable.mjs → internals.mjs} +6 -5
  119. package/dist/internals.mjs.br +0 -0
  120. package/dist/internals.mjs.gz +0 -0
  121. package/dist/pptx-viewer.css +1 -1
  122. package/dist/pptx-viewer.css.br +0 -0
  123. package/dist/pptx-viewer.css.gz +0 -0
  124. package/dist/{three.module-7CXEVRKB.mjs → three.module-AC7ESV4W.mjs} +1 -1
  125. package/dist/three.module-AC7ESV4W.mjs.br +0 -0
  126. package/dist/three.module-AC7ESV4W.mjs.gz +0 -0
  127. package/dist/{three.module-CPZZFD2Q.js → three.module-GNNNRIMK.js} +1 -1
  128. package/dist/three.module-GNNNRIMK.js.br +0 -0
  129. package/dist/three.module-GNNNRIMK.js.gz +0 -0
  130. package/dist/{useViewerBuildingBlocks-ll3_ncCH.d.ts → useViewerBuildingBlocks-CjureTRf.d.ts} +185 -174
  131. package/dist/useViewerBuildingBlocks-CjureTRf.d.ts.map +1 -0
  132. package/dist/viewer/index.d.ts +469 -52
  133. package/dist/viewer/index.d.ts.map +1 -1
  134. package/dist/viewer/index.js +35 -33
  135. package/dist/viewer/index.js.br +0 -0
  136. package/dist/viewer/index.js.gz +0 -0
  137. package/dist/viewer/index.mjs +8 -6
  138. package/dist/viewer/index.mjs.br +0 -0
  139. package/dist/viewer/index.mjs.gz +0 -0
  140. package/dist/{y-webrtc-6CRYHAXH.mjs → y-webrtc-DGVURJIF.mjs} +1 -1
  141. package/dist/y-webrtc-DGVURJIF.mjs.br +0 -0
  142. package/dist/y-webrtc-DGVURJIF.mjs.gz +0 -0
  143. package/dist/{y-webrtc-QCZF75JW.js → y-webrtc-YN53KW3J.js} +5 -5
  144. package/dist/y-webrtc-YN53KW3J.js.br +0 -0
  145. package/dist/y-webrtc-YN53KW3J.js.gz +0 -0
  146. package/dist/{y-websocket-QJEM6VOB.js → y-websocket-HZCIQLM6.js} +1 -1
  147. package/dist/y-websocket-HZCIQLM6.js.br +0 -0
  148. package/dist/y-websocket-HZCIQLM6.js.gz +0 -0
  149. package/dist/{y-websocket-57Q3RNHC.mjs → y-websocket-P5LTAJ5T.mjs} +1 -1
  150. package/dist/y-websocket-P5LTAJ5T.mjs.br +0 -0
  151. package/dist/y-websocket-P5LTAJ5T.mjs.gz +0 -0
  152. package/dist/{yjs-Y7IYUWOG.mjs → yjs-FKGX4QHS.mjs} +1 -1
  153. package/dist/yjs-FKGX4QHS.mjs.br +0 -0
  154. package/dist/yjs-FKGX4QHS.mjs.gz +0 -0
  155. package/dist/{yjs-UH3EPF3C.js → yjs-HBLSEMHP.js} +1 -1
  156. package/dist/yjs-HBLSEMHP.js.br +0 -0
  157. package/dist/yjs-HBLSEMHP.js.gz +0 -0
  158. package/package.json +19 -7
  159. package/dist/GLTFLoader-GP55DVVS.js.br +0 -0
  160. package/dist/GLTFLoader-GP55DVVS.js.gz +0 -0
  161. package/dist/GLTFLoader-NMAS6VRH.mjs.br +0 -0
  162. package/dist/GLTFLoader-NMAS6VRH.mjs.gz +0 -0
  163. package/dist/Model3DScene-XVYOISVJ.mjs.br +0 -0
  164. package/dist/Model3DScene-XVYOISVJ.mjs.gz +0 -0
  165. package/dist/Model3DScene-Y5ABLO7K.js.br +0 -0
  166. package/dist/Model3DScene-Y5ABLO7K.js.gz +0 -0
  167. package/dist/OrbitControls-F5XPYD2Z.mjs.br +0 -0
  168. package/dist/OrbitControls-VH6KILH7.js.br +0 -2
  169. package/dist/OrbitControls-VH6KILH7.js.gz +0 -0
  170. package/dist/PowerPointViewer-CnADroqZ.d.ts.map +0 -1
  171. package/dist/SmartArt3DScene-HCQBDRAM.js.br +0 -0
  172. package/dist/SmartArt3DScene-HCQBDRAM.js.gz +0 -0
  173. package/dist/SmartArt3DScene-WQIDFZ7X.mjs.br +0 -0
  174. package/dist/SmartArt3DScene-WQIDFZ7X.mjs.gz +0 -0
  175. package/dist/SurfaceChart3DScene-RXZADECL.mjs.br +0 -0
  176. package/dist/SurfaceChart3DScene-RXZADECL.mjs.gz +0 -0
  177. package/dist/SurfaceChart3DScene-WMY5JTW4.js.gz +0 -0
  178. package/dist/animation-timeline-CEJJLFqK.d.ts.map +0 -1
  179. package/dist/chunk-2EFVXYNA.js.br +0 -0
  180. package/dist/chunk-2EFVXYNA.js.gz +0 -0
  181. package/dist/chunk-6DZX6EAA.mjs.br +0 -0
  182. package/dist/chunk-6DZX6EAA.mjs.gz +0 -0
  183. package/dist/chunk-7CSBUYRN.js.br +0 -0
  184. package/dist/chunk-7CSBUYRN.js.gz +0 -0
  185. package/dist/chunk-E55Q4AC7.js +0 -18639
  186. package/dist/chunk-E55Q4AC7.js.br +0 -0
  187. package/dist/chunk-E55Q4AC7.js.gz +0 -0
  188. package/dist/chunk-F4WPQRZU.mjs.br +0 -0
  189. package/dist/chunk-F4WPQRZU.mjs.gz +0 -0
  190. package/dist/chunk-FOMF7POV.mjs.br +0 -0
  191. package/dist/chunk-FOMF7POV.mjs.gz +0 -0
  192. package/dist/chunk-FVQDRA5N.mjs.br +0 -0
  193. package/dist/chunk-FVQDRA5N.mjs.gz +0 -0
  194. package/dist/chunk-IPYAN574.js.br +0 -0
  195. package/dist/chunk-IPYAN574.js.gz +0 -0
  196. package/dist/chunk-L4ZADJOM.mjs.br +0 -0
  197. package/dist/chunk-L4ZADJOM.mjs.gz +0 -0
  198. package/dist/chunk-M3SIFXWD.mjs.br +0 -0
  199. package/dist/chunk-M3SIFXWD.mjs.gz +0 -0
  200. package/dist/chunk-QGM4M3NI.js.br +0 -0
  201. package/dist/chunk-QGM4M3NI.js.gz +0 -0
  202. package/dist/chunk-TEN35NUX.js.br +0 -0
  203. package/dist/chunk-TEN35NUX.js.gz +0 -0
  204. package/dist/dist-755SJ3ZH.js.br +0 -0
  205. package/dist/dist-755SJ3ZH.js.gz +0 -0
  206. package/dist/dist-FFWP5NQZ.mjs +0 -2
  207. package/dist/dist-FFWP5NQZ.mjs.br +0 -0
  208. package/dist/dist-FFWP5NQZ.mjs.gz +0 -0
  209. package/dist/hooks-unstable.d.ts.map +0 -1
  210. package/dist/hooks-unstable.js.br +0 -0
  211. package/dist/hooks-unstable.js.gz +0 -0
  212. package/dist/hooks-unstable.mjs.br +0 -0
  213. package/dist/hooks-unstable.mjs.gz +0 -0
  214. package/dist/three.module-7CXEVRKB.mjs.br +0 -0
  215. package/dist/three.module-7CXEVRKB.mjs.gz +0 -0
  216. package/dist/three.module-CPZZFD2Q.js.br +0 -0
  217. package/dist/three.module-CPZZFD2Q.js.gz +0 -0
  218. package/dist/useViewerBuildingBlocks-ll3_ncCH.d.ts.map +0 -1
  219. package/dist/y-webrtc-6CRYHAXH.mjs.br +0 -0
  220. package/dist/y-webrtc-6CRYHAXH.mjs.gz +0 -0
  221. package/dist/y-webrtc-QCZF75JW.js.br +0 -0
  222. package/dist/y-webrtc-QCZF75JW.js.gz +0 -0
  223. package/dist/y-websocket-57Q3RNHC.mjs.br +0 -0
  224. package/dist/y-websocket-57Q3RNHC.mjs.gz +0 -0
  225. package/dist/y-websocket-QJEM6VOB.js.br +0 -0
  226. package/dist/y-websocket-QJEM6VOB.js.gz +0 -0
  227. package/dist/yjs-UH3EPF3C.js.br +0 -0
  228. package/dist/yjs-UH3EPF3C.js.gz +0 -0
  229. package/dist/yjs-Y7IYUWOG.mjs.br +0 -0
  230. package/dist/yjs-Y7IYUWOG.mjs.gz +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkIPYAN574_js = require('./chunk-IPYAN574.js');
3
+ var chunkCLNGAVNH_js = require('./chunk-CLNGAVNH.js');
4
4
  var DOMPurify = require('dompurify');
5
5
 
6
6
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -237,6 +237,113 @@ var THEME_CATALOG = [
237
237
  function resolveThemeCatalogEntry(key, catalog = THEME_CATALOG) {
238
238
  return catalog.find((entry) => entry.key === key)?.theme;
239
239
  }
240
+ function corePreset(id) {
241
+ const preset = chunkCLNGAVNH_js.THEME_PRESETS.find((p) => p.id === id);
242
+ if (!preset) {
243
+ throw new Error(`theme-gallery-presets: core THEME_PRESETS is missing "${id}"`);
244
+ }
245
+ return preset;
246
+ }
247
+ var WISP_PRESET = {
248
+ id: "wisp",
249
+ name: "Wisp",
250
+ colorScheme: {
251
+ dk1: "#000000",
252
+ lt1: "#FFFFFF",
253
+ dk2: "#46393B",
254
+ lt2: "#E8DCD8",
255
+ accent1: "#A53010",
256
+ accent2: "#DE7E18",
257
+ accent3: "#9F8351",
258
+ accent4: "#728653",
259
+ accent5: "#92AA4C",
260
+ accent6: "#6AAC91",
261
+ hlink: "#FB4F14",
262
+ folHlink: "#E25839"
263
+ },
264
+ fontScheme: {
265
+ majorFont: { latin: "Century Gothic" },
266
+ minorFont: { latin: "Century Gothic" }
267
+ }
268
+ };
269
+ var BERLIN_PRESET = {
270
+ id: "berlin",
271
+ name: "Berlin",
272
+ colorScheme: {
273
+ dk1: "#000000",
274
+ lt1: "#FFFFFF",
275
+ dk2: "#3E5C61",
276
+ lt2: "#D5E0D0",
277
+ accent1: "#F09415",
278
+ accent2: "#C1B56B",
279
+ accent3: "#89C2A3",
280
+ accent4: "#729BBE",
281
+ accent5: "#9A90C2",
282
+ accent6: "#BE8DBE",
283
+ hlink: "#25A0DA",
284
+ folHlink: "#FF7F00"
285
+ },
286
+ fontScheme: {
287
+ majorFont: { latin: "Trebuchet MS" },
288
+ minorFont: { latin: "Trebuchet MS" }
289
+ }
290
+ };
291
+ var SLICE_PRESET = {
292
+ id: "slice",
293
+ name: "Slice",
294
+ colorScheme: {
295
+ dk1: "#000000",
296
+ lt1: "#FFFFFF",
297
+ dk2: "#2E3B4C",
298
+ lt2: "#C7CDD3",
299
+ accent1: "#E2751D",
300
+ accent2: "#C53B23",
301
+ accent3: "#A13D69",
302
+ accent4: "#58599E",
303
+ accent5: "#36749D",
304
+ accent6: "#4EA39A",
305
+ hlink: "#FD6B32",
306
+ folHlink: "#D14D0F"
307
+ },
308
+ fontScheme: {
309
+ majorFont: { latin: "Century Gothic" },
310
+ minorFont: { latin: "Century Gothic" }
311
+ }
312
+ };
313
+ var DIVIDEND_PRESET = {
314
+ id: "dividend",
315
+ name: "Dividend",
316
+ colorScheme: {
317
+ dk1: "#000000",
318
+ lt1: "#FFFFFF",
319
+ dk2: "#3D3D3D",
320
+ lt2: "#E1E1E1",
321
+ accent1: "#4D1434",
322
+ accent2: "#903163",
323
+ accent3: "#B2324B",
324
+ accent4: "#D34817",
325
+ accent5: "#E8971C",
326
+ accent6: "#FDCB00",
327
+ hlink: "#A03068",
328
+ folHlink: "#C34882"
329
+ },
330
+ fontScheme: {
331
+ majorFont: { latin: "Gill Sans MT" },
332
+ minorFont: { latin: "Gill Sans MT" }
333
+ }
334
+ };
335
+ [
336
+ corePreset("office"),
337
+ corePreset("facet"),
338
+ corePreset("integral"),
339
+ corePreset("ion"),
340
+ corePreset("retrospect"),
341
+ corePreset("organic"),
342
+ WISP_PRESET,
343
+ BERLIN_PRESET,
344
+ SLICE_PRESET,
345
+ DIVIDEND_PRESET
346
+ ];
240
347
  function collectMediaElements(elements, collector) {
241
348
  for (const element of elements) {
242
349
  if (element.type === "media") {
@@ -307,7 +414,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
307
414
  guides.push({
308
415
  id: g.id,
309
416
  axis: g.orientation === "horz" ? "h" : "v",
310
- position: chunkIPYAN574_js.guideEmuToPx(g.positionEmu)
417
+ position: chunkCLNGAVNH_js.guideEmuToPx(g.positionEmu)
311
418
  });
312
419
  }
313
420
  }
@@ -316,7 +423,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
316
423
  guides.push({
317
424
  id: g.id,
318
425
  axis: g.orientation === "horz" ? "h" : "v",
319
- position: chunkIPYAN574_js.guideEmuToPx(g.positionEmu)
426
+ position: chunkCLNGAVNH_js.guideEmuToPx(g.positionEmu)
320
427
  });
321
428
  }
322
429
  }
@@ -329,23 +436,23 @@ function getResolvedShapeClipPathFor(shapeType, width, height, adjustments) {
329
436
  return void 0;
330
437
  }
331
438
  if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
332
- return chunkIPYAN574_js.getShapeClipPath(shapeType);
439
+ return chunkCLNGAVNH_js.getShapeClipPath(shapeType);
333
440
  }
334
441
  if (adjustments && Object.keys(adjustments).length > 0) {
335
- const adjusted = chunkIPYAN574_js.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
442
+ const adjusted = chunkCLNGAVNH_js.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
336
443
  if (adjusted !== void 0) {
337
444
  return adjusted;
338
445
  }
339
446
  }
340
- const fromPreset = chunkIPYAN574_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
447
+ const fromPreset = chunkCLNGAVNH_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
341
448
  if (fromPreset !== void 0) {
342
449
  return fromPreset;
343
450
  }
344
- const cloud = chunkIPYAN574_js.getCloudPathForRendering(shapeType, width, height);
451
+ const cloud = chunkCLNGAVNH_js.getCloudPathForRendering(shapeType, width, height);
345
452
  if (cloud !== void 0) {
346
453
  return cloud;
347
454
  }
348
- return chunkIPYAN574_js.getShapeClipPath(shapeType);
455
+ return chunkCLNGAVNH_js.getShapeClipPath(shapeType);
349
456
  }
350
457
  function buildCustomGeometryClipPath(pathData, pathWidth, pathHeight, elemWidth, elemHeight) {
351
458
  if (!pathData || !Number.isFinite(pathWidth) || !Number.isFinite(pathHeight) || pathWidth <= 0 || pathHeight <= 0 || !Number.isFinite(elemWidth) || !Number.isFinite(elemHeight) || elemWidth <= 0 || elemHeight <= 0) {
@@ -548,6 +655,42 @@ function buildShapePathGradient(stops, focalPoint, fillToRect) {
548
655
  const posY = focalPoint ? `${Math.round(cy)}%` : "center";
549
656
  return `radial-gradient(farthest-side at ${posX} ${posY}, ${stopStr})`;
550
657
  }
658
+ function getGradientTileFlipCss(mode) {
659
+ if (!mode || mode === "none") {
660
+ return void 0;
661
+ }
662
+ switch (mode) {
663
+ case "x":
664
+ return { backgroundSize: "50% 100%", backgroundRepeat: "repeat-x" };
665
+ case "y":
666
+ return { backgroundSize: "100% 50%", backgroundRepeat: "repeat-y" };
667
+ case "xy":
668
+ return { backgroundSize: "50% 50%", backgroundRepeat: "repeat" };
669
+ default:
670
+ return void 0;
671
+ }
672
+ }
673
+ function getGradientTileRectCss(tileRect) {
674
+ if (!tileRect) {
675
+ return void 0;
676
+ }
677
+ const { l, t, r, b } = tileRect;
678
+ const sizeW = 1 - l - r;
679
+ const sizeH = 1 - t - b;
680
+ if (sizeW <= 0 || sizeH <= 0) {
681
+ return void 0;
682
+ }
683
+ if (Math.abs(sizeW - 1) < 1e-3 && Math.abs(sizeH - 1) < 1e-3) {
684
+ return void 0;
685
+ }
686
+ const posX = 1 - sizeW > 1e-3 ? l / (1 - sizeW) * 100 : 0;
687
+ const posY = 1 - sizeH > 1e-3 ? t / (1 - sizeH) * 100 : 0;
688
+ return {
689
+ backgroundSize: `${Math.round(sizeW * 100)}% ${Math.round(sizeH * 100)}%`,
690
+ backgroundPosition: `${Math.round(posX)}% ${Math.round(posY)}%`,
691
+ backgroundRepeat: "no-repeat"
692
+ };
693
+ }
551
694
  function buildReflectedGradientStops(stops) {
552
695
  if (stops.length === 0) {
553
696
  return [];
@@ -866,6 +1009,23 @@ function getPatternSvg(preset, fg, bg) {
866
1009
  return null;
867
1010
  }
868
1011
  }
1012
+ function buildPatternFill(pattern, elementId) {
1013
+ if (!pattern || pattern.fillMode !== "pattern" || !pattern.fillPatternPreset) {
1014
+ return void 0;
1015
+ }
1016
+ const fg = normalizeHexColor(pattern.fillColor, "#000000");
1017
+ const bg = normalizeHexColor(pattern.fillPatternBackgroundColor, "#ffffff");
1018
+ const preset = pattern.fillPatternPreset;
1019
+ const svgPattern = getPatternSvg(preset, fg, bg);
1020
+ if (!svgPattern) {
1021
+ return void 0;
1022
+ }
1023
+ const encoded = encodeURIComponent(svgPattern);
1024
+ return {
1025
+ backgroundImage: `url("data:image/svg+xml,${encoded}")`,
1026
+ backgroundColor: bg
1027
+ };
1028
+ }
869
1029
  function buildPatternFillCss(style) {
870
1030
  if (!style || style.fillMode !== "pattern" || !style.fillPatternPreset) {
871
1031
  return void 0;
@@ -940,6 +1100,81 @@ var OOXML_PATTERN_PRESETS = [
940
1100
  "trellis",
941
1101
  "zigZag"
942
1102
  ];
1103
+ function getComputedFillStyle(element, parentGroupFill) {
1104
+ if (!chunkCLNGAVNH_js.hasShapeProperties(element)) {
1105
+ return void 0;
1106
+ }
1107
+ const ss = element.shapeStyle;
1108
+ if (!ss) {
1109
+ return {};
1110
+ }
1111
+ if (ss.fillMode === "group") {
1112
+ return parentGroupFill ? resolveComputedFill(parentGroupFill, element) : {};
1113
+ }
1114
+ return resolveComputedFill(ss, element);
1115
+ }
1116
+ function resolveComputedFill(ss, element) {
1117
+ const imageFillUrl = ss.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
1118
+ if (imageFillUrl) {
1119
+ const tile = ss.fillImageMode === "tile";
1120
+ return {
1121
+ backgroundColor: "transparent",
1122
+ backgroundImage: `url(${imageFillUrl})`,
1123
+ backgroundRepeat: tile ? "repeat" : "no-repeat",
1124
+ backgroundSize: tile ? "auto" : "100% 100%"
1125
+ };
1126
+ }
1127
+ const geometry = {
1128
+ rotation: element.rotation,
1129
+ width: element.width,
1130
+ height: element.height
1131
+ };
1132
+ const gradient = buildGradientCss(ss, geometry) ?? (ss.fillMode === "gradient" ? ss.fillGradient : void 0);
1133
+ if (gradient) {
1134
+ const isStructuredLinear = ss.fillMode === "gradient" && (ss.fillGradientType || "linear") === "linear" && sanitizeGradientStops(ss.fillGradientStops).length > 0;
1135
+ const tileFlip = isStructuredLinear ? getGradientTileFlipCss(ss.fillGradientFlip) : void 0;
1136
+ if (tileFlip) {
1137
+ return {
1138
+ backgroundImage: gradient,
1139
+ backgroundSize: tileFlip.backgroundSize,
1140
+ backgroundRepeat: tileFlip.backgroundRepeat
1141
+ };
1142
+ }
1143
+ const tileRect = ss.fillMode === "gradient" ? getGradientTileRectCss(ss.fillGradientTileRect) : void 0;
1144
+ if (tileRect) {
1145
+ return {
1146
+ backgroundImage: gradient,
1147
+ backgroundSize: tileRect.backgroundSize,
1148
+ backgroundPosition: tileRect.backgroundPosition,
1149
+ backgroundRepeat: tileRect.backgroundRepeat
1150
+ };
1151
+ }
1152
+ return { backgroundImage: gradient };
1153
+ }
1154
+ const pattern = buildPatternFill(ss, element.id);
1155
+ if (pattern) {
1156
+ return {
1157
+ backgroundColor: pattern.backgroundColor,
1158
+ backgroundImage: pattern.backgroundImage,
1159
+ backgroundRepeat: "repeat",
1160
+ backgroundSize: "auto",
1161
+ svgFilter: pattern.svgFilter
1162
+ };
1163
+ }
1164
+ if (ss.fillColor && ss.fillColor !== "transparent" && ss.fillMode !== "none") {
1165
+ return { backgroundColor: colorWithOpacity(ss.fillColor, ss.fillOpacity) };
1166
+ }
1167
+ return {};
1168
+ }
1169
+ function getGroupChildParentFill(group) {
1170
+ return group.type === "group" ? group.groupFill : void 0;
1171
+ }
1172
+ function resolveGroupChildFill(child2, parentGroupFill) {
1173
+ if (!parentGroupFill || !chunkCLNGAVNH_js.hasShapeProperties(child2) || child2.shapeStyle?.fillMode !== "group") {
1174
+ return void 0;
1175
+ }
1176
+ return getComputedFillStyle(child2, parentGroupFill);
1177
+ }
943
1178
  function normalizeStrokeDashType(value) {
944
1179
  const normalized = String(value || "").trim().toLowerCase();
945
1180
  if (!normalized) {
@@ -1138,7 +1373,7 @@ var DEFAULT_SCHEME_COLOR_MAP = {
1138
1373
  phclr: "#4472C4"
1139
1374
  };
1140
1375
  function applyDrawingColorTransforms2(baseColor, colorNode) {
1141
- return chunkIPYAN574_js.applyDrawingColorTransforms(baseColor, colorNode);
1376
+ return chunkCLNGAVNH_js.applyDrawingColorTransforms(baseColor, colorNode);
1142
1377
  }
1143
1378
  function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
1144
1379
  if (!colorNode) {
@@ -1150,8 +1385,8 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
1150
1385
  const green = parseDrawingPercent(scrgb["@_g"]);
1151
1386
  const blue = parseDrawingPercent(scrgb["@_b"]);
1152
1387
  if (red !== void 0 && green !== void 0 && blue !== void 0) {
1153
- const toHex = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
1154
- const base = `#${toHex(red * 255)}${toHex(green * 255)}${toHex(blue * 255)}`;
1388
+ const toHex2 = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
1389
+ const base = `#${toHex2(red * 255)}${toHex2(green * 255)}${toHex2(blue * 255)}`;
1155
1390
  return applyDrawingColorTransforms2(base, scrgb);
1156
1391
  }
1157
1392
  }
@@ -1190,9 +1425,9 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
1190
1425
  const h = hueRaw / 6e4;
1191
1426
  const s = clampUnitInterval(satRaw / 1e5);
1192
1427
  const l = clampUnitInterval(lumRaw / 1e5);
1193
- const rgb = chunkIPYAN574_js.hslToRgb(h, s, l);
1194
- const toHex = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
1195
- const base = `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`;
1428
+ const rgb = chunkCLNGAVNH_js.hslToRgb(h, s, l);
1429
+ const toHex2 = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
1430
+ const base = `#${toHex2(rgb.r)}${toHex2(rgb.g)}${toHex2(rgb.b)}`;
1196
1431
  return applyDrawingColorTransforms2(base, hslNode);
1197
1432
  }
1198
1433
  }
@@ -1200,7 +1435,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
1200
1435
  const preset = String(
1201
1436
  colorNode["a:prstClr"]?.["@_val"] || ""
1202
1437
  ).toLowerCase();
1203
- const mapped = chunkIPYAN574_js.PRESET_COLOR_MAP[preset];
1438
+ const mapped = chunkCLNGAVNH_js.PRESET_COLOR_MAP[preset];
1204
1439
  if (!mapped) {
1205
1440
  return void 0;
1206
1441
  }
@@ -1364,6 +1599,9 @@ function hasDistinctScriptFonts(fonts) {
1364
1599
  }
1365
1600
  var DEFAULT_SHADOW_COLOR = "#000000";
1366
1601
  var DEFAULT_GLOW_COLOR = "#ffff00";
1602
+ function escapeSvgAttr(value) {
1603
+ return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1604
+ }
1367
1605
  function clampUnitInterval2(value) {
1368
1606
  return Math.min(1, Math.max(0, value));
1369
1607
  }
@@ -1411,10 +1649,23 @@ function getOuterShadowCss(style) {
1411
1649
  }
1412
1650
  const blur = typeof style.shadowBlur === "number" && Number.isFinite(style.shadowBlur) ? Math.max(0, style.shadowBlur) : 6;
1413
1651
  const opacity = typeof style.shadowOpacity === "number" && Number.isFinite(style.shadowOpacity) ? clampUnitInterval2(style.shadowOpacity) : 0.35;
1414
- return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${colorWithOpacity2(
1652
+ const spread = getShadowScaleSpread(style.shadowScaleX, style.shadowScaleY, blur);
1653
+ const color = colorWithOpacity2(
1415
1654
  normalizeHexColor2(style.shadowColor, DEFAULT_SHADOW_COLOR),
1416
1655
  opacity
1417
- )}`;
1656
+ );
1657
+ const geometry = `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px`;
1658
+ return spread === 0 ? `${geometry} ${color}` : `${geometry} ${spread}px ${color}`;
1659
+ }
1660
+ function getShadowScaleSpread(scaleX, scaleY, blur) {
1661
+ const sx = typeof scaleX === "number" && Number.isFinite(scaleX) ? scaleX / 1e5 : 1;
1662
+ const sy = typeof scaleY === "number" && Number.isFinite(scaleY) ? scaleY / 1e5 : 1;
1663
+ const avgScale = (sx + sy) / 2;
1664
+ if (avgScale === 1) {
1665
+ return 0;
1666
+ }
1667
+ const base = Math.max(blur, 4);
1668
+ return Math.round(base * (avgScale - 1));
1418
1669
  }
1419
1670
  function getInnerShadowCss(style) {
1420
1671
  if (!style?.innerShadowColor || style.innerShadowColor === "transparent") {
@@ -1463,6 +1714,32 @@ function getGlowBoxShadowCss(color, radius, opacity) {
1463
1714
  const c3 = colorWithOpacity2(normalizedColor, baseOpacity * 0.3);
1464
1715
  return `0 0 ${r1}px ${c1}, 0 0 ${r2}px ${c2}, 0 0 ${r3}px ${c3}`;
1465
1716
  }
1717
+ function getBoxShadowCss(style, options = {}) {
1718
+ if (!style) {
1719
+ return void 0;
1720
+ }
1721
+ const parts = [];
1722
+ const multiLayer = getMultiLayerShadowCss(style);
1723
+ if (multiLayer) {
1724
+ parts.push(multiLayer);
1725
+ } else {
1726
+ const outer = getOuterShadowCss(style);
1727
+ if (outer) {
1728
+ parts.push(outer);
1729
+ }
1730
+ }
1731
+ const inner = getInnerShadowCss(style);
1732
+ if (inner) {
1733
+ parts.push(inner);
1734
+ }
1735
+ if (options.includeGlow !== false) {
1736
+ const glow = getGlowBoxShadowCss(style.glowColor, style.glowRadius, style.glowOpacity);
1737
+ if (glow) {
1738
+ parts.push(glow);
1739
+ }
1740
+ }
1741
+ return parts.length > 0 ? parts.join(", ") : void 0;
1742
+ }
1466
1743
  var buildShadowCssFromShapeStyle = getOuterShadowCss;
1467
1744
  var buildInnerShadowCssFromShapeStyle = getInnerShadowCss;
1468
1745
  var buildMultiLayerShadowCss = getMultiLayerShadowCss;
@@ -1514,18 +1791,164 @@ function getEffectDagCssFilter(style, elementId) {
1514
1791
  return filters.length > 0 ? filters.join(" ") : void 0;
1515
1792
  }
1516
1793
  var getEffectDagFilter = getEffectDagCssFilter;
1517
- function buildReflectionCssValue(distance, startOpacity, endOpacity, fadeLength, blurRadius = 0) {
1794
+ function getEffectFilterCss(style, elementId) {
1795
+ if (!style) {
1796
+ return void 0;
1797
+ }
1798
+ const parts = [];
1799
+ if (style.glowColor && style.glowColor !== "transparent" && style.glowRadius) {
1800
+ const glowOpacity = typeof style.glowOpacity === "number" ? style.glowOpacity : 0.75;
1801
+ const glowRad = Math.round(Math.max(0, style.glowRadius));
1802
+ const glowCol = colorWithOpacity2(
1803
+ normalizeHexColor2(style.glowColor, DEFAULT_GLOW_COLOR),
1804
+ glowOpacity
1805
+ );
1806
+ parts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
1807
+ }
1808
+ if (typeof style.softEdgeRadius === "number" && style.softEdgeRadius > 0) {
1809
+ if (elementId) {
1810
+ parts.push(`url(#${getSoftEdgeFilterId(elementId)})`);
1811
+ } else {
1812
+ parts.push(`blur(${Math.min(2, Math.round(style.softEdgeRadius))}px)`);
1813
+ }
1814
+ }
1815
+ if (typeof style.blurRadius === "number" && style.blurRadius > 0) {
1816
+ parts.push(`blur(${Math.round(style.blurRadius)}px)`);
1817
+ }
1818
+ const dagFilter = getEffectDagCssFilter(style, elementId);
1819
+ if (dagFilter) {
1820
+ parts.push(dagFilter);
1821
+ }
1822
+ return parts.length > 0 ? parts.join(" ") : void 0;
1823
+ }
1824
+ function buildReflectionCssValue(distance, startOpacity, endOpacity, fadeLength, blurRadius = 0, startOffset = 0) {
1518
1825
  const effectiveFadeLength = fadeLength + blurRadius * 2;
1519
1826
  const midOpacity = (startOpacity + endOpacity) / 2;
1520
1827
  const midPoint = Math.round(effectiveFadeLength * 0.5);
1828
+ const holdPx = Math.round(Math.max(0, Math.min(startOffset, effectiveFadeLength - 1)));
1829
+ const holdStop = holdPx > 0 ? `rgba(255,255,255,${startOpacity}) ${holdPx}px, ` : "";
1521
1830
  if (blurRadius > 0) {
1522
- return `below ${Math.round(distance)}px linear-gradient(to bottom, rgba(255,255,255,${startOpacity}), rgba(255,255,255,${midOpacity}) ${midPoint}px, rgba(255,255,255,${endOpacity}) ${effectiveFadeLength}px)`;
1831
+ return `below ${Math.round(distance)}px linear-gradient(to bottom, rgba(255,255,255,${startOpacity}), ${holdStop}rgba(255,255,255,${midOpacity}) ${midPoint}px, rgba(255,255,255,${endOpacity}) ${effectiveFadeLength}px)`;
1832
+ }
1833
+ return `below ${Math.round(distance)}px linear-gradient(to bottom, rgba(255,255,255,${startOpacity}), ${holdStop}rgba(255,255,255,${endOpacity}) ${fadeLength}px)`;
1834
+ }
1835
+ function getReflectionCss(style, elementHeight) {
1836
+ if (!style) {
1837
+ return void 0;
1838
+ }
1839
+ const hasReflection = typeof style.reflectionStartOpacity === "number" && style.reflectionStartOpacity > 0 || typeof style.reflectionDistance === "number" && style.reflectionDistance > 0 || typeof style.reflectionBlurRadius === "number" && style.reflectionBlurRadius > 0;
1840
+ if (!hasReflection) {
1841
+ return void 0;
1842
+ }
1843
+ const distance = style.reflectionDistance ?? 0;
1844
+ const startOpacity = typeof style.reflectionStartOpacity === "number" ? style.reflectionStartOpacity : 0.5;
1845
+ const endOpacity = typeof style.reflectionEndOpacity === "number" ? style.reflectionEndOpacity : 0;
1846
+ const fadeLength = typeof style.reflectionEndPosition === "number" ? Math.round(style.reflectionEndPosition * Math.max(elementHeight, 1)) : 100;
1847
+ const blurRadius = typeof style.reflectionBlurRadius === "number" ? style.reflectionBlurRadius : 0;
1848
+ const startOffset = typeof style.reflectionStartPosition === "number" && style.reflectionStartPosition > 0 ? Math.round(clampUnitInterval2(style.reflectionStartPosition) * fadeLength) : 0;
1849
+ return {
1850
+ webkitBoxReflect: buildReflectionCssValue(
1851
+ distance,
1852
+ startOpacity,
1853
+ endOpacity,
1854
+ fadeLength,
1855
+ blurRadius,
1856
+ startOffset
1857
+ ),
1858
+ distance,
1859
+ startOpacity,
1860
+ endOpacity,
1861
+ fadeLength,
1862
+ blurRadius
1863
+ };
1864
+ }
1865
+ function getEffectDagOpacity(style) {
1866
+ if (!style || typeof style.dagAlphaModFix !== "number") {
1867
+ return void 0;
1868
+ }
1869
+ return clampUnitInterval2(style.dagAlphaModFix / 100);
1870
+ }
1871
+ function getEffectDagBlendMode(blend) {
1872
+ switch (blend) {
1873
+ case "mult":
1874
+ return "multiply";
1875
+ case "screen":
1876
+ return "screen";
1877
+ case "darken":
1878
+ return "darken";
1879
+ case "lighten":
1880
+ return "lighten";
1881
+ default:
1882
+ return void 0;
1883
+ }
1884
+ }
1885
+ function getEffectDagFillOverlay(style) {
1886
+ if (!style?.dagFillOverlayColor || style.dagFillOverlayColor === "transparent") {
1887
+ return void 0;
1523
1888
  }
1524
- return `below ${Math.round(distance)}px linear-gradient(to bottom, rgba(255,255,255,${startOpacity}), rgba(255,255,255,${endOpacity}) ${fadeLength}px)`;
1889
+ const blendMode = getEffectDagBlendMode(style.dagFillOverlayBlend) ?? "normal";
1890
+ const color = colorWithOpacity2(
1891
+ normalizeHexColor2(style.dagFillOverlayColor, DEFAULT_SHADOW_COLOR),
1892
+ style.dagFillOverlayOpacity
1893
+ );
1894
+ return { color, blendMode };
1525
1895
  }
1526
1896
  function getDuotoneFilterId(elementId) {
1527
1897
  return `dag-duotone-${elementId}`;
1528
1898
  }
1899
+ function getSoftEdgeFilterId(elementId) {
1900
+ return `soft-edge-${elementId}`;
1901
+ }
1902
+ function getSoftEdgeSvgFilter(style, elementId) {
1903
+ if (!style || typeof style.softEdgeRadius !== "number" || style.softEdgeRadius <= 0) {
1904
+ return void 0;
1905
+ }
1906
+ const id = getSoftEdgeFilterId(elementId);
1907
+ const radius = Math.round(style.softEdgeRadius);
1908
+ const filterMarkup = [
1909
+ `<filter id="${escapeSvgAttr(id)}" x="-20%" y="-20%" width="140%" height="140%" color-interpolation-filters="sRGB">`,
1910
+ `<feGaussianBlur in="SourceAlpha" stdDeviation="${radius}" result="softEdgeAlpha"/>`,
1911
+ `<feComposite in="SourceGraphic" in2="softEdgeAlpha" operator="in"/>`,
1912
+ `</filter>`
1913
+ ].join("");
1914
+ return { id, cssReference: `url(#${id})`, filterMarkup };
1915
+ }
1916
+ function getComputedEffectStyle(element, options = {}) {
1917
+ const style = "shapeStyle" in element ? element.shapeStyle : void 0;
1918
+ const result = {};
1919
+ if (!style) {
1920
+ return result;
1921
+ }
1922
+ const boxShadow = getBoxShadowCss(style, { includeGlow: options.includeGlowBoxShadow });
1923
+ if (boxShadow) {
1924
+ result.boxShadow = boxShadow;
1925
+ }
1926
+ const filter = getEffectFilterCss(style, element.id);
1927
+ if (filter) {
1928
+ result.filter = filter;
1929
+ }
1930
+ const reflection = getReflectionCss(style, element.height);
1931
+ if (reflection) {
1932
+ result.webkitBoxReflect = reflection.webkitBoxReflect;
1933
+ }
1934
+ const opacity = getEffectDagOpacity(style);
1935
+ if (opacity !== void 0) {
1936
+ result.opacity = opacity;
1937
+ }
1938
+ const overlay = getEffectDagFillOverlay(style);
1939
+ if (overlay) {
1940
+ result.fillOverlay = overlay;
1941
+ } else {
1942
+ const blend = getEffectDagBlendMode(style.dagFillOverlayBlend);
1943
+ if (blend) {
1944
+ result.mixBlendMode = blend;
1945
+ }
1946
+ }
1947
+ if (style.blurGrow && typeof style.blurRadius === "number" && style.blurRadius > 0) {
1948
+ result.overflowVisible = true;
1949
+ }
1950
+ return result;
1951
+ }
1529
1952
  function clamp(value, minimum, maximum) {
1530
1953
  return Math.min(maximum, Math.max(minimum, value));
1531
1954
  }
@@ -1555,7 +1978,7 @@ function hexToRgbUnit2(hex) {
1555
1978
  };
1556
1979
  }
1557
1980
  function getEffects(element) {
1558
- if (!chunkIPYAN574_js.isImageLikeElement(element)) {
1981
+ if (!chunkCLNGAVNH_js.isImageLikeElement(element)) {
1559
1982
  return void 0;
1560
1983
  }
1561
1984
  return element.imageEffects;
@@ -1744,7 +2167,7 @@ function buildDuotoneFilterMarkup(color1, color2) {
1744
2167
  const c2 = hexToRgbUnit2(color2);
1745
2168
  return `<feColorMatrix type="matrix" values="${GRAYSCALE_LUMINANCE_MATRIX}"/><feComponentTransfer><feFuncR type="linear" slope="${c2.r - c1.r}" intercept="${c1.r}"/><feFuncG type="linear" slope="${c2.g - c1.g}" intercept="${c1.g}"/><feFuncB type="linear" slope="${c2.b - c1.b}" intercept="${c1.b}"/></feComponentTransfer>`;
1746
2169
  }
1747
- function getDuotoneImageFilter(element, elementId = chunkIPYAN574_js.isImageLikeElement(element) ? element.id : "") {
2170
+ function getDuotoneImageFilter(element, elementId = chunkCLNGAVNH_js.isImageLikeElement(element) ? element.id : "") {
1748
2171
  const effects = getEffects(element);
1749
2172
  if (!effects?.duotone) {
1750
2173
  return void 0;
@@ -1846,7 +2269,7 @@ function buildImageAlphaFilterMarkup(effects) {
1846
2269
  }
1847
2270
  return parts.length > 0 ? parts.join("") : void 0;
1848
2271
  }
1849
- function getImageAlphaFilter(element, elementId = chunkIPYAN574_js.isImageLikeElement(element) ? element.id : "") {
2272
+ function getImageAlphaFilter(element, elementId = chunkCLNGAVNH_js.isImageLikeElement(element) ? element.id : "") {
1850
2273
  const effects = getEffects(element);
1851
2274
  if (!effects || !hasAdvancedImageAlphaEffects(element)) {
1852
2275
  return void 0;
@@ -1936,7 +2359,7 @@ function buildArtisticFilterMarkup(effectName, radius) {
1936
2359
  return void 0;
1937
2360
  }
1938
2361
  }
1939
- function getArtisticImageFilter(element, elementId = chunkIPYAN574_js.isImageLikeElement(element) ? element.id : "") {
2362
+ function getArtisticImageFilter(element, elementId = chunkCLNGAVNH_js.isImageLikeElement(element) ? element.id : "") {
1940
2363
  const effects = getEffects(element);
1941
2364
  if (!effects?.artisticEffect || !needsSvgArtisticFilter(effects.artisticEffect)) {
1942
2365
  return void 0;
@@ -2895,7 +3318,7 @@ function convertChildren(node) {
2895
3318
  if (key.startsWith("@_")) {
2896
3319
  continue;
2897
3320
  }
2898
- const tag = chunkIPYAN574_js.stripXmlOrderSuffix(key);
3321
+ const tag = chunkCLNGAVNH_js.stripXmlOrderSuffix(key);
2899
3322
  if (tag === "m:oMathPara") {
2900
3323
  continue;
2901
3324
  }
@@ -2967,7 +3390,7 @@ function findOmathRoots(node) {
2967
3390
  }
2968
3391
  }
2969
3392
  const contentTags = /* @__PURE__ */ new Set(["m:r", "m:f", "m:rad", "m:sSup", "m:sSub", "m:box"]);
2970
- if (Object.keys(node).some((key) => contentTags.has(chunkIPYAN574_js.stripXmlOrderSuffix(key)))) {
3393
+ if (Object.keys(node).some((key) => contentTags.has(chunkCLNGAVNH_js.stripXmlOrderSuffix(key)))) {
2971
3394
  return [node];
2972
3395
  }
2973
3396
  return [];
@@ -3175,11 +3598,11 @@ function mergeSiblings(nodes) {
3175
3598
  for (const [key] of entries) {
3176
3599
  counts.set(key, (counts.get(key) ?? 0) + 1);
3177
3600
  }
3178
- const ordered = {};
3601
+ const ordered2 = {};
3179
3602
  for (const [position, [key, value]] of entries.entries()) {
3180
- ordered[(counts.get(key) ?? 0) > 1 ? chunkIPYAN574_js.orderedXmlKey(key, position) : key] = value;
3603
+ ordered2[(counts.get(key) ?? 0) > 1 ? chunkCLNGAVNH_js.orderedXmlKey(key, position) : key] = value;
3181
3604
  }
3182
- return ordered;
3605
+ return ordered2;
3183
3606
  }
3184
3607
  const result = {};
3185
3608
  for (const [key, value] of entries) {
@@ -3581,7 +4004,7 @@ function ommlChildrenToLatex(node) {
3581
4004
  if (key.startsWith("@_")) {
3582
4005
  continue;
3583
4006
  }
3584
- const tag = chunkIPYAN574_js.stripXmlOrderSuffix(key);
4007
+ const tag = chunkCLNGAVNH_js.stripXmlOrderSuffix(key);
3585
4008
  const items = ensureArr(node[key]);
3586
4009
  for (const item of items) {
3587
4010
  const result = ommlElementToLatex(tag, item);
@@ -3795,8 +4218,8 @@ function hexToRgb(hex) {
3795
4218
  ];
3796
4219
  }
3797
4220
  function rgbToHex(r, g, b) {
3798
- const clamp7 = (v) => Math.max(0, Math.min(255, Math.round(v)));
3799
- return `#${clamp7(r).toString(16).padStart(2, "0")}${clamp7(g).toString(16).padStart(2, "0")}${clamp7(b).toString(16).padStart(2, "0")}`;
4221
+ const clamp8 = (v) => Math.max(0, Math.min(255, Math.round(v)));
4222
+ return `#${clamp8(r).toString(16).padStart(2, "0")}${clamp8(g).toString(16).padStart(2, "0")}${clamp8(b).toString(16).padStart(2, "0")}`;
3800
4223
  }
3801
4224
  function tint(hex, amount) {
3802
4225
  const [r, g, b] = hexToRgb(hex);
@@ -4190,6 +4613,26 @@ function splitSeriesByAxis(series, axes) {
4190
4613
  }
4191
4614
  return { primary, secondary };
4192
4615
  }
4616
+ function hexToRgb2(hex) {
4617
+ const h = hex.replace("#", "");
4618
+ return [
4619
+ parseInt(h.substring(0, 2), 16),
4620
+ parseInt(h.substring(2, 4), 16),
4621
+ parseInt(h.substring(4, 6), 16)
4622
+ ];
4623
+ }
4624
+ function rgbToHex2(r, g, b) {
4625
+ const clamp8 = (v) => Math.max(0, Math.min(255, Math.round(v)));
4626
+ return `#${clamp8(r).toString(16).padStart(2, "0")}${clamp8(g).toString(16).padStart(2, "0")}${clamp8(b).toString(16).padStart(2, "0")}`;
4627
+ }
4628
+ function tint2(hex, amount) {
4629
+ const [r, g, b] = hexToRgb2(hex);
4630
+ return rgbToHex2(r + (255 - r) * amount, g + (255 - g) * amount, b + (255 - b) * amount);
4631
+ }
4632
+ function shade2(hex, amount) {
4633
+ const [r, g, b] = hexToRgb2(hex);
4634
+ return rgbToHex2(r * (1 - amount), g * (1 - amount), b * (1 - amount));
4635
+ }
4193
4636
  function findDataPoint(series, pointIndex) {
4194
4637
  return series.dataPoints?.find((p) => p.idx === pointIndex);
4195
4638
  }
@@ -4204,6 +4647,134 @@ function resolveDataPointExplosion(series, pointIndex) {
4204
4647
  const point = findDataPoint(series, pointIndex);
4205
4648
  return point?.explosion ?? series.explosion ?? 0;
4206
4649
  }
4650
+ var DEFAULT_ROT_X = 15;
4651
+ var DEFAULT_ROT_Y = 20;
4652
+ var MIN_DEPTH_PX = 5;
4653
+ var MAX_DEPTH_PX = 22;
4654
+ function computeDepthVector(view3D) {
4655
+ const rotX = view3D?.rotX ?? DEFAULT_ROT_X;
4656
+ const rotY = view3D?.rotY ?? DEFAULT_ROT_Y;
4657
+ const depthScale = Math.min(Math.max((view3D?.depthPercent ?? 100) / 100, 0.4), 2);
4658
+ const magnitude = Math.min(Math.max(13 * depthScale, MIN_DEPTH_PX), MAX_DEPTH_PX);
4659
+ const rx = rotX * Math.PI / 180;
4660
+ const ry = rotY * Math.PI / 180;
4661
+ return {
4662
+ dx: Math.sin(ry) * magnitude,
4663
+ dy: -Math.sin(rx) * magnitude,
4664
+ magnitude
4665
+ };
4666
+ }
4667
+ function barExtrusion(rect, depth) {
4668
+ const { x, y, w, h, fill } = rect;
4669
+ const { dx, dy } = depth;
4670
+ const topFace = {
4671
+ kind: "polygon",
4672
+ points: `${x},${y} ${x + w},${y} ${x + w + dx},${y + dy} ${x + dx},${y + dy}`,
4673
+ fill: tint2(fill, 0.22),
4674
+ stroke: "none",
4675
+ strokeWidth: 0
4676
+ };
4677
+ const sideFace = {
4678
+ kind: "polygon",
4679
+ points: `${x + w},${y} ${x + w},${y + h} ${x + w + dx},${y + h + dy} ${x + w + dx},${y + dy}`,
4680
+ fill: shade2(fill, 0.25),
4681
+ stroke: "none",
4682
+ strokeWidth: 0
4683
+ };
4684
+ return [topFace, sideFace];
4685
+ }
4686
+ function translateSlicePath(d, dx, dy) {
4687
+ const tokens = d.match(/[MLAZ][^MLAZ]*/gu);
4688
+ if (!tokens) {
4689
+ return d;
4690
+ }
4691
+ return tokens.map((token) => {
4692
+ const cmd = token[0];
4693
+ const nums = token.slice(1).trim().split(/[ ,]+/u).filter((s) => s.length > 0).map(Number);
4694
+ if (cmd === "M" || cmd === "L") {
4695
+ const out = [];
4696
+ for (let i = 0; i < nums.length; i += 2) {
4697
+ out.push(nums[i] + dx, nums[i + 1] + dy);
4698
+ }
4699
+ return `${cmd}${pairs(out)}`;
4700
+ }
4701
+ if (cmd === "A") {
4702
+ const head = nums.slice(0, 5);
4703
+ const ex = nums[5] + dx;
4704
+ const ey = nums[6] + dy;
4705
+ return `A${head.join(",")},${ex},${ey}`;
4706
+ }
4707
+ return "Z";
4708
+ }).join("");
4709
+ }
4710
+ function pairs(nums) {
4711
+ const out = [];
4712
+ for (let i = 0; i < nums.length; i += 2) {
4713
+ out.push(`${nums[i]},${nums[i + 1]}`);
4714
+ }
4715
+ return out.join(" ");
4716
+ }
4717
+ function pieExtrusion(paths, depth) {
4718
+ const offsetY = Math.max(depth.magnitude, 6);
4719
+ return paths.map((p) => ({
4720
+ kind: "path",
4721
+ d: translateSlicePath(p.d, 0, offsetY),
4722
+ fill: shade2(p.fill, 0.32),
4723
+ stroke: shade2(p.fill, 0.4),
4724
+ strokeWidth: 0.5
4725
+ }));
4726
+ }
4727
+ function ribbonExtrusion(prims, depth) {
4728
+ const out = [];
4729
+ for (const prim of prims) {
4730
+ if (prim.kind === "polyline") {
4731
+ const pl = prim;
4732
+ out.push({
4733
+ ...pl,
4734
+ points: shiftPoints(pl.points, depth.dx, depth.dy),
4735
+ stroke: shade2(pl.stroke, 0.3),
4736
+ fill: "none",
4737
+ part: void 0
4738
+ });
4739
+ } else if (prim.kind === "polygon") {
4740
+ const pg = prim;
4741
+ out.push({
4742
+ ...pg,
4743
+ points: shiftPoints(pg.points, depth.dx, depth.dy),
4744
+ fill: shade2(pg.fill === "none" ? "#888888" : pg.fill, 0.3),
4745
+ part: void 0
4746
+ });
4747
+ }
4748
+ }
4749
+ return out;
4750
+ }
4751
+ function shiftPoints(points, dx, dy) {
4752
+ return points.trim().split(/\s+/u).map((pair) => {
4753
+ const [px3, py] = pair.split(",").map(Number);
4754
+ return `${px3 + dx},${py + dy}`;
4755
+ }).join(" ");
4756
+ }
4757
+ function applyChart3DDepth(vm, chartType, view3D) {
4758
+ const depth = computeDepthVector(view3D);
4759
+ let extrusion = [];
4760
+ if (chartType === "bar3D") {
4761
+ const bars = vm.primitives.filter(
4762
+ (p) => p.kind === "rect" && p.part?.role === "dataPoint"
4763
+ );
4764
+ extrusion = bars.flatMap((r) => barExtrusion(r, depth));
4765
+ } else if (chartType === "pie3D") {
4766
+ const slices = vm.primitives.filter((p) => p.kind === "path");
4767
+ extrusion = pieExtrusion(slices, depth);
4768
+ } else if (chartType === "line3D" || chartType === "area3D") {
4769
+ extrusion = ribbonExtrusion(vm.primitives, depth);
4770
+ } else {
4771
+ return vm;
4772
+ }
4773
+ if (extrusion.length === 0) {
4774
+ return vm;
4775
+ }
4776
+ return { ...vm, primitives: [...extrusion, ...vm.primitives] };
4777
+ }
4207
4778
  function clamp3(value, min, max) {
4208
4779
  return Math.min(Math.max(value, min), max);
4209
4780
  }
@@ -4225,7 +4796,7 @@ function horizontalAxisY(valueAxis, range, layout, fallback) {
4225
4796
  }
4226
4797
  return fallback === "top" ? layout.plotTop : layout.plotBottom;
4227
4798
  }
4228
- function verticalAxisX(categoryAxis, categoryCount, layout, fallback, dateValues) {
4799
+ function verticalAxisX(categoryAxis, categoryCount2, layout, fallback, dateValues) {
4229
4800
  if (categoryAxis?.crosses === "max") {
4230
4801
  return layout.plotRight;
4231
4802
  }
@@ -4239,8 +4810,8 @@ function verticalAxisX(categoryAxis, categoryCount, layout, fallback, dateValues
4239
4810
  const ratio2 = max === min ? 0.5 : (clamp3(categoryAxis.crossesAt, min, max) - min) / (max - min);
4240
4811
  return layout.plotLeft + ratio2 * layout.plotWidth;
4241
4812
  }
4242
- const index = clamp3(categoryAxis.crossesAt - 1, 0, Math.max(categoryCount - 1, 0));
4243
- const ratio = categoryCount <= 1 ? 0.5 : index / (categoryCount - 1);
4813
+ const index = clamp3(categoryAxis.crossesAt - 1, 0, Math.max(categoryCount2 - 1, 0));
4814
+ const ratio = categoryCount2 <= 1 ? 0.5 : index / (categoryCount2 - 1);
4244
4815
  return layout.plotLeft + ratio * layout.plotWidth;
4245
4816
  }
4246
4817
  return fallback === "right" ? layout.plotRight : layout.plotLeft;
@@ -4532,7 +5103,7 @@ function hasRicherAxisFeatures(chartData) {
4532
5103
  )
4533
5104
  );
4534
5105
  }
4535
- function buildCartesianAxes(chartData, layout, primaryRange, secondaryRange, categoryCount) {
5106
+ function buildCartesianAxes(chartData, layout, primaryRange, secondaryRange, categoryCount2) {
4536
5107
  if (!hasRicherAxisFeatures(chartData)) {
4537
5108
  const { gridlines, axisLabels } = buildGridlinesAndLabels(primaryRange, layout);
4538
5109
  return { gridlines, axisLabels, secondaryGridlines: void 0, secondaryAxisLabels: void 0 };
@@ -4543,7 +5114,7 @@ function buildCartesianAxes(chartData, layout, primaryRange, secondaryRange, cat
4543
5114
  );
4544
5115
  const axisX = (axisId, fallback) => verticalAxisX(
4545
5116
  categoryAxisFor(axisId),
4546
- categoryCount,
5117
+ categoryCount2,
4547
5118
  layout,
4548
5119
  fallback,
4549
5120
  chartData.dateCategories?.values
@@ -4750,6 +5321,62 @@ function pushClusteredStackedLabels(series, sourceIndices2, catCount, layout, ra
4750
5321
  }
4751
5322
  }
4752
5323
  }
5324
+ function interpolate(values, blank) {
5325
+ const out = [...values];
5326
+ for (let i = 0; i < out.length; i++) {
5327
+ if (!blank[i]) {
5328
+ continue;
5329
+ }
5330
+ let prev = i - 1;
5331
+ while (prev >= 0 && blank[prev]) {
5332
+ prev--;
5333
+ }
5334
+ let next = i + 1;
5335
+ while (next < out.length && blank[next]) {
5336
+ next++;
5337
+ }
5338
+ const hasPrev = prev >= 0;
5339
+ const hasNext = next < out.length;
5340
+ if (hasPrev && hasNext) {
5341
+ const t = (i - prev) / (next - prev);
5342
+ out[i] = values[prev] + (values[next] - values[prev]) * t;
5343
+ } else if (hasPrev) {
5344
+ out[i] = values[prev];
5345
+ } else if (hasNext) {
5346
+ out[i] = values[next];
5347
+ }
5348
+ }
5349
+ return out;
5350
+ }
5351
+ function resolveBlankDisplay(values, blanks, mode) {
5352
+ const visible = values.map(() => true);
5353
+ if (!blanks || !blanks.some(Boolean) || mode === void 0 || mode === "zero") {
5354
+ return { values: [...values], visible };
5355
+ }
5356
+ if (mode === "span") {
5357
+ return { values: interpolate(values, blanks), visible };
5358
+ }
5359
+ return {
5360
+ values: [...values],
5361
+ visible: values.map((_v, i) => !blanks[i])
5362
+ };
5363
+ }
5364
+ function visibleRuns(visible) {
5365
+ const runs = [];
5366
+ let current = [];
5367
+ for (let i = 0; i < visible.length; i++) {
5368
+ if (visible[i]) {
5369
+ current.push(i);
5370
+ } else if (current.length > 0) {
5371
+ runs.push(current);
5372
+ current = [];
5373
+ }
5374
+ }
5375
+ if (current.length > 0) {
5376
+ runs.push(current);
5377
+ }
5378
+ return runs;
5379
+ }
4753
5380
  function smoothLinePath(points) {
4754
5381
  if (points.length === 0) {
4755
5382
  return "";
@@ -4893,7 +5520,13 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
4893
5520
  continue;
4894
5521
  }
4895
5522
  const activeRange = secondaryIdx.has(si) && secondaryRange ? secondaryRange : primaryRange;
4896
- const displayValues = sourceIndices2.map((sourceIndex) => series.values[sourceIndex] ?? 0);
5523
+ const rawValues = sourceIndices2.map((sourceIndex) => series.values[sourceIndex] ?? 0);
5524
+ const displayBlanks = sourceIndices2.map((sourceIndex) => series.blanks?.[sourceIndex] ?? false);
5525
+ const { values: displayValues, visible } = resolveBlankDisplay(
5526
+ rawValues,
5527
+ displayBlanks,
5528
+ chartData.chartChrome?.dispBlanksAs
5529
+ );
4897
5530
  const pts = computeLinePoints(displayValues, catCount, layout, activeRange).map(
4898
5531
  (point, index) => ({
4899
5532
  ...point,
@@ -4902,24 +5535,44 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
4902
5535
  );
4903
5536
  const c = seriesColor2(series, si, chartData.colorPalette);
4904
5537
  const seriesPart = { role: "series", seriesIndex: si };
4905
- primitives.push(
4906
- series.smooth ? {
4907
- kind: "path",
4908
- d: smoothLinePath(pts),
4909
- stroke: c,
4910
- strokeWidth: 2.4,
4911
- fill: "none",
4912
- part: seriesPart
4913
- } : {
4914
- kind: "polyline",
4915
- points: linePointsToSvgString(pts),
4916
- stroke: c,
4917
- strokeWidth: 2.4,
4918
- fill: "none",
4919
- part: seriesPart
5538
+ const allVisible = visible.every(Boolean);
5539
+ if (allVisible) {
5540
+ primitives.push(
5541
+ series.smooth ? {
5542
+ kind: "path",
5543
+ d: smoothLinePath(pts),
5544
+ stroke: c,
5545
+ strokeWidth: 2.4,
5546
+ fill: "none",
5547
+ part: seriesPart
5548
+ } : {
5549
+ kind: "polyline",
5550
+ points: linePointsToSvgString(pts),
5551
+ stroke: c,
5552
+ strokeWidth: 2.4,
5553
+ fill: "none",
5554
+ part: seriesPart
5555
+ }
5556
+ );
5557
+ } else {
5558
+ for (const run of visibleRuns(visible)) {
5559
+ if (run.length < 2) {
5560
+ continue;
5561
+ }
5562
+ primitives.push({
5563
+ kind: "polyline",
5564
+ points: linePointsToSvgString(run.map((i) => pts[i])),
5565
+ stroke: c,
5566
+ strokeWidth: 2.4,
5567
+ fill: "none",
5568
+ part: seriesPart
5569
+ });
4920
5570
  }
4921
- );
5571
+ }
4922
5572
  pts.forEach((pt, displayIndex) => {
5573
+ if (!visible[displayIndex]) {
5574
+ return;
5575
+ }
4923
5576
  const idx = sourceIndices2[displayIndex] ?? displayIndex;
4924
5577
  const part = { role: "dataPoint", seriesIndex: si, pointIndex: idx };
4925
5578
  pushMarker(
@@ -4935,7 +5588,7 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
4935
5588
  if (showLabels) {
4936
5589
  displayValues.forEach((val2, displayIndex) => {
4937
5590
  const pt = pts[displayIndex];
4938
- if (!pt) {
5591
+ if (!pt || !visible[displayIndex]) {
4939
5592
  return;
4940
5593
  }
4941
5594
  dataLabels.push({
@@ -5922,9 +6575,9 @@ function computeTrendlinePoints2(trendline, values, catCount, layout, range, mod
5922
6575
  sum += yVals[j];
5923
6576
  }
5924
6577
  const avgVal = sum / period;
5925
- const px2 = xToPixel2(i, catCount, layout, mode);
6578
+ const px3 = xToPixel2(i, catCount, layout, mode);
5926
6579
  const py = valueToY2(avgVal, range, layout.plotTop, layout.plotBottom);
5927
- maPoints.push({ x: px2, y: py });
6580
+ maPoints.push({ x: px3, y: py });
5928
6581
  }
5929
6582
  return {
5930
6583
  points: maPoints,
@@ -5942,9 +6595,9 @@ function computeTrendlinePoints2(trendline, values, catCount, layout, range, mod
5942
6595
  if (!Number.isFinite(yVal)) {
5943
6596
  continue;
5944
6597
  }
5945
- const px2 = xToPixel2(xVal, catCount, layout, mode);
6598
+ const px3 = xToPixel2(xVal, catCount, layout, mode);
5946
6599
  const py = valueToY2(yVal, range, layout.plotTop, layout.plotBottom);
5947
- points.push({ x: px2, y: py });
6600
+ points.push({ x: px3, y: py });
5948
6601
  }
5949
6602
  return { points, equation, rSquared };
5950
6603
  }
@@ -7375,27 +8028,312 @@ function buildSunburstViewModel(element, chartData, categoryLabels) {
7375
8028
  legendAnchor: "middle"
7376
8029
  };
7377
8030
  }
7378
- function normalizedLevels(levels, pointCount) {
7379
- return levels.map((level) => {
7380
- let previous = "";
7381
- return Array.from({ length: pointCount }, (_, index) => {
7382
- const label = level[index]?.trim() ?? "";
7383
- if (label) {
7384
- previous = label;
8031
+ function resolveSecondaryIndices(values, options) {
8032
+ const n = values.length;
8033
+ const result = /* @__PURE__ */ new Set();
8034
+ if (n <= 1) {
8035
+ return result;
8036
+ }
8037
+ const splitType = options.splitType ?? "auto";
8038
+ if (splitType === "cust") {
8039
+ for (const idx of options.custSplit ?? []) {
8040
+ if (idx >= 0 && idx < n) {
8041
+ result.add(idx);
8042
+ }
8043
+ }
8044
+ } else if (splitType === "val") {
8045
+ const threshold = options.splitPos ?? 0;
8046
+ values.forEach((v, i) => {
8047
+ if (v < threshold) {
8048
+ result.add(i);
8049
+ }
8050
+ });
8051
+ } else if (splitType === "percent") {
8052
+ const total = values.reduce((s, v) => s + Math.abs(v), 0) || 1;
8053
+ const threshold = options.splitPos ?? 0;
8054
+ values.forEach((v, i) => {
8055
+ if (Math.abs(v) / total * 100 < threshold) {
8056
+ result.add(i);
7385
8057
  }
7386
- return label || previous;
7387
8058
  });
8059
+ } else {
8060
+ const count = Math.min(Math.max(Math.round(options.splitPos ?? 2), 1), n - 1);
8061
+ for (let i = n - count; i < n; i++) {
8062
+ result.add(i);
8063
+ }
8064
+ }
8065
+ if (result.size >= n) {
8066
+ result.delete(0);
8067
+ }
8068
+ return result;
8069
+ }
8070
+ function sliceAngles(values) {
8071
+ const total = values.reduce((s, v) => s + Math.abs(v), 0) || 1;
8072
+ let cursor = -Math.PI / 2;
8073
+ return values.map((v) => {
8074
+ const span = Math.abs(v) / total * Math.PI * 2;
8075
+ const start = cursor;
8076
+ cursor += span;
8077
+ return { start, end: cursor, mid: (start + cursor) / 2 };
7388
8078
  });
7389
8079
  }
7390
- function findOrAddParent(children, label, colorIndex, parentLabelLayout) {
7391
- const existing = children.find((child2) => child2.children && child2.label === label);
7392
- if (existing) {
7393
- return existing;
7394
- }
7395
- const parent = {
7396
- label,
7397
- weight: 0,
7398
- children: [],
8080
+ function computeOfPieGeom(element, secondPieSize) {
8081
+ const svgWidth = Math.max(element.width, 320);
8082
+ const svgHeight = Math.max(element.height, 180);
8083
+ const primaryR = Math.max(Math.min(svgWidth * 0.28, svgHeight * 0.4), 4);
8084
+ const secScale = Math.min(Math.max(secondPieSize / 100, 0.3), 1.4);
8085
+ return {
8086
+ svgWidth,
8087
+ svgHeight,
8088
+ primaryCx: svgWidth * 0.3,
8089
+ primaryCy: svgHeight * 0.52,
8090
+ primaryR,
8091
+ secondaryCx: svgWidth * 0.76,
8092
+ secondaryCy: svgHeight * 0.52,
8093
+ secondaryR: Math.max(primaryR * secScale, 4)
8094
+ };
8095
+ }
8096
+ function sliceLabel(x, y, value) {
8097
+ return {
8098
+ kind: "text",
8099
+ x,
8100
+ y,
8101
+ text: formatAxisValue2(value),
8102
+ fontSize: 8,
8103
+ fill: "#ffffff",
8104
+ textAnchor: "middle",
8105
+ fontWeight: "bold",
8106
+ dominantBaseline: "central"
8107
+ };
8108
+ }
8109
+ function buildSecondaryPie(geom, secondaryValues, fills, showLabels) {
8110
+ const angles = sliceAngles(secondaryValues);
8111
+ const primitives = [];
8112
+ const labels = [];
8113
+ angles.forEach((a, i) => {
8114
+ const geoSlice = computePieSlicePath(
8115
+ geom.secondaryCx,
8116
+ geom.secondaryCy,
8117
+ geom.secondaryR,
8118
+ 0,
8119
+ a.start,
8120
+ a.end
8121
+ );
8122
+ primitives.push({
8123
+ kind: "path",
8124
+ d: geoSlice.d,
8125
+ fill: fills[i],
8126
+ stroke: "#ffffff",
8127
+ strokeWidth: 1.5
8128
+ });
8129
+ if (showLabels) {
8130
+ labels.push(sliceLabel(geoSlice.labelX, geoSlice.labelY, secondaryValues[i]));
8131
+ }
8132
+ });
8133
+ return { primitives, labels };
8134
+ }
8135
+ function buildSecondaryBar(geom, secondaryValues, fills, showLabels) {
8136
+ const total = secondaryValues.reduce((s, v) => s + Math.abs(v), 0) || 1;
8137
+ const barW = geom.secondaryR * 1.1;
8138
+ const barH = geom.secondaryR * 2;
8139
+ const barX = geom.secondaryCx - barW / 2;
8140
+ const barTop = geom.secondaryCy - barH / 2;
8141
+ const primitives = [];
8142
+ const labels = [];
8143
+ let cursorY = barTop;
8144
+ secondaryValues.forEach((v, i) => {
8145
+ const h = Math.max(Math.abs(v) / total * barH, 1);
8146
+ primitives.push({ kind: "rect", x: barX, y: cursorY, w: barW, h, fill: fills[i] });
8147
+ if (showLabels) {
8148
+ labels.push(sliceLabel(geom.secondaryCx, cursorY + h / 2, v));
8149
+ }
8150
+ cursorY += h;
8151
+ });
8152
+ return { primitives, labels };
8153
+ }
8154
+ function buildSerLines(geom, otherAngle) {
8155
+ const rimStart = {
8156
+ x: geom.primaryCx + geom.primaryR * Math.cos(otherAngle.start),
8157
+ y: geom.primaryCy + geom.primaryR * Math.sin(otherAngle.start)
8158
+ };
8159
+ const rimEnd = {
8160
+ x: geom.primaryCx + geom.primaryR * Math.cos(otherAngle.end),
8161
+ y: geom.primaryCy + geom.primaryR * Math.sin(otherAngle.end)
8162
+ };
8163
+ const targetX = geom.secondaryCx - geom.secondaryR * 1.05;
8164
+ const line2 = (from, ty) => ({
8165
+ kind: "line",
8166
+ x1: from.x,
8167
+ y1: from.y,
8168
+ x2: targetX,
8169
+ y2: ty,
8170
+ stroke: "#94a3b8",
8171
+ strokeWidth: 1,
8172
+ dashArray: "3 2"
8173
+ });
8174
+ return [
8175
+ line2(rimStart, geom.secondaryCy - geom.secondaryR),
8176
+ line2(rimEnd, geom.secondaryCy + geom.secondaryR)
8177
+ ];
8178
+ }
8179
+ function buildPrimarySlices(geom, primaryValues, fills, showLabels) {
8180
+ const angles = sliceAngles(primaryValues);
8181
+ const primitives = [];
8182
+ const labels = [];
8183
+ angles.forEach((a, i) => {
8184
+ const geoSlice = computePieSlicePath(
8185
+ geom.primaryCx,
8186
+ geom.primaryCy,
8187
+ geom.primaryR,
8188
+ 0,
8189
+ a.start,
8190
+ a.end
8191
+ );
8192
+ primitives.push({
8193
+ kind: "path",
8194
+ d: geoSlice.d,
8195
+ fill: fills[i],
8196
+ stroke: "#ffffff",
8197
+ strokeWidth: 1.5,
8198
+ part: { role: "dataPoint", seriesIndex: 0, pointIndex: i }
8199
+ });
8200
+ if (showLabels) {
8201
+ labels.push(sliceLabel(geoSlice.labelX, geoSlice.labelY, primaryValues[i]));
8202
+ }
8203
+ });
8204
+ return { primitives, labels };
8205
+ }
8206
+ function buildOfPieViewModel(element, chartData, categoryLabels) {
8207
+ const options = chartData.ofPieOptions ?? { ofPieType: "pie" };
8208
+ const series = chartData.series[0];
8209
+ const values = series?.values ?? [];
8210
+ const palette = chartData.colorPalette;
8211
+ const showLabels = chartData.style?.hasDataLabels === true;
8212
+ const secondaryIdx = resolveSecondaryIndices(values, options);
8213
+ const keptIndices = values.map((_v, i) => i).filter((i) => !secondaryIdx.has(i));
8214
+ const secondaryIndices = values.map((_v, i) => i).filter((i) => secondaryIdx.has(i));
8215
+ const geom = computeOfPieGeom(element, options.secondPieSize ?? 75);
8216
+ const pointFill = (i) => series ? resolveVaryColorFill(series, i, paletteColor2(i, palette)) : paletteColor2(i, palette);
8217
+ const keptFills = keptIndices.map(pointFill);
8218
+ const secondaryFills = secondaryIndices.map(pointFill);
8219
+ const otherFill = paletteColor2(values.length, palette);
8220
+ const otherSum = secondaryIndices.reduce((s, i) => s + Math.abs(values[i]), 0);
8221
+ const primaryValues = [...keptIndices.map((i) => Math.abs(values[i])), otherSum];
8222
+ const primaryFills = [...keptFills, otherFill];
8223
+ const primary = buildPrimarySlices(geom, primaryValues, primaryFills, showLabels);
8224
+ const secondaryValues = secondaryIndices.map((i) => Math.abs(values[i]));
8225
+ const toBar = options.ofPieType === "bar";
8226
+ const secondary = secondaryValues.length > 0 ? toBar ? buildSecondaryBar(geom, secondaryValues, secondaryFills, showLabels) : buildSecondaryPie(geom, secondaryValues, secondaryFills, showLabels) : { primitives: [], labels: [] };
8227
+ const primitives = [];
8228
+ if (options.serLines !== false && secondaryValues.length > 0) {
8229
+ const primaryAngles = sliceAngles(primaryValues);
8230
+ primitives.push(...buildSerLines(geom, primaryAngles[primaryAngles.length - 1]));
8231
+ }
8232
+ primitives.push(...primary.primitives, ...secondary.primitives);
8233
+ const dataLabels = [...primary.labels, ...secondary.labels];
8234
+ const legend = categoryLabels.map((label, i) => ({
8235
+ color: paletteColor2(i, palette),
8236
+ label
8237
+ }));
8238
+ const title = chartData.style?.hasTitle && chartData.title ? chartData.title : void 0;
8239
+ return {
8240
+ svgWidth: geom.svgWidth,
8241
+ svgHeight: geom.svgHeight,
8242
+ title,
8243
+ titleX: geom.svgWidth / 2,
8244
+ titleY: 14,
8245
+ gridlines: [],
8246
+ axisLabels: [],
8247
+ zeroLine: void 0,
8248
+ categoryLabels: [],
8249
+ primitives,
8250
+ dataLabels,
8251
+ legend: chartData.style?.hasLegend ? legend : [],
8252
+ legendX: geom.svgWidth / 2,
8253
+ legendY: geom.svgHeight - 8,
8254
+ legendAnchor: "middle"
8255
+ };
8256
+ }
8257
+ var LEADER_LENGTH = 14;
8258
+ function isOutsidePosition(position) {
8259
+ return position === "outEnd" || position === "bestFit";
8260
+ }
8261
+ function buildPieDataLabels(params) {
8262
+ const { slices, values, cx, cy, outerR, position, showLeaderLines } = params;
8263
+ const outside = isOutsidePosition(position);
8264
+ const labels = [];
8265
+ const leaderLines = [];
8266
+ slices.forEach((slice, i) => {
8267
+ const val2 = values[i];
8268
+ if (val2 === void 0) {
8269
+ return;
8270
+ }
8271
+ if (!outside) {
8272
+ labels.push({
8273
+ kind: "text",
8274
+ x: slice.labelX,
8275
+ y: slice.labelY,
8276
+ text: formatAxisValue2(val2),
8277
+ fontSize: 8,
8278
+ fill: "#ffffff",
8279
+ textAnchor: "middle",
8280
+ fontWeight: "bold",
8281
+ dominantBaseline: "central"
8282
+ });
8283
+ return;
8284
+ }
8285
+ const cos = Math.cos(slice.midAngle);
8286
+ const sin = Math.sin(slice.midAngle);
8287
+ const rimX = cx + outerR * cos;
8288
+ const rimY = cy + outerR * sin;
8289
+ const labelX = cx + (outerR + LEADER_LENGTH) * cos;
8290
+ const labelY = cy + (outerR + LEADER_LENGTH) * sin;
8291
+ const anchor = cos >= 0 ? "start" : "end";
8292
+ labels.push({
8293
+ kind: "text",
8294
+ x: labelX + (cos >= 0 ? 2 : -2),
8295
+ y: labelY,
8296
+ text: formatAxisValue2(val2),
8297
+ fontSize: 8,
8298
+ fill: "#334155",
8299
+ textAnchor: anchor,
8300
+ dominantBaseline: "central"
8301
+ });
8302
+ if (showLeaderLines !== false) {
8303
+ leaderLines.push({
8304
+ kind: "line",
8305
+ x1: rimX,
8306
+ y1: rimY,
8307
+ x2: labelX,
8308
+ y2: labelY,
8309
+ stroke: "#94a3b8",
8310
+ strokeWidth: 0.75
8311
+ });
8312
+ }
8313
+ });
8314
+ return { labels, leaderLines };
8315
+ }
8316
+ function normalizedLevels(levels, pointCount) {
8317
+ return levels.map((level) => {
8318
+ let previous = "";
8319
+ return Array.from({ length: pointCount }, (_, index) => {
8320
+ const label = level[index]?.trim() ?? "";
8321
+ if (label) {
8322
+ previous = label;
8323
+ }
8324
+ return label || previous;
8325
+ });
8326
+ });
8327
+ }
8328
+ function findOrAddParent(children, label, colorIndex, parentLabelLayout) {
8329
+ const existing = children.find((child2) => child2.children && child2.label === label);
8330
+ if (existing) {
8331
+ return existing;
8332
+ }
8333
+ const parent = {
8334
+ label,
8335
+ weight: 0,
8336
+ children: [],
7399
8337
  colorIndex,
7400
8338
  parentLabelLayout
7401
8339
  };
@@ -7761,6 +8699,84 @@ function buildTreemapViewModel(element, chartData, categoryLabels) {
7761
8699
  legendAnchor
7762
8700
  };
7763
8701
  }
8702
+ var EMU_PER_PIXEL = 9525;
8703
+ function shapeBox(shape, svgWidth, svgHeight) {
8704
+ const x = shape.from.x * svgWidth;
8705
+ const y = shape.from.y * svgHeight;
8706
+ if (shape.anchor === "rel" && shape.to) {
8707
+ return {
8708
+ x,
8709
+ y,
8710
+ w: Math.max((shape.to.x - shape.from.x) * svgWidth, 0),
8711
+ h: Math.max((shape.to.y - shape.from.y) * svgHeight, 0)
8712
+ };
8713
+ }
8714
+ const ext = shape.ext ?? { cx: 0, cy: 0 };
8715
+ return { x, y, w: ext.cx / EMU_PER_PIXEL, h: ext.cy / EMU_PER_PIXEL };
8716
+ }
8717
+ function textPrimitives(shape, box) {
8718
+ if (!shape.paragraphs || shape.paragraphs.length === 0) {
8719
+ return [];
8720
+ }
8721
+ const lineH = 12;
8722
+ const totalH = shape.paragraphs.length * lineH;
8723
+ let cursorY = box.y + Math.max((box.h - totalH) / 2, 0) + lineH * 0.75;
8724
+ const out = [];
8725
+ for (const para of shape.paragraphs) {
8726
+ if (para.text.length === 0) {
8727
+ cursorY += lineH;
8728
+ continue;
8729
+ }
8730
+ const align = para.align ?? "ctr";
8731
+ const anchor = align === "l" ? "start" : align === "r" ? "end" : "middle";
8732
+ const tx = align === "l" ? box.x + 2 : align === "r" ? box.x + box.w - 2 : box.x + box.w / 2;
8733
+ out.push({
8734
+ kind: "text",
8735
+ x: tx,
8736
+ y: cursorY,
8737
+ text: para.text,
8738
+ fontSize: para.fontSize ?? 9,
8739
+ fill: para.color ?? "#1e293b",
8740
+ textAnchor: anchor,
8741
+ fontWeight: para.bold ? "bold" : "normal"
8742
+ });
8743
+ cursorY += lineH;
8744
+ }
8745
+ return out;
8746
+ }
8747
+ function projectShape(shape, svgWidth, svgHeight) {
8748
+ const box = shapeBox(shape, svgWidth, svgHeight);
8749
+ const primitives = [];
8750
+ if (shape.kind === "cxnSp") {
8751
+ primitives.push({
8752
+ kind: "line",
8753
+ x1: box.x,
8754
+ y1: box.y,
8755
+ x2: box.x + box.w,
8756
+ y2: box.y + box.h,
8757
+ stroke: shape.stroke ?? "#000000",
8758
+ strokeWidth: shape.strokeWidth ?? 1
8759
+ });
8760
+ return primitives;
8761
+ }
8762
+ if ((shape.fill || shape.stroke) && box.w > 0 && box.h > 0) {
8763
+ primitives.push({
8764
+ kind: "polygon",
8765
+ points: `${box.x},${box.y} ${box.x + box.w},${box.y} ${box.x + box.w},${box.y + box.h} ${box.x},${box.y + box.h}`,
8766
+ fill: shape.fill ?? "none",
8767
+ stroke: shape.stroke ?? "none",
8768
+ strokeWidth: shape.strokeWidth ?? (shape.stroke ? 1 : 0)
8769
+ });
8770
+ }
8771
+ primitives.push(...textPrimitives(shape, box));
8772
+ return primitives;
8773
+ }
8774
+ function buildChartUserShapeOverlay(userShapes, svgWidth, svgHeight) {
8775
+ if (!userShapes || userShapes.length === 0) {
8776
+ return [];
8777
+ }
8778
+ return userShapes.flatMap((shape) => projectShape(shape, svgWidth, svgHeight));
8779
+ }
7764
8780
  function sourceIndices(indices, length) {
7765
8781
  return Array.from({ length }, (_, position) => indices?.[position] ?? position);
7766
8782
  }
@@ -8041,7 +9057,7 @@ function resolveRegionCode(label) {
8041
9057
  return REGION_ALIAS_MAP[normalized];
8042
9058
  }
8043
9059
  function lerpColor(a, b, t) {
8044
- const clamp7 = (v) => Math.max(0, Math.min(255, Math.round(v)));
9060
+ const clamp8 = (v) => Math.max(0, Math.min(255, Math.round(v)));
8045
9061
  const ha = a.replace("#", "");
8046
9062
  const hb = b.replace("#", "");
8047
9063
  const r1 = parseInt(ha.substring(0, 2), 16);
@@ -8050,11 +9066,11 @@ function lerpColor(a, b, t) {
8050
9066
  const r2 = parseInt(hb.substring(0, 2), 16);
8051
9067
  const g2 = parseInt(hb.substring(2, 4), 16);
8052
9068
  const b2 = parseInt(hb.substring(4, 6), 16);
8053
- const r = clamp7(r1 + (r2 - r1) * t);
8054
- const g = clamp7(g1 + (g2 - g1) * t);
8055
- const bl = clamp7(b1 + (b2 - b1) * t);
8056
- const toHex = (n) => n.toString(16).padStart(2, "0");
8057
- return `#${toHex(r)}${toHex(g)}${toHex(bl)}`;
9069
+ const r = clamp8(r1 + (r2 - r1) * t);
9070
+ const g = clamp8(g1 + (g2 - g1) * t);
9071
+ const bl = clamp8(b1 + (b2 - b1) * t);
9072
+ const toHex2 = (n) => n.toString(16).padStart(2, "0");
9073
+ return `#${toHex2(r)}${toHex2(g)}${toHex2(bl)}`;
8058
9074
  }
8059
9075
  function sequentialColorScale(t) {
8060
9076
  const clamped = Math.max(0, Math.min(1, t));
@@ -8970,6 +9986,30 @@ function buildChartViewModel(element) {
8970
9986
  }
8971
9987
  const longestLen = chartData.series.reduce((m, s) => Math.max(m, s.values.length), 0);
8972
9988
  const categoryLabels = chartData.categories.length > 0 ? chartData.categories : Array.from({ length: longestLen }, (_, i) => String(i + 1));
9989
+ if (chartType === "ofPie") {
9990
+ return withUserShapeOverlay(buildOfPieViewModel(element, chartData, categoryLabels), chartData);
9991
+ }
9992
+ const flat = buildFlatViewModel(element, chartData, categoryLabels, kind);
9993
+ if (is3DChartType(chartType)) {
9994
+ return withUserShapeOverlay(applyChart3DDepth(flat, chartType, chartData.view3D), chartData);
9995
+ }
9996
+ return withUserShapeOverlay(flat, chartData);
9997
+ }
9998
+ function withUserShapeOverlay(vm, chartData) {
9999
+ const overlay = buildChartUserShapeOverlay(chartData.userShapes, vm.svgWidth, vm.svgHeight);
10000
+ if (overlay.length === 0) {
10001
+ return vm;
10002
+ }
10003
+ return {
10004
+ ...vm,
10005
+ primitives: [...vm.primitives, ...overlay],
10006
+ userShapes: overlay
10007
+ };
10008
+ }
10009
+ function is3DChartType(chartType) {
10010
+ return chartType === "bar3D" || chartType === "pie3D" || chartType === "line3D" || chartType === "area3D";
10011
+ }
10012
+ function buildFlatViewModel(element, chartData, categoryLabels, kind) {
8973
10013
  if (kind === "pie" || kind === "doughnut") {
8974
10014
  return buildPieViewModel(element, chartData, categoryLabels, kind === "doughnut");
8975
10015
  }
@@ -9078,23 +10118,17 @@ function buildPieViewModel(element, chartData, categoryLabels, isDoughnut) {
9078
10118
  );
9079
10119
  const dataLabels = [];
9080
10120
  if (chartData.style?.hasDataLabels) {
9081
- slices.forEach(({ labelX, labelY }, i) => {
9082
- const val2 = values[i];
9083
- if (val2 === void 0) {
9084
- return;
9085
- }
9086
- dataLabels.push({
9087
- kind: "text",
9088
- x: labelX,
9089
- y: labelY,
9090
- text: formatAxisValue2(val2),
9091
- fontSize: 8,
9092
- fill: "#ffffff",
9093
- textAnchor: "middle",
9094
- fontWeight: "bold",
9095
- dominantBaseline: "central"
9096
- });
10121
+ const labelResult = buildPieDataLabels({
10122
+ slices,
10123
+ values,
10124
+ cx,
10125
+ cy,
10126
+ outerR,
10127
+ position: chartData.style.dataLabels?.position,
10128
+ showLeaderLines: chartData.style.dataLabels?.showLeaderLines
9097
10129
  });
10130
+ dataLabels.push(...labelResult.labels);
10131
+ primitives.push(...labelResult.leaderLines);
9098
10132
  }
9099
10133
  const legendPos = chartData.style?.legendPosition ?? "b";
9100
10134
  const legend = categoryLabels.map((label, i) => ({
@@ -9363,8 +10397,12 @@ var PRESET_ID_TO_EFFECT = {
9363
10397
  9: "dissolveIn",
9364
10398
  10: "fadeIn",
9365
10399
  12: "flashIn",
10400
+ 14: "randomBarsIn",
9366
10401
  16: "peekIn",
9367
- 17: "randomBarsIn",
10402
+ // entr.17 = Split per MS-OI29500 / the catalog. (Previously this id was
10403
+ // mislabelled randomBarsIn, so imported Split entrances rendered as
10404
+ // Random Bars.) entr.14 above is Random Bars.
10405
+ 17: "splitIn",
9368
10406
  22: "wipeIn",
9369
10407
  23: "zoomIn",
9370
10408
  26: "riseUp",
@@ -9390,12 +10428,33 @@ var PRESET_ID_TO_EFFECT = {
9390
10428
  1: "boldFlash",
9391
10429
  2: "wave",
9392
10430
  6: "growShrink",
10431
+ 7: "flash",
10432
+ // Blink: an opacity blink, closest existing keyframe.
9393
10433
  8: "spin",
9394
10434
  9: "transparency",
9395
10435
  14: "teeter",
9396
10436
  26: "pulse"
9397
10437
  }
9398
10438
  };
10439
+ var EMPH_FILTER_PRESETS = {
10440
+ 3: { name: "desaturate", filterMid: "saturate(0.15)" },
10441
+ 4: { name: "darken", filterMid: "brightness(0.55)" },
10442
+ 5: { name: "lighten", filterMid: "brightness(1.6)" }
10443
+ };
10444
+ function emphasisFilterKeyframeCss(presetId, name) {
10445
+ if (presetId === void 0) {
10446
+ return void 0;
10447
+ }
10448
+ const preset = EMPH_FILTER_PRESETS[presetId];
10449
+ if (!preset) {
10450
+ return void 0;
10451
+ }
10452
+ return `@keyframes ${name} {
10453
+ 0% { filter: none; }
10454
+ 50% { filter: ${preset.filterMid}; }
10455
+ 100% { filter: none; }
10456
+ }`;
10457
+ }
9399
10458
  var FLY_SUBTYPE_TO_EDGE = {
9400
10459
  1: "top",
9401
10460
  2: "right",
@@ -9640,8 +10699,8 @@ function hexToRgb3(hex) {
9640
10699
  };
9641
10700
  }
9642
10701
  function rgbToHex3(r, g, b) {
9643
- const clamp7 = (v) => Math.max(0, Math.min(255, Math.round(v)));
9644
- return `#${clamp7(r).toString(16).padStart(2, "0")}${clamp7(g).toString(16).padStart(2, "0")}${clamp7(b).toString(16).padStart(2, "0")}`;
10702
+ const clamp8 = (v) => Math.max(0, Math.min(255, Math.round(v)));
10703
+ return `#${clamp8(r).toString(16).padStart(2, "0")}${clamp8(g).toString(16).padStart(2, "0")}${clamp8(b).toString(16).padStart(2, "0")}`;
9645
10704
  }
9646
10705
  function rgbToHsl(r, g, b) {
9647
10706
  const rn = r / 255;
@@ -9727,22 +10786,33 @@ function interpolateColor(from, to, t, colorSpace, direction) {
9727
10786
  const rgb = hslToRgb2(h, s, l);
9728
10787
  return rgbToHex3(rgb.r, rgb.g, rgb.b);
9729
10788
  }
9730
- var ATTR_NAME_TO_CSS_PROPERTY = {
9731
- fillcolor: "backgroundColor",
9732
- "fill.color": "backgroundColor",
9733
- "style.color": "color",
9734
- "stroke.color": "borderColor",
9735
- "stroke.dashstyle": "borderColor",
9736
- "style.visibility": "color",
9737
- ppt_c: "color",
9738
- ppt_x: "color",
9739
- ppt_y: "color"
10789
+ var ATTR_NAME_TO_CSS_PROPERTIES = {
10790
+ fillcolor: ["fill", "background-color", "backgroundColor"],
10791
+ "fill.color": ["fill", "background-color", "backgroundColor"],
10792
+ "style.color": ["color"],
10793
+ "stroke.color": ["stroke", "border-color", "borderColor"],
10794
+ "stroke.dashstyle": ["stroke", "border-color", "borderColor"],
10795
+ "style.visibility": ["color"],
10796
+ ppt_c: ["color"],
10797
+ ppt_x: ["color"],
10798
+ ppt_y: ["color"]
9740
10799
  };
9741
- function resolveCssProperty(attrName) {
10800
+ function resolveCssProperties(attrName) {
9742
10801
  if (!attrName) {
9743
- return "color";
10802
+ return ["color"];
10803
+ }
10804
+ return ATTR_NAME_TO_CSS_PROPERTIES[attrName] ?? ["color"];
10805
+ }
10806
+ function resolveColorAnimationTargets(targetAttribute) {
10807
+ const cssProperties = resolveCssProperties(targetAttribute);
10808
+ const targets = [];
10809
+ if (cssProperties.includes("fill")) {
10810
+ targets.push("fill");
10811
+ }
10812
+ if (cssProperties.includes("stroke")) {
10813
+ targets.push("stroke");
9744
10814
  }
9745
- return ATTR_NAME_TO_CSS_PROPERTY[attrName] ?? "color";
10815
+ return targets;
9746
10816
  }
9747
10817
  function buildColorAnimationKeyframes(colorAnim, keyframeName, steps = 10) {
9748
10818
  const { colorSpace, direction, fromColor, toColor, byColor, targetAttribute } = colorAnim;
@@ -9762,96 +10832,332 @@ function buildColorAnimationKeyframes(colorAnim, keyframeName, steps = 10) {
9762
10832
  } else {
9763
10833
  return void 0;
9764
10834
  }
9765
- const cssProperty = resolveCssProperty(targetAttribute);
10835
+ const cssProperties = resolveCssProperties(targetAttribute);
9766
10836
  const lines = [];
9767
10837
  const actualSteps = Math.max(2, steps);
9768
10838
  for (let i = 0; i <= actualSteps; i++) {
9769
10839
  const t = i / actualSteps;
9770
10840
  const pct = Math.round(t * 100);
9771
10841
  const color = interpolateColor(effectiveFrom, effectiveTo, t, colorSpace, direction);
9772
- lines.push(` ${pct}% { ${cssProperty}: ${color}; }`);
10842
+ const decls = cssProperties.map((prop) => `${prop}: ${color};`).join(" ");
10843
+ lines.push(` ${pct}% { ${decls} }`);
9773
10844
  }
9774
10845
  return `@keyframes ${keyframeName} {
9775
10846
  ${lines.join("\n")}
9776
10847
  }`;
9777
10848
  }
9778
- function resolveEffect(anim) {
9779
- const cls = anim.presetClass;
9780
- const id = anim.presetId;
9781
- if (cls === void 0 || id === void 0) {
9782
- return void 0;
10849
+ function resolveChartBuildMode(token) {
10850
+ switch (token) {
10851
+ case "series":
10852
+ return "bySeries";
10853
+ case "category":
10854
+ return "byCategory";
10855
+ case "seriesElement":
10856
+ case "seriesEl":
10857
+ case "categoryElement":
10858
+ case "categoryEl":
10859
+ return "byElement";
10860
+ default:
10861
+ return "asOne";
10862
+ }
10863
+ }
10864
+ function resolveDiagramBuildMode(token) {
10865
+ switch (token) {
10866
+ case void 0:
10867
+ case "whole":
10868
+ case "allAtOnce":
10869
+ return "asOne";
10870
+ case "lvlOne":
10871
+ return "byLvl";
10872
+ case "lvlAtOnce":
10873
+ return "byLvlAtOnce";
10874
+ default:
10875
+ return "byOne";
9783
10876
  }
9784
- if (cls === "entr") {
9785
- return applyFlyDirection(PRESET_ID_TO_EFFECT.entr[id], anim.presetSubtype);
10877
+ }
10878
+ function resolveStepBuildDescriptor(anim) {
10879
+ const graphic = anim.graphicBuildProperties;
10880
+ if (graphic && graphic.mode === "sub") {
10881
+ if (graphic.kind === "chart") {
10882
+ const mode2 = resolveChartBuildMode(graphic.build);
10883
+ return mode2 === "asOne" ? void 0 : { kind: "chart", mode: mode2 };
10884
+ }
10885
+ const mode = resolveDiagramBuildMode(graphic.build);
10886
+ return mode === "asOne" ? void 0 : { kind: "diagram", mode };
9786
10887
  }
9787
- if (cls === "exit") {
9788
- return applyFlyDirection(PRESET_ID_TO_EFFECT.exit[id], anim.presetSubtype);
10888
+ if (anim.oleChartBuild !== void 0) {
10889
+ const mode = resolveChartBuildMode(anim.oleChartBuild);
10890
+ return mode === "asOne" ? void 0 : { kind: "chart", mode };
9789
10891
  }
9790
- if (cls === "emph") {
9791
- return PRESET_ID_TO_EFFECT.emph[id];
10892
+ if (anim.smartArtBuild !== void 0) {
10893
+ const mode = resolveDiagramBuildMode(anim.smartArtBuild);
10894
+ return mode === "asOne" ? void 0 : { kind: "diagram", mode };
9792
10895
  }
9793
10896
  return void 0;
9794
10897
  }
9795
- function applyFlyDirection(effect, subtype) {
9796
- if (effect !== "flyInBottom" && effect !== "flyOutBottom") {
9797
- return effect;
10898
+ function clamp01(value) {
10899
+ return Math.max(0, Math.min(1, value));
10900
+ }
10901
+ function computeBuildProgress(timing, elapsedMs) {
10902
+ if (timing.durationMs <= 0) {
10903
+ return elapsedMs >= timing.delayMs ? 1 : 0;
9798
10904
  }
9799
- if (subtype === void 0) {
9800
- return effect;
10905
+ return clamp01((elapsedMs - timing.delayMs) / timing.durationMs);
10906
+ }
10907
+ function revealedStageCount(progress, totalStages) {
10908
+ if (totalStages <= 0) {
10909
+ return 0;
9801
10910
  }
9802
- const edge = FLY_SUBTYPE_TO_EDGE[subtype];
9803
- if (!edge) {
9804
- return effect;
10911
+ const p = clamp01(progress);
10912
+ if (p <= 0) {
10913
+ return 0;
9805
10914
  }
9806
- const prefix = effect === "flyInBottom" ? "flyIn" : "flyOut";
9807
- const suffix = `${edge.charAt(0).toUpperCase()}${edge.slice(1)}`;
9808
- return `${prefix}${suffix}`;
10915
+ return Math.min(totalStages, Math.ceil(p * totalStages));
9809
10916
  }
9810
- function parseMotionPathPoints(motionPath) {
9811
- const cmds = motionPath.replace(/\s+/gu, " ").trim().split(/(?=[MLCZ])/iu).filter(Boolean);
9812
- const points = [];
9813
- for (const cmd of cmds) {
9814
- const type = cmd.charAt(0).toUpperCase();
9815
- if (type === "Z") {
9816
- continue;
10917
+ function applyStepBuildMetadata(state, step, options) {
10918
+ if (!step) {
10919
+ return;
10920
+ }
10921
+ if (step.build) {
10922
+ const progress = options?.elapsedMs === void 0 ? 1 : computeBuildProgress(step, options.elapsedMs);
10923
+ state.build = { ...step.build, progress };
10924
+ }
10925
+ if (step.colorTargets) {
10926
+ if (step.colorTargets.includes("fill")) {
10927
+ state.animatesFill = true;
9817
10928
  }
9818
- const nums = cmd.slice(1).trim().split(/[\s,]+/u).map(Number);
9819
- for (let i = 0; i + 1 < nums.length; i += 2) {
9820
- points.push({ x: nums[i] * 100, y: nums[i + 1] * 100 });
10929
+ if (step.colorTargets.includes("stroke")) {
10930
+ state.animatesStroke = true;
9821
10931
  }
9822
10932
  }
9823
- return points;
9824
10933
  }
9825
- function buildDynamicKeyframe(anim, uid) {
9826
- if (anim.motionPath) {
9827
- const name = `pptx-tl-motion-${uid}`;
9828
- const points = parseMotionPathPoints(anim.motionPath);
9829
- if (points.length < 2) {
9830
- return void 0;
10934
+ function categoryCount(chartData) {
10935
+ const longest = chartData.series.reduce((max, s) => Math.max(max, s.values.length), 0);
10936
+ return Math.max(chartData.categories.length, longest);
10937
+ }
10938
+ function applyChartBuildReveal(chartData, build) {
10939
+ const { series } = chartData;
10940
+ if (build.mode === "asOne" || series.length === 0) {
10941
+ return chartData;
10942
+ }
10943
+ if (build.mode === "bySeries") {
10944
+ const shown = revealedStageCount(build.progress, series.length);
10945
+ if (shown >= series.length) {
10946
+ return chartData;
9831
10947
  }
9832
- const lines = [];
9833
- for (let i = 0; i < points.length; i++) {
9834
- const pct = Math.round(i / (points.length - 1) * 100);
9835
- const tx = points[i].x.toFixed(2);
9836
- const ty = points[i].y.toFixed(2);
9837
- if (anim.motionPathRotateAuto) {
9838
- const next = i < points.length - 1 ? points[i + 1] : points[i];
9839
- const prev = i > 0 ? points[i - 1] : points[i];
9840
- const dx = i < points.length - 1 ? next.x - points[i].x : points[i].x - prev.x;
9841
- const dy = i < points.length - 1 ? next.y - points[i].y : points[i].y - prev.y;
9842
- const angleDeg = Math.atan2(dy, dx) * (180 / Math.PI);
9843
- lines.push(
9844
- ` ${pct}% { transform: translate(${tx}%, ${ty}%) rotate(${angleDeg.toFixed(2)}deg); }`
9845
- );
9846
- } else {
9847
- lines.push(` ${pct}% { transform: translate(${tx}%, ${ty}%); }`);
9848
- }
10948
+ return { ...chartData, series: series.slice(0, shown) };
10949
+ }
10950
+ const catCount = categoryCount(chartData);
10951
+ if (catCount === 0) {
10952
+ return chartData;
10953
+ }
10954
+ if (build.mode === "byCategory") {
10955
+ const shown = revealedStageCount(build.progress, catCount);
10956
+ if (shown >= catCount) {
10957
+ return chartData;
9849
10958
  }
9850
10959
  return {
9851
- keyframeName: name,
9852
- css: `@keyframes ${name} {
9853
- ${lines.join("\n")}
9854
- }`
10960
+ ...chartData,
10961
+ series: series.map((s) => ({ ...s, values: s.values.slice(0, shown) }))
10962
+ };
10963
+ }
10964
+ const total = series.length * catCount;
10965
+ const shownCells = revealedStageCount(build.progress, total);
10966
+ if (shownCells >= total) {
10967
+ return chartData;
10968
+ }
10969
+ return {
10970
+ ...chartData,
10971
+ series: series.map((s, si) => {
10972
+ const visibleInSeries = Math.max(0, Math.min(catCount, shownCells - si * catCount));
10973
+ return { ...s, values: s.values.slice(0, visibleInSeries) };
10974
+ })
10975
+ };
10976
+ }
10977
+ function nodeLevels(nodes) {
10978
+ const byId = /* @__PURE__ */ new Map();
10979
+ for (const node of nodes) {
10980
+ byId.set(node.id, node);
10981
+ }
10982
+ return nodes.map((node) => {
10983
+ let depth = 0;
10984
+ let current = node;
10985
+ const seen = /* @__PURE__ */ new Set();
10986
+ while (current?.parentId && !seen.has(current.id)) {
10987
+ seen.add(current.id);
10988
+ const parent = byId.get(current.parentId);
10989
+ if (!parent) {
10990
+ break;
10991
+ }
10992
+ depth++;
10993
+ current = parent;
10994
+ }
10995
+ return depth;
10996
+ });
10997
+ }
10998
+ function revealedSmartArtNodeCount(nodes, build) {
10999
+ if (build.mode === "asOne" || nodes.length === 0) {
11000
+ return nodes.length;
11001
+ }
11002
+ if (build.mode === "byLvlAtOnce") {
11003
+ const levels = nodeLevels(nodes);
11004
+ const uniqueLevels = [...new Set(levels)].sort((a, b) => a - b);
11005
+ const shownLevels = revealedStageCount(build.progress, uniqueLevels.length);
11006
+ if (shownLevels >= uniqueLevels.length) {
11007
+ return nodes.length;
11008
+ }
11009
+ const allowed = new Set(uniqueLevels.slice(0, shownLevels));
11010
+ return levels.filter((level) => allowed.has(level)).length;
11011
+ }
11012
+ return revealedStageCount(build.progress, nodes.length);
11013
+ }
11014
+ var BEZIER_SAMPLES = 8;
11015
+ function cubicAt(p0, c1, c2, p3, t) {
11016
+ const mt = 1 - t;
11017
+ return mt * mt * mt * p0 + 3 * mt * mt * t * c1 + 3 * mt * t * t * c2 + t * t * t * p3;
11018
+ }
11019
+ function allFinite(values) {
11020
+ return values.every((v) => Number.isFinite(v));
11021
+ }
11022
+ function parseMotionPathPoints(motionPath) {
11023
+ const tokens = motionPath.match(/[MLCZmlcz]|-?\d*\.?\d+(?:[eE][-+]?\d+)?/gu);
11024
+ if (!tokens) {
11025
+ return [];
11026
+ }
11027
+ const points = [];
11028
+ let curX = 0;
11029
+ let curY = 0;
11030
+ let startX = 0;
11031
+ let startY = 0;
11032
+ let i = 0;
11033
+ let cmd = "";
11034
+ const nextNum = () => Number(tokens[i++]);
11035
+ const push = (x, y) => {
11036
+ points.push({ x: x * 100, y: y * 100 });
11037
+ };
11038
+ while (i < tokens.length) {
11039
+ const tok = tokens[i];
11040
+ if (/^[MLCZmlcz]$/u.test(tok)) {
11041
+ cmd = tok;
11042
+ i++;
11043
+ if (cmd === "Z" || cmd === "z") {
11044
+ curX = startX;
11045
+ curY = startY;
11046
+ }
11047
+ continue;
11048
+ }
11049
+ const rel = cmd === cmd.toLowerCase();
11050
+ const upper = cmd.toUpperCase();
11051
+ if (upper === "M" || upper === "L") {
11052
+ let x = nextNum();
11053
+ let y = nextNum();
11054
+ if (!allFinite([x, y])) {
11055
+ break;
11056
+ }
11057
+ if (rel) {
11058
+ x += curX;
11059
+ y += curY;
11060
+ }
11061
+ curX = x;
11062
+ curY = y;
11063
+ if (upper === "M") {
11064
+ startX = x;
11065
+ startY = y;
11066
+ cmd = rel ? "l" : "L";
11067
+ }
11068
+ push(x, y);
11069
+ } else if (upper === "C") {
11070
+ let c1x = nextNum();
11071
+ let c1y = nextNum();
11072
+ let c2x = nextNum();
11073
+ let c2y = nextNum();
11074
+ let ex = nextNum();
11075
+ let ey = nextNum();
11076
+ if (!allFinite([c1x, c1y, c2x, c2y, ex, ey])) {
11077
+ break;
11078
+ }
11079
+ if (rel) {
11080
+ c1x += curX;
11081
+ c1y += curY;
11082
+ c2x += curX;
11083
+ c2y += curY;
11084
+ ex += curX;
11085
+ ey += curY;
11086
+ }
11087
+ for (let s = 1; s <= BEZIER_SAMPLES; s++) {
11088
+ const t = s / BEZIER_SAMPLES;
11089
+ push(cubicAt(curX, c1x, c2x, ex, t), cubicAt(curY, c1y, c2y, ey, t));
11090
+ }
11091
+ curX = ex;
11092
+ curY = ey;
11093
+ } else {
11094
+ i++;
11095
+ }
11096
+ }
11097
+ return points;
11098
+ }
11099
+ function resolveEffect(anim) {
11100
+ const cls = anim.presetClass;
11101
+ const id = anim.presetId;
11102
+ if (cls === void 0 || id === void 0) {
11103
+ return void 0;
11104
+ }
11105
+ if (cls === "entr") {
11106
+ return applyFlyDirection(PRESET_ID_TO_EFFECT.entr[id], anim.presetSubtype);
11107
+ }
11108
+ if (cls === "exit") {
11109
+ return applyFlyDirection(PRESET_ID_TO_EFFECT.exit[id], anim.presetSubtype);
11110
+ }
11111
+ if (cls === "emph") {
11112
+ return PRESET_ID_TO_EFFECT.emph[id];
11113
+ }
11114
+ return void 0;
11115
+ }
11116
+ function applyFlyDirection(effect, subtype) {
11117
+ if (effect !== "flyInBottom" && effect !== "flyOutBottom") {
11118
+ return effect;
11119
+ }
11120
+ if (subtype === void 0) {
11121
+ return effect;
11122
+ }
11123
+ const edge = FLY_SUBTYPE_TO_EDGE[subtype];
11124
+ if (!edge) {
11125
+ return effect;
11126
+ }
11127
+ const prefix = effect === "flyInBottom" ? "flyIn" : "flyOut";
11128
+ const suffix = `${edge.charAt(0).toUpperCase()}${edge.slice(1)}`;
11129
+ return `${prefix}${suffix}`;
11130
+ }
11131
+ function buildDynamicKeyframe(anim, uid) {
11132
+ if (anim.motionPath) {
11133
+ const name = `pptx-tl-motion-${uid}`;
11134
+ const points = parseMotionPathPoints(anim.motionPath);
11135
+ if (points.length < 2) {
11136
+ return void 0;
11137
+ }
11138
+ const lines = [];
11139
+ for (let i = 0; i < points.length; i++) {
11140
+ const pct = Math.round(i / (points.length - 1) * 100);
11141
+ const tx = points[i].x.toFixed(2);
11142
+ const ty = points[i].y.toFixed(2);
11143
+ if (anim.motionPathRotateAuto) {
11144
+ const next = i < points.length - 1 ? points[i + 1] : points[i];
11145
+ const prev = i > 0 ? points[i - 1] : points[i];
11146
+ const dx = i < points.length - 1 ? next.x - points[i].x : points[i].x - prev.x;
11147
+ const dy = i < points.length - 1 ? next.y - points[i].y : points[i].y - prev.y;
11148
+ const angleDeg = Math.atan2(dy, dx) * (180 / Math.PI);
11149
+ lines.push(
11150
+ ` ${pct}% { transform: translate(${tx}%, ${ty}%) rotate(${angleDeg.toFixed(2)}deg); }`
11151
+ );
11152
+ } else {
11153
+ lines.push(` ${pct}% { transform: translate(${tx}%, ${ty}%); }`);
11154
+ }
11155
+ }
11156
+ return {
11157
+ keyframeName: name,
11158
+ css: `@keyframes ${name} {
11159
+ ${lines.join("\n")}
11160
+ }`
9855
11161
  };
9856
11162
  }
9857
11163
  if (anim.rotationBy !== void 0) {
@@ -9883,6 +11189,13 @@ ${lines.join("\n")}
9883
11189
  return { keyframeName: name, css };
9884
11190
  }
9885
11191
  }
11192
+ if (anim.presetClass === "emph") {
11193
+ const filterName = `pptx-tl-emph-${uid}`;
11194
+ const filterCss = emphasisFilterKeyframeCss(anim.presetId, filterName);
11195
+ if (filterCss) {
11196
+ return { keyframeName: filterName, css: filterCss };
11197
+ }
11198
+ }
9886
11199
  return void 0;
9887
11200
  }
9888
11201
  function cssKeyframeName(effect) {
@@ -10208,19 +11521,122 @@ function getAnimationInitialStyle(preset, nativeAnimation) {
10208
11521
  }
10209
11522
  return {};
10210
11523
  }
10211
- function cssEasingForAnimation(anim) {
10212
- const hasAccel = anim.accel !== void 0 && anim.accel > 0;
10213
- const hasDecel = anim.decel !== void 0 && anim.decel > 0;
10214
- if (hasAccel && hasDecel) {
10215
- return "ease-in-out";
11524
+ var WIPE_LIKE = /* @__PURE__ */ new Set([
11525
+ "wipeIn",
11526
+ "peekIn",
11527
+ "blindsIn",
11528
+ "wipeOut"
11529
+ ]);
11530
+ var SPLIT_LIKE = /* @__PURE__ */ new Set(["splitIn"]);
11531
+ function wipeStartInset(edge) {
11532
+ switch (edge) {
11533
+ case "left":
11534
+ return "inset(0 100% 0 0)";
11535
+ case "right":
11536
+ return "inset(0 0 0 100%)";
11537
+ case "top":
11538
+ return "inset(0 0 100% 0)";
11539
+ case "bottom":
11540
+ default:
11541
+ return "inset(100% 0 0 0)";
11542
+ }
11543
+ }
11544
+ function wipeRevealCss(name, edge) {
11545
+ return `@keyframes ${name} {
11546
+ from { clip-path: ${wipeStartInset(edge)}; opacity: 1; }
11547
+ to { clip-path: inset(0 0 0 0); opacity: 1; }
11548
+ }`;
11549
+ }
11550
+ function wipeHideCss(name, edge) {
11551
+ return `@keyframes ${name} {
11552
+ from { clip-path: inset(0 0 0 0); opacity: 1; }
11553
+ to { clip-path: ${wipeStartInset(edge)}; opacity: 0; }
11554
+ }`;
11555
+ }
11556
+ function splitRevealCss(name, orientation) {
11557
+ const start = orientation === "vertical" ? "inset(0 50% 0 50%)" : "inset(50% 0 50% 0)";
11558
+ return `@keyframes ${name} {
11559
+ from { clip-path: ${start}; opacity: 1; }
11560
+ to { clip-path: inset(0 0 0 0); opacity: 1; }
11561
+ }`;
11562
+ }
11563
+ function buildDirectionalKeyframe(effect, subtype, uid) {
11564
+ if (subtype === void 0) {
11565
+ return void 0;
11566
+ }
11567
+ const edge = FLY_SUBTYPE_TO_EDGE[subtype];
11568
+ if (!edge) {
11569
+ return void 0;
11570
+ }
11571
+ const name = `pptx-tl-dir-${uid}`;
11572
+ if (SPLIT_LIKE.has(effect)) {
11573
+ const orientation = edge === "left" || edge === "right" ? "vertical" : "horizontal";
11574
+ return { keyframeName: name, css: splitRevealCss(name, orientation) };
11575
+ }
11576
+ if (WIPE_LIKE.has(effect)) {
11577
+ const css = effect === "wipeOut" ? wipeHideCss(name, edge) : wipeRevealCss(name, edge);
11578
+ return { keyframeName: name, css };
11579
+ }
11580
+ return void 0;
11581
+ }
11582
+ function isMediaCommandAnimation(anim) {
11583
+ return typeof anim.commandString === "string" && anim.commandString.trim().length > 0;
11584
+ }
11585
+ function buildStepCommand(anim) {
11586
+ if (!isMediaCommandAnimation(anim)) {
11587
+ return void 0;
11588
+ }
11589
+ const command = (anim.commandString ?? "").trim();
11590
+ return {
11591
+ type: anim.commandType,
11592
+ command,
11593
+ targetId: anim.targetId ?? ""
11594
+ };
11595
+ }
11596
+ function parseMediaCommand(commandString) {
11597
+ const raw = commandString.trim();
11598
+ if (!raw) {
11599
+ return void 0;
11600
+ }
11601
+ const playFromMatch = raw.match(/^playfrom\s*\(\s*(-?\d*\.?\d+)?\s*\)$/i);
11602
+ if (playFromMatch) {
11603
+ const seconds = playFromMatch[1] !== void 0 ? Number.parseFloat(playFromMatch[1]) : 0;
11604
+ return { verb: "playFrom", seekSeconds: Number.isFinite(seconds) ? Math.max(0, seconds) : 0 };
11605
+ }
11606
+ const lower = raw.toLowerCase();
11607
+ if (lower === "play" || lower === "resume") {
11608
+ return { verb: "play" };
10216
11609
  }
10217
- if (hasAccel) {
10218
- return "ease-in";
11610
+ if (lower === "pause") {
11611
+ return { verb: "pause" };
10219
11612
  }
10220
- if (hasDecel) {
10221
- return "ease-out";
11613
+ if (lower === "stop" || lower === "stopmedia") {
11614
+ return { verb: "stop" };
11615
+ }
11616
+ if (lower === "toggleplay") {
11617
+ return { verb: "togglePlay" };
11618
+ }
11619
+ return void 0;
11620
+ }
11621
+ function clamp012(value) {
11622
+ return Math.max(0, Math.min(1, value));
11623
+ }
11624
+ function cssEasingForAnimation(anim) {
11625
+ const accel = anim.accel !== void 0 && anim.accel > 0 ? clamp012(anim.accel) : 0;
11626
+ const decel = anim.decel !== void 0 && anim.decel > 0 ? clamp012(anim.decel) : 0;
11627
+ if (accel === 0 && decel === 0) {
11628
+ return "ease";
11629
+ }
11630
+ const x1 = accel.toFixed(3);
11631
+ const x2 = (1 - decel).toFixed(3);
11632
+ return `cubic-bezier(${x1}, 0, ${x2}, 1)`;
11633
+ }
11634
+ function stepColorTargets(anim) {
11635
+ if (!anim.colorAnimation) {
11636
+ return void 0;
10222
11637
  }
10223
- return "ease";
11638
+ const targets = resolveColorAnimationTargets(anim.colorAnimation.targetAttribute);
11639
+ return targets.length > 0 ? targets : void 0;
10224
11640
  }
10225
11641
  function fallbackEffectForClass(presetClass) {
10226
11642
  if (presetClass === "entr") {
@@ -10229,6 +11645,9 @@ function fallbackEffectForClass(presetClass) {
10229
11645
  if (presetClass === "exit") {
10230
11646
  return "fadeOut";
10231
11647
  }
11648
+ if (presetClass === "emph") {
11649
+ return "pulse";
11650
+ }
10232
11651
  return void 0;
10233
11652
  }
10234
11653
  function buildTimeline(nativeAnimations) {
@@ -10266,27 +11685,39 @@ function buildTimeline(nativeAnimations) {
10266
11685
  const expandedSteps = expandIterateAnimation(anim);
10267
11686
  for (const singleAnim of expandedSteps) {
10268
11687
  let effect = resolveEffect(singleAnim);
10269
- const dynamic = effect ? void 0 : buildDynamicKeyframe(singleAnim, dynamicUid++);
10270
- if (!effect && !dynamic) {
11688
+ let dynamic = effect ? void 0 : buildDynamicKeyframe(singleAnim, dynamicUid++);
11689
+ if (effect) {
11690
+ const directional = buildDirectionalKeyframe(effect, singleAnim.presetSubtype, dynamicUid);
11691
+ if (directional) {
11692
+ dynamic = directional;
11693
+ effect = void 0;
11694
+ dynamicUid++;
11695
+ }
11696
+ }
11697
+ const isCommand = !effect && !dynamic && isMediaCommandAnimation(singleAnim);
11698
+ if (!effect && !dynamic && !isCommand) {
10271
11699
  effect = fallbackEffectForClass(singleAnim.presetClass);
10272
11700
  if (!effect) {
10273
11701
  continue;
10274
11702
  }
10275
11703
  }
10276
- const keyframe = effect ? cssKeyframeName(effect) : dynamic.keyframeName;
11704
+ let keyframe = "";
11705
+ if (!isCommand) {
11706
+ keyframe = effect ? cssKeyframeName(effect) : dynamic.keyframeName;
11707
+ }
10277
11708
  if (effect) {
10278
11709
  neededKeyframes.add(effect);
10279
11710
  }
10280
11711
  if (dynamic) {
10281
11712
  dynamicBlocks.push(dynamic.css);
10282
11713
  }
10283
- const elementId = singleAnim.targetId ?? "";
11714
+ const elementId = isCommand ? "" : singleAnim.targetId ?? "";
10284
11715
  const effective = resolveAnimationStart(singleAnim);
10285
11716
  const trigger = effective.trigger;
10286
- const duration = singleAnim.durationMs ?? defaultDuration(singleAnim.presetClass);
11717
+ const duration = isCommand ? 0 : singleAnim.durationMs ?? defaultDuration(singleAnim.presetClass);
10287
11718
  const animDelay = singleAnim.delayMs ?? 0;
10288
11719
  const triggerDelay = singleAnim.startConditions && singleAnim.startConditions.length > 0 ? effective.delayMs : singleAnim.triggerDelayMs ?? 0;
10289
- const presetClass = singleAnim.presetClass ?? "entr";
11720
+ const presetClass = isCommand ? "emph" : singleAnim.presetClass ?? "entr";
10290
11721
  const fill = fillModeForClass(singleAnim.presetClass);
10291
11722
  const iterCount = singleAnim.repeatCount ?? 1;
10292
11723
  const direction = singleAnim.autoReverse ? "alternate" : "normal";
@@ -10318,7 +11749,7 @@ function buildTimeline(nativeAnimations) {
10318
11749
  }
10319
11750
  const iterStr = iterCount === Infinity ? "infinite" : String(iterCount);
10320
11751
  const easing = cssEasingForAnimation(singleAnim);
10321
- const cssAnimation = `${keyframe} ${duration}ms ${easing} ${delayMs}ms ${iterStr} ${direction} ${fill}`;
11752
+ const cssAnimation = isCommand ? "" : `${keyframe} ${duration}ms ${easing} ${delayMs}ms ${iterStr} ${direction} ${fill}`;
10322
11753
  currentGroup.push({
10323
11754
  elementId,
10324
11755
  cssAnimation,
@@ -10329,7 +11760,10 @@ function buildTimeline(nativeAnimations) {
10329
11760
  fillMode: fill,
10330
11761
  presetClass,
10331
11762
  soundPath: singleAnim.soundPath,
10332
- stopSound: singleAnim.stopSound
11763
+ stopSound: singleAnim.stopSound,
11764
+ command: isCommand ? buildStepCommand(singleAnim) : void 0,
11765
+ build: isCommand ? void 0 : resolveStepBuildDescriptor(singleAnim),
11766
+ colorTargets: isCommand ? void 0 : stepColorTargets(singleAnim)
10333
11767
  });
10334
11768
  }
10335
11769
  }
@@ -10456,7 +11890,9 @@ function buildSequenceGroups(animsByKey, entranceIds, neededKeyframes, dynamicBl
10456
11890
  fillMode: fill,
10457
11891
  presetClass,
10458
11892
  soundPath: anim.soundPath,
10459
- stopSound: anim.stopSound
11893
+ stopSound: anim.stopSound,
11894
+ build: resolveStepBuildDescriptor(anim),
11895
+ colorTargets: stepColorTargets(anim)
10460
11896
  });
10461
11897
  }
10462
11898
  if (seqGroup.length > 0) {
@@ -10505,6 +11941,12 @@ var TimelineEngine = class _TimelineEngine {
10505
11941
  * that have been triggered so far (cumulative).
10506
11942
  */
10507
11943
  activeAnimations;
11944
+ /**
11945
+ * Map of elementId → the most recently applied step carrying a staged-build
11946
+ * or colour-target descriptor. Used to surface `build` / `animatesFill` /
11947
+ * `animatesStroke` on {@link ElementAnimationState}.
11948
+ */
11949
+ activeSteps;
10508
11950
  /**
10509
11951
  * Set of element IDs whose entrance animation has played.
10510
11952
  * These elements become visible.
@@ -10529,6 +11971,7 @@ var TimelineEngine = class _TimelineEngine {
10529
11971
  this.timeline = timeline;
10530
11972
  this.currentGroupIndex = -1;
10531
11973
  this.activeAnimations = /* @__PURE__ */ new Map();
11974
+ this.activeSteps = /* @__PURE__ */ new Map();
10532
11975
  this.revealedElements = /* @__PURE__ */ new Set();
10533
11976
  this.exitedElements = /* @__PURE__ */ new Set();
10534
11977
  this.interactiveGroupIndexes = /* @__PURE__ */ new Map();
@@ -10626,13 +12069,15 @@ var TimelineEngine = class _TimelineEngine {
10626
12069
  * Build a snapshot of the current animation state for all elements.
10627
12070
  * Returns a map: elementId → { visible, cssAnimation }.
10628
12071
  */
10629
- getElementStates(elementIds) {
12072
+ getElementStates(elementIds, options) {
10630
12073
  const states = /* @__PURE__ */ new Map();
10631
12074
  for (const id of elementIds) {
10632
- states.set(id, {
12075
+ const state = {
10633
12076
  visible: this.isElementVisible(id),
10634
12077
  cssAnimation: this.activeAnimations.get(id)
10635
- });
12078
+ };
12079
+ applyStepBuildMetadata(state, this.activeSteps.get(id), options);
12080
+ states.set(id, state);
10636
12081
  }
10637
12082
  return states;
10638
12083
  }
@@ -10711,6 +12156,7 @@ var TimelineEngine = class _TimelineEngine {
10711
12156
  reset() {
10712
12157
  this.currentGroupIndex = -1;
10713
12158
  this.activeAnimations.clear();
12159
+ this.activeSteps.clear();
10714
12160
  this.revealedElements.clear();
10715
12161
  this.exitedElements.clear();
10716
12162
  this.interactiveGroupIndexes.clear();
@@ -10722,6 +12168,9 @@ var TimelineEngine = class _TimelineEngine {
10722
12168
  applyGroupSteps(group) {
10723
12169
  for (const step of group.steps) {
10724
12170
  this.activeAnimations.set(step.elementId, step.cssAnimation);
12171
+ if (step.build || step.colorTargets) {
12172
+ this.activeSteps.set(step.elementId, step);
12173
+ }
10725
12174
  if (step.presetClass === "entr") {
10726
12175
  this.revealedElements.add(step.elementId);
10727
12176
  }
@@ -10731,6 +12180,151 @@ var TimelineEngine = class _TimelineEngine {
10731
12180
  }
10732
12181
  }
10733
12182
  };
12183
+ function buildSegmentCounts(slide, nativeAnims) {
12184
+ const segmentCounts = /* @__PURE__ */ new Map();
12185
+ for (const anim of nativeAnims) {
12186
+ if (anim.buildType && anim.buildType !== "allAtOnce" && anim.targetId) {
12187
+ const el = slide.elements.find((e) => e.id === anim.targetId);
12188
+ if (el && chunkCLNGAVNH_js.hasTextProperties(el) && el.textSegments && el.textSegments.length > 0) {
12189
+ segmentCounts.set(anim.targetId, countTextSegments(el.textSegments));
12190
+ }
12191
+ }
12192
+ }
12193
+ return segmentCounts;
12194
+ }
12195
+ var PresentationAnimationController = class _PresentationAnimationController {
12196
+ engine;
12197
+ keyframes;
12198
+ interactiveIds;
12199
+ hoverIds;
12200
+ ids;
12201
+ constructor(engine, elementIds) {
12202
+ this.engine = engine;
12203
+ this.keyframes = engine.getTimeline().keyframesCss;
12204
+ this.interactiveIds = engine.getInteractiveTriggerShapeIds();
12205
+ this.hoverIds = engine.getHoverTriggerShapeIds();
12206
+ this.ids = elementIds;
12207
+ }
12208
+ /**
12209
+ * Build a controller from a slide. Expands staged text-build animations into
12210
+ * per-segment sub-animations before constructing the {@link TimelineEngine},
12211
+ * then caches the keyframes CSS, trigger-shape id sets, and the full element
12212
+ * id list (base element ids + text-build sub-element ids) to track.
12213
+ */
12214
+ static fromSlide(slide) {
12215
+ const nativeAnims = slide.nativeAnimations ?? [];
12216
+ const segmentCounts = buildSegmentCounts(slide, nativeAnims);
12217
+ const expandedAnims = segmentCounts.size > 0 ? expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
12218
+ const engine = TimelineEngine.fromAnimations(expandedAnims);
12219
+ const elementIds = slide.elements.map((element) => element.id);
12220
+ for (const anim of expandedAnims) {
12221
+ if (anim.targetId && anim.targetId.includes(TEXT_BUILD_ID_SEP)) {
12222
+ elementIds.push(anim.targetId);
12223
+ }
12224
+ }
12225
+ return new _PresentationAnimationController(engine, elementIds);
12226
+ }
12227
+ /** The `@keyframes` CSS blocks a binding injects once per slide. */
12228
+ get keyframesCss() {
12229
+ return this.keyframes;
12230
+ }
12231
+ /** Shape ids that trigger an interactive (`onShapeClick`) sequence. */
12232
+ get interactiveTriggerShapeIds() {
12233
+ return this.interactiveIds;
12234
+ }
12235
+ /** Shape ids that trigger a hover (`onHover`) sequence. */
12236
+ get hoverTriggerShapeIds() {
12237
+ return this.hoverIds;
12238
+ }
12239
+ /** Every element id (plus text-build sub-element ids) tracked for state. */
12240
+ get elementIds() {
12241
+ return this.ids;
12242
+ }
12243
+ // -----------------------------------------------------------------------
12244
+ // Main click-group stepping (delegated to the engine)
12245
+ // -----------------------------------------------------------------------
12246
+ /** True when more click-groups remain to play. */
12247
+ hasMoreSteps() {
12248
+ return this.engine.hasMoreSteps();
12249
+ }
12250
+ /** Advance to the next click-group; `null` when none remain. */
12251
+ advance() {
12252
+ return this.engine.advance();
12253
+ }
12254
+ /** Peek at the next click-group without advancing. */
12255
+ peekNext() {
12256
+ return this.engine.peekNext();
12257
+ }
12258
+ /** True when the next click-group should auto-play without a click. */
12259
+ shouldAutoAdvance() {
12260
+ return this.engine.shouldAutoAdvance();
12261
+ }
12262
+ /** Auto-advance delay (ms) for the next group; 0 when not applicable. */
12263
+ getAutoAdvanceDelay() {
12264
+ return this.engine.getAutoAdvanceDelay();
12265
+ }
12266
+ /** Reset all playback state to the slide's initial (nothing played). */
12267
+ reset() {
12268
+ this.engine.reset();
12269
+ }
12270
+ // -----------------------------------------------------------------------
12271
+ // Interactive + hover sequences (delegated to the engine)
12272
+ // -----------------------------------------------------------------------
12273
+ /** True when `shapeId` triggers an interactive sequence. */
12274
+ hasInteractiveSequence(shapeId) {
12275
+ return this.engine.hasInteractiveSequence(shapeId);
12276
+ }
12277
+ /** Advance the interactive sequence for `shapeId`; `null` when exhausted. */
12278
+ advanceInteractive(shapeId) {
12279
+ return this.engine.advanceInteractive(shapeId);
12280
+ }
12281
+ /** True when `shapeId` triggers a hover sequence. */
12282
+ hasHoverSequence(shapeId) {
12283
+ return this.engine.hasHoverSequence(shapeId);
12284
+ }
12285
+ /** Advance the hover sequence for `shapeId`; `null` when exhausted. */
12286
+ advanceHover(shapeId) {
12287
+ return this.engine.advanceHover(shapeId);
12288
+ }
12289
+ /** Reset the hover sequence for `shapeId` so the next hover replays it. */
12290
+ resetHover(shapeId) {
12291
+ this.engine.resetHover(shapeId);
12292
+ }
12293
+ // -----------------------------------------------------------------------
12294
+ // State snapshots
12295
+ // -----------------------------------------------------------------------
12296
+ /**
12297
+ * Snapshot the current animation state for every tracked element id.
12298
+ * Pass `{ elapsedMs }` to project staged-build `progress` at that playback
12299
+ * time (see the module header's build-reveal contract).
12300
+ */
12301
+ computeStates(options) {
12302
+ return this.engine.getElementStates(this.ids, options);
12303
+ }
12304
+ /**
12305
+ * Snapshot the animation state for a specific subset of element ids. Used by
12306
+ * a binding's staged-build requestAnimationFrame loop to re-read only the
12307
+ * build elements' `build` descriptor at the current `elapsedMs`.
12308
+ */
12309
+ computeStatesFor(elementIds, options) {
12310
+ return this.engine.getElementStates(elementIds, options);
12311
+ }
12312
+ /**
12313
+ * Element ids of the steps in a click-group that reveal a staged chart /
12314
+ * SmartArt build (`p:bldChart` / `p:bldDgm`). A non-empty result tells a
12315
+ * binding the group needs a requestAnimationFrame reveal loop; an empty result
12316
+ * means ordinary discrete click-advance is enough.
12317
+ */
12318
+ static collectBuildStepIds(group) {
12319
+ const ids = [];
12320
+ for (const step of group.steps) {
12321
+ if (step.build) {
12322
+ ids.push(step.elementId);
12323
+ }
12324
+ }
12325
+ return ids;
12326
+ }
12327
+ };
10734
12328
  var PRESET_TO_EFFECT = {
10735
12329
  fadeIn: "fadeIn",
10736
12330
  flyIn: "flyInBottom",
@@ -11295,6 +12889,21 @@ var LIGHT_RIG_MAP = {
11295
12889
  filter: "contrast(1.1)"
11296
12890
  }
11297
12891
  };
12892
+ function safeHexColor(color) {
12893
+ if (!color) {
12894
+ return void 0;
12895
+ }
12896
+ const candidate = color.startsWith("#") ? color : `#${color}`;
12897
+ if (/^#[0-9a-fA-F]{6}$/u.test(candidate)) {
12898
+ return candidate;
12899
+ }
12900
+ const short = /^#(?<r>[0-9a-fA-F])(?<g>[0-9a-fA-F])(?<b>[0-9a-fA-F])$/u.exec(candidate);
12901
+ if (short?.groups) {
12902
+ const { r, g, b } = short.groups;
12903
+ return `#${r}${r}${g}${g}${b}${b}`;
12904
+ }
12905
+ return void 0;
12906
+ }
11298
12907
  function getLightDirectionAngle(direction) {
11299
12908
  switch (direction) {
11300
12909
  case "t":
@@ -11454,7 +13063,7 @@ function getExtrusionDirection(rotateX, rotateY) {
11454
13063
  }
11455
13064
  return { dx, dy };
11456
13065
  }
11457
- function getExtrusionBoxShadow(shape3d, cameraRotX = 0, cameraRotY = 0) {
13066
+ function getExtrusionBoxShadow(shape3d, cameraRotX = 0, cameraRotY = 0, fillColorFallback) {
11458
13067
  if (!shape3d?.extrusionHeight || shape3d.extrusionHeight <= 0) {
11459
13068
  return void 0;
11460
13069
  }
@@ -11464,7 +13073,7 @@ function getExtrusionBoxShadow(shape3d, cameraRotX = 0, cameraRotY = 0) {
11464
13073
  }
11465
13074
  const layerCount = Math.min(rawDepthPx, MAX_EXTRUSION_LAYERS);
11466
13075
  const step = rawDepthPx / layerCount;
11467
- const extColor = shape3d.extrusionColor || "#888888";
13076
+ const extColor = safeHexColor(shape3d.extrusionColor) ?? safeHexColor(fillColorFallback) ?? "#888888";
11468
13077
  const { dx, dy } = getExtrusionDirection(cameraRotX, cameraRotY);
11469
13078
  const depthShadows = [];
11470
13079
  for (let i = 1; i <= layerCount; i++) {
@@ -11480,12 +13089,12 @@ function getExtrusionBoxShadow(shape3d, cameraRotX = 0, cameraRotY = 0) {
11480
13089
  );
11481
13090
  return depthShadows.join(", ");
11482
13091
  }
11483
- function getContourBoxShadow(shape3d) {
13092
+ function getContourBoxShadow(shape3d, lineColorFallback) {
11484
13093
  if (!shape3d?.contourWidth || shape3d.contourWidth <= 0) {
11485
13094
  return void 0;
11486
13095
  }
11487
13096
  const widthPx = Math.max(1, Math.round(shape3d.contourWidth / EMU_PER_PX));
11488
- const color = shape3d.contourColor || "#000000";
13097
+ const color = safeHexColor(shape3d.contourColor) ?? safeHexColor(lineColorFallback) ?? "#000000";
11489
13098
  return `0 0 0 ${widthPx}px ${color}`;
11490
13099
  }
11491
13100
  function get3DBevelShadow(shape3d) {
@@ -11505,7 +13114,7 @@ function get3DBevelShadow(shape3d) {
11505
13114
  }
11506
13115
  return parts.length > 0 ? parts.join(", ") : void 0;
11507
13116
  }
11508
- function apply3dEffects(base, scene3d, shape3d) {
13117
+ function apply3dEffects(base, scene3d, shape3d, fillColorFallback) {
11509
13118
  if (!scene3d && !shape3d) {
11510
13119
  return;
11511
13120
  }
@@ -11538,11 +13147,11 @@ function apply3dEffects(base, scene3d, shape3d) {
11538
13147
  base.willChange = "transform";
11539
13148
  base.transformStyle = "preserve-3d";
11540
13149
  }
11541
- const extrusionShadow = getExtrusionBoxShadow(shape3d, rotateX, rotateY);
13150
+ const extrusionShadow = getExtrusionBoxShadow(shape3d, rotateX, rotateY, fillColorFallback);
11542
13151
  if (extrusionShadow) {
11543
13152
  base.boxShadow = base.boxShadow ? `${base.boxShadow}, ${extrusionShadow}` : extrusionShadow;
11544
13153
  }
11545
- const contourShadow = getContourBoxShadow(shape3d);
13154
+ const contourShadow = getContourBoxShadow(shape3d, fillColorFallback);
11546
13155
  if (contourShadow) {
11547
13156
  base.boxShadow = base.boxShadow ? `${base.boxShadow}, ${contourShadow}` : contourShadow;
11548
13157
  }
@@ -11577,32 +13186,245 @@ function apply3dEffects(base, scene3d, shape3d) {
11577
13186
  base.backgroundImage = base.backgroundImage ? `${lightRig.backgroundImage}, ${base.backgroundImage}` : lightRig.backgroundImage;
11578
13187
  }
11579
13188
  }
11580
- function ooxmlDashToCssBorderStyle(dashVal) {
11581
- if (!dashVal) {
11582
- return "solid";
13189
+ function collectSections(entry, tableData, pos) {
13190
+ const { rowIndex, cellIndex, rowCount, columnCount } = pos;
13191
+ const isTop = rowIndex === 0;
13192
+ const isBottom = rowIndex === rowCount - 1;
13193
+ const isLeft = cellIndex === 0;
13194
+ const isRight = cellIndex === columnCount - 1;
13195
+ const sections = [];
13196
+ const push = (borders, regionTop, regionBottom, regionLeft, regionRight) => {
13197
+ if (borders) {
13198
+ sections.push({ borders, regionTop, regionBottom, regionLeft, regionRight });
13199
+ }
13200
+ };
13201
+ push(entry.wholeTblBorders, isTop, isBottom, isLeft, isRight);
13202
+ if (tableData.bandedRows) {
13203
+ const bandStartRow = tableData.firstRowHeader ? 1 : 0;
13204
+ const bandEndRow = tableData.lastRow ? rowCount - 1 : rowCount;
13205
+ if (rowIndex >= bandStartRow && rowIndex < bandEndRow) {
13206
+ const rowCycle = Math.max(tableData.bandRowCycle ?? 1, 1);
13207
+ const bandGroup = Math.floor((rowIndex - bandStartRow) / rowCycle) % 2;
13208
+ push(
13209
+ bandGroup === 0 ? entry.band1HBorders : entry.band2HBorders,
13210
+ true,
13211
+ true,
13212
+ isLeft,
13213
+ isRight
13214
+ );
13215
+ }
11583
13216
  }
11584
- switch (dashVal) {
11585
- case "dot":
11586
- case "sysDot":
11587
- return "dotted";
11588
- case "dash":
11589
- case "sysDash":
11590
- case "lgDash":
11591
- case "dashDot":
11592
- case "lgDashDot":
11593
- case "sysDashDot":
11594
- case "lgDashDotDot":
11595
- case "sysDashDotDot":
11596
- return "dashed";
11597
- default:
11598
- return "solid";
13217
+ if (tableData.bandedColumns) {
13218
+ const colStart = tableData.firstCol ? 1 : 0;
13219
+ const colEnd = tableData.lastCol ? columnCount - 1 : columnCount;
13220
+ if (cellIndex >= colStart && cellIndex < colEnd) {
13221
+ const colCycle = Math.max(tableData.bandColCycle ?? 1, 1);
13222
+ const colGroup = Math.floor((cellIndex - colStart) / colCycle) % 2;
13223
+ push(colGroup === 0 ? entry.band1VBorders : entry.band2VBorders, isTop, isBottom, true, true);
13224
+ }
13225
+ }
13226
+ if (tableData.firstRowHeader && isTop) {
13227
+ push(entry.firstRowBorders, true, true, isLeft, isRight);
13228
+ }
13229
+ if (tableData.lastRow && isBottom) {
13230
+ push(entry.lastRowBorders, true, true, isLeft, isRight);
13231
+ }
13232
+ if (tableData.firstCol && isLeft) {
13233
+ push(entry.firstColBorders, isTop, isBottom, true, true);
11599
13234
  }
13235
+ if (tableData.lastCol && isRight) {
13236
+ push(entry.lastColBorders, isTop, isBottom, true, true);
13237
+ }
13238
+ return sections;
11600
13239
  }
11601
- function computeBoundingRect(cells) {
11602
- if (cells.length === 0) {
13240
+ function resolveStyleDiagonalBorders(entry, tableData, pos, resolve) {
13241
+ if (!entry) {
11603
13242
  return void 0;
11604
13243
  }
11605
- let startRow = cells[0].row;
13244
+ const sections = collectSections(entry, tableData, pos);
13245
+ if (sections.length === 0) {
13246
+ return void 0;
13247
+ }
13248
+ let tl2br;
13249
+ let bl2tr;
13250
+ for (const section of sections) {
13251
+ if (section.borders.tl2br) {
13252
+ tl2br = section.borders.tl2br;
13253
+ }
13254
+ if (section.borders.bl2tr) {
13255
+ bl2tr = section.borders.bl2tr;
13256
+ }
13257
+ }
13258
+ const info = {};
13259
+ let applied = false;
13260
+ if (tl2br && !tl2br.noFill) {
13261
+ info.diagDownColor = tl2br.color ?? resolve(tl2br.fill) ?? "#000000";
13262
+ info.diagDownWidth = tl2br.width ?? 1;
13263
+ applied = true;
13264
+ }
13265
+ if (bl2tr && !bl2tr.noFill) {
13266
+ info.diagUpColor = bl2tr.color ?? resolve(bl2tr.fill) ?? "#000000";
13267
+ info.diagUpWidth = bl2tr.width ?? 1;
13268
+ applied = true;
13269
+ }
13270
+ return applied ? info : void 0;
13271
+ }
13272
+ function hexToRgb4(hex) {
13273
+ const clean = hex.replace(/^#/u, "");
13274
+ return {
13275
+ r: parseInt(clean.substring(0, 2), 16),
13276
+ g: parseInt(clean.substring(2, 4), 16),
13277
+ b: parseInt(clean.substring(4, 6), 16)
13278
+ };
13279
+ }
13280
+ function rgbToHex4(r, g, b) {
13281
+ const clamp8 = (v) => Math.max(0, Math.min(255, Math.round(v)));
13282
+ return `#${clamp8(r).toString(16).padStart(2, "0").toUpperCase()}${clamp8(g).toString(16).padStart(2, "0").toUpperCase()}${clamp8(b).toString(16).padStart(2, "0").toUpperCase()}`;
13283
+ }
13284
+ function tintColor(hex, tintFactor) {
13285
+ const { r, g, b } = hexToRgb4(hex);
13286
+ return rgbToHex4(
13287
+ r + (255 - r) * tintFactor,
13288
+ g + (255 - g) * tintFactor,
13289
+ b + (255 - b) * tintFactor
13290
+ );
13291
+ }
13292
+ function shadeColor(hex, shadeFactor) {
13293
+ const { r, g, b } = hexToRgb4(hex);
13294
+ return rgbToHex4(r * (1 - shadeFactor), g * (1 - shadeFactor), b * (1 - shadeFactor));
13295
+ }
13296
+ function applyTintShade(base, fill) {
13297
+ let color = base;
13298
+ if (fill.tint !== void 0 && fill.tint > 0) {
13299
+ color = tintColor(color, fill.tint / 1e5);
13300
+ }
13301
+ if (fill.shade !== void 0 && fill.shade > 0) {
13302
+ color = shadeColor(color, 1 - fill.shade / 1e5);
13303
+ }
13304
+ return color;
13305
+ }
13306
+ function resolveStyleFillColor(fill, colorScheme) {
13307
+ if (!fill) {
13308
+ return void 0;
13309
+ }
13310
+ let base;
13311
+ if (fill.schemeColor && colorScheme) {
13312
+ base = colorScheme[fill.schemeColor];
13313
+ }
13314
+ if (!base && fill.color) {
13315
+ base = fill.color;
13316
+ }
13317
+ if (!base) {
13318
+ return void 0;
13319
+ }
13320
+ return applyTintShade(base, fill);
13321
+ }
13322
+ function resolveFontRefIdx(idx, fontScheme) {
13323
+ if (!idx || !fontScheme) {
13324
+ return void 0;
13325
+ }
13326
+ if (idx === "minor") {
13327
+ return fontScheme.minorFont?.latin;
13328
+ }
13329
+ if (idx === "major") {
13330
+ return fontScheme.majorFont?.latin;
13331
+ }
13332
+ return void 0;
13333
+ }
13334
+ var BEVEL_LIGHT_OFFSETS = {
13335
+ tl: { x: 1, y: 1 },
13336
+ t: { x: 0, y: 1 },
13337
+ tr: { x: -1, y: 1 },
13338
+ r: { x: -1, y: 0 },
13339
+ br: { x: -1, y: -1 },
13340
+ b: { x: 0, y: -1 },
13341
+ bl: { x: 1, y: -1 },
13342
+ l: { x: 1, y: 0 }
13343
+ };
13344
+ function cell3DBevelCss(cell3D) {
13345
+ const size = Math.max(cell3D.bevelHeight ?? cell3D.bevelWidth ?? 4, 1);
13346
+ const dir = cell3D.lightRigDirection ?? "tl";
13347
+ const off = BEVEL_LIGHT_OFFSETS[dir] ?? BEVEL_LIGHT_OFFSETS.tl;
13348
+ const highlight = `inset ${off.x * size}px ${off.y * size}px ${size}px rgba(255,255,255,0.55)`;
13349
+ const shadow = `inset ${-off.x * size}px ${-off.y * size}px ${size}px rgba(0,0,0,0.4)`;
13350
+ return { boxShadow: `${highlight}, ${shadow}` };
13351
+ }
13352
+ function resolveTableStyleEntry(tableStyleId, tableStyleMap) {
13353
+ if (!tableStyleId || !tableStyleMap) {
13354
+ return void 0;
13355
+ }
13356
+ const direct = tableStyleMap[tableStyleId];
13357
+ if (direct) {
13358
+ return direct;
13359
+ }
13360
+ const normalised = tableStyleId.trim().toUpperCase();
13361
+ const withBraces = normalised.startsWith("{") ? normalised : `{${normalised}}`;
13362
+ return tableStyleMap[withBraces];
13363
+ }
13364
+ function ooxmlDashToCssBorderStyle(dashVal) {
13365
+ if (!dashVal) {
13366
+ return "solid";
13367
+ }
13368
+ switch (dashVal) {
13369
+ case "dot":
13370
+ case "sysDot":
13371
+ return "dotted";
13372
+ case "dash":
13373
+ case "sysDash":
13374
+ case "lgDash":
13375
+ case "dashDot":
13376
+ case "lgDashDot":
13377
+ case "sysDashDot":
13378
+ case "lgDashDotDot":
13379
+ case "sysDashDotDot":
13380
+ return "dashed";
13381
+ default:
13382
+ return "solid";
13383
+ }
13384
+ }
13385
+ function getDiagonalBorders(style, styleDiagonals) {
13386
+ const cellHasDown = Boolean(style?.borderDiagDownColor && style?.borderDiagDownWidth);
13387
+ const cellHasUp = Boolean(style?.borderDiagUpColor && style?.borderDiagUpWidth);
13388
+ const styleHasDown = Boolean(styleDiagonals?.diagDownColor && styleDiagonals?.diagDownWidth);
13389
+ const styleHasUp = Boolean(styleDiagonals?.diagUpColor && styleDiagonals?.diagUpWidth);
13390
+ if (!cellHasDown && !cellHasUp && !styleHasDown && !styleHasUp) {
13391
+ return null;
13392
+ }
13393
+ const info = {};
13394
+ if (cellHasDown) {
13395
+ info.diagDownColor = style?.borderDiagDownColor;
13396
+ info.diagDownWidth = style?.borderDiagDownWidth;
13397
+ } else if (styleHasDown) {
13398
+ info.diagDownColor = styleDiagonals?.diagDownColor;
13399
+ info.diagDownWidth = styleDiagonals?.diagDownWidth;
13400
+ }
13401
+ if (cellHasUp) {
13402
+ info.diagUpColor = style?.borderDiagUpColor;
13403
+ info.diagUpWidth = style?.borderDiagUpWidth;
13404
+ } else if (styleHasUp) {
13405
+ info.diagUpColor = styleDiagonals?.diagUpColor;
13406
+ info.diagUpWidth = styleDiagonals?.diagUpWidth;
13407
+ }
13408
+ return info;
13409
+ }
13410
+ function getCellDiagonalBorders(style, tableData, pos, styleCtx) {
13411
+ let styleDiagonals;
13412
+ if (tableData) {
13413
+ const entry = resolveTableStyleEntry(tableData.tableStyleId, styleCtx?.tableStyleMap);
13414
+ styleDiagonals = resolveStyleDiagonalBorders(
13415
+ entry,
13416
+ tableData,
13417
+ pos,
13418
+ (fill) => resolveStyleFillColor(fill, styleCtx?.colorScheme)
13419
+ );
13420
+ }
13421
+ return getDiagonalBorders(style, styleDiagonals);
13422
+ }
13423
+ function computeBoundingRect(cells) {
13424
+ if (cells.length === 0) {
13425
+ return void 0;
13426
+ }
13427
+ let startRow = cells[0].row;
11606
13428
  let startCol = cells[0].col;
11607
13429
  let endRow = cells[0].row;
11608
13430
  let endCol = cells[0].col;
@@ -12581,7 +14403,7 @@ function rotateDelta(dx, dy, rotationDeg) {
12581
14403
  }
12582
14404
  function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
12583
14405
  const scale = zoom || 1;
12584
- const minSize = opts.minSize ?? chunkIPYAN574_js.MIN_ELEMENT_SIZE;
14406
+ const minSize = opts.minSize ?? chunkCLNGAVNH_js.MIN_ELEMENT_SIZE;
12585
14407
  const rotation = rotationOf(box);
12586
14408
  const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
12587
14409
  const dx = local.x;
@@ -12608,7 +14430,7 @@ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
12608
14430
  }
12609
14431
  return { x: newX, y: newY, width: newW, height: newH, rotation };
12610
14432
  }
12611
- function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkIPYAN574_js.MIN_ELEMENT_SIZE) {
14433
+ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkCLNGAVNH_js.MIN_ELEMENT_SIZE) {
12612
14434
  if (handle === null || gridSpacingPx <= 0) {
12613
14435
  return box;
12614
14436
  }
@@ -12638,7 +14460,7 @@ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkIPYAN574_js.MI
12638
14460
  }
12639
14461
  return { x, y, width, height };
12640
14462
  }
12641
- function computeMarqueeHitIds(marquee, elements, minSize = chunkIPYAN574_js.MIN_ELEMENT_SIZE) {
14463
+ function computeMarqueeHitIds(marquee, elements, minSize = chunkCLNGAVNH_js.MIN_ELEMENT_SIZE) {
12642
14464
  const minX = Math.min(marquee.startX, marquee.currentX);
12643
14465
  const minY = Math.min(marquee.startY, marquee.currentY);
12644
14466
  const maxX = Math.max(marquee.startX, marquee.currentX);
@@ -13315,6 +15137,7 @@ function generateTicks(slideLengthPx, scale, unit) {
13315
15137
  }
13316
15138
  return ticks;
13317
15139
  }
15140
+ Array.from({ length: 46 }, (_v, i) => i).filter((i) => i !== 3620 - 3585 && i !== 3622 - 3585).map((i) => String.fromCodePoint(3585 + i));
13318
15141
  function resolvePictureBullet(info, baseFontSize) {
13319
15142
  if (!info.imageDataUrl && !info.imageRelId && !info.imageBlipFillXml) {
13320
15143
  return void 0;
@@ -14154,8 +15977,8 @@ function hexToRgb6(hex) {
14154
15977
  };
14155
15978
  }
14156
15979
  function rgbToHex5(r, g, b) {
14157
- const clamp7 = (v) => Math.max(0, Math.min(255, Math.round(v)));
14158
- return `#${clamp7(r).toString(16).padStart(2, "0").toUpperCase()}${clamp7(g).toString(16).padStart(2, "0").toUpperCase()}${clamp7(b).toString(16).padStart(2, "0").toUpperCase()}`;
15980
+ const clamp8 = (v) => Math.max(0, Math.min(255, Math.round(v)));
15981
+ return `#${clamp8(r).toString(16).padStart(2, "0").toUpperCase()}${clamp8(g).toString(16).padStart(2, "0").toUpperCase()}${clamp8(b).toString(16).padStart(2, "0").toUpperCase()}`;
14159
15982
  }
14160
15983
  function tintColor2(hex, tintFactor) {
14161
15984
  const { r, g, b } = hexToRgb6(hex);
@@ -14193,7 +16016,7 @@ var THEME_COLOR_LABELS = {
14193
16016
  };
14194
16017
  function buildThemeColorGrid(colorScheme) {
14195
16018
  return THEME_COLOR_TINT_ROWS.map(
14196
- (row) => chunkIPYAN574_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
16019
+ (row) => chunkCLNGAVNH_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
14197
16020
  hex: row.transform(colorScheme[key]),
14198
16021
  schemeKey: key,
14199
16022
  rowLabel: row.label,
@@ -14529,12 +16352,12 @@ function getShapeConnectionSites(shape) {
14529
16352
  }
14530
16353
  const pathW = geo.pathWidth && geo.pathWidth > 0 ? geo.pathWidth : shape.width;
14531
16354
  const pathH = geo.pathHeight && geo.pathHeight > 0 ? geo.pathHeight : shape.height;
14532
- const vars = chunkIPYAN574_js.createBuiltinVariables({ w: pathW, h: pathH });
16355
+ const vars = chunkCLNGAVNH_js.createBuiltinVariables({ w: pathW, h: pathH });
14533
16356
  const scaleX = pathW > 0 ? shape.width / pathW : 1;
14534
16357
  const scaleY = pathH > 0 ? shape.height / pathH : 1;
14535
16358
  return cxn.map((site, index) => ({
14536
- x: chunkIPYAN574_js.resolveCoordinate(site.posX, vars) * scaleX,
14537
- y: chunkIPYAN574_js.resolveCoordinate(site.posY, vars) * scaleY,
16359
+ x: chunkCLNGAVNH_js.resolveCoordinate(site.posX, vars) * scaleX,
16360
+ y: chunkCLNGAVNH_js.resolveCoordinate(site.posY, vars) * scaleY,
14538
16361
  index
14539
16362
  }));
14540
16363
  }
@@ -14573,7 +16396,7 @@ function rerouteConnectorsForMovedElements(elements, movedElementIds) {
14573
16396
  }
14574
16397
  return rerouted;
14575
16398
  }
14576
- function computeConnectorGeometry(connector, startConn, endConn, elementMap) {
16399
+ function computeConnectorGeometry(connector2, startConn, endConn, elementMap) {
14577
16400
  let sx;
14578
16401
  let sy;
14579
16402
  if (startConn?.shapeId) {
@@ -14587,8 +16410,8 @@ function computeConnectorGeometry(connector, startConn, endConn, elementMap) {
14587
16410
  sx = startShape.x + site.x;
14588
16411
  sy = startShape.y + site.y;
14589
16412
  } else {
14590
- sx = connector.x;
14591
- sy = connector.y;
16413
+ sx = connector2.x;
16414
+ sy = connector2.y;
14592
16415
  }
14593
16416
  let ex;
14594
16417
  let ey;
@@ -14603,13 +16426,13 @@ function computeConnectorGeometry(connector, startConn, endConn, elementMap) {
14603
16426
  ex = endShape.x + site.x;
14604
16427
  ey = endShape.y + site.y;
14605
16428
  } else {
14606
- ex = connector.x + connector.width;
14607
- ey = connector.y + connector.height;
16429
+ ex = connector2.x + connector2.width;
16430
+ ey = connector2.y + connector2.height;
14608
16431
  }
14609
16432
  const flipHorizontal = ex < sx;
14610
16433
  const flipVertical = ey < sy;
14611
16434
  return {
14612
- id: connector.id,
16435
+ id: connector2.id,
14613
16436
  x: Math.min(sx, ex),
14614
16437
  y: Math.min(sy, ey),
14615
16438
  width: Math.abs(ex - sx) || 1,
@@ -14697,7 +16520,7 @@ function svgLineCap(lineCap) {
14697
16520
  }
14698
16521
  function copyFormatFromElement(element) {
14699
16522
  const result = {};
14700
- if (chunkIPYAN574_js.hasShapeProperties(element) && element.shapeStyle) {
16523
+ if (chunkCLNGAVNH_js.hasShapeProperties(element) && element.shapeStyle) {
14701
16524
  const s = element.shapeStyle;
14702
16525
  result.shapeStyle = {
14703
16526
  fillColor: s.fillColor,
@@ -14726,7 +16549,7 @@ function copyFormatFromElement(element) {
14726
16549
  softEdgeRadius: s.softEdgeRadius
14727
16550
  };
14728
16551
  }
14729
- if (chunkIPYAN574_js.hasTextProperties(element) && element.textStyle) {
16552
+ if (chunkCLNGAVNH_js.hasTextProperties(element) && element.textStyle) {
14730
16553
  const t = element.textStyle;
14731
16554
  result.textStyle = {
14732
16555
  fontFamily: t.fontFamily,
@@ -14757,7 +16580,7 @@ function definedEntries(obj) {
14757
16580
  }
14758
16581
  function applyFormatToElement(element, format) {
14759
16582
  let updated = { ...element };
14760
- if (format.shapeStyle && chunkIPYAN574_js.hasShapeProperties(updated)) {
16583
+ if (format.shapeStyle && chunkCLNGAVNH_js.hasShapeProperties(updated)) {
14761
16584
  updated = {
14762
16585
  ...updated,
14763
16586
  shapeStyle: {
@@ -14766,7 +16589,7 @@ function applyFormatToElement(element, format) {
14766
16589
  }
14767
16590
  };
14768
16591
  }
14769
- if (format.textStyle && chunkIPYAN574_js.hasTextProperties(updated)) {
16592
+ if (format.textStyle && chunkCLNGAVNH_js.hasTextProperties(updated)) {
14770
16593
  updated = {
14771
16594
  ...updated,
14772
16595
  textStyle: {
@@ -14781,7 +16604,7 @@ function hasCopyableFormat(element) {
14781
16604
  if (!element) {
14782
16605
  return false;
14783
16606
  }
14784
- return chunkIPYAN574_js.hasShapeProperties(element) || chunkIPYAN574_js.hasTextProperties(element);
16607
+ return chunkCLNGAVNH_js.hasShapeProperties(element) || chunkCLNGAVNH_js.hasTextProperties(element);
14785
16608
  }
14786
16609
  function copySegmentMetadata(from, to) {
14787
16610
  if (from.equationXml !== void 0) {
@@ -14918,7 +16741,7 @@ function getRoundRectRadiusPx(element) {
14918
16741
  return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
14919
16742
  }
14920
16743
  function getShapeAdjustmentHandleDescriptor(element) {
14921
- if (!chunkIPYAN574_js.hasShapeProperties(element)) {
16744
+ if (!chunkCLNGAVNH_js.hasShapeProperties(element)) {
14922
16745
  return null;
14923
16746
  }
14924
16747
  const normalizedShapeType = String(element.shapeType || "").toLowerCase();
@@ -15091,6 +16914,16 @@ var ASSET_REF_KEYS = {
15091
16914
  var REV_ASSET_REF_KEYS = Object.fromEntries(
15092
16915
  Object.entries(ASSET_REF_KEYS).map(([field, ref]) => [ref, field])
15093
16916
  );
16917
+ var ASSET_VERSION_SUFFIX = "__v";
16918
+ function assetVersionKey(fieldName) {
16919
+ return `${fieldName}${ASSET_VERSION_SUFFIX}`;
16920
+ }
16921
+ function isAssetVersionKey(key) {
16922
+ if (!key.endsWith(ASSET_VERSION_SUFFIX)) {
16923
+ return false;
16924
+ }
16925
+ return ASSET_ELEMENT_FIELDS.has(key.slice(0, -ASSET_VERSION_SUFFIX.length));
16926
+ }
15094
16927
  function assetKey(elementId, fieldName) {
15095
16928
  return `${elementId}:${fieldName}`;
15096
16929
  }
@@ -15120,6 +16953,9 @@ function reconcileAssetFields(elementId, rec, ymap, assets) {
15120
16953
  const key = assetKey(elementId, field);
15121
16954
  if (assets.get(key) !== value) {
15122
16955
  assets.set(key, value);
16956
+ const vKey = assetVersionKey(field);
16957
+ const currentVersion = ymap.get(vKey);
16958
+ ymap.set(vKey, (typeof currentVersion === "number" ? currentVersion : 0) + 1);
15123
16959
  }
15124
16960
  if (ymap.get(refKey) !== key) {
15125
16961
  ymap.set(refKey, key);
@@ -15494,6 +17330,7 @@ var COMPLEX_SLIDE_FIELDS = {
15494
17330
  guides: "_gu",
15495
17331
  customerData: "_cu",
15496
17332
  activeXControls: "_ax",
17333
+ legacyVmlElements: "_lvml",
15497
17334
  backgroundPattern: "_bp",
15498
17335
  modernCommentPart: "_mc",
15499
17336
  headerFooterFlags: "_hff",
@@ -15529,7 +17366,7 @@ function readElementFromYMap(ymap, assets) {
15529
17366
  if (isYTextLike(value)) {
15530
17367
  element.textSegments = decodeTextBody(value);
15531
17368
  }
15532
- } else if (isAssetRefKey(key)) ;
17369
+ } else if (isAssetRefKey(key) || isAssetVersionKey(key)) ;
15533
17370
  else if (REV_COMPLEX_ELEMENT[key]) {
15534
17371
  try {
15535
17372
  element[REV_COMPLEX_ELEMENT[key]] = JSON.parse(value);
@@ -15603,6 +17440,9 @@ function observeYDocSlides(ydoc, onChange) {
15603
17440
  arr.observeDeep(onChange);
15604
17441
  return () => arr.unobserveDeep(onChange);
15605
17442
  }
17443
+ function shouldAutoFollowBroadcaster(input) {
17444
+ return input.localRole === "viewer" && input.broadcasterRole === "owner";
17445
+ }
15606
17446
  function isYTextEditable(value) {
15607
17447
  return isYTextLike(value) && typeof value.delete === "function" && typeof value.format === "function";
15608
17448
  }
@@ -15910,7 +17750,7 @@ function createSyncGate(onOpen, graceMs = INITIAL_SYNC_GRACE_MS) {
15910
17750
  var POSITION_THRESHOLD = 2;
15911
17751
  var SIZE_THRESHOLD = 2;
15912
17752
  function getElementText(element) {
15913
- if (!chunkIPYAN574_js.hasTextProperties(element)) {
17753
+ if (!chunkCLNGAVNH_js.hasTextProperties(element)) {
15914
17754
  return "";
15915
17755
  }
15916
17756
  if (element.textSegments && element.textSegments.length > 0) {
@@ -16479,6 +18319,186 @@ var P14_TRANSITION_KEYFRAMES_2 = `
16479
18319
  `;
16480
18320
  var P14_TRANSITION_KEYFRAMES_ALL = `${P14_TRANSITION_KEYFRAMES}
16481
18321
  ${P14_TRANSITION_KEYFRAMES_2}`;
18322
+ function threeDPair(prefix, dir, dur, outgoingOnTop) {
18323
+ return {
18324
+ outgoing: `${prefix}-out-${dir} ${dur} ${EASE} forwards`,
18325
+ incoming: `${prefix}-in-${dir} ${dur} ${EASE} forwards`,
18326
+ outgoingOnTop
18327
+ };
18328
+ }
18329
+ function getCinematicTransitionAnimations(type, durationMs, direction, orient) {
18330
+ const dur = `${durationMs}ms`;
18331
+ switch (type) {
18332
+ case "cube":
18333
+ return threeDPair("pptx-tr-cube", resolveDirection(direction, "left"), dur, false);
18334
+ case "orbit":
18335
+ return threeDPair("pptx-tr-orbit", resolveDirection(direction, "left"), dur, false);
18336
+ case "flip":
18337
+ return threeDPair("pptx-tr-flip", resolveDirection(direction, "left"), dur, true);
18338
+ case "rotate": {
18339
+ const d = resolveDirection(direction, "left");
18340
+ const spin = d === "right" || d === "down" ? "cw" : "ccw";
18341
+ return {
18342
+ outgoing: `pptx-tr-rotate-out-${spin} ${dur} ${EASE} forwards`,
18343
+ incoming: `pptx-tr-rotate-in-${spin} ${dur} ${EASE} forwards`,
18344
+ outgoingOnTop: true
18345
+ };
18346
+ }
18347
+ case "fallOver":
18348
+ return {
18349
+ outgoing: `pptx-tr-fallover-out ${dur} ${EASE} forwards`,
18350
+ incoming: `pptx-tr-fallover-in ${dur} ${EASE} forwards`,
18351
+ outgoingOnTop: false
18352
+ };
18353
+ case "drape":
18354
+ return {
18355
+ outgoing: "none",
18356
+ incoming: `pptx-tr-drape-in ${dur} ${EASE} forwards`,
18357
+ outgoingOnTop: false
18358
+ };
18359
+ case "curtains":
18360
+ return {
18361
+ outgoing: `pptx-tr-curtains-out ${dur} ${EASE} forwards`,
18362
+ incoming: "none",
18363
+ outgoingOnTop: true
18364
+ };
18365
+ case "wind": {
18366
+ const d = resolveDirection(direction, "left");
18367
+ const side = d === "right" ? "right" : "left";
18368
+ return {
18369
+ outgoing: `pptx-tr-wind-out-${side} ${dur} ${EASE} forwards`,
18370
+ incoming: `pptx-tr-fade-in ${dur} ${EASE} forwards`,
18371
+ outgoingOnTop: true
18372
+ };
18373
+ }
18374
+ case "prestige":
18375
+ return {
18376
+ outgoing: `pptx-tr-prestige-out ${dur} ${EASE} forwards`,
18377
+ incoming: `pptx-tr-prestige-in ${dur} ${EASE} forwards`,
18378
+ outgoingOnTop: true
18379
+ };
18380
+ case "fracture":
18381
+ return {
18382
+ outgoing: `pptx-tr-fracture-out ${dur} ${EASE} forwards`,
18383
+ incoming: `pptx-tr-fade-in ${dur} ${EASE} forwards`,
18384
+ outgoingOnTop: true
18385
+ };
18386
+ case "crush":
18387
+ return {
18388
+ outgoing: `pptx-tr-crush-out ${dur} ${EASE} forwards`,
18389
+ incoming: `pptx-tr-crush-in ${dur} ${EASE} forwards`,
18390
+ outgoingOnTop: true
18391
+ };
18392
+ case "peelOff":
18393
+ return {
18394
+ outgoing: `pptx-tr-peeloff-out ${dur} ${EASE} forwards`,
18395
+ incoming: "none",
18396
+ outgoingOnTop: true
18397
+ };
18398
+ case "pageCurlSingle":
18399
+ return {
18400
+ outgoing: `pptx-tr-pagecurl-out ${dur} ${EASE} forwards`,
18401
+ incoming: "none",
18402
+ outgoingOnTop: true
18403
+ };
18404
+ case "pageCurlDouble":
18405
+ return {
18406
+ outgoing: `pptx-tr-pagecurl-out ${dur} ${EASE} forwards`,
18407
+ incoming: `pptx-tr-pagecurl-double-in ${dur} ${EASE} forwards`,
18408
+ outgoingOnTop: true
18409
+ };
18410
+ case "airplane":
18411
+ return {
18412
+ outgoing: `pptx-tr-airplane-out ${dur} ${EASE} forwards`,
18413
+ incoming: `pptx-tr-fade-in ${dur} ${EASE} forwards`,
18414
+ outgoingOnTop: true
18415
+ };
18416
+ case "origami":
18417
+ return {
18418
+ outgoing: `pptx-tr-origami-out ${dur} ${EASE} forwards`,
18419
+ incoming: `pptx-tr-origami-in ${dur} ${EASE} forwards`,
18420
+ outgoingOnTop: true
18421
+ };
18422
+ default:
18423
+ return void 0;
18424
+ }
18425
+ }
18426
+ var CINEMATIC_TRANSITION_KEYFRAMES = `
18427
+ /* \u2500\u2500 Cube (rotate off one edge onto the next face) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18428
+ @keyframes pptx-tr-cube-out-left { from { transform: perspective(1400px) translateX(0) rotateY(0deg); } to { transform: perspective(1400px) translateX(-50%) rotateY(-90deg); opacity: .5; } }
18429
+ @keyframes pptx-tr-cube-in-left { from { transform: perspective(1400px) translateX(50%) rotateY(90deg); opacity: .5; } to { transform: perspective(1400px) translateX(0) rotateY(0deg); opacity: 1; } }
18430
+ @keyframes pptx-tr-cube-out-right { from { transform: perspective(1400px) translateX(0) rotateY(0deg); } to { transform: perspective(1400px) translateX(50%) rotateY(90deg); opacity: .5; } }
18431
+ @keyframes pptx-tr-cube-in-right { from { transform: perspective(1400px) translateX(-50%) rotateY(-90deg); opacity: .5; } to { transform: perspective(1400px) translateX(0) rotateY(0deg); opacity: 1; } }
18432
+ @keyframes pptx-tr-cube-out-up { from { transform: perspective(1400px) translateY(0) rotateX(0deg); } to { transform: perspective(1400px) translateY(-50%) rotateX(90deg); opacity: .5; } }
18433
+ @keyframes pptx-tr-cube-in-up { from { transform: perspective(1400px) translateY(50%) rotateX(-90deg); opacity: .5; } to { transform: perspective(1400px) translateY(0) rotateX(0deg); opacity: 1; } }
18434
+ @keyframes pptx-tr-cube-out-down { from { transform: perspective(1400px) translateY(0) rotateX(0deg); } to { transform: perspective(1400px) translateY(50%) rotateX(-90deg); opacity: .5; } }
18435
+ @keyframes pptx-tr-cube-in-down { from { transform: perspective(1400px) translateY(-50%) rotateX(90deg); opacity: .5; } to { transform: perspective(1400px) translateY(0) rotateX(0deg); opacity: 1; } }
18436
+
18437
+ /* \u2500\u2500 Orbit (swing the faces through depth) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18438
+ @keyframes pptx-tr-orbit-out-left { from { transform: perspective(1600px) translateZ(0) rotateY(0deg); opacity: 1; } to { transform: perspective(1600px) translateZ(-700px) rotateY(-105deg); opacity: 0; } }
18439
+ @keyframes pptx-tr-orbit-in-left { from { transform: perspective(1600px) translateZ(-700px) rotateY(105deg); opacity: 0; } to { transform: perspective(1600px) translateZ(0) rotateY(0deg); opacity: 1; } }
18440
+ @keyframes pptx-tr-orbit-out-right { from { transform: perspective(1600px) translateZ(0) rotateY(0deg); opacity: 1; } to { transform: perspective(1600px) translateZ(-700px) rotateY(105deg); opacity: 0; } }
18441
+ @keyframes pptx-tr-orbit-in-right { from { transform: perspective(1600px) translateZ(-700px) rotateY(-105deg); opacity: 0; } to { transform: perspective(1600px) translateZ(0) rotateY(0deg); opacity: 1; } }
18442
+ @keyframes pptx-tr-orbit-out-up { from { transform: perspective(1600px) translateZ(0) rotateX(0deg); opacity: 1; } to { transform: perspective(1600px) translateZ(-700px) rotateX(105deg); opacity: 0; } }
18443
+ @keyframes pptx-tr-orbit-in-up { from { transform: perspective(1600px) translateZ(-700px) rotateX(-105deg); opacity: 0; } to { transform: perspective(1600px) translateZ(0) rotateX(0deg); opacity: 1; } }
18444
+ @keyframes pptx-tr-orbit-out-down { from { transform: perspective(1600px) translateZ(0) rotateX(0deg); opacity: 1; } to { transform: perspective(1600px) translateZ(-700px) rotateX(-105deg); opacity: 0; } }
18445
+ @keyframes pptx-tr-orbit-in-down { from { transform: perspective(1600px) translateZ(-700px) rotateX(105deg); opacity: 0; } to { transform: perspective(1600px) translateZ(0) rotateX(0deg); opacity: 1; } }
18446
+
18447
+ /* \u2500\u2500 Flip (card flip; opacity hides the back face) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18448
+ @keyframes pptx-tr-flip-out-left { from { transform: perspective(1400px) rotateY(0deg); opacity: 1; } to { transform: perspective(1400px) rotateY(90deg); opacity: 0; } }
18449
+ @keyframes pptx-tr-flip-in-left { from { transform: perspective(1400px) rotateY(-90deg); opacity: 0; } to { transform: perspective(1400px) rotateY(0deg); opacity: 1; } }
18450
+ @keyframes pptx-tr-flip-out-right { from { transform: perspective(1400px) rotateY(0deg); opacity: 1; } to { transform: perspective(1400px) rotateY(-90deg); opacity: 0; } }
18451
+ @keyframes pptx-tr-flip-in-right { from { transform: perspective(1400px) rotateY(90deg); opacity: 0; } to { transform: perspective(1400px) rotateY(0deg); opacity: 1; } }
18452
+ @keyframes pptx-tr-flip-out-up { from { transform: perspective(1400px) rotateX(0deg); opacity: 1; } to { transform: perspective(1400px) rotateX(-90deg); opacity: 0; } }
18453
+ @keyframes pptx-tr-flip-in-up { from { transform: perspective(1400px) rotateX(90deg); opacity: 0; } to { transform: perspective(1400px) rotateX(0deg); opacity: 1; } }
18454
+ @keyframes pptx-tr-flip-out-down { from { transform: perspective(1400px) rotateX(0deg); opacity: 1; } to { transform: perspective(1400px) rotateX(90deg); opacity: 0; } }
18455
+ @keyframes pptx-tr-flip-in-down { from { transform: perspective(1400px) rotateX(-90deg); opacity: 0; } to { transform: perspective(1400px) rotateX(0deg); opacity: 1; } }
18456
+
18457
+ /* \u2500\u2500 Rotate (in-plane spin + zoom) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18458
+ @keyframes pptx-tr-rotate-out-cw { from { transform: rotate(0deg) scale(1); opacity: 1; } to { transform: rotate(90deg) scale(.4); opacity: 0; } }
18459
+ @keyframes pptx-tr-rotate-in-cw { from { transform: rotate(-90deg) scale(.4); opacity: 0; } to { transform: rotate(0deg) scale(1); opacity: 1; } }
18460
+ @keyframes pptx-tr-rotate-out-ccw { from { transform: rotate(0deg) scale(1); opacity: 1; } to { transform: rotate(-90deg) scale(.4); opacity: 0; } }
18461
+ @keyframes pptx-tr-rotate-in-ccw { from { transform: rotate(90deg) scale(.4); opacity: 0; } to { transform: rotate(0deg) scale(1); opacity: 1; } }
18462
+
18463
+ /* \u2500\u2500 Fall Over (incoming board topples down over outgoing) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18464
+ @keyframes pptx-tr-fallover-out { from { transform: translateZ(0); opacity: 1; } to { transform: perspective(1400px) rotateX(5deg) scale(.94); opacity: .25; } }
18465
+ @keyframes pptx-tr-fallover-in { 0% { transform: perspective(1400px) rotateX(-100deg); transform-origin: top center; opacity: .4; } 70% { transform: perspective(1400px) rotateX(8deg); transform-origin: top center; opacity: 1; } 100% { transform: perspective(1400px) rotateX(0deg); transform-origin: top center; opacity: 1; } }
18466
+
18467
+ /* \u2500\u2500 Drape (fabric draping down into place) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18468
+ @keyframes pptx-tr-drape-in { from { transform: perspective(1600px) rotateX(-55deg) scale(1.15); transform-origin: top center; opacity: 0; } to { transform: perspective(1600px) rotateX(0deg) scale(1); transform-origin: top center; opacity: 1; } }
18469
+
18470
+ /* \u2500\u2500 Curtains (outgoing lifts to reveal incoming) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18471
+ @keyframes pptx-tr-curtains-out { from { transform: scaleY(1); transform-origin: top center; opacity: 1; } to { transform: scaleY(0); transform-origin: top center; opacity: .3; } }
18472
+
18473
+ /* \u2500\u2500 Wind (outgoing blows away with skew + blur) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18474
+ @keyframes pptx-tr-wind-out-left { from { transform: translateX(0) skewX(0deg); opacity: 1; filter: blur(0); } to { transform: translateX(-120%) skewX(25deg); opacity: 0; filter: blur(6px); } }
18475
+ @keyframes pptx-tr-wind-out-right { from { transform: translateX(0) skewX(0deg); opacity: 1; filter: blur(0); } to { transform: translateX(120%) skewX(-25deg); opacity: 0; filter: blur(6px); } }
18476
+
18477
+ /* \u2500\u2500 Prestige (magic vanish then reappear) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18478
+ @keyframes pptx-tr-prestige-out { from { transform: scale(1) rotate(0deg); opacity: 1; filter: blur(0); } to { transform: scale(1.4) rotate(6deg); opacity: 0; filter: blur(8px); } }
18479
+ @keyframes pptx-tr-prestige-in { from { transform: scale(.6) rotate(-6deg); opacity: 0; filter: blur(8px); } to { transform: scale(1) rotate(0deg); opacity: 1; filter: blur(0); } }
18480
+
18481
+ /* \u2500\u2500 Fracture (shatter into contrast + blur) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18482
+ @keyframes pptx-tr-fracture-out { 0% { transform: scale(1); opacity: 1; filter: contrast(1) blur(0); } 55% { transform: scale(1.04) rotate(1deg); opacity: 1; filter: contrast(1.7) brightness(1.15); } 100% { transform: scale(1.15) rotate(-2deg); opacity: 0; filter: contrast(2.2) blur(4px); } }
18483
+
18484
+ /* \u2500\u2500 Crush (squash flat, then new slide expands) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18485
+ @keyframes pptx-tr-crush-out { from { transform: scaleY(1); transform-origin: bottom; opacity: 1; } to { transform: scaleY(0); transform-origin: bottom; opacity: .2; } }
18486
+ @keyframes pptx-tr-crush-in { from { transform: scaleY(0); transform-origin: bottom; opacity: .2; } to { transform: scaleY(1); transform-origin: bottom; opacity: 1; } }
18487
+
18488
+ /* \u2500\u2500 Peel Off (peel away from a corner) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18489
+ @keyframes pptx-tr-peeloff-out { from { transform: perspective(1400px) rotate3d(1, 1, 0, 0deg); transform-origin: top right; opacity: 1; } to { transform: perspective(1400px) rotate3d(1, 1, 0, 110deg); transform-origin: top right; opacity: .15; } }
18490
+
18491
+ /* \u2500\u2500 Page Curl (curl off the right edge; double curls new in) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18492
+ @keyframes pptx-tr-pagecurl-out { from { transform: perspective(1600px) rotateY(0deg); transform-origin: right center; opacity: 1; } to { transform: perspective(1600px) rotateY(-155deg); transform-origin: right center; opacity: .25; } }
18493
+ @keyframes pptx-tr-pagecurl-double-in { from { transform: perspective(1600px) rotateY(155deg); transform-origin: left center; opacity: .25; } to { transform: perspective(1600px) rotateY(0deg); transform-origin: left center; opacity: 1; } }
18494
+
18495
+ /* \u2500\u2500 Airplane (fly off like a paper plane) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18496
+ @keyframes pptx-tr-airplane-out { 0% { transform: perspective(1200px) translate3d(0, 0, 0) rotate3d(1, -1, 0, 0deg) scale(1); opacity: 1; } 40% { transform: perspective(1200px) translate3d(10%, -10%, 0) rotate3d(1, -1, 0, 25deg) scale(.85); opacity: 1; } 100% { transform: perspective(1200px) translate3d(150%, -70%, 0) rotate3d(1, -1, 1, 70deg) scale(.05); opacity: 0; } }
18497
+
18498
+ /* \u2500\u2500 Origami (fold out / unfold in) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
18499
+ @keyframes pptx-tr-origami-out { from { transform: perspective(1600px) rotateY(0deg) scaleX(1); transform-origin: left center; opacity: 1; } to { transform: perspective(1600px) rotateY(75deg) scaleX(.25); transform-origin: left center; opacity: .2; } }
18500
+ @keyframes pptx-tr-origami-in { from { transform: perspective(1600px) rotateY(-75deg) scaleX(.25); transform-origin: right center; opacity: .2; } to { transform: perspective(1600px) rotateY(0deg) scaleX(1); transform-origin: right center; opacity: 1; } }
18501
+ `;
16482
18502
  var CORE_SLIDE_TRANSITION_KEYFRAMES = `
16483
18503
  /* \u2500\u2500 Fade \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
16484
18504
  @keyframes pptx-tr-fade-in {
@@ -16743,7 +18763,8 @@ var CORE_SLIDE_TRANSITION_KEYFRAMES = `
16743
18763
  }
16744
18764
  `;
16745
18765
  var SLIDE_TRANSITION_KEYFRAMES = `${CORE_SLIDE_TRANSITION_KEYFRAMES}
16746
- ${P14_TRANSITION_KEYFRAMES_ALL}`;
18766
+ ${P14_TRANSITION_KEYFRAMES_ALL}
18767
+ ${CINEMATIC_TRANSITION_KEYFRAMES}`;
16747
18768
  function resolveLR(direction) {
16748
18769
  if (direction === "l" || direction === "r") {
16749
18770
  return direction;
@@ -16979,6 +19000,10 @@ function getSlideTransitionAnimations(type, durationMs, direction, orient, spoke
16979
19000
  if (p14) {
16980
19001
  return p14;
16981
19002
  }
19003
+ const cinematic = getCinematicTransitionAnimations(type, durationMs, direction);
19004
+ if (cinematic) {
19005
+ return cinematic;
19006
+ }
16982
19007
  switch (type) {
16983
19008
  case "none":
16984
19009
  case "cut":
@@ -17184,9 +19209,9 @@ function getSlideTransitionAnimations(type, durationMs, direction, orient, spoke
17184
19209
  // flythrough/gallery/glitter/honeycomb/pan/prism/reveal/ripple/shred/
17185
19210
  // switch/vortex/warp/wheelReverse/window) is handled faithfully above via
17186
19211
  // `getP14TransitionAnimations` and never reaches this switch.
17187
- // Fallback (unknown / not-yet-mapped type, e.g. the p15 cinematic set:
17188
- // cube/flip/rotate/orbit/fracture/peelOff/pageCurl*/airplane/origami)
17189
- // symmetrical cross-fade.
19212
+ // Fallback (genuinely unknown / not-yet-mapped type). The p14 exotic set
19213
+ // and the p15 cinematic set are handled above and never reach here.
19214
+ // Symmetrical cross-fade.
17190
19215
  default:
17191
19216
  return {
17192
19217
  outgoing: `pptx-tr-fade-out ${dur} ${EASE} forwards`,
@@ -17292,14 +19317,14 @@ function treeDepth(t) {
17292
19317
  }
17293
19318
  function flattenNodes(roots) {
17294
19319
  const out = [];
17295
- const walk = (n) => {
19320
+ const walk2 = (n) => {
17296
19321
  out.push(n);
17297
19322
  for (const c of n.children ?? []) {
17298
- walk(c);
19323
+ walk2(c);
17299
19324
  }
17300
19325
  };
17301
19326
  for (const r of roots) {
17302
- walk(r);
19327
+ walk2(r);
17303
19328
  }
17304
19329
  return out;
17305
19330
  }
@@ -17763,154 +19788,1078 @@ function computePyramidLayout(nodes, box, palette, style, elementId) {
17763
19788
  return {
17764
19789
  nodes: renderedNodes,
17765
19790
  connectors: [],
17766
- shadowFilter: styleShadow(style),
17767
- viewBox: `0 0 ${w} ${h}`,
17768
- family: "pyramid"
19791
+ shadowFilter: styleShadow(style),
19792
+ viewBox: `0 0 ${w} ${h}`,
19793
+ family: "pyramid"
19794
+ };
19795
+ }
19796
+ function computeVennLayout(nodes, box, palette, style, elementId) {
19797
+ const { width: w, height: h } = box;
19798
+ const shadow = styleShadow(style);
19799
+ if (nodes.length <= 4) {
19800
+ const cx = w / 2;
19801
+ const cy2 = h / 2;
19802
+ const r2 = Math.min(w, h) * 0.28;
19803
+ const spread = r2 * 0.55;
19804
+ const renderedNodes2 = nodes.map((node, i) => {
19805
+ const angle = i / Math.max(1, nodes.length) * Math.PI * 2 - Math.PI / 2;
19806
+ const nx = cx + spread * Math.cos(angle);
19807
+ const ny = cy2 + spread * Math.sin(angle);
19808
+ const fontSize = fitFontSize(node.text, r2 * 1.2, r2 * 2, 11);
19809
+ const result = {
19810
+ kind: "circle",
19811
+ key: `${elementId}-venn-${node.id}-${i}`,
19812
+ cx: nx,
19813
+ cy: ny,
19814
+ r: r2,
19815
+ fill: nodeFill(node, i, palette),
19816
+ stroke: "none",
19817
+ strokeWidth: 0,
19818
+ opacity: 0.35,
19819
+ text: truncate(node.text, 20),
19820
+ fontSize
19821
+ };
19822
+ return result;
19823
+ });
19824
+ return {
19825
+ nodes: renderedNodes2,
19826
+ connectors: [],
19827
+ shadowFilter: shadow,
19828
+ viewBox: `0 0 ${w} ${h}`,
19829
+ family: "venn"
19830
+ };
19831
+ }
19832
+ const r = Math.min(h * 0.38, w / (nodes.length * 0.9));
19833
+ const overlap = r * 0.5;
19834
+ const totalW = nodes.length * (r * 2 - overlap) + overlap;
19835
+ const offsetX = (w - totalW) / 2 + r;
19836
+ const cy = h / 2;
19837
+ const renderedNodes = nodes.map((node, i) => {
19838
+ const nx = offsetX + i * (r * 2 - overlap);
19839
+ const fontSize = fitFontSize(node.text, r * 1.2, r * 2, 10);
19840
+ const result = {
19841
+ kind: "circle",
19842
+ key: `${elementId}-venn-${node.id}-${i}`,
19843
+ cx: nx,
19844
+ cy,
19845
+ r,
19846
+ fill: nodeFill(node, i, palette),
19847
+ stroke: "none",
19848
+ strokeWidth: 0,
19849
+ opacity: 0.35,
19850
+ text: truncate(node.text, 20),
19851
+ fontSize
19852
+ };
19853
+ return result;
19854
+ });
19855
+ return {
19856
+ nodes: renderedNodes,
19857
+ connectors: [],
19858
+ shadowFilter: shadow,
19859
+ viewBox: `0 0 ${w} ${h}`,
19860
+ family: "venn"
19861
+ };
19862
+ }
19863
+ function computeFunnelLayout(nodes, box, palette, style, elementId) {
19864
+ const { width: w, height: h } = box;
19865
+ const pad = 8;
19866
+ const usableW = w - pad * 2;
19867
+ const stageH = nodes.length > 0 ? (h - pad * 2) / nodes.length : h - pad * 2;
19868
+ const sw = styleStroke(style);
19869
+ const stroke = strokeFor(sw);
19870
+ const renderedNodes = nodes.map((node, i) => {
19871
+ const topWidth = usableW * (1 - i / Math.max(1, nodes.length));
19872
+ const bottomWidth = usableW * (1 - (i + 1) / Math.max(1, nodes.length));
19873
+ const y = pad + i * stageH;
19874
+ const topLeft = (w - topWidth) / 2;
19875
+ const topRight = topLeft + topWidth;
19876
+ const bottomLeft = (w - bottomWidth) / 2;
19877
+ const bottomRight = bottomLeft + bottomWidth;
19878
+ const points = [
19879
+ `${topLeft},${y}`,
19880
+ `${topRight},${y}`,
19881
+ `${bottomRight},${y + stageH}`,
19882
+ `${bottomLeft},${y + stageH}`
19883
+ ].join(" ");
19884
+ const fontSize = fitFontSize(node.text, topWidth * 0.85, stageH, 11);
19885
+ const result = {
19886
+ kind: "polygon",
19887
+ key: `${elementId}-funnel-${node.id}-${i}`,
19888
+ points,
19889
+ fill: nodeFill(node, i, palette),
19890
+ stroke: nodeStroke(node, stroke),
19891
+ strokeWidth: sw,
19892
+ opacity: nodeOpacity(i, nodes.length, style),
19893
+ text: truncate(node.text, 30),
19894
+ fontSize,
19895
+ textX: w / 2,
19896
+ textY: y + stageH / 2
19897
+ };
19898
+ return result;
19899
+ });
19900
+ return {
19901
+ nodes: renderedNodes,
19902
+ connectors: [],
19903
+ shadowFilter: styleShadow(style),
19904
+ viewBox: `0 0 ${w} ${h}`,
19905
+ family: "funnel"
19906
+ };
19907
+ }
19908
+ function computeTargetLayout(nodes, box, palette, style, elementId) {
19909
+ const { width: w, height: h } = box;
19910
+ const cx = w * 0.4;
19911
+ const cy = h / 2;
19912
+ const maxR = Math.min(cx - 8, cy - 8);
19913
+ const shadow = styleShadow(style);
19914
+ const renderedNodes = nodes.map((node, i) => {
19915
+ const r = maxR * ((nodes.length - i) / Math.max(1, nodes.length));
19916
+ const result = {
19917
+ kind: "circle",
19918
+ key: `${elementId}-target-${node.id}-${i}`,
19919
+ cx,
19920
+ cy,
19921
+ r: Math.max(r, 4),
19922
+ fill: nodeFill(node, i, palette),
19923
+ stroke: "none",
19924
+ strokeWidth: 0,
19925
+ opacity: nodeOpacity(i, nodes.length, style),
19926
+ text: truncate(node.text, 30),
19927
+ fontSize: Math.max(7, Math.min(10, maxR / Math.max(1, nodes.length + 1)))
19928
+ };
19929
+ return result;
19930
+ });
19931
+ return {
19932
+ nodes: renderedNodes,
19933
+ connectors: [],
19934
+ shadowFilter: shadow,
19935
+ viewBox: `0 0 ${w} ${h}`,
19936
+ family: "target"
19937
+ };
19938
+ }
19939
+ var localName = (key) => key.split(":").pop() ?? key;
19940
+ var NODE_POINT_TYPES = /* @__PURE__ */ new Set(["node", "norm", "nonNorm", "asst", "nonAsst", "doc", "all"]);
19941
+ var CHOOSE_ALG_TYPES = /* @__PURE__ */ new Set(["lin", "cycle", "pyra", "snake"]);
19942
+ function firstNumber(values) {
19943
+ const value = values?.[0];
19944
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
19945
+ }
19946
+ function drivingIterator(node) {
19947
+ const list = node.forEach;
19948
+ if (!list || list.length === 0) {
19949
+ return void 0;
19950
+ }
19951
+ const nodeIter = list.find((each) => each.pointTypes?.some((type) => NODE_POINT_TYPES.has(type)));
19952
+ if (nodeIter) {
19953
+ return nodeIter;
19954
+ }
19955
+ const axisIter = list.find(
19956
+ (each) => each.axis?.some((axis) => axis === "ch" || axis === "des" || axis === "self")
19957
+ );
19958
+ return axisIter ?? list[0];
19959
+ }
19960
+ function selectArrangedNodes(node, flat) {
19961
+ const iter = drivingIterator(node);
19962
+ if (!iter) {
19963
+ return flat;
19964
+ }
19965
+ const start = firstNumber(iter.start);
19966
+ const st0 = start !== void 0 ? Math.max(0, start - 1) : 0;
19967
+ const stepRaw = firstNumber(iter.step);
19968
+ const step = stepRaw !== void 0 && stepRaw > 0 ? stepRaw : 1;
19969
+ const cnt = firstNumber(iter.count) ?? 0;
19970
+ const selected = [];
19971
+ for (let i = st0; i < flat.length; i += step) {
19972
+ selected.push(flat[i]);
19973
+ if (cnt > 0 && selected.length >= cnt) {
19974
+ break;
19975
+ }
19976
+ }
19977
+ if (iter.hideLastTransition?.[0] === true && selected.length > 0) {
19978
+ selected.pop();
19979
+ }
19980
+ return selected;
19981
+ }
19982
+ function toNumber(value) {
19983
+ const parsed = Number(value);
19984
+ return Number.isFinite(parsed) ? parsed : void 0;
19985
+ }
19986
+ function evaluateWhen(when, nodeCount) {
19987
+ if (when.function !== "cnt") {
19988
+ return void 0;
19989
+ }
19990
+ const threshold = toNumber(when.value);
19991
+ if (threshold === void 0) {
19992
+ return void 0;
19993
+ }
19994
+ switch (when.operator) {
19995
+ case "equ":
19996
+ return nodeCount === threshold;
19997
+ case "neq":
19998
+ return nodeCount !== threshold;
19999
+ case "gt":
20000
+ return nodeCount > threshold;
20001
+ case "lt":
20002
+ return nodeCount < threshold;
20003
+ case "gte":
20004
+ return nodeCount >= threshold;
20005
+ case "lte":
20006
+ return nodeCount <= threshold;
20007
+ default:
20008
+ return void 0;
20009
+ }
20010
+ }
20011
+ function activeBranch(choose, nodeCount) {
20012
+ for (const when of choose.when) {
20013
+ const result = evaluateWhen(when, nodeCount);
20014
+ if (result === void 0) {
20015
+ return void 0;
20016
+ }
20017
+ if (result) {
20018
+ return when.rawXml;
20019
+ }
20020
+ }
20021
+ return choose.otherwise?.rawXml ?? void 0;
20022
+ }
20023
+ function branchAlgType(raw) {
20024
+ if (!raw) {
20025
+ return void 0;
20026
+ }
20027
+ let found;
20028
+ const visit = (value) => {
20029
+ if (found !== void 0 || !value || typeof value !== "object") {
20030
+ return;
20031
+ }
20032
+ if (Array.isArray(value)) {
20033
+ value.forEach(visit);
20034
+ return;
20035
+ }
20036
+ for (const [key, entry] of Object.entries(value)) {
20037
+ if (found !== void 0) {
20038
+ return;
20039
+ }
20040
+ if (key.startsWith("@_")) {
20041
+ continue;
20042
+ }
20043
+ if (localName(key) === "alg") {
20044
+ for (const candidate of Array.isArray(entry) ? entry : [entry]) {
20045
+ const type = candidate && typeof candidate === "object" ? String(candidate["@_type"] ?? "") : "";
20046
+ if (CHOOSE_ALG_TYPES.has(type)) {
20047
+ found = type;
20048
+ return;
20049
+ }
20050
+ }
20051
+ } else {
20052
+ visit(entry);
20053
+ }
20054
+ }
20055
+ };
20056
+ visit(raw);
20057
+ return found;
20058
+ }
20059
+ function chooseAlgType(node, nodeCount) {
20060
+ if (!node.choose || node.choose.length === 0) {
20061
+ return void 0;
20062
+ }
20063
+ for (const choose of node.choose) {
20064
+ const type = branchAlgType(activeBranch(choose, nodeCount));
20065
+ if (type !== void 0) {
20066
+ return type;
20067
+ }
20068
+ }
20069
+ return void 0;
20070
+ }
20071
+ var PRIMARY_ALG = {
20072
+ lin: "linear",
20073
+ cycle: "cycle",
20074
+ pyra: "pyramid",
20075
+ snake: "snake",
20076
+ composite: "composite",
20077
+ conn: "conn",
20078
+ sp: "spacer",
20079
+ tx: "text"
20080
+ };
20081
+ var STRUCTURAL = /* @__PURE__ */ new Set(["linear", "cycle", "pyramid", "snake"]);
20082
+ var SLOT_CONSTRAINTS = /* @__PURE__ */ new Set(["l", "t", "w", "h", "ctrX", "ctrY"]);
20083
+ function mapsSlots(node) {
20084
+ return (node.children ?? []).some(
20085
+ (child2) => (child2.constraints ?? []).some((constraint) => SLOT_CONSTRAINTS.has(constraint.type))
20086
+ );
20087
+ }
20088
+ function isMeaningfulAux(node) {
20089
+ return (node.constraints?.length ?? 0) > 0 || (node.children?.length ?? 0) > 0;
20090
+ }
20091
+ function walk(node, visit) {
20092
+ visit(node);
20093
+ for (const child2 of node.children ?? []) {
20094
+ walk(child2, visit);
20095
+ }
20096
+ }
20097
+ function discoverArrangement(definition, nodeCount) {
20098
+ let hierarchy;
20099
+ let chosen;
20100
+ let compositeSlot;
20101
+ let structural;
20102
+ let aux;
20103
+ walk(definition.rootNode, (node) => {
20104
+ if (!chosen && nodeCount !== void 0 && node.choose && node.choose.length > 0) {
20105
+ const type2 = chooseAlgType(node, nodeCount);
20106
+ const kind2 = type2 ? PRIMARY_ALG[type2] : void 0;
20107
+ if (kind2 && STRUCTURAL.has(kind2)) {
20108
+ const arranger = node.children?.find((child2) => child2.algorithm?.type === type2) ?? node;
20109
+ chosen = { kind: kind2, node: arranger };
20110
+ }
20111
+ }
20112
+ const type = node.algorithm?.type;
20113
+ if (!type) {
20114
+ return;
20115
+ }
20116
+ if (type === "hierRoot" || type === "hierChild") {
20117
+ hierarchy ??= node;
20118
+ return;
20119
+ }
20120
+ const kind = PRIMARY_ALG[type];
20121
+ if (!kind) {
20122
+ return;
20123
+ }
20124
+ if (kind === "composite") {
20125
+ if (!compositeSlot && mapsSlots(node)) {
20126
+ compositeSlot = node;
20127
+ }
20128
+ return;
20129
+ }
20130
+ if (STRUCTURAL.has(kind)) {
20131
+ structural ??= { kind, node };
20132
+ return;
20133
+ }
20134
+ if (!aux && isMeaningfulAux(node)) {
20135
+ aux = { kind, node };
20136
+ }
20137
+ });
20138
+ if (hierarchy) {
20139
+ return { kind: "hierarchy", node: hierarchy };
20140
+ }
20141
+ if (chosen) {
20142
+ return chosen;
20143
+ }
20144
+ if (compositeSlot) {
20145
+ return { kind: "composite", node: compositeSlot };
20146
+ }
20147
+ return structural ?? aux;
20148
+ }
20149
+ function itemNode(arranger) {
20150
+ return arranger.children?.[0];
20151
+ }
20152
+ function findConstraint(constraints, type, forRel) {
20153
+ return constraints?.find(
20154
+ (constraint) => constraint.type === type && (forRel === void 0)
20155
+ );
20156
+ }
20157
+ function constraintRatio(constraint) {
20158
+ if (typeof constraint.factor === "number" && Number.isFinite(constraint.factor)) {
20159
+ return Math.max(0, constraint.factor);
20160
+ }
20161
+ if (typeof constraint.value === "number" && Number.isFinite(constraint.value) && constraint.value >= 0 && constraint.value < 1) {
20162
+ return constraint.value;
20163
+ }
20164
+ return void 0;
20165
+ }
20166
+ function clampByRules(value, rules, type) {
20167
+ return value;
20168
+ }
20169
+ function ratioConstraint(constraints, types, fallback, rules) {
20170
+ for (const type of types) {
20171
+ const matches = (constraints ?? []).filter((constraint) => constraint.type === type);
20172
+ const ordered2 = [
20173
+ ...matches.filter((constraint) => constraint.for === "ch"),
20174
+ ...matches.filter((constraint) => constraint.for !== "ch")
20175
+ ];
20176
+ for (const constraint of ordered2) {
20177
+ const ratio = constraintRatio(constraint);
20178
+ if (ratio !== void 0) {
20179
+ return clampByRules(ratio);
20180
+ }
20181
+ }
20182
+ }
20183
+ return fallback;
20184
+ }
20185
+ function algorithmParam(node, type) {
20186
+ return node.algorithm?.parameters?.find((param) => param.type === type)?.value;
20187
+ }
20188
+ function numericParam(node, type, fallback) {
20189
+ const raw = algorithmParam(node, type);
20190
+ if (raw === void 0) {
20191
+ return fallback;
20192
+ }
20193
+ const parsed = Number(raw);
20194
+ return Number.isFinite(parsed) ? parsed : fallback;
20195
+ }
20196
+ function resolveFlowDirection(arranger, presLayoutVars) {
20197
+ const linDir = algorithmParam(arranger, "linDir");
20198
+ const vertical = linDir === "fromT" || linDir === "fromB";
20199
+ let reverse = linDir === "fromR" || linDir === "fromB";
20200
+ if (presLayoutVars?.direction === "rev") {
20201
+ reverse = !reverse;
20202
+ }
20203
+ return { orientation: vertical ? "vertical" : "horizontal", reverse };
20204
+ }
20205
+ function styleContext(style) {
20206
+ const strokeWidth = styleStroke(style);
20207
+ return { strokeWidth, stroke: strokeFor(strokeWidth), shadow: styleShadow(style) };
20208
+ }
20209
+ function rectNode(params) {
20210
+ const { x, y, width, height, node, index, total, palette, style, ctx } = params;
20211
+ return {
20212
+ kind: "rect",
20213
+ key: params.key,
20214
+ x,
20215
+ y,
20216
+ width,
20217
+ height,
20218
+ rx: Math.min(6, height * 0.15),
20219
+ fill: nodeFill(node, index, palette),
20220
+ stroke: nodeStroke(node, ctx.stroke),
20221
+ strokeWidth: ctx.strokeWidth,
20222
+ opacity: nodeOpacity(index, total, style),
20223
+ text: truncate(node.text, 40),
20224
+ fontSize: fitFontSize(node.text, width * 0.9, height, 12),
20225
+ textX: x + width / 2,
20226
+ textY: y + height / 2
20227
+ };
20228
+ }
20229
+ function circleNode(params) {
20230
+ const { cx, cy, r, node, index, total, palette, style, ctx } = params;
20231
+ return {
20232
+ kind: "circle",
20233
+ key: params.key,
20234
+ cx,
20235
+ cy,
20236
+ r,
20237
+ fill: nodeFill(node, index, palette),
20238
+ stroke: nodeStroke(node, ctx.stroke),
20239
+ strokeWidth: ctx.strokeWidth,
20240
+ opacity: nodeOpacity(index, total, style),
20241
+ text: truncate(node.text, 20),
20242
+ fontSize: fitFontSize(node.text, r * 1.4, r * 2, 11)
20243
+ };
20244
+ }
20245
+ function polygonNode(params) {
20246
+ const { points, textX, textY, node, index, total, palette, style, ctx } = params;
20247
+ return {
20248
+ kind: "polygon",
20249
+ key: params.key,
20250
+ points,
20251
+ fill: nodeFill(node, index, palette),
20252
+ stroke: nodeStroke(node, ctx.stroke),
20253
+ strokeWidth: ctx.strokeWidth,
20254
+ opacity: nodeOpacity(index, total, style),
20255
+ text: truncate(node.text, 25),
20256
+ fontSize: fitFontSize(node.text, params.fontWidth, params.fontHeight, 12),
20257
+ textX,
20258
+ textY
20259
+ };
20260
+ }
20261
+ var INSET = 6;
20262
+ function itemAspect(plan) {
20263
+ const item = itemNode(plan.node);
20264
+ const constraints = item?.constraints;
20265
+ const height = findConstraint(constraints, "h");
20266
+ if (height?.referenceType === "w" && typeof height.factor === "number" && height.factor > 0) {
20267
+ return height.factor;
20268
+ }
20269
+ const width = findConstraint(constraints, "w");
20270
+ if (typeof height?.value === "number" && typeof width?.value === "number" && width.value > 0 && height.value > 0) {
20271
+ return height.value / width.value;
20272
+ }
20273
+ return void 0;
20274
+ }
20275
+ function ordered(nodes, flow) {
20276
+ return flow.reverse ? [...nodes].reverse() : nodes;
20277
+ }
20278
+ function arrangeLinear(plan, flow, nodes, box, palette, style, elementId) {
20279
+ const { width: w, height: h } = box;
20280
+ const ctx = styleContext(style);
20281
+ const constraints = plan.node.constraints;
20282
+ const sib = ratioConstraint(constraints, ["sibSp", "sp"], 0.25);
20283
+ const begPad = ratioConstraint(constraints, ["begPad"], 0);
20284
+ const endPad = ratioConstraint(constraints, ["endPad"], 0);
20285
+ const aspect = itemAspect(plan);
20286
+ const flow2 = ordered(nodes, flow);
20287
+ const n = flow2.length;
20288
+ const horizontal = flow.orientation === "horizontal";
20289
+ const usableMain = (horizontal ? w : h) - INSET * 2;
20290
+ const usableCross = (horizontal ? h : w) - INSET * 2;
20291
+ const denom = begPad + endPad + n + Math.max(0, n - 1) * sib;
20292
+ const mainExtent = n > 0 ? usableMain / denom : usableMain;
20293
+ const gap = sib * mainExtent;
20294
+ const crossDefault = Math.min(usableCross, mainExtent * 0.62);
20295
+ const crossExtent = aspect ? Math.min(usableCross, Math.max(12, mainExtent * aspect)) : crossDefault;
20296
+ const crossPos = INSET + (usableCross - crossExtent) / 2;
20297
+ const start = INSET + begPad * mainExtent;
20298
+ const renderedNodes = flow2.map((node, i) => {
20299
+ const mainPos = start + i * (mainExtent + gap);
20300
+ return rectNode({
20301
+ key: `${elementId}-lin-${node.id}-${i}`,
20302
+ x: horizontal ? mainPos : crossPos,
20303
+ y: horizontal ? crossPos : mainPos,
20304
+ width: horizontal ? mainExtent : crossExtent,
20305
+ height: horizontal ? crossExtent : mainExtent,
20306
+ node,
20307
+ index: i,
20308
+ total: n,
20309
+ palette,
20310
+ style,
20311
+ ctx
20312
+ });
20313
+ });
20314
+ return {
20315
+ nodes: renderedNodes,
20316
+ connectors: [],
20317
+ shadowFilter: ctx.shadow,
20318
+ viewBox: `0 0 ${w} ${h}`,
20319
+ family: "list"
20320
+ };
20321
+ }
20322
+ function arrangeSnake(plan, nodes, box, palette, style, elementId) {
20323
+ const { width: w, height: h } = box;
20324
+ const ctx = styleContext(style);
20325
+ const n = nodes.length;
20326
+ const sib = ratioConstraint(plan.node.constraints, ["sibSp", "sp"], 0.15);
20327
+ const cols = Math.max(1, Math.round(Math.sqrt(n * Math.max(0.2, w / Math.max(1, h)))));
20328
+ const rows = Math.max(1, Math.ceil(n / cols));
20329
+ const usableW = w - INSET * 2;
20330
+ const usableH = h - INSET * 2;
20331
+ const cellW = usableW / (cols + Math.max(0, cols - 1) * sib);
20332
+ const cellH = usableH / (rows + Math.max(0, rows - 1) * sib);
20333
+ const gapX = sib * cellW;
20334
+ const gapY = sib * cellH;
20335
+ const renderedNodes = nodes.map((node, i) => {
20336
+ const row = Math.floor(i / cols);
20337
+ const posInRow = i % cols;
20338
+ const col = row % 2 === 1 ? cols - 1 - posInRow : posInRow;
20339
+ return rectNode({
20340
+ key: `${elementId}-snake-${node.id}-${i}`,
20341
+ x: INSET + col * (cellW + gapX),
20342
+ y: INSET + row * (cellH + gapY),
20343
+ width: cellW,
20344
+ height: cellH,
20345
+ node,
20346
+ index: i,
20347
+ total: n,
20348
+ palette,
20349
+ style,
20350
+ ctx
20351
+ });
20352
+ });
20353
+ return {
20354
+ nodes: renderedNodes,
20355
+ connectors: [],
20356
+ shadowFilter: ctx.shadow,
20357
+ viewBox: `0 0 ${w} ${h}`,
20358
+ family: "matrix"
20359
+ };
20360
+ }
20361
+ var INSET2 = 6;
20362
+ var ARROW_WING = 4;
20363
+ var ARROW_HEAD = 7;
20364
+ function arrowPath(x0, y0, x1, y1) {
20365
+ const dx = x1 - x0;
20366
+ const dy = y1 - y0;
20367
+ const len = Math.hypot(dx, dy);
20368
+ const line2 = `M${x0},${y0} L${x1},${y1}`;
20369
+ if (len < 1e-6) {
20370
+ return line2;
20371
+ }
20372
+ const ux = dx / len;
20373
+ const uy = dy / len;
20374
+ const bx = x1 - ux * ARROW_HEAD;
20375
+ const by = y1 - uy * ARROW_HEAD;
20376
+ const px3 = -uy;
20377
+ const py = ux;
20378
+ const w1x = bx + px3 * ARROW_WING;
20379
+ const w1y = by + py * ARROW_WING;
20380
+ const w2x = bx - px3 * ARROW_WING;
20381
+ const w2y = by - py * ARROW_WING;
20382
+ return `${line2} M${w1x},${w1y} L${x1},${y1} L${w2x},${w2y}`;
20383
+ }
20384
+ function connectPoints(from, to, horizontal) {
20385
+ const fromCx = from.x + from.width / 2;
20386
+ const fromCy = from.y + from.height / 2;
20387
+ const toCx = to.x + to.width / 2;
20388
+ const toCy = to.y + to.height / 2;
20389
+ if (horizontal) {
20390
+ const leftFirst = fromCx <= toCx;
20391
+ return leftFirst ? { x0: from.x + from.width, y0: fromCy, x1: to.x, y1: toCy } : { x0: from.x, y0: fromCy, x1: to.x + to.width, y1: toCy };
20392
+ }
20393
+ const topFirst = fromCy <= toCy;
20394
+ return topFirst ? { x0: fromCx, y0: from.y + from.height, x1: toCx, y1: to.y } : { x0: fromCx, y0: from.y, x1: toCx, y1: to.y + to.height };
20395
+ }
20396
+ function arrangeConn(plan, nodes, box, palette, style, elementId) {
20397
+ if (nodes.length === 0) {
20398
+ return void 0;
20399
+ }
20400
+ const flow = resolveFlowDirection(plan.node, void 0);
20401
+ const base = arrangeLinear(plan, flow, nodes, box, palette, style, elementId);
20402
+ const rects = base.nodes.filter((node) => node.kind === "rect");
20403
+ const horizontal = flow.orientation === "horizontal";
20404
+ const connectors = [];
20405
+ for (let i = 0; i < rects.length - 1; i++) {
20406
+ const { x0, y0, x1, y1 } = connectPoints(rects[i], rects[i + 1], horizontal);
20407
+ connectors.push({ key: `${elementId}-conn-${i}`, d: arrowPath(x0, y0, x1, y1) });
20408
+ }
20409
+ return { ...base, connectors, family: "process" };
20410
+ }
20411
+ function arrangeSpacer(_plan, _nodes, box, _palette, style, _elementId) {
20412
+ const ctx = styleContext(style);
20413
+ return {
20414
+ nodes: [],
20415
+ connectors: [],
20416
+ shadowFilter: ctx.shadow,
20417
+ viewBox: `0 0 ${box.width} ${box.height}`,
20418
+ family: "list"
20419
+ };
20420
+ }
20421
+ function arrangeText(_plan, nodes, box, palette, style, elementId) {
20422
+ const node = nodes[0];
20423
+ if (!node) {
20424
+ return void 0;
20425
+ }
20426
+ const { width: w, height: h } = box;
20427
+ const ctx = styleContext(style);
20428
+ const rect = rectNode({
20429
+ key: `${elementId}-tx-${node.id}`,
20430
+ x: INSET2,
20431
+ y: INSET2,
20432
+ width: Math.max(0, w - INSET2 * 2),
20433
+ height: Math.max(0, h - INSET2 * 2),
20434
+ node,
20435
+ index: 0,
20436
+ total: 1,
20437
+ palette,
20438
+ style,
20439
+ ctx
20440
+ });
20441
+ return {
20442
+ nodes: [rect],
20443
+ connectors: [],
20444
+ shadowFilter: ctx.shadow,
20445
+ viewBox: `0 0 ${w} ${h}`,
20446
+ family: "list"
20447
+ };
20448
+ }
20449
+ function axisExtent(referenceType, box, fallback) {
20450
+ if (referenceType === "w") {
20451
+ return box.width;
20452
+ }
20453
+ if (referenceType === "h") {
20454
+ return box.height;
20455
+ }
20456
+ return fallback;
20457
+ }
20458
+ function defaultExtent(type, box) {
20459
+ return type === "h" || type === "t" || type === "ctrY" || type === "b" ? box.height : box.width;
20460
+ }
20461
+ function dimOf(constraints, type, box) {
20462
+ const constraint = findConstraint(constraints, type);
20463
+ if (!constraint) {
20464
+ return void 0;
20465
+ }
20466
+ const extent = axisExtent(constraint.referenceType, box, defaultExtent(type, box));
20467
+ if (typeof constraint.factor === "number" && Number.isFinite(constraint.factor)) {
20468
+ return { px: constraint.factor * extent };
20469
+ }
20470
+ if (typeof constraint.value === "number" && Number.isFinite(constraint.value)) {
20471
+ if (constraint.value >= 0 && constraint.value <= 1) {
20472
+ return { px: constraint.value * extent };
20473
+ }
20474
+ if (constraint.value > 1) {
20475
+ return { abs: constraint.value };
20476
+ }
20477
+ }
20478
+ return void 0;
20479
+ }
20480
+ function isPositioned(dims) {
20481
+ return dims.l !== void 0 || dims.t !== void 0 || dims.w !== void 0 || dims.h !== void 0 || dims.ctrX !== void 0 || dims.ctrY !== void 0;
20482
+ }
20483
+ function readSlots(children, box) {
20484
+ const slots = [];
20485
+ for (const child2 of children) {
20486
+ const c = child2.constraints;
20487
+ const dims = {
20488
+ l: dimOf(c, "l", box),
20489
+ t: dimOf(c, "t", box),
20490
+ w: dimOf(c, "w", box),
20491
+ h: dimOf(c, "h", box),
20492
+ ctrX: dimOf(c, "ctrX", box),
20493
+ ctrY: dimOf(c, "ctrY", box)
20494
+ };
20495
+ if (isPositioned(dims)) {
20496
+ slots.push(dims);
20497
+ }
20498
+ }
20499
+ return slots;
20500
+ }
20501
+ function absOf(dim) {
20502
+ return typeof dim?.abs === "number" ? dim.abs : 0;
20503
+ }
20504
+ function axisAbsMax(slots, pos, ctr, size) {
20505
+ let max = 0;
20506
+ for (const slot of slots) {
20507
+ const s = absOf(slot[size]);
20508
+ const edge = Math.max(absOf(slot[pos]) + s, absOf(slot[ctr]) + s / 2, s);
20509
+ if (edge > max) {
20510
+ max = edge;
20511
+ }
20512
+ }
20513
+ return max;
20514
+ }
20515
+ function px2(dim, absScale) {
20516
+ if (!dim) {
20517
+ return void 0;
20518
+ }
20519
+ if (typeof dim.px === "number") {
20520
+ return dim.px;
20521
+ }
20522
+ if (typeof dim.abs === "number") {
20523
+ return dim.abs * absScale;
20524
+ }
20525
+ return void 0;
20526
+ }
20527
+ function clamp5(v, min, max) {
20528
+ if (max <= min) {
20529
+ return min;
20530
+ }
20531
+ return Math.min(max, Math.max(min, v));
20532
+ }
20533
+ function resolveSlot(dims, box, absX, absY) {
20534
+ const rawW = px2(dims.w, absX);
20535
+ const rawH = px2(dims.h, absY);
20536
+ const width = clamp5(rawW ?? box.width, 1, box.width);
20537
+ const height = clamp5(rawH ?? box.height, 1, box.height);
20538
+ const l = px2(dims.l, absX);
20539
+ const ctrX = px2(dims.ctrX, absX);
20540
+ let x;
20541
+ if (l !== void 0) {
20542
+ x = l;
20543
+ } else if (ctrX !== void 0) {
20544
+ x = ctrX - width / 2;
20545
+ } else {
20546
+ x = (box.width - width) / 2;
20547
+ }
20548
+ const t = px2(dims.t, absY);
20549
+ const ctrY = px2(dims.ctrY, absY);
20550
+ let y;
20551
+ if (t !== void 0) {
20552
+ y = t;
20553
+ } else if (ctrY !== void 0) {
20554
+ y = ctrY - height / 2;
20555
+ } else {
20556
+ y = (box.height - height) / 2;
20557
+ }
20558
+ return {
20559
+ x: clamp5(x, 0, box.width - width),
20560
+ y: clamp5(y, 0, box.height - height),
20561
+ width,
20562
+ height
20563
+ };
20564
+ }
20565
+ function arrangeComposite(plan, nodes, box, palette, style, elementId) {
20566
+ const children = plan.node.children;
20567
+ if (!children || children.length === 0 || nodes.length === 0) {
20568
+ return void 0;
20569
+ }
20570
+ const slotDims = readSlots(children, box);
20571
+ if (slotDims.length === 0) {
20572
+ return void 0;
20573
+ }
20574
+ const absMaxX = axisAbsMax(slotDims, "l", "ctrX", "w");
20575
+ const absMaxY = axisAbsMax(slotDims, "t", "ctrY", "h");
20576
+ const absX = absMaxX > 0 ? box.width / absMaxX : 1;
20577
+ const absY = absMaxY > 0 ? box.height / absMaxY : 1;
20578
+ const slots = slotDims.map((dims) => resolveSlot(dims, box, absX, absY));
20579
+ const ctx = styleContext(style);
20580
+ const count = Math.min(slots.length, nodes.length);
20581
+ const renderedNodes = [];
20582
+ for (let i = 0; i < count; i++) {
20583
+ const slot = slots[i];
20584
+ const node = nodes[i];
20585
+ renderedNodes.push(
20586
+ rectNode({
20587
+ key: `${elementId}-comp-${node.id}-${i}`,
20588
+ x: slot.x,
20589
+ y: slot.y,
20590
+ width: slot.width,
20591
+ height: slot.height,
20592
+ node,
20593
+ index: i,
20594
+ total: count,
20595
+ palette,
20596
+ style,
20597
+ ctx
20598
+ })
20599
+ );
20600
+ }
20601
+ return {
20602
+ nodes: renderedNodes,
20603
+ connectors: [],
20604
+ shadowFilter: ctx.shadow,
20605
+ viewBox: `0 0 ${box.width} ${box.height}`,
20606
+ family: "list"
17769
20607
  };
17770
20608
  }
17771
- function computeVennLayout(nodes, box, palette, style, elementId) {
20609
+ var DEG_TO_RAD2 = Math.PI / 180;
20610
+ function pointAngle(index, count, startDeg, spanDeg) {
20611
+ const full = Math.abs(spanDeg) >= 360;
20612
+ const step = full ? spanDeg / count : count > 1 ? spanDeg / (count - 1) : 0;
20613
+ return (startDeg + index * step - 90) * DEG_TO_RAD2;
20614
+ }
20615
+ function arrangeCycle(plan, nodes, box, palette, style, elementId) {
17772
20616
  const { width: w, height: h } = box;
17773
- const shadow = styleShadow(style);
17774
- if (nodes.length <= 4) {
17775
- const cx = w / 2;
17776
- const cy2 = h / 2;
17777
- const r2 = Math.min(w, h) * 0.28;
17778
- const spread = r2 * 0.55;
17779
- const renderedNodes2 = nodes.map((node, i) => {
17780
- const angle = i / Math.max(1, nodes.length) * Math.PI * 2 - Math.PI / 2;
17781
- const nx = cx + spread * Math.cos(angle);
17782
- const ny = cy2 + spread * Math.sin(angle);
17783
- const fontSize = fitFontSize(node.text, r2 * 1.2, r2 * 2, 11);
17784
- const result = {
17785
- kind: "circle",
17786
- key: `${elementId}-venn-${node.id}-${i}`,
17787
- cx: nx,
17788
- cy: ny,
17789
- r: r2,
17790
- fill: nodeFill(node, i, palette),
17791
- stroke: "none",
17792
- strokeWidth: 0,
17793
- opacity: 0.35,
17794
- text: truncate(node.text, 20),
17795
- fontSize
17796
- };
17797
- return result;
17798
- });
20617
+ const ctx = styleContext(style);
20618
+ const n = nodes.length;
20619
+ const size = Math.min(w, h);
20620
+ const cx = w / 2;
20621
+ const cy = h / 2;
20622
+ const startDeg = numericParam(plan.node, "stAng", 0);
20623
+ const spanDeg = numericParam(plan.node, "spanAng", 360);
20624
+ const nodeR = Math.max(size * 0.06, Math.min(size * 0.12, 200 / Math.max(1, n)));
20625
+ const radius = Math.max(nodeR, size * 0.5 - nodeR - 4);
20626
+ const centre = (index) => {
20627
+ const angle = pointAngle(index, n, startDeg, spanDeg);
20628
+ return { x: cx + radius * Math.cos(angle), y: cy + radius * Math.sin(angle) };
20629
+ };
20630
+ const full = Math.abs(spanDeg) >= 360;
20631
+ const connectorCount = full ? n : Math.max(0, n - 1);
20632
+ const connectors = Array.from({ length: connectorCount }, (_, i) => {
20633
+ const from = centre(i);
20634
+ const to = centre((i + 1) % n);
20635
+ const midX = (from.x + to.x) / 2;
20636
+ const midY = (from.y + to.y) / 2;
20637
+ const pull = 1 + radius * 0.15 / Math.max(1, Math.hypot(midX - cx, midY - cy));
20638
+ const controlX = cx + (midX - cx) * pull;
20639
+ const controlY = cy + (midY - cy) * pull;
17799
20640
  return {
17800
- nodes: renderedNodes2,
17801
- connectors: [],
17802
- shadowFilter: shadow,
17803
- viewBox: `0 0 ${w} ${h}`,
17804
- family: "venn"
20641
+ key: `${elementId}-cycle-conn-${i}`,
20642
+ d: `M${from.x},${from.y} Q${controlX},${controlY} ${to.x},${to.y}`
17805
20643
  };
17806
- }
17807
- const r = Math.min(h * 0.38, w / (nodes.length * 0.9));
17808
- const overlap = r * 0.5;
17809
- const totalW = nodes.length * (r * 2 - overlap) + overlap;
17810
- const offsetX = (w - totalW) / 2 + r;
17811
- const cy = h / 2;
20644
+ });
17812
20645
  const renderedNodes = nodes.map((node, i) => {
17813
- const nx = offsetX + i * (r * 2 - overlap);
17814
- const fontSize = fitFontSize(node.text, r * 1.2, r * 2, 10);
17815
- const result = {
17816
- kind: "circle",
17817
- key: `${elementId}-venn-${node.id}-${i}`,
17818
- cx: nx,
17819
- cy,
17820
- r,
17821
- fill: nodeFill(node, i, palette),
17822
- stroke: "none",
17823
- strokeWidth: 0,
17824
- opacity: 0.35,
17825
- text: truncate(node.text, 20),
17826
- fontSize
17827
- };
17828
- return result;
20646
+ const { x, y } = centre(i);
20647
+ return circleNode({
20648
+ key: `${elementId}-cycle-${node.id}-${i}`,
20649
+ cx: x,
20650
+ cy: y,
20651
+ r: nodeR,
20652
+ node,
20653
+ index: i,
20654
+ total: n,
20655
+ palette,
20656
+ style,
20657
+ ctx
20658
+ });
17829
20659
  });
17830
20660
  return {
17831
20661
  nodes: renderedNodes,
17832
- connectors: [],
17833
- shadowFilter: shadow,
20662
+ connectors,
20663
+ shadowFilter: ctx.shadow,
17834
20664
  viewBox: `0 0 ${w} ${h}`,
17835
- family: "venn"
20665
+ family: "cycle"
17836
20666
  };
17837
20667
  }
17838
- function computeFunnelLayout(nodes, box, palette, style, elementId) {
17839
- const { width: w, height: h } = box;
17840
- const pad = 8;
17841
- const usableW = w - pad * 2;
17842
- const stageH = nodes.length > 0 ? (h - pad * 2) / nodes.length : h - pad * 2;
17843
- const sw = styleStroke(style);
17844
- const stroke = strokeFor(sw);
17845
- const renderedNodes = nodes.map((node, i) => {
17846
- const topWidth = usableW * (1 - i / Math.max(1, nodes.length));
17847
- const bottomWidth = usableW * (1 - (i + 1) / Math.max(1, nodes.length));
17848
- const y = pad + i * stageH;
17849
- const topLeft = (w - topWidth) / 2;
17850
- const topRight = topLeft + topWidth;
17851
- const bottomLeft = (w - bottomWidth) / 2;
17852
- const bottomRight = bottomLeft + bottomWidth;
17853
- const points = [
17854
- `${topLeft},${y}`,
17855
- `${topRight},${y}`,
17856
- `${bottomRight},${y + stageH}`,
17857
- `${bottomLeft},${y + stageH}`
17858
- ].join(" ");
17859
- const fontSize = fitFontSize(node.text, topWidth * 0.85, stageH, 11);
17860
- const result = {
17861
- kind: "polygon",
17862
- key: `${elementId}-funnel-${node.id}-${i}`,
17863
- points,
17864
- fill: nodeFill(node, i, palette),
17865
- stroke: nodeStroke(node, stroke),
17866
- strokeWidth: sw,
17867
- opacity: nodeOpacity(i, nodes.length, style),
17868
- text: truncate(node.text, 30),
17869
- fontSize,
17870
- textX: w / 2,
17871
- textY: y + stageH / 2
17872
- };
17873
- return result;
20668
+ var INSET3 = 6;
20669
+ function isHanging(presLayoutVars) {
20670
+ const branch = presLayoutVars?.hierarchyBranch;
20671
+ return branch === "l" || branch === "r" || branch === "hang";
20672
+ }
20673
+ function connector(hc, from, fx, fy, cx, cy) {
20674
+ const midY = fy + (cy - fy) / 2;
20675
+ hc.connectors.push({
20676
+ key: `${hc.elementId}-hier-conn-${from.node.id}-${cx}-${cy}`,
20677
+ d: `M${fx},${fy} L${fx},${midY} L${cx},${midY} L${cx},${cy}`
17874
20678
  });
20679
+ }
20680
+ function pushNode(hc, node, x, y) {
20681
+ const index = hc.counter.value++;
20682
+ hc.nodes.push(
20683
+ rectNode({
20684
+ key: `${hc.elementId}-hier-${node.id}-${index}`,
20685
+ x,
20686
+ y,
20687
+ width: hc.boxW,
20688
+ height: hc.boxH,
20689
+ node,
20690
+ index,
20691
+ total: hc.total,
20692
+ palette: hc.palette,
20693
+ style: hc.style,
20694
+ ctx: hc.ctx
20695
+ })
20696
+ );
20697
+ return index;
20698
+ }
20699
+ function placeStandard(hc, t, xOffset, level, cellW, cellH) {
20700
+ const spanW = treeWidth(t);
20701
+ const cx = (xOffset + spanW / 2) * cellW;
20702
+ const cy = level * cellH + cellH / 2;
20703
+ pushNode(hc, t.node, cx - hc.boxW / 2, cy - hc.boxH / 2);
20704
+ let childOffset = xOffset;
20705
+ for (const child2 of t.children) {
20706
+ const childW = treeWidth(child2);
20707
+ const childCx = (childOffset + childW / 2) * cellW;
20708
+ const childCy = (level + 1) * cellH + cellH / 2;
20709
+ connector(hc, t, cx, cy + hc.boxH / 2, childCx, childCy - hc.boxH / 2);
20710
+ placeStandard(hc, child2, childOffset, level + 1, cellW, cellH);
20711
+ childOffset += childW;
20712
+ }
20713
+ }
20714
+ function placeHanging(hc, t, x, indent, vGap, cursor) {
20715
+ const y = cursor.y;
20716
+ cursor.y += hc.boxH + vGap;
20717
+ pushNode(hc, t.node, x, y);
20718
+ for (const child2 of t.children) {
20719
+ const childY = cursor.y;
20720
+ connector(hc, t, x + hc.boxH / 2, y + hc.boxH, x + indent, childY + hc.boxH / 2);
20721
+ placeHanging(hc, child2, x + indent, indent, vGap, cursor);
20722
+ }
20723
+ }
20724
+ function baseContext(nodeCount, elementId, palette, style, boxW, boxH) {
17875
20725
  return {
17876
- nodes: renderedNodes,
20726
+ elementId,
20727
+ palette,
20728
+ style,
20729
+ ctx: styleContext(style),
20730
+ total: nodeCount,
20731
+ boxW,
20732
+ boxH,
20733
+ nodes: [],
17877
20734
  connectors: [],
17878
- shadowFilter: styleShadow(style),
20735
+ counter: { value: 0 }
20736
+ };
20737
+ }
20738
+ function arrangeHierarchy(nodes, box, palette, style, elementId, presLayoutVars) {
20739
+ const { width: w, height: h } = box;
20740
+ const roots = buildTree(nodes);
20741
+ if (isHanging(presLayoutVars)) {
20742
+ const boxW2 = Math.min(w * 0.42, 160);
20743
+ const boxH2 = Math.min(h * 0.16, 30);
20744
+ const indent = boxW2 * 0.35;
20745
+ const vGap = boxH2 * 0.55;
20746
+ const hc2 = baseContext(nodes.length, elementId, palette, style, boxW2, boxH2);
20747
+ const cursor = { y: INSET3 };
20748
+ for (const root of roots) {
20749
+ placeHanging(hc2, root, INSET3, indent, vGap, cursor);
20750
+ }
20751
+ return {
20752
+ nodes: hc2.nodes,
20753
+ connectors: hc2.connectors,
20754
+ shadowFilter: hc2.ctx.shadow,
20755
+ viewBox: `0 0 ${w} ${h}`,
20756
+ family: "hierarchy"
20757
+ };
20758
+ }
20759
+ const totalLeaves = roots.reduce((sum, r) => sum + treeWidth(r), 0);
20760
+ const depth = roots.length > 0 ? Math.max(...roots.map(treeDepth)) : 1;
20761
+ const cellW = w / Math.max(1, totalLeaves);
20762
+ const cellH = h / Math.max(1, depth);
20763
+ const boxW = Math.min(cellW * 0.8, 150);
20764
+ const boxH = Math.min(cellH * 0.4, 40);
20765
+ const hc = baseContext(nodes.length, elementId, palette, style, boxW, boxH);
20766
+ let offset = 0;
20767
+ for (const root of roots) {
20768
+ placeStandard(hc, root, offset, 0, cellW, cellH);
20769
+ offset += treeWidth(root);
20770
+ }
20771
+ return {
20772
+ nodes: hc.nodes,
20773
+ connectors: hc.connectors,
20774
+ shadowFilter: hc.ctx.shadow,
17879
20775
  viewBox: `0 0 ${w} ${h}`,
17880
- family: "funnel"
20776
+ family: "hierarchy"
17881
20777
  };
17882
20778
  }
17883
- function computeTargetLayout(nodes, box, palette, style, elementId) {
20779
+ var INSET4 = 8;
20780
+ function arrangePyramid(plan, nodes, box, palette, style, elementId) {
17884
20781
  const { width: w, height: h } = box;
17885
- const cx = w * 0.4;
17886
- const cy = h / 2;
17887
- const maxR = Math.min(cx - 8, cy - 8);
17888
- const shadow = styleShadow(style);
20782
+ const ctx = styleContext(style);
20783
+ const n = nodes.length;
20784
+ const cx = w / 2;
20785
+ const maxW = w - INSET4 * 2;
20786
+ const gapRatio = ratioConstraint(plan.node.constraints, ["sibSp", "sp"], 0.06);
20787
+ const usableH = h - INSET4 * 2;
20788
+ const bandH = n > 0 ? usableH / (n + Math.max(0, n - 1) * gapRatio) : usableH;
20789
+ const gap = gapRatio * bandH;
17889
20790
  const renderedNodes = nodes.map((node, i) => {
17890
- const r = maxR * ((nodes.length - i) / Math.max(1, nodes.length));
17891
- const result = {
17892
- kind: "circle",
17893
- key: `${elementId}-target-${node.id}-${i}`,
17894
- cx,
17895
- cy,
17896
- r: Math.max(r, 4),
17897
- fill: nodeFill(node, i, palette),
17898
- stroke: "none",
17899
- strokeWidth: 0,
17900
- opacity: nodeOpacity(i, nodes.length, style),
17901
- text: truncate(node.text, 30),
17902
- fontSize: Math.max(7, Math.min(10, maxR / Math.max(1, nodes.length + 1)))
17903
- };
17904
- return result;
20791
+ const yTop = INSET4 + i * (bandH + gap);
20792
+ const yBot = yTop + bandH;
20793
+ const fTop = i / n;
20794
+ const fBot = (i + 1) / n;
20795
+ const halfTop = maxW * fTop / 2;
20796
+ const halfBot = maxW * fBot / 2;
20797
+ const points = [
20798
+ `${cx - halfTop},${yTop}`,
20799
+ `${cx + halfTop},${yTop}`,
20800
+ `${cx + halfBot},${yBot}`,
20801
+ `${cx - halfBot},${yBot}`
20802
+ ].join(" ");
20803
+ return polygonNode({
20804
+ key: `${elementId}-pyra-${node.id}-${i}`,
20805
+ points,
20806
+ textX: cx,
20807
+ textY: (yTop + yBot) / 2,
20808
+ fontWidth: Math.max(20, halfBot * 1.4),
20809
+ fontHeight: bandH,
20810
+ node,
20811
+ index: i,
20812
+ total: n,
20813
+ palette,
20814
+ style,
20815
+ ctx
20816
+ });
17905
20817
  });
17906
20818
  return {
17907
20819
  nodes: renderedNodes,
17908
20820
  connectors: [],
17909
- shadowFilter: shadow,
20821
+ shadowFilter: ctx.shadow,
17910
20822
  viewBox: `0 0 ${w} ${h}`,
17911
- family: "target"
20823
+ family: "pyramid"
17912
20824
  };
17913
20825
  }
20826
+ function interpretSmartArtLayout(input) {
20827
+ const { layoutDefinition, nodes, flat, box, palette, style, elementId, presLayoutVars } = input;
20828
+ if (!layoutDefinition || flat.length === 0) {
20829
+ return void 0;
20830
+ }
20831
+ const plan = discoverArrangement(layoutDefinition, flat.length);
20832
+ if (!plan) {
20833
+ return void 0;
20834
+ }
20835
+ if (plan.kind === "hierarchy") {
20836
+ return arrangeHierarchy(nodes, box, palette, style, elementId, presLayoutVars);
20837
+ }
20838
+ const arranged = selectArrangedNodes(plan.node, flat);
20839
+ if (arranged.length === 0) {
20840
+ return void 0;
20841
+ }
20842
+ switch (plan.kind) {
20843
+ case "linear": {
20844
+ const flow = resolveFlowDirection(plan.node, presLayoutVars);
20845
+ return arrangeLinear(plan, flow, arranged, box, palette, style, elementId);
20846
+ }
20847
+ case "snake":
20848
+ return arrangeSnake(plan, arranged, box, palette, style, elementId);
20849
+ case "cycle":
20850
+ return arrangeCycle(plan, arranged, box, palette, style, elementId);
20851
+ case "pyramid":
20852
+ return arrangePyramid(plan, arranged, box, palette, style, elementId);
20853
+ case "composite":
20854
+ return arrangeComposite(plan, arranged, box, palette, style, elementId);
20855
+ case "conn":
20856
+ return arrangeConn(plan, arranged, box, palette, style, elementId);
20857
+ case "spacer":
20858
+ return arrangeSpacer(plan, arranged, box, palette, style);
20859
+ case "text":
20860
+ return arrangeText(plan, arranged, box, palette, style, elementId);
20861
+ }
20862
+ }
17914
20863
  function interpolateSmartArtPalette(palette, count, method, hueDirection) {
17915
20864
  if (count <= 0 || palette.length === 0) {
17916
20865
  return [];
@@ -17926,10 +20875,23 @@ function interpolateSmartArtPalette(palette, count, method, hueDirection) {
17926
20875
  return interpolateColor(palette[lower], palette[lower + 1], frac, "hsl", hueDirection);
17927
20876
  });
17928
20877
  }
17929
- function computeSmartArtLayout(nodes, box, palette, style, elementId, resolvedLayoutType, layout, interpolation) {
20878
+ function computeSmartArtLayout(nodes, box, palette, style, elementId, resolvedLayoutType, layout, interpolation, layoutDefinition, presLayoutVars) {
17930
20879
  const flat = flattenNodes(nodes);
17931
20880
  const family = resolveLayoutFamily(nodes, resolvedLayoutType, layout);
17932
20881
  const pal = interpolation?.method === "span" ? interpolateSmartArtPalette(palette, flat.length, "span", interpolation.hueDirection) : palette;
20882
+ const interpreted = interpretSmartArtLayout({
20883
+ layoutDefinition,
20884
+ nodes,
20885
+ flat,
20886
+ box,
20887
+ palette: pal,
20888
+ style,
20889
+ elementId,
20890
+ presLayoutVars
20891
+ });
20892
+ if (interpreted) {
20893
+ return interpreted;
20894
+ }
17933
20895
  switch (family) {
17934
20896
  case "list":
17935
20897
  return computeListLayout(flat, box, pal, style, elementId);
@@ -18299,14 +21261,14 @@ function smartArtLayoutLabel(type) {
18299
21261
  }
18300
21262
  function flattenSmartArtNodes(nodes) {
18301
21263
  const out = [];
18302
- const walk = (n) => {
21264
+ const walk2 = (n) => {
18303
21265
  out.push(n);
18304
21266
  for (const child2 of n.children ?? []) {
18305
- walk(child2);
21267
+ walk2(child2);
18306
21268
  }
18307
21269
  };
18308
21270
  for (const n of nodes) {
18309
- walk(n);
21271
+ walk2(n);
18310
21272
  }
18311
21273
  return out;
18312
21274
  }
@@ -18357,14 +21319,14 @@ var THREE_UNAVAILABLE = {
18357
21319
  var FOV = 50;
18358
21320
  async function loadThree() {
18359
21321
  try {
18360
- return await import('./three.module-CPZZFD2Q.js');
21322
+ return await import('./three.module-GNNNRIMK.js');
18361
21323
  } catch {
18362
21324
  return null;
18363
21325
  }
18364
21326
  }
18365
21327
  async function loadGltfLoaderCtor() {
18366
21328
  try {
18367
- const mod = await import('./GLTFLoader-GP55DVVS.js');
21329
+ const mod = await import('./GLTFLoader-Q7BHCGAW.js');
18368
21330
  return mod.GLTFLoader;
18369
21331
  } catch {
18370
21332
  return null;
@@ -18372,7 +21334,7 @@ async function loadGltfLoaderCtor() {
18372
21334
  }
18373
21335
  async function loadOrbitControlsCtor() {
18374
21336
  try {
18375
- const mod = await import('./OrbitControls-VH6KILH7.js');
21337
+ const mod = await import('./OrbitControls-SMYCPLXO.js');
18376
21338
  return mod.OrbitControls;
18377
21339
  } catch {
18378
21340
  return null;
@@ -18596,14 +21558,14 @@ var SURFACE_THREE_UNAVAILABLE = {
18596
21558
  var FOV2 = 45;
18597
21559
  async function loadThree2() {
18598
21560
  try {
18599
- return await import('./three.module-CPZZFD2Q.js');
21561
+ return await import('./three.module-GNNNRIMK.js');
18600
21562
  } catch {
18601
21563
  return null;
18602
21564
  }
18603
21565
  }
18604
21566
  async function loadOrbitControlsCtor2() {
18605
21567
  try {
18606
- const mod = await import('./OrbitControls-VH6KILH7.js');
21568
+ const mod = await import('./OrbitControls-SMYCPLXO.js');
18607
21569
  return mod.OrbitControls;
18608
21570
  } catch {
18609
21571
  return null;
@@ -19211,6 +22173,26 @@ function presentationInkPath(points) {
19211
22173
  ""
19212
22174
  );
19213
22175
  }
22176
+ var HANDOUT_SLIDES_PER_PAGE = [1, 2, 3, 4, 6, 9];
22177
+ function printPropertiesSlidesPerPage(printProperties) {
22178
+ const match = printProperties?.printWhat?.match(/^handouts([123469])$/u);
22179
+ return match ? Number.parseInt(match[1], 10) : 1;
22180
+ }
22181
+ function printPropertiesFrameSlides(printProperties) {
22182
+ return Boolean(printProperties?.frameSlides);
22183
+ }
22184
+ function nearestHandoutCount(value) {
22185
+ return HANDOUT_SLIDES_PER_PAGE.reduce(
22186
+ (best, candidate) => Math.abs(candidate - value) < Math.abs(best - value) ? candidate : best
22187
+ );
22188
+ }
22189
+ function withFrameSlides(printProperties, value) {
22190
+ return { ...printProperties ?? {}, frameSlides: value };
22191
+ }
22192
+ function withSlidesPerPage(printProperties, value) {
22193
+ const count = nearestHandoutCount(value);
22194
+ return { ...printProperties ?? {}, printWhat: `handouts${count}` };
22195
+ }
19214
22196
  var PRESENTATION_CHANNEL_NAME = "pptx-viewer-presenter";
19215
22197
  var PRESENTATION_HASH = "#pptx-audience";
19216
22198
  var PRESENTATION_NONCE_KEY = "nonce";
@@ -19403,6 +22385,108 @@ async function clearPresentationDeck(sessionId) {
19403
22385
  } catch {
19404
22386
  }
19405
22387
  }
22388
+ var DB_NAME2 = "pptx-viewer-audience";
22389
+ var DB_VERSION2 = 1;
22390
+ var STORE_NAME2 = "content";
22391
+ var CONTENT_KEY = "pptx-bytes";
22392
+ var MAX_CONTENT_AGE_MS = 5 * 60 * 1e3;
22393
+ function openDb() {
22394
+ return new Promise((resolve, reject) => {
22395
+ const request = indexedDB.open(DB_NAME2, DB_VERSION2);
22396
+ request.onupgradeneeded = () => {
22397
+ const db = request.result;
22398
+ if (!db.objectStoreNames.contains(STORE_NAME2)) {
22399
+ db.createObjectStore(STORE_NAME2);
22400
+ }
22401
+ };
22402
+ request.onsuccess = () => resolve(request.result);
22403
+ request.onerror = () => reject(request.error);
22404
+ });
22405
+ }
22406
+ async function storeAudienceContent(content, sessionId) {
22407
+ if (sessionId) {
22408
+ return storePresentationDeck(sessionId, content);
22409
+ }
22410
+ const db = await openDb();
22411
+ return new Promise((resolve, reject) => {
22412
+ const tx = db.transaction(STORE_NAME2, "readwrite");
22413
+ const store = tx.objectStore(STORE_NAME2);
22414
+ const bytes = content instanceof Uint8Array ? content : new Uint8Array(content);
22415
+ const record = { bytes, createdAt: Date.now() };
22416
+ store.put(record, CONTENT_KEY);
22417
+ tx.oncomplete = () => {
22418
+ db.close();
22419
+ resolve();
22420
+ };
22421
+ tx.onerror = () => {
22422
+ db.close();
22423
+ reject(tx.error);
22424
+ };
22425
+ });
22426
+ }
22427
+ async function loadAudienceContent(sessionId) {
22428
+ if (sessionId) {
22429
+ return loadPresentationDeck(sessionId);
22430
+ }
22431
+ try {
22432
+ const db = await openDb();
22433
+ return new Promise((resolve, reject) => {
22434
+ const tx = db.transaction(STORE_NAME2, "readonly");
22435
+ const store = tx.objectStore(STORE_NAME2);
22436
+ const request = store.get(CONTENT_KEY);
22437
+ request.onsuccess = () => {
22438
+ db.close();
22439
+ const result = request.result;
22440
+ if (result && typeof result === "object" && "bytes" in result && "createdAt" in result) {
22441
+ const record = result;
22442
+ const age = Date.now() - record.createdAt;
22443
+ if (age > MAX_CONTENT_AGE_MS) {
22444
+ resolve(null);
22445
+ return;
22446
+ }
22447
+ const raw = record.bytes;
22448
+ if (raw instanceof Uint8Array) {
22449
+ resolve(raw);
22450
+ } else if (raw instanceof ArrayBuffer) {
22451
+ resolve(new Uint8Array(raw));
22452
+ } else {
22453
+ resolve(null);
22454
+ }
22455
+ return;
22456
+ }
22457
+ resolve(null);
22458
+ };
22459
+ request.onerror = () => {
22460
+ db.close();
22461
+ reject(request.error);
22462
+ };
22463
+ });
22464
+ } catch {
22465
+ return null;
22466
+ }
22467
+ }
22468
+ async function clearAudienceContent(sessionId) {
22469
+ if (sessionId) {
22470
+ return clearPresentationDeck(sessionId);
22471
+ }
22472
+ try {
22473
+ const db = await openDb();
22474
+ return new Promise((resolve) => {
22475
+ const tx = db.transaction(STORE_NAME2, "readwrite");
22476
+ const store = tx.objectStore(STORE_NAME2);
22477
+ store.delete(CONTENT_KEY);
22478
+ tx.oncomplete = () => {
22479
+ db.close();
22480
+ resolve();
22481
+ };
22482
+ tx.onerror = () => {
22483
+ db.close();
22484
+ resolve();
22485
+ };
22486
+ });
22487
+ } catch {
22488
+ }
22489
+ }
19406
22490
  function formatSlideCounter(currentSlide, totalSlides) {
19407
22491
  return `${currentSlide + 1} / ${totalSlides}`;
19408
22492
  }
@@ -19816,12 +22900,12 @@ function replacePixels(data, fromColor, toColor, threshold, toTransparent) {
19816
22900
  }
19817
22901
  }
19818
22902
  var DEFAULT_COLOR_CHANGE_TOLERANCE = 12;
19819
- function applyColorChange(imageDataUrl, fromHex, toHex, tolerancePct = DEFAULT_COLOR_CHANGE_TOLERANCE, toTransparent = false) {
22903
+ function applyColorChange(imageDataUrl, fromHex, toHex2, tolerancePct = DEFAULT_COLOR_CHANGE_TOLERANCE, toTransparent = false) {
19820
22904
  return new Promise((resolve, reject) => {
19821
22905
  const fromColor = parseHexToRgb(fromHex);
19822
- const toColor = parseHexToRgb(toHex);
22906
+ const toColor = parseHexToRgb(toHex2);
19823
22907
  if (!fromColor || !toColor) {
19824
- reject(new Error(`Invalid hex colour: from="${fromHex}" to="${toHex}"`));
22908
+ reject(new Error(`Invalid hex colour: from="${fromHex}" to="${toHex2}"`));
19825
22909
  return;
19826
22910
  }
19827
22911
  const img = new Image();
@@ -19859,9 +22943,9 @@ function applyColorChange(imageDataUrl, fromHex, toHex, tolerancePct = DEFAULT_C
19859
22943
  }
19860
22944
  var colorChangeCache = /* @__PURE__ */ new Map();
19861
22945
  var CACHE_MAX = 64;
19862
- function buildCacheKey(src, fromHex, toHex, tolerancePct, toTransparent) {
22946
+ function buildCacheKey(src, fromHex, toHex2, tolerancePct, toTransparent) {
19863
22947
  const srcKey = src.length > 64 ? src.slice(0, 64) : src;
19864
- return `${srcKey}|${fromHex}|${toHex}|${tolerancePct}|${toTransparent}`;
22948
+ return `${srcKey}|${fromHex}|${toHex2}|${tolerancePct}|${toTransparent}`;
19865
22949
  }
19866
22950
  function getCachedResult(key) {
19867
22951
  return colorChangeCache.get(key);
@@ -20018,7 +23102,7 @@ function getAriaRole(element) {
20018
23102
  case "model3d":
20019
23103
  return "img";
20020
23104
  case "shape": {
20021
- if (chunkIPYAN574_js.hasTextProperties(element) && element.text) {
23105
+ if (chunkCLNGAVNH_js.hasTextProperties(element) && element.text) {
20022
23106
  return "group";
20023
23107
  }
20024
23108
  return "img";
@@ -20031,7 +23115,7 @@ function getAriaLabel(element) {
20031
23115
  if ((element.type === "image" || element.type === "picture") && "altText" in element && typeof element.altText === "string" && element.altText.trim()) {
20032
23116
  return element.altText.trim();
20033
23117
  }
20034
- if (chunkIPYAN574_js.hasTextProperties(element) && element.text) {
23118
+ if (chunkCLNGAVNH_js.hasTextProperties(element) && element.text) {
20035
23119
  const text = element.text.trim();
20036
23120
  if (text) {
20037
23121
  return text.length > 120 ? `${text.slice(0, 117)}...` : text;
@@ -20438,7 +23522,7 @@ var DEFAULT_CHART_POSITION = { x: 120, y: 120, width: 480, height: 320 };
20438
23522
  var DEFAULT_CATEGORIES = ["Category 1", "Category 2", "Category 3"];
20439
23523
  var DEFAULT_SERIES_VALUES = [4, 3, 5];
20440
23524
  function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, position) {
20441
- return chunkIPYAN574_js.createChartElement(
23525
+ return chunkCLNGAVNH_js.createChartElement(
20442
23526
  chartType,
20443
23527
  {
20444
23528
  categories: [...DEFAULT_CATEGORIES],
@@ -20455,12 +23539,12 @@ function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, positi
20455
23539
  );
20456
23540
  }
20457
23541
  function polygonBounds(points) {
20458
- const pairs = points.trim().split(/\s+/u);
23542
+ const pairs2 = points.trim().split(/\s+/u);
20459
23543
  let minX = Infinity;
20460
23544
  let minY = Infinity;
20461
23545
  let maxX = -Infinity;
20462
23546
  let maxY = -Infinity;
20463
- for (const pair of pairs) {
23547
+ for (const pair of pairs2) {
20464
23548
  const comma = pair.indexOf(",");
20465
23549
  if (comma < 0) {
20466
23550
  continue;
@@ -20672,6 +23756,15 @@ function cloneElementForPaste(element, options = {}) {
20672
23756
  clone.y += options.offsetY ?? PASTE_OFFSET_PX;
20673
23757
  return clone;
20674
23758
  }
23759
+ var DEFAULT_PREVIEW_ELEMENT_CAP = 500;
23760
+ function buildPreviewElements(slide, templateElements = [], options) {
23761
+ const cap = options?.cap ?? DEFAULT_PREVIEW_ELEMENT_CAP;
23762
+ const merged = [...templateElements, ...slide.elements];
23763
+ if (cap > 0 && merged.length > cap) {
23764
+ return merged.slice(0, cap);
23765
+ }
23766
+ return merged;
23767
+ }
20675
23768
  var SHAPE_PRESET_DEFS = [
20676
23769
  {
20677
23770
  type: "rect",
@@ -21458,7 +24551,7 @@ function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight,
21458
24551
  };
21459
24552
  }
21460
24553
  function collectFontsFromElement(element, fonts) {
21461
- if (chunkIPYAN574_js.hasTextProperties(element)) {
24554
+ if (chunkCLNGAVNH_js.hasTextProperties(element)) {
21462
24555
  if (element.textStyle?.fontFamily) {
21463
24556
  fonts.add(element.textStyle.fontFamily);
21464
24557
  }
@@ -24154,6 +27247,7 @@ exports.PRESENTATION_HASH = PRESENTATION_HASH;
24154
27247
  exports.PRESENTATION_MESSAGE_ORIGIN = PRESENTATION_MESSAGE_ORIGIN;
24155
27248
  exports.PRESENTATION_NONCE_KEY = PRESENTATION_NONCE_KEY;
24156
27249
  exports.PRESETS = PRESETS;
27250
+ exports.PresentationAnimationController = PresentationAnimationController;
24157
27251
  exports.QUICK_ACCESS_COMMAND_CATALOG = QUICK_ACCESS_COMMAND_CATALOG;
24158
27252
  exports.RULER_FONT_SIZE = RULER_FONT_SIZE;
24159
27253
  exports.RULER_THICKNESS = RULER_THICKNESS;
@@ -24172,7 +27266,6 @@ exports.THEME_COLOR_LABELS = THEME_COLOR_LABELS;
24172
27266
  exports.TITLE_BAR_CLASSES = TITLE_BAR_CLASSES;
24173
27267
  exports.TITLE_BAR_DEFAULT_FILE_KEY = TITLE_BAR_DEFAULT_FILE_KEY;
24174
27268
  exports.TOOLBAR_TABS = TOOLBAR_TABS;
24175
- exports.TimelineEngine = TimelineEngine;
24176
27269
  exports.VIEWER_OPTIONS_TABS = VIEWER_OPTIONS_TABS;
24177
27270
  exports.VIEWER_PREFS_STORAGE_KEY = VIEWER_PREFS_STORAGE_KEY;
24178
27271
  exports.WEBM_MIME_CANDIDATES = WEBM_MIME_CANDIDATES;
@@ -24185,6 +27278,7 @@ exports.apply3dEffects = apply3dEffects;
24185
27278
  exports.applyAcceptAllSlides = applyAcceptAllSlides;
24186
27279
  exports.applyAcceptSlide = applyAcceptSlide;
24187
27280
  exports.applyCaseTransformToSegments = applyCaseTransformToSegments;
27281
+ exports.applyChartBuildReveal = applyChartBuildReveal;
24188
27282
  exports.applyColorChange = applyColorChange;
24189
27283
  exports.applyDuotone = applyDuotone;
24190
27284
  exports.applyFormatToElement = applyFormatToElement;
@@ -24217,6 +27311,7 @@ exports.buildOutlineHtml = buildOutlineHtml;
24217
27311
  exports.buildPatternFillCss = buildPatternFillCss;
24218
27312
  exports.buildPresentationAudienceUrl = buildPresentationAudienceUrl;
24219
27313
  exports.buildPreviewAnimation = buildPreviewAnimation;
27314
+ exports.buildPreviewElements = buildPreviewElements;
24220
27315
  exports.buildPrintDocument = buildPrintDocument;
24221
27316
  exports.buildPrintHtmlDocument = buildPrintHtmlDocument;
24222
27317
  exports.buildReflectionCss = buildReflectionCss;
@@ -24235,13 +27330,14 @@ exports.buildTextShadowCss = buildTextShadowCss;
24235
27330
  exports.buildThemeColorGrid = buildThemeColorGrid;
24236
27331
  exports.buildUserFontFaceStyles = buildUserFontFaceStyles;
24237
27332
  exports.canvasToJpegData = canvasToJpegData;
27333
+ exports.cell3DBevelCss = cell3DBevelCss;
24238
27334
  exports.chartPartToAttrs = chartPartToAttrs;
24239
27335
  exports.clampCropValue = clampCropValue;
24240
27336
  exports.clampNotesFontSize = clampNotesFontSize;
24241
27337
  exports.clampPercent = clampPercent;
24242
27338
  exports.clampUnitInterval = clampUnitInterval;
24243
27339
  exports.clearAllLocalViewerData = clearAllLocalViewerData;
24244
- exports.clearPresentationDeck = clearPresentationDeck;
27340
+ exports.clearAudienceContent = clearAudienceContent;
24245
27341
  exports.clearStoredViewerPrefs = clearStoredViewerPrefs;
24246
27342
  exports.cloneElementForPaste = cloneElementForPaste;
24247
27343
  exports.cloneHistorySnapshot = cloneHistorySnapshot;
@@ -24278,7 +27374,6 @@ exports.convertLatexToOmml = convertLatexToOmml;
24278
27374
  exports.convertOmmlToLatex = convertOmmlToLatex;
24279
27375
  exports.convertOmmlToMathMl = convertOmmlToMathMl;
24280
27376
  exports.copyFormatFromElement = copyFormatFromElement;
24281
- exports.countTextSegments = countTextSegments;
24282
27377
  exports.createBackstagePresentation = createBackstagePresentation;
24283
27378
  exports.createBlankSlide = createBlankSlide;
24284
27379
  exports.createDefaultChartElement = createDefaultChartElement;
@@ -24305,7 +27400,6 @@ exports.dragAnchorViewY = dragAnchorViewY;
24305
27400
  exports.dragValueForPart = dragValueForPart;
24306
27401
  exports.encodeGif = encodeGif;
24307
27402
  exports.erasePresentationInkAt = erasePresentationInkAt;
24308
- exports.expandTextBuildAnimations = expandTextBuildAnimations;
24309
27403
  exports.extractPathPoints = extractPathPoints;
24310
27404
  exports.filterCommands = filterCommands;
24311
27405
  exports.findChartPartTarget = findChartPartTarget;
@@ -24335,12 +27429,14 @@ exports.getAriaLabel = getAriaLabel;
24335
27429
  exports.getAriaRole = getAriaRole;
24336
27430
  exports.getAriaRoleDescription = getAriaRoleDescription;
24337
27431
  exports.getCachedResult = getCachedResult;
27432
+ exports.getCellDiagonalBorders = getCellDiagonalBorders;
24338
27433
  exports.getChartStylePalette = getChartStylePalette;
24339
27434
  exports.getCommentMarkerPosition = getCommentMarkerPosition;
24340
27435
  exports.getCompoundLineBorderWidth = getCompoundLineBorderWidth;
24341
27436
  exports.getCompoundLineBoxShadow = getCompoundLineBoxShadow;
24342
27437
  exports.getCompoundLineOffsets = getCompoundLineOffsets;
24343
27438
  exports.getCompoundLineWidths = getCompoundLineWidths;
27439
+ exports.getComputedEffectStyle = getComputedEffectStyle;
24344
27440
  exports.getConnectionSites = getConnectionSites;
24345
27441
  exports.getContentPartReplayStyles = getContentPartReplayStyles;
24346
27442
  exports.getCssBorderDashStyle = getCssBorderDashStyle;
@@ -24350,6 +27446,7 @@ exports.getEffectDagFilter = getEffectDagFilter;
24350
27446
  exports.getElementLabel = getElementLabel;
24351
27447
  exports.getElementTransform = getElementTransform;
24352
27448
  exports.getElementTransformWithoutRotation = getElementTransformWithoutRotation;
27449
+ exports.getGroupChildParentFill = getGroupChildParentFill;
24353
27450
  exports.getImageColorWashStyle = getImageColorWashStyle;
24354
27451
  exports.getImageEffectsFilter = getImageEffectsFilter;
24355
27452
  exports.getImageEffectsOpacity = getImageEffectsOpacity;
@@ -24371,6 +27468,8 @@ exports.getSecondaryValueAxis = getSecondaryValueAxis;
24371
27468
  exports.getShapeAdjustmentHandleDescriptor = getShapeAdjustmentHandleDescriptor;
24372
27469
  exports.getSlideBackgroundStyle = getSlideBackgroundStyle;
24373
27470
  exports.getSlideTransitionAnimations = getSlideTransitionAnimations;
27471
+ exports.getSoftEdgeFilterId = getSoftEdgeFilterId;
27472
+ exports.getSoftEdgeSvgFilter = getSoftEdgeSvgFilter;
24374
27473
  exports.getSvgStrokeDasharray = getSvgStrokeDasharray;
24375
27474
  exports.getTextAlphaOpacity = getTextAlphaOpacity;
24376
27475
  exports.getTextCompensationTransform = getTextCompensationTransform;
@@ -24381,6 +27480,7 @@ exports.groupSlidesBySection = groupSlidesBySection;
24381
27480
  exports.hasCopyableFormat = hasCopyableFormat;
24382
27481
  exports.hasDistinctScriptFonts = hasDistinctScriptFonts;
24383
27482
  exports.hasPressureVariation = hasPressureVariation;
27483
+ exports.hexToRgbChannels = hexToRgbChannels;
24384
27484
  exports.insertTableColumn = insertTableColumn;
24385
27485
  exports.insertTableRow = insertTableRow;
24386
27486
  exports.isActionHidden = isActionHidden;
@@ -24400,7 +27500,7 @@ exports.isTemplateElementId = isTemplateElementId;
24400
27500
  exports.isUrlSafe = isUrlSafe;
24401
27501
  exports.listAutosaveSnapshots = listAutosaveSnapshots;
24402
27502
  exports.listBackstageRecentFiles = listBackstageRecentFiles;
24403
- exports.loadPresentationDeck = loadPresentationDeck;
27503
+ exports.loadAudienceContent = loadAudienceContent;
24404
27504
  exports.makeCloneId = makeCloneId;
24405
27505
  exports.makeSlideId = makeSlideId;
24406
27506
  exports.mergeAdditiveSelection = mergeAdditiveSelection;
@@ -24428,6 +27528,7 @@ exports.openUrlInNewTab = openUrlInNewTab;
24428
27528
  exports.paletteColor = paletteColor;
24429
27529
  exports.parseDrawingColor = parseDrawingColor;
24430
27530
  exports.parseDrawingColorOpacity = parseDrawingColorOpacity;
27531
+ exports.parseMediaCommand = parseMediaCommand;
24431
27532
  exports.parsePpactionUrl = parsePpactionUrl;
24432
27533
  exports.pickSupportedMimeType = pickSupportedMimeType;
24433
27534
  exports.placeAudienceWindow = placeAudienceWindow;
@@ -24435,6 +27536,8 @@ exports.preprocessCssForCapture = preprocessCssForCapture;
24435
27536
  exports.presentationInkPath = presentationInkPath;
24436
27537
  exports.presenterElapsed = presenterElapsed;
24437
27538
  exports.pressuresToWidths = pressuresToWidths;
27539
+ exports.printPropertiesFrameSlides = printPropertiesFrameSlides;
27540
+ exports.printPropertiesSlidesPerPage = printPropertiesSlidesPerPage;
24438
27541
  exports.readBackstageRecentFile = readBackstageRecentFile;
24439
27542
  exports.readSlidesFromYDoc = readSlidesFromYDoc;
24440
27543
  exports.readStoredViewerPrefs = readStoredViewerPrefs;
@@ -24452,6 +27555,8 @@ exports.resolveAudienceScreenPlacement = resolveAudienceScreenPlacement;
24452
27555
  exports.resolveCssTextAlign = resolveCssTextAlign;
24453
27556
  exports.resolveDrawingShapeNodeId = resolveDrawingShapeNodeId;
24454
27557
  exports.resolveFontForScript = resolveFontForScript;
27558
+ exports.resolveFontRefIdx = resolveFontRefIdx;
27559
+ exports.resolveGroupChildFill = resolveGroupChildFill;
24455
27560
  exports.resolveInkColor = resolveInkColor;
24456
27561
  exports.resolveInkOpacity = resolveInkOpacity;
24457
27562
  exports.resolveInkWidth = resolveInkWidth;
@@ -24469,6 +27574,7 @@ exports.resolveTransportForServerUrl = resolveTransportForServerUrl;
24469
27574
  exports.resolveUnderlineDecorationStyle = resolveUnderlineDecorationStyle;
24470
27575
  exports.resolveViewerAddinRows = resolveViewerAddinRows;
24471
27576
  exports.restoreSegmentSelection = restoreSegmentSelection;
27577
+ exports.revealedSmartArtNodeCount = revealedSmartArtNodeCount;
24472
27578
  exports.safeOpenUrl = safeOpenUrl;
24473
27579
  exports.sanitizeColor = sanitizeColor;
24474
27580
  exports.sanitizeDownloadFilename = sanitizeDownloadFilename;
@@ -24486,6 +27592,7 @@ exports.setCachedResult = setCachedResult;
24486
27592
  exports.setDuotoneCachedResult = setDuotoneCachedResult;
24487
27593
  exports.setPendingSelectionRestore = setPendingSelectionRestore;
24488
27594
  exports.shadeColor2 = shadeColor2;
27595
+ exports.shouldAutoFollowBroadcaster = shouldAutoFollowBroadcaster;
24489
27596
  exports.shouldCommitSmartArtNodeText = shouldCommitSmartArtNodeText;
24490
27597
  exports.shouldConfirmExternalHyperlink = shouldConfirmExternalHyperlink;
24491
27598
  exports.shouldLoopContinuously = shouldLoopContinuously;
@@ -24496,7 +27603,7 @@ exports.snapBoxToGrid = snapBoxToGrid;
24496
27603
  exports.splitCell = splitCell;
24497
27604
  exports.splitSeriesByAxis = splitSeriesByAxis;
24498
27605
  exports.stepPresenterZoom = stepPresenterZoom;
24499
- exports.storePresentationDeck = storePresentationDeck;
27606
+ exports.storeAudienceContent = storeAudienceContent;
24500
27607
  exports.substituteFieldText = substituteFieldText;
24501
27608
  exports.svgLineCap = svgLineCap;
24502
27609
  exports.swapPresentationWindows = swapPresentationWindows;
@@ -24517,4 +27624,6 @@ exports.vermilionRadius = vermilionRadius;
24517
27624
  exports.viewerOptionsToPreferences = viewerOptionsToPreferences;
24518
27625
  exports.withChartPointValue = withChartPointValue;
24519
27626
  exports.withChartTitle = withChartTitle;
27627
+ exports.withFrameSlides = withFrameSlides;
27628
+ exports.withSlidesPerPage = withSlidesPerPage;
24520
27629
  exports.writeStoredViewerPrefs = writeStoredViewerPrefs;