@poe-platform/safe-bash 0.1.810 → 0.1.812

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 (276) hide show
  1. package/dist/audio-ast/flac-source.d.ts +13 -0
  2. package/dist/audio-ast/index.d.ts +2 -0
  3. package/dist/audio-ast/index.js +253 -179
  4. package/dist/audio-ast/vorbis.d.ts +14 -0
  5. package/dist/image-ast/index.js +1 -1
  6. package/dist/json-ast/backed-json-parser.d.ts +12 -1
  7. package/dist/json-ast/index.d.ts +1 -1
  8. package/dist/office-xml/index.d.ts +1 -0
  9. package/dist/office-xml/retained-xml-edits.d.ts +22 -0
  10. package/dist/pdf-ast/cos/qpdf-json-document.d.ts +2 -1
  11. package/dist/pdf-ast/cos/value-parser.d.ts +23 -2
  12. package/dist/pdf-ast/extract/retained-form-field-details.d.ts +20 -0
  13. package/dist/pdf-ast/extract/retained-form-fields.d.ts +17 -4
  14. package/dist/pdf-ast/index.d.ts +1 -0
  15. package/dist/pdf-ast/index.js +844 -384
  16. package/dist/pdf-ast/retained-document.d.ts +6 -0
  17. package/dist/safe-bash/audio-ast.browser.js +3 -1
  18. package/dist/safe-bash/chunks/{chunk-65TFMAZU.js → chunk-BUYRKFW2.js} +8 -35
  19. package/dist/safe-bash/chunks/{chunk-ZA5FQ34E.js → chunk-TPG55BAQ.js} +0 -2
  20. package/dist/safe-bash/command-chunks/{biff-ORSHM4YX-QYPGRDAZ.js → biff-YKPDH35C-MVQIWNKV.js} +2192 -2155
  21. package/dist/safe-bash/command-chunks/{chunk-HEHGHIE2.js → chunk-22MOB45U.js} +6 -6
  22. package/dist/safe-bash/command-chunks/{chunk-6DEWZMOL.js → chunk-2CORNDGF.js} +2 -2
  23. package/dist/safe-bash/command-chunks/{chunk-DCD32BEY.js → chunk-2JSDKQ4J.js} +201 -84
  24. package/dist/safe-bash/command-chunks/{chunk-6UHGIWFX.js → chunk-2ZFLMWOX.js} +1 -1
  25. package/dist/safe-bash/command-chunks/{chunk-HONWGFDA.js → chunk-33YCKZZX.js} +6 -6
  26. package/dist/safe-bash/command-chunks/{chunk-AXWPJRY6.js → chunk-36XGIPOG.js} +1 -1
  27. package/dist/safe-bash/command-chunks/{chunk-D5AYP2UM.js → chunk-3Q247UDJ.js} +26 -16
  28. package/dist/safe-bash/command-chunks/{chunk-32ADKP5E.js → chunk-456PHA3L.js} +1 -1
  29. package/dist/safe-bash/command-chunks/{chunk-UJXP3T6R.js → chunk-4CKFNXRN.js} +1 -1
  30. package/dist/safe-bash/command-chunks/{chunk-5L6GHFRW.js → chunk-554Z6IKP.js} +2 -2
  31. package/dist/safe-bash/command-chunks/{chunk-ORZRWT62.js → chunk-56NYSX65.js} +9 -9
  32. package/dist/safe-bash/command-chunks/{chunk-53JP3S6H.js → chunk-5HPU7D36.js} +4 -4
  33. package/dist/safe-bash/command-chunks/{chunk-HARUYHH7.js → chunk-5HUICAWD.js} +1 -1
  34. package/dist/safe-bash/command-chunks/{chunk-IC5GJI7E.js → chunk-5Q22ZLNC.js} +6 -6
  35. package/dist/safe-bash/command-chunks/{chunk-YO3V5RLY.js → chunk-6CCQI6XZ.js} +12 -12
  36. package/dist/safe-bash/command-chunks/{chunk-EO2IVGV7.js → chunk-6M6TM5Z5.js} +3 -3
  37. package/dist/safe-bash/command-chunks/{chunk-Z54Z3KRN.js → chunk-6QBMND4A.js} +1 -1
  38. package/dist/safe-bash/command-chunks/{chunk-INX4JMQ6.js → chunk-6VPQ3CDZ.js} +5 -5
  39. package/dist/safe-bash/command-chunks/{chunk-VGXVN3BX.js → chunk-7GKKMNL6.js} +8 -8
  40. package/dist/safe-bash/command-chunks/{chunk-TZJC67W3.js → chunk-7PVHO47B.js} +6 -6
  41. package/dist/safe-bash/command-chunks/{chunk-CM3C7AXJ.js → chunk-A2CLZMQZ.js} +1 -1
  42. package/dist/safe-bash/command-chunks/{chunk-ASR27KHW.js → chunk-A5FZBR7X.js} +4 -4
  43. package/dist/safe-bash/command-chunks/{chunk-DMDHE5KC.js → chunk-AHA6IWAJ.js} +6 -6
  44. package/dist/safe-bash/command-chunks/{chunk-PTZ55XXN.js → chunk-APEWTWCC.js} +6 -6
  45. package/dist/safe-bash/command-chunks/{chunk-YUVH6CE4.js → chunk-ATTWQVR2.js} +17 -17
  46. package/dist/safe-bash/command-chunks/{chunk-2VCKUNDZ.js → chunk-B2C3UPJS.js} +27 -17
  47. package/dist/safe-bash/command-chunks/{chunk-JON5DB3Z.js → chunk-B5LDP7AA.js} +2 -2
  48. package/dist/safe-bash/command-chunks/{chunk-YTFWPJ3F.js → chunk-CJQSAATC.js} +26 -26
  49. package/dist/safe-bash/command-chunks/{chunk-CHJL6JMU.js → chunk-COKYZUBW.js} +1 -1
  50. package/dist/safe-bash/command-chunks/{chunk-KCTV4NVX.js → chunk-CRV2Q3PB.js} +1 -1
  51. package/dist/safe-bash/command-chunks/{chunk-V3WXPCKN.js → chunk-CV7M2QJU.js} +7 -7
  52. package/dist/safe-bash/command-chunks/{chunk-VPDSQPSN.js → chunk-DM2CPMB4.js} +2 -2
  53. package/dist/safe-bash/command-chunks/{chunk-3DTDMEOP.js → chunk-EAGIJ4VW.js} +1 -1
  54. package/dist/safe-bash/command-chunks/{chunk-JW6CMBF2.js → chunk-EHSM5ZQS.js} +8 -8
  55. package/dist/safe-bash/command-chunks/{chunk-WIOH7ZQN.js → chunk-ENT3IV2G.js} +12 -12
  56. package/dist/safe-bash/command-chunks/{chunk-5IE4LJGB.js → chunk-EUT24Y5Z.js} +8 -8
  57. package/dist/safe-bash/command-chunks/{chunk-WC2OCF4H.js → chunk-FDCIPJBQ.js} +7 -7
  58. package/dist/safe-bash/command-chunks/{chunk-COKZFXHG.js → chunk-FIIAYCWS.js} +2 -2
  59. package/dist/safe-bash/command-chunks/{chunk-MWVFP2HY.js → chunk-GEM47B2P.js} +7 -7
  60. package/dist/safe-bash/command-chunks/{chunk-EHL6B34L.js → chunk-HDJVJTCK.js} +9 -9
  61. package/dist/safe-bash/command-chunks/{chunk-JMM3MNAY.js → chunk-HKATEVAP.js} +6 -6
  62. package/dist/safe-bash/command-chunks/{chunk-VWY3EAVQ.js → chunk-HTVIYLVB.js} +4 -4
  63. package/dist/safe-bash/command-chunks/{chunk-CHR2OD2U.js → chunk-HWQ2UHMT.js} +9 -9
  64. package/dist/safe-bash/command-chunks/{chunk-Z4QJMDK3.js → chunk-IT7TAC3F.js} +16 -16
  65. package/dist/safe-bash/command-chunks/{chunk-EWS4KYJE.js → chunk-JFYWVQ4V.js} +8 -8
  66. package/dist/safe-bash/command-chunks/{chunk-ZCX63QWA.js → chunk-JOCFI7TG.js} +1 -1
  67. package/dist/safe-bash/command-chunks/{chunk-F5WTH4O4.js → chunk-JQVHUSDD.js} +5 -5
  68. package/dist/safe-bash/command-chunks/{chunk-O4VJEGL6.js → chunk-K5GB2YMN.js} +10 -10
  69. package/dist/safe-bash/command-chunks/{chunk-27C3NT5V.js → chunk-KB7DUBVL.js} +5 -5
  70. package/dist/safe-bash/command-chunks/{chunk-4DZ32PI7.js → chunk-KCOJA7EM.js} +7 -7
  71. package/dist/safe-bash/command-chunks/{chunk-CAXJ4RLF.js → chunk-KJ4XXZIL.js} +12 -12
  72. package/dist/safe-bash/command-chunks/{chunk-U6QHTC5J.js → chunk-L5MCW6CM.js} +4 -4
  73. package/dist/safe-bash/command-chunks/{chunk-LVL3A7YE.js → chunk-LCZDBW55.js} +5 -5
  74. package/dist/safe-bash/command-chunks/{chunk-DJVRDUCA.js → chunk-LXLLA4PM.js} +17 -17
  75. package/dist/safe-bash/command-chunks/{chunk-K7AGAS3K.js → chunk-M7QE2MN7.js} +6 -6
  76. package/dist/safe-bash/command-chunks/{chunk-SWT6ILF2.js → chunk-MPUHH2KR.js} +3 -3
  77. package/dist/safe-bash/command-chunks/{chunk-3ZWBBS6U.js → chunk-NARD63DY.js} +437 -34
  78. package/dist/safe-bash/command-chunks/{chunk-DC3OJLRB.js → chunk-NQDIT667.js} +5 -5
  79. package/dist/safe-bash/command-chunks/{chunk-LWZVDDJA.js → chunk-NUGQQDGE.js} +5 -1
  80. package/dist/safe-bash/command-chunks/{chunk-MFLQZLFR.js → chunk-OA75SGN2.js} +7 -7
  81. package/dist/safe-bash/command-chunks/{chunk-5LATYOF7.js → chunk-OEJM666F.js} +5 -5
  82. package/dist/safe-bash/command-chunks/{chunk-AF25YYIO.js → chunk-PMAM4N33.js} +9 -9
  83. package/dist/safe-bash/command-chunks/{chunk-KMMAJ6H6.js → chunk-PNGDJA6M.js} +2 -2
  84. package/dist/safe-bash/command-chunks/{chunk-62BHPSKJ.js → chunk-Q6S57NOQ.js} +7 -7
  85. package/dist/safe-bash/command-chunks/{chunk-KJ3PEDI2.js → chunk-Q73EMLLZ.js} +146 -4
  86. package/dist/safe-bash/command-chunks/{chunk-FXKBM5KJ.js → chunk-QC5RMGSA.js} +3 -3
  87. package/dist/safe-bash/command-chunks/{chunk-UQ6UIZMM.js → chunk-QD7ZRDUN.js} +1 -1
  88. package/dist/safe-bash/command-chunks/{chunk-JHUYZZGV.js → chunk-QYMEASQ6.js} +4 -4
  89. package/dist/safe-bash/command-chunks/{chunk-3GY5VDIX.js → chunk-QZZ73J2O.js} +6 -6
  90. package/dist/safe-bash/command-chunks/{chunk-S2CYIGWH.js → chunk-R6EGGK5M.js} +7 -7
  91. package/dist/safe-bash/command-chunks/{chunk-7AVN3OBH.js → chunk-RHYJVTJO.js} +2 -2
  92. package/dist/safe-bash/command-chunks/{chunk-EWGDSO6U.js → chunk-RID6VYS3.js} +8 -8
  93. package/dist/safe-bash/command-chunks/{chunk-MMBRBANA.js → chunk-RNSKXOG3.js} +6 -6
  94. package/dist/safe-bash/command-chunks/{chunk-D3ZRZTY5.js → chunk-RQIQ75W5.js} +5 -5
  95. package/dist/safe-bash/command-chunks/{chunk-DWKQPLRT.js → chunk-RRL3Y562.js} +11 -11
  96. package/dist/safe-bash/command-chunks/{chunk-NXCMXD74.js → chunk-S6R3IB36.js} +1 -1
  97. package/dist/safe-bash/command-chunks/{chunk-XUPKFHAQ.js → chunk-SDTPO2VV.js} +7 -7
  98. package/dist/safe-bash/command-chunks/{chunk-PIAGKRFW.js → chunk-SPLOIABU.js} +3 -3
  99. package/dist/safe-bash/command-chunks/{chunk-Z5QOVRVH.js → chunk-SU26FZLJ.js} +1 -1
  100. package/dist/safe-bash/command-chunks/{chunk-WLTJDNSQ.js → chunk-TVH4JORU.js} +3 -3
  101. package/dist/safe-bash/command-chunks/{chunk-6XVMWFHD.js → chunk-TW73OXPR.js} +6 -6
  102. package/dist/safe-bash/command-chunks/{chunk-SFO43CID.js → chunk-UAXSE3XE.js} +5 -5
  103. package/dist/safe-bash/command-chunks/{chunk-K35BSUHO.js → chunk-UYWSIIUX.js} +7 -7
  104. package/dist/safe-bash/command-chunks/{chunk-2E2YEDVB.js → chunk-W5YSINXC.js} +6 -6
  105. package/dist/safe-bash/command-chunks/{chunk-EYNT4OEJ.js → chunk-WGG6G2KG.js} +7 -7
  106. package/dist/safe-bash/command-chunks/{chunk-DVQBZXMQ.js → chunk-WJCN2IXI.js} +2 -2
  107. package/dist/safe-bash/command-chunks/{chunk-XBZ4ZWGL.js → chunk-WVMHRNXZ.js} +3 -3
  108. package/dist/safe-bash/command-chunks/{chunk-7GXUCQI4.js → chunk-WXRYDALR.js} +4 -4
  109. package/dist/safe-bash/command-chunks/{chunk-S4IIOSRA.js → chunk-X7FA7ZD5.js} +8 -8
  110. package/dist/safe-bash/command-chunks/{chunk-DPR5CYQV.js → chunk-XITDDJFT.js} +2 -0
  111. package/dist/safe-bash/command-chunks/{chunk-SFCERNHU.js → chunk-XPD636C4.js} +3 -3
  112. package/dist/safe-bash/command-chunks/{chunk-HYDWQLJ3.js → chunk-XRVKWGVQ.js} +6 -6
  113. package/dist/safe-bash/command-chunks/{chunk-ZEPDT6I5.js → chunk-XVLWZTPY.js} +249 -51
  114. package/dist/safe-bash/command-chunks/{chunk-3UJWHRK4.js → chunk-XVP6V5K3.js} +6 -6
  115. package/dist/safe-bash/command-chunks/{chunk-KTI3BULE.js → chunk-XZ2FWFNV.js} +6 -6
  116. package/dist/safe-bash/command-chunks/{chunk-QK3CHRGL.js → chunk-Y4EYCZFT.js} +10 -10
  117. package/dist/safe-bash/command-chunks/{chunk-GTWVMFBK.js → chunk-YORJDX4V.js} +4 -4
  118. package/dist/safe-bash/command-chunks/{chunk-H6F5SN2N.js → chunk-YSMNXMAO.js} +4 -4
  119. package/dist/safe-bash/command-chunks/{chunk-SE5SJ4JT.js → chunk-Z2JW6M2D.js} +3 -3
  120. package/dist/safe-bash/command-chunks/{chunk-WH3TIOTS.js → chunk-ZEGNRZV2.js} +9 -2
  121. package/dist/safe-bash/command-chunks/{chunk-BYZUOF6X.js → chunk-ZEX53S5I.js} +4010 -3980
  122. package/dist/safe-bash/command-chunks/{chunk-HQYFRQ5W.js → chunk-ZIIO6GRY.js} +7 -7
  123. package/dist/safe-bash/command-chunks/{chunk-NTRZMQZP.js → chunk-ZMHEGDU2.js} +2 -2
  124. package/dist/safe-bash/command-chunks/{chunk-EYBXHGA6.js → chunk-ZXR6LXV5.js} +2 -2
  125. package/dist/safe-bash/command-chunks/{command-engine-BEWABZ75.js → command-engine-BCUQGJJ4.js} +58 -21
  126. package/dist/safe-bash/command-chunks/{engine-MEPOXIXT-WZMRHACG.js → engine-LAUEWYSQ-DQCEI5HE.js} +1 -1
  127. package/dist/safe-bash/command-chunks/pdf-XHHFTOT4-UJJYOYJ2.js +573 -0
  128. package/dist/safe-bash/commands/diff-patch/index.js +0 -3
  129. package/dist/safe-bash/commands/diff3/index.js +0 -2
  130. package/dist/safe-bash/full-core.browser.js +2 -2
  131. package/dist/safe-bash/plugins/index.browser.js +2 -2
  132. package/dist/safe-bash/plugins/index.js +3 -1
  133. package/dist/safe-bash/plugins/portable-commands.d.ts +1 -1
  134. package/dist/safe-bash/plugins/portable-commands.js +5 -3
  135. package/dist/safe-bash/registry-entry.browser.js +1 -1
  136. package/dist/safe-bash-command-apply-patch/apply.js +4 -4
  137. package/dist/safe-bash-command-apply-patch/index.js +4 -4
  138. package/dist/safe-bash-command-apply-patch/matcher.js +2 -2
  139. package/dist/safe-bash-command-apply-patch/parser.js +2 -2
  140. package/dist/safe-bash-command-apply-patch/shared.d.ts +2 -0
  141. package/dist/safe-bash-command-apply-patch/shared.js +1 -1
  142. package/dist/safe-bash-command-diff/index.js +0 -2
  143. package/dist/safe-bash-command-diff3/index.js +830 -56
  144. package/dist/safe-bash-command-ffmpeg/index.js +1 -1
  145. package/dist/safe-bash-command-ffprobe/index.js +2 -2
  146. package/dist/safe-bash-command-ffprobe/media.js +2 -2
  147. package/dist/safe-bash-command-html-to-markdown/index.js +75 -21
  148. package/dist/safe-bash-command-pandoc/command.js +3 -3
  149. package/dist/safe-bash-command-pandoc/execution.d.ts +2 -2
  150. package/dist/safe-bash-command-pandoc/index.d.ts +1 -1
  151. package/dist/safe-bash-command-pandoc/index.js +14 -14
  152. package/dist/safe-bash-command-pandoc/lua-filters.js +2 -2
  153. package/dist/safe-bash-command-pandoc/types.d.ts +17 -2
  154. package/dist/safe-bash-command-patch/index.js +2 -2
  155. package/dist/safe-bash-command-patch/patch-publication.js +1 -1
  156. package/dist/safe-bash-command-patch/patch.js +2 -2
  157. package/dist/safe-bash-command-pdftk/index.js +649 -265
  158. package/dist/safe-bash-command-pptx/command-engine.d.ts +12 -3
  159. package/dist/safe-bash-command-pptx/engine.d.ts +2 -2
  160. package/dist/safe-bash-command-pptx/engine.js +1 -1
  161. package/dist/safe-bash-command-qpdf/index.js +115 -9
  162. package/dist/safe-bash-command-soffice/index.js +1 -1
  163. package/dist/safe-bash-command-ssconvert/index.js +2 -2
  164. package/dist/safe-bash-command-xq/index.js +45 -29
  165. package/dist/safe-bash-diff-engine/document.d.ts +2 -1
  166. package/dist/safe-bash-diff-engine/document.js +7 -4
  167. package/dist/safe-bash-presentation-engine/accessibility.js +30 -30
  168. package/dist/safe-bash-presentation-engine/animation-editing.js +15 -15
  169. package/dist/safe-bash-presentation-engine/animations.js +15 -15
  170. package/dist/safe-bash-presentation-engine/backgrounds.js +16 -16
  171. package/dist/safe-bash-presentation-engine/bytes.js +3 -3
  172. package/dist/safe-bash-presentation-engine/chart-editing.js +33 -33
  173. package/dist/safe-bash-presentation-engine/chart-object-operations.js +24 -24
  174. package/dist/safe-bash-presentation-engine/charts.js +30 -30
  175. package/dist/safe-bash-presentation-engine/command-placeholder.js +56 -55
  176. package/dist/safe-bash-presentation-engine/comments.js +16 -16
  177. package/dist/safe-bash-presentation-engine/connector-operations.js +31 -31
  178. package/dist/safe-bash-presentation-engine/connectors.js +28 -28
  179. package/dist/safe-bash-presentation-engine/content-types.js +4 -4
  180. package/dist/safe-bash-presentation-engine/creation.js +6 -6
  181. package/dist/safe-bash-presentation-engine/diff.js +31 -31
  182. package/dist/safe-bash-presentation-engine/drawing-format.js +19 -19
  183. package/dist/safe-bash-presentation-engine/drawing-operations.js +30 -30
  184. package/dist/safe-bash-presentation-engine/drawing-schema.js +20 -20
  185. package/dist/safe-bash-presentation-engine/equations.js +16 -16
  186. package/dist/safe-bash-presentation-engine/errors.js +2 -2
  187. package/dist/safe-bash-presentation-engine/fields.js +16 -16
  188. package/dist/safe-bash-presentation-engine/font-metrics.js +3 -3
  189. package/dist/safe-bash-presentation-engine/image-extraction.js +19 -19
  190. package/dist/safe-bash-presentation-engine/image-formatting.js +31 -31
  191. package/dist/safe-bash-presentation-engine/image-insertion.js +17 -17
  192. package/dist/safe-bash-presentation-engine/image-replacement.js +20 -20
  193. package/dist/safe-bash-presentation-engine/image-value.js +4 -4
  194. package/dist/safe-bash-presentation-engine/images.js +18 -18
  195. package/dist/safe-bash-presentation-engine/index.d.ts +1 -1
  196. package/dist/safe-bash-presentation-engine/index.js +99 -95
  197. package/dist/safe-bash-presentation-engine/layouts.js +15 -15
  198. package/dist/safe-bash-presentation-engine/length.js +3 -3
  199. package/dist/safe-bash-presentation-engine/links.js +15 -15
  200. package/dist/safe-bash-presentation-engine/masters.js +14 -14
  201. package/dist/safe-bash-presentation-engine/media-editing.js +23 -23
  202. package/dist/safe-bash-presentation-engine/media-extraction.js +16 -16
  203. package/dist/safe-bash-presentation-engine/media.js +15 -15
  204. package/dist/safe-bash-presentation-engine/memberships.js +14 -14
  205. package/dist/safe-bash-presentation-engine/notes.js +15 -15
  206. package/dist/safe-bash-presentation-engine/ole-enum.js +4 -4
  207. package/dist/safe-bash-presentation-engine/ole-insertion.js +19 -19
  208. package/dist/safe-bash-presentation-engine/opaque-objects.js +9 -9
  209. package/dist/safe-bash-presentation-engine/package-reader.js +5 -5
  210. package/dist/safe-bash-presentation-engine/package-tools.js +15 -15
  211. package/dist/safe-bash-presentation-engine/package-uri.js +3 -3
  212. package/dist/safe-bash-presentation-engine/package-writer.js +4 -4
  213. package/dist/safe-bash-presentation-engine/presentation-model.js +55 -54
  214. package/dist/safe-bash-presentation-engine/presentation-settings.js +13 -13
  215. package/dist/safe-bash-presentation-engine/properties.js +15 -15
  216. package/dist/safe-bash-presentation-engine/relationships.js +4 -4
  217. package/dist/safe-bash-presentation-engine/resource-limits.js +1 -1
  218. package/dist/safe-bash-presentation-engine/retained-inspection.js +12 -12
  219. package/dist/safe-bash-presentation-engine/retained-package.js +4 -4
  220. package/dist/safe-bash-presentation-engine/retained-slide-publication.d.ts +24 -0
  221. package/dist/safe-bash-presentation-engine/retained-slide-settings.d.ts +15 -0
  222. package/dist/safe-bash-presentation-engine/retained-text.js +17 -17
  223. package/dist/safe-bash-presentation-engine/sanitize.js +16 -16
  224. package/dist/safe-bash-presentation-engine/selectors.js +10 -10
  225. package/dist/safe-bash-presentation-engine/shape-groups.js +30 -30
  226. package/dist/safe-bash-presentation-engine/shape-operations.js +29 -29
  227. package/dist/safe-bash-presentation-engine/shape-path-operations.js +31 -31
  228. package/dist/safe-bash-presentation-engine/shape-paths.js +15 -15
  229. package/dist/safe-bash-presentation-engine/shape-presets.js +3 -3
  230. package/dist/safe-bash-presentation-engine/shape-selection.js +30 -30
  231. package/dist/safe-bash-presentation-engine/shape-transforms.js +17 -17
  232. package/dist/safe-bash-presentation-engine/shapes.js +26 -26
  233. package/dist/safe-bash-presentation-engine/slide-copy.js +16 -16
  234. package/dist/safe-bash-presentation-engine/slide-import.js +17 -17
  235. package/dist/safe-bash-presentation-engine/slide-merge-split.js +19 -19
  236. package/dist/safe-bash-presentation-engine/slide-model.js +42 -42
  237. package/dist/safe-bash-presentation-engine/slide-removal.js +17 -17
  238. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +9 -9
  239. package/dist/safe-bash-presentation-engine/slides.d.ts +3 -0
  240. package/dist/safe-bash-presentation-engine/slides.js +24 -16
  241. package/dist/safe-bash-presentation-engine/table-operations.js +32 -32
  242. package/dist/safe-bash-presentation-engine/table-spans.js +31 -31
  243. package/dist/safe-bash-presentation-engine/tables.js +30 -30
  244. package/dist/safe-bash-presentation-engine/tags.js +15 -15
  245. package/dist/safe-bash-presentation-engine/template-bindings.js +32 -32
  246. package/dist/safe-bash-presentation-engine/template-repeat.js +39 -39
  247. package/dist/safe-bash-presentation-engine/text-fitting.js +26 -26
  248. package/dist/safe-bash-presentation-engine/text-frames.js +26 -26
  249. package/dist/safe-bash-presentation-engine/text-paragraphs.js +26 -26
  250. package/dist/safe-bash-presentation-engine/text-reading.js +11 -11
  251. package/dist/safe-bash-presentation-engine/text-replacement.js +16 -16
  252. package/dist/safe-bash-presentation-engine/text-runs.js +19 -19
  253. package/dist/safe-bash-presentation-engine/themes.js +15 -15
  254. package/dist/safe-bash-presentation-engine/transitions.js +15 -15
  255. package/dist/safe-bash-presentation-engine/validation.js +9 -9
  256. package/dist/safe-bash-presentation-engine/xml-parts.js +15 -15
  257. package/dist/safe-bash-presentation-engine/xml-view.js +3 -3
  258. package/dist/safe-bash-presentation-engine/xml.js +3 -3
  259. package/dist/safe-bash-xml-engine/json.d.ts +1 -0
  260. package/dist/safe-bash-xml-engine/json.js +203 -0
  261. package/dist/safe-bash-xml-engine/stored-json.d.ts +5 -0
  262. package/dist/spreadsheet-engine/rendering/print/bidi-runs.d.ts +5 -0
  263. package/dist/spreadsheet-engine/rendering/print/bidi-runs.js +35 -0
  264. package/dist/spreadsheet-engine/rendering/print/control-bidi.d.ts +8 -0
  265. package/dist/spreadsheet-engine/rendering/print/control-bidi.js +80 -0
  266. package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +4 -4
  267. package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +76 -30
  268. package/dist/spreadsheet-format-xls/biff-encryption.js +1 -1
  269. package/dist/spreadsheet-format-xls/biff-metadata.d.ts +1 -0
  270. package/dist/spreadsheet-format-xls/biff-metadata.js +2 -2
  271. package/dist/spreadsheet-format-xls/biff-property-bytes.d.ts +4 -1
  272. package/dist/spreadsheet-format-xls/biff-property-bytes.js +1 -1
  273. package/dist/spreadsheet-format-xls/biff-range.js +1 -1
  274. package/dist/spreadsheet-format-xls/biff-write-metadata.js +10 -1
  275. package/package.json +5 -2
  276. package/dist/safe-bash/command-chunks/pdf-LOZAXXS6-ERI57IAV.js +0 -557
@@ -7,12 +7,13 @@ import {
7
7
  createMediaAstRegistry,
8
8
  encodeUtf8,
9
9
  parseStreamingManifest
10
- } from "./chunk-DCD32BEY.js";
10
+ } from "./chunk-2JSDKQ4J.js";
11
11
 
12
- // packages/safe-bash-command-ffprobe/src/wav-tags.ts
12
+ // packages/safe-bash-command-ffprobe/src/flac-tags.ts
13
13
  import { IntegerTable, PagedStorage } from "@poe-platform/safe-fs/storage";
14
+ import { normalizeVorbisCommentKey } from "../../audio-ast/index.js";
14
15
  import { yieldTurn } from "../../safe-bash-contracts/yield.js";
15
- var WavTags = class {
16
+ var FlacTags = class {
16
17
  constructor(source, context) {
17
18
  this.source = source;
18
19
  this.context = context;
@@ -28,6 +29,168 @@ var WavTags = class {
28
29
  numeric;
29
30
  head = 0;
30
31
  tail = 0;
32
+ work = 0;
33
+ count = 0;
34
+ close;
35
+ async read(offset, length) {
36
+ this.context.signal.throwIfAborted();
37
+ const bytes = await this.source.read(offset, length);
38
+ this.context.signal.throwIfAborted();
39
+ if (bytes.length !== length) throw new Error("Truncated FLAC comment");
40
+ return bytes;
41
+ }
42
+ async *decoded(offset, length, ignoreBOM) {
43
+ const decoder = new TextDecoder("utf-8", { ignoreBOM });
44
+ let steps = 0;
45
+ for (let at = 0; at < length; at += 16384) {
46
+ yield decoder.decode(await this.read(offset + at, Math.min(16384, length - at)), { stream: true });
47
+ if (++steps % 256 === 0) await yieldTurn(this.context.signal);
48
+ }
49
+ yield decoder.decode();
50
+ }
51
+ async record(position) {
52
+ const bytes = await this.storage.read(position, 64), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
53
+ return Array.from({ length: 8 }, (_, i) => view.getFloat64(i * 8, true));
54
+ }
55
+ async write(position, values) {
56
+ const bytes = new Uint8Array(values.length * 8), view = new DataView(bytes.buffer);
57
+ values.forEach((value, i) => view.setFloat64(i * 8, value, true));
58
+ await this.storage.write(position, bytes);
59
+ }
60
+ async equal(a, b, units) {
61
+ for (let at = 0; at < units * 2; at += 16384) {
62
+ const size = Math.min(16384, units * 2 - at), left = await this.storage.read(a + at, size), right = await this.storage.read(b + at, size);
63
+ if (!left.every((value, i) => value === right[i])) return false;
64
+ }
65
+ return true;
66
+ }
67
+ async *keyText(position, units) {
68
+ let pending = "";
69
+ for (let at = 0; at < units; at += 8192) {
70
+ const bytes = await this.storage.read(position + at * 2, Math.min(8192, units - at) * 2), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
71
+ let text = pending;
72
+ pending = "";
73
+ for (let i = 0; i < bytes.length; i += 2) text += String.fromCharCode(view.getUint16(i, true));
74
+ const last = text.charCodeAt(text.length - 1);
75
+ if (last >= 55296 && last <= 56319) {
76
+ pending = text.slice(-1);
77
+ text = text.slice(0, -1);
78
+ }
79
+ if (text) yield text;
80
+ }
81
+ if (pending) yield pending;
82
+ }
83
+ async add(span) {
84
+ if (++this.work % 256 === 0) await yieldTurn(this.context.signal);
85
+ let split = -1;
86
+ for (let at = 0; at < span.length; at += 16384) {
87
+ const bytes = await this.read(span.offset + at, Math.min(16384, span.length - at)), found = bytes.indexOf(61);
88
+ if (found >= 0) {
89
+ split = at + found;
90
+ break;
91
+ }
92
+ if ((at / 16384 + 1) % 256 === 0) await yieldTurn(this.context.signal);
93
+ }
94
+ if (split <= 0) return;
95
+ let keyPosition = this.storage.allocate(0), units = 0, hash = 2166136261, short = "";
96
+ const appendKey = async (text) => {
97
+ for (let at = 0; at < text.length; at += 8192) {
98
+ const part = text.slice(at, at + 8192), bytes = new Uint8Array(part.length * 2), view = new DataView(bytes.buffer);
99
+ for (let i = 0; i < part.length; i++) {
100
+ const code = part.charCodeAt(i);
101
+ view.setUint16(i * 2, code, true);
102
+ hash = Math.imul(hash ^ code, 16777619) >>> 0;
103
+ }
104
+ await this.storage.append(bytes);
105
+ units += part.length;
106
+ if (short.length <= 12) short += part.slice(0, 13 - short.length);
107
+ }
108
+ };
109
+ for await (const part of this.decoded(span.offset, split, false)) await appendKey(part.toUpperCase());
110
+ if (!units) return;
111
+ if (units <= 12) {
112
+ const normalized = normalizeVorbisCommentKey(short);
113
+ if (normalized !== short) {
114
+ keyPosition = this.storage.allocate(0);
115
+ units = 0;
116
+ hash = 2166136261;
117
+ short = "";
118
+ await appendKey(normalized);
119
+ }
120
+ }
121
+ const first = await this.keys.get(BigInt(hash));
122
+ let existing = 0, row;
123
+ for (let position2 = Number(first ?? 0n); position2; ) {
124
+ const candidate = await this.record(position2);
125
+ if (candidate[3] === units && await this.equal(candidate[2], keyPosition, units)) {
126
+ existing = position2;
127
+ row = candidate;
128
+ break;
129
+ }
130
+ position2 = candidate[1];
131
+ }
132
+ const position = existing || this.storage.allocate(64);
133
+ row ??= [0, Number(first ?? 0n), keyPosition, units, span.block, 0, 0, 0];
134
+ const append = row[4] === span.block && !!row[7], value = this.storage.allocate(32), offset = span.offset + split + 1, length = span.length - split - 1;
135
+ await this.write(value, [0, offset, length, append ? 1 : 0]);
136
+ if (append) await this.write(row[6], [value]);
137
+ else row[5] = value;
138
+ row[4] = span.block;
139
+ row[6] = value;
140
+ row[7] = append || length > 0 ? 1 : 0;
141
+ await this.write(position, row);
142
+ if (existing) return;
143
+ await this.keys.set(BigInt(hash), BigInt(position));
144
+ this.count++;
145
+ const numeric = units <= 10 ? Number(short) : NaN;
146
+ if (Number.isInteger(numeric) && numeric >= 0 && numeric < 4294967295 && String(numeric) === short) await this.numeric.set(BigInt(numeric), BigInt(position));
147
+ else {
148
+ if (this.tail) await this.write(this.tail, [position]);
149
+ else this.head = position;
150
+ this.tail = position;
151
+ }
152
+ }
153
+ async *valueText(value) {
154
+ while (value) {
155
+ const bytes = await this.storage.read(value, 32), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
156
+ if (view.getFloat64(24, true)) yield "\n";
157
+ yield* this.decoded(view.getFloat64(8, true), view.getFloat64(16, true), true);
158
+ value = view.getFloat64(0, true);
159
+ }
160
+ }
161
+ async entry(position) {
162
+ const row = await this.record(position);
163
+ return { next: row[0], key: () => this.keyText(row[2], row[3]), text: () => this.valueText(row[5]) };
164
+ }
165
+ async *entries() {
166
+ for await (const [, position] of this.numeric.entries()) yield await this.entry(Number(position));
167
+ for (let position = this.head; position; ) {
168
+ const entry = await this.entry(position);
169
+ position = entry.next;
170
+ yield entry;
171
+ }
172
+ }
173
+ };
174
+
175
+ // packages/safe-bash-command-ffprobe/src/wav-tags.ts
176
+ import { IntegerTable as IntegerTable2, PagedStorage as PagedStorage2 } from "@poe-platform/safe-fs/storage";
177
+ import { yieldTurn as yieldTurn2 } from "../../safe-bash-contracts/yield.js";
178
+ var WavTags = class {
179
+ constructor(source, context) {
180
+ this.source = source;
181
+ this.context = context;
182
+ this.storage = new PagedStorage2(context, 4);
183
+ this.close = this.storage.close.bind(this.storage);
184
+ this.keys = new IntegerTable2(this.storage, 128);
185
+ this.numeric = new IntegerTable2(this.storage, 128);
186
+ }
187
+ source;
188
+ context;
189
+ storage;
190
+ keys;
191
+ numeric;
192
+ head = 0;
193
+ tail = 0;
31
194
  count = 0;
32
195
  close;
33
196
  async *decoded(offset, length) {
@@ -39,7 +202,7 @@ var WavTags = class {
39
202
  this.context.signal.throwIfAborted();
40
203
  if (bytes.length !== Math.min(16384, length - at)) throw new Error("Truncated WAV tag");
41
204
  yield decoder.decode(bytes, { stream: true });
42
- if (++steps % 256 === 0) await yieldTurn(this.context.signal);
205
+ if (++steps % 256 === 0) await yieldTurn2(this.context.signal);
43
206
  }
44
207
  yield decoder.decode();
45
208
  }
@@ -287,8 +450,7 @@ function formatAudioProbe(audio, size, parsed) {
287
450
  }
288
451
 
289
452
  // packages/safe-bash-command-ffprobe/src/tag-format.ts
290
- async function* parts(value, prefix = "") {
291
- if (prefix) yield prefix;
453
+ async function* parts(value) {
292
454
  if (typeof value === "function") yield* value();
293
455
  else yield String(value);
294
456
  }
@@ -347,7 +509,24 @@ async function* formatTaggedAudio(audio, size, args, tags) {
347
509
  const rows = audioProbeRows({ ...audio, nodes: [] }, size, parsed, tags.count > 0);
348
510
  async function* tagFields(section) {
349
511
  const selected = sections.get(section + "_tags");
350
- for await (const entry of tags.entries()) if (selected === void 0 || selected.includes(entry.key)) yield { key: entry.key, value: entry.text };
512
+ for await (const entry of tags.entries()) {
513
+ let included = selected === void 0;
514
+ for (const wanted of selected ?? []) {
515
+ let at = 0, matches = true;
516
+ for await (const part of parts(entry.key)) {
517
+ if (wanted.slice(at, at + part.length) !== part) {
518
+ matches = false;
519
+ break;
520
+ }
521
+ at += part.length;
522
+ }
523
+ if (matches && at === wanted.length) {
524
+ included = true;
525
+ break;
526
+ }
527
+ }
528
+ if (included) yield { key: entry.key, value: entry.text };
529
+ }
351
530
  }
352
531
  async function* jsonRow(row, section, indent) {
353
532
  yield "{";
@@ -359,8 +538,10 @@ async function* formatTaggedAudio(audio, size, args, tags) {
359
538
  yield "{";
360
539
  let firstTag = true;
361
540
  for await (const field of tagFields(section)) {
362
- yield (firstTag ? "\n" : ",\n") + " ".repeat(indent + 8) + JSON.stringify(field.key) + ": ";
541
+ yield (firstTag ? "\n" : ",\n") + " ".repeat(indent + 8);
363
542
  firstTag = false;
543
+ yield* jsonString(parts(field.key));
544
+ yield ": ";
364
545
  yield* jsonString(parts(field.value));
365
546
  }
366
547
  yield (firstTag ? "" : "\n" + " ".repeat(indent + 4)) + "}";
@@ -400,7 +581,7 @@ async function* formatTaggedAudio(audio, size, args, tags) {
400
581
  async function* fields() {
401
582
  for (const [key, value] of Object.entries(row)) {
402
583
  if (typeof value === "object") {
403
- for await (const tag of tagFields(section)) yield { key: "tag:" + tag.key, value: tag.value };
584
+ for await (const tag of tagFields(section)) yield { key: tag.key, value: tag.value, tag: true };
404
585
  } else yield { key, value };
405
586
  }
406
587
  }
@@ -414,19 +595,28 @@ async function* formatTaggedAudio(audio, size, args, tags) {
414
595
  for await (const field of fields()) {
415
596
  if (!first) yield separator;
416
597
  first = false;
417
- const prefix = enabled("nokey", "nk", format === "csv") ? "" : field.key + "=";
598
+ async function* value() {
599
+ if (!enabled("nokey", "nk", format === "csv")) {
600
+ if (field.tag) yield "tag:";
601
+ yield* parts(field.key);
602
+ yield "=";
603
+ }
604
+ yield* parts(field.value);
605
+ }
418
606
  if (format === "csv") {
419
- const quote = await needsQuotes(parts(field.value, prefix), separator);
607
+ const quote = await needsQuotes(value(), separator);
420
608
  if (quote) yield '"';
421
- yield* quote ? replace(parts(field.value, prefix), '"', '""') : parts(field.value, prefix);
609
+ yield* quote ? replace(value(), '"', '""') : value();
422
610
  if (quote) yield '"';
423
- } else yield* replace(replace(replace(replace(parts(field.value, prefix), "\\", "\\\\"), "\n", "\\n"), "\r", "\\r"), separator, "\\" + separator);
611
+ } else yield* replace(replace(replace(replace(value(), "\\", "\\\\"), "\n", "\\n"), "\r", "\\r"), separator, "\\" + separator);
424
612
  }
425
613
  yield "\n";
426
614
  } else if (format === "flat") {
427
615
  const prefix = section === "stream" ? `streams.stream.${streamIndex++}` : "format";
428
616
  for await (const field of fields()) {
429
- yield prefix + "." + (field.key.startsWith("tag:") ? "tags." + field.key.slice(4) : field.key) + "=";
617
+ yield prefix + "." + (field.tag ? "tags." : "");
618
+ yield* parts(field.key);
619
+ yield "=";
430
620
  if (typeof field.value === "number") yield String(field.value);
431
621
  else yield* jsonString(parts(field.value));
432
622
  yield "\n";
@@ -434,7 +624,11 @@ async function* formatTaggedAudio(audio, size, args, tags) {
434
624
  } else {
435
625
  if (!enabled("noprint_wrappers", "nw", false)) yield "[" + section.toUpperCase() + "]\n";
436
626
  for await (const field of fields()) {
437
- if (!enabled("nokey", "nk", false)) yield (field.key.startsWith("tag:") ? "TAG:" + field.key.slice(4) : field.key) + "=";
627
+ if (!enabled("nokey", "nk", false)) {
628
+ if (field.tag) yield "TAG:";
629
+ yield* parts(field.key);
630
+ yield "=";
631
+ }
438
632
  yield* parts(field.value);
439
633
  yield "\n";
440
634
  }
@@ -444,9 +638,9 @@ async function* formatTaggedAudio(audio, size, args, tags) {
444
638
  }
445
639
 
446
640
  // packages/safe-bash-command-ffprobe/src/probe-output.ts
447
- import { PagedStorage as PagedStorage2 } from "@poe-platform/safe-fs/storage";
641
+ import { PagedStorage as PagedStorage3 } from "@poe-platform/safe-fs/storage";
448
642
  import { writeBytes } from "../../safe-bash-contracts/io.js";
449
- import { yieldTurn as yieldTurn2 } from "../../safe-bash-contracts/yield.js";
643
+ import { yieldTurn as yieldTurn3 } from "../../safe-bash-contracts/yield.js";
450
644
  async function* encodeParts(parts2, signal) {
451
645
  const encoder = new TextEncoder();
452
646
  let high = "", steps = 0;
@@ -462,13 +656,13 @@ async function* encodeParts(parts2, signal) {
462
656
  text = text.slice(0, -1);
463
657
  }
464
658
  if (text) yield encoder.encode(text);
465
- if (++steps % 256 === 0) await yieldTurn2(signal);
659
+ if (++steps % 256 === 0) await yieldTurn3(signal);
466
660
  }
467
661
  }
468
662
  if (high) yield encoder.encode(high);
469
663
  }
470
664
  async function writeProbeOutput(context, parts2, check, beforePublish) {
471
- const storage = new PagedStorage2(context, 4), start = storage.allocate(0);
665
+ const storage = new PagedStorage3(context, 4), start = storage.allocate(0);
472
666
  let size = 0, failed = true;
473
667
  try {
474
668
  for await (const bytes of encodeParts(parts2, context.signal)) {
@@ -494,10 +688,10 @@ async function writeProbeOutput(context, parts2, check, beforePublish) {
494
688
  }
495
689
 
496
690
  // packages/safe-bash-command-ffprobe/src/stream-input.ts
497
- import { PagedStorage as PagedStorage3 } from "@poe-platform/safe-fs/storage";
691
+ import { PagedStorage as PagedStorage4 } from "@poe-platform/safe-fs/storage";
498
692
  import { readBytes } from "../../safe-bash-contracts/io.js";
499
693
  import { readFileStream } from "../../safe-bash-contracts/filesystem.js";
500
- import { yieldTurn as yieldTurn3 } from "../../safe-bash-contracts/yield.js";
694
+ import { yieldTurn as yieldTurn4 } from "../../safe-bash-contracts/yield.js";
501
695
  async function openProbeStream(context, path) {
502
696
  context.signal.throwIfAborted();
503
697
  if (path === void 0) return readBytes(context.stdin, context.signal);
@@ -506,7 +700,7 @@ async function openProbeStream(context, path) {
506
700
  if (!context.fs.readStream || capabilities.streamingRead === false || context.fs.capabilities.streamingRead === false) return void 0;
507
701
  return readFileStream(context.fs, path, { signal: context.signal, chunkSize: 16384 });
508
702
  }
509
- async function sniffWavStream(source, signal, account) {
703
+ async function sniffMediaStream(source, signal, account) {
510
704
  const iterator = source[Symbol.asyncIterator](), prefix = new Uint8Array(12);
511
705
  let size = 0, total = 0, ended = false;
512
706
  let remainder = new Uint8Array(0);
@@ -566,11 +760,10 @@ async function sniffWavStream(source, signal, account) {
566
760
  }
567
761
  }
568
762
  }
569
- const text = new TextDecoder().decode(prefix);
570
- return { wav: size === 12 && text.slice(0, 4) === "RIFF" && text.slice(8) === "WAVE", stream: replay() };
763
+ return { prefix: prefix.subarray(0, size), stream: replay() };
571
764
  }
572
765
  async function withStagedProbeSource(context, input, probe2, retain) {
573
- const storage = new PagedStorage3(context, 4);
766
+ const storage = new PagedStorage4(context, 4);
574
767
  retain?.(storage.close.bind(storage));
575
768
  let start;
576
769
  let size = 0, steps = 0, failed = true;
@@ -580,7 +773,7 @@ async function withStagedProbeSource(context, input, probe2, retain) {
580
773
  size += chunk.length;
581
774
  start ??= storage.allocate(0);
582
775
  await storage.append(chunk);
583
- if (++steps % 256 === 0) await yieldTurn3(context.signal);
776
+ if (++steps % 256 === 0) await yieldTurn4(context.signal);
584
777
  }
585
778
  context.signal.throwIfAborted();
586
779
  start ??= storage.allocate(0);
@@ -602,7 +795,7 @@ async function withStagedProbeSource(context, input, probe2, retain) {
602
795
  }
603
796
 
604
797
  // packages/safe-bash-command-ffprobe/src/media.ts
605
- import { probeWavSource } from "../../audio-ast/index.js";
798
+ import { probeWavSource, probeFlacSource } from "../../audio-ast/index.js";
606
799
  import { commandRuntimeIdentity, getCommandArguments } from "../../safe-bash-contracts/command.js";
607
800
  import { readBytes as readBytes2, writeBytes as writeBytes2 } from "../../safe-bash-contracts/io.js";
608
801
  function isStdin(path) {
@@ -1107,7 +1300,7 @@ function parseProbeArguments(args) {
1107
1300
  inputTarget
1108
1301
  };
1109
1302
  }
1110
- async function probeSourceMetadata(context, plugin, input, filename, budget, records, onAudio, retain, detect = false) {
1303
+ async function probeSourceMetadata(context, plugins, input, filename, budget, records, onAudio, retain, detect = false) {
1111
1304
  let sourceFailed = false;
1112
1305
  const source = { size: input.size, async read(offset, length) {
1113
1306
  try {
@@ -1119,30 +1312,34 @@ async function probeSourceMetadata(context, plugin, input, filename, budget, rec
1119
1312
  throw error;
1120
1313
  }
1121
1314
  } };
1122
- if (detect || onAudio) {
1123
- if (input.size < 12) {
1124
- return void 0;
1125
- }
1126
- const header = await source.read(0, 12);
1315
+ let plugin = plugins[0];
1316
+ if (detect) {
1317
+ const header = await source.read(0, Math.min(12, input.size));
1127
1318
  context.signal.throwIfAborted();
1128
- const text = new TextDecoder().decode(header);
1129
- if (text.slice(0, 4) !== "RIFF" || text.slice(8) !== "WAVE") {
1130
- return void 0;
1131
- }
1319
+ plugin = plugins.find((candidate) => candidate.detect(header, filename));
1132
1320
  }
1321
+ if (!plugin) return void 0;
1133
1322
  const result = await plugin.probeMetadata(source, { ...records, filename, signal: context.signal, budget, limits: budget.limits });
1134
1323
  if (onAudio) {
1135
- const tags = new WavTags(source, context);
1324
+ const tags = plugin.formatName === "flac" ? new FlacTags(source, context) : new WavTags(source, context);
1136
1325
  retain(tags.close);
1137
1326
  try {
1138
- onAudio(await probeWavSource(source, { signal: context.signal, onTag: async (span) => {
1327
+ const audio = tags instanceof FlacTags ? await probeFlacSource(source, { signal: context.signal, onComment: async (span) => {
1328
+ try {
1329
+ await tags.add(span);
1330
+ } catch (error) {
1331
+ sourceFailed = true;
1332
+ throw error;
1333
+ }
1334
+ } }) : await probeWavSource(source, { signal: context.signal, onTag: async (span) => {
1139
1335
  try {
1140
1336
  await tags.add(span);
1141
1337
  } catch (error) {
1142
1338
  sourceFailed = true;
1143
1339
  throw error;
1144
1340
  }
1145
- } }), input.size, tags);
1341
+ } });
1342
+ onAudio(audio, input.size, tags);
1146
1343
  } catch (error) {
1147
1344
  context.signal.throwIfAborted();
1148
1345
  if (sourceFailed) throw error;
@@ -1150,8 +1347,8 @@ async function probeSourceMetadata(context, plugin, input, filename, budget, rec
1150
1347
  }
1151
1348
  return result;
1152
1349
  }
1153
- async function probeRetainedMetadata(context, plugin, path, filename, budget, records, onAudio, retain, detect = false) {
1154
- if (!plugin.canDemux || !plugin.probeMetadata || !context.fs.openReadFile) return void 0;
1350
+ async function probeRetainedMetadata(context, plugins, path, filename, budget, records, onAudio, retain, detect = false) {
1351
+ if (!plugins.length || !context.fs.openReadFile) return void 0;
1155
1352
  context.signal.throwIfAborted();
1156
1353
  const capabilities = await context.fs.capabilitiesFor?.(path, { signal: context.signal }) ?? context.fs.capabilities;
1157
1354
  context.signal.throwIfAborted();
@@ -1166,7 +1363,7 @@ async function probeRetainedMetadata(context, plugin, path, filename, budget, re
1166
1363
  if (!Number.isSafeInteger(stat.size) || stat.size < 0) throw new Error("Invalid media source size");
1167
1364
  context.inputBudget?.check(stat.size);
1168
1365
  budget.checkInputBytes(stat.size);
1169
- const result = await probeSourceMetadata(context, plugin, {
1366
+ const result = await probeSourceMetadata(context, plugins, {
1170
1367
  size: stat.size,
1171
1368
  read: (offset, length) => handle.read(offset, length, { signal: context.signal })
1172
1369
  }, filename, budget, records, onAudio, retain, detect);
@@ -1287,24 +1484,25 @@ function createFfprobeCommand(options = {}) {
1287
1484
  automaticAudio = false;
1288
1485
  }
1289
1486
  }
1290
- const automaticPlugin = !options.asts && !explicitFormat ? registry.findByFormatName("wav") : void 0;
1487
+ const automaticPlugins = !options.asts && !explicitFormat ? astPlugins.filter((plugin) => plugin.canDemux && plugin.probeMetadata && (!automaticAudio || plugin === registry.findByFormatName("wav") || plugin === registry.findByFormatName("flac"))) : [];
1291
1488
  const explicitPlugin = explicitFormat ? registry.findByFormatName(explicitFormat) : void 0;
1292
- const retainedPlugin = explicitPlugin ?? automaticPlugin;
1293
- let probeResult = retainedPlugin && !isStdin(inputTarget) ? await probeRetainedMetadata(context, retainedPlugin, resolvePath(context.cwd, inputTarget), inputTarget, budget, { showPackets, showFrames }, automaticAudio ? (audio, size, tags) => {
1489
+ const retainedPlugins = explicitPlugin ? explicitPlugin.canDemux && explicitPlugin.probeMetadata ? [explicitPlugin] : [] : automaticPlugins;
1490
+ let probeResult = retainedPlugins.length && !isStdin(inputTarget) ? await probeRetainedMetadata(context, retainedPlugins, resolvePath(context.cwd, inputTarget), inputTarget, budget, { showPackets, showFrames }, automaticAudio ? (audio, size, tags) => {
1294
1491
  audioInput = { audio, size, args };
1295
1492
  storedTags = tags;
1296
- } : void 0, retain, automaticPlugin !== void 0) : void 0;
1493
+ } : void 0, retain, !explicitPlugin) : void 0;
1297
1494
  if (!probeResult && explicitPlugin)
1298
1495
  probeResult = await probeStreamMetadata(context, explicitPlugin, inputTarget, budget, { showPackets, showFrames });
1299
1496
  let replay;
1300
- if (!probeResult && automaticPlugin?.probeMetadata) {
1497
+ if (!probeResult && automaticPlugins.length) {
1301
1498
  const source = await openProbeStream(context, isStdin(inputTarget) ? void 0 : resolvePath(context.cwd, inputTarget));
1302
1499
  if (source) {
1303
- const sniffed = await sniffWavStream(source, context.signal, (total) => {
1500
+ const sniffed = await sniffMediaStream(source, context.signal, (total) => {
1304
1501
  context.inputBudget?.check(total);
1305
1502
  budget.checkInputBytes(total);
1306
1503
  });
1307
- if (sniffed.wav) {
1504
+ const automaticPlugin = automaticPlugins.find((plugin) => plugin.detect(sniffed.prefix, inputTarget));
1505
+ if (automaticPlugin) {
1308
1506
  if (!automaticAudio && automaticPlugin.probeMetadataStream) {
1309
1507
  probeResult = await automaticPlugin.probeMetadataStream(sniffed.stream, {
1310
1508
  showPackets,
@@ -1316,7 +1514,7 @@ function createFfprobeCommand(options = {}) {
1316
1514
  });
1317
1515
  context.signal.throwIfAborted();
1318
1516
  } else {
1319
- probeResult = await withStagedProbeSource(context, sniffed.stream, (source2) => probeSourceMetadata(context, automaticPlugin, source2, inputTarget, budget, { showPackets, showFrames }, automaticAudio ? (audio, size, tags) => {
1517
+ probeResult = await withStagedProbeSource(context, sniffed.stream, (source2) => probeSourceMetadata(context, [automaticPlugin], source2, inputTarget, budget, { showPackets, showFrames }, automaticAudio ? (audio, size, tags) => {
1320
1518
  audioInput = { audio, size, args };
1321
1519
  storedTags = tags;
1322
1520
  } : void 0, retain), retain);
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  readTextBodies,
3
3
  validateTextReadingOptions
4
- } from "./chunk-HONWGFDA.js";
4
+ } from "./chunk-33YCKZZX.js";
5
5
  import {
6
6
  loadShared
7
- } from "./chunk-ORZRWT62.js";
7
+ } from "./chunk-56NYSX65.js";
8
8
  import {
9
9
  SelectionError
10
- } from "./chunk-S4IIOSRA.js";
10
+ } from "./chunk-X7FA7ZD5.js";
11
11
  import {
12
12
  protectedEquationNodes
13
- } from "./chunk-6UHGIWFX.js";
13
+ } from "./chunk-2ZFLMWOX.js";
14
14
  import {
15
15
  parseXmlPart
16
- } from "./chunk-5L6GHFRW.js";
16
+ } from "./chunk-554Z6IKP.js";
17
17
  import {
18
18
  OfficeError
19
- } from "./chunk-KJ3PEDI2.js";
19
+ } from "./chunk-Q73EMLLZ.js";
20
20
 
21
21
  // packages/safe-bash-presentation-engine/src/text-replacement.ts
22
22
  function authored(value, maximum) {
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  readTextBodies,
3
3
  validateTextReadingOptions
4
- } from "./chunk-HONWGFDA.js";
4
+ } from "./chunk-33YCKZZX.js";
5
5
  import {
6
6
  colorMerge,
7
7
  defineXmlEnum,
8
8
  readRunColor,
9
9
  validateRunColor
10
- } from "./chunk-53JP3S6H.js";
10
+ } from "./chunk-5HPU7D36.js";
11
11
  import {
12
12
  loadShared
13
- } from "./chunk-ORZRWT62.js";
13
+ } from "./chunk-56NYSX65.js";
14
14
  import {
15
15
  SelectionError
16
- } from "./chunk-S4IIOSRA.js";
16
+ } from "./chunk-X7FA7ZD5.js";
17
17
  import {
18
18
  protectedEquationNodes
19
- } from "./chunk-6UHGIWFX.js";
19
+ } from "./chunk-2ZFLMWOX.js";
20
20
  import {
21
21
  OfficeError
22
- } from "./chunk-KJ3PEDI2.js";
22
+ } from "./chunk-Q73EMLLZ.js";
23
23
 
24
24
  // packages/safe-bash-presentation-engine/src/text-runs.ts
25
25
  var UnderlineValue = /* @__PURE__ */ ((UnderlineValue2) => {
@@ -1,34 +1,34 @@
1
1
  import {
2
2
  escape
3
- } from "./chunk-ORZRWT62.js";
3
+ } from "./chunk-56NYSX65.js";
4
4
  import {
5
5
  writePackageArchive
6
- } from "./chunk-VPDSQPSN.js";
6
+ } from "./chunk-DM2CPMB4.js";
7
7
  import {
8
8
  buildSelectionIndex,
9
9
  readSelectionIndex
10
- } from "./chunk-S4IIOSRA.js";
10
+ } from "./chunk-X7FA7ZD5.js";
11
11
  import {
12
12
  readPackage
13
- } from "./chunk-SFCERNHU.js";
13
+ } from "./chunk-XPD636C4.js";
14
14
  import {
15
15
  readBinary
16
- } from "./chunk-KMMAJ6H6.js";
16
+ } from "./chunk-PNGDJA6M.js";
17
17
  import {
18
18
  parseXmlPart
19
- } from "./chunk-5L6GHFRW.js";
19
+ } from "./chunk-554Z6IKP.js";
20
20
  import {
21
21
  parseContentTypes
22
- } from "./chunk-DVQBZXMQ.js";
22
+ } from "./chunk-WJCN2IXI.js";
23
23
  import {
24
24
  readRelationshipGraph
25
- } from "./chunk-NTRZMQZP.js";
25
+ } from "./chunk-ZMHEGDU2.js";
26
26
  import {
27
27
  relativePartReference
28
- } from "./chunk-AXWPJRY6.js";
28
+ } from "./chunk-36XGIPOG.js";
29
29
  import {
30
30
  OfficeError
31
- } from "./chunk-KJ3PEDI2.js";
31
+ } from "./chunk-Q73EMLLZ.js";
32
32
 
33
33
  // packages/safe-bash-presentation-engine/src/links.ts
34
34
  var dialects = [
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  readTextBodies,
3
3
  validateTextReadingOptions
4
- } from "./chunk-HONWGFDA.js";
4
+ } from "./chunk-33YCKZZX.js";
5
5
  import {
6
6
  loadShared
7
- } from "./chunk-ORZRWT62.js";
7
+ } from "./chunk-56NYSX65.js";
8
8
  import {
9
9
  SelectionError
10
- } from "./chunk-S4IIOSRA.js";
10
+ } from "./chunk-X7FA7ZD5.js";
11
11
  import {
12
12
  OfficeError
13
- } from "./chunk-KJ3PEDI2.js";
13
+ } from "./chunk-Q73EMLLZ.js";
14
14
 
15
15
  // packages/safe-bash-presentation-engine/src/fields.ts
16
16
  import { SaxesParser } from "saxes";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  readXmlCoordinate,
3
3
  readXmlInteger
4
- } from "./chunk-KCTV4NVX.js";
4
+ } from "./chunk-CRV2Q3PB.js";
5
5
  import {
6
6
  Length
7
- } from "./chunk-Z54Z3KRN.js";
7
+ } from "./chunk-6QBMND4A.js";
8
8
  import {
9
9
  attr,
10
10
  child
11
- } from "./chunk-ORZRWT62.js";
11
+ } from "./chunk-56NYSX65.js";
12
12
  import {
13
13
  OfficeError
14
- } from "./chunk-KJ3PEDI2.js";
14
+ } from "./chunk-Q73EMLLZ.js";
15
15
 
16
16
  // packages/safe-bash-presentation-engine/src/shape-transforms.ts
17
17
  function invalid() {
@@ -3,13 +3,13 @@ import {
3
3
  child,
4
4
  invalid,
5
5
  loadShared
6
- } from "./chunk-ORZRWT62.js";
6
+ } from "./chunk-56NYSX65.js";
7
7
  import {
8
8
  SelectionError
9
- } from "./chunk-S4IIOSRA.js";
9
+ } from "./chunk-X7FA7ZD5.js";
10
10
  import {
11
11
  OfficeError
12
- } from "./chunk-KJ3PEDI2.js";
12
+ } from "./chunk-Q73EMLLZ.js";
13
13
 
14
14
  // packages/safe-bash-presentation-engine/src/transitions.ts
15
15
  import { SaxesParser } from "saxes";