@poe-platform/safe-bash 0.1.812 → 0.1.814

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 (602) hide show
  1. package/dist/audio-ast/id3-source.d.ts +27 -0
  2. package/dist/audio-ast/index.d.ts +4 -0
  3. package/dist/audio-ast/index.js +996 -596
  4. package/dist/audio-ast/mp3-source.d.ts +18 -0
  5. package/dist/audio-ast/ogg-source.d.ts +25 -0
  6. package/dist/audio-ast/ogg-stream-source.d.ts +22 -0
  7. package/dist/image-ast/index.js +139 -9
  8. package/dist/mp4-ast/containers/adapters.d.ts +7 -0
  9. package/dist/mp4-ast/index.d.ts +2 -0
  10. package/dist/mp4-ast/mp4-sample-source.d.ts +52 -0
  11. package/dist/mp4-ast/mp4-source.d.ts +32 -0
  12. package/dist/office-xml/retained-xml-document.d.ts +14 -0
  13. package/dist/pdf-ast/ast.d.ts +2 -0
  14. package/dist/pdf-ast/content/dictionary-cursor.d.ts +15 -0
  15. package/dist/pdf-ast/content/evaluator.d.ts +4 -0
  16. package/dist/pdf-ast/content/range-operator-parser.d.ts +4 -0
  17. package/dist/pdf-ast/content/stored-dictionary.d.ts +10 -0
  18. package/dist/pdf-ast/cos/lexer.d.ts +8 -5
  19. package/dist/pdf-ast/cos/object-reader.d.ts +11 -3
  20. package/dist/pdf-ast/cos/range-parser.d.ts +4 -0
  21. package/dist/pdf-ast/cos/retained-objects.d.ts +1 -0
  22. package/dist/pdf-ast/cos/retained-writer.d.ts +1 -0
  23. package/dist/pdf-ast/cos/value-parser.d.ts +10 -0
  24. package/dist/pdf-ast/edit/retained-append-attachments.d.ts +13 -0
  25. package/dist/pdf-ast/edit/retained-bookmarks.d.ts +13 -0
  26. package/dist/pdf-ast/edit/retained-form-appearances.d.ts +10 -0
  27. package/dist/pdf-ast/edit/retained-graph.d.ts +12 -0
  28. package/dist/pdf-ast/edit/retained-info-updates.d.ts +33 -0
  29. package/dist/pdf-ast/edit/retained-save.d.ts +2 -0
  30. package/dist/pdf-ast/edit/retained-stamps.d.ts +9 -0
  31. package/dist/pdf-ast/fonts/resolve.d.ts +3 -1
  32. package/dist/pdf-ast/index.d.ts +3 -1
  33. package/dist/pdf-ast/index.js +1966 -844
  34. package/dist/pdf-ast/retained-document.d.ts +5 -0
  35. package/dist/safe-bash/audio-ast.browser.js +6 -1
  36. package/dist/safe-bash/chunks/{chunk-HHSOUC3Z.js → chunk-HPQE675Q.js} +1 -1
  37. package/dist/safe-bash/chunks/{chunk-BUYRKFW2.js → chunk-I6ECNJMR.js} +1 -1
  38. package/dist/safe-bash/chunks/{pdftk-WRYEP3CA.js → pdftk-Y2TX74LY.js} +2 -1
  39. package/dist/safe-bash/command-chunks/biff-KRHJ63K3-VQPJCVIL.js +5309 -0
  40. package/dist/safe-bash/command-chunks/{chunk-34G2SQX2.js → chunk-2BLTUQNK.js} +2 -2
  41. package/dist/safe-bash/command-chunks/{chunk-LLU2IQEJ.js → chunk-2BNGPR6Z.js} +2 -2
  42. package/dist/safe-bash/command-chunks/{chunk-HWQ2UHMT.js → chunk-2ETEJOYX.js} +18 -18
  43. package/dist/safe-bash/command-chunks/{chunk-NQDIT667.js → chunk-2PKBXGXD.js} +5 -5
  44. package/dist/safe-bash/command-chunks/{chunk-MMBZTYXO.js → chunk-2PQRZDNR.js} +221 -0
  45. package/dist/safe-bash/command-chunks/{chunk-6QBMND4A.js → chunk-2VVJRVYM.js} +1 -1
  46. package/dist/safe-bash/command-chunks/{chunk-G5QVZQCO.js → chunk-3EASXF5D.js} +5 -5
  47. package/dist/safe-bash/command-chunks/{chunk-U3SBHEKH.js → chunk-3EB2FSAN.js} +9 -9
  48. package/dist/safe-bash/command-chunks/{chunk-VB2TUPO2.js → chunk-3EW7GYHM.js} +9 -9
  49. package/dist/safe-bash/command-chunks/{chunk-RNSKXOG3.js → chunk-3GRMU7TM.js} +6 -6
  50. package/dist/safe-bash/command-chunks/chunk-3JM7E42I.js +197 -0
  51. package/dist/safe-bash/command-chunks/{chunk-6L4IYQAT.js → chunk-3MG5EAMX.js} +4 -4
  52. package/dist/safe-bash/command-chunks/{chunk-RASQPOSV.js → chunk-3SPLP2DB.js} +1 -1
  53. package/dist/safe-bash/command-chunks/{chunk-K5COUQAQ.js → chunk-3VGQTLO6.js} +1 -1
  54. package/dist/safe-bash/command-chunks/{chunk-K7CV55K5.js → chunk-3YEQI5B7.js} +10 -10
  55. package/dist/safe-bash/command-chunks/{chunk-ZXR6LXV5.js → chunk-3ZRCL756.js} +48 -4
  56. package/dist/safe-bash/command-chunks/{chunk-SOFM3GPG.js → chunk-42MEXZBJ.js} +1 -1
  57. package/dist/safe-bash/command-chunks/{chunk-GQ2ZSPZ3.js → chunk-46AMTJPE.js} +10 -10
  58. package/dist/safe-bash/command-chunks/{chunk-MTWZEPAR.js → chunk-47IAU25U.js} +2 -2
  59. package/dist/safe-bash/command-chunks/{chunk-6GI3NTCW.js → chunk-4B2ZUGLT.js} +4 -4
  60. package/dist/safe-bash/command-chunks/{chunk-L5MCW6CM.js → chunk-4EHY6J2Z.js} +9 -155
  61. package/dist/safe-bash/command-chunks/{chunk-QQVACHZA.js → chunk-4EZJV4FZ.js} +1 -1
  62. package/dist/safe-bash/command-chunks/{chunk-SSKMPDN4.js → chunk-4GQKCUS5.js} +15 -15
  63. package/dist/safe-bash/command-chunks/{chunk-UOBW5K3M.js → chunk-4RRYWHED.js} +7 -7
  64. package/dist/safe-bash/command-chunks/{chunk-PINR7QET.js → chunk-4UPKVQWH.js} +8 -8
  65. package/dist/safe-bash/command-chunks/{chunk-M7QE2MN7.js → chunk-4YLACJHE.js} +6 -6
  66. package/dist/safe-bash/command-chunks/chunk-5BIQWWLB.js +175 -0
  67. package/dist/safe-bash/command-chunks/{chunk-P3WU3PSL.js → chunk-5L4YGRQU.js} +3 -3
  68. package/dist/safe-bash/command-chunks/{chunk-HKATEVAP.js → chunk-5LFGXN3D.js} +6 -6
  69. package/dist/safe-bash/command-chunks/{chunk-SPLOIABU.js → chunk-5OM3UIK3.js} +3 -3
  70. package/dist/safe-bash/command-chunks/{chunk-TVH4JORU.js → chunk-6LPSKLLD.js} +3 -3
  71. package/dist/safe-bash/command-chunks/{chunk-CV7M2QJU.js → chunk-6QYSF7I2.js} +7 -7
  72. package/dist/safe-bash/command-chunks/{chunk-XVP6V5K3.js → chunk-6VBDJC6V.js} +6 -6
  73. package/dist/safe-bash/command-chunks/{chunk-6N5GHM72.js → chunk-6WNVGCXD.js} +8 -8
  74. package/dist/safe-bash/command-chunks/{chunk-6CCQI6XZ.js → chunk-6XES7Z4G.js} +12 -12
  75. package/dist/safe-bash/command-chunks/{chunk-AFROLW6S.js → chunk-6XGDWFNQ.js} +4 -4
  76. package/dist/safe-bash/command-chunks/{chunk-WTE23QXN.js → chunk-6ZGCKUAM.js} +3 -3
  77. package/dist/safe-bash/command-chunks/chunk-6ZHQB453.js +35 -0
  78. package/dist/safe-bash/command-chunks/{chunk-RIV6XN7K.js → chunk-7DOLY7IV.js} +2 -2
  79. package/dist/safe-bash/command-chunks/{chunk-QD7ZRDUN.js → chunk-7KZ5LWV2.js} +1 -1
  80. package/dist/safe-bash/command-chunks/{chunk-NGR5KOPQ.js → chunk-A347DLRB.js} +3 -3
  81. package/dist/safe-bash/command-chunks/{chunk-ZM2Y4Z3C.js → chunk-A45UG4KT.js} +4 -4
  82. package/dist/safe-bash/command-chunks/{chunk-56NYSX65.js → chunk-ADHFF2IM.js} +9 -9
  83. package/dist/safe-bash/command-chunks/{chunk-ATI464W3.js → chunk-AG2SNMP5.js} +1 -1
  84. package/dist/safe-bash/command-chunks/{chunk-FDCIPJBQ.js → chunk-AM5LANIE.js} +7 -7
  85. package/dist/safe-bash/command-chunks/{chunk-3Q247UDJ.js → chunk-AVGXFWEB.js} +278 -135
  86. package/dist/safe-bash/command-chunks/{chunk-RBTC7OFT.js → chunk-AVOGFREX.js} +5 -5
  87. package/dist/safe-bash/command-chunks/{chunk-QC5RMGSA.js → chunk-AWPI4DZR.js} +3 -3
  88. package/dist/safe-bash/command-chunks/{chunk-FYMNHG7R.js → chunk-AXXZNB7U.js} +13 -13
  89. package/dist/safe-bash/command-chunks/{chunk-Q6S57NOQ.js → chunk-AY3KQ4EN.js} +7 -7
  90. package/dist/safe-bash/command-chunks/{chunk-456PHA3L.js → chunk-BLGGAHQW.js} +1 -1
  91. package/dist/safe-bash/command-chunks/{chunk-CU4DLVME.js → chunk-BLIFGBIO.js} +2 -2
  92. package/dist/safe-bash/command-chunks/{chunk-NARD63DY.js → chunk-BS3ZEQGT.js} +22 -66
  93. package/dist/safe-bash/command-chunks/{chunk-WFVSUXJL.js → chunk-BS5JEUEW.js} +8 -8
  94. package/dist/safe-bash/command-chunks/{chunk-UYWSIIUX.js → chunk-BZMNC7Q5.js} +7 -7
  95. package/dist/safe-bash/command-chunks/{chunk-RHYJVTJO.js → chunk-CCMAHM3I.js} +2 -2
  96. package/dist/safe-bash/command-chunks/{chunk-N4R2SHSS.js → chunk-CCZZVCHX.js} +2 -2
  97. package/dist/safe-bash/command-chunks/{chunk-WGG6G2KG.js → chunk-CIRDVCAZ.js} +7 -7
  98. package/dist/safe-bash/command-chunks/chunk-CK2WFJZN.js +178 -0
  99. package/dist/safe-bash/command-chunks/{chunk-UZL7G57V.js → chunk-CKEMZUE3.js} +7 -7
  100. package/dist/safe-bash/command-chunks/{chunk-B5LDP7AA.js → chunk-CQBACD2V.js} +2 -2
  101. package/dist/safe-bash/command-chunks/{chunk-JYUJAF4L.js → chunk-CSE4VQKG.js} +16 -1
  102. package/dist/safe-bash/command-chunks/{chunk-Q73EMLLZ.js → chunk-CXME4YHU.js} +107 -5
  103. package/dist/safe-bash/command-chunks/{chunk-FTLDRH47.js → chunk-CZ5K2YPU.js} +16 -16
  104. package/dist/safe-bash/command-chunks/{chunk-554Z6IKP.js → chunk-DBLQUZGN.js} +2 -2
  105. package/dist/safe-bash/command-chunks/{chunk-6M6TM5Z5.js → chunk-DBNJEXHK.js} +3 -3
  106. package/dist/safe-bash/command-chunks/{chunk-SPW4GW4Z.js → chunk-DFI7QF3M.js} +2 -2
  107. package/dist/safe-bash/command-chunks/{chunk-ZO5WBWLL.js → chunk-DN6MSXY7.js} +2 -2
  108. package/dist/safe-bash/command-chunks/{chunk-GXLXWZWH.js → chunk-DZH54L3F.js} +3 -3
  109. package/dist/safe-bash/command-chunks/{chunk-XRVKWGVQ.js → chunk-EBHOZIBS.js} +6 -6
  110. package/dist/safe-bash/command-chunks/{chunk-3Y5EME26.js → chunk-ENEIE44W.js} +2 -2
  111. package/dist/safe-bash/command-chunks/{chunk-ATTWQVR2.js → chunk-EQWFKNHJ.js} +17 -17
  112. package/dist/safe-bash/command-chunks/{chunk-YV72XQKL.js → chunk-ETXPMVR6.js} +13 -13
  113. package/dist/safe-bash/command-chunks/{chunk-JFYWVQ4V.js → chunk-EV5G535P.js} +8 -8
  114. package/dist/safe-bash/command-chunks/{chunk-PZMU3Z4L.js → chunk-EVYKV3QI.js} +5 -5
  115. package/dist/safe-bash/command-chunks/{chunk-D6UMSC45.js → chunk-F4YFTO2K.js} +11 -11
  116. package/dist/safe-bash/command-chunks/{chunk-MPUHH2KR.js → chunk-F762XDNG.js} +3 -3
  117. package/dist/safe-bash/command-chunks/{chunk-D2ASPM7R.js → chunk-FF7UGJWS.js} +5 -5
  118. package/dist/safe-bash/command-chunks/{chunk-OA75SGN2.js → chunk-FOONI6BD.js} +7 -7
  119. package/dist/safe-bash/command-chunks/{chunk-DYLNU57U.js → chunk-FSVJ67G5.js} +1 -1
  120. package/dist/safe-bash/command-chunks/{chunk-CLKOGAR3.js → chunk-FSYMSWJU.js} +8 -8
  121. package/dist/safe-bash/command-chunks/{chunk-22MOB45U.js → chunk-FUQMEUAT.js} +6 -6
  122. package/dist/safe-bash/command-chunks/chunk-FWKLBDMK.js +0 -0
  123. package/dist/safe-bash/command-chunks/{chunk-KXPCSVAT.js → chunk-FXCSPPYE.js} +20 -20
  124. package/dist/safe-bash/command-chunks/{chunk-XZ2FWFNV.js → chunk-FYYFV6PW.js} +6 -6
  125. package/dist/safe-bash/command-chunks/{chunk-3OETVNJA.js → chunk-G2COZLXX.js} +9 -9
  126. package/dist/safe-bash/command-chunks/{chunk-ZEX53S5I.js → chunk-G3TAX3CV.js} +7369 -7221
  127. package/dist/safe-bash/command-chunks/{chunk-LXLLA4PM.js → chunk-GCHB7VNX.js} +17 -17
  128. package/dist/safe-bash/command-chunks/{chunk-4Y6O2K35.js → chunk-GLAF45M7.js} +1 -1
  129. package/dist/safe-bash/command-chunks/{chunk-OEJM666F.js → chunk-GQGMQMIM.js} +5 -5
  130. package/dist/safe-bash/command-chunks/{chunk-RRL3Y562.js → chunk-GXMPXMDP.js} +11 -11
  131. package/dist/safe-bash/command-chunks/{chunk-GEM47B2P.js → chunk-GYM5ICK4.js} +7 -7
  132. package/dist/safe-bash/command-chunks/{chunk-A5FZBR7X.js → chunk-H33D4R26.js} +4 -4
  133. package/dist/safe-bash/command-chunks/{chunk-AGLK7OJR.js → chunk-HDSIIQBS.js} +1 -1
  134. package/dist/safe-bash/command-chunks/{chunk-3ZDANXIC.js → chunk-HELAVGZH.js} +3 -3
  135. package/dist/safe-bash/command-chunks/{chunk-S4QH5BXZ.js → chunk-HGIMFVI2.js} +4 -4
  136. package/dist/safe-bash/command-chunks/{chunk-35IPOBWL.js → chunk-HI6ZYH3W.js} +10 -10
  137. package/dist/safe-bash/command-chunks/{chunk-KB7DUBVL.js → chunk-HK6MSB7Z.js} +5 -5
  138. package/dist/safe-bash/command-chunks/{chunk-7ZE3VIAN.js → chunk-IB5QP4LF.js} +2 -2
  139. package/dist/safe-bash/command-chunks/{chunk-UCR5YDV3.js → chunk-IBYMPAUW.js} +1 -1
  140. package/dist/safe-bash/command-chunks/{chunk-LABOWPFB.js → chunk-IHXZMAMY.js} +9 -9
  141. package/dist/safe-bash/command-chunks/{chunk-XPD636C4.js → chunk-IWHNRYER.js} +3 -3
  142. package/dist/safe-bash/command-chunks/{chunk-PPO7YUZF.js → chunk-JGKSWDGP.js} +1 -1
  143. package/dist/safe-bash/command-chunks/{chunk-KCOJA7EM.js → chunk-JR3Q6QNL.js} +7 -7
  144. package/dist/safe-bash/command-chunks/{chunk-S6R3IB36.js → chunk-JUHOL5KB.js} +1 -1
  145. package/dist/safe-bash/command-chunks/{chunk-3O2YEI47.js → chunk-JVKE7YZN.js} +3 -3
  146. package/dist/safe-bash/command-chunks/{chunk-6NATRKUJ.js → chunk-JW6WVNTM.js} +1 -1
  147. package/dist/safe-bash/command-chunks/{chunk-IK6K2HCG.js → chunk-JWORWL72.js} +1 -1
  148. package/dist/safe-bash/command-chunks/{chunk-JOCFI7TG.js → chunk-K2WOMJOQ.js} +1 -1
  149. package/dist/safe-bash/command-chunks/{chunk-XVLWZTPY.js → chunk-K4XNUJVJ.js} +543 -144
  150. package/dist/safe-bash/command-chunks/{chunk-DM2CPMB4.js → chunk-KBAQHE5Y.js} +2 -2
  151. package/dist/safe-bash/command-chunks/chunk-KCLJGRU7.js +737 -0
  152. package/dist/safe-bash/command-chunks/{chunk-TUDFMNPP.js → chunk-KINIV2SV.js} +1 -1
  153. package/dist/safe-bash/command-chunks/{chunk-43TRBJ2N.js → chunk-KPHLESD4.js} +4 -4
  154. package/dist/safe-bash/command-chunks/{chunk-47NEG4UO.js → chunk-KRRG4MGH.js} +222 -46
  155. package/dist/safe-bash/command-chunks/{chunk-33YCKZZX.js → chunk-KSBNZTAZ.js} +6 -6
  156. package/dist/safe-bash/command-chunks/{chunk-4Y34ZG4T.js → chunk-KUOCGGEU.js} +11 -11
  157. package/dist/safe-bash/command-chunks/{chunk-ML5R5JML.js → chunk-KY4LCHUF.js} +1 -1
  158. package/dist/safe-bash/command-chunks/{chunk-2JSDKQ4J.js → chunk-LAPOMHGY.js} +251 -239
  159. package/dist/safe-bash/command-chunks/{chunk-ENT3IV2G.js → chunk-LDW3RF7Y.js} +12 -12
  160. package/dist/safe-bash/command-chunks/{chunk-U27XPNLP.js → chunk-LEO4VRIN.js} +2 -2
  161. package/dist/safe-bash/command-chunks/{chunk-GZ3VIWNN.js → chunk-LKGTH2Q7.js} +7 -7
  162. package/dist/safe-bash/command-chunks/{chunk-ZMHEGDU2.js → chunk-LNTEV56A.js} +2 -2
  163. package/dist/safe-bash/command-chunks/{chunk-DVGXLBUW.js → chunk-LZ2JFMKT.js} +10 -10
  164. package/dist/safe-bash/command-chunks/{chunk-6D2BMAF4.js → chunk-MEM2ZPMI.js} +2 -2
  165. package/dist/safe-bash/command-chunks/{chunk-HTVIYLVB.js → chunk-MGMTRGKM.js} +4 -4
  166. package/dist/safe-bash/command-chunks/{chunk-B3NLITWP.js → chunk-MKK6FM5H.js} +7 -7
  167. package/dist/safe-bash/command-chunks/{chunk-Z2JW6M2D.js → chunk-MKOIPOXX.js} +3 -3
  168. package/dist/safe-bash/command-chunks/chunk-MLOYUXUV.js +244 -0
  169. package/dist/safe-bash/command-chunks/{chunk-CBNKHBLD.js → chunk-MNK3DDH6.js} +2 -2
  170. package/dist/safe-bash/command-chunks/{chunk-JVGUVHWI.js → chunk-MPXMRTMY.js} +10 -10
  171. package/dist/safe-bash/command-chunks/{chunk-TW73OXPR.js → chunk-MVLVIMJ6.js} +6 -6
  172. package/dist/safe-bash/command-chunks/{chunk-TY4WDAHM.js → chunk-MYZ46FQL.js} +1 -1
  173. package/dist/safe-bash/command-chunks/{chunk-TBAIMDGL.js → chunk-N4MUBJCT.js} +1 -1
  174. package/dist/safe-bash/command-chunks/{chunk-NPLVFAD6.js → chunk-N6G3345Q.js} +8 -8
  175. package/dist/safe-bash/command-chunks/{chunk-ZIIO6GRY.js → chunk-NEMUPUUB.js} +7 -7
  176. package/dist/safe-bash/command-chunks/{chunk-K5GB2YMN.js → chunk-NEVQWOU6.js} +10 -10
  177. package/dist/safe-bash/command-chunks/{chunk-FIIAYCWS.js → chunk-NFGCBQN3.js} +2 -2
  178. package/dist/safe-bash/command-chunks/{chunk-PNGDJA6M.js → chunk-NFII726L.js} +2 -2
  179. package/dist/safe-bash/command-chunks/{chunk-JQPNA77Y.js → chunk-NHNZYWPW.js} +2 -2
  180. package/dist/safe-bash/command-chunks/chunk-NQINS4XY.js +156 -0
  181. package/dist/safe-bash/command-chunks/{chunk-APEWTWCC.js → chunk-NRFTYZ2R.js} +6 -6
  182. package/dist/safe-bash/command-chunks/{chunk-THMZLJQD.js → chunk-NYFYTL5G.js} +18 -18
  183. package/dist/safe-bash/command-chunks/{chunk-SMSGLRIH.js → chunk-OTF2AJ5M.js} +6 -6
  184. package/dist/safe-bash/command-chunks/{chunk-QZZ73J2O.js → chunk-OVQP6KH5.js} +6 -6
  185. package/dist/safe-bash/command-chunks/{chunk-HDJVJTCK.js → chunk-P2LT6TGR.js} +9 -9
  186. package/dist/safe-bash/command-chunks/{chunk-YS25EI54.js → chunk-PCCFLPUQ.js} +2 -2
  187. package/dist/safe-bash/command-chunks/{chunk-26VCZHLJ.js → chunk-PIOQBOEK.js} +1 -1
  188. package/dist/safe-bash/command-chunks/{chunk-D2KZ66W4.js → chunk-PIVH35EQ.js} +190 -42
  189. package/dist/safe-bash/command-chunks/{chunk-QYMEASQ6.js → chunk-PLMF35XK.js} +4 -4
  190. package/dist/safe-bash/command-chunks/{chunk-JQVHUSDD.js → chunk-PLR5IULU.js} +5 -5
  191. package/dist/safe-bash/command-chunks/{chunk-2CORNDGF.js → chunk-PS5GDFIP.js} +2 -2
  192. package/dist/safe-bash/command-chunks/{chunk-R6EGGK5M.js → chunk-Q5PWYPQV.js} +7 -7
  193. package/dist/safe-bash/command-chunks/{chunk-COKYZUBW.js → chunk-Q7TVCBU2.js} +1 -1
  194. package/dist/safe-bash/command-chunks/{chunk-EHTOHOTR.js → chunk-QB72X7FF.js} +9 -9
  195. package/dist/safe-bash/command-chunks/{chunk-F3GP3EXE.js → chunk-RGDOYWOD.js} +2 -2
  196. package/dist/safe-bash/command-chunks/{chunk-RQIQ75W5.js → chunk-RHDERFMR.js} +5 -5
  197. package/dist/safe-bash/command-chunks/{chunk-3KMOXEGH.js → chunk-RHU44OMN.js} +2 -2
  198. package/dist/safe-bash/command-chunks/{chunk-7PVHO47B.js → chunk-RIVKF77R.js} +6 -6
  199. package/dist/safe-bash/command-chunks/{chunk-UOR6PXZZ.js → chunk-ROL5AEX6.js} +1 -1
  200. package/dist/safe-bash/command-chunks/{chunk-AHA6IWAJ.js → chunk-RQYPFLZJ.js} +6 -6
  201. package/dist/safe-bash/command-chunks/{chunk-YSMNXMAO.js → chunk-RTNI47C5.js} +4 -4
  202. package/dist/safe-bash/command-chunks/{chunk-W5LLKV5H.js → chunk-RV5AGXOV.js} +2 -2
  203. package/dist/safe-bash/command-chunks/{chunk-PMAM4N33.js → chunk-RXQ2G2YK.js} +9 -9
  204. package/dist/safe-bash/command-chunks/{chunk-EVU7FLDA.js → chunk-S2QNBAN6.js} +7 -7
  205. package/dist/safe-bash/command-chunks/{chunk-YE6OAKK7.js → chunk-S43QRKDC.js} +7 -7
  206. package/dist/safe-bash/command-chunks/{chunk-774GLJAO.js → chunk-S7HIOT7Z.js} +4 -4
  207. package/dist/safe-bash/command-chunks/chunk-SEPUP6TZ.js +63 -0
  208. package/dist/safe-bash/command-chunks/{chunk-JPMYPOYZ.js → chunk-SUTHGUD3.js} +28 -28
  209. package/dist/safe-bash/command-chunks/chunk-SW37YCBW.js +286 -0
  210. package/dist/safe-bash/command-chunks/{chunk-Y4EYCZFT.js → chunk-SWAKALDJ.js} +10 -10
  211. package/dist/safe-bash/command-chunks/{chunk-QUM3SYAJ.js → chunk-SYSX46IV.js} +3 -3
  212. package/dist/safe-bash/command-chunks/{chunk-WGH3RLJY.js → chunk-T5S4SJGO.js} +9 -9
  213. package/dist/safe-bash/command-chunks/{chunk-7JEIWA3A.js → chunk-TID5TSQW.js} +5 -5
  214. package/dist/safe-bash/command-chunks/{chunk-CRV2Q3PB.js → chunk-TJLXSENN.js} +1 -1
  215. package/dist/safe-bash/command-chunks/{chunk-IT7TAC3F.js → chunk-TKCUGMRZ.js} +24 -20
  216. package/dist/safe-bash/command-chunks/{chunk-7GKKMNL6.js → chunk-TXPDKEGY.js} +8 -8
  217. package/dist/safe-bash/command-chunks/{chunk-A2CLZMQZ.js → chunk-UJERQEJB.js} +1 -1
  218. package/dist/safe-bash/command-chunks/{chunk-6VPQ3CDZ.js → chunk-USGZN2KE.js} +5 -5
  219. package/dist/safe-bash/command-chunks/{chunk-LCZDBW55.js → chunk-UYGQEQIP.js} +5 -5
  220. package/dist/safe-bash/command-chunks/{chunk-MPORWUTU.js → chunk-V5XC43BX.js} +8 -8
  221. package/dist/safe-bash/command-chunks/{chunk-AIMSZBWP.js → chunk-V7E3PZOK.js} +9 -9
  222. package/dist/safe-bash/command-chunks/{chunk-CNHRVUHA.js → chunk-VDTFVRYX.js} +1 -1
  223. package/dist/safe-bash/command-chunks/{chunk-KJ4XXZIL.js → chunk-VT2PHQ63.js} +582 -59
  224. package/dist/safe-bash/command-chunks/{chunk-MOZD7RUY.js → chunk-VT7UBPAE.js} +38 -15
  225. package/dist/safe-bash/command-chunks/{chunk-QDVI2YB6.js → chunk-VUWXLH3E.js} +2 -2
  226. package/dist/safe-bash/command-chunks/{chunk-X7FA7ZD5.js → chunk-W3ZSWK76.js} +8 -8
  227. package/dist/safe-bash/command-chunks/{chunk-JPA2PUYI.js → chunk-WBKB7HBZ.js} +8 -8
  228. package/dist/safe-bash/command-chunks/{chunk-MIRL7HTF.js → chunk-WJ2ERUCQ.js} +1 -1
  229. package/dist/safe-bash/command-chunks/{chunk-36XGIPOG.js → chunk-WTVJLHMG.js} +1 -1
  230. package/dist/safe-bash/command-chunks/{chunk-SLQWQKXP.js → chunk-WWHMI4S3.js} +9 -9
  231. package/dist/safe-bash/command-chunks/{chunk-2UBZALAK.js → chunk-WYZG3DRR.js} +1 -1
  232. package/dist/safe-bash/command-chunks/{chunk-YORJDX4V.js → chunk-WZRFS5OY.js} +4 -4
  233. package/dist/safe-bash/command-chunks/{chunk-EHSM5ZQS.js → chunk-X6OHFKBL.js} +8 -8
  234. package/dist/safe-bash/command-chunks/{chunk-S6ZTBXYO.js → chunk-XKAUKLF7.js} +13 -13
  235. package/dist/safe-bash/command-chunks/{chunk-EUT24Y5Z.js → chunk-XM5QJCPD.js} +8 -8
  236. package/dist/safe-bash/command-chunks/{chunk-WXRYDALR.js → chunk-XMTR7QGL.js} +4 -4
  237. package/dist/safe-bash/command-chunks/{chunk-4CKFNXRN.js → chunk-XNGM3W5R.js} +1 -1
  238. package/dist/safe-bash/command-chunks/{chunk-2ZFLMWOX.js → chunk-XTEIT5CI.js} +1 -1
  239. package/dist/safe-bash/command-chunks/{chunk-4DLIUTQV.js → chunk-XU6S3XUZ.js} +11 -11
  240. package/dist/safe-bash/command-chunks/{chunk-CJQSAATC.js → chunk-XUJAQA3S.js} +30 -30
  241. package/dist/safe-bash/command-chunks/{chunk-W5YSINXC.js → chunk-Y42KSX63.js} +6 -6
  242. package/dist/safe-bash/command-chunks/{chunk-UAXSE3XE.js → chunk-Y54L4P4J.js} +5 -5
  243. package/dist/safe-bash/command-chunks/{chunk-6WQD7LRA.js → chunk-YAD7EV4N.js} +14 -14
  244. package/dist/safe-bash/command-chunks/{chunk-WVMHRNXZ.js → chunk-YRPXBGRX.js} +3 -3
  245. package/dist/safe-bash/command-chunks/{chunk-5HPU7D36.js → chunk-Z2WNYEPD.js} +4 -4
  246. package/dist/safe-bash/command-chunks/{chunk-SDTPO2VV.js → chunk-Z7QOSXQC.js} +7 -7
  247. package/dist/safe-bash/command-chunks/{chunk-WJCN2IXI.js → chunk-ZQM37BGE.js} +2 -2
  248. package/dist/safe-bash/command-chunks/{chunk-W3HV45CI.js → chunk-ZSQZHFWS.js} +9 -9
  249. package/dist/safe-bash/command-chunks/{chunk-IDJQP3A6.js → chunk-ZTMZO4IT.js} +1 -1
  250. package/dist/safe-bash/command-chunks/{chunk-RID6VYS3.js → chunk-ZU2KJMXO.js} +8 -8
  251. package/dist/safe-bash/command-chunks/{chunk-YXKNJ6EM.js → chunk-ZXELXF2H.js} +5 -5
  252. package/dist/safe-bash/command-chunks/{clipboard-BBDK33GP-VB22F7GI.js → clipboard-BBDK33GP-QZ4ERNQX.js} +2 -2
  253. package/dist/safe-bash/command-chunks/{command-engine-BCUQGJJ4.js → command-engine-7V6PZR7G.js} +1012 -678
  254. package/dist/safe-bash/command-chunks/{engine-LAUEWYSQ-DQCEI5HE.js → engine-UYJENSWK-VSCGKSQV.js} +1 -1
  255. package/dist/safe-bash/command-chunks/{gnumeric-UJPXWBVR-YPXTNEDZ.js → gnumeric-UJPXWBVR-7VOHQAPM.js} +2 -2
  256. package/dist/safe-bash/command-chunks/{model-store-E7BHBFJC.js → model-store-UB5DWMAP.js} +24 -24
  257. package/dist/safe-bash/command-chunks/paradox-4FCZE53D-LQPGVMEL.js +365 -0
  258. package/dist/safe-bash/commands/pandoc/index.browser.js +1 -1
  259. package/dist/safe-bash/full-core.browser.js +2 -2
  260. package/dist/safe-bash/plugins/index.browser.js +2 -2
  261. package/dist/safe-bash-command-awk/awk-runtime.js +3 -3
  262. package/dist/safe-bash-command-awk/awk.js +4 -4
  263. package/dist/safe-bash-command-awk/index.js +4 -4
  264. package/dist/safe-bash-command-diff/diff.js +2 -2
  265. package/dist/safe-bash-command-diff/index.js +3 -3
  266. package/dist/safe-bash-command-diff/sync.js +2 -2
  267. package/dist/safe-bash-command-du/du.js +2 -2
  268. package/dist/safe-bash-command-du/index.js +2 -2
  269. package/dist/safe-bash-command-ffmpeg/index.js +1 -1
  270. package/dist/safe-bash-command-ffprobe/index.js +2 -2
  271. package/dist/safe-bash-command-ffprobe/media.d.ts +3 -1
  272. package/dist/safe-bash-command-ffprobe/media.js +2 -2
  273. package/dist/safe-bash-command-html-to-markdown/budget.js +2 -1
  274. package/dist/safe-bash-command-html-to-markdown/entities.js +4 -3
  275. package/dist/safe-bash-command-html-to-markdown/index.js +533 -310
  276. package/dist/safe-bash-command-html-to-markdown/input.js +6 -5
  277. package/dist/safe-bash-command-html-to-markdown/options.js +2 -1
  278. package/dist/safe-bash-command-html-to-markdown/parser.js +5 -4
  279. package/dist/safe-bash-command-html-to-markdown/render.js +6 -5
  280. package/dist/safe-bash-command-html-to-markdown/stored-text.d.ts +50 -0
  281. package/dist/safe-bash-command-html-to-markdown/stored-text.js +12 -0
  282. package/dist/safe-bash-command-html-to-markdown/text.js +3 -2
  283. package/dist/safe-bash-command-htmlq/contracts.d.ts +5 -0
  284. package/dist/safe-bash-command-htmlq/index.js +2006 -259
  285. package/dist/safe-bash-command-htmlq/selectors.d.ts +38 -1
  286. package/dist/safe-bash-command-htmlq/serializer.d.ts +1 -0
  287. package/dist/safe-bash-command-htmlq/tree.d.ts +4 -2
  288. package/dist/safe-bash-command-iconv/command.js +2 -2
  289. package/dist/safe-bash-command-iconv/index.js +2 -2
  290. package/dist/safe-bash-command-llm/command.js +3 -3
  291. package/dist/safe-bash-command-llm/index.js +9 -9
  292. package/dist/safe-bash-command-llm/openai.js +2 -2
  293. package/dist/safe-bash-command-llm/providers/index.js +2 -2
  294. package/dist/safe-bash-command-llm/providers/openai.js +2 -2
  295. package/dist/safe-bash-command-node/commands/node/browser.js +2 -2
  296. package/dist/safe-bash-command-node/commands/node/default-runtime.js +2 -2
  297. package/dist/safe-bash-command-node/commands/node/safejs.js +2 -2
  298. package/dist/safe-bash-command-pandoc/command.js +7 -7
  299. package/dist/safe-bash-command-pandoc/index.js +46 -46
  300. package/dist/safe-bash-command-patch/index.js +6 -6
  301. package/dist/safe-bash-command-patch/patch-envelope.js +53 -3
  302. package/dist/safe-bash-command-patch/patch-formats.d.ts +7 -2
  303. package/dist/safe-bash-command-patch/patch-formats.js +6 -4
  304. package/dist/safe-bash-command-patch/patch-gnu-paths.d.ts +7 -7
  305. package/dist/safe-bash-command-patch/patch-gnu-reject.d.ts +3 -2
  306. package/dist/safe-bash-command-patch/patch-gnu-reject.js +4 -3
  307. package/dist/safe-bash-command-patch/patch-publication.js +2 -1
  308. package/dist/safe-bash-command-patch/patch.js +6 -6
  309. package/dist/safe-bash-command-patch/stored-patch.d.ts +26 -0
  310. package/dist/safe-bash-command-patch/stored-target.d.ts +40 -0
  311. package/dist/safe-bash-command-patch/unified.d.ts +23 -10
  312. package/dist/safe-bash-command-patch/unified.js +3 -1
  313. package/dist/safe-bash-command-pdftk/index.d.ts +6 -2
  314. package/dist/safe-bash-command-pdftk/index.js +1247 -373
  315. package/dist/safe-bash-command-playwright-cli/index.js +26 -26
  316. package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +10 -10
  317. package/dist/safe-bash-command-playwright-cli/playwright/controller.js +14 -14
  318. package/dist/safe-bash-command-playwright-cli/playwright/index.js +23 -23
  319. package/dist/safe-bash-command-playwright-cli/playwright/snapshot.js +2 -2
  320. package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +6 -6
  321. package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +4 -4
  322. package/dist/safe-bash-command-pptx/command-engine.d.ts +5 -1
  323. package/dist/safe-bash-command-pptx/engine.js +1 -1
  324. package/dist/safe-bash-command-pptx/index.d.ts +1 -1
  325. package/dist/safe-bash-command-pptx/index.js +172 -19
  326. package/dist/safe-bash-command-pptx/streaming-inputs.d.ts +7 -2
  327. package/dist/safe-bash-command-python/executor.js +5 -5
  328. package/dist/safe-bash-command-python/index.js +5 -5
  329. package/dist/safe-bash-command-python/jspi.js +2 -2
  330. package/dist/safe-bash-command-soffice/index.js +1 -1
  331. package/dist/safe-bash-command-sort/index.js +3 -3
  332. package/dist/safe-bash-command-ssconvert/index.js +2 -2
  333. package/dist/safe-bash-command-tar/create.js +2 -2
  334. package/dist/safe-bash-command-tar/extract.js +2 -2
  335. package/dist/safe-bash-command-tar/index.js +8 -8
  336. package/dist/safe-bash-command-tar/modes.js +4 -4
  337. package/dist/safe-bash-command-timeout/index.js +3 -3
  338. package/dist/safe-bash-command-tree/index.js +2 -2
  339. package/dist/safe-bash-command-tree/tree.js +2 -2
  340. package/dist/safe-bash-command-xmllint/index.js +22 -31
  341. package/dist/safe-bash-command-xz/index.js +5 -5
  342. package/dist/safe-bash-compression-engine/files.js +2 -2
  343. package/dist/safe-bash-compression-engine/operand.js +4 -4
  344. package/dist/safe-bash-contracts/diagnostics.js +3 -3
  345. package/dist/safe-bash-contracts/escaping.js +10 -10
  346. package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
  347. package/dist/safe-bash-contracts/filesystem-output.js +6 -6
  348. package/dist/safe-bash-contracts/index.js +33 -33
  349. package/dist/safe-bash-contracts/io.js +2 -2
  350. package/dist/safe-bash-contracts/output.js +3 -3
  351. package/dist/safe-bash-docx-engine/ancillary-resources.js +5 -5
  352. package/dist/safe-bash-docx-engine/batch-operations.js +63 -63
  353. package/dist/safe-bash-docx-engine/batch-result-schema.js +74 -74
  354. package/dist/safe-bash-docx-engine/batch.js +74 -74
  355. package/dist/safe-bash-docx-engine/bookmarks.js +13 -13
  356. package/dist/safe-bash-docx-engine/charts.js +6 -6
  357. package/dist/safe-bash-docx-engine/command-option-rules.js +3 -3
  358. package/dist/safe-bash-docx-engine/comments.js +21 -21
  359. package/dist/safe-bash-docx-engine/control-bindings.js +16 -16
  360. package/dist/safe-bash-docx-engine/control-repeat.js +16 -16
  361. package/dist/safe-bash-docx-engine/controls.js +14 -14
  362. package/dist/safe-bash-docx-engine/create.js +8 -8
  363. package/dist/safe-bash-docx-engine/diagrams.js +6 -6
  364. package/dist/safe-bash-docx-engine/diff.js +8 -8
  365. package/dist/safe-bash-docx-engine/document-properties.js +12 -12
  366. package/dist/safe-bash-docx-engine/equations.js +12 -12
  367. package/dist/safe-bash-docx-engine/extract.js +9 -9
  368. package/dist/safe-bash-docx-engine/fields.js +18 -18
  369. package/dist/safe-bash-docx-engine/font-inventory.js +13 -13
  370. package/dist/safe-bash-docx-engine/font-resources.js +3 -3
  371. package/dist/safe-bash-docx-engine/image-batch-operations.js +11 -11
  372. package/dist/safe-bash-docx-engine/image-insertion.js +17 -17
  373. package/dist/safe-bash-docx-engine/image-layout.js +14 -14
  374. package/dist/safe-bash-docx-engine/image-replacement.js +19 -19
  375. package/dist/safe-bash-docx-engine/images.js +14 -14
  376. package/dist/safe-bash-docx-engine/index.js +102 -102
  377. package/dist/safe-bash-docx-engine/inspection.js +15 -15
  378. package/dist/safe-bash-docx-engine/invocation.js +4 -4
  379. package/dist/safe-bash-docx-engine/io.js +6 -6
  380. package/dist/safe-bash-docx-engine/links.js +17 -17
  381. package/dist/safe-bash-docx-engine/lists.js +16 -16
  382. package/dist/safe-bash-docx-engine/locations.js +10 -10
  383. package/dist/safe-bash-docx-engine/notes.js +18 -18
  384. package/dist/safe-bash-docx-engine/objects.js +14 -14
  385. package/dist/safe-bash-docx-engine/pack.js +9 -9
  386. package/dist/safe-bash-docx-engine/package-view-batch-operations.js +19 -19
  387. package/dist/safe-bash-docx-engine/pandoc-adapter.js +25 -25
  388. package/dist/safe-bash-docx-engine/paragraph-edit.js +21 -21
  389. package/dist/safe-bash-docx-engine/publication.js +6 -6
  390. package/dist/safe-bash-docx-engine/removal.js +16 -16
  391. package/dist/safe-bash-docx-engine/revision-decisions.js +16 -16
  392. package/dist/safe-bash-docx-engine/revision-edit.js +15 -15
  393. package/dist/safe-bash-docx-engine/revisions.js +12 -12
  394. package/dist/safe-bash-docx-engine/run-format.js +15 -15
  395. package/dist/safe-bash-docx-engine/sanitize.js +29 -29
  396. package/dist/safe-bash-docx-engine/sections.js +15 -15
  397. package/dist/safe-bash-docx-engine/settings.js +6 -6
  398. package/dist/safe-bash-docx-engine/shape-edit.js +16 -16
  399. package/dist/safe-bash-docx-engine/signatures.js +11 -11
  400. package/dist/safe-bash-docx-engine/stories.js +18 -18
  401. package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +34 -34
  402. package/dist/safe-bash-docx-engine/style-model-batch-operations.js +24 -24
  403. package/dist/safe-bash-docx-engine/style-model-result-schema.js +39 -39
  404. package/dist/safe-bash-docx-engine/styles.js +14 -14
  405. package/dist/safe-bash-docx-engine/table-edit.js +23 -23
  406. package/dist/safe-bash-docx-engine/table-read.js +11 -11
  407. package/dist/safe-bash-docx-engine/template.js +17 -17
  408. package/dist/safe-bash-docx-engine/text-replace.js +15 -15
  409. package/dist/safe-bash-docx-engine/text-resource-read.js +11 -11
  410. package/dist/safe-bash-docx-engine/text.js +11 -11
  411. package/dist/safe-bash-docx-engine/validation.js +4 -4
  412. package/dist/safe-bash-docx-engine/xml-parts.js +17 -17
  413. package/dist/safe-bash-io-engine/commands/text-programs/shared.js +4 -4
  414. package/dist/safe-bash-line-ending-engine/command.js +3 -3
  415. package/dist/safe-bash-line-ending-engine/convert.js +2 -2
  416. package/dist/safe-bash-line-ending-engine/index.js +6 -6
  417. package/dist/safe-bash-line-ending-engine/info.js +2 -2
  418. package/dist/safe-bash-markdown-engine/commonmark-blocks.js +4 -4
  419. package/dist/safe-bash-markdown-engine/commonmark-inlines.js +4 -4
  420. package/dist/safe-bash-markdown-engine/commonmark-syntax.js +2 -2
  421. package/dist/safe-bash-markdown-engine/gfm-syntax.js +3 -3
  422. package/dist/safe-bash-markdown-engine/index.js +5 -5
  423. package/dist/safe-bash-network-engine/transfer.js +3 -3
  424. package/dist/safe-bash-presentation-engine/accessibility.js +31 -30
  425. package/dist/safe-bash-presentation-engine/animation-editing.js +16 -15
  426. package/dist/safe-bash-presentation-engine/animations.js +16 -15
  427. package/dist/safe-bash-presentation-engine/backgrounds.js +17 -16
  428. package/dist/safe-bash-presentation-engine/bytes.js +3 -3
  429. package/dist/safe-bash-presentation-engine/chart-editing.js +34 -33
  430. package/dist/safe-bash-presentation-engine/chart-object-operations.js +25 -24
  431. package/dist/safe-bash-presentation-engine/charts.js +31 -30
  432. package/dist/safe-bash-presentation-engine/command-placeholder.js +59 -56
  433. package/dist/safe-bash-presentation-engine/comments.js +17 -16
  434. package/dist/safe-bash-presentation-engine/connector-operations.js +32 -31
  435. package/dist/safe-bash-presentation-engine/connectors.js +29 -28
  436. package/dist/safe-bash-presentation-engine/content-types.js +4 -4
  437. package/dist/safe-bash-presentation-engine/creation.js +6 -6
  438. package/dist/safe-bash-presentation-engine/diff.js +32 -31
  439. package/dist/safe-bash-presentation-engine/drawing-enums.d.ts +10 -10
  440. package/dist/safe-bash-presentation-engine/drawing-format.js +20 -19
  441. package/dist/safe-bash-presentation-engine/drawing-operations.js +31 -30
  442. package/dist/safe-bash-presentation-engine/drawing-schema.js +21 -20
  443. package/dist/safe-bash-presentation-engine/equations.js +17 -16
  444. package/dist/safe-bash-presentation-engine/errors.js +2 -2
  445. package/dist/safe-bash-presentation-engine/fields.js +17 -16
  446. package/dist/safe-bash-presentation-engine/font-metrics.js +3 -3
  447. package/dist/safe-bash-presentation-engine/image-extraction.js +20 -19
  448. package/dist/safe-bash-presentation-engine/image-formatting.js +32 -31
  449. package/dist/safe-bash-presentation-engine/image-insertion.js +18 -17
  450. package/dist/safe-bash-presentation-engine/image-replacement.js +21 -20
  451. package/dist/safe-bash-presentation-engine/image-value.js +4 -4
  452. package/dist/safe-bash-presentation-engine/images.js +19 -18
  453. package/dist/safe-bash-presentation-engine/index.d.ts +5 -1
  454. package/dist/safe-bash-presentation-engine/index.js +121 -108
  455. package/dist/safe-bash-presentation-engine/layouts.js +16 -15
  456. package/dist/safe-bash-presentation-engine/length.js +3 -3
  457. package/dist/safe-bash-presentation-engine/links.js +16 -15
  458. package/dist/safe-bash-presentation-engine/masters.js +15 -14
  459. package/dist/safe-bash-presentation-engine/media-editing.js +24 -23
  460. package/dist/safe-bash-presentation-engine/media-extraction.js +17 -16
  461. package/dist/safe-bash-presentation-engine/media.js +16 -15
  462. package/dist/safe-bash-presentation-engine/memberships.js +15 -14
  463. package/dist/safe-bash-presentation-engine/notes.js +16 -15
  464. package/dist/safe-bash-presentation-engine/ole-enum.js +4 -4
  465. package/dist/safe-bash-presentation-engine/ole-insertion.js +20 -19
  466. package/dist/safe-bash-presentation-engine/opaque-objects.js +9 -9
  467. package/dist/safe-bash-presentation-engine/package-reader.js +5 -5
  468. package/dist/safe-bash-presentation-engine/package-tools.d.ts +3 -0
  469. package/dist/safe-bash-presentation-engine/package-tools.js +27 -17
  470. package/dist/safe-bash-presentation-engine/package-uri.js +3 -3
  471. package/dist/safe-bash-presentation-engine/package-writer.js +4 -4
  472. package/dist/safe-bash-presentation-engine/presentation-model.js +58 -55
  473. package/dist/safe-bash-presentation-engine/presentation-settings.js +14 -13
  474. package/dist/safe-bash-presentation-engine/properties.js +16 -15
  475. package/dist/safe-bash-presentation-engine/relationships.js +4 -4
  476. package/dist/safe-bash-presentation-engine/resource-limits.js +1 -1
  477. package/dist/safe-bash-presentation-engine/retained-archive-staging.d.ts +19 -0
  478. package/dist/safe-bash-presentation-engine/retained-extraction-output.d.ts +18 -0
  479. package/dist/safe-bash-presentation-engine/retained-frame-formatting.d.ts +14 -0
  480. package/dist/safe-bash-presentation-engine/retained-inspection.js +14 -12
  481. package/dist/safe-bash-presentation-engine/retained-package-extraction.d.ts +22 -0
  482. package/dist/safe-bash-presentation-engine/retained-package-packing.d.ts +19 -0
  483. package/dist/safe-bash-presentation-engine/retained-package.d.ts +2 -0
  484. package/dist/safe-bash-presentation-engine/retained-package.js +6 -4
  485. package/dist/safe-bash-presentation-engine/retained-text.d.ts +9 -2
  486. package/dist/safe-bash-presentation-engine/retained-text.js +131 -30
  487. package/dist/safe-bash-presentation-engine/retained-xml-document.d.ts +1 -0
  488. package/dist/safe-bash-presentation-engine/retained-xml-parts.d.ts +5 -1
  489. package/dist/safe-bash-presentation-engine/retained-xml-publication.d.ts +18 -0
  490. package/dist/safe-bash-presentation-engine/retained-xml-replacement.d.ts +13 -0
  491. package/dist/safe-bash-presentation-engine/sanitize.js +17 -16
  492. package/dist/safe-bash-presentation-engine/selectors.js +10 -10
  493. package/dist/safe-bash-presentation-engine/shape-groups.js +31 -30
  494. package/dist/safe-bash-presentation-engine/shape-operations.js +30 -29
  495. package/dist/safe-bash-presentation-engine/shape-path-operations.js +32 -31
  496. package/dist/safe-bash-presentation-engine/shape-paths.js +16 -15
  497. package/dist/safe-bash-presentation-engine/shape-presets.js +3 -3
  498. package/dist/safe-bash-presentation-engine/shape-selection.js +31 -30
  499. package/dist/safe-bash-presentation-engine/shape-transforms.js +18 -17
  500. package/dist/safe-bash-presentation-engine/shapes.d.ts +1 -1
  501. package/dist/safe-bash-presentation-engine/shapes.js +27 -26
  502. package/dist/safe-bash-presentation-engine/slide-copy.js +17 -16
  503. package/dist/safe-bash-presentation-engine/slide-import.js +18 -17
  504. package/dist/safe-bash-presentation-engine/slide-merge-split.js +20 -19
  505. package/dist/safe-bash-presentation-engine/slide-model.js +43 -42
  506. package/dist/safe-bash-presentation-engine/slide-removal.js +18 -17
  507. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +9 -9
  508. package/dist/safe-bash-presentation-engine/slides.js +19 -16
  509. package/dist/safe-bash-presentation-engine/table-operations.js +33 -32
  510. package/dist/safe-bash-presentation-engine/table-spans.js +32 -31
  511. package/dist/safe-bash-presentation-engine/tables.js +31 -30
  512. package/dist/safe-bash-presentation-engine/tags.js +16 -15
  513. package/dist/safe-bash-presentation-engine/template-bindings.js +33 -32
  514. package/dist/safe-bash-presentation-engine/template-repeat.js +40 -39
  515. package/dist/safe-bash-presentation-engine/text-fitting.js +27 -26
  516. package/dist/safe-bash-presentation-engine/text-frames.d.ts +13 -0
  517. package/dist/safe-bash-presentation-engine/text-frames.js +29 -26
  518. package/dist/safe-bash-presentation-engine/text-paragraphs.js +27 -26
  519. package/dist/safe-bash-presentation-engine/text-reading.js +11 -11
  520. package/dist/safe-bash-presentation-engine/text-replacement.js +17 -16
  521. package/dist/safe-bash-presentation-engine/text-runs.js +20 -19
  522. package/dist/safe-bash-presentation-engine/themes.js +16 -15
  523. package/dist/safe-bash-presentation-engine/transitions.js +16 -15
  524. package/dist/safe-bash-presentation-engine/validation.js +10 -9
  525. package/dist/safe-bash-presentation-engine/xml-parts.d.ts +2 -0
  526. package/dist/safe-bash-presentation-engine/xml-parts.js +23 -15
  527. package/dist/safe-bash-presentation-engine/xml-view.js +3 -3
  528. package/dist/safe-bash-presentation-engine/xml.js +3 -3
  529. package/dist/safe-bash-query-engine/index.js +4 -4
  530. package/dist/safe-bash-query-engine/interpreter.js +2 -2
  531. package/dist/safe-bash-query-engine/query-core.js +4 -4
  532. package/dist/safe-bash-regex-engine/index.js +1 -1
  533. package/dist/safe-bash-regex-engine/python-glob.js +1 -1
  534. package/dist/safe-bash-regex-engine/text/regex.d.ts +19 -0
  535. package/dist/safe-bash-regex-engine/text/regex.js +1 -1
  536. package/dist/safe-bash-xml-engine/document.js +3 -3
  537. package/dist/safe-bash-xml-engine/evaluate.js +1 -1
  538. package/dist/safe-bash-xml-engine/index.d.ts +1 -0
  539. package/dist/safe-bash-xml-engine/index.js +9 -5
  540. package/dist/safe-bash-xml-engine/query.js +2 -2
  541. package/dist/safe-bash-xml-engine/recovery.d.ts +10 -0
  542. package/dist/safe-bash-xml-engine/stored-document.d.ts +3 -3
  543. package/dist/safe-bash-xml-engine/stored-document.js +1 -1
  544. package/dist/safe-bash-xml-engine/stored-evaluate.js +1 -1
  545. package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
  546. package/dist/safe-bash-zip-engine/zip/volumes.js +3 -3
  547. package/dist/spreadsheet-engine/datasource.js +16 -2
  548. package/dist/spreadsheet-engine/formulas/diagnostics.d.ts +2 -1
  549. package/dist/spreadsheet-engine/formulas/diagnostics.js +2 -2
  550. package/dist/spreadsheet-engine/formulas/evaluator.d.ts +1 -1
  551. package/dist/spreadsheet-engine/formulas/evaluator.js +2 -1
  552. package/dist/spreadsheet-engine/formulas/functions/python-printf.js +56 -33
  553. package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +1 -1
  554. package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +54 -24
  555. package/dist/spreadsheet-format-xls/biff-properties-merge.d.ts +6 -2
  556. package/dist/spreadsheet-format-xls/biff-properties-merge.js +413 -296
  557. package/dist/spreadsheet-format-xls/biff-properties-write.js +40 -23
  558. package/dist/spreadsheet-format-xls/biff-properties.js +95 -175
  559. package/dist/spreadsheet-format-xls/biff-property-dictionary.d.ts +5 -0
  560. package/dist/spreadsheet-format-xls/biff-property-dictionary.js +75 -0
  561. package/dist/spreadsheet-format-xls/biff-property-index.d.ts +23 -0
  562. package/dist/spreadsheet-format-xls/biff-property-index.js +93 -0
  563. package/dist/spreadsheet-format-xls/biff-property-name.d.ts +4 -0
  564. package/dist/spreadsheet-format-xls/biff-property-name.js +114 -0
  565. package/dist/spreadsheet-format-xls/biff-property-range.d.ts +17 -3
  566. package/dist/spreadsheet-format-xls/biff-property-range.js +178 -37
  567. package/dist/spreadsheet-format-xls/biff-property-text.d.ts +6 -0
  568. package/dist/spreadsheet-format-xls/biff-property-text.js +68 -0
  569. package/dist/spreadsheet-format-xls/biff-property-transcode.d.ts +5 -0
  570. package/dist/spreadsheet-format-xls/biff-property-transcode.js +45 -0
  571. package/package.json +8 -3
  572. package/dist/safe-bash/command-chunks/biff-YKPDH35C-MVQIWNKV.js +0 -4974
  573. package/dist/safe-bash/command-chunks/chunk-2VLAXKTS.js +0 -245
  574. package/dist/safe-bash/command-chunks/chunk-5Q22ZLNC.js +0 -127
  575. package/dist/safe-bash/command-chunks/chunk-JKLOBSMP.js +0 -56
  576. package/dist/safe-bash/command-chunks/chunk-JYTESTBS.js +0 -99
  577. package/dist/safe-bash/command-chunks/chunk-ZEGNRZV2.js +0 -333
  578. package/dist/safe-bash/command-chunks/paradox-ZWWXYY4J-JYOSWSBL.js +0 -362
  579. package/dist/spreadsheet-format-xls/biff-properties-layout.js +0 -56
  580. package/dist/safe-bash/command-chunks/{chunk-X2HVVMTW.js → chunk-AW4Q3GZW.js} +6 -6
  581. package/dist/safe-bash/command-chunks/{chunk-JC2EV66U.js → chunk-BJXADHRT.js} +3 -3
  582. package/dist/safe-bash/command-chunks/{chunk-XI2LETBJ.js → chunk-BXU5Y7I5.js} +3 -3
  583. package/dist/safe-bash/command-chunks/{chunk-PVLPWVRH.js → chunk-D3HW7R2N.js} +3 -3
  584. package/dist/safe-bash/command-chunks/{chunk-OLK3DCJD.js → chunk-DYERIXPU.js} +3 -3
  585. package/dist/safe-bash/command-chunks/{chunk-WYBCSJFG.js → chunk-FWCUEZ3K.js} +3 -3
  586. package/dist/safe-bash/command-chunks/{chunk-FF2SQ2GP.js → chunk-GGH376XQ.js} +3 -3
  587. package/dist/safe-bash/command-chunks/{chunk-D66Q7QJ3.js → chunk-JRSZ5IGD.js} +6 -6
  588. package/dist/safe-bash/command-chunks/{chunk-Z3YB4EVE.js → chunk-KSM5CCHT.js} +8 -8
  589. package/dist/safe-bash/command-chunks/{chunk-NJ4NTTCR.js → chunk-LNLACEAN.js} +8 -8
  590. package/dist/safe-bash/command-chunks/{chunk-NBTG6NF6.js → chunk-LTJRUMK6.js} +3 -3
  591. package/dist/safe-bash/command-chunks/{chunk-XCYTG7CR.js → chunk-NJGL5JQ6.js} +3 -3
  592. package/dist/safe-bash/command-chunks/{chunk-SZ66JC25.js → chunk-Q7J2NTH2.js} +3 -3
  593. package/dist/safe-bash/command-chunks/{chunk-MDV7W5AS.js → chunk-SKNI2XQA.js} +3 -3
  594. package/dist/safe-bash/command-chunks/{chunk-7ZWACKCG.js → chunk-T6OXG7QQ.js} +3 -3
  595. package/dist/safe-bash/command-chunks/{chunk-ECDEPKKW.js → chunk-W25EIKDJ.js} +3 -3
  596. package/dist/safe-bash/command-chunks/{chunk-4YSBUQPV.js → chunk-W2FKFEVY.js} +3 -3
  597. package/dist/safe-bash/command-chunks/{chunk-2CIDPOUV.js → chunk-WSNHJZQ5.js} +3 -3
  598. package/dist/safe-bash/command-chunks/{chunk-4H3TYOVC.js → chunk-Y7AXMCFV.js} +3 -3
  599. package/dist/safe-bash/command-chunks/{chunk-U6IEK2CI.js → chunk-YPG55QTP.js} +7 -7
  600. package/dist/safe-bash/command-chunks/{chunk-252L5YC5.js → chunk-Z37OM247.js} +6 -6
  601. package/dist/safe-bash/command-chunks/{pln-DFS7VLVS-JATX6FS7.js → pln-DFS7VLVS-OVOBS4QX.js} +3 -3
  602. package/dist/safe-bash/command-chunks/{psion-YBI6JEQI-6OMC2PGC.js → psion-YBI6JEQI-GY4S6ZLC.js} +3 -3
@@ -396,30 +396,12 @@ export async function writeBiffProperties(book, context, staged = false) {
396
396
  yield* propertyChunks(encoded.get(guid));
397
397
  } });
398
398
  }
399
- // Opaque snapshot merging still needs random byte-array access. Keep it explicit
400
- // until that reader and its codepage/identity logic migrate to retained ranges.
401
399
  const snapshots = (book.unsupportedRecords ?? []).some(record => record.source === "biff" && record.kind === "ole-properties" && record.disposition === "retained");
402
- const streams = new Map();
403
- if (!staged || snapshots)
404
- for (const [name, value] of planned) {
405
- const bytes = new Uint8Array(value.length);
406
- let at = 0;
407
- for (const part of propertyChunks(value)) {
408
- bytes.set(part, at);
409
- at += part.length;
410
- }
411
- streams.set(name, bytes);
412
- }
413
- const preserved = await mergeBiffProperties(book, streams, handledMetadata, context, charge, allocate);
414
- for (const key of unsupportedKeys)
415
- if (!preserved.has(key))
416
- await context.diagnostic?.({ code: "biff-loss-warning", severity: "warning", message: `Unsupported Excel BIFF document property: ${key}` });
417
- if (!staged)
418
- return { streams, handledMetadata, async close() { } };
400
+ const streams = new Map(), inputs = [];
419
401
  const sources = new Map();
420
402
  const close = async () => {
421
403
  const errors = [];
422
- for (const source of sources.values())
404
+ for (const source of [...sources.values(), ...inputs])
423
405
  try {
424
406
  await source.close();
425
407
  }
@@ -432,8 +414,42 @@ export async function writeBiffProperties(book, context, staged = false) {
432
414
  throw new AggregateError(errors, "BIFF property sources cleanup failed");
433
415
  };
434
416
  try {
417
+ if (!staged || snapshots)
418
+ for (const [name, value] of planned) {
419
+ if (staged) {
420
+ const source = await stagePropertyBytes(value, context);
421
+ inputs.push(source);
422
+ streams.set(name, source);
423
+ }
424
+ else {
425
+ const bytes = new Uint8Array(value.length);
426
+ let at = 0;
427
+ for (const part of propertyChunks(value)) {
428
+ bytes.set(part, at);
429
+ at += part.length;
430
+ }
431
+ streams.set(name, bytes);
432
+ }
433
+ }
434
+ const preserved = await mergeBiffProperties(book, streams, handledMetadata, context, charge, allocate, staged ? { sources, reserve } : undefined);
435
+ for (const key of unsupportedKeys)
436
+ if (!preserved.has(key))
437
+ await context.diagnostic?.({ code: "biff-loss-warning", severity: "warning", message: `Unsupported Excel BIFF document property: ${key}` });
438
+ if (!staged)
439
+ return { streams, handledMetadata, async close() { } };
435
440
  for (const [name, value] of snapshots ? streams : planned)
436
- sources.set(name, await stagePropertyBytes(value, context));
441
+ if (!sources.has(name)) {
442
+ const bytes = 'size' in value ? { length: value.size, async *chunks() {
443
+ for (let at = 0; at < value.size;) {
444
+ const part = await value.read(at, Math.min(16384, value.size - at));
445
+ at += part.length;
446
+ yield part;
447
+ }
448
+ } } : value;
449
+ sources.set(name, await stagePropertyBytes(bytes, context));
450
+ }
451
+ for (const input of inputs)
452
+ await input.close();
437
453
  return { streams: sources, handledMetadata, close };
438
454
  }
439
455
  catch (error) {
@@ -446,8 +462,9 @@ export async function writeBiffProperties(book, context, staged = false) {
446
462
  throw error;
447
463
  }
448
464
  finally {
449
- if (snapshots)
465
+ if (staged && snapshots)
450
466
  for (const bytes of streams.values())
451
- bytes.fill(0);
467
+ if (bytes instanceof Uint8Array)
468
+ bytes.fill(0);
452
469
  }
453
470
  }
@@ -1,8 +1,8 @@
1
+ import { visitBiffPropertyDictionary } from './biff-property-dictionary.js';
1
2
  import { SsconvertError } from "../spreadsheet-engine/contracts.js";
2
3
  import { invalidBiff } from "./biff-binary.js";
3
- import { propertyRange, readPropertySectionRanges, readPropertyValueRanges } from "./biff-property-range.js";
4
- import { biffDbcsTables } from "../spreadsheet-engine/encoding/biff-dbcs-tables.js";
5
- import { biffDecode } from "./biff-strings.js";
4
+ import { propertyRange, readPropertySectionRanges, withPropertyValueRanges } from "./biff-property-range.js";
5
+ import { readBiffPropertyText } from "./biff-property-text.js";
6
6
  // OLE property-set layout and IDs: LibreOffice oleprops.cxx/.hxx at
7
7
  // bce0998afefdbc355585ca324285661a2170ba77; source receipts are in the gap ledger.
8
8
  export const biffPropertyFormats = { summary: "e0859ff2f94f6810ab9108002b27b3d9",
@@ -29,70 +29,6 @@ export async function readBiffProperties(streams, context, accountText, accountW
29
29
  if (nodes > (context.limits.workbookNodes ?? context.limits.inputBytes))
30
30
  throw new SsconvertError("resource-limit", "ssconvert BIFF property node limit exceeded");
31
31
  };
32
- const text = async (data, offset, codepage) => {
33
- const count = await data.u32(offset), width = codepage === 1200 ? 2 : 1, size = count * width;
34
- if (!count)
35
- invalidBiff("empty property string buffer");
36
- data.check(offset + 4, size);
37
- // Admit the maximum UTF-8 expansion before allocating a decoded string.
38
- if ((count - 1) * 3 > (context.limits.workbookTextBytes ?? context.limits.inputBytes))
39
- throw new SsconvertError("resource-limit", "ssconvert BIFF property text limit exceeded");
40
- accountWork(size);
41
- const end = offset + 4 + size;
42
- if ((await data.read(end - width, width)).some(Boolean))
43
- invalidBiff("unterminated property string");
44
- let value = "";
45
- const unicode = codepage === 1200 || codepage === 65001;
46
- const decoder = unicode ? new TextDecoder(codepage === 1200 ? "utf-16le" : "utf-8", { fatal: true, ignoreBOM: true }) : undefined;
47
- const multibyte = biffDbcsTables[codepage];
48
- let lead;
49
- if (!unicode && !multibyte)
50
- biffDecode(new Uint8Array(), codepage);
51
- for (let at = offset + 4; at < end - width;) {
52
- const bytes = await data.read(at, Math.min(16384, end - width - at));
53
- at += bytes.length;
54
- if (decoder) {
55
- try {
56
- value += decoder.decode(bytes, { stream: true });
57
- }
58
- catch {
59
- invalidBiff("invalid property string encoding");
60
- }
61
- }
62
- else if (multibyte) {
63
- const characters = [];
64
- for (const byte of bytes) {
65
- if (lead !== undefined) {
66
- const character = multibyte.double[lead]?.[byte];
67
- if (character === undefined || character === "\uffff")
68
- invalidBiff("invalid or truncated DBCS character");
69
- characters.push(character);
70
- lead = undefined;
71
- }
72
- else {
73
- const character = multibyte.single[byte];
74
- if (character === "\uffff")
75
- lead = byte;
76
- else
77
- characters.push(character);
78
- }
79
- }
80
- value += characters.join("");
81
- }
82
- else
83
- value += biffDecode(bytes, codepage);
84
- }
85
- if (lead !== undefined)
86
- invalidBiff("invalid or truncated DBCS character");
87
- if (decoder)
88
- try {
89
- value += decoder.decode();
90
- }
91
- catch {
92
- invalidBiff("invalid property string encoding");
93
- }
94
- return { value: accountText(value), end: width === 2 ? Math.ceil(end / 4) * 4 : end };
95
- };
96
32
  for (const target of ["\u0005SummaryInformation", "\u0005DocumentSummaryInformation"]) {
97
33
  let streamName = target, bytes = streams.get(target);
98
34
  if (!bytes)
@@ -108,125 +44,109 @@ export async function readBiffProperties(streams, context, accountText, accountW
108
44
  continue;
109
45
  const file = propertyRange(bytes, context);
110
46
  accountWork(file.size);
111
- const sections = await readPropertySectionRanges(file, admit, accountWork);
47
+ const sections = readPropertySectionRanges(file, admit, accountWork, context);
112
48
  let unknown = false;
113
49
  const modeled = [];
114
- for (const { guid, offset, end } of sections) {
50
+ for await (const { guid, offset, end } of sections) {
115
51
  if (!biffPropertyFields.has(guid) && guid !== custom) {
116
52
  unknown = true;
117
53
  continue;
118
54
  }
119
- const values = await readPropertyValueRanges(file.slice(offset, end - offset), admit, accountWork);
120
- const cp = values.get(1);
121
- let codepage = 1252;
122
- if (cp) {
123
- if ((await cp.u32(0)) !== 2)
124
- invalidBiff("invalid property codepage type");
125
- codepage = await cp.u16(4);
126
- }
127
- const names = new Map(), dictionary = values.get(0);
128
- try {
129
- if (dictionary && guid === custom) {
130
- const length = await dictionary.u32(0);
131
- dictionary.check(4, length * 9);
132
- admit(length);
133
- let at = 4;
134
- for (let i = 0; i < length; i++) {
135
- const id = await dictionary.u32(at), entry = await text(dictionary, at + 4, codepage);
136
- if (id < 2 || names.has(id) || !entry.value)
137
- invalidBiff("invalid property dictionary entry");
138
- names.set(id, entry.value);
139
- at = entry.end;
140
- }
55
+ await withPropertyValueRanges(file.slice(offset, end - offset), admit, accountWork, context, async (values) => {
56
+ const cp = await values.get(1);
57
+ let codepage = 1252;
58
+ if (cp) {
59
+ if ((await cp.u32(0)) !== 2)
60
+ invalidBiff("invalid property codepage type");
61
+ codepage = await cp.u16(4);
141
62
  }
142
- }
143
- catch (error) {
144
- if (!(error instanceof SsconvertError) || error.code !== "unsupported-feature")
145
- throw error;
146
- unknown = true;
147
- continue;
148
- }
149
- for (const [id, data] of values) {
150
- context.signal.throwIfAborted();
151
- if (id < 2)
152
- continue;
153
- const key = guid === custom ? names.get(id) : biffPropertyFields.get(guid)?.get(id);
154
- if (key === undefined || Object.hasOwn(properties, key)) {
155
- unknown = true;
156
- continue;
157
- }
158
- let value;
159
- const type = await data.u32(0);
160
- try {
161
- if (type === 30 || type === 31)
162
- value = (await text(data, 4, type === 31 ? 1200 : codepage)).value;
163
- else if (type === 3)
164
- value = (await data.u32(4)) | 0;
165
- else if (type === 5) {
166
- value = await data.f64(4);
167
- if (!Number.isFinite(value))
168
- invalidBiff("nonfinite property value");
169
- }
170
- else if (type === 11)
171
- value = (await data.u16(4)) !== 0;
172
- else if (type === 64) {
173
- const ticks = BigInt(await data.u32(4)) + (BigInt(await data.u32(8)) << 32n);
174
- if (guid === summary && id === 10) {
175
- const fraction = (ticks % 10000000n).toString().padStart(7, "0");
176
- let end = fraction.length;
177
- while (end && fraction[end - 1] === "0")
178
- end--;
179
- value = `PT${ticks / 600000000n}M${ticks / 10000000n % 60n}${end ? "." + fraction.slice(0, end) : ""}S`;
63
+ const dictionary = guid === custom ? await values.get(0) : undefined;
64
+ const supported = await visitBiffPropertyDictionary(dictionary, codepage, context, admit, accountText, accountWork, async (getName) => {
65
+ for await (const [id, data] of values.entries()) {
66
+ context.signal.throwIfAborted();
67
+ if (id < 2)
68
+ continue;
69
+ const key = guid === custom ? await getName(id) : biffPropertyFields.get(guid)?.get(id);
70
+ if (key === undefined || Object.hasOwn(properties, key)) {
71
+ unknown = true;
72
+ continue;
180
73
  }
181
- else {
182
- value = new Date(Number(ticks / 10000n) - 11644473600000).toISOString();
183
- // The workbook model stores timestamps as strings; retain the
184
- // original property bytes when Date's millisecond precision loses ticks.
185
- if (ticks % 10000n)
186
- unknown = true;
74
+ let value;
75
+ const type = await data.u32(0);
76
+ try {
77
+ if (type === 30 || type === 31)
78
+ value = (await readBiffPropertyText(data, 4, type === 31 ? 1200 : codepage, context, accountText, accountWork)).value;
79
+ else if (type === 3)
80
+ value = (await data.u32(4)) | 0;
81
+ else if (type === 5) {
82
+ value = await data.f64(4);
83
+ if (!Number.isFinite(value))
84
+ invalidBiff("nonfinite property value");
85
+ }
86
+ else if (type === 11)
87
+ value = (await data.u16(4)) !== 0;
88
+ else if (type === 64) {
89
+ const ticks = BigInt(await data.u32(4)) + (BigInt(await data.u32(8)) << 32n);
90
+ if (guid === summary && id === 10) {
91
+ const fraction = (ticks % 10000000n).toString().padStart(7, "0");
92
+ let end = fraction.length;
93
+ while (end && fraction[end - 1] === "0")
94
+ end--;
95
+ value = `PT${ticks / 600000000n}M${ticks / 10000000n % 60n}${end ? "." + fraction.slice(0, end) : ""}S`;
96
+ }
97
+ else {
98
+ value = new Date(Number(ticks / 10000n) - 11644473600000).toISOString();
99
+ // The workbook model stores timestamps as strings; retain the
100
+ // original property bytes when Date's millisecond precision loses ticks.
101
+ if (ticks % 10000n)
102
+ unknown = true;
103
+ }
104
+ accountText(value);
105
+ }
106
+ else if (type === 7) {
107
+ const days = await data.f64(4);
108
+ if (!Number.isFinite(days) || days <= -657435 || days >= 2958466)
109
+ invalidBiff("invalid OLE property date");
110
+ // OLE Automation uses 1899-12-30 and the absolute fractional day.
111
+ // LibreOffice's oleprops DATE path truncates it and uses 1899-12-31;
112
+ // the documented Automation representation governs the stored value.
113
+ value = new Date(-2209161600000 + Math.round((Math.trunc(days) + Math.abs(days % 1)) * 86400000)).toISOString();
114
+ accountText(value);
115
+ }
187
116
  }
188
- accountText(value);
189
- }
190
- else if (type === 7) {
191
- const days = await data.f64(4);
192
- if (!Number.isFinite(days) || days <= -657435 || days >= 2958466)
193
- invalidBiff("invalid OLE property date");
194
- // OLE Automation uses 1899-12-30 and the absolute fractional day.
195
- // LibreOffice's oleprops DATE path truncates it and uses 1899-12-31;
196
- // the documented Automation representation governs the stored value.
197
- value = new Date(-2209161600000 + Math.round((Math.trunc(days) + Math.abs(days % 1)) * 86400000)).toISOString();
198
- accountText(value);
117
+ catch (error) {
118
+ if (!(error instanceof SsconvertError) || error.code !== "unsupported-feature")
119
+ throw error;
120
+ }
121
+ if (value === undefined) {
122
+ unknown = true;
123
+ continue;
124
+ }
125
+ if (guid === summary && id === 5 && typeof value === "string") {
126
+ let count = 1;
127
+ for (const character of value)
128
+ if (character === ",")
129
+ count++;
130
+ admit(count);
131
+ accountWork(value.length);
132
+ value = value.split(",").map(keyword => {
133
+ let start = 0, end = keyword.length;
134
+ while (start < end && isBiffKeywordSpace(keyword.charCodeAt(start)))
135
+ start++;
136
+ while (end > start && isBiffKeywordSpace(keyword.charCodeAt(end - 1)))
137
+ end--;
138
+ return keyword.slice(start, end);
139
+ }).filter(Boolean);
140
+ }
141
+ accountText(key);
142
+ properties[key] = value;
143
+ modeled.push([offset, id, key]);
144
+ observe?.({ stream: streamName, section: offset, id, key, value });
199
145
  }
200
- }
201
- catch (error) {
202
- if (!(error instanceof SsconvertError) || error.code !== "unsupported-feature")
203
- throw error;
204
- }
205
- if (value === undefined) {
146
+ });
147
+ if (!supported)
206
148
  unknown = true;
207
- continue;
208
- }
209
- if (guid === summary && id === 5 && typeof value === "string") {
210
- let count = 1;
211
- for (const character of value)
212
- if (character === ",")
213
- count++;
214
- admit(count);
215
- accountWork(value.length);
216
- value = value.split(",").map(keyword => {
217
- let start = 0, end = keyword.length;
218
- while (start < end && isBiffKeywordSpace(keyword.charCodeAt(start)))
219
- start++;
220
- while (end > start && isBiffKeywordSpace(keyword.charCodeAt(end - 1)))
221
- end--;
222
- return keyword.slice(start, end);
223
- }).filter(Boolean);
224
- }
225
- accountText(key);
226
- properties[key] = value;
227
- modeled.push([offset, id, key]);
228
- observe?.({ stream: streamName, section: offset, id, key, value });
229
- }
149
+ });
230
150
  }
231
151
  if (unknown && retained) {
232
152
  if (file.size * 2 > (context.limits.workbookTextBytes ?? context.limits.inputBytes * 2))
@@ -0,0 +1,5 @@
1
+ import { type CapabilityContext } from "../spreadsheet-engine/contracts.js";
2
+ import { type BiffPropertyRange } from './biff-property-range.js';
3
+ /** Validate/account names once, retain only coordinates, and decode on lookup.
4
+ * Unsupported dictionary codepages skip the visitor so the caller retains the section. */
5
+ export declare function visitBiffPropertyDictionary(data: BiffPropertyRange | undefined, codepage: number, context: CapabilityContext, admit: (count: number) => void, accountText: (text: string) => string, accountWork: (amount: number) => void, visit: (get: (id: number) => Promise<string | undefined>) => Promise<void>): Promise<boolean>;
@@ -0,0 +1,75 @@
1
+ import { IntegerTable } from "@poe-platform/safe-fs/storage";
2
+ import { SsconvertError } from "../spreadsheet-engine/contracts.js";
3
+ import { invalidBiff } from './biff-binary.js';
4
+ import { propertyIndexStorage } from './biff-property-range.js';
5
+ import { readBiffPropertyText } from './biff-property-text.js';
6
+ /** Validate/account names once, retain only coordinates, and decode on lookup.
7
+ * Unsupported dictionary codepages skip the visitor so the caller retains the section. */
8
+ export async function visitBiffPropertyDictionary(data, codepage, context, admit, accountText, accountWork, visit) {
9
+ const count = data ? await data.u32(0) : 0;
10
+ if (data) {
11
+ data.check(4, count * 9);
12
+ admit(count);
13
+ }
14
+ const storage = data && context.createWorkingStorage?.();
15
+ let active = true, supported = true;
16
+ const check = () => {
17
+ context.signal.throwIfAborted();
18
+ data?.check(0, 0);
19
+ if (!active)
20
+ throw new SsconvertError('invalid-request', 'BIFF property dictionary index is closed');
21
+ };
22
+ try {
23
+ const backing = storage && propertyIndexStorage(storage, data);
24
+ backing?.allocate(8);
25
+ const index = backing ? new IntegerTable(backing, 64) : new Map();
26
+ let at = 4;
27
+ for (let i = 0; i < count; i++) {
28
+ const id = await data.u32(at);
29
+ let entry;
30
+ try {
31
+ entry = await readBiffPropertyText(data, at + 4, codepage, context, accountText, accountWork);
32
+ }
33
+ catch (error) {
34
+ if (!(error instanceof SsconvertError) || error.code !== 'unsupported-feature')
35
+ throw error;
36
+ supported = false;
37
+ break;
38
+ }
39
+ if (id < 2 || await index.get(BigInt(id)) !== undefined || !entry.value)
40
+ invalidBiff('invalid property dictionary entry');
41
+ check();
42
+ await index.set(BigInt(id), BigInt(at + 4));
43
+ check();
44
+ at = entry.end;
45
+ }
46
+ if (supported)
47
+ await visit(async (id) => {
48
+ check();
49
+ const position = await index.get(BigInt(id));
50
+ check();
51
+ if (position === undefined)
52
+ return undefined;
53
+ const entry = await readBiffPropertyText(data, Number(position), codepage, context, text => text, accountWork);
54
+ check();
55
+ return entry.value;
56
+ });
57
+ check();
58
+ }
59
+ catch (error) {
60
+ try {
61
+ await storage?.close();
62
+ }
63
+ catch (cleanup) {
64
+ throw new AggregateError([error, cleanup], 'BIFF property dictionary and cleanup failed');
65
+ }
66
+ throw error;
67
+ }
68
+ finally {
69
+ active = false;
70
+ }
71
+ await storage?.close();
72
+ context.signal.throwIfAborted();
73
+ data?.check(0, 0);
74
+ return supported;
75
+ }
@@ -0,0 +1,23 @@
1
+ import type { WorkingStorage } from "../spreadsheet-engine/contracts.js";
2
+ export interface BiffPropertyDescriptor {
3
+ offset: number;
4
+ size: number;
5
+ block: number;
6
+ name: string;
7
+ }
8
+ /** Two bounded radix caches index UTF-16 name edges and stable range order.
9
+ * Linked fixed-size records replay original descriptor order without an array. */
10
+ export declare class BiffPropertyDescriptorIndex {
11
+ private readonly storage;
12
+ private readonly check;
13
+ private readonly names;
14
+ private readonly ranges;
15
+ private node;
16
+ private count;
17
+ private first;
18
+ private last;
19
+ constructor(storage: WorkingStorage, check: () => void);
20
+ add(entry: BiffPropertyDescriptor): Promise<void>;
21
+ validate(): Promise<void>;
22
+ entries(): AsyncIterable<BiffPropertyDescriptor>;
23
+ }
@@ -0,0 +1,93 @@
1
+ import { IntegerTable } from "@poe-platform/safe-fs/storage";
2
+ import { Binary, invalidBiff } from './biff-binary.js';
3
+ /** Two bounded radix caches index UTF-16 name edges and stable range order.
4
+ * Linked fixed-size records replay original descriptor order without an array. */
5
+ export class BiffPropertyDescriptorIndex {
6
+ storage;
7
+ check;
8
+ names;
9
+ ranges;
10
+ node = 2n;
11
+ count = 0;
12
+ first = 0;
13
+ last = 0;
14
+ constructor(storage, check) {
15
+ this.storage = storage;
16
+ this.check = check;
17
+ storage.allocate(8);
18
+ this.check();
19
+ this.names = new IntegerTable(storage, 64);
20
+ this.ranges = new IntegerTable(storage, 64);
21
+ }
22
+ async add(entry) {
23
+ this.check();
24
+ let node = 1n;
25
+ const name = entry.name.toUpperCase();
26
+ for (let i = 0; i < name.length; i++) {
27
+ const key = node << 16n | BigInt(name.charCodeAt(i));
28
+ let next = await this.names.get(key);
29
+ this.check();
30
+ if (next === undefined) {
31
+ next = this.node++;
32
+ await this.names.set(key, next);
33
+ this.check();
34
+ }
35
+ node = next;
36
+ }
37
+ const terminal = node << 16n;
38
+ if (await this.names.get(terminal) !== undefined)
39
+ invalidBiff('duplicate or invalid encrypted property stream name');
40
+ this.check();
41
+ await this.names.set(terminal, 1n);
42
+ this.check();
43
+ await this.ranges.set(BigInt(entry.offset) << 32n | BigInt(this.count++), BigInt(entry.offset + entry.size));
44
+ this.check();
45
+ const bytes = new Uint8Array(88), view = new DataView(bytes.buffer);
46
+ view.setUint32(8, entry.offset, true);
47
+ view.setUint32(12, entry.size, true);
48
+ view.setUint16(16, entry.block, true);
49
+ view.setUint16(18, entry.name.length, true);
50
+ for (let i = 0; i < entry.name.length; i++)
51
+ view.setUint16(20 + i * 2, entry.name.charCodeAt(i), true);
52
+ const position = this.storage.allocate(bytes.length);
53
+ this.check();
54
+ try {
55
+ await this.storage.write(position, bytes);
56
+ this.check();
57
+ if (this.last) {
58
+ view.setFloat64(0, position, true);
59
+ await this.storage.write(this.last, bytes.subarray(0, 8));
60
+ this.check();
61
+ }
62
+ else
63
+ this.first = position;
64
+ this.last = position;
65
+ }
66
+ finally {
67
+ bytes.fill(0);
68
+ }
69
+ }
70
+ async validate() {
71
+ let end = 0n;
72
+ for await (const [key, next] of this.ranges.entries()) {
73
+ this.check();
74
+ if (key >> 32n < end)
75
+ invalidBiff('overlapping encrypted property payloads');
76
+ end = next;
77
+ }
78
+ }
79
+ async *entries() {
80
+ let position = this.first;
81
+ while (position) {
82
+ this.check();
83
+ const bytes = new Binary(await this.storage.read(position, 88));
84
+ this.check();
85
+ bytes.check(0, 88);
86
+ position = bytes.f64(0);
87
+ let name = '';
88
+ for (let i = 0; i < bytes.u16(18); i++)
89
+ name += String.fromCharCode(bytes.u16(20 + i * 2));
90
+ yield { offset: bytes.u32(8), size: bytes.u32(12), block: bytes.u16(16), name };
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,4 @@
1
+ import { type CapabilityContext } from "../spreadsheet-engine/contracts.js";
2
+ import type { BiffPropertyBytes } from './biff-property-bytes.js';
3
+ /** Validate representability before exposing bounded encoded windows. */
4
+ export declare function createBiffPropertyNameEncoder(context: CapabilityContext, charge: (amount: number) => void, accountText: (text: string) => string): (name: string, codepage: number) => BiffPropertyBytes | undefined;