sandforge 1.83.0 → 1.84.1

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 (254) hide show
  1. package/README.md +1 -1
  2. package/lib/chunk-23SEDORH.mjs +11 -0
  3. package/lib/{chunk-I5C4O3VA.mjs → chunk-24RFOFYT.mjs} +1 -1
  4. package/lib/chunk-26POJDIT.mjs +7 -0
  5. package/lib/{chunk-WJAZ5LHL.mjs → chunk-2AZQHBEF.mjs} +1 -1
  6. package/lib/{chunk-IHGYJZZ2.mjs → chunk-2HVOZUM4.mjs} +1 -1
  7. package/lib/{chunk-3V4YH5KO.mjs → chunk-2JDAOWUW.mjs} +1 -1
  8. package/lib/{chunk-BNKT3R3F.mjs → chunk-2METQHGG.mjs} +1 -1
  9. package/lib/chunk-2WFIVO4F.mjs +13 -0
  10. package/lib/chunk-2YHZBUZE.mjs +7 -0
  11. package/lib/{chunk-7DPHZWA4.mjs → chunk-326AJTIU.mjs} +14 -14
  12. package/lib/{chunk-UIR77ZJD.mjs → chunk-36JOHEJL.mjs} +1 -1
  13. package/lib/chunk-3PVRGTVK.mjs +7 -0
  14. package/lib/{chunk-2WMKJVD2.mjs → chunk-3Q353S2R.mjs} +1 -1
  15. package/lib/chunk-3TZSBHEY.mjs +7 -0
  16. package/lib/{chunk-T36DZJPH.mjs → chunk-43TOMFV4.mjs} +1 -1
  17. package/lib/{chunk-XAMMIPZ4.mjs → chunk-4CVUUVGJ.mjs} +1 -1
  18. package/lib/{chunk-6YC2ELCU.mjs → chunk-4EOHEDFP.mjs} +1 -1
  19. package/lib/{chunk-ZB5E7NHU.mjs → chunk-4JE4BYXK.mjs} +1 -1
  20. package/lib/{chunk-JREKJO3D.mjs → chunk-54WZUS7J.mjs} +1 -1
  21. package/lib/{chunk-CGZGL6VT.mjs → chunk-5CRLRHOJ.mjs} +1 -1
  22. package/lib/{chunk-UOHZW2L4.mjs → chunk-5IZTFMJM.mjs} +1 -1
  23. package/lib/{chunk-6VOQFISN.mjs → chunk-5M5FQ7RP.mjs} +1 -1
  24. package/lib/{chunk-U4YFYSF3.mjs → chunk-5SMWFNE7.mjs} +1 -1
  25. package/lib/{chunk-HQZUQXDC.mjs → chunk-5XTUSN72.mjs} +1 -1
  26. package/lib/chunk-6I6TWNV5.mjs +7 -0
  27. package/lib/{chunk-QLRWU3MB.mjs → chunk-6JWWSDM6.mjs} +1 -1
  28. package/lib/chunk-6O222PW6.mjs +7 -0
  29. package/lib/{chunk-J3TIHLWG.mjs → chunk-6PD6K7LP.mjs} +1 -1
  30. package/lib/{chunk-ISAUCWYK.mjs → chunk-6QE6R6RL.mjs} +1 -1
  31. package/lib/{chunk-2KTGDYUH.mjs → chunk-6WX5ZU7Q.mjs} +1 -1
  32. package/lib/{chunk-XAUQXYPW.mjs → chunk-6YL7BNYD.mjs} +1 -1
  33. package/lib/chunk-6ZLKIT3H.mjs +7 -0
  34. package/lib/{chunk-XKFHTBAB.mjs → chunk-7QYHEHMA.mjs} +1 -1
  35. package/lib/chunk-7SQSWVAU.mjs +9 -0
  36. package/lib/{chunk-NNV7IGM7.mjs → chunk-7UVKIWKV.mjs} +1 -1
  37. package/lib/{chunk-RZKJQOOC.mjs → chunk-7WATA4SB.mjs} +1 -1
  38. package/lib/{chunk-DMT5SCO3.mjs → chunk-7YNM6KFZ.mjs} +1 -1
  39. package/lib/{chunk-TMIESDE5.mjs → chunk-A3MYSOOC.mjs} +1 -1
  40. package/lib/chunk-AL4C3GFT.mjs +7 -0
  41. package/lib/chunk-B3FBHVNN.mjs +21 -0
  42. package/lib/{chunk-CDWZGQAJ.mjs → chunk-B63POIPQ.mjs} +1 -1
  43. package/lib/{chunk-YEVB7LVK.mjs → chunk-BAWCOKRW.mjs} +1 -1
  44. package/lib/{chunk-FVLFO2S6.mjs → chunk-BBRWFKS5.mjs} +1 -1
  45. package/lib/chunk-BEA27DLS.mjs +7 -0
  46. package/lib/chunk-BRY3PLIZ.mjs +7 -0
  47. package/lib/chunk-CBH3TOWK.mjs +341 -0
  48. package/lib/{chunk-7V2UYZ6S.mjs → chunk-CPQIZGG5.mjs} +1 -1
  49. package/lib/chunk-CVHNXJH3.mjs +7 -0
  50. package/lib/{chunk-ZOSESZ22.mjs → chunk-D4GF4FAB.mjs} +1 -1
  51. package/lib/chunk-DGDRQRCW.mjs +7 -0
  52. package/lib/{chunk-2N73W63D.mjs → chunk-DPMRIMUC.mjs} +1 -1
  53. package/lib/chunk-DUN2EPRC.mjs +7 -0
  54. package/lib/chunk-E3A3LOCY.mjs +7 -0
  55. package/lib/{chunk-KWAVSZ2B.mjs → chunk-EAC5QCE3.mjs} +1 -1
  56. package/lib/{chunk-JUOQUG7U.mjs → chunk-EC72TIEG.mjs} +1 -1
  57. package/lib/chunk-EPFCERGL.mjs +7 -0
  58. package/lib/{chunk-6KOUYHEY.mjs → chunk-ETDCBLGU.mjs} +1 -1
  59. package/lib/{chunk-2R6GFNKF.mjs → chunk-F3AQW6IU.mjs} +1 -1
  60. package/lib/{chunk-AHUGG3WU.mjs → chunk-FITPY3L4.mjs} +1 -1
  61. package/lib/chunk-FNJ4SGWO.mjs +7 -0
  62. package/lib/{chunk-EOQON3E5.mjs → chunk-FP7CYB2F.mjs} +1 -1
  63. package/lib/{chunk-262TP6UU.mjs → chunk-GKY2JMHY.mjs} +1 -1
  64. package/lib/{chunk-JBWJ6UEZ.mjs → chunk-GMIGWR6U.mjs} +1 -1
  65. package/lib/{chunk-OS5GE52G.mjs → chunk-GNRSF65U.mjs} +1 -1
  66. package/lib/chunk-GOOVPVWX.mjs +7 -0
  67. package/lib/{chunk-DB5RVDC5.mjs → chunk-GWZRR3MM.mjs} +1 -1
  68. package/lib/{chunk-SX6QWYCQ.mjs → chunk-H2BHESDA.mjs} +2 -2
  69. package/lib/chunk-H4CGM6YO.mjs +7 -0
  70. package/lib/{chunk-NFEBX75O.mjs → chunk-HCGXK7G7.mjs} +1 -1
  71. package/lib/{chunk-4X5D3MSV.mjs → chunk-HIDW7FNV.mjs} +1 -1
  72. package/lib/chunk-HSBXRQTI.mjs +7 -0
  73. package/lib/chunk-HUZPBE47.mjs +7 -0
  74. package/lib/{chunk-F5SBGJWW.mjs → chunk-HV7VPEXP.mjs} +1 -1
  75. package/lib/chunk-I6E6T6YY.mjs +7 -0
  76. package/lib/chunk-IUM4NFKI.mjs +10 -0
  77. package/lib/chunk-IVFVNNGB.mjs +37 -0
  78. package/lib/{chunk-L4MSL4U7.mjs → chunk-IZGCEOYO.mjs} +1 -1
  79. package/lib/{chunk-E3RQ575Y.mjs → chunk-J3DND3BC.mjs} +1 -1
  80. package/lib/{chunk-MJD6CPZZ.mjs → chunk-JAEDM4SI.mjs} +1 -1
  81. package/lib/chunk-JCFBFF4Y.mjs +7 -0
  82. package/lib/{chunk-U2CTKIPE.mjs → chunk-JE6SCT6R.mjs} +1 -1
  83. package/lib/{chunk-XJICAOAQ.mjs → chunk-JGZPD4IM.mjs} +1 -1
  84. package/lib/{chunk-XCJUNX63.mjs → chunk-JKJ74BX5.mjs} +1 -1
  85. package/lib/{chunk-WAYQLQAD.mjs → chunk-JLSIWO4Z.mjs} +1 -1
  86. package/lib/{chunk-D7XUNWWU.mjs → chunk-JSAJS3MY.mjs} +1 -1
  87. package/lib/chunk-JTJK2D36.mjs +7 -0
  88. package/lib/{chunk-OTJH6AEA.mjs → chunk-KAZS5Z6W.mjs} +1 -1
  89. package/lib/chunk-KB4ZHM4Q.mjs +10 -0
  90. package/lib/{chunk-N2HYG3BL.mjs → chunk-KGU4SVIT.mjs} +1 -1
  91. package/lib/{chunk-FKCIGJOI.mjs → chunk-KJWFYBMU.mjs} +2 -2
  92. package/lib/{chunk-KXUOHACP.mjs → chunk-KZTZDC7H.mjs} +1 -1
  93. package/lib/{chunk-S4PRKKGC.mjs → chunk-L2E5WBGD.mjs} +1 -1
  94. package/lib/{chunk-X2XZQ434.mjs → chunk-L53JWJ3S.mjs} +1 -1
  95. package/lib/{chunk-CQAFVEKP.mjs → chunk-LA4KIATH.mjs} +6 -6
  96. package/lib/chunk-LC3NDW4N.mjs +7 -0
  97. package/lib/{chunk-4V3QO7HF.mjs → chunk-LKTNQEBS.mjs} +1 -1
  98. package/lib/chunk-M2ABR4JM.mjs +7 -0
  99. package/lib/{chunk-3CM7LAPE.mjs → chunk-M4BLK6HJ.mjs} +1 -1
  100. package/lib/{chunk-Z3MGN42K.mjs → chunk-M6K34KGF.mjs} +1 -1
  101. package/lib/{chunk-TUPZY2QJ.mjs → chunk-MDMPJEV3.mjs} +1 -1
  102. package/lib/{chunk-BVZ5H3N4.mjs → chunk-MJZU3U5O.mjs} +68 -63
  103. package/lib/{chunk-OUU47Y7A.mjs → chunk-MSIEU5MR.mjs} +1 -1
  104. package/lib/{chunk-QQDZQCO2.mjs → chunk-N4WPCWJO.mjs} +1 -1
  105. package/lib/{chunk-MTM4KG3T.mjs → chunk-NCZKWSC7.mjs} +1 -1
  106. package/lib/{chunk-Y7YUNRKK.mjs → chunk-NED4MBIM.mjs} +1 -1
  107. package/lib/{chunk-QKJXIY6L.mjs → chunk-NOBQTEQD.mjs} +1 -1
  108. package/lib/{chunk-WBELLGNE.mjs → chunk-NSQWI7ZY.mjs} +1 -1
  109. package/lib/{chunk-BPHTA6KP.mjs → chunk-O677VOGO.mjs} +1 -1
  110. package/lib/chunk-OFTT7J2M.mjs +7 -0
  111. package/lib/{chunk-JH4ZTVQN.mjs → chunk-OLCVHL7I.mjs} +1 -1
  112. package/lib/chunk-OM5NORJG.mjs +7 -0
  113. package/lib/{chunk-QP3JLFIO.mjs → chunk-OMNMLKDT.mjs} +1 -1
  114. package/lib/{chunk-WABXKL4N.mjs → chunk-OPMO6I45.mjs} +1 -1
  115. package/lib/{chunk-7ZBDACVG.mjs → chunk-OUZQPYT3.mjs} +1 -1
  116. package/lib/chunk-OVNMB6Q2.mjs +7 -0
  117. package/lib/{chunk-DKDKCGXV.mjs → chunk-PAXNWTYK.mjs} +1 -1
  118. package/lib/{chunk-GLN4PI5P.mjs → chunk-PBY2O6OF.mjs} +1 -1
  119. package/lib/chunk-PEDQPM2P.mjs +926 -0
  120. package/lib/chunk-PH7SP4YK.mjs +21 -0
  121. package/lib/{chunk-BT43WSOS.mjs → chunk-PMN4PAC3.mjs} +1 -1
  122. package/lib/chunk-PMWAFDUB.mjs +48 -0
  123. package/lib/chunk-PPLVFX6N.mjs +7 -0
  124. package/lib/{chunk-L3I6DAHX.mjs → chunk-PR3XCSPO.mjs} +1 -1
  125. package/lib/{chunk-WZN36ACK.mjs → chunk-PR42EZSR.mjs} +1 -1
  126. package/lib/{chunk-NDFFIJL5.mjs → chunk-PWRJRL5U.mjs} +1 -1
  127. package/lib/{chunk-NS6ONPWL.mjs → chunk-Q7GIJBCD.mjs} +1 -1
  128. package/lib/chunk-Q7TLC3I2.mjs +7 -0
  129. package/lib/{chunk-ALBY5SOH.mjs → chunk-QAFPQ3YB.mjs} +1 -1
  130. package/lib/{chunk-KKS2KFBT.mjs → chunk-QKEKG2LD.mjs} +1 -1
  131. package/lib/{chunk-OOIDCHBQ.mjs → chunk-QO53K5W2.mjs} +2 -2
  132. package/lib/{chunk-HVX2AFYW.mjs → chunk-QTG6LUZT.mjs} +1 -1
  133. package/lib/{chunk-K7G3W7XH.mjs → chunk-RE7RYF3B.mjs} +1 -1
  134. package/lib/{chunk-JIPT5FUD.mjs → chunk-RGBGUCJA.mjs} +1 -1
  135. package/lib/{chunk-GT5ZKU6V.mjs → chunk-RGUQOSBU.mjs} +1 -1
  136. package/lib/{chunk-VXZ5PTOM.mjs → chunk-RHNTHGNU.mjs} +1 -1
  137. package/lib/chunk-RKTFFCNS.mjs +7 -0
  138. package/lib/chunk-RMFU4BAL.mjs +28 -0
  139. package/lib/{chunk-DNQKVCUV.mjs → chunk-ROV3QXEF.mjs} +11 -11
  140. package/lib/chunk-RT47RKLY.mjs +7 -0
  141. package/lib/{chunk-ISOSTAJR.mjs → chunk-S42RBRH2.mjs} +1 -1
  142. package/lib/{chunk-27BBEGUD.mjs → chunk-SI267LYR.mjs} +1 -1
  143. package/lib/chunk-T3G6VZNS.mjs +7 -0
  144. package/lib/chunk-TNT27RBG.mjs +7 -0
  145. package/lib/chunk-UBIKR5VO.mjs +7 -0
  146. package/lib/chunk-UI3JQVRU.mjs +8 -0
  147. package/lib/{chunk-RVCPQVKM.mjs → chunk-UIOMAX56.mjs} +1 -1
  148. package/lib/chunk-UX3BVH2Y.mjs +7 -0
  149. package/lib/{chunk-L4RJX7DG.mjs → chunk-VCUXCK36.mjs} +1 -1
  150. package/lib/chunk-VINGECAJ.mjs +10 -0
  151. package/lib/chunk-VOXJHJIE.mjs +7 -0
  152. package/lib/chunk-W6PN6TJG.mjs +7 -0
  153. package/lib/{chunk-D6JT4PAB.mjs → chunk-WAPSSYMT.mjs} +1 -1
  154. package/lib/{chunk-7BQMBXKX.mjs → chunk-WUUKFE2U.mjs} +1 -1
  155. package/lib/chunk-WWTCWWZI.mjs +7 -0
  156. package/lib/chunk-WXDLQT2O.mjs +10 -0
  157. package/lib/{chunk-TCEXCHXR.mjs → chunk-WY5V5PR3.mjs} +1 -1
  158. package/lib/chunk-X4BXESMQ.mjs +7 -0
  159. package/lib/chunk-XBQGZGWR.mjs +7 -0
  160. package/lib/{chunk-AXFD2OH6.mjs → chunk-XGGOUNPP.mjs} +1 -1
  161. package/lib/chunk-XKWW3GKF.mjs +7 -0
  162. package/lib/{chunk-PDRXM5WN.mjs → chunk-Y2DRK37K.mjs} +1 -1
  163. package/lib/{chunk-ZXOUWHYE.mjs → chunk-YA6ATMTB.mjs} +1 -1
  164. package/lib/{chunk-54HYHHVL.mjs → chunk-YDXMTWAT.mjs} +1 -1
  165. package/lib/chunk-YHR4WQPR.mjs +7 -0
  166. package/lib/{chunk-LWES2KZE.mjs → chunk-YTLUYSMF.mjs} +1 -1
  167. package/lib/{chunk-2K5BYZQM.mjs → chunk-YWEQQL3C.mjs} +1 -1
  168. package/lib/{chunk-C6RKM4BB.mjs → chunk-Z4LKKOFY.mjs} +1 -1
  169. package/lib/chunk-ZBAWJUG2.mjs +7 -0
  170. package/lib/{chunk-446GBKAC.mjs → chunk-ZJW6YOMV.mjs} +1 -1
  171. package/lib/chunk-ZQQXSCVI.mjs +7 -0
  172. package/lib/{chunk-L6CLN664.mjs → chunk-ZQWIVYVM.mjs} +1 -1
  173. package/lib/{chunk-CXKZ6TYV.mjs → chunk-ZV7ZFQQC.mjs} +1 -1
  174. package/lib/sandforge-autopilot.mjs +25 -25
  175. package/lib/sandforge-backup.mjs +1 -1
  176. package/lib/sandforge-checkpoint.mjs +1 -1
  177. package/lib/sandforge-cleanup.mjs +1 -1
  178. package/lib/sandforge-clone.mjs +1 -1
  179. package/lib/sandforge-compare.mjs +52 -21
  180. package/lib/sandforge-dataops.mjs +1 -1
  181. package/lib/sandforge-empty.mjs +1 -1
  182. package/lib/sandforge-env.mjs +95 -95
  183. package/lib/sandforge-frozen.mjs +1 -1
  184. package/lib/sandforge-mcp.mjs +12 -12
  185. package/lib/sandforge-monitor.mjs +1 -1
  186. package/lib/sandforge-pipeline.mjs +1 -1
  187. package/lib/sandforge-seed.mjs +1 -1
  188. package/lib/sandforge-sync.mjs +1 -1
  189. package/lib/sandforge-users.mjs +1 -1
  190. package/lib/sandforge.mjs +1 -1
  191. package/lib/sf/sandforge/compare.mjs +2 -2
  192. package/lib/sfPlugin.mjs +1 -1
  193. package/oclif.manifest.json +1 -1
  194. package/package.json +1 -1
  195. package/lib/chunk-2ADSD5WK.mjs +0 -7
  196. package/lib/chunk-2GSMHGIV.mjs +0 -7
  197. package/lib/chunk-36Y225OM.mjs +0 -7
  198. package/lib/chunk-3OVTKRS4.mjs +0 -7
  199. package/lib/chunk-4GCYGQXD.mjs +0 -7
  200. package/lib/chunk-4JKR4PTZ.mjs +0 -8
  201. package/lib/chunk-5OGNK3JP.mjs +0 -37
  202. package/lib/chunk-6QSHWIZI.mjs +0 -48
  203. package/lib/chunk-77IVKH7R.mjs +0 -7
  204. package/lib/chunk-77MZRBWX.mjs +0 -7
  205. package/lib/chunk-7WSQ65WG.mjs +0 -9
  206. package/lib/chunk-A32ISQ6M.mjs +0 -28
  207. package/lib/chunk-AG24QMSY.mjs +0 -7
  208. package/lib/chunk-BH76USTQ.mjs +0 -11
  209. package/lib/chunk-BZ24IAP5.mjs +0 -7
  210. package/lib/chunk-CN5HGFG4.mjs +0 -7
  211. package/lib/chunk-CTPLYUXA.mjs +0 -7
  212. package/lib/chunk-DIGUC7S4.mjs +0 -341
  213. package/lib/chunk-DSR2MSBH.mjs +0 -7
  214. package/lib/chunk-ETNQHIDI.mjs +0 -9
  215. package/lib/chunk-FBXH4VRQ.mjs +0 -7
  216. package/lib/chunk-FYWNSMOZ.mjs +0 -10
  217. package/lib/chunk-GEEWPTV5.mjs +0 -7
  218. package/lib/chunk-GTRU5AV5.mjs +0 -7
  219. package/lib/chunk-I3ZO76LL.mjs +0 -21
  220. package/lib/chunk-ISA2NYJV.mjs +0 -7
  221. package/lib/chunk-IXIY6Q4M.mjs +0 -7
  222. package/lib/chunk-JAV6F6OA.mjs +0 -7
  223. package/lib/chunk-JYUMD357.mjs +0 -7
  224. package/lib/chunk-L47JCNP3.mjs +0 -7
  225. package/lib/chunk-LI2XNV7F.mjs +0 -7
  226. package/lib/chunk-LP2D3JJP.mjs +0 -7
  227. package/lib/chunk-LYOGCIYD.mjs +0 -925
  228. package/lib/chunk-N5UIE4IR.mjs +0 -7
  229. package/lib/chunk-O7GCCRPW.mjs +0 -7
  230. package/lib/chunk-OO24ZYYJ.mjs +0 -7
  231. package/lib/chunk-OS6HFJ7L.mjs +0 -7
  232. package/lib/chunk-P6WRYJN3.mjs +0 -7
  233. package/lib/chunk-PGRY365W.mjs +0 -7
  234. package/lib/chunk-PPGDAUEQ.mjs +0 -7
  235. package/lib/chunk-Q4PPI3KG.mjs +0 -7
  236. package/lib/chunk-QFTF2PGS.mjs +0 -21
  237. package/lib/chunk-QO4MPHZD.mjs +0 -7
  238. package/lib/chunk-QXB6U3ZP.mjs +0 -7
  239. package/lib/chunk-R3OM3X4L.mjs +0 -8
  240. package/lib/chunk-R7GKMAT4.mjs +0 -7
  241. package/lib/chunk-SCKUIE3R.mjs +0 -7
  242. package/lib/chunk-SU65Z2BA.mjs +0 -7
  243. package/lib/chunk-T7DDS4UQ.mjs +0 -7
  244. package/lib/chunk-TQJ5NPRC.mjs +0 -7
  245. package/lib/chunk-VZLJZEV2.mjs +0 -7
  246. package/lib/chunk-W3BQGMTR.mjs +0 -7
  247. package/lib/chunk-WXU6ZJIV.mjs +0 -7
  248. package/lib/chunk-X4HZD5U2.mjs +0 -7
  249. package/lib/chunk-X6XNTOGO.mjs +0 -7
  250. package/lib/chunk-XMQ5R6TC.mjs +0 -10
  251. package/lib/chunk-XPXEQKLR.mjs +0 -7
  252. package/lib/chunk-YBZIDW6W.mjs +0 -7
  253. package/lib/chunk-ZCOSME6P.mjs +0 -7
  254. package/lib/chunk-ZTHC42X6.mjs +0 -7
@@ -1,7 +0,0 @@
1
- import { createRequire as __sandforgeRequire } from 'node:module';
2
- import { fileURLToPath as __sandforgePath } from 'node:url';
3
- import { dirname as __sandforgeDirname } from 'node:path';
4
- const require = __sandforgeRequire(import.meta.url);
5
- const __filename = __sandforgePath(import.meta.url);
6
- const __dirname = __sandforgeDirname(__filename);
7
- import{l as a,m as b,n as c,o as d,p as e,q as f}from"./chunk-HQZUQXDC.mjs";import"./chunk-NS6ONPWL.mjs";import"./chunk-DSR2MSBH.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-YBZIDW6W.mjs";import"./chunk-Y7YUNRKK.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-N2HYG3BL.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-VXZ5PTOM.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-ZOSESZ22.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-Z3MGN42K.mjs";import"./chunk-2GSMHGIV.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-ISOSTAJR.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{a as WHOLE_ORG_MAX_NODES,b as WHOLE_ORG_MAX_PAIRS,f as discoverWholeOrg,d as eachInPool,e as recordCountsOf,c as refusedByTheOrg};
@@ -1,7 +0,0 @@
1
- import { createRequire as __sandforgeRequire } from 'node:module';
2
- import { fileURLToPath as __sandforgePath } from 'node:url';
3
- import { dirname as __sandforgeDirname } from 'node:path';
4
- const require = __sandforgeRequire(import.meta.url);
5
- const __filename = __sandforgePath(import.meta.url);
6
- const __dirname = __sandforgeDirname(__filename);
7
- import{a as jt,d as Tt,e as _t,g as Bt,h as xt,i as Ft,j as Ut,k as et}from"./chunk-54HYHHVL.mjs";import{a as Ce,b as z,d as H,e as vt,f as Xe,h as L}from"./chunk-MJD6CPZZ.mjs";import{e as $t,h as Ht,i as Jt}from"./chunk-ZOSESZ22.mjs";import{da as me,e as te,ea as Ze,ga as pe,ja as Pe}from"./chunk-2GSMHGIV.mjs";import{h as j}from"./chunk-TZE3Y7IQ.mjs";import{b as C}from"./chunk-CA5NAXSU.mjs";import{Dc as Nt,Ec as X,Ic as Ee,Lc as ge,Mc as Ge,Oc as Ye,Pc as Mt,qd as Lt,yc as Ct}from"./chunk-6QSHWIZI.mjs";import{b as x,e as Qe,f as M,i as Et,k as ae,l as Z,o as Ie,s as Pt}from"./chunk-WZQEK4WT.mjs";var Ne=class{activeJobs=new Map;maxConcurrentJobs;maxCompletedJobs=50;constructor(t=5){this.maxConcurrentJobs=t}registerJob(t){this.activeJobs.set(t.id,t)}updateJobState(t,e){let n=this.activeJobs.get(t);return n?(n.state=e,(e==="JobComplete"||e==="Failed"||e==="Aborted")&&this.purgeCompletedJobs(),!0):!1}updateJobCounts(t,e,n){let o=this.activeJobs.get(t);return o?(o.numberRecordsProcessed=e,o.numberRecordsFailed=n,!0):!1}updateTotalRecords(t,e){let n=this.activeJobs.get(t);return n?(n.totalRecords=e,!0):!1}getJob(t){return this.activeJobs.get(t)}getActiveJobs(){return Array.from(this.activeJobs.values()).filter(t=>t.state==="UploadComplete"||t.state==="InProgress")}getCompletedJobs(){return Array.from(this.activeJobs.values()).filter(t=>t.state==="JobComplete"||t.state==="Failed"||t.state==="Aborted")}canStartNewJob(){return this.getActiveJobs().length<this.maxConcurrentJobs}removeJob(t){return this.activeJobs.delete(t)}get totalJobs(){return this.activeJobs.size}purgeCompletedJobs(){let t=Array.from(this.activeJobs.entries()).filter(([,e])=>["JobComplete","Failed","Aborted"].includes(e.state));if(t.length>this.maxCompletedJobs){let e=t.slice(0,t.length-this.maxCompletedJobs);for(let[n]of e)this.activeJobs.delete(n)}}clear(){this.activeJobs.clear()}};function xn(r,t){let e=et(r,t);if(e.state==="Open")throw new Error(`Bulk API job ${r||"(no id)"} is still open after its close was sent`);return{state:e.state,...e.numberRecordsProcessed!==void 0?{numberRecordsProcessed:e.numberRecordsProcessed}:{},...e.errorMessage?{errorMessage:e.errorMessage}:{}}}function Me(r){return{bulk2:{createJob:t=>{let e=r.bulk2.createJob(t);return{get id(){return e.id},open:async()=>{await e.open()},uploadData:n=>e.uploadData(n),close:()=>e.close(),abort:()=>e.abort(),check:async()=>xn($t(e)??"",await e.check()),getAllResults:()=>e.getAllResults()}},job:(t,{id:e})=>{let n=r.bulk2.job(t,{id:e});return{check:async()=>et(e,await n.check()),getSuccessfulResults:()=>n.getSuccessfulResults(),getAllResults:()=>n.getAllResults(),abort:()=>n.abort()}}}}}var qt=100,zt=2e3,Un=20,$n=20,Hn=Z({name:x(),label:x(),type:x(),createable:M().optional(),updateable:M().optional(),nillable:M().optional(),defaultedOnCreate:M().optional(),aggregatable:M().optional(),groupable:M().optional(),filterable:M().optional(),nameField:M().optional(),autoNumber:M().optional(),calculated:M().optional(),referenceTo:ae(x()).optional()}).loose(),ee=Z({name:x(),label:x(),queryable:M().optional(),updateable:M().optional(),deletable:M().optional(),fields:ae(Hn),childRelationships:ae(Z({childSObject:x(),field:x(),cascadeDelete:M().optional(),restrictedDelete:M().optional()}).loose()).optional()}).loose(),Jn=Pt(x(),Et()),qn=Z({k:Ie([x(),Qe(),M()]).nullable(),n:Qe().int().nonnegative()}).loose();function zn(r){return(r.createable===!0||r.updateable===!0)&&r.type!=="boolean"}function Xr(r){return r.groupable===!0&&(zn(r)||r.nameField===!0)}function Wn(r,t){return t.createable===!0&&t.nillable===!1&&t.defaultedOnCreate!==!0||Ct(r,t.name)}function Le(r,t,e){let n=C(e);r.some(o=>o.check===t&&o.message===n)||r.push({check:t,message:n})}async function eo(r,t,e,n){let o=new Map,s=[],a=[],i=(f,u)=>{s.push({fieldApiName:f.name,label:f.label,reason:u})},d=e.filter(f=>f.aggregatable===!0),l=e.filter(f=>f.aggregatable!==!0&&f.filterable===!0);for(let f of e)f.aggregatable!==!0&&f.filterable!==!0&&i(f,"not-countable");if(n===0)for(let f of[...d,...l])o.set(f.name,0);else{for(let f=0;f<d.length;f+=qt){let u=d.slice(f,f+qt);try{let g=u.map(R=>`COUNT(${j(R.name)})`).join(", "),m=await r.query(`SELECT ${g} FROM ${t}`),h=Jn.parse(m.records[0]??{});u.forEach((R,b)=>{let w=h[`expr${b}`];if(typeof w!="number")throw new Error(`The org answered no count for ${t}.${R.name}.`);o.set(R.name,w)})}catch(g){Le(a,"fill",g);for(let m of u)o.delete(m.name),i(m,"refused")}}for(let[f,u]of l.entries()){if(f>=$n){i(u,"query-budget");continue}try{let g=await r.query(`SELECT COUNT() FROM ${t} WHERE ${j(u.name)} != null`);o.set(u.name,g.totalSize)}catch(g){Le(a,"fill",g),i(u,"refused")}}}return{fields:e.filter(f=>o.has(f.name)).map(f=>({fieldApiName:f.name,label:f.label,filled:o.get(f.name)??0,required:Wn(t,f)})).sort((f,u)=>f.filled-u.filled||f.fieldApiName.localeCompare(u.fieldApiName)),unmeasured:s,errors:a}}async function to(r,t,e,n,o){let s=[],a=n?e.find(d=>d.name.toLowerCase()===n.toLowerCase()):e.find(d=>d.name==="Email")??e.find(d=>d.nameField===!0);if(!a)return n&&s.push({check:"duplicates",message:`${t} has no field ${n} the org can group records by.`}),{duplicates:null,errors:s};let i={keyField:a.name,keyLabel:a.label,groups:[],groupCount:0,recordCount:0,truncated:!1};if(o===0)return{duplicates:i,errors:s};try{let d=await Vn(r,t,a.name),l=d.rows.map(c=>({value:String(c.value),count:c.count}));return{duplicates:{...i,groups:l.slice(0,Un),groupCount:l.length,recordCount:l.reduce((c,f)=>c+f.count,0),truncated:d.truncated},errors:s}}catch(d){return Le(s,"duplicates",d),{duplicates:null,errors:s}}}async function Vn(r,t,e){let n=j(e),o=await r.query(`SELECT ${n} k, COUNT(Id) n FROM ${t} WHERE ${n} != null GROUP BY ${n} HAVING COUNT(Id) > 1 ORDER BY COUNT(Id) DESC LIMIT ${zt}`),s=[];for(let a of o.records){let i=qn.safeParse(a);!i.success||i.data.k===null||s.push({value:i.data.k,count:i.data.n})}return{rows:s,truncated:o.records.length>=zt}}async function no(r,t,e,n,o){let s=[];if(!e.some(a=>a.name==="LastModifiedDate"&&a.filterable===!0))return{stale:null,errors:s};if(o===0)return{stale:{days:n,records:0},errors:s};try{let a=await r.query(`SELECT COUNT() FROM ${t} WHERE LastModifiedDate < LAST_N_DAYS:${n}`);return{stale:{days:n,records:a.totalSize},errors:s}}catch(a){return Le(s,"stale",a),{stale:null,errors:s}}}var tt=1e4,je=5e4,Wt="DELETE_FAILED",nt="UNABLE_TO_LOCK_ROW",Vt=3,Kn=2e3,Kt="FEATURENOTENABLED",rt="ContentVersion",Qt="ContentDocument",ot=new Set([rt,Qt]);async function he(r,t,e,n,o="delete"){let s=!1,a={},i=0,d=0,l=(g,m)=>(d+=g,m()),c={bulk2:{createJob:g=>{let m=r.bulk2.createJob(g);return{get id(){return m.id},open:()=>l(1,()=>m.open()),uploadData:h=>l(1,()=>m.uploadData(h)),close:async()=>{await l(1,()=>m.close()),s=!0},abort:()=>l(1,()=>m.abort()),check:async()=>{let h=await l(1,()=>m.check());return a={state:h.state,message:h.errorMessage},h},getAllResults:async()=>{let h=await l(Jt,()=>m.getAllResults());return i=Array.isArray(h)?h.length:(h.successfulResults?.length??0)+(h.failedResults?.length??0),h}}}}},f;try{f=await new Ht().executeBulk({connection:c,bulkManager:new Ne(1),...n?{signal:n}:{}},t,o,e.map(g=>({Id:g})))}catch(g){if(!s){let m=g?.errorCode;return{kind:"untouched",reason:C(g),...typeof m=="string"&&m!==""?{code:m}:{},requests:d}}throw g}if(f.aborted)return{kind:"aborted",requests:d};if(a.state!=="JobComplete"&&i===0)return{kind:"untouched",reason:a.message||`job ${a.state??"not complete"}`,requests:d};let u=new Map(f.outcomes.map(g=>[g.recordIndex,g]));return{kind:"answered",requests:d,rows:e.map((g,m)=>{let h=u.get(m);return h?.success?{success:!0}:{success:!1,error:h?.error??"The job gave no result for it."}})}}function po(r,t){let e=Me(r);return{...Ce(r,t),queryDeleted:async n=>({records:(await r.query(n,{scanAll:!0})).records}),bulkDestroy:(n,o,s)=>he(e,n,o,s),bulkHardDestroy:(n,o,s)=>he(e,n,o,s,"hardDelete")}}var st=Z({success:M(),errors:ae(Ie([Z({statusCode:x().optional(),errorCode:x().optional(),message:x().optional()}).loose(),x()])).optional()}).loose();function ne(r){return r.slice(0,15)}function ve(r){return typeof r=="string"?void 0:r.statusCode??r.errorCode}function it(r){if(typeof r=="string")return r;let t=ve(r),e=r.message??"";return t&&e?`${t}: ${e}`:t||e||"The org gave no reason."}function de(r){return async t=>(await r.query(t)).records.filter(n=>typeof n=="object"&&n!==null)}function Qn(r){return new Promise(t=>setTimeout(t,r))}function Gn(r){let t=Kn*2**r;return Math.floor(t/2+Math.random()*(t/2))}async function Gt(r,t,e,n){let o=[...e];for(let s=0;s<Vt;s++){let a=o.flatMap((d,l)=>d.kind==="refused"&&d.locked===!0?[l]:[]);if(a.length===0||n.stopped?.()===!0||(await(n.wait??Qn)(Gn(s)),n.stopped?.()===!0))break;let i=await t(a.map(d=>r[d]));if(i===void 0)break;a.forEach((d,l)=>{let c=i[l];c&&(o[d]={...c,lockResends:s+1})})}return o}async function at(r,t,e,n={}){if(t===rt)return rr(r,e,n);let o=s=>Yn(r,t,s);return Gt(e,o,await o(e),n)}async function Yn(r,t,e){let n;try{n=await r.destroy(t,[...e])}catch(s){let a=C(s);return e.map(()=>({kind:"refused",reason:a,dependency:!1}))}let o=Array.isArray(n)?n:[n];return e.map((s,a)=>{let i=st.safeParse(o[a]);if(i.success&&i.data.success)return{kind:"deleted"};let d=i.success?i.data.errors??[]:[];if(d.some(c=>ve(c)==="ENTITY_IS_DELETED"))return{kind:"gone"};let l=d.length>0&&d.every(c=>ve(c)===nt);return{kind:"refused",reason:d.length>0?it(d[0]):"The org gave no reason.",dependency:d.some(c=>ve(c)===Wt),...l?{locked:!0}:{}}})}async function Zn(r,t,e,n="recycle",o={}){let s=n==="hard"?r.bulkHardDestroy?.bind(r):r.bulkDestroy?.bind(r);if(s===void 0)return n==="hard"?{hardRefused:Xn}:"untouched";let a=async d=>{let l;try{l=await s(t,d,o.signal)}catch(f){let u=C(f);return d.map(()=>({kind:"refused",reason:u,dependency:!1}))}if(l.kind==="aborted")return"aborted";if(l.kind==="untouched"){if(n!=="hard")return"untouched";if(l.code===Kt)return{hardRefused:er(l.reason)};let f=`Not deleted for good: the job was not handed over \u2014 ${l.reason}`;return d.map(()=>({kind:"refused",reason:f,dependency:!1}))}let{rows:c}=l;return d.map((f,u)=>{let g=c[u];if(g?.success===!0)return{kind:"deleted"};let{code:m,message:h}=nr(g?.error??"");return m==="ENTITY_IS_DELETED"?{kind:"gone"}:{kind:"refused",reason:m&&h?`${m}: ${h}`:g?.error||m||h||"The org gave no reason.",dependency:m===Wt,...m===nt?{locked:!0}:{}}})},i=await a(e);return Array.isArray(i)?Gt(e,async d=>{let l=await a(d);return Array.isArray(l)?l:void 0},i,o):i}var Xn="Records cannot be deleted for good through this connection: nothing was sent.";function er(r){return`The user SandForge connects as may not delete records for good in this org: Salesforce refused the job before it held a record (${Kt}: ${r}). Nothing was deleted for good, and nothing was sent to the recycle bin instead.`}var tr="A file is never deleted for good: that takes a Bulk API job, which no file was ever sent by. Not sent.";function nr(r){let t=/^([A-Z][A-Z0-9_]*):([\s\S]*?)(?::(?:--|[\w.,]+))?$/.exec(r.trim());return t?{code:t[1],message:t[2].trim()}:{message:r.trim()}}async function rr(r,t,e){let n;try{n=await L(r,rt,["ContentDocumentId"],t)}catch(d){let l=C(d);return t.map(()=>({kind:"refused",reason:l,dependency:!1}))}let o=new Map;for(let d of n)typeof d.Id=="string"&&typeof d.ContentDocumentId=="string"&&o.set(ne(d.Id),d.ContentDocumentId);let s=[...new Set(o.values())],a=s.length>0?await at(r,Qt,s,e):[],i=new Map(s.map((d,l)=>[d,a[l]]));return t.map(d=>{let l=o.get(ne(d));return l===void 0?{kind:"gone"}:i.get(l)??{kind:"refused",reason:"The org gave no answer for its document.",dependency:!1}})}function Yt(r){let t=[];for(let e=0;e<r.length;e+=z)t.push({ids:r.slice(e,e+z),byJob:!1});return t}function Zt(r,t,e,n="recycle"){return ot.has(t)?!1:n==="hard"||r.bulkDestroy!==void 0&&e>=tt}async function or(r,t,e,n="recycle"){let o=[],s=!ot.has(t)&&(n==="hard"||r.bulkDestroy!==void 0),a=d=>{if(d.length===0)return;if(!s||n!=="hard"&&d.length<tt){o.push(...Yt(d));return}let l=Math.ceil(d.length/Math.ceil(d.length/je));for(let c=0;c<d.length;c+=l)o.push({ids:d.slice(c,c+l),byJob:!0})};if(!Ee(t)||e.length===0)return a(e),o;let i=new Set;try{i=new Set([...await pe(de(r),e)].map(ne))}catch{}return a(e.filter(d=>!i.has(ne(d)))),a(e.filter(d=>i.has(ne(d)))),o}function Xt(r){return{objectApiName:r,op:"delete"}}async function en(r,t,e,n,o){let s={stopped:o.stopped,...o.wait?{wait:o.wait}:{}},{stopped:a}=await Ut(e,{key:Xt(t),sizes:n.sizes,allowance:n.allowance,beforeEachSend:()=>o.stopped()?"stop":void 0,send:async i=>({answers:await at(r,t,i,s)}),limited:i=>i?.kind==="refused"?Lt([i.reason]):void 0,settle:(i,d,l,c)=>{let f=[],u=[];i.forEach((g,m)=>{if(l.has(m))return;let h=d[m]??{kind:"refused",reason:"The org gave no answer for it.",dependency:!1},R=c.get(m);f.push(g),u.push(R!==void 0&&h.kind==="refused"?{...h,dependency:!1,limit:R}:h)}),f.length>0&&o.settle(f,u)}});return a!==void 0}function dt(r,t){let e=Xt(r),n=t.sizes.report(e);if(!n)return[];let o=[];return n.rows+n.alone+n.notSplit+n.keptWhole>0&&o.push(Bt(n)),n.notSplit>0&&o.push(xt(n.notSplit,Ft(t.allowance,e),"removal")),n.keptWhole>0?o.push(_t):n.alone>0&&o.push(Tt),o}function tn(r){let t=0,e=0,n=0,o=0;for(let a of r)t++,a==="deleted"?e++:a==="gone"?n++:o++;if(t===0)return[];let s=[e>0?`${e} deleted`:"",n>0?`${n} already gone`:"",o>0?`${o} still refused`:""].filter(Boolean);return[`The org could not lock ${t} record(s) (${nt}), each sent again up to ${Vt} times, a wait before each: ${s.join(", ")}.`]}async function nn(r,t,e,n){let o=n.mode??"recycle";if(o==="hard"&&ot.has(t))return e.length>0&&n.settle(e,e.map(()=>({kind:"refused",reason:tr,dependency:!1}))),{stopped:!1};let s=n.wait?{wait:n.wait}:{},a=await or(r,t,e,o);for(let i=a.shift();i!==void 0;i=a.shift()){let{ids:d,byJob:l}=i;if(n.stopped())return{stopped:!0};if(await n.prepare?.(d),!l){if(await en(r,t,d,n.splitting,{stopped:n.stopped,settle:n.settle,...s}))return{stopped:!0};continue}let c=await Zn(r,t,d,o,{stopped:n.stopped,...s,...n.signal?{signal:n.signal}:{}});if(c==="aborted")return{stopped:!0};if(c==="untouched"){a.unshift(...Yt(d));continue}if(!Array.isArray(c))return{stopped:!0,hardRefused:c.hardRefused};n.settle(d,c)}return{stopped:!1}}async function rn(r,t){for(let e=0,n=!0;n;e++){n=!1;for(let o of r){let s=t.idsOf(o,e);if(s.length===0)continue;if(t.stopped())return!0;let a=t.deleted(o);if(await t.send(o,s,e))return!0;t.deleted(o)>a&&(n=!0)}}return!1}async function Te(r,t){let e=new Set(t.map(a=>a.objectApiName)),n=new Map;for(let{objectApiName:a}of t){let i;try{i=(ee.parse(await r.describe(a)).childRelationships??[]).map(l=>l.childSObject)}catch{continue}for(let d of i){if(d===a||!e.has(d))continue;let l=n.get(d)??new Set;l.add(a),n.set(d,l)}}let o=[...t],s=[];for(;o.length>0;){let a=o.findIndex(i=>!o.some(d=>d!==i&&n.get(d.objectApiName)?.has(i.objectApiName)));s.push(...o.splice(a>=0?a:0,1))}return s}async function ct(r,t,e){if(r.length===0)return{gone:[],unchecked:[]};let n;try{n=await t(r)}catch(a){return{gone:[],unchecked:[...r],failure:C(a)}}let o=new Set(n.map(a=>ne(String(a.Id)))),s=r.filter(a=>!o.has(ne(a)));return{gone:s.filter(e),unchecked:s.filter(a=>!e(a))}}function sr(r){return r.filter(t=>me[t]!==void 0&&!Ze.has(t))}async function lt(r,t,e,n,o,s){let a=de(r),i=[];for(let{objectApiName:d}of t){let l=me[d];if(!l||Ze.has(d))continue;let c;for await(let f of e.pages(d)){let u=f.filter(w=>n(d,w));if(u.length===0)continue;if(o())return{drafted:i,cancelled:!0};c??=await Pe(a,l);let g=c,m=g?.draft;if(!g||!m)break;let h=await s(d,u),R;try{R=await L(r,d,["Status"],u)}catch{continue}let b=R.filter(w=>typeof w.Id=="string"&&!h.has(w.Id.slice(0,15))).filter(w=>{let k=g.categoryOf.get(String(w.Status));return k!==void 0&&k!=="Draft"}).map(w=>({objectApiName:d,id:String(w.Id),draft:m,status:String(w.Status)}));for(let w=0;w<b.length;w+=z){if(o())return{drafted:i,cancelled:!0};let k=b.slice(w,w+z);i.push(...k);try{await r.update(d,k.map(({id:I})=>({Id:I,Status:m})))}catch{}}}}return{drafted:i,cancelled:!1}}function So(r,t,e,n){if(e)return`${r} ${e.id}: ${t}`;let o=n.filter(s=>s.objectApiName===r).map(s=>`${s.id} (${s.status})`);return o.length>0?`${r}: ${t} Set to Draft, with the status each had: ${o.join(", ")}.`:`${r}: ${t}`}async function on(r,t,e){let n=[...new Set(t.map(o=>o.objectApiName))];for(let o of n){let s=t.filter(c=>c.objectApiName===o),a=new Map(s.map(c=>[c.id.slice(0,15),c])),i=s.map(c=>c.id),d;try{d=await L(r,o,["Status"],i)}catch(c){e.note(o,`Status set to ${s[0].draft} for the delete, and not read back to be restored: ${C(c)}`,!0);continue}let l=d.flatMap(c=>{let f=typeof c.Id=="string"?a.get(c.Id.slice(0,15)):void 0;return f&&c.Status===f.draft?[f]:[]});for(let c=0;c<l.length;c+=z){let f=l.slice(c,c+z),u;try{u=await r.update(o,f.map(({id:m,status:h})=>({Id:m,Status:h})))}catch(m){u=f.map(()=>({success:!1,errors:[C(m)]}))}let g=Array.isArray(u)?u:[u];f.forEach(({draft:m,status:h},R)=>{let b=st.safeParse(g[R]);if(b.success&&b.data.success){e.note(o,`Status set to ${m} for the delete, then back to ${h}.`,!1,f[R]);return}let w=b.success?b.data.errors??[]:[],k=w.length>0?it(w[0]):"The org gave no reason.";e.note(o,`Status set to ${m} for the delete, and left there: the org refused ${h} back \u2014 ${k}`,!0,f[R])})}}}var le="DuplicateRecordSet",ir="DuplicateRecordItem",_e=2e3,ar=999,dr=/^[A-Za-z0-9]{15}(?:[A-Za-z0-9]{3})?$/;function T(r){return r.slice(0,15)}function sn(r){return new Date(r).toISOString().replace(/\.\d{3}Z$/,"Z")}function ut(r){return typeof r=="string"?Date.parse(r):Number.NaN}async function an(r,t){return(await cr(r,t)).map(e=>({id:e.id,modified:lr(e,t)}))}async function cr(r,t){if(!Number.isFinite(t.start)||!Number.isFinite(t.end)||!dr.test(t.user))return[];let e;try{let l=await r.query(`SELECT Id, CreatedDate, LastModifiedDate, LastModifiedById FROM ${le} WHERE CreatedDate >= ${sn(t.start-2e3)} AND CreatedDate <= ${sn(t.end+6e4)} LIMIT ${_e}`);if(l.records.length>=_e)return[];e=l.records.filter(c=>typeof c=="object"&&c!==null)}catch{return[]}let n=e.flatMap(l=>typeof l.Id=="string"?[l.Id]:[]);if(n.length===0)return[];let o=new Map,s=new Map,a=new Map;try{for(let l of H(n)){let c=await r.query(`SELECT Id, RecordId, DuplicateRecordSetId, CreatedDate FROM ${ir} WHERE DuplicateRecordSetId IN (${l}) LIMIT ${_e}`);if(c.records.length>=_e)return[];for(let f of c.records){let u=f??{},g=u.DuplicateRecordSetId,m=u.RecordId;if(typeof g!="string")continue;let h=ut(u.CreatedDate);if(Number.isFinite(h)&&!(h<=(a.get(T(g))??Number.NaN))&&a.set(T(g),h),typeof m!="string"||!t.has(T(m))){let R=o.get(T(g))??new Set;R.add(typeof m=="string"?T(m):`item ${String(u.Id)}`),o.set(T(g),R)}else s.set(T(g),[...s.get(T(g))??[],T(m)])}}}catch{return[]}let i=T(t.user),d=(l,c)=>{let f=o.get(l)?.size??0;return s.has(l)?f<=1:f===0&&typeof c=="string"&&T(c)===i};return e.flatMap(l=>typeof l.Id=="string"&&d(T(l.Id),l.LastModifiedById)?[{id:l.Id,created:ut(l.CreatedDate),modified:ut(l.LastModifiedDate),...typeof l.LastModifiedById=="string"?{modifiedBy:l.LastModifiedById}:{},names:s.get(T(l.Id))??[],...a.has(T(l.Id))?{itemsMade:a.get(T(l.Id))}:{}}]:[])}function lr(r,t){if((r.modifiedBy!==void 0?T(r.modifiedBy):"")===T(t.user)&&r.modified<=t.end+6e4)return Math.min(r.modified,t.end);let n=t.end+6e4;return r.names.length>0&&r.created<=n&&r.modified<=n&&(r.modified===r.created||r.modified<=(r.itemsMade??Number.NaN)+ar)?Math.min(r.modified,t.end):r.modified}async function dn(r,t,e,n="recycle"){let o=j(t),s=new Set;try{for(let a of H(e)){let i=await r.queryDeleted(`SELECT Id FROM ${o} WHERE Id IN (${a}) AND IsDeleted = true`);for(let d of i.records){let l=d?.Id;typeof l=="string"&&s.add(l.slice(0,15))}}}catch(a){return{error:C(a)}}return{deleted:s,inBin:n!=="hard"}}var ur=/__kav$/i;function ye(r){return ur.test(r)}function ln(r){return r.replace(/v$/i,"")}var ft="Kept: its article holds a version the run did not write \u2014 a draft begun on it, or a version published since \u2014 which deleting the article would take with it. A removal that takes what changed since the run takes it too.",fr={statusCode:"ENTITY_IS_DELETED",message:"The version is no longer in the org: it went with its article."},cn=" AND IsLatestVersion = false AND PublishStatus = 'Archived'",gr="An article version is deleted through its article, over REST.",mr={success:!1,errors:[{message:"The org gave no reason."}]};function J(r){return r.slice(0,15)}function un(r,t){let e=r.bulkDestroy?.bind(r);return{query:n=>r.query(n),queryDeleted:n=>r.queryDeleted(n),update:(n,o)=>r.update(n,o),serverTime:()=>r.serverTime(),userId:()=>r.userId(),describeGlobal:()=>r.describeGlobal(),describe:n=>ye(n)?pr(r,n):r.describe(n),destroy:(n,o)=>ye(n)?hr(r,n,o,t):r.destroy(n,o),...e?{bulkDestroy:(n,o,s)=>ye(n)?Promise.resolve({kind:"untouched",reason:gr,requests:0}):e(n,o,s)}:{}}}async function pr(r,t){let e=await r.describe(t);if(typeof e!="object"||e===null)return e;let n;try{n=(await r.describe(ln(t)))?.deletable}catch{n=void 0}let o={...e};return delete o.deletable,typeof n=="boolean"?{...o,deletable:n}:o}async function fn(r,t,e){let n=j(t),o=new Map,s=new Map,a=(d,l)=>{for(let c of d){let f=c;if(typeof f?.Id!="string"||typeof f.KnowledgeArticleId!="string")continue;l?.set(J(f.Id),f.KnowledgeArticleId);let u=J(f.KnowledgeArticleId),g=s.get(u)??new Set;g.add(J(f.Id)),s.set(u,g)}};for(let d of["",cn])for(let l of H(e)){let c=await r.query(`SELECT Id, KnowledgeArticleId FROM ${n} WHERE Id IN (${l})${d}`);a(c.records,o)}let i=[...new Set(o.values())];for(let d of["",cn])for(let l of H(i)){let c=await r.query(`SELECT Id, KnowledgeArticleId FROM ${n} WHERE KnowledgeArticleId IN (${l})${d}`);a(c.records)}return{articleOf:o,versions:s}}function gn({articleOf:r,versions:t},e,n){if(n.includeChanged)return new Set;let o=new Set(e.map(J)),s=a=>[...t.get(a)??[]].some(i=>!o.has(i));return new Set([...r.values()].map(J).filter(s))}async function mn(r,t,e,n){let o=await fn(r,t,e),s=gn(o,e,n);return new Set(e.map(J).filter(a=>{let i=o.articleOf.get(a);return i!==void 0&&s.has(J(i))}))}async function hr(r,t,e,n){let o=await fn(r,t,e),{articleOf:s}=o,a=[...new Set(s.values())],i=gn(o,e,n),d=a.filter(c=>!i.has(J(c))),l=new Map;if(d.length>0){let c;try{c=await r.destroy(ln(t),d)}catch(u){let g=C(u);c=d.map(()=>({success:!1,errors:[{message:g}]}))}let f=Array.isArray(c)?c:[c];d.forEach((u,g)=>l.set(J(u),f[g]))}return e.map(c=>{let f=s.get(J(c));return f===void 0?{success:!1,errors:[fr]}:i.has(J(f))?{success:!1,errors:[{message:ft}]}:l.get(J(f))??mr})}var xe="Quote",Re="QuoteLineItem",be="Opportunity",we="OpportunityLineItem",pn=2e3;function yr(r){return r.slice(0,15)}function hn(r){return typeof r=="string"?Date.parse(r):Number.NaN}function F(r,t){let e=r[t];return typeof e=="string"&&e!==""?yr(e):void 0}function mt(r,t){return r.has(t)||r.otherParts?.has(t)===!0}function br(r,t){let e=new Set,n=new Set;for(let g of r.syncing){let m=F(g,"Id"),h=F(g,"SyncedQuoteId");!m||!h||!mt(t,m)||!t.has(h)||(e.add(h),n.add(m))}if(e.size===0)return[];let o=r.quoteLines.filter(g=>{let m=F(g,"QuoteId");return m!==void 0&&e.has(m)&&F(g,"Id")!==void 0}),s=r.opportunityLines.filter(g=>{let m=F(g,"OpportunityId");return m!==void 0&&n.has(m)&&F(g,"Id")!==void 0}),a=g=>F(g,"CreatedById"),i=(g,m)=>{let h=F(g,"Id");if(!h||mt(t,h)||!m)return!1;let R=t.user??a(m),b=hn(g.CreatedDate);return R!==void 0&&a(g)===R&&b>=t.start&&b<=t.end},d=g=>({id:String(g.Id),modified:hn(g.LastModifiedDate)}),l=new Map(s.flatMap(g=>{let m=F(g,"Id");return m&&t.has(m)?[[m,g]]:[]})),c=new Map;for(let g of o){let m=F(g,"Id"),h=F(g,"OpportunityLineItemId");m&&h&&t.has(m)&&!c.has(h)&&c.set(h,g)}let f=o.filter(g=>{let m=F(g,"OpportunityLineItemId");return i(g,m?l.get(m):void 0)}).map(d),u=s.filter(g=>{let m=F(g,"Id");return i(g,m?c.get(m):void 0)}).map(d);return[...f.length>0?[{objectApiName:Re,copies:f}]:[],...u.length>0?[{objectApiName:we,copies:u}]:[]]}function yn(r,t=[]){let e=new Set(r),n=e.has(be)||new Set(t).has(be);if(!e.has(xe)||!n)return[];let o=e.has(Re),s=e.has(we);return o===s?[]:[o?we:Re]}async function gt(r,t,e,n,o){let s=e.map(j).join(", "),a=[];for(let i of H(o)){let d=await r.query(`SELECT ${s} FROM ${j(t)} WHERE ${j(n)} IN (${i}) LIMIT ${pn}`);if(d.records.length>=pn)throw new Error(`More ${t} records than one read takes.`);for(let l of d.records)typeof l=="object"&&l!==null&&a.push(l)}return a}async function bn(r,t,e,n){let o=n.has(Re)||n.has(we),s=n.has(be)||t.otherParts?.objects.has(be)===!0;if(e.length===0||!s||!o)return[];try{let i=(await gt(r,be,["Id","SyncedQuoteId"],"SyncedQuoteId",e)).filter(c=>{let f=F(c,"Id");return f!==void 0&&mt(t,f)});if(i.length===0)return[];let d=await gt(r,Re,["Id","QuoteId","OpportunityLineItemId","CreatedById","CreatedDate","LastModifiedDate"],"QuoteId",[...new Set(i.map(c=>String(c.SyncedQuoteId)))]),l=await gt(r,we,["Id","OpportunityId","CreatedById","CreatedDate","LastModifiedDate"],"OpportunityId",i.map(c=>String(c.Id)));return br({syncing:i,quoteLines:d,opportunityLines:l},t)}catch{return[]}}var Rr=5,Se=4,Fe=2e3,wr=4,He=[["CreatedDate","LastModifiedDate","CreatedById","LastModifiedById"],["CreatedDate","LastModifiedDate","CreatedById"],["SystemModstamp"],[]],ht=1e4,Sr="005",Rn="ContentDocumentLink",kr="ContentDocument",Or="ContentVersion",Ar=5;function Je(r){let t=new Set(r.flatMap(n=>n.ids.map(y))),e=new Map;for(let{objectApiName:n,ids:o}of r)e.set(n,[...e.get(n)??[],...o]);return{objects:[...e].map(([n,o])=>({objectApiName:n,count:o.length})),pages:async function*(n){let o=e.get(n);o&&o.length>0&&(yield o)},has:n=>t.has(n)}}function re(r){return!Array.isArray(r)}function Zo(r){return re(r)?r.objects.reduce((t,e)=>t+e.count,0):r.reduce((t,e)=>t+e.ids.length,0)}function Xo(r){return(re(r)?r.objects:r).map(t=>t.objectApiName)}var qe=class{bits=new Uint8Array(0);add(t){let e=t>>3;if(e>=this.bits.length){let n=new Uint8Array(Math.max(e+1,this.bits.length*2,64));n.set(this.bits),this.bits=n}this.bits[e]|=1<<(t&7)}has(t){let e=t>>3;return e<this.bits.length&&(this.bits[e]&1<<(t&7))!==0}},yt=class{dates=new Float64Array(0);set(t,e){if(t>=this.dates.length){let n=new Float64Array(Math.max(t+1,this.dates.length*2,64)).fill(Number.NaN);n.set(this.dates),this.dates=n}this.dates[t]=e}at(t){return t<this.dates.length?this.dates[t]:Number.NaN}latestWithin(t,e){let n=Number.NaN;for(let o of this.dates)o>=t&&o<=e&&!(o<=n)&&(n=o);return n}};function ue(r,t){return typeof r=="string"&&t.has(y(r))}var wn=[{created:"CreatedDate",modified:"LastModifiedDate"},{modified:"SystemModstamp"}],pt={ContentDocumentLink:{ends:["ContentDocumentId","LinkedEntityId"],cameWithRun:(r,t)=>{let e=r.LinkedEntityId;return ue(r.ContentDocumentId,t)&&(ue(e,t)||typeof e=="string"&&e.startsWith(Sr))}},DuplicateRecordItem:{ends:["RecordId"],cameWithRun:(r,t)=>ue(r.RecordId,t)},ContentVersion:{ends:["ContentDocumentId"],cameWithRun:(r,t)=>ue(r.ContentDocumentId,t)},[te.objectApiName]:{ends:[te.parent,te.field],cameWithRun:(r,t)=>r[te.field]===te.value&&ue(r[te.parent],t)}};function es(r,t){return{...Ce(r,t),serverTime:async()=>(await r.soap.getServerTimestamp()).timestamp,userId:async()=>(await r.soap.getUserInfo()).userId,queryDeleted:async e=>({records:(await r.query(e,{scanAll:!0})).records}),bulkDestroy:(e,n,o)=>he(Me(r),e,n,o)}}function bt(r,t,e){let n=new Map;for(let o of r??[]){let s=St(o.span,[],e);if(Number.isFinite(s.end))for(let a of o[t]??[]){let i=y(a);s.end<=(n.get(i)?.end??Number.NEGATIVE_INFINITY)||n.set(i,s)}}return n}function Dr(r=[],t=[]){if(r.length===0&&t.length===0)return;let e=[...r.map(({plan:n})=>re(n)?n:Je(n)),Je(t)];return{has:n=>e.some(o=>o.has(n))}}function Ir(r=[],t=[]){return new Set([...r.map(({plan:e})=>re(e)?e.objects:e),t].flat().map(e=>e.objectApiName))}function Dn(r,t){return new Map([...bt(r,"wrote",t)].map(([e,{end:n}])=>[e,n]))}function In(r,t){return`The user SandForge connects as may not delete ${r} records in this org: the ${t} record(s) of the run stay, and were not sent.`}function Rt(r,t){return`Not visible: ${r} record(s) found neither in the org nor in its recycle bin, as the user the removal runs as sees them \u2014 out of that user's sight, or deleted for good \u2014 are not counted as removed`+(t?` (the recycle bin could not be read: ${t})`:".")}function Sn(r,t,e){for(let o of r){let s=o.deleted+o.alreadyGone+o.keptChanged+o.keptDependents+o.refused+(o.notVisible??0);o.planned>s&&(o.notReached=o.planned-s)}let n=new Set(r.map(o=>o.objectApiName));for(let{objectApiName:o,count:s}of t)s===0||n.has(o)||(n.add(o),r.push({...new ke(o,s,e(o)).result,notReached:s}));return r}var ts={objects:[],cancelled:!1,gone:[],stamps:{},left:async function*(){}};function y(r){return r.slice(0,15)}function Er(r){return r?.errorCode==="INVALID_FIELD"||/no such column/i.test(C(r))}function Pr(r,t){let e=/no such column '(\w+)'/i.exec(C(r))?.[1],n=He.findIndex((o,s)=>s>t&&(e===void 0||!o.includes(e)));return n===-1?He.length:n}function N(r){return typeof r=="string"?Date.parse(r):Number.NaN}function En(){return{modified:new yt,missing:new Set,firstCreated:Number.NaN,lastCreated:Number.NaN,binned:new Set}}var ke=class{result;notes=[];refused=new Map;unread;held=[];goneAt=new qe;goneLater=new Set;deletedLater=new Set;notVisible=0;notVisibleNote;secondTry=new Set;filesLeft=new Map;automationHeld=new Map;automationHeldAfter=new Set;automationHeldAlong=new Set;tookAlong=new Map;cameAlong=new Map;limitNotes=[];lockResent=new Map;constructor(t,e,n=0){this.result={objectApiName:t,planned:e,deleted:0,alreadyGone:0,keptChanged:0,keptDependents:0,refused:0,heldBy:[],...n>0?{platformCopies:n}:{},unchecked:[],reasons:[]}}note(t){this.notes.includes(t)||this.notes.push(t)}isGone(t,e){return this.goneAt.has(e)||this.goneLater.has(y(t))}waiting(){return[...[...this.refused].filter(([,t])=>t.dependency).map(([t])=>t),...this.held]}refusedSent(){return[...this.refused].filter(([,t])=>t.sent).map(([t])=>t)}refusedToSendAgain(){return[...this.refused].filter(([,t])=>t.sent&&t.limit!==!0).map(([t])=>t)}secondTryNote(){if(this.secondTry.size===0)return[];let t=0,e=0,n=0,o=0;for(let a of this.secondTry){let i=y(a);this.deletedLater.has(i)?t++:this.goneLater.has(i)?e++:this.refused.has(a)?o++:n++}return[`Refused at first, sent again once the rest had gone: ${[t>0?`${t} deleted`:"",e>0?`${e} already gone`:"",n>0?`${n} kept for records that stay`:"",o>0?`${o} refused again`:""].filter(Boolean).join(", ")}.`]}settle(){this.result.keptDependents=this.held.length,this.result.refused=this.refused.size+(this.unread?.count??0),this.notVisible>0&&(this.result.notVisible=this.notVisible),this.held.length===0&&(this.result.heldBy=[]);let t=this.held.flatMap(s=>{let a=this.automationHeld.get(y(s));return a?[a]:[]}),e=this.held.filter(s=>{let a=y(s);return this.automationHeld.has(a)&&this.automationHeldAfter.has(a)}).length,n=this.held.filter(s=>{let a=y(s);return this.automationHeld.has(a)&&this.automationHeldAlong.has(a)}).length;t.length>0?(this.result.heldByAutomation=t.length,e>0?this.result.heldByAutomationAfterRun=e:delete this.result.heldByAutomationAfterRun,n>0?this.result.heldByAutomationAlong=n:delete this.result.heldByAutomationAlong,this.result.automationHolders=[...new Set(t.flatMap(s=>[...s]))]):(delete this.result.heldByAutomation,delete this.result.heldByAutomationAfterRun,delete this.result.heldByAutomationAlong,delete this.result.automationHolders);let o=[...this.notVisibleNote?[this.notVisibleNote]:[],...this.notes,...this.limitNotes,...tn(this.lockResent.values()),...this.secondTryNote(),...this.unread?[this.unread.reason]:[],...[...this.refused.values()].map(s=>s.reason)];return this.result.reasons=[...new Set(o)].slice(0,Rr),this.filesLeft.size>0&&(this.result.filesLeft={count:this.filesLeft.size,names:[...this.filesLeft.values()].slice(0,Ar)}),this.tookAlong.size>0&&(this.result.tookAlong={count:this.tookAlong.size,objects:[...new Set(this.tookAlong.values())]}),this.cameAlong.size>0&&(this.result.cameAlong={count:this.cameAlong.size,objects:[...new Set(this.cameAlong.values())]}),this.result}};async function ns(r,t,e){let n=re(t)?t:Je(t),o=n,s=o.objects.reduce((p,S)=>p+S.count,0),a=new Map,i=p=>a.get(p)??0,d=()=>e.signal?.aborted===!0,l=e.splitting??jt(),c=()=>({objects:Sn([],o.objects,i),cancelled:!0,gone:[],stamps:{},left:()=>An(n)}),f=new Map,u=new Map;for(let{objectApiName:p}of o.objects){let S=En();f.set(p,S);let O=0;for await(let A of o.pages(p)){if(d())return c();let v=A[0];v!==void 0&&!u.has(v.slice(0,3))&&u.set(v.slice(0,3),p);let E=O;if(O+=A.length,S.error!==void 0)continue;let D=await Tr(r,p,A,E,S);if(S.error!==void 0||D.length===0)continue;if(d())return c();let B=await dn(r,p,D);if("error"in B)S.binError=B.error;else for(let q of B.deleted)S.binned.add(q)}}let g=new Map,m=!1,h=r.bulkDestroy?.bind(r),R={query:p=>r.query(p),destroy:(p,S)=>(m=!0,r.destroy(p,S)),...h?{bulkDestroy:(p,S)=>(m=!0,h(p,S,e.signal))}:{},update:(p,S)=>(m=!0,r.update(p,S)),serverTime:()=>r.serverTime(),userId:()=>r.userId(),queryDeleted:p=>r.queryDeleted(p),describeGlobal:()=>r.describeGlobal(),describe:p=>{let S=g.get(p);return S||(S=r.describe(p),g.set(p,S)),S}},b=un(R,{includeChanged:e.includeChanged}),w=await Te(b,o.objects),k=await vr(b,w,(p,S)=>S-(f.get(p)?.missing.size??0)),I=new Set(k.map(p=>p.objectApiName));if(k.length>0&&e.onUndeletable&&e.previewOnly!==!0){if(d())return c();if(!await e.onUndeletable(k))return{...c(),objects:[],undeletable:k,stoppedForUndeletable:!0}}let[P,_]=await Promise.all([xr(b),e.previewOnly===!0?void 0:Fr(b)]),{start:G,end:K}=St(e,f.values(),P.aheadMs);if(d())return c();let oe=Dr(e.otherParts,e.otherPartRecords),ze=Ir(e.otherParts,e.otherPartRecords),Ae=await _r(b,o,{start:G,end:K,...e.runUserId?{user:y(e.runUserId)}:{},...oe?{otherParts:{has:p=>oe.has(p),objects:ze}}:{},undeletable:I,snapshots:f}),We=[];if(e.runUserId&&e.alongAccepted!==!0){let p=await an(b,{has:S=>o.has(S),start:G,end:K,user:e.runUserId});if(p.length>0&&!o.objects.some(S=>S.objectApiName===le)&&await Pn(b,le)){Ae.push({objectApiName:le,copies:p});for(let S of p)We.push(S.id)}}if(Ae.length>0){o=await Br(o,Ae,f,u);for(let{objectApiName:p,copies:S}of Ae)a.set(p,S.length);s=o.objects.reduce((p,S)=>p+S.count,0),w=await Te(b,o.objects)}let Ln=new Map(Object.entries(e.removalStamps??{}).map(([p,S])=>[y(p),N(S)])),vn=Dn(e.laterParts,P.aheadMs),se=new Set;for(let{objectApiName:p}of o.objects){let S=f.get(p);if(!S||S.error!==void 0)continue;let O=0;for await(let A of o.pages(p))for(let v of A){let E=S.modified.at(O++),D=y(v);if(S.missing.has(D))continue;E<=K||E<=(Ln.get(D)??Number.NaN)||E<=(vn.get(D)??Number.NaN)||se.add(D)}}if(e.previewOnly===!0){if(d())return c();let p=new Set,S=await Nr(b,o,w,{snapshots:f,changed:se,undeletable:I,includeChanged:e.includeChanged,stopped:d,copiesOf:i,...e.previewHeld===!0?{held:{notSent:p,check:new Oe(b,{runRecords:o,reached:{has:()=>!1},stays:O=>p.has(O),runStart:G,runEnd:K,removalStart:P.start,removalUser:void 0,earlierRemovals:(e.removalSpans??[]).map(O=>({start:N(O.first),end:N(O.last),user:y(O.userId)})),includeChanged:e.includeChanged,previewing:!0,...e.goesWithParent?{goesWithParent:e.goesWithParent}:{},...e.goesWithParentReadBelow?{goesWithParentReadBelow:!0}:{},...e.alongAccepted?{alongAccepted:e.alongAccepted}:{},...e.runUserId?{runUser:y(e.runUserId)}:{},...e.laterParts?{linkedLater:bt(e.laterParts,"linked",P.aheadMs)}:{},...oe?{otherPartRecords:oe,otherPartObjects:ze}:{}})}}:{}});return S?{...k.length>0?{undeletable:k}:{},objects:[],cancelled:!1,gone:[],stamps:{},left:()=>An(n),preview:S}:c()}let kt=await jr(b,e.otherParts??[],P.aheadMs,d);if(!kt)return c();let Ot=new Set,jn={has:p=>o.has(p)&&Ot.has(u.get(p.slice(0,3))??"")},Ve=new Oe(b,{runRecords:o,reached:jn,stays:p=>se.has(p)&&!e.includeChanged,runStart:G,runEnd:K,removalStart:P.start,removalUser:_,earlierRemovals:(e.removalSpans??[]).map(p=>({start:N(p.first),end:N(p.last),user:y(p.userId)})),includeChanged:e.includeChanged,...e.goesWithParent?{goesWithParent:e.goesWithParent}:{},...e.goesWithParentReadBelow?{goesWithParentReadBelow:!0}:{},...e.alongAccepted?{alongAccepted:e.alongAccepted}:{},...e.alongToDraft?{alongToDraft:e.alongToDraft}:{},...e.runUserId?{runUser:y(e.runUserId)}:{},...e.automationMade?{automationMade:Mn(e.automationMade)}:{},...e.laterParts?{linkedLater:bt(e.laterParts,"linked",P.aheadMs)}:{},...oe?{otherPartRecords:oe,otherPartObjects:ze}:{}});if(d())return c();await e.beforeFirstWrite?.(),e.sweep&&await e.sweep(l)&&(m=!0);let Y=[],At=p=>Y.find(S=>S.result.objectApiName===p);async function*Ke(p,S,O){for(let{objectApiName:A}of S){let v=At(A),E=0;for await(let D of p.pages(A)){let B=D.filter(q=>O(A,q,v?.isGone(q,E++)===!0));B.length>0&&(yield{objectApiName:A,ids:B})}}}let Tn=()=>Ke(o,w,(p,S,O)=>{let A=f.get(p),v=y(S);return A?.modifiedColumn==="LastModifiedDate"&&!A.missing.has(v)&&!se.has(v)&&!O}),De=[],$=async p=>{await on(b,De,{note:(D,B,q)=>{let U=At(D);if(!U){if(!q)return;let W=o.objects.find(V=>V.objectApiName===D);U=new ke(D,W?.count??0,i(D)),Y.push(U)}U.note(B)}});let S=m?await kn(b,Tn(),{start:P.start,user:_}):{},O=[];if(m)for(let D of kt)O.push(await kn(b,D.unchanged(),{start:P.start,user:_}));let A=m?Ur(P,_):void 0,v=[];if(!re(t))for await(let{ids:D}of Ke(n,w,(B,q,U)=>U))for(let B of D)v.push(B);for(let D of Y)D.limitNotes=dt(D.result.objectApiName,l);let E=Y.map(D=>D.settle());return{...k.length>0?{undeletable:k}:{},objects:p?Sn(E,w,i):E,cancelled:p,gone:v,left:()=>Ke(n,n.objects,(D,B,q)=>!q),stamps:S,...A?{span:A}:{},...O.length>0?{otherPartStamps:O}:{},...We.length>0?{duplicateSets:We}:{}}};if(d())return m?$(!0):c();let Dt=async(p,S)=>(await Ve.heldAmong(p,S)).held,It=await lt(b,w,o,(p,S)=>{let O=y(S),A=f.get(p);return A!==void 0&&A.error===void 0&&!I.has(p)&&!A.missing.has(O)&&!(se.has(O)&&!e.includeChanged)},d,Dt);if(De=It.drafted,It.cancelled)return $(!0);if(e.alongToDraft){let p=await lt(b,e.alongToDraft.objects,e.alongToDraft,()=>!0,d,Dt);if(De=[...De,...p.drafted],p.cancelled)return $(!0)}let Q=0;for(let{objectApiName:p,count:S}of w){if(d())return $(!0);let O=new ke(p,S,i(p));Y.push(O),Ot.add(p);let A=f.get(p);if(!A||A.error!==void 0){O.unread={reason:A?.error??"The org gave no reason.",count:S},Q+=S,e.onProgress?.(Q,s,p);continue}if(I.has(p)){let U=0,W=0;for await(let V of o.pages(p))for(let ie of V){let fe=y(ie),Bn=U++;A.missing.has(fe)?A.binned.has(fe)?(O.result.alreadyGone++,O.goneAt.add(Bn)):O.notVisible++:W++}O.notVisible>0&&(O.notVisibleNote=Rt(O.notVisible,A.binError)),W>0&&(O.unread={reason:In(p,W),count:W}),Q+=S,e.onProgress?.(Q,s,p);continue}let v=Zt(b,p,S),E=[],D=new Map,B=async()=>{let U=E,W=D;return E=[],D=new Map,On(b,Ve,O,U,{stopped:d,splitting:l,placeOf:W,onDeleted:V=>{Q+=V,e.onProgress?.(Q,s,p)},onHeld:V=>{Q+=V,e.onProgress?.(Q,s,p)}})},q=0;for await(let U of o.pages(p)){if(d())return $(!0);let W=E.length;for(let V of U){let ie=y(V),fe=q++;A.missing.has(ie)?A.binned.has(ie)?(O.result.alreadyGone++,O.goneAt.add(fe)):O.notVisible++:se.has(ie)&&!e.includeChanged?O.result.keptChanged++:(E.push(V),D.set(ie,fe))}if(O.notVisible>0&&(O.notVisibleNote=Rt(O.notVisible,A.binError)),Q+=U.length-(E.length-W),!(v&&E.length<je)&&await B())return $(!0)}if(v&&E.length>0&&(d()||await B()))return $(!0)}let _n=Y.some(p=>p.result.deleted>0);if(await rn(Y,{stopped:d,idsOf:(p,S)=>{if(S>0)return p.waiting();let O=p.refusedToSendAgain();return O.length>0||_n?[...O,...p.held]:[]},send:async(p,S,O)=>{let A=new Set(O===0?p.refusedToSendAgain():[]),v=await On(b,Ve,p,S,{stopped:d,splitting:l,onSent:E=>{for(let D of E)A.has(D)&&p.secondTry.add(D)}});for(let E of p.held)A.has(E)&&p.secondTry.add(E);return v},deleted:p=>p.result.deleted}))return $(!0);if(e.afterRemoval){if(d())return $(!0);await e.afterRemoval(l)&&(m=!0)}for(let p of Y){if(d())return $(!0);await Lr(b,p,f.get(p.result.objectApiName))}return $(!1)}async function Cr(r,t,e,n,o){let{changed:s,includeChanged:a}=o,i=[];for await(let d of t.pages(e))for(let l of d){let c=y(l);!n.has(c)&&(a||!s.has(c))&&i.push(l)}try{return{kept:await mn(r,e,i,{includeChanged:a})}}catch(d){return{kept:new Set,unread:C(d)}}}async function Nr(r,t,e,n){let o=[],s=new Set,a=new Set;for(let{objectApiName:i,count:d}of e){let l=n.copiesOf(i),c={objectApiName:i,planned:d,toDelete:0,alreadyGone:0,changedSince:0,keptChanged:0,changedBy:{},undeletable:0,notVisible:0,unread:0,...l>0?{platformCopies:l}:{},reasons:[]};o.push(c);let f=n.snapshots.get(i);if(!f||f.error!==void 0){if(c.unread=d,c.reasons.push(f?.error??"The org gave no reason."),n.held)for await(let R of t.pages(i))for(let b of R)n.held.notSent.add(y(b));continue}let u=ye(i)&&!n.undeletable.has(i)?await Cr(r,t,i,f.missing,n):void 0,g=[],m=[],h=R=>{n.held?.notSent.add(R)};for await(let R of t.pages(i))for(let b of R){let w=y(b);f.missing.has(w)?f.binned.has(w)?c.alreadyGone++:c.notVisible++:n.undeletable.has(i)?(c.undeletable++,h(w)):u?.unread!==void 0?(c.unread++,h(w)):n.changed.has(w)?(c.changedSince++,g.push(b),n.includeChanged?(c.toDelete++,m.push(b)):(c.keptChanged++,h(w))):u?.kept.has(w)?(c.changedSince++,c.keptChanged++,h(w)):(c.toDelete++,m.push(b))}if(n.held&&m.length>0){if(n.stopped())return;let R=await n.held.check.heldAmong(i,m),b=m.filter(k=>R.held.has(y(k)));if(b.length>0){c.toDelete-=b.length,c.keptDependents=b.length,c.heldBy=[...R.holders];for(let I of b)n.held.notSent.add(y(I));let k=b.filter(I=>R.byAutomation.has(y(I)));k.length>0&&(c.heldByAutomation=k.length)}let w=new Map;for(let k of m)if(!R.held.has(y(k)))for(let[I,P]of R.cameAlong.get(y(k))??[])a.has(I)||(a.add(I),w.set(I,P));w.size>0&&(c.cameAlong={count:w.size,objects:[...new Set(w.values())]}),R.reason!==void 0&&c.reasons.push(R.reason),R.unchecked.size>0&&c.reasons.push(`Not checked: what hangs from them through ${[...R.unchecked].join(", ")}, which the org deletes along but does not let be read by the record it hangs from.`)}if(u?.unread!==void 0?c.reasons.push(`Its articles could not be read: ${u.unread}`):u!==void 0&&u.kept.size>0&&c.reasons.push(ft),c.notVisible>0&&c.reasons.push(Rt(c.notVisible,f.binError)),c.undeletable>0&&c.reasons.push(In(i,c.undeletable)),!(g.length===0||f.modifiedColumn!=="LastModifiedDate")){if(n.stopped())return;try{let R=await L(r,i,["LastModifiedById"],g,Se);for(let b of R){let w=b.LastModifiedById;typeof w!="string"||w===""||(c.changedBy[w]=(c.changedBy[w]??0)+1,s.add(w))}}catch(R){c.reasons.push(`Who changed them since the run could not be read: ${C(R)}`)}}}if(!n.stopped())return{objects:o,userNames:await Mr(r,[...s])}}async function Mr(r,t){let e={};if(t.length===0)return e;try{for(let n of await L(r,"User",["Name"],[...t].sort()))typeof n.Id=="string"&&typeof n.Name=="string"&&(e[n.Id]=n.Name)}catch{}return e}async function Lr(r,t,e){let{gone:n,unchecked:o,failure:s}=await ct(t.refusedSent(),a=>L(r,t.result.objectApiName,[],a),a=>e!==void 0&&e.error===void 0&&!e.missing.has(y(a)));for(let a of n)t.refused.delete(a),t.goneLater.add(y(a)),t.result.alreadyGone++;o.length>0&&t.note(`Not checked: ${o.length} refused record(s) could not be read back once the rest had gone, to tell whether a parent deleted after them took them along`+(s?` \u2014 ${s}`:"."))}function rs(r,t=[],e={}){return[...new Set([...r,...yn(r,t),...e.userKept===!0&&r.length>0?[le]:[]])]}async function vr(r,t,e){let n=[];for(let{objectApiName:o,count:s}of t){if(o===Or||s===0)continue;let a=e(o,s);if(a!==0)try{let i=ee.safeParse(await r.describe(o));i.success&&i.data.deletable===!1&&n.push({objectApiName:o,records:a})}catch{}}return n}async function kn(r,t,e){let n={},{start:o,user:s}=e;if(s===void 0||!Number.isFinite(o))return n;for await(let{objectApiName:a,ids:i}of t){let d;try{d=await L(r,a,["LastModifiedDate","LastModifiedById"],i)}catch{continue}for(let l of d)typeof l.Id=="string"&&typeof l.LastModifiedDate=="string"&&typeof l.LastModifiedById=="string"&&y(l.LastModifiedById)===s&&N(l.LastModifiedDate)>=o&&(n[l.Id]=l.LastModifiedDate)}return n}async function jr(r,t,e,n){let o=[];for(let s of t){let a=re(s.plan)?s.plan:Je(s.plan),{end:i}=St(s.span,[],e),d=new Map(Object.entries(s.removalStamps??{}).map(([f,u])=>[y(f),N(u)])),l=Dn(s.laterParts,e),c=new Map;if(Number.isFinite(i))for(let{objectApiName:f}of a.objects){let u=new qe,g=0,m=!1;for await(let h of a.pages(f)){if(n())return;let R=g;if(g+=h.length,m)continue;let b;try{b=await L(r,f,["LastModifiedDate"],h,Se)}catch{m=!0;continue}let w=new Map;for(let k of b)typeof k.Id=="string"&&w.set(y(k.Id),N(k.LastModifiedDate));h.forEach((k,I)=>{let P=y(k),_=w.get(P);_!==void 0&&(_<=i||_<=(d.get(P)??Number.NaN)||_<=(l.get(P)??Number.NaN))&&u.add(R+I)})}m||c.set(f,u)}o.push({unchanged:async function*(){for(let{objectApiName:f}of a.objects){let u=c.get(f);if(!u)continue;let g=0;for await(let m of a.pages(f)){let h=m.filter(()=>u.has(g++));h.length>0&&(yield{objectApiName:f,ids:h})}}}})}return o}async function On(r,t,e,n,o){let{objectApiName:s}=e.result,a=await t.heldAmong(s,n);a.reason!==void 0&&e.note(a.reason);for(let u of a.unchecked)e.result.unchecked.includes(u)||e.result.unchecked.push(u);let i=n.filter(u=>a.held.has(y(u)));if(o.placeOf){for(let u of i)e.held.push(u);e.result.heldBy=[...new Set([...e.result.heldBy,...a.holders])]}else e.held=i,e.result.heldBy=[...a.holders];for(let u of i)e.refused.delete(u);for(let u of n){let g=y(u),m=a.byAutomation.get(g);m?e.automationHeld.set(g,m):e.automationHeld.delete(g),m&&a.automationAfter.has(g)?e.automationHeldAfter.add(g):e.automationHeldAfter.delete(g),m&&a.automationAlong.has(g)?e.automationHeldAlong.add(g):e.automationHeldAlong.delete(g)}o.onHeld?.(i.length);let d=n.filter(u=>!a.held.has(y(u))),l=new Map,c=(u,g)=>{u.forEach((m,h)=>{let R=g[h],b=y(m);if((R.lockResends!==void 0||e.lockResent.has(b))&&e.lockResent.set(b,R.kind),R.kind==="refused"){e.refused.set(m,{reason:R.reason,dependency:R.dependency,sent:!0,...R.limit?{limit:!0}:{}});return}e.refused.delete(m);let w=o.placeOf?.get(b);if(w!==void 0?e.goneAt.add(w):e.goneLater.add(b),R.kind==="deleted"){e.result.deleted++,w===void 0&&e.deletedLater.add(b);for(let k of l.get(b)??[])e.filesLeft.set(k.key,k.name);for(let[k,I]of a.along.get(b)??[])e.tookAlong.set(k,I);for(let[k,I]of a.cameAlong.get(b)??[])e.cameAlong.set(k,I)}else e.result.alreadyGone++}),o.onSent?.(u),o.onDeleted?.(u.length)},{stopped:f}=await nn(r,s,d,{stopped:o.stopped,splitting:o.splitting,prepare:async u=>{l=await t.filesOn(u)},settle:c});return f}async function Tr(r,t,e,n,o){let s,a=o.modifiedColumn?wn.filter(({modified:i})=>i===o.modifiedColumn):wn;for(let{created:i,modified:d}of a)try{let c=await L(r,t,i?[i,d]:[d],e,Se),f=new Map;for(let g of c)typeof g.Id=="string"&&f.set(y(g.Id),N(g[d])),i&&(o.firstCreated=Cn(o.firstCreated,N(g[i])),o.lastCreated=wt(o.lastCreated,N(g[i])));o.modifiedColumn=d;let u=[];return e.forEach((g,m)=>{let h=y(g),R=f.get(h);R===void 0&&(o.missing.add(h),u.push(g)),o.modified.set(n+m,R??Number.NaN)}),u}catch(l){s??=C(l)}return o.error=s,o.modifiedColumn=void 0,[]}async function*An(r){for(let{objectApiName:t}of r.objects)for await(let e of r.pages(t))e.length>0&&(yield{objectApiName:t,ids:[...e]})}async function _r(r,t,e){let n=new Set(t.objects.filter(i=>i.count>0).map(i=>i.objectApiName));if(!n.has(xe))return[];let o=[];for await(let i of t.pages(xe))o.push(...i);let s=await bn(r,{has:i=>t.has(i),start:e.start,end:e.end,...e.user!==void 0?{user:e.user}:{},...e.otherParts?{otherParts:e.otherParts}:{}},o,n),a=[];for(let i of s){let{objectApiName:d}=i;if(e.undeletable.has(d))continue;let l=e.snapshots.get(d);if(l){if(l.error!==void 0||l.modifiedColumn!=="LastModifiedDate")continue}else if(!await Pn(r,d))continue;a.push(i)}return a}async function Pn(r,t){try{let e=ee.safeParse(await r.describe(t));return e.success&&e.data.deletable!==!1}catch{return!1}}async function Br(r,t,e,n){let o=new Map(t.map(({objectApiName:i,copies:d})=>[i,d])),s=new Set(t.flatMap(({copies:i})=>i.map(d=>y(d.id)))),a=r.objects.map(i=>{let d=o.get(i.objectApiName);return d?{objectApiName:i.objectApiName,count:i.count+d.length}:i});for(let[i,d]of o){r.objects.some(u=>u.objectApiName===i)||a.push({objectApiName:i,count:d.length});let l=e.get(i);l||(l={...En(),modifiedColumn:"LastModifiedDate"},e.set(i,l));let c=0;for await(let u of r.pages(i))c+=u.length;for(let u of d)l.modified.set(c++,u.modified);let f=d[0]?.id.slice(0,3);f!==void 0&&!n.has(f)&&n.set(f,i)}return{objects:a,pages:async function*(i){yield*r.pages(i);let d=o.get(i);d&&d.length>0&&(yield d.map(l=>l.id))},has:i=>r.has(i)||s.has(i)}}async function xr(r){let t=Date.now(),e=Number.NaN;try{e=N(await r.serverTime())}catch{}return Number.isFinite(e)?{start:Math.floor(e/1e3)*1e3,aheadMs:e-(t+Date.now())/2}:{start:Number.POSITIVE_INFINITY,aheadMs:Number.NaN}}async function Fr(r){try{let t=await r.userId();return typeof t=="string"&&t!==""?y(t):void 0}catch{return}}function Ur(r,t){if(!(t===void 0||!Number.isFinite(r.start)))return{first:new Date(r.start).toISOString(),last:new Date(Date.now()+r.aheadMs+ht).toISOString(),userId:t}}function Cn(r,t){return Number.isNaN(r)||t<r?t:r}function wt(r,t){return Number.isNaN(r)||t>r?t:r}var Nn=999;function $r(r,t,e){let n=Number.NaN;for(let o of r)o.lastCreated>=t&&o.lastCreated<=e&&(n=wt(n,o.lastCreated)),n=wt(n,o.modified.latestWithin(t,e));return n}function St(r,t,e){let n=Hr(r,t,e),o=(r.writtenUntil?.getTime()??Number.NaN)+Nn;return Number.isFinite(n.end)&&o>n.end?{...n,end:o}:n}function Hr(r,t,e){let n=[...t],o=Number.NaN;for(let l of n)o=Cn(o,l.firstCreated);let s=r.runDurationMs??0,a=(r.runRecordedAt?.getTime()??Number.NaN)+e;if(r.runEndedAt===void 0&&Number.isFinite(a)){let l=a-s-ht,c=a+ht,f=r.endedByItsWrites===!0?$r(n,l,c):Number.NaN;return{start:r.runStartedAt?.getTime()??(o>l?o:l),end:Number.isFinite(f)?Math.min(f+Nn,c):c}}let i=r.runStartedAt?.getTime()??o,d=r.runEndedAt?.getTime()??i+s;return{start:i,end:d}}function Mn(r){let t=new Set,e=-1;return{has:n=>(r.size!==e&&(t=new Set([...r].map(y)),e=r.size),t.has(n))}}function os(r,t){let e=new Oe(r,{runRecords:t.runRecords,reached:{has:()=>!1},stays:()=>!1,runStart:t.runStart,runEnd:t.runEnd,removalStart:Number.POSITIVE_INFINITY,removalUser:void 0,earlierRemovals:(t.removalSpans??[]).map(n=>({start:N(n.first),end:N(n.last),user:y(n.userId)})),includeChanged:t.includeChanged,automationMade:Mn(t.taken),...t.runUserId?{runUser:y(t.runUserId)}:{}});return async(n,o)=>{let s=await e.heldAmong(n,o,1);return{held:s.held,holders:[...s.holders],...s.reason!==void 0?{reason:s.reason}:{}}}}var Ue="IsPersonAccount";function Jr(r,t){return{holding:new Set([...r.holding,...t.holding]),automation:[...r.automation,...t.automation],along:[...r.along,...t.along],goes:[...r.goes,...t.goes],unchecked:r.unchecked||t.unchecked}}var qr=50;function $e(r,t){return JSON.stringify(t.map(e=>r[e]??null))}var Oe=class{constructor(t,e){this.org=t;this.context=e}org;context;worked;statuses=new Map;lockedUnder=new Map;files=new Map;datesKept=new Map;cascadeEnds=new Map;async heldAmong(t,e,n=0){let o={held:new Set,holders:new Set,otherwise:new Set,mayBeAutomation:[],byAutomation:new Map,automationAfter:new Set,automationAlong:new Set,along:new Map,cameAlong:new Map,unchecked:new Set};if(e.length===0)return o;let s;try{let u=ee.parse(await this.org.describe(t)),g=await this.workedObjects(),m=t==="Account"&&u.fields.some(h=>h.name===Ue);s=(u.childRelationships??[]).filter(h=>(h.cascadeDelete===!0||h.restrictedDelete===!0)&&g.has(h.childSObject)).map(h=>({childSObject:h.childSObject,field:h.field,restricted:h.cascadeDelete!==!0,...m&&h.childSObject==="Contact"&&h.field==="AccountId"?{personContacts:!0}:{}}))}catch(u){return o.reason=C(u),e.forEach(g=>this.hold(o,y(g))),o}let a=[];for(let u=0;u<e.length;u+=z)a.push(e.slice(u,u+z));let i=a.length>1?await Xe(s.map(u=>()=>this.anyPointing(u)),Se):s.map(()=>!0),d=s.filter((u,g)=>i[g]).flatMap(u=>a.map(g=>async()=>({relationship:u,...await this.holdingIn(u,g)}))),l=o.mayBeAutomation,c=new Map;for(let{relationship:u,holding:g,unchecked:m,automation:h,along:R,goes:b}of await Xe(d,Se)){m&&o.unchecked.add(u.childSObject),(g.size>0||h.length>0)&&o.holders.add(u.childSObject),g.forEach(w=>this.hold(o,w));for(let w of h)o.held.add(y(w.parent));l.push(...h);for(let{parent:w,key:k}of R){let I=o.along.get(w)??new Map;I.set(k,u.childSObject),o.along.set(w,I)}b.length>0&&c.set(u.childSObject,[...c.get(u.childSObject)??[],...b])}if(await this.heldBelow(c,o,n),n>0)return o;this.context.previewing!==!0&&await this.lockedPastDraft(t,e,o),Ee(t)&&await this.standardPricesHeld(e,o),t===Ye&&await this.sellingModelOptionsHeld(e,o),this.context.alongAccepted!==!0&&await this.automationHeldBelow(l,o);let f=await this.byAutomationOnly(t,l,o.otherwise);return o.byAutomation=f.objects,o.automationAfter=f.after,o.automationAlong=f.along,o}hold(t,e){t.held.add(e),t.otherwise.add(e)}async heldBelow(t,e,n){let o=(s,a,i,d)=>{let l=s.get(a)??new Map;l.set(i,d),s.set(a,l)};for(let[s,a]of t){let i=[...new Set(a.map(l=>l.id))],d=n+1<wr?await this.heldAmong(s,i,n+1):void 0;for(let{parent:l,id:c,came:f}of a){let u=y(c);if(!d||d.held.has(u)){this.hold(e,l),e.holders.add(s),d?.holders.forEach(g=>e.holders.add(g));continue}f&&o(e.cameAlong,l,u,s);for(let[g,m]of d.along.get(u)??[])o(e.along,l,g,m);for(let[g,m]of d.cameAlong.get(u)??[])o(e.cameAlong,l,g,m)}d?.unchecked.forEach(l=>e.unchecked.add(l))}}async automationHeldBelow(t,e){let n=new Map;for(let o of t)e.otherwise.has(y(o.parent))||n.set(o.object,[...n.get(o.object)??[],o]);for(let[o,s]of n){let a=await this.heldAmong(o,[...new Set(s.map(i=>i.id))],1);for(let i of s){let d=y(i.id),l=a.mayBeAutomation.some(c=>y(c.parent)===d&&c.creator!==i.creator);!a.otherwise.has(d)&&!l||(this.hold(e,y(i.parent)),a.holders.forEach(c=>e.holders.add(c)))}a.unchecked.forEach(i=>e.unchecked.add(i))}}async byAutomationOnly(t,e,n){let o=new Map,s=new Set,a=e.filter(f=>!n.has(y(f.parent)));if(a.length===0)return{objects:o,after:s,along:new Set};let i;try{let f=await L(this.org,t,["CreatedDate","CreatedById"],[...new Set(a.map(u=>u.parent))]);i=new Map(f.flatMap(u=>typeof u.Id=="string"?[[y(u.Id),u]]:[]))}catch{return{objects:o,after:s,along:new Set}}let d=new Set,l=new Set;for(let f of a){let u=y(f.parent),g=i.get(u),m=N(g?.CreatedDate),h=g?.CreatedById,R=this.context.runUser??(typeof h=="string"?y(h):void 0),b=f.created-m;if(!(R!==void 0&&f.creator===R&&b>=-2e3&&b<=6e4)){d.add(u);continue}let k=o.get(u)??new Set;k.add(f.object),o.set(u,k),f.created>this.context.runEnd&&s.add(u),f.along||l.add(u)}for(let f of d)o.delete(f),s.delete(f);let c=new Set([...o.keys()].filter(f=>!l.has(f)));return{objects:o,after:s,along:c}}async holdingIn(t,e){let n=j(t.childSObject),o=j(t.field),[s]=H(e,e.length),a=new Set(["Id",o,...pt[n]?.ends??[],...t.personContacts?[Ue]:[]]),i=this.datesKept.get(n)??0;for(;i<He.length;){let d=He[i],l;try{l=await this.org.query(`SELECT ${[...a,...d].join(", ")} FROM ${n} WHERE ${o} IN (${s}) LIMIT ${Fe}`)}catch(R){Er(R)?(i=Pr(R,i),this.datesKept.set(n,i)):i++;continue}if(l.records.length>=Fe){if(e.length>1){let R=Math.ceil(e.length/2);return Jr(await this.holdingIn(t,e.slice(0,R)),await this.holdingIn(t,e.slice(R)))}return{holding:new Set(e.map(y)),automation:[],along:[],goes:[],unchecked:!1}}let c=new Set,f=[],u=[],g=[],m=new Map;for(let R of l.records){if(typeof R!="object"||R===null)continue;let b=R,w=b[t.field];if(typeof w!="string"||typeof b.Id!="string"||(n===Rn&&o==="LinkedEntityId"&&this.noteFile(b),this.lockedUnder.get(y(b.Id))===y(w)))continue;let k={onlyIncluded:!1};if(!this.stays(b,n,t.restricted,t.personContacts,k)){if(k.onlyIncluded&&u.push({parent:y(w),key:y(b.Id)}),n!==Rn&&this.goesAlongUnread(b)){let _=!(pt[n]?.cameWithRun(b,this.context.runRecords)===!0||t.personContacts===!0&&b[Ue]===!0)&&!k.onlyIncluded&&k.byRemoval!==!0&&this.context.goesWithParent?.(b,this.context.runEnd)!==!0;g.push({parent:y(w),id:b.Id,came:_})}continue}let I=this.mayBeAutomation(b);if(I){let P={parent:w,id:b.Id,object:n,along:!t.restricted,...I};f.push(P),t.restricted&&m.set(b.Id,P)}else c.add(y(w))}let h=await this.ofOtherParts(n,[...m.keys()]);for(let[R,b]of m)h.has(y(R))&&(f.splice(f.indexOf(b),1),c.add(y(b.parent)));return{holding:c,automation:f,along:u,goes:g,unchecked:!1}}return{holding:new Set,automation:[],along:[],goes:[],unchecked:!t.restricted}}goesAlongUnread(t){let e=y(t.Id),{runRecords:n,otherPartRecords:o,automationMade:s,goesWithParent:a,runEnd:i}=this.context;return this.context.alongAccepted!==!0&&!n.has(e)&&o?.has(e)!==!0&&s?.has(e)!==!0&&(this.context.goesWithParentReadBelow===!0||a?.(t,i)!==!0)}async ofOtherParts(t,e){let n=new Set,{otherPartRecords:o,otherPartObjects:s,runRecords:a}=this.context;if(e.length===0||!o||!s)return n;let i=this.cascadeEnds.get(t);i||(i=(async()=>{let c=new Set;for(let f of s)try{let u=ee.parse(await this.org.describe(f));for(let g of u.childRelationships??[])g.childSObject===t&&g.cascadeDelete===!0&&c.add(g.field)}catch{}return[...c]})(),this.cascadeEnds.set(t,i));let d=await i;if(d.length===0)return n;let l;try{l=await L(this.org,t,d,e)}catch{return n}for(let c of l){if(typeof c.Id!="string")continue;let f=d.flatMap(u=>{let g=c[u];return typeof g=="string"?[y(g)]:[]});f.some(u=>a.has(u))||f.some(u=>o.has(u))&&n.add(y(c.Id))}return n}mayBeAutomation(t){let{runRecords:e,runStart:n,runEnd:o,runUser:s,otherPartRecords:a}=this.context;if(typeof t.Id!="string"||e.has(y(t.Id))||a?.has(y(t.Id))===!0||typeof t.CreatedById!="string")return;let i=y(t.CreatedById);if(s!==void 0&&i!==s)return;let d=N(t.CreatedDate);if(!(d>=n-2e3&&d<=o+6e4))return;let l=N(t.LastModifiedDate),c=typeof t.LastModifiedById=="string"?y(t.LastModifiedById):void 0;if(!(l>o&&c!==void 0&&c!==i))return{created:d,creator:i}}async anyPointing(t){try{let e=j(t.childSObject),n=j(t.field);return(await this.org.query(`SELECT Id FROM ${e} WHERE ${n} != null LIMIT 1`)).records.length>0}catch{return!0}}noteFile(t){let e=t.LinkedEntityId,n=t.ContentDocumentId;if(typeof e!="string"||typeof n!="string"||ue(n,this.context.runRecords))return;let o=this.files.get(y(e))??new Set;o.add(n),this.files.set(y(e),o)}async filesOn(t){let e=new Map;for(let s of t){let a=this.files.get(y(s));a&&a.size>0&&e.set(y(s),[...a])}let n=[...new Set([...e.values()].flat())];if(n.length===0)return new Map;let o=new Map;try{for(let s of await L(this.org,kr,["Title"],n))typeof s.Id=="string"&&typeof s.Title=="string"&&s.Title!==""&&o.set(y(s.Id),s.Title)}catch{}return new Map([...e].map(([s,a])=>[s,a.map(i=>({key:y(i),name:o.get(y(i))??i}))]))}async lockedPastDraft(t,e,n){for(let[o,s]of Object.entries(Nt)){let a=s.find(u=>u.object===t)?.lookup,i=me[o];if(!a||!i)continue;let d=await this.statusCategoriesOf(i);if(!d)continue;let l,c;try{l=await L(this.org,t,[a],e);let u=[...new Set(l.map(g=>g[a]).filter(g=>typeof g=="string"))];c=u.length>0?await L(this.org,o,["Status"],u):[]}catch{continue}let f=new Set(c.filter(u=>{let g=d.categoryOf.get(String(u.Status));return g!==void 0&&g!=="Draft"}).map(u=>y(String(u.Id))));for(let u of l){let g=u[a];typeof u.Id!="string"||typeof g!="string"||f.has(y(g))&&(this.hold(n,y(u.Id)),n.holders.add(o),this.lockedUnder.set(y(u.Id),y(g)))}}}statusCategoriesOf(t){let e=this.statuses.get(t);return e||(e=Pe(de(this.org),t),this.statuses.set(t,e)),e}async standardPricesHeld(t,e){try{let n=de(this.org),o=[...await pe(n,t)];if(o.length===0)return;let s=await this.priceKeyFields(),a=await L(this.org,X,s,o),i=await this.pricesOfProducts(a,s),d=i.flatMap(u=>typeof u.Id=="string"?[u.Id]:[]),l=new Set([...await pe(n,d)].map(y)),c=new Set(t.map(y)),f=new Set;for(let u of i){if(typeof u.Id!="string")continue;let g=y(u.Id);if(l.has(g))continue;(c.has(g)?e.held.has(g):this.stays(u,X,!0))&&f.add($e(u,s))}for(let u of a)typeof u.Id!="string"||!f.has($e(u,s))||(this.hold(e,y(u.Id)),e.holders.add(X))}catch{}}async sellingModelOptionsHeld(t,e){let n=[ge,Ge];try{let o=await L(this.org,Ye,n,t),s=await this.pricesOfProducts(o,[...n,"IsActive"]),a=new Set(s.filter(i=>typeof i.Id=="string"&&i.IsActive===!0&&this.stays(i,X,!0)).map(i=>$e(i,n)));for(let i of o)typeof i.Id!="string"||!a.has($e(i,n))||(this.hold(e,y(i.Id)),e.holders.add(X))}catch{}}async priceKeyFields(){let t=ee.parse(await this.org.describe(X)),e=new Set(t.fields.map(n=>n.name));return[ge,...[Ge,Mt].filter(n=>e.has(n))]}async pricesOfProducts(t,e){let n=[...new Set(t.map(a=>a[ge]).filter(a=>typeof a=="string"))],o=[...new Set(["Id",...e])].map(j).join(", "),s=[];for(let a of H(n,qr)){let i=await this.org.query(`SELECT ${o} FROM ${X} WHERE ${ge} IN (${a}) LIMIT ${Fe}`);if(i.records.length>=Fe)throw new Error("More prices than one read takes.");for(let d of i.records)typeof d=="object"&&d!==null&&s.push(d)}return s}stays(t,e,n=!1,o=!1,s){let a=y(t.Id),{runRecords:i,reached:d,runStart:l,runEnd:c,removalStart:f,removalUser:u,earlierRemovals:g,includeChanged:m}=this.context;if(i.has(a))return d.has(a)||this.context.stays(a);if(n)return!0;if(this.context.automationMade?.has(a)===!0||this.context.goesWithParent?.(t,c)===!0||this.context.alongToDraft?.has(a)===!0||pt[e]?.cameWithRun(t,i))return!1;if(o&&t[Ue]===!0)return!(N(t.LastModifiedDate??t.SystemModstamp)<=c)&&!m;let h="CreatedDate"in t?"CreatedDate":"SystemModstamp"in t?"SystemModstamp":void 0;if(!h)return!0;let R=N(t[h]),b=N(h==="CreatedDate"?t.LastModifiedDate:t.SystemModstamp);if(!(R>=l))return!0;let w=this.context.linkedLater?.get(a);if(w&&(R<=c||R>=w.start)&&b<=w.end)return!1;let k=typeof t.CreatedById=="string"?y(t.CreatedById):void 0,I=(_,G)=>_!==void 0&&(_===u&&G>=f||g.some(K=>_===K.user&&G>=K.start&&G<=K.end));if(I(k,R))return s&&(s.byRemoval=!0),!1;if(b<=c)return!1;let P=typeof t.LastModifiedById=="string"?y(t.LastModifiedById):void 0;return R<=c&&I(P,b)?!1:(m&&s&&(s.onlyIncluded=!0),!m)}workedObjects(){return this.worked??=vt(this.org),this.worked}};export{Ne as a,zt as b,Un as c,$n as d,ee as e,zn as f,Xr as g,eo as h,to as i,Vn as j,no as k,Me as l,tt as m,je as n,he as o,po as p,at as q,Xn as r,tr as s,Zt as t,en as u,dt as v,tn as w,nn as x,rn as y,Te as z,ct as A,sr as B,lt as C,So as D,on as E,bn as F,le as G,cr as H,ht as I,re as J,Zo as K,Xo as L,es as M,ts as N,ns as O,rs as P,os as Q};
@@ -1,7 +0,0 @@
1
- import { createRequire as __sandforgeRequire } from 'node:module';
2
- import { fileURLToPath as __sandforgePath } from 'node:url';
3
- import { dirname as __sandforgeDirname } from 'node:path';
4
- const require = __sandforgeRequire(import.meta.url);
5
- const __filename = __sandforgePath(import.meta.url);
6
- const __dirname = __sandforgeDirname(__filename);
7
- import{xe as c}from"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";var y=[{type:"seed",label:"Seed Data",description:"Seed an org with a template saved on the Seed page or shipped with SandForge, never a production org; its records are taken back from Seed\u2019s Recent runs",category:"data",icon:"database",configSchema:{orgId:{type:"string"},templateId:{type:"string"}}},{type:"sync",label:"Sync Data",description:"Run a Sync configuration saved on the Sync page; a target Production Guard asks about, a production org or a sandbox marked Staging, needs an Approval step before it",category:"data",icon:"sync",configSchema:{configId:{type:"string"}}},{type:"backup",label:"Backup",description:"Take a DataOps snapshot of the listed objects into local storage",category:"data",icon:"archive",configSchema:{orgId:{type:"string"},objects:{type:"array"}}},{type:"restore",label:"Restore",description:"Restore data from a previous backup snapshot",category:"data",icon:"history",configSchema:{backupId:{type:"string"}}},{type:"anonymize",label:"Anonymize",description:"Mask an org with a DataOps template, after a snapshot of the values it writes over, never a production org",category:"data",icon:"shield",configSchema:{orgId:{type:"string"},templateId:{type:"string"},object:{type:"string",optional:!0},where:{type:"string",optional:!0},acceptAutomation:{type:"boolean",default:!1},acceptEmails:{type:"boolean",default:!1},muteAutomation:{type:"boolean",default:!1}}},{type:"delete",label:"Delete",description:"Delete records matching specified criteria",category:"data",icon:"trash",configSchema:{objectName:{type:"string"},where:{type:"string"}}},{type:"checkpoint",label:"Checkpoint",description:"Take a checkpoint of a sandbox, a scratch org or a Developer Edition org, kept on this machine",category:"data",icon:"bookmark",configSchema:{orgId:{type:"string"},mode:{type:"string",default:"everything"},objects:{type:"array",optional:!0},excluded:{type:"array",optional:!0},name:{type:"string",optional:!0},keepDays:{type:"number",default:c},maxTotal:{type:"number",optional:!0},ignoredFields:{type:"array",optional:!0}}},{type:"rewind",label:"Rewind",description:"Put an org back to a checkpoint kept on this machine, once confirmed by typing the org\u2019s alias, at most maxRecords records",category:"data",icon:"history",configSchema:{orgId:{type:"string"},checkpointId:{type:"string"},objects:{type:"array",optional:!0},acceptAutomation:{type:"boolean",default:!1},acceptEmails:{type:"boolean",default:!1},muteAutomation:{type:"boolean",default:!1},acceptNoUndo:{type:"boolean",default:!1},acceptRecreate:{type:"boolean",default:!1},acceptOutside:{type:"boolean",default:!1},acceptUnseen:{type:"boolean",default:!1},maxRecords:{type:"number",required:!0},refuseWhenActive:{type:"boolean",default:!0}}},{type:"compare",label:"Compare Orgs",description:"Compare the metadata of two orgs, as the Compare page does",category:"quality",icon:"git-compare",configSchema:{sourceOrgId:{type:"string"},targetOrgId:{type:"string"},types:{type:"array"}}},{type:"precheck",label:"Pre-check",description:"Read an org\u2019s API usage, storage, error logs or failed jobs as the Monitor does; the run stops on a critical reading",category:"quality",icon:"check-circle",configSchema:{orgId:{type:"string"},checks:{type:"array"}}},{type:"condition",label:"Condition",description:"Branch pipeline execution based on conditions",category:"control",icon:"git-branch",configSchema:{field:{type:"string"},operator:{type:"string"},value:{type:"string"}}},{type:"delay",label:"Delay",description:"Wait for a specified duration before continuing",category:"control",icon:"clock",configSchema:{durationMs:{type:"number"}}},{type:"approval",label:"Approval",description:"Pauses the run until someone approves it in VS Code; a rejection, or no answer in time, stops it",category:"control",icon:"user-check",configSchema:{message:{type:"string"},timeoutMinutes:{type:"number"}}},{type:"notification",label:"Notification",description:"Shows its message as a VS Code notification",category:"notification",icon:"bell",configSchema:{message:{type:"string"}}}],p=class{registry;constructor(){this.registry=new Map(y.map(e=>[e.type,e]))}getStepTypes(){return[...this.registry.values()]}getStepType(e){return this.registry.get(e)}getDefaultConfig(e){let r=this.registry.get(e);if(!r)return{};let o={};for(let[t,a]of Object.entries(r.configSchema)){let n=a;if(!(n.optional===!0||n.required===!0)){if("default"in n){o[t]=n.default;continue}switch(n.type){case"string":o[t]="";break;case"number":o[t]=0;break;case"array":o[t]=[];break;case"boolean":o[t]=!1;break;default:o[t]=null}}}return o}validateStepConfig(e,r){let o=this.registry.get(e);if(!o)return[`Unknown step type: ${e}`];let t=[];for(let[a,n]of Object.entries(o.configSchema)){let l=n,i=r[a],s=l.type;i!=null&&(s==="array"&&!Array.isArray(i)?t.push(`Field "${a}" must be an array`):s==="string"&&typeof i!="string"?t.push(`Field "${a}" must be a string`):s==="number"&&typeof i!="number"?t.push(`Field "${a}" must be a number`):s==="boolean"&&typeof i!="boolean"&&t.push(`Field "${a}" must be a boolean`))}return t}getStepCategories(){let e=new Set;for(let r of this.registry.values())e.add(r.category);return[...e]}};export{p as StepLibrary};
@@ -1,7 +0,0 @@
1
- import { createRequire as __sandforgeRequire } from 'node:module';
2
- import { fileURLToPath as __sandforgePath } from 'node:url';
3
- import { dirname as __sandforgeDirname } from 'node:path';
4
- const require = __sandforgeRequire(import.meta.url);
5
- const __filename = __sandforgePath(import.meta.url);
6
- const __dirname = __sandforgeDirname(__filename);
7
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-TMIESDE5.mjs";import"./chunk-TCEXCHXR.mjs";import"./chunk-4GCYGQXD.mjs";import"./chunk-WXU6ZJIV.mjs";import"./chunk-R3OM3X4L.mjs";import"./chunk-77IVKH7R.mjs";import"./chunk-2WMKJVD2.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-VXZ5PTOM.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-ZOSESZ22.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-Z3MGN42K.mjs";import"./chunk-2GSMHGIV.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-ISOSTAJR.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{a as AUTOMATION_NOT_ACCEPTED,h as automationNamedOf,j as automationRequestsOf,m as deliverabilityOf,d as firedEntryWords,g as firedOf,o as gatedPlanAnswerOf,c as guardUsersOrg,n as planUsersGated,b as reachUsersOrg,f as readUsersAutomation,e as unreadPartWords,i as usersAutomationRefusal,p as usersToRestoreOf,k as writtenByPlan,l as writtenByRemoval};
@@ -1,7 +0,0 @@
1
- import { createRequire as __sandforgeRequire } from 'node:module';
2
- import { fileURLToPath as __sandforgePath } from 'node:url';
3
- import { dirname as __sandforgeDirname } from 'node:path';
4
- const require = __sandforgeRequire(import.meta.url);
5
- const __filename = __sandforgePath(import.meta.url);
6
- const __dirname = __sandforgeDirname(__filename);
7
- import{a,b,c,d,e,f,g,h,i,j}from"./chunk-2N73W63D.mjs";import"./chunk-27BBEGUD.mjs";import"./chunk-H4OBZIX3.mjs";import"./chunk-OTJH6AEA.mjs";import"./chunk-FVLFO2S6.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-77MZRBWX.mjs";import"./chunk-BT43WSOS.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{b as AGENT_TEST_RUN_WAIT_MINUTES,a as AGENT_TEST_SPECS_DIR,e as agentTestApiName,f as agentTestCommands,d as agentTestSpecFileName,c as agentTestSpecYaml,g as nodeAgentTestSpecFiles,h as writeAgentTestSpec,i as writeScenarioTestSpec,j as yamlOf};
@@ -1,7 +0,0 @@
1
- import { createRequire as __sandforgeRequire } from 'node:module';
2
- import { fileURLToPath as __sandforgePath } from 'node:url';
3
- import { dirname as __sandforgeDirname } from 'node:path';
4
- const require = __sandforgeRequire(import.meta.url);
5
- const __filename = __sandforgePath(import.meta.url);
6
- const __dirname = __sandforgeDirname(__filename);
7
- import{a as b}from"./chunk-2ADSD5WK.mjs";import"./chunk-BH76USTQ.mjs";import{a}from"./chunk-XKFHTBAB.mjs";import"./chunk-FYWNSMOZ.mjs";import"./chunk-WBELLGNE.mjs";import"./chunk-OS5GE52G.mjs";import"./chunk-BPHTA6KP.mjs";import"./chunk-U2CTKIPE.mjs";import"./chunk-NDFFIJL5.mjs";import"./chunk-I5C4O3VA.mjs";import"./chunk-RVCPQVKM.mjs";import"./chunk-ALBY5SOH.mjs";import"./chunk-FKCIGJOI.mjs";import"./chunk-C6RKM4BB.mjs";import"./chunk-IHGYJZZ2.mjs";import"./chunk-XCA5AONB.mjs";import"./chunk-66NMFCWX.mjs";import"./chunk-WB2RIVO3.mjs";import"./chunk-AXFD2OH6.mjs";import"./chunk-X2XZQ434.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-O7GCCRPW.mjs";import"./chunk-4X5D3MSV.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-XMQ5R6TC.mjs";import"./chunk-IXIY6Q4M.mjs";import"./chunk-T63U4OZJ.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-QIRO4HTE.mjs";import"./chunk-BT43WSOS.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-EOQON3E5.mjs";import"./chunk-Y7YUNRKK.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-N2HYG3BL.mjs";import"./chunk-7WSQ65WG.mjs";import"./chunk-MJD6CPZZ.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-OUU47Y7A.mjs";import"./chunk-4GCYGQXD.mjs";import"./chunk-WXU6ZJIV.mjs";import"./chunk-R3OM3X4L.mjs";import"./chunk-77IVKH7R.mjs";import"./chunk-2WMKJVD2.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-VXZ5PTOM.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-ZOSESZ22.mjs";import"./chunk-ZXOUWHYE.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-Z3MGN42K.mjs";import"./chunk-2GSMHGIV.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-ISOSTAJR.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-7BQMBXKX.mjs";import"./chunk-KWAVSZ2B.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{a as objectsWrittenBy,b as previewCheckpoint};
@@ -1,7 +0,0 @@
1
- import { createRequire as __sandforgeRequire } from 'node:module';
2
- import { fileURLToPath as __sandforgePath } from 'node:url';
3
- import { dirname as __sandforgeDirname } from 'node:path';
4
- const require = __sandforgeRequire(import.meta.url);
5
- const __filename = __sandforgePath(import.meta.url);
6
- const __dirname = __sandforgeDirname(__filename);
7
- import{f as a,g as b,h as c,i as d,j as e,k as f,l as g}from"./chunk-FYWNSMOZ.mjs";import"./chunk-U2CTKIPE.mjs";import"./chunk-NDFFIJL5.mjs";import"./chunk-RVCPQVKM.mjs";import"./chunk-66NMFCWX.mjs";import"./chunk-X2XZQ434.mjs";import"./chunk-IXIY6Q4M.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-EOQON3E5.mjs";import"./chunk-Y7YUNRKK.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-N2HYG3BL.mjs";import"./chunk-MJD6CPZZ.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-ZOSESZ22.mjs";import"./chunk-ZXOUWHYE.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-Z3MGN42K.mjs";import"./chunk-2GSMHGIV.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-ISOSTAJR.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-7BQMBXKX.mjs";import"./chunk-KWAVSZ2B.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{d as diffOfPicked,b as heldInPlaceReason,g as planSelection,c as rewindPlan,a as rewindWriters,f as selectionPlanOf,e as snapshotRowsOf};