@graphrefly/graphrefly 0.44.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (720) hide show
  1. package/README.md +22 -19
  2. package/dist/_internal-B23BagFd.d.cts +33 -0
  3. package/dist/_internal-B23BagFd.d.ts +33 -0
  4. package/dist/adaptive-rate-limiter-Dch_xYIi.d.cts +111 -0
  5. package/dist/adaptive-rate-limiter-Dch_xYIi.d.ts +111 -0
  6. package/dist/agents-C0Ji9ldU.d.cts +629 -0
  7. package/dist/agents-C9zexT7I.d.ts +629 -0
  8. package/dist/audit-BAXb3VOg.d.ts +246 -0
  9. package/dist/audit-C_bPfkqS.d.cts +246 -0
  10. package/dist/backoff-7KIK3WQW.js +24 -0
  11. package/dist/backoff-7KIK3WQW.js.map +1 -0
  12. package/dist/backoff-Bnb9OoPh.d.cts +6 -0
  13. package/dist/backoff-Bnb9OoPh.d.ts +6 -0
  14. package/dist/base/composition/index.cjs +811 -0
  15. package/dist/base/composition/index.cjs.map +1 -0
  16. package/dist/base/composition/index.d.cts +469 -0
  17. package/dist/base/composition/index.d.ts +469 -0
  18. package/dist/base/composition/index.js +40 -0
  19. package/dist/base/composition/index.js.map +1 -0
  20. package/dist/base/index.cjs +6336 -0
  21. package/dist/base/index.cjs.map +1 -0
  22. package/dist/base/index.d.cts +22 -0
  23. package/dist/base/index.d.ts +22 -0
  24. package/dist/base/index.js +259 -0
  25. package/dist/base/index.js.map +1 -0
  26. package/dist/base/io/index.cjs +3270 -0
  27. package/dist/base/io/index.cjs.map +1 -0
  28. package/dist/base/io/index.d.cts +2245 -0
  29. package/dist/base/io/index.d.ts +2245 -0
  30. package/dist/base/io/index.js +117 -0
  31. package/dist/base/io/index.js.map +1 -0
  32. package/dist/base/meta/index.cjs +43 -0
  33. package/dist/base/meta/index.cjs.map +1 -0
  34. package/dist/base/meta/index.d.cts +45 -0
  35. package/dist/base/meta/index.d.ts +45 -0
  36. package/dist/base/meta/index.js +13 -0
  37. package/dist/base/meta/index.js.map +1 -0
  38. package/dist/base/mutation/index.cjs +200 -0
  39. package/dist/base/mutation/index.cjs.map +1 -0
  40. package/dist/base/mutation/index.d.cts +177 -0
  41. package/dist/base/mutation/index.d.ts +177 -0
  42. package/dist/base/mutation/index.js +22 -0
  43. package/dist/base/mutation/index.js.map +1 -0
  44. package/dist/base/render/index.cjs +1120 -0
  45. package/dist/base/render/index.cjs.map +1 -0
  46. package/dist/{extra/render/index.d.ts → base/render/index.d.cts} +75 -31
  47. package/dist/{extra/render/index.d.cts → base/render/index.d.ts} +75 -31
  48. package/dist/base/render/index.js +24 -0
  49. package/dist/base/render/index.js.map +1 -0
  50. package/dist/base/sources/browser/index.cjs +172 -0
  51. package/dist/base/sources/browser/index.cjs.map +1 -0
  52. package/dist/base/sources/browser/index.d.cts +84 -0
  53. package/dist/base/sources/browser/index.d.ts +84 -0
  54. package/dist/base/sources/browser/index.js +151 -0
  55. package/dist/base/sources/browser/index.js.map +1 -0
  56. package/dist/base/sources/event/index.cjs +98 -0
  57. package/dist/base/sources/event/index.cjs.map +1 -0
  58. package/dist/base/sources/event/index.d.cts +91 -0
  59. package/dist/base/sources/event/index.d.ts +91 -0
  60. package/dist/base/sources/event/index.js +13 -0
  61. package/dist/base/sources/event/index.js.map +1 -0
  62. package/dist/base/sources/index.cjs +755 -0
  63. package/dist/base/sources/index.cjs.map +1 -0
  64. package/dist/{extra/sources.d.ts → base/sources/index.d.cts} +74 -301
  65. package/dist/{extra/sources.d.cts → base/sources/index.d.ts} +74 -301
  66. package/dist/base/sources/index.js +42 -0
  67. package/dist/base/sources/index.js.map +1 -0
  68. package/dist/base/sources/node/index.cjs +320 -0
  69. package/dist/base/sources/node/index.cjs.map +1 -0
  70. package/dist/{extra/node.d.ts → base/sources/node/index.d.cts} +35 -37
  71. package/dist/{extra/node.d.cts → base/sources/node/index.d.ts} +35 -37
  72. package/dist/base/sources/node/index.js +306 -0
  73. package/dist/base/sources/node/index.js.map +1 -0
  74. package/dist/base/utils/index.cjs +37 -0
  75. package/dist/base/utils/index.cjs.map +1 -0
  76. package/dist/base/utils/index.d.cts +37 -0
  77. package/dist/base/utils/index.d.ts +37 -0
  78. package/dist/base/utils/index.js +11 -0
  79. package/dist/base/utils/index.js.map +1 -0
  80. package/dist/base/worker/index.cjs +548 -0
  81. package/dist/base/worker/index.cjs.map +1 -0
  82. package/dist/base/worker/index.d.cts +207 -0
  83. package/dist/base/worker/index.d.ts +207 -0
  84. package/dist/base/worker/index.js +20 -0
  85. package/dist/base/worker/index.js.map +1 -0
  86. package/dist/breaker-C9skL3d8.d.ts +175 -0
  87. package/dist/breaker-ugSdq54q.d.cts +175 -0
  88. package/dist/{cascading-BglDkMdX.d.cts → cascading-CSSbKGrJ.d.ts} +3 -3
  89. package/dist/{cascading-MFgxu7Yo.d.ts → cascading-baGkiihI.d.cts} +3 -3
  90. package/dist/chunk-255UCBG4.js +58 -0
  91. package/dist/chunk-255UCBG4.js.map +1 -0
  92. package/dist/chunk-2LO3EL4W.js +1 -0
  93. package/dist/chunk-2LO3EL4W.js.map +1 -0
  94. package/dist/chunk-2OB3CEJS.js +1065 -0
  95. package/dist/chunk-2OB3CEJS.js.map +1 -0
  96. package/dist/chunk-36NMM65U.js +144 -0
  97. package/dist/chunk-36NMM65U.js.map +1 -0
  98. package/dist/chunk-3CEXCBN6.js +1 -0
  99. package/dist/chunk-3CEXCBN6.js.map +1 -0
  100. package/dist/chunk-3MUSLI6E.js +105 -0
  101. package/dist/chunk-3MUSLI6E.js.map +1 -0
  102. package/dist/chunk-3PSLNJDU.js +884 -0
  103. package/dist/chunk-3PSLNJDU.js.map +1 -0
  104. package/dist/chunk-3QZY5BI7.js +92 -0
  105. package/dist/chunk-3QZY5BI7.js.map +1 -0
  106. package/dist/chunk-42FQ27MQ.js +594 -0
  107. package/dist/chunk-42FQ27MQ.js.map +1 -0
  108. package/dist/chunk-4GYMCUDZ.js +1085 -0
  109. package/dist/chunk-4GYMCUDZ.js.map +1 -0
  110. package/dist/chunk-4S53H2KR.js +382 -0
  111. package/dist/chunk-4S53H2KR.js.map +1 -0
  112. package/dist/chunk-4XCHZRUJ.js +128 -0
  113. package/dist/chunk-4XCHZRUJ.js.map +1 -0
  114. package/dist/chunk-5THCXDWY.js +725 -0
  115. package/dist/chunk-5THCXDWY.js.map +1 -0
  116. package/dist/chunk-6XZYT4SW.js +256 -0
  117. package/dist/chunk-6XZYT4SW.js.map +1 -0
  118. package/dist/chunk-7EGRP2VX.js +76 -0
  119. package/dist/chunk-7EGRP2VX.js.map +1 -0
  120. package/dist/chunk-A7KV5UK4.js +150 -0
  121. package/dist/chunk-A7KV5UK4.js.map +1 -0
  122. package/dist/chunk-APY2SS5X.js +156 -0
  123. package/dist/chunk-APY2SS5X.js.map +1 -0
  124. package/dist/chunk-AZDQPQ3V.js +66 -0
  125. package/dist/chunk-AZDQPQ3V.js.map +1 -0
  126. package/dist/chunk-BU3SEFA5.js +90 -0
  127. package/dist/chunk-BU3SEFA5.js.map +1 -0
  128. package/dist/chunk-BXGZFGZ4.js +189 -0
  129. package/dist/chunk-BXGZFGZ4.js.map +1 -0
  130. package/dist/chunk-CGHORL6G.js +579 -0
  131. package/dist/chunk-CGHORL6G.js.map +1 -0
  132. package/dist/chunk-CXANAIZU.js +530 -0
  133. package/dist/chunk-CXANAIZU.js.map +1 -0
  134. package/dist/chunk-CZQHCKKG.js +1 -0
  135. package/dist/chunk-CZQHCKKG.js.map +1 -0
  136. package/dist/chunk-DKNHAICT.js +133 -0
  137. package/dist/chunk-DKNHAICT.js.map +1 -0
  138. package/dist/chunk-DM4OMPWK.js +584 -0
  139. package/dist/chunk-DM4OMPWK.js.map +1 -0
  140. package/dist/chunk-DMSNO6ZB.js +452 -0
  141. package/dist/chunk-DMSNO6ZB.js.map +1 -0
  142. package/dist/chunk-E5OZPDIW.js +229 -0
  143. package/dist/chunk-E5OZPDIW.js.map +1 -0
  144. package/dist/chunk-EVYY4X5A.js +509 -0
  145. package/dist/chunk-EVYY4X5A.js.map +1 -0
  146. package/dist/chunk-FDFD67UO.js +1 -0
  147. package/dist/chunk-FDFD67UO.js.map +1 -0
  148. package/dist/chunk-FMPF42Q4.js +13 -0
  149. package/dist/chunk-FMPF42Q4.js.map +1 -0
  150. package/dist/chunk-FR6RGA3B.js +1277 -0
  151. package/dist/chunk-FR6RGA3B.js.map +1 -0
  152. package/dist/chunk-FW23JYNQ.js +454 -0
  153. package/dist/chunk-FW23JYNQ.js.map +1 -0
  154. package/dist/chunk-GBCENOLN.js +1575 -0
  155. package/dist/chunk-GBCENOLN.js.map +1 -0
  156. package/dist/chunk-HL7HUJIX.js +1 -0
  157. package/dist/chunk-HL7HUJIX.js.map +1 -0
  158. package/dist/chunk-HULCUY35.js +2508 -0
  159. package/dist/chunk-HULCUY35.js.map +1 -0
  160. package/dist/chunk-IHTWQEDR.js +169 -0
  161. package/dist/chunk-IHTWQEDR.js.map +1 -0
  162. package/dist/chunk-IJRR6YAI.js +128 -0
  163. package/dist/chunk-IJRR6YAI.js.map +1 -0
  164. package/dist/chunk-JGFRAFDL.js +221 -0
  165. package/dist/chunk-JGFRAFDL.js.map +1 -0
  166. package/dist/chunk-KIIXR252.js +211 -0
  167. package/dist/chunk-KIIXR252.js.map +1 -0
  168. package/dist/chunk-KN3H5CNT.js +11 -0
  169. package/dist/chunk-KN3H5CNT.js.map +1 -0
  170. package/dist/chunk-KPG3DGLA.js +1 -0
  171. package/dist/chunk-KPG3DGLA.js.map +1 -0
  172. package/dist/chunk-KRNQ6RGQ.js +1 -0
  173. package/dist/chunk-KRNQ6RGQ.js.map +1 -0
  174. package/dist/chunk-LBAJK24K.js +1071 -0
  175. package/dist/chunk-LBAJK24K.js.map +1 -0
  176. package/dist/chunk-MLTPJMH6.js +417 -0
  177. package/dist/chunk-MLTPJMH6.js.map +1 -0
  178. package/dist/chunk-N3SZ7BMH.js +95 -0
  179. package/dist/chunk-N3SZ7BMH.js.map +1 -0
  180. package/dist/chunk-NDUD3IMO.js +540 -0
  181. package/dist/chunk-NDUD3IMO.js.map +1 -0
  182. package/dist/chunk-NY2PYHNC.js +873 -0
  183. package/dist/chunk-NY2PYHNC.js.map +1 -0
  184. package/dist/chunk-O3MT7DYI.js +225 -0
  185. package/dist/chunk-O3MT7DYI.js.map +1 -0
  186. package/dist/chunk-OCUDSN63.js +2386 -0
  187. package/dist/chunk-OCUDSN63.js.map +1 -0
  188. package/dist/chunk-OIWU3NYV.js +199 -0
  189. package/dist/chunk-OIWU3NYV.js.map +1 -0
  190. package/dist/chunk-OO5BM6CJ.js +1153 -0
  191. package/dist/chunk-OO5BM6CJ.js.map +1 -0
  192. package/dist/chunk-OQUIJT7A.js +1 -0
  193. package/dist/chunk-OQUIJT7A.js.map +1 -0
  194. package/dist/chunk-P5LBT622.js +105 -0
  195. package/dist/chunk-P5LBT622.js.map +1 -0
  196. package/dist/chunk-PKGQG5QQ.js +519 -0
  197. package/dist/chunk-PKGQG5QQ.js.map +1 -0
  198. package/dist/chunk-PKPO3JTZ.js +561 -0
  199. package/dist/chunk-PKPO3JTZ.js.map +1 -0
  200. package/dist/chunk-PL5UDIQ5.js +118 -0
  201. package/dist/chunk-PL5UDIQ5.js.map +1 -0
  202. package/dist/chunk-PZWISPIQ.js +432 -0
  203. package/dist/chunk-PZWISPIQ.js.map +1 -0
  204. package/dist/chunk-Q3EYOCZB.js +510 -0
  205. package/dist/chunk-Q3EYOCZB.js.map +1 -0
  206. package/dist/chunk-QMBYUVRL.js +15 -0
  207. package/dist/chunk-QMBYUVRL.js.map +1 -0
  208. package/dist/chunk-RAGGHLCV.js +200 -0
  209. package/dist/chunk-RAGGHLCV.js.map +1 -0
  210. package/dist/chunk-RGL53X5G.js +574 -0
  211. package/dist/chunk-RGL53X5G.js.map +1 -0
  212. package/dist/chunk-RJOG4IJU.js +1039 -0
  213. package/dist/chunk-RJOG4IJU.js.map +1 -0
  214. package/dist/chunk-SOOKUYVM.js +403 -0
  215. package/dist/chunk-SOOKUYVM.js.map +1 -0
  216. package/dist/chunk-T5BN5KG7.js +1 -0
  217. package/dist/chunk-T5BN5KG7.js.map +1 -0
  218. package/dist/chunk-TP7244Y6.js +207 -0
  219. package/dist/chunk-TP7244Y6.js.map +1 -0
  220. package/dist/chunk-TSBFTJKM.js +57 -0
  221. package/dist/chunk-TSBFTJKM.js.map +1 -0
  222. package/dist/chunk-URQ2CBBF.js +143 -0
  223. package/dist/chunk-URQ2CBBF.js.map +1 -0
  224. package/dist/chunk-W2BOPXTI.js +1 -0
  225. package/dist/chunk-W2BOPXTI.js.map +1 -0
  226. package/dist/chunk-WKSWLSCX.js +207 -0
  227. package/dist/chunk-WKSWLSCX.js.map +1 -0
  228. package/dist/chunk-Y52CS6YA.js +88 -0
  229. package/dist/chunk-Y52CS6YA.js.map +1 -0
  230. package/dist/chunk-YCBUWK77.js +92 -0
  231. package/dist/chunk-YCBUWK77.js.map +1 -0
  232. package/dist/chunk-YJ4U2D2C.js +314 -0
  233. package/dist/chunk-YJ4U2D2C.js.map +1 -0
  234. package/dist/chunk-Z4YXAUDN.js +239 -0
  235. package/dist/chunk-Z4YXAUDN.js.map +1 -0
  236. package/dist/chunk-Z6EGP5D7.js +92 -0
  237. package/dist/chunk-Z6EGP5D7.js.map +1 -0
  238. package/dist/compat/index.cjs +3100 -9
  239. package/dist/compat/index.cjs.map +1 -0
  240. package/dist/compat/index.d.cts +112 -18
  241. package/dist/compat/index.d.ts +112 -18
  242. package/dist/compat/index.js +176 -1
  243. package/dist/compat/index.js.map +1 -0
  244. package/dist/compat/jotai/index.cjs +149 -1
  245. package/dist/compat/jotai/index.cjs.map +1 -0
  246. package/dist/compat/jotai/index.d.cts +2 -2
  247. package/dist/compat/jotai/index.d.ts +2 -2
  248. package/dist/compat/jotai/index.js +8 -1
  249. package/dist/compat/jotai/index.js.map +1 -0
  250. package/dist/compat/nanostores/index.cjs +205 -1
  251. package/dist/compat/nanostores/index.cjs.map +1 -0
  252. package/dist/compat/nanostores/index.d.cts +2 -2
  253. package/dist/compat/nanostores/index.d.ts +2 -2
  254. package/dist/compat/nanostores/index.js +22 -1
  255. package/dist/compat/nanostores/index.js.map +1 -0
  256. package/dist/compat/nestjs/index.cjs +2241 -9
  257. package/dist/compat/nestjs/index.cjs.map +1 -0
  258. package/dist/compat/nestjs/index.d.cts +7 -10
  259. package/dist/compat/nestjs/index.d.ts +7 -10
  260. package/dist/compat/nestjs/index.js +78 -1
  261. package/dist/compat/nestjs/index.js.map +1 -0
  262. package/dist/compat/react/index.cjs +114 -1
  263. package/dist/compat/react/index.cjs.map +1 -0
  264. package/dist/compat/react/index.d.cts +2 -2
  265. package/dist/compat/react/index.d.ts +2 -2
  266. package/dist/compat/react/index.js +12 -1
  267. package/dist/compat/react/index.js.map +1 -0
  268. package/dist/compat/solid/index.cjs +101 -1
  269. package/dist/compat/solid/index.cjs.map +1 -0
  270. package/dist/compat/solid/index.d.cts +2 -2
  271. package/dist/compat/solid/index.d.ts +2 -2
  272. package/dist/compat/solid/index.js +12 -1
  273. package/dist/compat/solid/index.js.map +1 -0
  274. package/dist/compat/svelte/index.cjs +104 -1
  275. package/dist/compat/svelte/index.cjs.map +1 -0
  276. package/dist/compat/svelte/index.d.cts +2 -2
  277. package/dist/compat/svelte/index.d.ts +2 -2
  278. package/dist/compat/svelte/index.js +12 -1
  279. package/dist/compat/svelte/index.js.map +1 -0
  280. package/dist/compat/vue/index.cjs +119 -1
  281. package/dist/compat/vue/index.cjs.map +1 -0
  282. package/dist/compat/vue/index.d.cts +2 -2
  283. package/dist/compat/vue/index.d.ts +2 -2
  284. package/dist/compat/vue/index.js +12 -1
  285. package/dist/compat/vue/index.js.map +1 -0
  286. package/dist/compat/zustand/index.cjs +69 -3
  287. package/dist/compat/zustand/index.cjs.map +1 -0
  288. package/dist/compat/zustand/index.d.cts +2 -6
  289. package/dist/compat/zustand/index.d.ts +2 -6
  290. package/dist/compat/zustand/index.js +8 -1
  291. package/dist/compat/zustand/index.js.map +1 -0
  292. package/dist/distill-De6Rnn15.d.cts +48 -0
  293. package/dist/distill-De6Rnn15.d.ts +48 -0
  294. package/dist/external-register-CWyroXb_.d.cts +138 -0
  295. package/dist/external-register-CWyroXb_.d.ts +138 -0
  296. package/dist/{fallback-74oxi34l.d.cts → fallback-Bx46zqky.d.cts} +3 -10
  297. package/dist/{fallback-DUyyBTBK.d.ts → fallback-pIWW8A2d.d.ts} +3 -10
  298. package/dist/guarded-execution-BcdtxeBk.d.ts +207 -0
  299. package/dist/guarded-execution-C-3hnP6A.d.cts +207 -0
  300. package/dist/{index-CBGUK09R.d.ts → index-5SU_O78r.d.cts} +5 -5
  301. package/dist/{index-BmZXHqkE.d.ts → index-B6pxYJzO.d.cts} +1 -1
  302. package/dist/{index-hcDJ8PSI.d.cts → index-B6pxYJzO.d.ts} +1 -1
  303. package/dist/{index-C5stwKcw.d.cts → index-BFsng6v1.d.cts} +1 -1
  304. package/dist/{index-CdAlHFEt.d.ts → index-BFsng6v1.d.ts} +1 -1
  305. package/dist/{index-_6ODbuOu.d.cts → index-Bg-LwEt-.d.cts} +1 -1
  306. package/dist/{index-CviRnE4K.d.ts → index-Bg-LwEt-.d.ts} +1 -1
  307. package/dist/{index-CBBLl_rc.d.ts → index-Brp888t0.d.cts} +1 -1
  308. package/dist/{index-BQSKmbuG.d.cts → index-Brp888t0.d.ts} +1 -1
  309. package/dist/{index-sqkqlb1p.d.ts → index-CDfk6jHN.d.cts} +1 -1
  310. package/dist/{index-ZVQhLa2i.d.cts → index-CDfk6jHN.d.ts} +1 -1
  311. package/dist/{index-Climxqsu.d.cts → index-CEXCtYYJ.d.ts} +5 -5
  312. package/dist/index-DLAxYaN5.d.cts +169 -0
  313. package/dist/index-DLAxYaN5.d.ts +169 -0
  314. package/dist/{index-CK29LV56.d.cts → index-DeWbQzMe.d.cts} +1 -1
  315. package/dist/{index-CPQlGA29.d.ts → index-DeWbQzMe.d.ts} +1 -1
  316. package/dist/{index-BrPrLl4e.d.cts → index-dX9IzPqj.d.cts} +1 -1
  317. package/dist/{index-Dgl1HpPn.d.ts → index-dX9IzPqj.d.ts} +1 -1
  318. package/dist/index.cjs +25934 -191
  319. package/dist/index.cjs.map +1 -0
  320. package/dist/index.d.cts +58 -94
  321. package/dist/index.d.ts +58 -94
  322. package/dist/index.js +852 -1
  323. package/dist/index.js.map +1 -0
  324. package/dist/layout-types-B5aiHYgk.d.cts +72 -0
  325. package/dist/layout-types-B5aiHYgk.d.ts +72 -0
  326. package/dist/memory-composers-BryDrRBX.d.cts +529 -0
  327. package/dist/memory-composers-CVQqPYEV.d.ts +529 -0
  328. package/dist/{observable-DWjNfLvC.d.ts → observable-BXQoW1P-.d.cts} +1 -1
  329. package/dist/{observable-e3eiPPFy.d.cts → observable-BXQoW1P-.d.ts} +1 -1
  330. package/dist/{pipeline-graph-Sgj0gCwn.d.ts → pipeline-graph-Ce47CB6Y.d.cts} +13 -10
  331. package/dist/{pipeline-graph-CIKhynsF.d.cts → pipeline-graph-DXCwY9vG.d.ts} +13 -10
  332. package/dist/presets/ai/index.cjs +4377 -0
  333. package/dist/presets/ai/index.cjs.map +1 -0
  334. package/dist/presets/ai/index.d.cts +98 -0
  335. package/dist/presets/ai/index.d.ts +98 -0
  336. package/dist/presets/ai/index.js +54 -0
  337. package/dist/presets/ai/index.js.map +1 -0
  338. package/dist/presets/harness/index.cjs +5929 -0
  339. package/dist/presets/harness/index.cjs.map +1 -0
  340. package/dist/presets/harness/index.d.cts +566 -0
  341. package/dist/presets/harness/index.d.ts +566 -0
  342. package/dist/presets/harness/index.js +71 -0
  343. package/dist/presets/harness/index.js.map +1 -0
  344. package/dist/presets/index.cjs +9782 -0
  345. package/dist/presets/index.cjs.map +1 -0
  346. package/dist/presets/index.d.cts +28 -0
  347. package/dist/presets/index.d.ts +28 -0
  348. package/dist/presets/index.js +129 -0
  349. package/dist/presets/index.js.map +1 -0
  350. package/dist/presets/inspect/index.cjs +1087 -0
  351. package/dist/presets/inspect/index.cjs.map +1 -0
  352. package/dist/presets/inspect/index.d.cts +172 -0
  353. package/dist/presets/inspect/index.d.ts +172 -0
  354. package/dist/presets/inspect/index.js +21 -0
  355. package/dist/presets/inspect/index.js.map +1 -0
  356. package/dist/presets/resilience/index.cjs +1593 -0
  357. package/dist/presets/resilience/index.cjs.map +1 -0
  358. package/dist/presets/resilience/index.d.cts +205 -0
  359. package/dist/presets/resilience/index.d.ts +205 -0
  360. package/dist/presets/resilience/index.js +18 -0
  361. package/dist/presets/resilience/index.js.map +1 -0
  362. package/dist/rate-limiter-CEALq4N1.d.ts +559 -0
  363. package/dist/rate-limiter-DpVbSYdH.d.cts +559 -0
  364. package/dist/{reactive-layout-DOTs9P3X.d.ts → reactive-layout-fswlBUvX.d.cts} +19 -7
  365. package/dist/{reactive-layout-DgctbqZo.d.cts → reactive-layout-fswlBUvX.d.ts} +19 -7
  366. package/dist/retry-BDbRZ_gx.d.ts +125 -0
  367. package/dist/retry-DWuhjvsA.d.cts +125 -0
  368. package/dist/solutions/index.cjs +8200 -0
  369. package/dist/solutions/index.cjs.map +1 -0
  370. package/dist/solutions/index.d.cts +23 -0
  371. package/dist/solutions/index.d.ts +23 -0
  372. package/dist/solutions/index.js +55 -0
  373. package/dist/solutions/index.js.map +1 -0
  374. package/dist/spawnable-5mDY501F.d.cts +746 -0
  375. package/dist/spawnable-D3lR0oQu.d.ts +746 -0
  376. package/dist/status-U-rUI79b.d.cts +84 -0
  377. package/dist/status-U-rUI79b.d.ts +84 -0
  378. package/dist/timeout-U5O4ESK3.js +12 -0
  379. package/dist/timeout-U5O4ESK3.js.map +1 -0
  380. package/dist/{types-CWFysE9E.d.ts → types-BB5Lw-pB.d.cts} +3 -3
  381. package/dist/{types-C0_yquda.d.cts → types-BB5Lw-pB.d.ts} +3 -3
  382. package/dist/types-CJWIMJiZ.d.ts +548 -0
  383. package/dist/types-vCq7ShIm.d.cts +548 -0
  384. package/dist/utils/ai/browser.cjs +2169 -0
  385. package/dist/utils/ai/browser.cjs.map +1 -0
  386. package/dist/{patterns → utils}/ai/browser.d.cts +7 -5
  387. package/dist/{patterns → utils}/ai/browser.d.ts +7 -5
  388. package/dist/utils/ai/browser.js +255 -0
  389. package/dist/utils/ai/browser.js.map +1 -0
  390. package/dist/utils/ai/index.cjs +8468 -0
  391. package/dist/utils/ai/index.cjs.map +1 -0
  392. package/dist/{index-CR8QpwX8.d.ts → utils/ai/index.d.cts} +73 -976
  393. package/dist/{index-UPSiS-X7.d.cts → utils/ai/index.d.ts} +73 -976
  394. package/dist/utils/ai/index.js +173 -0
  395. package/dist/utils/ai/index.js.map +1 -0
  396. package/dist/utils/ai/node.cjs +648 -0
  397. package/dist/utils/ai/node.cjs.map +1 -0
  398. package/dist/{patterns → utils}/ai/node.d.cts +5 -7
  399. package/dist/{patterns → utils}/ai/node.d.ts +5 -7
  400. package/dist/utils/ai/node.js +84 -0
  401. package/dist/utils/ai/node.js.map +1 -0
  402. package/dist/utils/cqrs/index.cjs +1036 -0
  403. package/dist/utils/cqrs/index.cjs.map +1 -0
  404. package/dist/{index-CeFiHtAg.d.ts → utils/cqrs/index.d.cts} +7 -37
  405. package/dist/{index-B-_tFaqV.d.cts → utils/cqrs/index.d.ts} +7 -37
  406. package/dist/utils/cqrs/index.js +18 -0
  407. package/dist/utils/cqrs/index.js.map +1 -0
  408. package/dist/utils/demo-shell/index.cjs +865 -0
  409. package/dist/utils/demo-shell/index.cjs.map +1 -0
  410. package/dist/{index-B8YnZpIR.d.ts → utils/demo-shell/index.d.cts} +4 -16
  411. package/dist/{index-Cwv0KWcU.d.cts → utils/demo-shell/index.d.ts} +4 -16
  412. package/dist/utils/demo-shell/index.js +13 -0
  413. package/dist/utils/demo-shell/index.js.map +1 -0
  414. package/dist/utils/domain-templates/index.cjs +732 -0
  415. package/dist/utils/domain-templates/index.cjs.map +1 -0
  416. package/dist/{index-CzLVrjxn.d.ts → utils/domain-templates/index.d.cts} +3 -20
  417. package/dist/{index-BaQaY_IQ.d.cts → utils/domain-templates/index.d.ts} +3 -20
  418. package/dist/utils/domain-templates/index.js +17 -0
  419. package/dist/utils/domain-templates/index.js.map +1 -0
  420. package/dist/utils/graphspec/index.cjs +1174 -0
  421. package/dist/utils/graphspec/index.cjs.map +1 -0
  422. package/dist/{index-CMh5Rz1y.d.ts → utils/graphspec/index.d.cts} +106 -42
  423. package/dist/{index-CS0LTlB8.d.cts → utils/graphspec/index.d.ts} +106 -42
  424. package/dist/utils/graphspec/index.js +35 -0
  425. package/dist/utils/graphspec/index.js.map +1 -0
  426. package/dist/utils/harness/index.cjs +656 -0
  427. package/dist/utils/harness/index.cjs.map +1 -0
  428. package/dist/utils/harness/index.d.cts +542 -0
  429. package/dist/utils/harness/index.d.ts +542 -0
  430. package/dist/utils/harness/index.js +56 -0
  431. package/dist/utils/harness/index.js.map +1 -0
  432. package/dist/utils/index.cjs +17609 -0
  433. package/dist/utils/index.cjs.map +1 -0
  434. package/dist/utils/index.d.cts +96 -0
  435. package/dist/utils/index.d.ts +96 -0
  436. package/dist/utils/index.js +514 -0
  437. package/dist/utils/index.js.map +1 -0
  438. package/dist/utils/inspect/index.cjs +807 -0
  439. package/dist/utils/inspect/index.cjs.map +1 -0
  440. package/dist/utils/inspect/index.d.cts +123 -0
  441. package/dist/utils/inspect/index.d.ts +123 -0
  442. package/dist/utils/inspect/index.js +30 -0
  443. package/dist/utils/inspect/index.js.map +1 -0
  444. package/dist/utils/job-queue/index.cjs +717 -0
  445. package/dist/utils/job-queue/index.cjs.map +1 -0
  446. package/dist/{index-DisjX8a-.d.ts → utils/job-queue/index.d.cts} +5 -26
  447. package/dist/{index-DV_1YuVk.d.cts → utils/job-queue/index.d.ts} +5 -26
  448. package/dist/utils/job-queue/index.js +18 -0
  449. package/dist/utils/job-queue/index.js.map +1 -0
  450. package/dist/utils/memory/index.cjs +1451 -0
  451. package/dist/utils/memory/index.cjs.map +1 -0
  452. package/dist/{index-CZ3r5Rxp.d.ts → utils/memory/index.d.cts} +242 -34
  453. package/dist/{index-B17QddL1.d.cts → utils/memory/index.d.ts} +242 -34
  454. package/dist/utils/memory/index.js +19 -0
  455. package/dist/utils/memory/index.js.map +1 -0
  456. package/dist/utils/messaging/index.cjs +666 -0
  457. package/dist/utils/messaging/index.cjs.map +1 -0
  458. package/dist/utils/messaging/index.d.cts +562 -0
  459. package/dist/utils/messaging/index.d.ts +562 -0
  460. package/dist/utils/messaging/index.js +50 -0
  461. package/dist/utils/messaging/index.js.map +1 -0
  462. package/dist/utils/orchestration/index.cjs +876 -0
  463. package/dist/utils/orchestration/index.cjs.map +1 -0
  464. package/dist/utils/orchestration/index.d.cts +233 -0
  465. package/dist/utils/orchestration/index.d.ts +233 -0
  466. package/dist/utils/orchestration/index.js +19 -0
  467. package/dist/utils/orchestration/index.js.map +1 -0
  468. package/dist/utils/process/index.cjs +743 -0
  469. package/dist/utils/process/index.cjs.map +1 -0
  470. package/dist/{index-p09KSrTN.d.ts → utils/process/index.d.cts} +97 -44
  471. package/dist/{index-CasX6Pfq.d.cts → utils/process/index.d.ts} +97 -44
  472. package/dist/utils/process/index.js +14 -0
  473. package/dist/utils/process/index.js.map +1 -0
  474. package/dist/utils/reactive-layout/index.cjs +1607 -0
  475. package/dist/utils/reactive-layout/index.cjs.map +1 -0
  476. package/dist/{index-B5S8ULbU.d.ts → utils/reactive-layout/index.d.cts} +58 -81
  477. package/dist/{index-Dc4AYqrJ.d.cts → utils/reactive-layout/index.d.ts} +58 -81
  478. package/dist/utils/reactive-layout/index.js +52 -0
  479. package/dist/utils/reactive-layout/index.js.map +1 -0
  480. package/dist/utils/reduction/index.cjs +203 -0
  481. package/dist/utils/reduction/index.cjs.map +1 -0
  482. package/dist/{index-Byu-OpX_.d.ts → utils/reduction/index.d.cts} +6 -17
  483. package/dist/{index-tRCxuAXF.d.cts → utils/reduction/index.d.ts} +6 -17
  484. package/dist/utils/reduction/index.js +14 -0
  485. package/dist/utils/reduction/index.js.map +1 -0
  486. package/dist/utils/resilience/index.cjs +1617 -0
  487. package/dist/utils/resilience/index.cjs.map +1 -0
  488. package/dist/utils/resilience/index.d.cts +9 -0
  489. package/dist/utils/resilience/index.d.ts +9 -0
  490. package/dist/utils/resilience/index.js +44 -0
  491. package/dist/utils/resilience/index.js.map +1 -0
  492. package/dist/utils/surface/index.cjs +1070 -0
  493. package/dist/utils/surface/index.cjs.map +1 -0
  494. package/dist/{index-CYq8vAyV.d.ts → utils/surface/index.d.cts} +7 -58
  495. package/dist/{index-CSOmP7xT.d.cts → utils/surface/index.d.ts} +7 -58
  496. package/dist/utils/surface/index.js +30 -0
  497. package/dist/utils/surface/index.js.map +1 -0
  498. package/dist/utils/topology-view/index.cjs +620 -0
  499. package/dist/utils/topology-view/index.cjs.map +1 -0
  500. package/dist/utils/topology-view/index.d.cts +68 -0
  501. package/dist/utils/topology-view/index.d.ts +68 -0
  502. package/dist/utils/topology-view/index.js +11 -0
  503. package/dist/utils/topology-view/index.js.map +1 -0
  504. package/package.json +664 -584
  505. package/dist/backoff-HPZMEZNF.js +0 -1
  506. package/dist/chunk-2T7U5EU6.js +0 -1
  507. package/dist/chunk-3G5U5QNE.js +0 -5
  508. package/dist/chunk-4VVTGLXJ.js +0 -1
  509. package/dist/chunk-5M4CCMMD.js +0 -45
  510. package/dist/chunk-5QDBSZBV.js +0 -1
  511. package/dist/chunk-5XJ6B66J.js +0 -1
  512. package/dist/chunk-6QZNQS5B.js +0 -1
  513. package/dist/chunk-6X7AFUJV.js +0 -9
  514. package/dist/chunk-7K6PWTDQ.js +0 -1
  515. package/dist/chunk-7LIAPXJB.js +0 -1
  516. package/dist/chunk-7WPU3UHQ.js +0 -1
  517. package/dist/chunk-A5WCQ5NO.js +0 -1
  518. package/dist/chunk-APPIWSGD.js +0 -84
  519. package/dist/chunk-BEZWM2SY.js +0 -1
  520. package/dist/chunk-C72GO4IZ.js +0 -1
  521. package/dist/chunk-CB676TKJ.js +0 -1
  522. package/dist/chunk-CE6TI2TL.js +0 -1
  523. package/dist/chunk-CE72X3WO.js +0 -1
  524. package/dist/chunk-CK2E7BTU.js +0 -1
  525. package/dist/chunk-CLVB32RD.js +0 -1
  526. package/dist/chunk-CRVT7D2P.js +0 -1
  527. package/dist/chunk-D5RFJOZ2.js +0 -1
  528. package/dist/chunk-D7GPHKFH.js +0 -1
  529. package/dist/chunk-DHRX7JX4.js +0 -2
  530. package/dist/chunk-ESMPEKEV.js +0 -1
  531. package/dist/chunk-F672GV32.js +0 -1
  532. package/dist/chunk-FZMYDOWV.js +0 -1
  533. package/dist/chunk-GHBWHMRZ.js +0 -1
  534. package/dist/chunk-GLERH466.js +0 -1
  535. package/dist/chunk-GPW2V3RE.js +0 -1
  536. package/dist/chunk-HIDYF36O.js +0 -1
  537. package/dist/chunk-HITNVN6B.js +0 -3
  538. package/dist/chunk-HY4DJBA7.js +0 -5
  539. package/dist/chunk-KZIEYVXN.js +0 -1
  540. package/dist/chunk-L6NSJVJZ.js +0 -1
  541. package/dist/chunk-N4MQX6JU.js +0 -18
  542. package/dist/chunk-N7FHEL4D.js +0 -1
  543. package/dist/chunk-NTEURFZH.js +0 -1
  544. package/dist/chunk-OIVP6KFV.js +0 -1
  545. package/dist/chunk-OPHBU3LG.js +0 -1
  546. package/dist/chunk-OYQOZP2F.js +0 -5
  547. package/dist/chunk-PTZK576G.js +0 -1
  548. package/dist/chunk-QYADASLV.js +0 -1
  549. package/dist/chunk-ST7UXLWR.js +0 -1
  550. package/dist/chunk-SVY7VUYU.js +0 -1
  551. package/dist/chunk-TK3NWWD4.js +0 -1
  552. package/dist/chunk-TSOYJ743.js +0 -1
  553. package/dist/chunk-UNGSTR4X.js +0 -61
  554. package/dist/chunk-VIMF6LGM.js +0 -1
  555. package/dist/chunk-VJLMUKOI.js +0 -1
  556. package/dist/chunk-VN6RDSK2.js +0 -1
  557. package/dist/chunk-VV4N5P64.js +0 -1
  558. package/dist/chunk-W3I423PS.js +0 -1
  559. package/dist/chunk-WJR24TAG.js +0 -1
  560. package/dist/chunk-XTGKMHSW.js +0 -1
  561. package/dist/chunk-YBB7ZGTY.js +0 -1
  562. package/dist/chunk-Z4NPUARF.js +0 -1
  563. package/dist/chunk-ZGNQRPDT.js +0 -1
  564. package/dist/chunk-ZKPSFFKU.js +0 -1
  565. package/dist/chunk-ZLV5SQSX.js +0 -1
  566. package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
  567. package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
  568. package/dist/core/index.cjs +0 -1
  569. package/dist/core/index.d.cts +0 -3
  570. package/dist/core/index.d.ts +0 -3
  571. package/dist/core/index.js +0 -1
  572. package/dist/decay-BvOWTZ00.d.ts +0 -112
  573. package/dist/decay-CFlLvXUT.d.cts +0 -112
  574. package/dist/extra/browser.cjs +0 -1
  575. package/dist/extra/browser.d.cts +0 -4
  576. package/dist/extra/browser.d.ts +0 -4
  577. package/dist/extra/browser.js +0 -1
  578. package/dist/extra/index.cjs +0 -20
  579. package/dist/extra/index.d.cts +0 -17
  580. package/dist/extra/index.d.ts +0 -17
  581. package/dist/extra/index.js +0 -1
  582. package/dist/extra/node.cjs +0 -2
  583. package/dist/extra/node.js +0 -2
  584. package/dist/extra/operators.cjs +0 -1
  585. package/dist/extra/operators.d.cts +0 -958
  586. package/dist/extra/operators.d.ts +0 -958
  587. package/dist/extra/operators.js +0 -1
  588. package/dist/extra/reactive.cjs +0 -1
  589. package/dist/extra/reactive.d.cts +0 -353
  590. package/dist/extra/reactive.d.ts +0 -353
  591. package/dist/extra/reactive.js +0 -1
  592. package/dist/extra/render/index.cjs +0 -5
  593. package/dist/extra/render/index.js +0 -1
  594. package/dist/extra/sources.cjs +0 -3
  595. package/dist/extra/sources.js +0 -1
  596. package/dist/extra/storage-browser.cjs +0 -1
  597. package/dist/extra/storage-browser.d.cts +0 -37
  598. package/dist/extra/storage-browser.d.ts +0 -37
  599. package/dist/extra/storage-browser.js +0 -1
  600. package/dist/extra/storage-core.cjs +0 -1
  601. package/dist/extra/storage-core.d.cts +0 -28
  602. package/dist/extra/storage-core.d.ts +0 -28
  603. package/dist/extra/storage-core.js +0 -1
  604. package/dist/extra/storage-node.cjs +0 -1
  605. package/dist/extra/storage-node.d.cts +0 -2
  606. package/dist/extra/storage-node.d.ts +0 -2
  607. package/dist/extra/storage-node.js +0 -0
  608. package/dist/extra/storage-tiers-browser.cjs +0 -1
  609. package/dist/extra/storage-tiers-browser.d.cts +0 -120
  610. package/dist/extra/storage-tiers-browser.d.ts +0 -120
  611. package/dist/extra/storage-tiers-browser.js +0 -1
  612. package/dist/extra/storage-tiers-node.cjs +0 -1
  613. package/dist/extra/storage-tiers-node.d.cts +0 -210
  614. package/dist/extra/storage-tiers-node.d.ts +0 -210
  615. package/dist/extra/storage-tiers-node.js +0 -1
  616. package/dist/extra/storage-tiers.cjs +0 -1
  617. package/dist/extra/storage-tiers.d.cts +0 -412
  618. package/dist/extra/storage-tiers.d.ts +0 -412
  619. package/dist/extra/storage-tiers.js +0 -1
  620. package/dist/graph/index.cjs +0 -7
  621. package/dist/graph/index.d.cts +0 -7
  622. package/dist/graph/index.d.ts +0 -7
  623. package/dist/graph/index.js +0 -1
  624. package/dist/graph-CWvEUQAq.d.cts +0 -1861
  625. package/dist/graph-D9LFnda9.d.ts +0 -1861
  626. package/dist/index-5k1T6jl0.d.cts +0 -121
  627. package/dist/index-9770hRuQ.d.cts +0 -779
  628. package/dist/index-B1F8Enjf.d.ts +0 -704
  629. package/dist/index-BHskSB8v.d.ts +0 -3413
  630. package/dist/index-BIYAkbAi.d.cts +0 -26
  631. package/dist/index-BoJ5JHxI.d.ts +0 -557
  632. package/dist/index-BocU7pqs.d.ts +0 -779
  633. package/dist/index-BxNs2HB9.d.cts +0 -1858
  634. package/dist/index-C1T3d7V-.d.cts +0 -704
  635. package/dist/index-C5ri2Axc.d.cts +0 -301
  636. package/dist/index-C9l6OEBL.d.ts +0 -26
  637. package/dist/index-CC-AvFTy.d.cts +0 -557
  638. package/dist/index-CJF1URuX.d.ts +0 -121
  639. package/dist/index-CdTelp1M.d.ts +0 -202
  640. package/dist/index-Cj3WohTd.d.cts +0 -202
  641. package/dist/index-Co7uli2l.d.cts +0 -3413
  642. package/dist/index-D0aciIex.d.cts +0 -209
  643. package/dist/index-DHen9Klo.d.ts +0 -1858
  644. package/dist/index-Yq60JP3s.d.ts +0 -209
  645. package/dist/index-nozs3fFC.d.ts +0 -301
  646. package/dist/node-kK3CvTrR.d.cts +0 -1347
  647. package/dist/node-kK3CvTrR.d.ts +0 -1347
  648. package/dist/patterns/ai/browser.cjs +0 -8
  649. package/dist/patterns/ai/browser.js +0 -3
  650. package/dist/patterns/ai/index.cjs +0 -74
  651. package/dist/patterns/ai/index.d.cts +0 -20
  652. package/dist/patterns/ai/index.d.ts +0 -20
  653. package/dist/patterns/ai/index.js +0 -1
  654. package/dist/patterns/ai/node.cjs +0 -1
  655. package/dist/patterns/ai/node.js +0 -1
  656. package/dist/patterns/cqrs/index.cjs +0 -3
  657. package/dist/patterns/cqrs/index.d.cts +0 -8
  658. package/dist/patterns/cqrs/index.d.ts +0 -8
  659. package/dist/patterns/cqrs/index.js +0 -1
  660. package/dist/patterns/demo-shell/index.cjs +0 -5
  661. package/dist/patterns/demo-shell/index.d.cts +0 -7
  662. package/dist/patterns/demo-shell/index.d.ts +0 -7
  663. package/dist/patterns/demo-shell/index.js +0 -1
  664. package/dist/patterns/domain-templates/index.cjs +0 -3
  665. package/dist/patterns/domain-templates/index.d.cts +0 -6
  666. package/dist/patterns/domain-templates/index.d.ts +0 -6
  667. package/dist/patterns/domain-templates/index.js +0 -1
  668. package/dist/patterns/graphspec/index.cjs +0 -86
  669. package/dist/patterns/graphspec/index.d.cts +0 -8
  670. package/dist/patterns/graphspec/index.d.ts +0 -8
  671. package/dist/patterns/graphspec/index.js +0 -1
  672. package/dist/patterns/harness/index.cjs +0 -48
  673. package/dist/patterns/harness/index.d.cts +0 -13
  674. package/dist/patterns/harness/index.d.ts +0 -13
  675. package/dist/patterns/harness/index.js +0 -1
  676. package/dist/patterns/inspect/index.cjs +0 -3
  677. package/dist/patterns/inspect/index.d.cts +0 -9
  678. package/dist/patterns/inspect/index.d.ts +0 -9
  679. package/dist/patterns/inspect/index.js +0 -1
  680. package/dist/patterns/job-queue/index.cjs +0 -3
  681. package/dist/patterns/job-queue/index.d.cts +0 -9
  682. package/dist/patterns/job-queue/index.d.ts +0 -9
  683. package/dist/patterns/job-queue/index.js +0 -1
  684. package/dist/patterns/memory/index.cjs +0 -3
  685. package/dist/patterns/memory/index.d.cts +0 -8
  686. package/dist/patterns/memory/index.d.ts +0 -8
  687. package/dist/patterns/memory/index.js +0 -1
  688. package/dist/patterns/messaging/index.cjs +0 -3
  689. package/dist/patterns/messaging/index.d.cts +0 -7
  690. package/dist/patterns/messaging/index.d.ts +0 -7
  691. package/dist/patterns/messaging/index.js +0 -1
  692. package/dist/patterns/orchestration/index.cjs +0 -3
  693. package/dist/patterns/orchestration/index.d.cts +0 -8
  694. package/dist/patterns/orchestration/index.d.ts +0 -8
  695. package/dist/patterns/orchestration/index.js +0 -1
  696. package/dist/patterns/process/index.cjs +0 -3
  697. package/dist/patterns/process/index.d.cts +0 -10
  698. package/dist/patterns/process/index.d.ts +0 -10
  699. package/dist/patterns/process/index.js +0 -1
  700. package/dist/patterns/reactive-layout/index.cjs +0 -4
  701. package/dist/patterns/reactive-layout/index.d.cts +0 -7
  702. package/dist/patterns/reactive-layout/index.d.ts +0 -7
  703. package/dist/patterns/reactive-layout/index.js +0 -1
  704. package/dist/patterns/reduction/index.cjs +0 -3
  705. package/dist/patterns/reduction/index.d.cts +0 -6
  706. package/dist/patterns/reduction/index.d.ts +0 -6
  707. package/dist/patterns/reduction/index.js +0 -1
  708. package/dist/patterns/surface/index.cjs +0 -13
  709. package/dist/patterns/surface/index.d.cts +0 -9
  710. package/dist/patterns/surface/index.d.ts +0 -9
  711. package/dist/patterns/surface/index.js +0 -1
  712. package/dist/reactive-log-BKALbfal.d.ts +0 -223
  713. package/dist/reactive-log-DIGdYqQ6.d.cts +0 -223
  714. package/dist/reactive-map-CEFGp8TK.d.cts +0 -296
  715. package/dist/reactive-map-DS_SIAxv.d.ts +0 -296
  716. package/dist/resilience-6LYQJAC5.js +0 -1
  717. package/dist/sugar-DQjFmVqb.d.cts +0 -399
  718. package/dist/sugar-fhLIE7TT.d.ts +0 -399
  719. package/dist/topology-tree-Bcz27hpF.d.cts +0 -25
  720. package/dist/topology-tree-xvaD0fOX.d.ts +0 -25
@@ -1,124 +0,0 @@
1
- import { KvStorageTier } from './extra/storage-tiers.js';
2
-
3
- /**
4
- * Content-addressed storage substrate — a generic lookup / store helper over
5
- * any {@link StorageTier}. Hashes an arbitrary context object via
6
- * {@link canonicalJson} + sha256 to produce a stable key, then reads or writes
7
- * the record from the underlying tier.
8
- *
9
- * Substrate shared by LLM adapters (`withReplayCache`, `fallbackAdapter`) —
10
- * the LLM-specific shape (key prefix, `ChatMessage` + `LLMInvokeOptions`
11
- * context) lives in a thin wrapper inside `patterns/ai/adapters/_internal/`.
12
- * Any consumer that wants "memoize by content hash over a pluggable tier"
13
- * (tool result caches, embedding caches, deterministic function memoization,
14
- * fixtures for replay tests) can use this primitive directly.
15
- *
16
- * Universal tier — browser + Node safe. `sha256Hex` is pulled from
17
- * `core/hash.ts` (Web Crypto), `canonicalJson` is a pure function in this
18
- * module.
19
- *
20
- * @module
21
- */
22
-
23
- /**
24
- * Read / write / read-write / read-strict.
25
- *
26
- * - `"read"` — lookups hit storage; misses fall through to the caller.
27
- * - `"write"` — store only; lookups always return `undefined`.
28
- * - `"read-write"` — lookups hit storage, misses are writable by the caller.
29
- * - `"read-strict"` — lookups hit storage, misses throw (no fallthrough).
30
- * Used by fixture-based replay flows where a missing fixture is a test bug.
31
- *
32
- * @category extra
33
- */
34
- type ContentAddressedMode = "read" | "write" | "read-write" | "read-strict";
35
- /** Error thrown when `read-strict` mode misses. */
36
- declare class ContentAddressedMissError extends Error {
37
- readonly key: string;
38
- readonly context: unknown;
39
- constructor(key: string, context: unknown);
40
- }
41
- /**
42
- * Options for {@link contentAddressedStorage}.
43
- *
44
- * @category extra
45
- */
46
- type ContentAddressedStorageOptions<Ctx> = {
47
- /** Underlying storage tier (any `KvStorageTier` — memoryKv, fileKv, indexedDbKv). */
48
- storage: KvStorageTier;
49
- /**
50
- * Derive the hashable context from `ctx`. Defaults to `ctx` itself.
51
- * Use when the caller's `ctx` carries fields that should NOT participate in
52
- * the key (e.g. an `AbortSignal`, a retry count).
53
- */
54
- keyContext?: (ctx: Ctx) => unknown;
55
- /**
56
- * Optional key prefix — applied as `${prefix}:${hex}` so multiple consumers
57
- * can share one storage tier without collisions.
58
- */
59
- keyPrefix?: string;
60
- /** Mode — see {@link ContentAddressedMode}. Default `"read-write"`. */
61
- mode?: ContentAddressedMode;
62
- };
63
- /**
64
- * Handle returned by {@link contentAddressedStorage}.
65
- *
66
- * @category extra
67
- */
68
- type ContentAddressedStorage<Ctx, V> = {
69
- /**
70
- * Compute the content-addressed key for `ctx` — useful when a caller needs
71
- * to thread the same key through a singleflight / dedup stage without
72
- * re-hashing.
73
- */
74
- keyFor(ctx: Ctx): Promise<string>;
75
- /**
76
- * Look up a value by hashing `ctx`. In `read-strict` mode, throws
77
- * {@link ContentAddressedMissError} on miss.
78
- */
79
- lookup(ctx: Ctx): Promise<V | undefined>;
80
- /** Store `value` under the hash of `ctx`. No-op in `"read"` mode. */
81
- store(ctx: Ctx, value: V): Promise<void>;
82
- /** Clear the entry for `ctx`. No-op in `"read"` or `"write"` mode, or when the tier lacks `clear()`. */
83
- forget(ctx: Ctx): Promise<void>;
84
- };
85
- /**
86
- * Canonical JSON — sorts object keys for stable sha256 while detecting true
87
- * cycles (not sibling shared refs).
88
- *
89
- * We recurse manually with a **path stack** (`seen` contains only the current
90
- * ancestor chain, not every previously-visited object). On enter we push; on
91
- * exit we pop. Back-edges to ancestors serialize as `{"__cycle": true}`;
92
- * siblings that share the same reference serialize normally, producing
93
- * identical hashes to a freshly-reconstructed equivalent.
94
- *
95
- * @category extra
96
- */
97
- declare function canonicalJson(value: unknown): string;
98
- /**
99
- * Creates a content-addressed lookup / store handle over `storage`. The key
100
- * is `sha256Hex(canonicalJson(keyContext(ctx)))`, optionally prefixed by
101
- * `keyPrefix`.
102
- *
103
- * @example
104
- * ```ts
105
- * import { contentAddressedStorage, memoryKv } from "@graphrefly/graphrefly-ts";
106
- *
107
- * const cache = contentAddressedStorage<{ query: string }, { answer: string }>({
108
- * storage: memoryKv(),
109
- * keyPrefix: "qa",
110
- * mode: "read-write",
111
- * });
112
- *
113
- * const hit = await cache.lookup({ query: "what is graphrefly?" });
114
- * if (!hit) {
115
- * const ans = await computeAnswer({ query: "what is graphrefly?" });
116
- * await cache.store({ query: "what is graphrefly?" }, { answer: ans.text });
117
- * }
118
- * ```
119
- *
120
- * @category extra
121
- */
122
- declare function contentAddressedStorage<Ctx, V>(opts: ContentAddressedStorageOptions<Ctx>): ContentAddressedStorage<Ctx, V>;
123
-
124
- export { ContentAddressedMissError as C, type ContentAddressedMode as a, type ContentAddressedStorage as b, type ContentAddressedStorageOptions as c, canonicalJson as d, contentAddressedStorage as e };
@@ -1 +0,0 @@
1
- "use strict";var ye=Object.defineProperty;var Qe=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.prototype.hasOwnProperty;var nt=(n,e)=>{for(var t in e)ye(n,t,{get:e[t],enumerable:!0})},st=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of et(e))!tt.call(n,r)&&r!==t&&ye(n,r,{get:()=>e[r],enumerable:!(s=Qe(e,r))||s.enumerable});return n};var rt=n=>st(ye({},"__esModule",{value:!0}),n);var yt={};nt(yt,{COMPLETE:()=>k,COMPLETE_MSG:()=>me,COMPLETE_ONLY_BATCH:()=>ce,DATA:()=>y,DEFAULT_ACTOR:()=>Ae,DIRTY:()=>w,DIRTY_MSG:()=>D,DIRTY_ONLY_BATCH:()=>Z,ERROR:()=>p,GraphReFlyConfig:()=>W,GuardDenied:()=>I,INVALIDATE:()=>x,INVALIDATE_MSG:()=>be,INVALIDATE_ONLY_BATCH:()=>de,NodeImpl:()=>V,PAUSE:()=>N,RESOLVED:()=>T,RESOLVED_MSG:()=>J,RESOLVED_ONLY_BATCH:()=>ae,RESUME:()=>F,START:()=>C,START_MSG:()=>X,TEARDOWN:()=>v,TEARDOWN_MSG:()=>ve,TEARDOWN_ONLY_BATCH:()=>Q,accessHintForGuard:()=>ct,advanceVersion:()=>ue,autoTrackNode:()=>qe,batch:()=>De,configure:()=>Le,createVersioning:()=>te,defaultConfig:()=>G,defaultHash:()=>ee,derived:()=>he,derivedT:()=>$e,downWithBatch:()=>U,dynamicNode:()=>Ke,effect:()=>ke,effectT:()=>Ye,factoryTag:()=>Be,isBatching:()=>oe,isV1:()=>Fe,monotonicNs:()=>Re,node:()=>H,normalizeActor:()=>Y,pipe:()=>Je,placeholderArgs:()=>Ue,policy:()=>Se,policyFromRules:()=>at,producer:()=>ze,registerBuiltins:()=>le,resolveDescribeFields:()=>Pe,state:()=>je,wallClockNs:()=>ie});module.exports=rt(yt);var Ae={type:"system",id:""};function Y(n){if(n==null)return Ae;let{type:e,id:t,...s}=n;return{type:e??"system",id:t??"",...s}}var L=0,K=!1,O=[],S=[],P=[],q=[];function oe(){return L>0||K}function Ee(){return L>0}function Me(n){L>0?q.push(n):n()}function De(n){L+=1;let e=!1;try{n()}catch(t){throw e=!0,t}finally{if(L-=1,L===0)if(e){if(!K){let t=q.splice(0);for(let s of t)try{s()}catch{}O.length=0,S.length=0,P.length=0}}else ot()}}function ot(){let n=!K;n&&(K=!0);let e=[],t=0;try{for(;O.length>0||S.length>0||P.length>0||n&&q.length>0;){if(n&&q.length>0){let i=q.splice(0);for(let a of i)try{a()}catch(o){e.push(o)}continue}if(t+=1,t>1e3)throw O.length=0,S.length=0,P.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let r=(O.length>0?O:S.length>0?S:P).splice(0);for(let i of r)try{i()}catch(a){e.push(a)}}}finally{n&&(K=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function U(n,e,t){if(e.length===0)return;if(e.length===1){let c=t(e[0][0]);if(c<3||!oe()){n(e);return}(c>=5?P:c===4?S:O).push(()=>n(e));return}let s=e.length,r=s,i=s,a=s,o=0;for(;o<s&&t(e[o][0])<3;)o++;for(r=o;o<s&&t(e[o][0])===3;)o++;for(i=o;o<s&&t(e[o][0])===4;)o++;a=o;let d=oe();if(r>0){let c=e.slice(0,r);n(c)}if(i>r){let c=e.slice(r,i);d?O.push(()=>n(c)):n(c)}if(a>i){let c=e.slice(i,a);d?S.push(()=>n(c)):n(c)}if(s>a){let c=e.slice(a,s);d?P.push(()=>n(c)):n(c)}}function Re(){return Math.trunc(performance.now()*1e6)}function ie(){return Date.now()*1e6}var C=Symbol.for("graphrefly/START"),y=Symbol.for("graphrefly/DATA"),w=Symbol.for("graphrefly/DIRTY"),T=Symbol.for("graphrefly/RESOLVED"),x=Symbol.for("graphrefly/INVALIDATE"),N=Symbol.for("graphrefly/PAUSE"),F=Symbol.for("graphrefly/RESUME"),v=Symbol.for("graphrefly/TEARDOWN"),k=Symbol.for("graphrefly/COMPLETE"),p=Symbol.for("graphrefly/ERROR"),D=Object.freeze([w]),J=Object.freeze([T]),be=Object.freeze([x]),X=Object.freeze([C]),me=Object.freeze([k]),ve=Object.freeze([v]),Z=Object.freeze([D]),ae=Object.freeze([J]),de=Object.freeze([be]),ce=Object.freeze([me]),Q=Object.freeze([ve]);var W=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=t=>{let s=this._messageTypes.get(t);return s!=null?s.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,t){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:t.tier,wireCrossing:t.wireCrossing??t.tier>=3,metaPassthrough:t.metaPassthrough??!0}),this}messageTier(e){let t=this._messageTypes.get(e);return t!=null?t.tier:1}isWireCrossing(e){let t=this._messageTypes.get(e);return t!=null?t.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let t=this._messageTypes.get(e);return t!=null?t.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}};function le(n){n.registerMessageType(C,{tier:0,wireCrossing:!1}),n.registerMessageType(w,{tier:1,wireCrossing:!1}),n.registerMessageType(x,{tier:1,wireCrossing:!1,metaPassthrough:!1}),n.registerMessageType(N,{tier:2,wireCrossing:!1}),n.registerMessageType(F,{tier:2,wireCrossing:!1}),n.registerMessageType(y,{tier:3,wireCrossing:!0}),n.registerMessageType(T,{tier:3,wireCrossing:!0}),n.registerMessageType(k,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(p,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(v,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var I=class extends Error{actor;action;nodeName;constructor(e,t){super(t??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}};function Oe(n){return Array.isArray(n)?[...n]:[n]}function it(n,e){return n.has(e)||n.has("*")}function Se(n){let e=[];return n((r,i)=>{e.push({kind:"allow",actions:new Set(Oe(r)),where:i?.where??(()=>!0)})},(r,i)=>{e.push({kind:"deny",actions:new Set(Oe(r)),where:i?.where??(()=>!0)})}),(r,i)=>{let a=!1,o=!1;for(let d of e)it(d.actions,i)&&d.where(r)&&(d.kind==="deny"?a=!0:o=!0);return a?!1:o}}function at(n){return Se((e,t)=>{for(let s of n){let r=s.actorType==null?null:new Set(Array.isArray(s.actorType)?s.actorType:[s.actorType]),i=s.actorId==null?null:new Set(Array.isArray(s.actorId)?s.actorId:[s.actorId]),a=Object.entries(s.claims??{}),o=d=>{if(r!==null&&!r.has(String(d.type))||i!==null&&!i.has(String(d.id??"")))return!1;for(let[c,l]of a)if(d[c]!==l)return!1;return!0};s.effect==="deny"?t(s.action,{where:o}):e(s.action,{where:o})}})}var dt=["human","llm","wallet","system"];function ct(n){let e=dt.filter(t=>n({type:t,id:""},"write"));return e.length===0?"restricted":e.includes("human")&&e.includes("llm")&&e.every(t=>t==="human"||t==="llm"||t==="system")?"both":e.length===1?e[0]:e.join("+")}var lt={name:"json",version:1,contentType:"application/json",encode(n){let e=JSON.stringify(n);return new TextEncoder().encode(e)},decode(n,e){let t=new TextDecoder().decode(n);return JSON.parse(t)}};function Ce(n){n.registerCodec(lt)}function we(n){if(n===void 0)return null;if(typeof n=="number"){if(!Number.isFinite(n))throw new TypeError(`Cannot hash non-finite number: ${n}`);if(Number.isInteger(n)&&!Number.isSafeInteger(n))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${n}. Cross-language cid parity is not guaranteed for unsafe integers.`);return n}if(typeof n=="string"||typeof n=="boolean"||n===null)return n;if(Array.isArray(n))return n.map(we);if(typeof n=="object"&&n!==null){let e={};for(let t of Object.keys(n).sort())e[t]=we(n[t]);return e}return null}var ut=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ft=new TextEncoder;function ht(n){let e=ft.encode(n),t=e.length,s=t*8,r=t+9+63&-64,i=new Uint8Array(r);i.set(e),i[t]=128;let a=new DataView(i.buffer);a.setUint32(r-4,s>>>0,!1),a.setUint32(r-8,Math.floor(s/4294967296)>>>0,!1);let o=1779033703,d=3144134277,c=1013904242,l=2773480762,f=1359893119,g=2600822924,u=528734635,_=1541459225,R=new Uint32Array(64),m=(E,b)=>E>>>b|E<<32-b;for(let E=0;E<r;E+=64){for(let h=0;h<16;h++)R[h]=a.getUint32(E+h*4,!1);for(let h=16;h<64;h++){let z=R[h-15],$=R[h-2],re=m(z,7)^m(z,18)^z>>>3,_e=m($,17)^m($,19)^$>>>10;R[h]=R[h-16]+re+R[h-7]+_e>>>0}let b=o,B=d,j=c,pe=l,M=f,ne=g,se=u,ge=_;for(let h=0;h<64;h++){let z=m(M,6)^m(M,11)^m(M,25),$=M&ne^~M&se,re=ge+z+$+ut[h]+R[h]>>>0,_e=m(b,2)^m(b,13)^m(b,22),Xe=b&B^b&j^B&j,Ze=_e+Xe>>>0;ge=se,se=ne,ne=M,M=pe+re>>>0,pe=j,j=B,B=b,b=re+Ze>>>0}o=o+b>>>0,d=d+B>>>0,c=c+j>>>0,l=l+pe>>>0,f=f+M>>>0,g=g+ne>>>0,u=u+se>>>0,_=_+ge>>>0}let A=E=>E.toString(16).padStart(8,"0");return A(o)+A(d)+A(c)+A(l)+A(f)+A(g)+A(u)+A(_)}function ee(n){let e=we(n??null),t=JSON.stringify(e);return ht(t).slice(0,16)}function pt(){let n=globalThis.crypto;if(n?.randomUUID)return n.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),t=e()+e()+e()+e();return`${t.slice(0,8)}-${t.slice(8,12)}-4${t.slice(13,16)}-${(parseInt(t.slice(16,17),16)&3|8).toString(16)}${t.slice(17,20)}-${t.slice(20,32)}`}function te(n,e,t){let s=t?.id??pt();if(n===0)return{id:s,version:0};let i=(t?.hash??ee)(e);return{id:s,version:0,cid:i,prev:null}}function ue(n,e,t){n.version+=1,"cid"in n&&(n.prev=n.cid,n.cid=t(e))}function Fe(n){return"cid"in n}var Ie=()=>{},Ge=100;function Ve(n){return{node:n,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function Te(n){n.prevData=void 0,n.dirty=!1,n.involvedThisWave=!1,n.dataBatch.length=0,n.terminal=void 0}function fe(n){return n.length===0?n:typeof n[0]=="symbol"?[n]:n}var gt=(n,e,t,s)=>{t.direction==="down-in"&&n._onDepMessage(t.depIndex,e)},_t=(n,e,t,s)=>{let r=n;if(r._status==="completed"||r._status==="errored")return;let i=r._cached,a=i===void 0?[X]:[X,[y,i]];r._status==="dirty"&&a.push(D),U(e,a,r._config.tierOf)},G=new W({onMessage:gt,onSubscribe:_t});le(G);Ce(G);function Le(n){if(G._isFrozen())throw new Error("configure() called after a node was created \u2014 the default GraphReFlyConfig is frozen. Call configure(...) at application startup, before any node factories run.");n(G)}var V=class n{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,t,s){this._config=s.config??G,this._config.onMessage,this._optsName=s.name,this._describeKind=s.describeKind,this._equals=s.equals??Object.is,this._resubscribable=s.resubscribable??!1,this._resetOnTeardown=s.resetOnTeardown??!1,this._autoComplete=s.completeWhenDepsComplete??!0,this._autoError=s.errorWhenDepsError??!0,this._pausable=s.pausable??!0,this._guard=s.guard,this._fn=t,this._partial=s.partial??!1,this._cached=s.initial!==void 0?s.initial:void 0,this._status=e.length===0&&t==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=s.versioningHash??this._config.defaultHashFn??ee;let r=s.versioning??this._config.defaultVersioning;this._versioningLevel=r,this._versioning=r!=null?te(r,this._cached===void 0?void 0:this._cached,{id:s.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Ve);let i={};for(let[o,d]of Object.entries(s.meta??{})){let c={initial:d,name:`${s.name??"node"}:meta:${o}`,describeKind:"state",config:this._config};s.guard!=null&&(c.guard=s.guard),s.resubscribable===!0&&(c.resubscribable=!0),i[o]=new n([],void 0,c)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(o){a._emit([[y,o]])},down(o){a._emit(fe(o))},up(o){a._emitUp(fe(o))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,t){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let s=this._versioningLevel;if(s!=null&&e<=s)return;let r=t?.hash??this._hashFn;r!==this._hashFn&&(this._hashFn=r);let i=this._cached===void 0?void 0:this._cached,a=this._versioning,o=a?.id??t?.id,d=a?.version??0,c=te(e,i,{id:o,hash:r});c.version=d,this._versioning=c,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let t=Y(e);if(this._guard!=null&&!this._guard(t,"observe"))return!1;if(this._extraGuards!=null){for(let s of this._extraGuards)if(!s(t,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let t=this._guard!=null||this._extraGuards!=null,s=e?.actor!=null;if(!t&&!s)return;let r=Y(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(r,i))throw new I({actor:r,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(r,i))throw new I({actor:r,action:i,nodeName:this.name})}this._lastMutation={actor:r,timestamp_ns:ie()}}down(e,t){let s=fe(e);s.length!==0&&(this._checkGuard(t),this._emit(s))}emit(e,t){this._checkGuard(t),this._emit([[y,e]])}up(e,t){if(this._deps.length===0)return;let s=fe(e);if(s.length===0)return;this._checkGuard(t);let r=t??{internal:!0};this._validateUpTiers(s);for(let i of this._deps)i.node.up?.(s,r)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let t of this._deps)t.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let t=this._config.tierOf;for(let s of e){let r=t(s[0]);if(r===3||r===4)throw new Error(`Node "${this.name}": tier-${r} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,t){if(t!=null&&this._guard!=null){let d=Y(t);if(!this._guard(d,"observe"))throw new I({actor:d,action:"observe",nodeName:this.name})}let r=this._isTerminal&&this._resubscribable;if(r){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let d of this._deps)Te(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:r},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let a=this._isTerminal;if(this._sinkCount===1&&!a)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let o=!1;return()=>{o||(o=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[t]=this._sinks;this._sinks=t}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,t=0;try{for(let s=0;s<e;s++){let r=s,i=this._deps[s];i.unsub=Ie,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let o=this._config.tierOf,d=!1;for(let c of a)o(c[0])>=3&&(d=!0),this._config.onMessage(this,c,{direction:"down-in",depIndex:r},this._actions);d&&this._maybeRunFnOnSettlement()}),t++}}catch(s){this._deps[t].unsub=null;for(let r=0;r<t;r++){let i=this._deps[r];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}Te(i)}}throw this._dirtyDepCount=0,s}}_addDep(e){for(let r=0;r<this._deps.length;r++)if(this._deps[r].node===e)return r;let t=this._deps.length,s=Ve(e);if(this._deps.push(s),this._sinks==null)return t;s.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z),s.unsub=Ie;try{s.unsub=e.subscribe(r=>{if(s.unsub===null)return;let i=this._config.tierOf,a=!1;for(let o of r)i(o[0])>=3&&(a=!0),this._config.onMessage(this,o,{direction:"down-in",depIndex:t},this._actions);a&&this._maybeRunFnOnSettlement()})}catch(r){throw s.unsub=null,this._deps.pop(),this._dirtyDepCount--,r}return t}_deactivate(e=!1){let t=this._cleanup;if(this._cleanup=void 0,typeof t=="function")try{t()}catch(s){this._emit([[p,this._wrapFnError("cleanup threw",s)]])}else if(t!=null&&typeof t=="object"){let s=t.deactivate;if(typeof s=="function")try{s()}catch(r){this._emit([[p,this._wrapFnError("cleanup.deactivate threw",r)]])}}for(let s of this._deps){if(s.unsub!=null){let r=s.unsub;s.unsub=null;try{r()}catch{}}Te(s)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,t){let s=this._deps[e],r=t[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:t};for(let a of this._inspectorHooks)a(i)}if(r!==C){if(r===w){this._depDirtied(s);return}if(r===x){if(this._depInvalidated(s),this._cached===void 0)return;this._emit(de);return}if(r===N||r===F){this._emit([t]);return}if(r===v){this._emit(Q);return}if(r===y)this._depSettledAsData(s,t[1]);else if(r===T)this._depSettledAsResolved(s);else if(r===k)this._depSettledAsTerminal(s,!0);else if(r===p)this._depSettledAsTerminal(s,t[1]);else{this._emit([t]);return}if(!this._fn){(r===y||r===T)&&this._emit([t]),(r===k||r===p)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z))}_depSettledAsData(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(t),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=t,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let t=this._deps[e];if(t.dataBatch.length===0&&t.prevData===void 0&&t.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(ae),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(t=>t.terminal!==void 0&&t.terminal!==!0);if(e!=null){this._autoError&&this._emit([[p,e.terminal]]);return}this._autoComplete&&this._deps.every(t=>t.terminal!==void 0)&&this._emit(ce)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(a){this._emit([[p,this._wrapFnError("cleanup threw",a)]]);return}}else if(e!=null&&typeof e=="object"){let a=e.beforeRun;if(typeof a=="function"){e.beforeRun=void 0;try{a()}catch(o){this._emit([[p,this._wrapFnError("cleanup.beforeRun threw",o)]]);return}}}let t=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),s=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let o=t[a];o!=null&&o.length>0&&(this._deps[a].prevData=o[o.length-1])}let r=this._deps.map(a=>a.terminal),i={prevData:s,terminalDeps:r,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:t,prevData:s};for(let o of this._inspectorHooks)o(a)}this._isExecutingFn=!0;try{let a=this._fn(t,this._actions,i);if(typeof a=="function")this._cleanup=a;else if(a!=null&&typeof a=="object"){let o=a;(typeof o.beforeRun=="function"||typeof o.deactivate=="function"||typeof o.invalidate=="function")&&(this._cleanup=a)}}catch(a){this._emit([[p,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Ge?(this._rerunDepth=0,this._emit([[p,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Ge} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,t){let s=t instanceof Error?t.message:String(t);return new Error(`Node "${this.name}": ${e}: ${s}`,{cause:t})}_frameBatch(e){let t=this._config.tierOf;if(e.length===1)return t(e[0][0])===3&&this._status!=="dirty"?[D,e[0]]:e;let s=!0,r=!1,i=!1,a=-1;for(let d of e){let c=t(d[0]);c<a&&(s=!1),c===3&&(r=!0),d[0]===w&&(i=!0),a=c}let o=e;if(!s){let d=e.map((c,l)=>({m:c,i:l,tier:t(c[0])}));d.sort((c,l)=>c.tier-l.tier||c.i-l.i),o=d.map(c=>c.m)}if(r&&!i&&this._status!=="dirty"){let d=0;for(;d<o.length&&t(o[d][0])===0;)d++;return d===0?[D,...o]:[...o.slice(0,d),D,...o.slice(d)]}return o}_emit(e){if(e.length===0)return;for(let o=0;o<e.length;o++){let d=e[o];if(d[0]===p&&d[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let t=e;if(this._isTerminal&&!this._resubscribable){let o=e.filter(d=>d[0]===v||d[0]===x);if(o.length===0)return;t=o}t=this._frameBatch(t);let r=null;for(let o=0;o<t.length;o++){let d=t[o],c=d[0];if(c!==N&&c!==F){r?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${c===N?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let l=!0;if(this._pausable!==!1){let f=d[1];if(c===N)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(f),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(f))l=!1;else if(this._pauseLocks.delete(f),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let g=this._pauseBuffer;this._pauseBuffer=[],this._emit(g)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}l?r?.push(d):r==null&&(r=t.slice(0,o))}if(r!=null){if(r.length===0)return;t=r}if(this._hasMeta&&t.some(o=>o[0]===v))for(let o of Object.keys(this.meta))try{this.meta[o]._emit(Q)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(t);if(i.length>0&&this._config.inspectorEnabled){let o=this._config.globalInspector;if(o!=null)try{o({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let o=this._config.tierOf,d=[];for(let c of i)o(c[0])===3?this._pauseBuffer.push(c):d.push(c);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[p,a]])}_updateState(e){let t=this._config.tierOf,s,r,i=-1,a=0;for(let l of e)t(l[0])===3&&a++;let o=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let l=e.length-1;l>=0;l--)if(e[l][0]===y){d=l;break}}for(let l=0;l<e.length;l++){let f=e[l],g=f[0];if(g===y){if(f.length>=2){let u=!1;if(o&&this._cached!==void 0)try{u=this._equals(this._cached,f[1])}catch(_){r=this._wrapFnError("equals threw",_),i=l;break}if(u){s==null&&(s=e.slice(0,l)),s.push(J),this._status="resolved";continue}this._cached=f[1],this._versioning!=null&&(d<0||l===d)&&ue(this._versioning,f[1],this._hashFn)}this._status="settled",s?.push(f)}else if(s?.push(f),g===w)this._status="dirty";else if(g===T)this._status="resolved";else if(g===k){this._status="completed";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===p){this._status="errored";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===x){if(this._cached!==void 0){let _=this._config.rigorRecorder;if(_!=null)try{_.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let u=this._cleanup;if(typeof u=="function"){this._cleanup=void 0;try{u()}catch{}}else if(u!=null&&typeof u=="object"){let _=u.invalidate;if(typeof _=="function")try{_()}catch{}}}else g===v&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let c=i>=0?s??e.slice(0,i):s??e;return r!=null?{finalMessages:c,equalsError:r}:{finalMessages:c}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let t=[...this._sinks];for(let s of t)s(e)};_dispatchOrAccumulate(e){if(Ee()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],Me(()=>this._flushBatchPending()));for(let t of e)this._batchPendingMessages.push(t);return}U(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let t=this._frameBatch(e);U(this._deliverToSinks,t,this._config.tierOf)}},He=n=>Array.isArray(n),xe=n=>typeof n=="object"&&n!=null&&!Array.isArray(n);function H(n,e,t){let s=He(n)?n:[],r=typeof n=="function"?n:typeof e=="function"?e:void 0,i={};return He(n)?i=(xe(e)?e:t)??{}:xe(n)?i=n:i=(xe(e)?e:t)??{},new V(s,r,i)}function Pe(n,e){if(e!=null&&e.length>0)return new Set(e);switch(n){case"standard":return new Set(["type","status","value","deps","meta","v"]);case"full":return null;case"spec":return new Set(["type","deps","meta","value"]);default:return new Set(["type","deps"])}}function Ue(n){let e=new WeakSet,t={};for(let[s,r]of We(n))t[s]=Ne(r,e);return t}function Ne(n,e){if(n==null)return n;let t=typeof n;if(t==="boolean"||t==="number"||t==="string")return n;if(t==="function")return"<function>";if(Array.isArray(n))return e.has(n)?"<cycle>":(e.add(n),n.map(s=>Ne(s,e)));if(t==="object"){let s=n;if(e.has(s))return"<cycle>";e.add(s);try{if(typeof s.subscribe=="function"&&"cache"in s)return"<Node>"}catch{return"<unserializable>"}let r={};for(let[i,a]of We(s))r[i]=Ne(a,e);return r}return"<unserializable>"}function We(n){let e=[],t;try{t=Object.keys(n)}catch{return e}for(let s of t)try{e.push([s,n[s]])}catch{e.push([s,"<unserializable>"])}return e}function Be(n,e){let t={factory:n};return e!==void 0&&(t.factoryArgs=e),t}function je(n,e){return H([],{...e,initial:n})}function ze(n,e){return H((s,r,i)=>n(r,i)??void 0,{describeKind:"producer",...e})}function he(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);i.emit(e(o,a))},{describeKind:"derived",...t})}function $e(n,e,t){return he(n,e,t)}function Ye(n,e,t){return ke(n,e,t)}function ke(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);return e(o,i,a)??void 0},{describeKind:"effect",...t})}function Ke(n,e,t){let s=new Map;return n.forEach((r,i)=>{s.set(r,i)}),he(n,(r,i)=>e(o=>{let d=s.get(o);if(d==null)throw new Error(`dynamicNode: untracked dep "${o.name??"<unnamed>"}"`);return r[d]},i),t)}function qe(n,e){let t,s=new Map,r=(i,a,o)=>{let d=!1,c=l=>{let f=s.get(l);if(f!==void 0){if(f<i.length){let u=i[f];return u!=null&&u.length>0?u.at(-1):o.prevData[f]}return l.cache}d=!0;let g=t._addDep(l);return s.set(l,g),l.cache};try{let l=n(c,o);d||(a.emit(l),o.store.__autoTrackLastDiscoveryError!=null&&delete o.store.__autoTrackLastDiscoveryError)}catch(l){if(!d)throw l;o.store.__autoTrackLastDiscoveryError=l}};return t=new V([],r,{describeKind:"derived",...e}),t}function Je(n,...e){let t=n;for(let s of e)t=s(t);return t}0&&(module.exports={COMPLETE,COMPLETE_MSG,COMPLETE_ONLY_BATCH,DATA,DEFAULT_ACTOR,DIRTY,DIRTY_MSG,DIRTY_ONLY_BATCH,ERROR,GraphReFlyConfig,GuardDenied,INVALIDATE,INVALIDATE_MSG,INVALIDATE_ONLY_BATCH,NodeImpl,PAUSE,RESOLVED,RESOLVED_MSG,RESOLVED_ONLY_BATCH,RESUME,START,START_MSG,TEARDOWN,TEARDOWN_MSG,TEARDOWN_ONLY_BATCH,accessHintForGuard,advanceVersion,autoTrackNode,batch,configure,createVersioning,defaultConfig,defaultHash,derived,derivedT,downWithBatch,dynamicNode,effect,effectT,factoryTag,isBatching,isV1,monotonicNs,node,normalizeActor,pipe,placeholderArgs,policy,policyFromRules,producer,registerBuiltins,resolveDescribeFields,state,wallClockNs});
@@ -1,3 +0,0 @@
1
- export { A as Actor, C as COMPLETE, d as COMPLETE_MSG, e as COMPLETE_ONLY_BATCH, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DIRTY_MSG, i as DIRTY_ONLY_BATCH, j as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, k as GlobalInspectorHook, l as GraphReFlyConfig, m as GuardAction, n as GuardDenied, o as GuardDeniedDetails, H as HashFn, I as INVALIDATE, p as INVALIDATE_MSG, q as INVALIDATE_ONLY_BATCH, r as Message, s as MessageContext, t as MessageTypeRegistration, u as MessageTypeRegistrationInput, M as Messages, N as Node, c as NodeActions, v as NodeCtx, w as NodeDescribeKind, x as NodeFn, y as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, W as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from '../node-kK3CvTrR.cjs';
2
- export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-Cj3WohTd.cjs';
3
- export { A as AutoTrackOptions, a as DerivedFn, b as DerivedTFn, c as DescribeDetail, d as DescribeField, D as DescribeNodeOutput, e as DynamicFn, E as EffectFn, f as EffectTFn, N as NodeValues, P as PipeOperator, g as ProducerFn, T as TrackFn, h as autoTrackNode, i as derived, j as derivedT, k as dynamicNode, l as effect, m as effectT, n as factoryTag, p as pipe, o as placeholderArgs, q as producer, r as resolveDescribeFields, s as state } from '../sugar-DQjFmVqb.cjs';
@@ -1,3 +0,0 @@
1
- export { A as Actor, C as COMPLETE, d as COMPLETE_MSG, e as COMPLETE_ONLY_BATCH, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DIRTY_MSG, i as DIRTY_ONLY_BATCH, j as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, k as GlobalInspectorHook, l as GraphReFlyConfig, m as GuardAction, n as GuardDenied, o as GuardDeniedDetails, H as HashFn, I as INVALIDATE, p as INVALIDATE_MSG, q as INVALIDATE_ONLY_BATCH, r as Message, s as MessageContext, t as MessageTypeRegistration, u as MessageTypeRegistrationInput, M as Messages, N as Node, c as NodeActions, v as NodeCtx, w as NodeDescribeKind, x as NodeFn, y as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, W as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from '../node-kK3CvTrR.js';
2
- export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-CdTelp1M.js';
3
- export { A as AutoTrackOptions, a as DerivedFn, b as DerivedTFn, c as DescribeDetail, d as DescribeField, D as DescribeNodeOutput, e as DynamicFn, E as EffectFn, f as EffectTFn, N as NodeValues, P as PipeOperator, g as ProducerFn, T as TrackFn, h as autoTrackNode, i as derived, j as derivedT, k as dynamicNode, l as effect, m as effectT, n as factoryTag, p as pipe, o as placeholderArgs, q as producer, r as resolveDescribeFields, s as state } from '../sugar-fhLIE7TT.js';
@@ -1 +0,0 @@
1
- import"../chunk-KZIEYVXN.js";import{a as Z,b as _,c as $}from"../chunk-GHBWHMRZ.js";import{A as M,B as N,C as O,D as P,E as Q,F as R,G as S,H as T,I as U,J as V,K as W,L as X,M as Y,i as v,j as w,k as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,u as G,v as H,w as I,x as J,y as K,z as L}from"../chunk-NTEURFZH.js";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{i as COMPLETE,o as COMPLETE_MSG,t as COMPLETE_ONLY_BATCH,b as DATA,v as DEFAULT_ACTOR,c as DIRTY,k as DIRTY_MSG,q as DIRTY_ONLY_BATCH,j as ERROR,C as GraphReFlyConfig,E as GuardDenied,e as INVALIDATE,m as INVALIDATE_MSG,s as INVALIDATE_ONLY_BATCH,O as NodeImpl,f as PAUSE,d as RESOLVED,l as RESOLVED_MSG,r as RESOLVED_ONLY_BATCH,g as RESUME,a as START,n as START_MSG,h as TEARDOWN,p as TEARDOWN_MSG,u as TEARDOWN_ONLY_BATCH,H as accessHintForGuard,K as advanceVersion,X as autoTrackNode,y as batch,N as configure,J as createVersioning,M as defaultConfig,I as defaultHash,S as derived,T as derivedT,z as downWithBatch,W as dynamicNode,V as effect,U as effectT,$ as factoryTag,x as isBatching,L as isV1,A as monotonicNs,P as node,w as normalizeActor,Y as pipe,_ as placeholderArgs,F as policy,G as policyFromRules,R as producer,D as registerBuiltins,Z as resolveDescribeFields,Q as state,B as wallClockNs};
@@ -1,112 +0,0 @@
1
- import { N as Node, a as NodeOptions } from './node-kK3CvTrR.js';
2
- import { R as ReactiveMapBundle, b as ReactiveMapOptions } from './reactive-map-DS_SIAxv.js';
3
- import { NodeInput } from './extra/sources.js';
4
-
5
- /**
6
- * Composite data patterns (roadmap §3.2b).
7
- *
8
- * These helpers compose existing primitives (`node`, `switchMap`, `reactiveMap`,
9
- * `dynamicNode`, `fromAny`) without introducing new protocol semantics.
10
- */
11
-
12
- /**
13
- * Verification payload shape is intentionally user-defined.
14
- */
15
- type VerifyValue = unknown;
16
- type VerifiableOptions<TVerify = VerifyValue> = Omit<NodeOptions, "describeKind" | "initial"> & {
17
- /** Reactive re-verification trigger. */
18
- trigger?: NodeInput<unknown>;
19
- /** Re-run verification whenever `source` settles. */
20
- autoVerify?: boolean;
21
- /** Initial verification companion value. */
22
- initialVerified?: TVerify | null;
23
- };
24
- type VerifiableBundle<T, TVerify = VerifyValue> = {
25
- /** Coerced source node. */
26
- node: Node<T>;
27
- /** Latest verification result (`null` before first verification). */
28
- verified: Node<TVerify | null>;
29
- /** Effective trigger node used for verification, if any. */
30
- trigger: Node<unknown> | null;
31
- };
32
- /**
33
- * Composes a value node with a reactive verification companion.
34
- *
35
- * Uses `switchMap` so newer triggers cancel stale in-flight verification work.
36
- */
37
- declare function verifiable<T, TVerify = VerifyValue>(source: NodeInput<T>, verifyFn: (value: T) => NodeInput<TVerify>, opts?: VerifiableOptions<TVerify>): VerifiableBundle<T, TVerify>;
38
- type Extraction<TMem> = {
39
- upsert: Array<{
40
- key: string;
41
- value: TMem;
42
- }>;
43
- remove?: string[];
44
- };
45
- type DistillOptions<TMem> = {
46
- score: (mem: TMem, context: unknown) => number;
47
- cost: (mem: TMem) => number;
48
- budget?: number;
49
- evict?: (key: string, mem: TMem) => boolean | Node<boolean>;
50
- consolidate?: (entries: ReadonlyMap<string, TMem>) => NodeInput<Extraction<TMem>>;
51
- consolidateTrigger?: NodeInput<unknown>;
52
- context?: NodeInput<unknown>;
53
- mapOptions?: ReactiveMapOptions<string, TMem>;
54
- };
55
- type DistillBundle<TMem> = {
56
- store: ReactiveMapBundle<string, TMem>;
57
- compact: Node<Array<{
58
- key: string;
59
- value: TMem;
60
- score: number;
61
- }>>;
62
- size: Node<number>;
63
- };
64
- /**
65
- * Budget-constrained reactive memory composition.
66
- *
67
- * **Tier 1.5.4 (Session A.5 lock, 2026-04-27):** `extractFn` receives the
68
- * source and existing-store as `Node`s. Distill calls `extractFn` ONCE at
69
- * wiring time and consumes the returned stream of extractions. The user
70
- * controls reactive composition — wrap with `switchMap` for cancel-on-new-input,
71
- * `mergeMap` for parallel, `derived` for sync transforms. See COMPOSITION-GUIDE
72
- * §40 for the recipe.
73
- */
74
- declare function distill<TRaw, TMem>(source: NodeInput<TRaw>, extractFn: (raw: Node<TRaw>, existing: Node<ReadonlyMap<string, TMem>>) => NodeInput<Extraction<TMem>>, opts: DistillOptions<TMem>): DistillBundle<TMem>;
75
-
76
- /**
77
- * Pure exponential-decay utility (Tier 2.2 promotion from `patterns/memory/`).
78
- *
79
- * Used by `collection`, `agentMemory`, harness `strategy.ts`, and any
80
- * downstream consumer that needs decay-with-floor scoring. Promoted to
81
- * `extra/utils/` because the math has zero domain semantics and is reusable
82
- * by non-memory primitives (e.g. routing weight decay, retry-attempt aging).
83
- *
84
- * @module
85
- */
86
- /**
87
- * Default exponential-decay rate corresponding to a 7-day half-life.
88
- *
89
- * `Math.LN2 / (7 × 86_400)` ≈ `1.146e-6`. Imported by memory tiers + any
90
- * consumer that wants the same default cadence as `agentMemory`'s active
91
- * tier. Tier 4.4 (Wave AM Unit 1) — promoted from
92
- * `patterns/ai/memory/tiers.ts` so non-memory consumers can share the
93
- * canonical default without reaching across domains.
94
- */
95
- declare const DEFAULT_DECAY_RATE: number;
96
- /**
97
- * Exponential decay with floor: `score = max(minScore, baseScore * exp(-ratePerSecond * ageSeconds))`.
98
- *
99
- * Tolerant fallbacks (deliberate for use inside reactive derived fns):
100
- * - non-finite `baseScore` → `minScore`
101
- * - non-positive `ageSeconds` (incl. clock skew) → `max(minScore, baseScore)` (no decay)
102
- * - non-positive `ratePerSecond` → `max(minScore, baseScore)` (no decay; rate=0 disables)
103
- *
104
- * Underflow boundary: `Math.exp(-745) === 0`. For very long ages × rates the
105
- * result clamps to `minScore`; if you need slow decay over years, choose a
106
- * smaller `ratePerSecond` rather than relying on graceful underflow.
107
- *
108
- * Half-life conversion: `ratePerSecond = Math.LN2 / halfLifeSeconds`.
109
- */
110
- declare function decay(baseScore: number, ageSeconds: number, ratePerSecond: number, minScore?: number): number;
111
-
112
- export { type DistillBundle as D, type Extraction as E, type VerifiableBundle as V, type DistillOptions as a, type VerifiableOptions as b, type VerifyValue as c, decay as d, distill as e, DEFAULT_DECAY_RATE as f, verifiable as v };
@@ -1,112 +0,0 @@
1
- import { N as Node, a as NodeOptions } from './node-kK3CvTrR.cjs';
2
- import { R as ReactiveMapBundle, b as ReactiveMapOptions } from './reactive-map-CEFGp8TK.cjs';
3
- import { NodeInput } from './extra/sources.cjs';
4
-
5
- /**
6
- * Composite data patterns (roadmap §3.2b).
7
- *
8
- * These helpers compose existing primitives (`node`, `switchMap`, `reactiveMap`,
9
- * `dynamicNode`, `fromAny`) without introducing new protocol semantics.
10
- */
11
-
12
- /**
13
- * Verification payload shape is intentionally user-defined.
14
- */
15
- type VerifyValue = unknown;
16
- type VerifiableOptions<TVerify = VerifyValue> = Omit<NodeOptions, "describeKind" | "initial"> & {
17
- /** Reactive re-verification trigger. */
18
- trigger?: NodeInput<unknown>;
19
- /** Re-run verification whenever `source` settles. */
20
- autoVerify?: boolean;
21
- /** Initial verification companion value. */
22
- initialVerified?: TVerify | null;
23
- };
24
- type VerifiableBundle<T, TVerify = VerifyValue> = {
25
- /** Coerced source node. */
26
- node: Node<T>;
27
- /** Latest verification result (`null` before first verification). */
28
- verified: Node<TVerify | null>;
29
- /** Effective trigger node used for verification, if any. */
30
- trigger: Node<unknown> | null;
31
- };
32
- /**
33
- * Composes a value node with a reactive verification companion.
34
- *
35
- * Uses `switchMap` so newer triggers cancel stale in-flight verification work.
36
- */
37
- declare function verifiable<T, TVerify = VerifyValue>(source: NodeInput<T>, verifyFn: (value: T) => NodeInput<TVerify>, opts?: VerifiableOptions<TVerify>): VerifiableBundle<T, TVerify>;
38
- type Extraction<TMem> = {
39
- upsert: Array<{
40
- key: string;
41
- value: TMem;
42
- }>;
43
- remove?: string[];
44
- };
45
- type DistillOptions<TMem> = {
46
- score: (mem: TMem, context: unknown) => number;
47
- cost: (mem: TMem) => number;
48
- budget?: number;
49
- evict?: (key: string, mem: TMem) => boolean | Node<boolean>;
50
- consolidate?: (entries: ReadonlyMap<string, TMem>) => NodeInput<Extraction<TMem>>;
51
- consolidateTrigger?: NodeInput<unknown>;
52
- context?: NodeInput<unknown>;
53
- mapOptions?: ReactiveMapOptions<string, TMem>;
54
- };
55
- type DistillBundle<TMem> = {
56
- store: ReactiveMapBundle<string, TMem>;
57
- compact: Node<Array<{
58
- key: string;
59
- value: TMem;
60
- score: number;
61
- }>>;
62
- size: Node<number>;
63
- };
64
- /**
65
- * Budget-constrained reactive memory composition.
66
- *
67
- * **Tier 1.5.4 (Session A.5 lock, 2026-04-27):** `extractFn` receives the
68
- * source and existing-store as `Node`s. Distill calls `extractFn` ONCE at
69
- * wiring time and consumes the returned stream of extractions. The user
70
- * controls reactive composition — wrap with `switchMap` for cancel-on-new-input,
71
- * `mergeMap` for parallel, `derived` for sync transforms. See COMPOSITION-GUIDE
72
- * §40 for the recipe.
73
- */
74
- declare function distill<TRaw, TMem>(source: NodeInput<TRaw>, extractFn: (raw: Node<TRaw>, existing: Node<ReadonlyMap<string, TMem>>) => NodeInput<Extraction<TMem>>, opts: DistillOptions<TMem>): DistillBundle<TMem>;
75
-
76
- /**
77
- * Pure exponential-decay utility (Tier 2.2 promotion from `patterns/memory/`).
78
- *
79
- * Used by `collection`, `agentMemory`, harness `strategy.ts`, and any
80
- * downstream consumer that needs decay-with-floor scoring. Promoted to
81
- * `extra/utils/` because the math has zero domain semantics and is reusable
82
- * by non-memory primitives (e.g. routing weight decay, retry-attempt aging).
83
- *
84
- * @module
85
- */
86
- /**
87
- * Default exponential-decay rate corresponding to a 7-day half-life.
88
- *
89
- * `Math.LN2 / (7 × 86_400)` ≈ `1.146e-6`. Imported by memory tiers + any
90
- * consumer that wants the same default cadence as `agentMemory`'s active
91
- * tier. Tier 4.4 (Wave AM Unit 1) — promoted from
92
- * `patterns/ai/memory/tiers.ts` so non-memory consumers can share the
93
- * canonical default without reaching across domains.
94
- */
95
- declare const DEFAULT_DECAY_RATE: number;
96
- /**
97
- * Exponential decay with floor: `score = max(minScore, baseScore * exp(-ratePerSecond * ageSeconds))`.
98
- *
99
- * Tolerant fallbacks (deliberate for use inside reactive derived fns):
100
- * - non-finite `baseScore` → `minScore`
101
- * - non-positive `ageSeconds` (incl. clock skew) → `max(minScore, baseScore)` (no decay)
102
- * - non-positive `ratePerSecond` → `max(minScore, baseScore)` (no decay; rate=0 disables)
103
- *
104
- * Underflow boundary: `Math.exp(-745) === 0`. For very long ages × rates the
105
- * result clamps to `minScore`; if you need slow decay over years, choose a
106
- * smaller `ratePerSecond` rather than relying on graceful underflow.
107
- *
108
- * Half-life conversion: `ratePerSecond = Math.LN2 / halfLifeSeconds`.
109
- */
110
- declare function decay(baseScore: number, ageSeconds: number, ratePerSecond: number, minScore?: number): number;
111
-
112
- export { type DistillBundle as D, type Extraction as E, type VerifiableBundle as V, type DistillOptions as a, type VerifiableOptions as b, type VerifyValue as c, decay as d, distill as e, DEFAULT_DECAY_RATE as f, verifiable as v };
@@ -1 +0,0 @@
1
- "use strict";var J=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var He=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var We=(t,e)=>{for(var n in e)J(t,n,{get:e[n],enumerable:!0})},je=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of He(e))!Ue.call(t,o)&&o!==n&&J(t,o,{get:()=>e[o],enumerable:!(r=Be(e,o))||r.enumerable});return t};var ze=t=>je(J({},"__esModule",{value:!0}),t);var cn={};We(cn,{fromIDBRequest:()=>Me,fromIDBTransaction:()=>Oe,indexedDbAppendLog:()=>Pe,indexedDbBackend:()=>G,indexedDbKv:()=>Le,indexedDbSnapshot:()=>Ie});module.exports=ze(cn);var P=Symbol.for("graphrefly/START"),w=Symbol.for("graphrefly/DATA"),E=Symbol.for("graphrefly/DIRTY"),M=Symbol.for("graphrefly/RESOLVED"),O=Symbol.for("graphrefly/INVALIDATE"),D=Symbol.for("graphrefly/PAUSE"),L=Symbol.for("graphrefly/RESUME"),N=Symbol.for("graphrefly/TEARDOWN"),x=Symbol.for("graphrefly/COMPLETE"),y=Symbol.for("graphrefly/ERROR"),R=Object.freeze([E]),X=Object.freeze([M]),$e=Object.freeze([O]),Z=Object.freeze([P]),Ke=Object.freeze([x]),qe=Object.freeze([N]),Q=Object.freeze([R]),le=Object.freeze([X]),fe=Object.freeze([$e]),he=Object.freeze([Ke]),ee=Object.freeze([qe]);var Ye={name:"json",version:1,contentType:"application/json",encode(t){let e=JSON.stringify(t);return new TextEncoder().encode(e)},decode(t,e){let n=new TextDecoder().decode(t);return JSON.parse(n)}};function pe(t){t.registerCodec(Ye)}var Je={type:"system",id:""};function U(t){if(t==null)return Je;let{type:e,id:n,...r}=t;return{type:e??"system",id:n??"",...r}}var ne=0,Xe=!1,ge=[],ye=[],_e=[],Ze=[];function me(){return ne>0||Xe}function be(){return ne>0}function ve(t){ne>0?Ze.push(t):t()}function W(t,e,n){if(e.length===0)return;if(e.length===1){let c=n(e[0][0]);if(c<3||!me()){t(e);return}(c>=5?_e:c===4?ye:ge).push(()=>t(e));return}let r=e.length,o=r,i=r,a=r,s=0;for(;s<r&&n(e[s][0])<3;)s++;for(o=s;s<r&&n(e[s][0])===3;)s++;for(i=s;s<r&&n(e[s][0])===4;)s++;a=s;let d=me();if(o>0){let c=e.slice(0,o);t(c)}if(i>o){let c=e.slice(o,i);d?ge.push(()=>t(c)):t(c)}if(a>i){let c=e.slice(i,a);d?ye.push(()=>t(c)):t(c)}if(r>a){let c=e.slice(a,r);d?_e.push(()=>t(c)):t(c)}}function Te(){return Date.now()*1e6}var j=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=n=>{let r=this._messageTypes.get(n);return r!=null?r.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,n){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:n.tier,wireCrossing:n.wireCrossing??n.tier>=3,metaPassthrough:n.metaPassthrough??!0}),this}messageTier(e){let n=this._messageTypes.get(e);return n!=null?n.tier:1}isWireCrossing(e){let n=this._messageTypes.get(e);return n!=null?n.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let n=this._messageTypes.get(e);return n!=null?n.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}};function we(t){t.registerMessageType(P,{tier:0,wireCrossing:!1}),t.registerMessageType(E,{tier:1,wireCrossing:!1}),t.registerMessageType(O,{tier:1,wireCrossing:!1,metaPassthrough:!1}),t.registerMessageType(D,{tier:2,wireCrossing:!1}),t.registerMessageType(L,{tier:2,wireCrossing:!1}),t.registerMessageType(w,{tier:3,wireCrossing:!0}),t.registerMessageType(M,{tier:3,wireCrossing:!0}),t.registerMessageType(x,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(y,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(N,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var C=class extends Error{actor;action;nodeName;constructor(e,n){super(n??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}};function te(t){if(t===void 0)return null;if(typeof t=="number"){if(!Number.isFinite(t))throw new TypeError(`Cannot hash non-finite number: ${t}`);if(Number.isInteger(t)&&!Number.isSafeInteger(t))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${t}. Cross-language cid parity is not guaranteed for unsafe integers.`);return t}if(typeof t=="string"||typeof t=="boolean"||t===null)return t;if(Array.isArray(t))return t.map(te);if(typeof t=="object"&&t!==null){let e={};for(let n of Object.keys(t).sort())e[n]=te(t[n]);return e}return null}var Qe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),en=new TextEncoder;function nn(t){let e=en.encode(t),n=e.length,r=n*8,o=n+9+63&-64,i=new Uint8Array(o);i.set(e),i[n]=128;let a=new DataView(i.buffer);a.setUint32(o-4,r>>>0,!1),a.setUint32(o-8,Math.floor(r/4294967296)>>>0,!1);let s=1779033703,d=3144134277,c=1013904242,u=2773480762,h=1359893119,f=2600822924,l=528734635,p=1541459225,_=new Uint32Array(64),b=(g,T)=>g>>>T|g<<32-T;for(let g=0;g<o;g+=64){for(let m=0;m<16;m++)_[m]=a.getUint32(g+m*4,!1);for(let m=16;m<64;m++){let F=_[m-15],I=_[m-2],H=b(F,7)^b(F,18)^F>>>3,Y=b(I,17)^b(I,19)^I>>>10;_[m]=_[m-16]+H+_[m-7]+Y>>>0}let T=s,S=d,A=c,K=u,k=h,V=f,B=l,q=p;for(let m=0;m<64;m++){let F=b(k,6)^b(k,11)^b(k,25),I=k&V^~k&B,H=q+F+I+Qe[m]+_[m]>>>0,Y=b(T,2)^b(T,13)^b(T,22),Ge=T&S^T&A^S&A,Ve=Y+Ge>>>0;q=B,B=V,V=k,k=K+H>>>0,K=A,A=S,S=T,T=H+Ve>>>0}s=s+T>>>0,d=d+S>>>0,c=c+A>>>0,u=u+K>>>0,h=h+k>>>0,f=f+V>>>0,l=l+B>>>0,p=p+q>>>0}let v=g=>g.toString(16).padStart(8,"0");return v(s)+v(d)+v(c)+v(u)+v(h)+v(f)+v(l)+v(p)}function re(t){let e=te(t??null),n=JSON.stringify(e);return nn(n).slice(0,16)}function tn(){let t=globalThis.crypto;if(t?.randomUUID)return t.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),n=e()+e()+e()+e();return`${n.slice(0,8)}-${n.slice(8,12)}-4${n.slice(13,16)}-${(parseInt(n.slice(16,17),16)&3|8).toString(16)}${n.slice(17,20)}-${n.slice(20,32)}`}function oe(t,e,n){let r=n?.id??tn();if(t===0)return{id:r,version:0};let i=(n?.hash??re)(e);return{id:r,version:0,cid:i,prev:null}}function xe(t,e,n){t.version+=1,"cid"in t&&(t.prev=t.cid,t.cid=n(e))}var ke=()=>{},Ne=100;function Se(t){return{node:t,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function se(t){t.prevData=void 0,t.dirty=!1,t.involvedThisWave=!1,t.dataBatch.length=0,t.terminal=void 0}function z(t){return t.length===0?t:typeof t[0]=="symbol"?[t]:t}var rn=(t,e,n,r)=>{n.direction==="down-in"&&t._onDepMessage(n.depIndex,e)},on=(t,e,n,r)=>{let o=t;if(o._status==="completed"||o._status==="errored")return;let i=o._cached,a=i===void 0?[Z]:[Z,[w,i]];o._status==="dirty"&&a.push(R),W(e,a,o._config.tierOf)},ae=new j({onMessage:rn,onSubscribe:on});we(ae);pe(ae);var $=class t{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,n,r){this._config=r.config??ae,this._config.onMessage,this._optsName=r.name,this._describeKind=r.describeKind,this._equals=r.equals??Object.is,this._resubscribable=r.resubscribable??!1,this._resetOnTeardown=r.resetOnTeardown??!1,this._autoComplete=r.completeWhenDepsComplete??!0,this._autoError=r.errorWhenDepsError??!0,this._pausable=r.pausable??!0,this._guard=r.guard,this._fn=n,this._partial=r.partial??!1,this._cached=r.initial!==void 0?r.initial:void 0,this._status=e.length===0&&n==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=r.versioningHash??this._config.defaultHashFn??re;let o=r.versioning??this._config.defaultVersioning;this._versioningLevel=o,this._versioning=o!=null?oe(o,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Se);let i={};for(let[s,d]of Object.entries(r.meta??{})){let c={initial:d,name:`${r.name??"node"}:meta:${s}`,describeKind:"state",config:this._config};r.guard!=null&&(c.guard=r.guard),r.resubscribable===!0&&(c.resubscribable=!0),i[s]=new t([],void 0,c)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(s){a._emit([[w,s]])},down(s){a._emit(z(s))},up(s){a._emitUp(z(s))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,n){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let r=this._versioningLevel;if(r!=null&&e<=r)return;let o=n?.hash??this._hashFn;o!==this._hashFn&&(this._hashFn=o);let i=this._cached===void 0?void 0:this._cached,a=this._versioning,s=a?.id??n?.id,d=a?.version??0,c=oe(e,i,{id:s,hash:o});c.version=d,this._versioning=c,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let n=U(e);if(this._guard!=null&&!this._guard(n,"observe"))return!1;if(this._extraGuards!=null){for(let r of this._extraGuards)if(!r(n,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let n=this._guard!=null||this._extraGuards!=null,r=e?.actor!=null;if(!n&&!r)return;let o=U(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(o,i))throw new C({actor:o,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(o,i))throw new C({actor:o,action:i,nodeName:this.name})}this._lastMutation={actor:o,timestamp_ns:Te()}}down(e,n){let r=z(e);r.length!==0&&(this._checkGuard(n),this._emit(r))}emit(e,n){this._checkGuard(n),this._emit([[w,e]])}up(e,n){if(this._deps.length===0)return;let r=z(e);if(r.length===0)return;this._checkGuard(n);let o=n??{internal:!0};this._validateUpTiers(r);for(let i of this._deps)i.node.up?.(r,o)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let n of this._deps)n.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let n=this._config.tierOf;for(let r of e){let o=n(r[0]);if(o===3||o===4)throw new Error(`Node "${this.name}": tier-${o} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,n){if(n!=null&&this._guard!=null){let d=U(n);if(!this._guard(d,"observe"))throw new C({actor:d,action:"observe",nodeName:this.name})}let o=this._isTerminal&&this._resubscribable;if(o){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let d of this._deps)se(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:o},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let a=this._isTerminal;if(this._sinkCount===1&&!a)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let s=!1;return()=>{s||(s=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[n]=this._sinks;this._sinks=n}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,n=0;try{for(let r=0;r<e;r++){let o=r,i=this._deps[r];i.unsub=ke,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let s=this._config.tierOf,d=!1;for(let c of a)s(c[0])>=3&&(d=!0),this._config.onMessage(this,c,{direction:"down-in",depIndex:o},this._actions);d&&this._maybeRunFnOnSettlement()}),n++}}catch(r){this._deps[n].unsub=null;for(let o=0;o<n;o++){let i=this._deps[o];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}se(i)}}throw this._dirtyDepCount=0,r}}_addDep(e){for(let o=0;o<this._deps.length;o++)if(this._deps[o].node===e)return o;let n=this._deps.length,r=Se(e);if(this._deps.push(r),this._sinks==null)return n;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Q),r.unsub=ke;try{r.unsub=e.subscribe(o=>{if(r.unsub===null)return;let i=this._config.tierOf,a=!1;for(let s of o)i(s[0])>=3&&(a=!0),this._config.onMessage(this,s,{direction:"down-in",depIndex:n},this._actions);a&&this._maybeRunFnOnSettlement()})}catch(o){throw r.unsub=null,this._deps.pop(),this._dirtyDepCount--,o}return n}_deactivate(e=!1){let n=this._cleanup;if(this._cleanup=void 0,typeof n=="function")try{n()}catch(r){this._emit([[y,this._wrapFnError("cleanup threw",r)]])}else if(n!=null&&typeof n=="object"){let r=n.deactivate;if(typeof r=="function")try{r()}catch(o){this._emit([[y,this._wrapFnError("cleanup.deactivate threw",o)]])}}for(let r of this._deps){if(r.unsub!=null){let o=r.unsub;r.unsub=null;try{o()}catch{}}se(r)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,n){let r=this._deps[e],o=n[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:n};for(let a of this._inspectorHooks)a(i)}if(o!==P){if(o===E){this._depDirtied(r);return}if(o===O){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(fe);return}if(o===D||o===L){this._emit([n]);return}if(o===N){this._emit(ee);return}if(o===w)this._depSettledAsData(r,n[1]);else if(o===M)this._depSettledAsResolved(r);else if(o===x)this._depSettledAsTerminal(r,!0);else if(o===y)this._depSettledAsTerminal(r,n[1]);else{this._emit([n]);return}if(!this._fn){(o===w||o===M)&&this._emit([n]),(o===x||o===y)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Q))}_depSettledAsData(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(n),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=n,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let n=this._deps[e];if(n.dataBatch.length===0&&n.prevData===void 0&&n.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(le),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(n=>n.terminal!==void 0&&n.terminal!==!0);if(e!=null){this._autoError&&this._emit([[y,e.terminal]]);return}this._autoComplete&&this._deps.every(n=>n.terminal!==void 0)&&this._emit(he)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(a){this._emit([[y,this._wrapFnError("cleanup threw",a)]]);return}}else if(e!=null&&typeof e=="object"){let a=e.beforeRun;if(typeof a=="function"){e.beforeRun=void 0;try{a()}catch(s){this._emit([[y,this._wrapFnError("cleanup.beforeRun threw",s)]]);return}}}let n=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),r=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let s=n[a];s!=null&&s.length>0&&(this._deps[a].prevData=s[s.length-1])}let o=this._deps.map(a=>a.terminal),i={prevData:r,terminalDeps:o,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:n,prevData:r};for(let s of this._inspectorHooks)s(a)}this._isExecutingFn=!0;try{let a=this._fn(n,this._actions,i);if(typeof a=="function")this._cleanup=a;else if(a!=null&&typeof a=="object"){let s=a;(typeof s.beforeRun=="function"||typeof s.deactivate=="function"||typeof s.invalidate=="function")&&(this._cleanup=a)}}catch(a){this._emit([[y,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Ne?(this._rerunDepth=0,this._emit([[y,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Ne} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,n){let r=n instanceof Error?n.message:String(n);return new Error(`Node "${this.name}": ${e}: ${r}`,{cause:n})}_frameBatch(e){let n=this._config.tierOf;if(e.length===1)return n(e[0][0])===3&&this._status!=="dirty"?[R,e[0]]:e;let r=!0,o=!1,i=!1,a=-1;for(let d of e){let c=n(d[0]);c<a&&(r=!1),c===3&&(o=!0),d[0]===E&&(i=!0),a=c}let s=e;if(!r){let d=e.map((c,u)=>({m:c,i:u,tier:n(c[0])}));d.sort((c,u)=>c.tier-u.tier||c.i-u.i),s=d.map(c=>c.m)}if(o&&!i&&this._status!=="dirty"){let d=0;for(;d<s.length&&n(s[d][0])===0;)d++;return d===0?[R,...s]:[...s.slice(0,d),R,...s.slice(d)]}return s}_emit(e){if(e.length===0)return;for(let s=0;s<e.length;s++){let d=e[s];if(d[0]===y&&d[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let n=e;if(this._isTerminal&&!this._resubscribable){let s=e.filter(d=>d[0]===N||d[0]===O);if(s.length===0)return;n=s}n=this._frameBatch(n);let o=null;for(let s=0;s<n.length;s++){let d=n[s],c=d[0];if(c!==D&&c!==L){o?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${c===D?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let u=!0;if(this._pausable!==!1){let h=d[1];if(c===D)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(h),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(h))u=!1;else if(this._pauseLocks.delete(h),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let f=this._pauseBuffer;this._pauseBuffer=[],this._emit(f)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}u?o?.push(d):o==null&&(o=n.slice(0,s))}if(o!=null){if(o.length===0)return;n=o}if(this._hasMeta&&n.some(s=>s[0]===N))for(let s of Object.keys(this.meta))try{this.meta[s]._emit(ee)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(n);if(i.length>0&&this._config.inspectorEnabled){let s=this._config.globalInspector;if(s!=null)try{s({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let s=this._config.tierOf,d=[];for(let c of i)s(c[0])===3?this._pauseBuffer.push(c):d.push(c);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[y,a]])}_updateState(e){let n=this._config.tierOf,r,o,i=-1,a=0;for(let u of e)n(u[0])===3&&a++;let s=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let u=e.length-1;u>=0;u--)if(e[u][0]===w){d=u;break}}for(let u=0;u<e.length;u++){let h=e[u],f=h[0];if(f===w){if(h.length>=2){let l=!1;if(s&&this._cached!==void 0)try{l=this._equals(this._cached,h[1])}catch(p){o=this._wrapFnError("equals threw",p),i=u;break}if(l){r==null&&(r=e.slice(0,u)),r.push(X),this._status="resolved";continue}this._cached=h[1],this._versioning!=null&&(d<0||u===d)&&xe(this._versioning,h[1],this._hashFn)}this._status="settled",r?.push(h)}else if(r?.push(h),f===E)this._status="dirty";else if(f===M)this._status="resolved";else if(f===x){this._status="completed";{let l=this._config.rigorRecorder;if(l!=null)try{l.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===y){this._status="errored";{let l=this._config.rigorRecorder;if(l!=null)try{l.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===O){if(this._cached!==void 0){let p=this._config.rigorRecorder;if(p!=null)try{p.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let l=this._cleanup;if(typeof l=="function"){this._cleanup=void 0;try{l()}catch{}}else if(l!=null&&typeof l=="object"){let p=l.invalidate;if(typeof p=="function")try{p()}catch{}}}else f===N&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let c=i>=0?r??e.slice(0,i):r??e;return o!=null?{finalMessages:c,equalsError:o}:{finalMessages:c}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let n=[...this._sinks];for(let r of n)r(e)};_dispatchOrAccumulate(e){if(be()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],ve(()=>this._flushBatchPending()));for(let n of e)this._batchPendingMessages.push(n);return}W(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let n=this._frameBatch(e);W(this._deliverToSinks,n,this._config.tierOf)}},Ae=t=>Array.isArray(t),ie=t=>typeof t=="object"&&t!=null&&!Array.isArray(t);function Ee(t,e,n){let r=Ae(t)?t:[],o=typeof t=="function"?t:typeof e=="function"?e:void 0,i={};return Ae(t)?i=(ie(e)?e:n)??{}:ie(t)?i=t:i=(ie(e)?e:n)??{},new $(r,o,i)}function de(t,e){return Ee((r,o,i)=>t(o,i)??void 0,{describeKind:"producer",...e})}function Me(t){return de(e=>{let n=!1,r=()=>{t.onsuccess=null,t.onerror=null};return t.onsuccess=()=>{n||(n=!0,r(),e.down([[w,t.result],[x]]))},t.onerror=()=>{n||(n=!0,r(),e.down([[y,t.error??new Error("IndexedDB request failed")]]))},()=>{n=!0,r()}})}function Oe(t){return de(e=>{let n=!1,r=()=>{t.oncomplete=null,t.onerror=null,t.onabort=null};return t.oncomplete=()=>{n||(n=!0,r(),e.down([[w,void 0],[x]]))},t.onerror=()=>{n||(n=!0,r(),e.down([[y,t.error??new Error("IndexedDB transaction failed")]]))},t.onabort=()=>{n||(n=!0,r(),e.down([[y,t.error??new Error("IndexedDB transaction aborted")]]))},()=>{n=!0,r()}})}function ce(t){if(t===null||typeof t!="object")return t;if(Array.isArray(t))return t.map(ce);let e=t,n=Object.keys(e).sort(),r={};for(let o of n)r[o]=ce(e[o]);return r}function De(t){return JSON.stringify(ce(t),void 0,0)}var sn=new TextEncoder,an=new TextDecoder("utf-8",{fatal:!0}),ue={name:"json",version:1,encode(t){return sn.encode(De(t))},decode(t){return JSON.parse(an.decode(t))}};function Re(t,e={}){let n=e.codec??ue,r=e.name??t.name??"snapshot",o=e.keyOf??(h=>h.name??e.name??t.name??"snapshot"),i,a=0,s=e.compactEvery,d,c={name:r,debounceMs:e.debounceMs,compactEvery:s,filter:e.filter,keyOf:o,save(h){if(!(e.filter&&!e.filter(h))&&(i={snapshot:h},a+=1,s!==void 0&&a%s===0||!e.debounceMs))return u()},load(){let h=d??r,f=t.read(h);if(f!==void 0)return f instanceof Uint8Array?f.length===0?void 0:n.decode(f):Promise.resolve(f).then(l=>l===void 0||l.length===0?void 0:n.decode(l))},async flush(){await u()},async rollback(){i=void 0}};function u(){let h=i;if(!h)return;i=void 0;let f=o(h.snapshot),l=n.encode(h.snapshot),p=t.write(f,l);if(p instanceof Promise)return p.then(()=>{d=f});d=f}return c}function Ce(t,e={}){let n=e.codec??ue,r=e.name??t.name??"append-log",o=e.keyOf??(f=>r),i=e.compactEvery,a=new Map,s=0,d,c={name:r,debounceMs:e.debounceMs,compactEvery:i,keyOf:o,appendEntries(f){if(f.length!==0){for(let l of f){let p=o(l),_=a.get(p);_||(_=[],a.set(p,_)),_.push(l)}if(s+=f.length,i!==void 0&&s%i===0||!e.debounceMs)return u()}},async loadEntries(f){let l=f?.keyFilter,p=t.list===void 0?l!==void 0?[l]:[r]:await Promise.resolve(t.list(l)),_=[];for(let b of p){let v=await Promise.resolve(t.read(b));if(v===void 0||v.length===0)continue;let g=n.decode(v);Array.isArray(g)&&_.push(...g)}return{entries:_,cursor:void 0}},async flush(){await u()},async rollback(){a=new Map}};function u(){if(a.size===0)return;let f=a;a=new Map;let l=(d??Promise.resolve()).then(()=>{let p=h(f);return p instanceof Promise?p:Promise.resolve()},()=>{let p=h(f);return p instanceof Promise?p:Promise.resolve()});return d=l.finally(()=>{d===l&&(d=void 0)}),d}function h(f){let l=[];for(let[p,_]of f){let b=t.read(p),v=g=>{let S=[...g===void 0||g.length===0?[]:n.decode(g)??[],..._],A=n.encode(S);return t.write(p,A)};if(b instanceof Promise)l.push(b.then(async g=>{let T=v(g);T instanceof Promise&&await T}));else{let g=v(b);g instanceof Promise&&l.push(g)}}if(l.length>0)return Promise.all(l).then(()=>{})}return c}function Fe(t,e={}){let n=e.codec??ue,r=e.name??t.name??"kv",o=e.compactEvery,i=new Map,a=0,s={name:r,debounceMs:e.debounceMs,compactEvery:o,filter:e.filter,save(c,u){if(!(e.filter&&!e.filter(c,u))&&(i.set(c,u),a+=1,o!==void 0&&a%o===0||!e.debounceMs))return d()},load(c){let u=t.read(c);if(u!==void 0)return u instanceof Uint8Array?u.length===0?void 0:n.decode(u):Promise.resolve(u).then(h=>h===void 0||h.length===0?void 0:n.decode(h))},delete(c){if(i.delete(c),!!t.delete)return t.delete(c)},list(c){return t.list?t.list(c):[]},async flush(){await d()},async rollback(){i=new Map}};function d(){if(i.size===0)return;let c=i;i=new Map;let u=[];for(let[h,f]of c){let l=n.encode(f),p=t.write(h,l);p instanceof Promise&&u.push(p)}if(u.length>0)return Promise.all(u).then(()=>{})}return s}function dn(t){return new Promise((e,n)=>{if(typeof indexedDB>"u"){n(new TypeError("indexedDB is not available in this environment"));return}let r=indexedDB.open(t.dbName,t.version??1);r.onupgradeneeded=()=>{let o=r.result;o.objectStoreNames.contains(t.storeName)||o.createObjectStore(t.storeName)},r.onsuccess=()=>e(r.result),r.onerror=()=>n(r.error??new Error(`indexedDbBackend: open(${t.dbName}) failed`))})}function G(t){let e=dn(t);return{name:`idb:${t.dbName}/${t.storeName}`,async read(n){let r=await e;return new Promise((o,i)=>{let d=r.transaction(t.storeName,"readonly").objectStore(t.storeName).get(n);d.onsuccess=()=>{let c=d.result;c==null?o(void 0):c instanceof Uint8Array?o(c):c instanceof ArrayBuffer?o(new Uint8Array(c)):o(void 0)},d.onerror=()=>i(d.error)})},async write(n,r){let o=await e;await new Promise((i,a)=>{let s=o.transaction(t.storeName,"readwrite");s.objectStore(t.storeName).put(r,n),s.oncomplete=()=>i(),s.onerror=()=>a(s.error),s.onabort=()=>a(s.error??new Error("indexedDbBackend: write aborted"))})},async delete(n){let r=await e;await new Promise((o,i)=>{let a=r.transaction(t.storeName,"readwrite");a.objectStore(t.storeName).delete(n),a.oncomplete=()=>o(),a.onerror=()=>i(a.error)})},async list(n){let r=await e;return new Promise((o,i)=>{let d=r.transaction(t.storeName,"readonly").objectStore(t.storeName).getAllKeys();d.onsuccess=()=>{let c=d.result.map(u=>String(u));o(n===void 0?c.sort():c.filter(u=>u.startsWith(n)).sort())},d.onerror=()=>i(d.error)})}}}function Ie(t,e){return Re(G(t),e)}function Pe(t,e){return Ce(G(t),e)}function Le(t,e){return Fe(G(t),e)}0&&(module.exports={fromIDBRequest,fromIDBTransaction,indexedDbAppendLog,indexedDbBackend,indexedDbKv,indexedDbSnapshot});
@@ -1,4 +0,0 @@
1
- export { fromIDBRequest, fromIDBTransaction } from './storage-browser.cjs';
2
- export { IndexedDbBackendSpec, indexedDbAppendLog, indexedDbBackend, indexedDbKv, indexedDbSnapshot } from './storage-tiers-browser.cjs';
3
- import '../node-kK3CvTrR.cjs';
4
- import './storage-tiers.cjs';
@@ -1,4 +0,0 @@
1
- export { fromIDBRequest, fromIDBTransaction } from './storage-browser.js';
2
- export { IndexedDbBackendSpec, indexedDbAppendLog, indexedDbBackend, indexedDbKv, indexedDbSnapshot } from './storage-tiers-browser.js';
3
- import '../node-kK3CvTrR.js';
4
- import './storage-tiers.js';
@@ -1 +0,0 @@
1
- import{a as e,b as d}from"../chunk-XTGKMHSW.js";import{a as n,b as o,c as p,d as r}from"../chunk-F672GV32.js";import"../chunk-D5RFJOZ2.js";import"../chunk-CE72X3WO.js";import"../chunk-NTEURFZH.js";import"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{e as fromIDBRequest,d as fromIDBTransaction,p as indexedDbAppendLog,n as indexedDbBackend,r as indexedDbKv,o as indexedDbSnapshot};