effect 2.0.0-next.37 → 2.0.0-next.38

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 (1714) hide show
  1. package/Bigint/dist/effect-Bigint.cjs.dev.js +5 -5
  2. package/Bigint/dist/effect-Bigint.cjs.prod.js +5 -5
  3. package/Bigint/dist/effect-Bigint.esm.js +5 -5
  4. package/Boolean/dist/effect-Boolean.cjs.dev.js +5 -5
  5. package/Boolean/dist/effect-Boolean.cjs.prod.js +5 -5
  6. package/Boolean/dist/effect-Boolean.esm.js +5 -5
  7. package/Brand/dist/effect-Brand.cjs.dev.js +20 -20
  8. package/Brand/dist/effect-Brand.cjs.prod.js +20 -20
  9. package/Brand/dist/effect-Brand.esm.js +20 -20
  10. package/Cache/dist/effect-Cache.cjs.dev.js +72 -72
  11. package/Cache/dist/effect-Cache.cjs.prod.js +72 -72
  12. package/Cache/dist/effect-Cache.esm.js +72 -72
  13. package/Cause/dist/effect-Cause.cjs.dev.js +32 -32
  14. package/Cause/dist/effect-Cause.cjs.prod.js +32 -32
  15. package/Cause/dist/effect-Cause.esm.js +32 -32
  16. package/Channel/dist/effect-Channel.cjs.dev.js +105 -105
  17. package/Channel/dist/effect-Channel.cjs.prod.js +105 -105
  18. package/Channel/dist/effect-Channel.esm.js +105 -105
  19. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.dev.js +3 -3
  20. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.prod.js +3 -3
  21. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.esm.js +3 -3
  22. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js +3 -3
  23. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.prod.js +3 -3
  24. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.esm.js +3 -3
  25. package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.dev.js +3 -3
  26. package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.prod.js +3 -3
  27. package/ChannelMergeState/dist/effect-ChannelMergeState.esm.js +3 -3
  28. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.dev.js +3 -3
  29. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.prod.js +3 -3
  30. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.esm.js +3 -3
  31. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +89 -89
  32. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +89 -89
  33. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.esm.js +89 -89
  34. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.dev.js +3 -3
  35. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.prod.js +3 -3
  36. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.esm.js +3 -3
  37. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.dev.js +3 -3
  38. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.prod.js +3 -3
  39. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.esm.js +3 -3
  40. package/Chunk/dist/effect-Chunk.cjs.dev.js +20 -20
  41. package/Chunk/dist/effect-Chunk.cjs.prod.js +20 -20
  42. package/Chunk/dist/effect-Chunk.esm.js +20 -20
  43. package/Clock/dist/effect-Clock.cjs.dev.js +40 -40
  44. package/Clock/dist/effect-Clock.cjs.prod.js +40 -40
  45. package/Clock/dist/effect-Clock.esm.js +40 -40
  46. package/Config/dist/effect-Config.cjs.dev.js +36 -36
  47. package/Config/dist/effect-Config.cjs.prod.js +36 -36
  48. package/Config/dist/effect-Config.esm.js +36 -36
  49. package/ConfigError/dist/effect-ConfigError.cjs.dev.js +21 -21
  50. package/ConfigError/dist/effect-ConfigError.cjs.prod.js +21 -21
  51. package/ConfigError/dist/effect-ConfigError.esm.js +21 -21
  52. package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +38 -38
  53. package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +38 -38
  54. package/ConfigProvider/dist/effect-ConfigProvider.esm.js +38 -38
  55. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +24 -24
  56. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +24 -24
  57. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.esm.js +24 -24
  58. package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +22 -22
  59. package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +22 -22
  60. package/ConfigSecret/dist/effect-ConfigSecret.esm.js +22 -22
  61. package/Console/dist/effect-Console.cjs.dev.js +81 -81
  62. package/Console/dist/effect-Console.cjs.prod.js +81 -81
  63. package/Console/dist/effect-Console.esm.js +81 -81
  64. package/Context/dist/effect-Context.cjs.dev.js +17 -17
  65. package/Context/dist/effect-Context.cjs.prod.js +17 -17
  66. package/Context/dist/effect-Context.esm.js +17 -17
  67. package/Data/dist/effect-Data.cjs.dev.js +7 -7
  68. package/Data/dist/effect-Data.cjs.prod.js +7 -7
  69. package/Data/dist/effect-Data.esm.js +7 -7
  70. package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +40 -40
  71. package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +40 -40
  72. package/DefaultServices/dist/effect-DefaultServices.esm.js +40 -40
  73. package/Deferred/dist/effect-Deferred.cjs.dev.js +32 -32
  74. package/Deferred/dist/effect-Deferred.cjs.prod.js +32 -32
  75. package/Deferred/dist/effect-Deferred.esm.js +32 -32
  76. package/Differ/dist/effect-Differ.cjs.dev.js +25 -25
  77. package/Differ/dist/effect-Differ.cjs.prod.js +25 -25
  78. package/Differ/dist/effect-Differ.esm.js +25 -25
  79. package/Duration/dist/effect-Duration.cjs.dev.js +16 -16
  80. package/Duration/dist/effect-Duration.cjs.prod.js +16 -16
  81. package/Duration/dist/effect-Duration.esm.js +16 -16
  82. package/Effect/dist/effect-Effect.cjs.dev.js +87 -87
  83. package/Effect/dist/effect-Effect.cjs.prod.js +87 -87
  84. package/Effect/dist/effect-Effect.esm.js +87 -87
  85. package/Effectable/dist/effect-Effectable.cjs.dev.js +10 -10
  86. package/Effectable/dist/effect-Effectable.cjs.prod.js +10 -10
  87. package/Effectable/dist/effect-Effectable.esm.js +10 -10
  88. package/Either/dist/effect-Either.cjs.dev.js +13 -13
  89. package/Either/dist/effect-Either.cjs.prod.js +13 -13
  90. package/Either/dist/effect-Either.esm.js +13 -13
  91. package/Encoding/dist/effect-Encoding.cjs.dev.js +14 -14
  92. package/Encoding/dist/effect-Encoding.cjs.prod.js +14 -14
  93. package/Encoding/dist/effect-Encoding.esm.js +14 -14
  94. package/Equal/dist/effect-Equal.cjs.dev.js +6 -6
  95. package/Equal/dist/effect-Equal.cjs.prod.js +6 -6
  96. package/Equal/dist/effect-Equal.esm.js +6 -6
  97. package/Equivalence/dist/effect-Equivalence.cjs.dev.js +2 -2
  98. package/Equivalence/dist/effect-Equivalence.cjs.prod.js +2 -2
  99. package/Equivalence/dist/effect-Equivalence.esm.js +2 -2
  100. package/Error/dist/effect-Error.cjs.dev.js +89 -89
  101. package/Error/dist/effect-Error.cjs.prod.js +89 -89
  102. package/Error/dist/effect-Error.esm.js +89 -89
  103. package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.dev.js +2 -2
  104. package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.prod.js +2 -2
  105. package/ExecutionStrategy/dist/effect-ExecutionStrategy.esm.js +2 -2
  106. package/Exit/dist/effect-Exit.cjs.dev.js +32 -32
  107. package/Exit/dist/effect-Exit.cjs.prod.js +32 -32
  108. package/Exit/dist/effect-Exit.esm.js +32 -32
  109. package/Fiber/dist/effect-Fiber.cjs.dev.js +75 -75
  110. package/Fiber/dist/effect-Fiber.cjs.prod.js +75 -75
  111. package/Fiber/dist/effect-Fiber.esm.js +75 -75
  112. package/FiberId/dist/effect-FiberId.cjs.dev.js +19 -19
  113. package/FiberId/dist/effect-FiberId.cjs.prod.js +19 -19
  114. package/FiberId/dist/effect-FiberId.esm.js +19 -19
  115. package/FiberRef/dist/effect-FiberRef.cjs.dev.js +73 -73
  116. package/FiberRef/dist/effect-FiberRef.cjs.prod.js +73 -73
  117. package/FiberRef/dist/effect-FiberRef.esm.js +73 -73
  118. package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +33 -33
  119. package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +33 -33
  120. package/FiberRefs/dist/effect-FiberRefs.esm.js +33 -33
  121. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +34 -34
  122. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +34 -34
  123. package/FiberRefsPatch/dist/effect-FiberRefsPatch.esm.js +34 -34
  124. package/FiberStatus/dist/effect-FiberStatus.cjs.dev.js +7 -7
  125. package/FiberStatus/dist/effect-FiberStatus.cjs.prod.js +7 -7
  126. package/FiberStatus/dist/effect-FiberStatus.esm.js +7 -7
  127. package/Function/dist/effect-Function.cjs.dev.js +1 -1
  128. package/Function/dist/effect-Function.cjs.prod.js +1 -1
  129. package/Function/dist/effect-Function.esm.js +1 -1
  130. package/GlobalValue/dist/effect-GlobalValue.cjs.dev.js +1 -1
  131. package/GlobalValue/dist/effect-GlobalValue.cjs.prod.js +1 -1
  132. package/GlobalValue/dist/effect-GlobalValue.esm.js +1 -1
  133. package/GroupBy/dist/effect-GroupBy.cjs.dev.js +106 -106
  134. package/GroupBy/dist/effect-GroupBy.cjs.prod.js +106 -106
  135. package/GroupBy/dist/effect-GroupBy.esm.js +106 -106
  136. package/Hash/dist/effect-Hash.cjs.dev.js +5 -5
  137. package/Hash/dist/effect-Hash.cjs.prod.js +5 -5
  138. package/Hash/dist/effect-Hash.esm.js +5 -5
  139. package/HashMap/dist/effect-HashMap.cjs.dev.js +17 -17
  140. package/HashMap/dist/effect-HashMap.cjs.prod.js +17 -17
  141. package/HashMap/dist/effect-HashMap.esm.js +17 -17
  142. package/HashSet/dist/effect-HashSet.cjs.dev.js +17 -17
  143. package/HashSet/dist/effect-HashSet.cjs.prod.js +17 -17
  144. package/HashSet/dist/effect-HashSet.esm.js +17 -17
  145. package/Hub/dist/effect-Hub.cjs.dev.js +72 -72
  146. package/Hub/dist/effect-Hub.cjs.prod.js +72 -72
  147. package/Hub/dist/effect-Hub.esm.js +72 -72
  148. package/Inspectable/dist/effect-Inspectable.cjs.dev.js +1 -1
  149. package/Inspectable/dist/effect-Inspectable.cjs.prod.js +1 -1
  150. package/Inspectable/dist/effect-Inspectable.esm.js +1 -1
  151. package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +73 -73
  152. package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +73 -73
  153. package/KeyedPool/dist/effect-KeyedPool.esm.js +73 -73
  154. package/Layer/dist/effect-Layer.cjs.dev.js +81 -81
  155. package/Layer/dist/effect-Layer.cjs.prod.js +81 -81
  156. package/Layer/dist/effect-Layer.esm.js +81 -81
  157. package/List/dist/effect-List.cjs.dev.js +21 -21
  158. package/List/dist/effect-List.cjs.prod.js +21 -21
  159. package/List/dist/effect-List.esm.js +21 -21
  160. package/LogLevel/dist/effect-LogLevel.cjs.dev.js +32 -32
  161. package/LogLevel/dist/effect-LogLevel.cjs.prod.js +32 -32
  162. package/LogLevel/dist/effect-LogLevel.esm.js +32 -32
  163. package/LogSpan/dist/effect-LogSpan.cjs.dev.js +1 -1
  164. package/LogSpan/dist/effect-LogSpan.cjs.prod.js +1 -1
  165. package/LogSpan/dist/effect-LogSpan.esm.js +1 -1
  166. package/Logger/dist/effect-Logger.cjs.dev.js +83 -83
  167. package/Logger/dist/effect-Logger.cjs.prod.js +83 -83
  168. package/Logger/dist/effect-Logger.esm.js +83 -83
  169. package/Metric/dist/effect-Metric.cjs.dev.js +69 -69
  170. package/Metric/dist/effect-Metric.cjs.prod.js +69 -69
  171. package/Metric/dist/effect-Metric.esm.js +69 -69
  172. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +22 -22
  173. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +22 -22
  174. package/MetricBoundaries/dist/effect-MetricBoundaries.esm.js +22 -22
  175. package/MetricHook/dist/effect-MetricHook.cjs.dev.js +26 -26
  176. package/MetricHook/dist/effect-MetricHook.cjs.prod.js +26 -26
  177. package/MetricHook/dist/effect-MetricHook.esm.js +26 -26
  178. package/MetricKey/dist/effect-MetricKey.cjs.dev.js +22 -22
  179. package/MetricKey/dist/effect-MetricKey.cjs.prod.js +22 -22
  180. package/MetricKey/dist/effect-MetricKey.esm.js +22 -22
  181. package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +18 -18
  182. package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +18 -18
  183. package/MetricKeyType/dist/effect-MetricKeyType.esm.js +18 -18
  184. package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +9 -9
  185. package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +9 -9
  186. package/MetricLabel/dist/effect-MetricLabel.esm.js +9 -9
  187. package/MetricPair/dist/effect-MetricPair.cjs.dev.js +3 -3
  188. package/MetricPair/dist/effect-MetricPair.cjs.prod.js +3 -3
  189. package/MetricPair/dist/effect-MetricPair.esm.js +3 -3
  190. package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +75 -75
  191. package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +75 -75
  192. package/MetricPolling/dist/effect-MetricPolling.esm.js +75 -75
  193. package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +32 -32
  194. package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +32 -32
  195. package/MetricRegistry/dist/effect-MetricRegistry.esm.js +32 -32
  196. package/MetricState/dist/effect-MetricState.cjs.dev.js +9 -9
  197. package/MetricState/dist/effect-MetricState.cjs.prod.js +9 -9
  198. package/MetricState/dist/effect-MetricState.esm.js +9 -9
  199. package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +19 -19
  200. package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +19 -19
  201. package/MutableHashMap/dist/effect-MutableHashMap.esm.js +19 -19
  202. package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +20 -20
  203. package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +20 -20
  204. package/MutableHashSet/dist/effect-MutableHashSet.esm.js +20 -20
  205. package/MutableList/dist/effect-MutableList.cjs.dev.js +4 -4
  206. package/MutableList/dist/effect-MutableList.cjs.prod.js +4 -4
  207. package/MutableList/dist/effect-MutableList.esm.js +4 -4
  208. package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +22 -22
  209. package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +22 -22
  210. package/MutableQueue/dist/effect-MutableQueue.esm.js +22 -22
  211. package/MutableRef/dist/effect-MutableRef.cjs.dev.js +9 -9
  212. package/MutableRef/dist/effect-MutableRef.cjs.prod.js +9 -9
  213. package/MutableRef/dist/effect-MutableRef.esm.js +9 -9
  214. package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.dev.js +1 -1
  215. package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.prod.js +1 -1
  216. package/NonEmptyIterable/dist/effect-NonEmptyIterable.esm.js +1 -1
  217. package/Number/dist/effect-Number.cjs.dev.js +5 -5
  218. package/Number/dist/effect-Number.cjs.prod.js +5 -5
  219. package/Number/dist/effect-Number.esm.js +5 -5
  220. package/Option/dist/effect-Option.cjs.dev.js +15 -15
  221. package/Option/dist/effect-Option.cjs.prod.js +15 -15
  222. package/Option/dist/effect-Option.esm.js +15 -15
  223. package/Order/dist/effect-Order.cjs.dev.js +2 -2
  224. package/Order/dist/effect-Order.cjs.prod.js +2 -2
  225. package/Order/dist/effect-Order.esm.js +2 -2
  226. package/Ordering/dist/effect-Ordering.cjs.dev.js +2 -2
  227. package/Ordering/dist/effect-Ordering.cjs.prod.js +2 -2
  228. package/Ordering/dist/effect-Ordering.esm.js +2 -2
  229. package/Pipeable/dist/effect-Pipeable.cjs.dev.js +1 -1
  230. package/Pipeable/dist/effect-Pipeable.cjs.prod.js +1 -1
  231. package/Pipeable/dist/effect-Pipeable.esm.js +1 -1
  232. package/Pool/dist/effect-Pool.cjs.dev.js +73 -73
  233. package/Pool/dist/effect-Pool.cjs.prod.js +73 -73
  234. package/Pool/dist/effect-Pool.esm.js +73 -73
  235. package/Predicate/dist/effect-Predicate.cjs.dev.js +2 -2
  236. package/Predicate/dist/effect-Predicate.cjs.prod.js +2 -2
  237. package/Predicate/dist/effect-Predicate.esm.js +2 -2
  238. package/Queue/dist/effect-Queue.cjs.dev.js +72 -72
  239. package/Queue/dist/effect-Queue.cjs.prod.js +72 -72
  240. package/Queue/dist/effect-Queue.esm.js +72 -72
  241. package/Random/dist/effect-Random.cjs.dev.js +40 -40
  242. package/Random/dist/effect-Random.cjs.prod.js +40 -40
  243. package/Random/dist/effect-Random.esm.js +40 -40
  244. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +19 -19
  245. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +19 -19
  246. package/ReadonlyArray/dist/effect-ReadonlyArray.esm.js +19 -19
  247. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +17 -17
  248. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +17 -17
  249. package/ReadonlyRecord/dist/effect-ReadonlyRecord.esm.js +17 -17
  250. package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +21 -21
  251. package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +21 -21
  252. package/RedBlackTree/dist/effect-RedBlackTree.esm.js +21 -21
  253. package/Ref/dist/effect-Ref.cjs.dev.js +32 -32
  254. package/Ref/dist/effect-Ref.cjs.prod.js +32 -32
  255. package/Ref/dist/effect-Ref.esm.js +32 -32
  256. package/Reloadable/dist/effect-Reloadable.cjs.dev.js +82 -82
  257. package/Reloadable/dist/effect-Reloadable.cjs.prod.js +82 -82
  258. package/Reloadable/dist/effect-Reloadable.esm.js +82 -82
  259. package/Request/dist/effect-Request.cjs.dev.js +72 -72
  260. package/Request/dist/effect-Request.cjs.prod.js +72 -72
  261. package/Request/dist/effect-Request.esm.js +72 -72
  262. package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +89 -89
  263. package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +89 -89
  264. package/RequestBlock/dist/effect-RequestBlock.esm.js +89 -89
  265. package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +89 -89
  266. package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +89 -89
  267. package/RequestResolver/dist/effect-RequestResolver.esm.js +89 -89
  268. package/Resource/dist/effect-Resource.cjs.dev.js +77 -77
  269. package/Resource/dist/effect-Resource.cjs.prod.js +77 -77
  270. package/Resource/dist/effect-Resource.esm.js +77 -77
  271. package/Runtime/dist/effect-Runtime.cjs.dev.js +77 -77
  272. package/Runtime/dist/effect-Runtime.cjs.prod.js +77 -77
  273. package/Runtime/dist/effect-Runtime.esm.js +77 -77
  274. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +83 -83
  275. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +83 -83
  276. package/RuntimeFlags/dist/effect-RuntimeFlags.esm.js +83 -83
  277. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +26 -26
  278. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +26 -26
  279. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.esm.js +26 -26
  280. package/STM/dist/effect-STM.cjs.dev.js +110 -110
  281. package/STM/dist/effect-STM.cjs.prod.js +110 -110
  282. package/STM/dist/effect-STM.esm.js +110 -110
  283. package/Schedule/dist/effect-Schedule.cjs.dev.js +55 -55
  284. package/Schedule/dist/effect-Schedule.cjs.prod.js +55 -55
  285. package/Schedule/dist/effect-Schedule.esm.js +55 -55
  286. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +24 -24
  287. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +24 -24
  288. package/ScheduleDecision/dist/effect-ScheduleDecision.esm.js +24 -24
  289. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +17 -17
  290. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +17 -17
  291. package/ScheduleInterval/dist/effect-ScheduleInterval.esm.js +17 -17
  292. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +23 -23
  293. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +23 -23
  294. package/ScheduleIntervals/dist/effect-ScheduleIntervals.esm.js +23 -23
  295. package/Scheduler/dist/effect-Scheduler.cjs.dev.js +32 -32
  296. package/Scheduler/dist/effect-Scheduler.cjs.prod.js +32 -32
  297. package/Scheduler/dist/effect-Scheduler.esm.js +32 -32
  298. package/Scope/dist/effect-Scope.cjs.dev.js +69 -69
  299. package/Scope/dist/effect-Scope.cjs.prod.js +69 -69
  300. package/Scope/dist/effect-Scope.esm.js +69 -69
  301. package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +73 -73
  302. package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +73 -73
  303. package/ScopedCache/dist/effect-ScopedCache.esm.js +73 -73
  304. package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +77 -77
  305. package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +77 -77
  306. package/ScopedRef/dist/effect-ScopedRef.esm.js +77 -77
  307. package/Sink/dist/effect-Sink.cjs.dev.js +99 -99
  308. package/Sink/dist/effect-Sink.cjs.prod.js +99 -99
  309. package/Sink/dist/effect-Sink.esm.js +99 -99
  310. package/SortedMap/dist/effect-SortedMap.cjs.dev.js +22 -22
  311. package/SortedMap/dist/effect-SortedMap.cjs.prod.js +22 -22
  312. package/SortedMap/dist/effect-SortedMap.esm.js +22 -22
  313. package/SortedSet/dist/effect-SortedSet.cjs.dev.js +22 -22
  314. package/SortedSet/dist/effect-SortedSet.cjs.prod.js +22 -22
  315. package/SortedSet/dist/effect-SortedSet.esm.js +22 -22
  316. package/Stream/dist/effect-Stream.cjs.dev.js +106 -106
  317. package/Stream/dist/effect-Stream.cjs.prod.js +106 -106
  318. package/Stream/dist/effect-Stream.esm.js +106 -106
  319. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.dev.js +2 -2
  320. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.prod.js +2 -2
  321. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.esm.js +2 -2
  322. package/String/dist/effect-String.cjs.dev.js +17 -17
  323. package/String/dist/effect-String.cjs.prod.js +17 -17
  324. package/String/dist/effect-String.esm.js +17 -17
  325. package/Struct/dist/effect-Struct.cjs.dev.js +4 -4
  326. package/Struct/dist/effect-Struct.cjs.prod.js +4 -4
  327. package/Struct/dist/effect-Struct.esm.js +4 -4
  328. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +106 -106
  329. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +106 -106
  330. package/SubscriptionRef/dist/effect-SubscriptionRef.esm.js +106 -106
  331. package/Supervisor/dist/effect-Supervisor.cjs.dev.js +83 -83
  332. package/Supervisor/dist/effect-Supervisor.cjs.prod.js +83 -83
  333. package/Supervisor/dist/effect-Supervisor.esm.js +83 -83
  334. package/Symbol/dist/effect-Symbol.cjs.dev.js +4 -4
  335. package/Symbol/dist/effect-Symbol.cjs.prod.js +4 -4
  336. package/Symbol/dist/effect-Symbol.esm.js +4 -4
  337. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +76 -76
  338. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +76 -76
  339. package/SynchronizedRef/dist/effect-SynchronizedRef.esm.js +76 -76
  340. package/TArray/dist/effect-TArray.cjs.dev.js +112 -112
  341. package/TArray/dist/effect-TArray.cjs.prod.js +112 -112
  342. package/TArray/dist/effect-TArray.esm.js +112 -112
  343. package/TDeferred/dist/effect-TDeferred.cjs.dev.js +111 -111
  344. package/TDeferred/dist/effect-TDeferred.cjs.prod.js +111 -111
  345. package/TDeferred/dist/effect-TDeferred.esm.js +111 -111
  346. package/THub/dist/effect-THub.cjs.dev.js +113 -113
  347. package/THub/dist/effect-THub.cjs.prod.js +113 -113
  348. package/THub/dist/effect-THub.esm.js +113 -113
  349. package/TMap/dist/effect-TMap.cjs.dev.js +114 -114
  350. package/TMap/dist/effect-TMap.cjs.prod.js +114 -114
  351. package/TMap/dist/effect-TMap.esm.js +114 -114
  352. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +111 -111
  353. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +111 -111
  354. package/TPriorityQueue/dist/effect-TPriorityQueue.esm.js +111 -111
  355. package/TQueue/dist/effect-TQueue.cjs.dev.js +113 -113
  356. package/TQueue/dist/effect-TQueue.cjs.prod.js +113 -113
  357. package/TQueue/dist/effect-TQueue.esm.js +113 -113
  358. package/TRandom/dist/effect-TRandom.cjs.dev.js +112 -112
  359. package/TRandom/dist/effect-TRandom.cjs.prod.js +112 -112
  360. package/TRandom/dist/effect-TRandom.esm.js +112 -112
  361. package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +110 -110
  362. package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +110 -110
  363. package/TReentrantLock/dist/effect-TReentrantLock.esm.js +110 -110
  364. package/TRef/dist/effect-TRef.cjs.dev.js +110 -110
  365. package/TRef/dist/effect-TRef.cjs.prod.js +110 -110
  366. package/TRef/dist/effect-TRef.esm.js +110 -110
  367. package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +112 -112
  368. package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +112 -112
  369. package/TSemaphore/dist/effect-TSemaphore.esm.js +112 -112
  370. package/TSet/dist/effect-TSet.cjs.dev.js +114 -114
  371. package/TSet/dist/effect-TSet.cjs.prod.js +114 -114
  372. package/TSet/dist/effect-TSet.esm.js +114 -114
  373. package/Take/dist/effect-Take.cjs.dev.js +89 -89
  374. package/Take/dist/effect-Take.cjs.prod.js +89 -89
  375. package/Take/dist/effect-Take.esm.js +89 -89
  376. package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +25 -25
  377. package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +25 -25
  378. package/TestAnnotation/dist/effect-TestAnnotation.esm.js +25 -25
  379. package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.dev.js +2 -2
  380. package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.prod.js +2 -2
  381. package/TestAnnotationMap/dist/effect-TestAnnotationMap.esm.js +2 -2
  382. package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +57 -57
  383. package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +57 -57
  384. package/TestAnnotations/dist/effect-TestAnnotations.esm.js +57 -57
  385. package/TestClock/dist/effect-TestClock.cjs.dev.js +85 -85
  386. package/TestClock/dist/effect-TestClock.cjs.prod.js +85 -85
  387. package/TestClock/dist/effect-TestClock.esm.js +85 -85
  388. package/TestConfig/dist/effect-TestConfig.cjs.dev.js +18 -18
  389. package/TestConfig/dist/effect-TestConfig.cjs.prod.js +18 -18
  390. package/TestConfig/dist/effect-TestConfig.esm.js +18 -18
  391. package/TestContext/dist/effect-TestContext.cjs.dev.js +96 -96
  392. package/TestContext/dist/effect-TestContext.cjs.prod.js +96 -96
  393. package/TestContext/dist/effect-TestContext.esm.js +96 -96
  394. package/TestLive/dist/effect-TestLive.cjs.dev.js +40 -40
  395. package/TestLive/dist/effect-TestLive.cjs.prod.js +40 -40
  396. package/TestLive/dist/effect-TestLive.esm.js +40 -40
  397. package/TestServices/dist/effect-TestServices.cjs.dev.js +94 -94
  398. package/TestServices/dist/effect-TestServices.cjs.prod.js +94 -94
  399. package/TestServices/dist/effect-TestServices.esm.js +94 -94
  400. package/TestSized/dist/effect-TestSized.cjs.dev.js +32 -32
  401. package/TestSized/dist/effect-TestSized.cjs.prod.js +32 -32
  402. package/TestSized/dist/effect-TestSized.esm.js +32 -32
  403. package/Tracer/dist/effect-Tracer.cjs.dev.js +40 -40
  404. package/Tracer/dist/effect-Tracer.cjs.prod.js +40 -40
  405. package/Tracer/dist/effect-Tracer.esm.js +40 -40
  406. package/Tuple/dist/effect-Tuple.cjs.dev.js +4 -4
  407. package/Tuple/dist/effect-Tuple.cjs.prod.js +4 -4
  408. package/Tuple/dist/effect-Tuple.esm.js +4 -4
  409. package/Unify/dist/effect-Unify.cjs.dev.js +2 -2
  410. package/Unify/dist/effect-Unify.cjs.prod.js +2 -2
  411. package/Unify/dist/effect-Unify.esm.js +2 -2
  412. package/Utils/dist/effect-Utils.cjs.dev.js +3 -3
  413. package/Utils/dist/effect-Utils.cjs.prod.js +3 -3
  414. package/Utils/dist/effect-Utils.esm.js +3 -3
  415. package/dist/Bigint-0ebd807c.cjs.dev.js +392 -0
  416. package/dist/Bigint-912c77f3.cjs.prod.js +392 -0
  417. package/dist/Bigint-bf034c1f.esm.js +370 -0
  418. package/dist/Boolean-97839b78.cjs.prod.js +264 -0
  419. package/dist/Boolean-bf38e241.esm.js +248 -0
  420. package/dist/Boolean-f0bc3abf.cjs.dev.js +264 -0
  421. package/dist/Brand-93578f43.cjs.prod.js +224 -0
  422. package/dist/Brand-b238487d.cjs.dev.js +224 -0
  423. package/dist/Brand-f068009f.esm.js +215 -0
  424. package/dist/Cache-27cd0ab7.esm.js +120 -0
  425. package/dist/Cache-65f7e875.cjs.prod.js +127 -0
  426. package/dist/Cache-e7468f24.cjs.dev.js +127 -0
  427. package/dist/Cause-384e2165.cjs.prod.js +791 -0
  428. package/dist/Cause-5946c7a3.esm.js +730 -0
  429. package/dist/Cause-96c29074.cjs.dev.js +791 -0
  430. package/dist/Channel-4099f225.cjs.dev.js +1217 -0
  431. package/dist/Channel-482334e0.cjs.prod.js +1217 -0
  432. package/dist/Channel-4bba5096.esm.js +1109 -0
  433. package/dist/ChannelChildExecutorDecision-168278f6.cjs.prod.js +136 -0
  434. package/dist/ChannelChildExecutorDecision-674b3a48.esm.js +125 -0
  435. package/dist/ChannelChildExecutorDecision-b0e715de.cjs.dev.js +136 -0
  436. package/dist/ChannelMergeDecision-9c266aeb.cjs.prod.js +78 -0
  437. package/dist/ChannelMergeDecision-e5f34de0.esm.js +70 -0
  438. package/dist/ChannelMergeDecision-eeaf4779.cjs.dev.js +78 -0
  439. package/dist/ChannelMergeState-4366d090.cjs.prod.js +125 -0
  440. package/dist/ChannelMergeState-abce1d88.cjs.dev.js +125 -0
  441. package/dist/ChannelMergeState-ae694a7c.esm.js +114 -0
  442. package/dist/ChannelMergeStrategy-6193b8e0.cjs.prod.js +104 -0
  443. package/dist/ChannelMergeStrategy-9ef51c54.esm.js +95 -0
  444. package/dist/ChannelMergeStrategy-e7ddbb7a.cjs.dev.js +104 -0
  445. package/dist/ChannelSingleProducerAsyncInput-1d15a3ec.esm.js +52 -0
  446. package/dist/ChannelSingleProducerAsyncInput-9d23aac3.cjs.prod.js +55 -0
  447. package/dist/ChannelSingleProducerAsyncInput-e1260219.cjs.dev.js +55 -0
  448. package/dist/ChannelUpstreamPullRequest-1ca7d2bd.cjs.dev.js +104 -0
  449. package/dist/ChannelUpstreamPullRequest-208751c3.cjs.prod.js +104 -0
  450. package/dist/ChannelUpstreamPullRequest-9b3a6733.esm.js +95 -0
  451. package/dist/ChannelUpstreamPullStrategy-266b5a77.cjs.prod.js +103 -0
  452. package/dist/ChannelUpstreamPullStrategy-85e1042b.esm.js +94 -0
  453. package/dist/ChannelUpstreamPullStrategy-ec57dc70.cjs.dev.js +103 -0
  454. package/dist/Chunk-4c1f4599.esm.js +1167 -0
  455. package/dist/Chunk-6cf5a8e6.cjs.prod.js +1248 -0
  456. package/dist/Chunk-bd290b8e.cjs.dev.js +1248 -0
  457. package/dist/Clock-0b777b1b.cjs.prod.js +97 -0
  458. package/dist/Clock-80bf3b4b.cjs.dev.js +97 -0
  459. package/dist/Clock-f8b987d7.esm.js +88 -0
  460. package/dist/Config-85ae6286.cjs.prod.js +393 -0
  461. package/dist/Config-8d8f5a9f.esm.js +358 -0
  462. package/dist/Config-dc58cf69.cjs.dev.js +393 -0
  463. package/dist/ConfigError-41421a53.esm.js +206 -0
  464. package/dist/ConfigError-c1f762d2.cjs.dev.js +225 -0
  465. package/dist/ConfigError-cee682fa.cjs.prod.js +225 -0
  466. package/dist/ConfigProvider-8341a5f5.cjs.prod.js +240 -0
  467. package/dist/ConfigProvider-977168f2.esm.js +220 -0
  468. package/dist/ConfigProvider-de45b085.cjs.dev.js +240 -0
  469. package/dist/ConfigProviderPathPatch-52422b32.cjs.prod.js +86 -0
  470. package/dist/ConfigProviderPathPatch-881ec2b5.esm.js +79 -0
  471. package/dist/ConfigProviderPathPatch-d22442e3.cjs.dev.js +86 -0
  472. package/dist/ConfigSecret-9d3bf471.esm.js +74 -0
  473. package/dist/ConfigSecret-c76717e8.cjs.dev.js +83 -0
  474. package/dist/ConfigSecret-ebab2ae7.cjs.prod.js +83 -0
  475. package/dist/Console-69b2fba9.cjs.prod.js +271 -0
  476. package/dist/Console-9be5cd81.esm.js +247 -0
  477. package/dist/Console-ff87924b.cjs.dev.js +271 -0
  478. package/dist/Context-149c432f.esm.js +208 -0
  479. package/dist/Context-25a49952.cjs.prod.js +327 -0
  480. package/dist/Context-3c9e986b.cjs.dev.js +327 -0
  481. package/dist/Context-96739709.cjs.dev.js +222 -0
  482. package/dist/Context-c41aa832.esm.js +312 -0
  483. package/dist/Context-f958cabc.cjs.prod.js +222 -0
  484. package/dist/Data-07dc27f1.cjs.prod.js +237 -0
  485. package/dist/Data-85559fb3.cjs.dev.js +237 -0
  486. package/dist/Data-dee529b9.esm.js +224 -0
  487. package/dist/DefaultServices-6a83f0aa.cjs.prod.js +34 -0
  488. package/dist/DefaultServices-b70d7e44.esm.js +30 -0
  489. package/dist/DefaultServices-c1a6b148.cjs.dev.js +34 -0
  490. package/dist/Deferred-5d5c886c.cjs.dev.js +253 -0
  491. package/dist/Deferred-9010d2ac.esm.js +230 -0
  492. package/dist/Deferred-9d825b3b.cjs.prod.js +253 -0
  493. package/dist/Differ-0122f60e.cjs.dev.js +992 -0
  494. package/dist/Differ-0bd34066.cjs.prod.js +992 -0
  495. package/dist/Differ-a249bf4d.esm.js +975 -0
  496. package/dist/Duration-011e7325.cjs.prod.js +500 -0
  497. package/dist/Duration-5ac57eb4.cjs.dev.js +500 -0
  498. package/dist/Duration-98bca14c.esm.js +467 -0
  499. package/dist/Effect-8392a3cd.cjs.dev.js +3740 -0
  500. package/dist/Effect-ee05a487.esm.js +3417 -0
  501. package/dist/Effect-f0659a90.cjs.prod.js +3740 -0
  502. package/dist/Effectable-04f3cd30.cjs.dev.js +99 -0
  503. package/dist/Effectable-8997112d.cjs.prod.js +99 -0
  504. package/dist/Effectable-a292d920.esm.js +158 -0
  505. package/dist/Effectable-a6403e5f.cjs.dev.js +181 -0
  506. package/dist/Effectable-d9b23ee3.esm.js +89 -0
  507. package/dist/Effectable-f867d1cb.cjs.prod.js +181 -0
  508. package/dist/Either-3fab3796.cjs.prod.js +502 -0
  509. package/dist/Either-408d23a8.esm.js +163 -0
  510. package/dist/Either-9c349424.cjs.dev.js +178 -0
  511. package/dist/Either-a806809d.cjs.dev.js +502 -0
  512. package/dist/Either-aa46c018.esm.js +473 -0
  513. package/dist/Either-d03d5f05.cjs.prod.js +178 -0
  514. package/dist/Encoding-0cab52d5.cjs.prod.js +309 -0
  515. package/dist/Encoding-d95012ad.esm.js +295 -0
  516. package/dist/Encoding-d993b1b0.cjs.dev.js +309 -0
  517. package/dist/Equal-281b6ca8.cjs.dev.js +71 -0
  518. package/dist/Equal-2a99fde3.esm.js +65 -0
  519. package/dist/Equal-ce9977a8.cjs.prod.js +71 -0
  520. package/dist/Equivalence-0bc84518.cjs.prod.js +238 -0
  521. package/dist/Equivalence-cf2752b1.esm.js +218 -0
  522. package/dist/Equivalence-de7a0d51.cjs.dev.js +238 -0
  523. package/dist/Error-083b7b69.esm.js +53 -0
  524. package/dist/Error-5edcd83a.cjs.dev.js +57 -0
  525. package/dist/Error-d7f0de14.cjs.prod.js +57 -0
  526. package/dist/ExecutionStrategy-89fbe735.cjs.dev.js +180 -0
  527. package/dist/ExecutionStrategy-dc778180.cjs.prod.js +180 -0
  528. package/dist/ExecutionStrategy-e3775e86.esm.js +168 -0
  529. package/dist/Exit-5691142c.cjs.prod.js +408 -0
  530. package/dist/Exit-666b4f01.esm.js +371 -0
  531. package/dist/Exit-a23874e1.cjs.dev.js +408 -0
  532. package/dist/Fiber-3b2a4091.cjs.prod.js +521 -0
  533. package/dist/Fiber-c797d281.cjs.dev.js +521 -0
  534. package/dist/Fiber-ebef9c60.esm.js +473 -0
  535. package/dist/FiberId-17e50f05.esm.js +422 -0
  536. package/dist/FiberId-929dcce4.cjs.dev.js +443 -0
  537. package/dist/FiberId-b79e8047.cjs.prod.js +443 -0
  538. package/dist/FiberRef-0b332631.cjs.prod.js +385 -0
  539. package/dist/FiberRef-61cd9abe.cjs.dev.js +385 -0
  540. package/dist/FiberRef-ddf157fd.esm.js +338 -0
  541. package/dist/FiberRefs-43bfd8b9.cjs.dev.js +135 -0
  542. package/dist/FiberRefs-4cb171f7.cjs.prod.js +135 -0
  543. package/dist/FiberRefs-f705c1b5.esm.js +122 -0
  544. package/dist/FiberRefsPatch-04e0adc7.esm.js +84 -0
  545. package/dist/FiberRefsPatch-5236f61e.cjs.dev.js +90 -0
  546. package/dist/FiberRefsPatch-cb847553.cjs.prod.js +90 -0
  547. package/dist/FiberStatus-7a24d5ef.esm.js +187 -0
  548. package/dist/FiberStatus-b82dad24.cjs.prod.js +197 -0
  549. package/dist/FiberStatus-bac7d58d.cjs.dev.js +197 -0
  550. package/dist/Function-12511160.esm.js +516 -0
  551. package/dist/Function-2e6b0cda.cjs.prod.js +538 -0
  552. package/dist/Function-41ce433d.cjs.dev.js +538 -0
  553. package/dist/GlobalValue-81ab6908.cjs.dev.js +28 -0
  554. package/dist/GlobalValue-b5edf230.esm.js +25 -0
  555. package/dist/GlobalValue-cb645c99.cjs.prod.js +28 -0
  556. package/dist/GroupBy-4c667347.esm.js +72 -0
  557. package/dist/GroupBy-bb08aeb2.cjs.prod.js +79 -0
  558. package/dist/GroupBy-bd212344.cjs.dev.js +79 -0
  559. package/dist/Hash-1bd73210.cjs.prod.js +192 -0
  560. package/dist/Hash-7910f34f.esm.js +179 -0
  561. package/dist/Hash-bd154268.cjs.dev.js +192 -0
  562. package/dist/HashMap-12668911.cjs.prod.js +361 -0
  563. package/dist/HashMap-68e290b6.cjs.dev.js +361 -0
  564. package/dist/HashMap-6c230bde.esm.js +327 -0
  565. package/dist/HashSet-6978c08e.cjs.dev.js +283 -0
  566. package/dist/HashSet-69824ba8.esm.js +907 -0
  567. package/dist/HashSet-6fe62df2.cjs.prod.js +965 -0
  568. package/dist/HashSet-ae2856c1.esm.js +256 -0
  569. package/dist/HashSet-c40a52b1.cjs.prod.js +283 -0
  570. package/dist/HashSet-ece2cfe8.cjs.dev.js +965 -0
  571. package/dist/Hub-121dbf51.esm.js +1264 -0
  572. package/dist/Hub-926961e9.cjs.prod.js +1280 -0
  573. package/dist/Hub-af0194fd.cjs.dev.js +1280 -0
  574. package/dist/Inspectable-3c4a0f5d.cjs.prod.js +50 -0
  575. package/dist/Inspectable-ac929af4.cjs.dev.js +50 -0
  576. package/dist/Inspectable-b0c51e90.esm.js +45 -0
  577. package/dist/KeyedPool-08ee3618.esm.js +273 -0
  578. package/dist/KeyedPool-0ddba691.cjs.prod.js +282 -0
  579. package/dist/KeyedPool-f7b4675c.cjs.dev.js +282 -0
  580. package/dist/Layer-6ad0ac38.cjs.dev.js +687 -0
  581. package/dist/Layer-8586a429.esm.js +623 -0
  582. package/dist/Layer-ec0ab71c.cjs.prod.js +687 -0
  583. package/dist/List-6e58a1e9.esm.js +865 -0
  584. package/dist/List-c6ea7efe.cjs.dev.js +912 -0
  585. package/dist/List-d9775087.cjs.prod.js +912 -0
  586. package/dist/LogLevel-5a4fa506.esm.js +222 -0
  587. package/dist/LogLevel-99f64f82.cjs.dev.js +240 -0
  588. package/dist/LogLevel-e9848e15.cjs.prod.js +240 -0
  589. package/dist/LogSpan-c905a192.cjs.prod.js +46 -0
  590. package/dist/LogSpan-e345ba58.cjs.dev.js +46 -0
  591. package/dist/LogSpan-f36e9619.esm.js +42 -0
  592. package/dist/Logger-3df1180d.cjs.prod.js +275 -0
  593. package/dist/Logger-620f1fa9.cjs.dev.js +275 -0
  594. package/dist/Logger-aafaa76b.esm.js +246 -0
  595. package/dist/Metric-9607aa06.cjs.prod.js +488 -0
  596. package/dist/Metric-ebc35919.cjs.dev.js +488 -0
  597. package/dist/Metric-fef02dd6.esm.js +442 -0
  598. package/dist/MetricBoundaries-c8610876.esm.js +61 -0
  599. package/dist/MetricBoundaries-cf5df220.cjs.prod.js +68 -0
  600. package/dist/MetricBoundaries-f5f5aae1.cjs.dev.js +68 -0
  601. package/dist/MetricHook-6859801b.esm.js +80 -0
  602. package/dist/MetricHook-a742d813.cjs.prod.js +90 -0
  603. package/dist/MetricHook-fdc68e37.cjs.dev.js +90 -0
  604. package/dist/MetricKey-b17b2c9a.cjs.prod.js +130 -0
  605. package/dist/MetricKey-be3afc49.cjs.dev.js +130 -0
  606. package/dist/MetricKey-d1b96e85.esm.js +118 -0
  607. package/dist/MetricKeyType-3dfa6802.cjs.prod.js +187 -0
  608. package/dist/MetricKeyType-4ce20904.esm.js +168 -0
  609. package/dist/MetricKeyType-fba3e0ec.cjs.dev.js +187 -0
  610. package/dist/MetricLabel-123185d1.esm.js +48 -0
  611. package/dist/MetricLabel-6a1886c6.cjs.dev.js +53 -0
  612. package/dist/MetricLabel-7e1d569e.cjs.prod.js +53 -0
  613. package/dist/MetricPair-658ab13d.cjs.dev.js +50 -0
  614. package/dist/MetricPair-840a98b7.esm.js +45 -0
  615. package/dist/MetricPair-aec13967.cjs.prod.js +50 -0
  616. package/dist/MetricPolling-061de6b9.cjs.dev.js +177 -0
  617. package/dist/MetricPolling-538e65c8.esm.js +167 -0
  618. package/dist/MetricPolling-6e5e4b2e.cjs.prod.js +177 -0
  619. package/dist/MetricRegistry-1e32438c.esm.js +34 -0
  620. package/dist/MetricRegistry-4df5e56b.cjs.dev.js +38 -0
  621. package/dist/MetricRegistry-da2c65bd.cjs.prod.js +38 -0
  622. package/dist/MetricState-b65340a4.cjs.dev.js +191 -0
  623. package/dist/MetricState-bd6a5001.cjs.prod.js +191 -0
  624. package/dist/MetricState-ccc2e0db.esm.js +172 -0
  625. package/dist/MutableHashMap-02b39969.esm.js +142 -0
  626. package/dist/MutableHashMap-74e83e84.cjs.dev.js +154 -0
  627. package/dist/MutableHashMap-95493edb.cjs.prod.js +154 -0
  628. package/dist/MutableHashSet-780dfd63.cjs.prod.js +110 -0
  629. package/dist/MutableHashSet-db4f96e8.esm.js +101 -0
  630. package/dist/MutableHashSet-ec8d7cc4.cjs.dev.js +110 -0
  631. package/dist/MutableList-58124ef2.cjs.dev.js +296 -0
  632. package/dist/MutableList-732af09a.cjs.prod.js +296 -0
  633. package/dist/MutableList-76401868.esm.js +281 -0
  634. package/dist/MutableQueue-0e9f2466.cjs.dev.js +215 -0
  635. package/dist/MutableQueue-446ac662.esm.js +202 -0
  636. package/dist/MutableQueue-f8aba856.cjs.prod.js +215 -0
  637. package/dist/MutableRef-2734b082.esm.js +176 -0
  638. package/dist/MutableRef-4a2f1f23.cjs.prod.js +194 -0
  639. package/dist/MutableRef-724c4082.cjs.dev.js +194 -0
  640. package/dist/NonEmptyIterable-418cef14.cjs.prod.js +36 -0
  641. package/dist/NonEmptyIterable-bb452f41.cjs.dev.js +36 -0
  642. package/dist/NonEmptyIterable-e78d759e.esm.js +33 -0
  643. package/dist/Number-4b836a09.esm.js +394 -0
  644. package/dist/Number-588f6483.cjs.dev.js +417 -0
  645. package/dist/Number-cb2ba2e8.cjs.prod.js +417 -0
  646. package/dist/Option-02025c86.cjs.prod.js +1198 -0
  647. package/dist/Option-03997d77.cjs.dev.js +1198 -0
  648. package/dist/Option-df40d2b9.esm.js +1135 -0
  649. package/dist/Order-28bdebd2.cjs.dev.js +321 -0
  650. package/dist/Order-8a112bfb.cjs.prod.js +321 -0
  651. package/dist/Order-a875fe30.esm.js +293 -0
  652. package/dist/Ordering-079176ff.esm.js +97 -0
  653. package/dist/Ordering-60bf9127.cjs.prod.js +104 -0
  654. package/dist/Ordering-b955b746.cjs.dev.js +104 -0
  655. package/dist/Pipeable-10760a1d.esm.js +49 -0
  656. package/dist/Pipeable-4698db72.cjs.dev.js +52 -0
  657. package/dist/Pipeable-d3ec6711.cjs.prod.js +52 -0
  658. package/dist/Pool-d8e4142e.cjs.prod.js +122 -0
  659. package/dist/Pool-e8a79a57.cjs.dev.js +122 -0
  660. package/dist/Pool-f1667f78.esm.js +114 -0
  661. package/dist/Predicate-6b61b95b.esm.js +677 -0
  662. package/dist/Predicate-9e859c9c.cjs.dev.js +718 -0
  663. package/dist/Predicate-daa86e61.cjs.prod.js +718 -0
  664. package/dist/Queue-55a39179.cjs.dev.js +394 -0
  665. package/dist/Queue-d99be5de.esm.js +362 -0
  666. package/dist/Queue-de055f1c.cjs.prod.js +394 -0
  667. package/dist/Random-5ed16d23.esm.js +94 -0
  668. package/dist/Random-ade126e8.cjs.prod.js +104 -0
  669. package/dist/Random-d6a2f801.cjs.dev.js +104 -0
  670. package/dist/ReadonlyArray-0a71b226.esm.js +1584 -0
  671. package/dist/ReadonlyArray-48949ee7.cjs.dev.js +1721 -0
  672. package/dist/ReadonlyArray-8157f697.cjs.prod.js +1721 -0
  673. package/dist/ReadonlyArray-9a1474f6.cjs.dev.js +10 -0
  674. package/dist/ReadonlyArray-c8b1f51c.esm.js +8 -0
  675. package/dist/ReadonlyArray-f9ed7a05.cjs.prod.js +10 -0
  676. package/dist/ReadonlyRecord-605a625b.cjs.dev.js +568 -0
  677. package/dist/ReadonlyRecord-8db8bada.cjs.prod.js +568 -0
  678. package/dist/ReadonlyRecord-c9f03980.esm.js +544 -0
  679. package/dist/RedBlackTree-611b3b4c.esm.js +1632 -0
  680. package/dist/RedBlackTree-e6bd147c.cjs.dev.js +1669 -0
  681. package/dist/RedBlackTree-eb41ea8a.cjs.prod.js +1669 -0
  682. package/dist/Ref-30e5ee58.cjs.prod.js +282 -0
  683. package/dist/Ref-5eefaff1.esm.js +248 -0
  684. package/dist/Ref-af783b72.cjs.dev.js +282 -0
  685. package/dist/Reloadable-5f1ed95c.cjs.prod.js +169 -0
  686. package/dist/Reloadable-e2eba7eb.esm.js +159 -0
  687. package/dist/Reloadable-e8bcb00e.cjs.dev.js +169 -0
  688. package/dist/Request-45226c5f.cjs.prod.js +190 -0
  689. package/dist/Request-8b0e9130.esm.js +175 -0
  690. package/dist/Request-9d12c3ba.cjs.dev.js +190 -0
  691. package/dist/RequestBlock-0e9f377b.cjs.dev.js +124 -0
  692. package/dist/RequestBlock-88afac19.esm.js +114 -0
  693. package/dist/RequestBlock-d4c7c31d.cjs.prod.js +124 -0
  694. package/dist/RequestResolver-8764ee8c.cjs.prod.js +233 -0
  695. package/dist/RequestResolver-b287a04a.cjs.dev.js +233 -0
  696. package/dist/RequestResolver-f17a25be.esm.js +213 -0
  697. package/dist/Resource-4f2b627f.cjs.dev.js +118 -0
  698. package/dist/Resource-525ecb8a.esm.js +111 -0
  699. package/dist/Resource-f95cf55a.cjs.prod.js +118 -0
  700. package/dist/Runtime-7b6c0a8b.esm.js +175 -0
  701. package/dist/Runtime-969e6cb2.cjs.prod.js +191 -0
  702. package/dist/Runtime-dc0234a0.cjs.dev.js +191 -0
  703. package/dist/RuntimeFlags-60048f70.esm.js +344 -0
  704. package/dist/RuntimeFlags-60dfc3f5.cjs.dev.js +381 -0
  705. package/dist/RuntimeFlags-7a400d83.cjs.prod.js +381 -0
  706. package/dist/RuntimeFlagsPatch-130e990c.cjs.dev.js +411 -0
  707. package/dist/RuntimeFlagsPatch-51f77dce.esm.js +365 -0
  708. package/dist/RuntimeFlagsPatch-5570758d.cjs.prod.js +411 -0
  709. package/dist/STM-1ef98d11.esm.js +1321 -0
  710. package/dist/STM-af9026e6.cjs.dev.js +1447 -0
  711. package/dist/STM-b8d9766d.cjs.prod.js +1447 -0
  712. package/dist/Schedule-58648908.cjs.prod.js +1159 -0
  713. package/dist/Schedule-76089454.cjs.dev.js +1159 -0
  714. package/dist/Schedule-8502145c.esm.js +1059 -0
  715. package/dist/ScheduleDecision-9555a6dc.cjs.dev.js +106 -0
  716. package/dist/ScheduleDecision-e0b221dc.esm.js +99 -0
  717. package/dist/ScheduleDecision-fbd6bb79.cjs.prod.js +106 -0
  718. package/dist/ScheduleInterval-15c7da05.cjs.prod.js +244 -0
  719. package/dist/ScheduleInterval-3ca6dbb0.cjs.dev.js +244 -0
  720. package/dist/ScheduleInterval-cc7fc624.esm.js +229 -0
  721. package/dist/ScheduleIntervals-36ff45c1.cjs.dev.js +265 -0
  722. package/dist/ScheduleIntervals-a5bbdb0d.cjs.prod.js +265 -0
  723. package/dist/ScheduleIntervals-c4dc0500.esm.js +252 -0
  724. package/dist/Scheduler-819ee02a.cjs.prod.js +358 -0
  725. package/dist/Scheduler-844c1a90.esm.js +343 -0
  726. package/dist/Scheduler-d080442d.cjs.dev.js +358 -0
  727. package/dist/Scope-0253ac82.esm.js +131 -0
  728. package/dist/Scope-820b74b2.cjs.dev.js +143 -0
  729. package/dist/Scope-e3e714b4.cjs.prod.js +143 -0
  730. package/dist/ScopedCache-467ccc2b.cjs.prod.js +467 -0
  731. package/dist/ScopedCache-8fa7e96d.esm.js +462 -0
  732. package/dist/ScopedCache-f9b2f52e.cjs.dev.js +467 -0
  733. package/dist/ScopedRef-735385de.cjs.dev.js +87 -0
  734. package/dist/ScopedRef-b45fd0e8.cjs.prod.js +87 -0
  735. package/dist/ScopedRef-d92cda3b.esm.js +80 -0
  736. package/dist/Sink-322b0a96.esm.js +1107 -0
  737. package/dist/Sink-cb1bba84.cjs.prod.js +1215 -0
  738. package/dist/Sink-dffe83ea.cjs.dev.js +1215 -0
  739. package/dist/SortedMap-bb3311c3.cjs.prod.js +210 -0
  740. package/dist/SortedMap-e429b26f.esm.js +190 -0
  741. package/dist/SortedMap-f452cc44.cjs.dev.js +210 -0
  742. package/dist/SortedSet-424670fe.cjs.prod.js +311 -0
  743. package/dist/SortedSet-f90b14a2.cjs.dev.js +311 -0
  744. package/dist/SortedSet-ffc2cefd.esm.js +288 -0
  745. package/dist/Stream-39e8de11.cjs.prod.js +3469 -0
  746. package/dist/Stream-a54c82e5.esm.js +3175 -0
  747. package/dist/Stream-c348a386.cjs.dev.js +3469 -0
  748. package/dist/StreamHaltStrategy-07f544a6.cjs.prod.js +214 -0
  749. package/dist/StreamHaltStrategy-592df221.esm.js +201 -0
  750. package/dist/StreamHaltStrategy-66a53f66.cjs.dev.js +214 -0
  751. package/dist/String-23b18ca9.cjs.prod.js +694 -0
  752. package/dist/String-5d27ad4c.esm.js +648 -0
  753. package/dist/String-830aaa3e.cjs.dev.js +694 -0
  754. package/dist/Struct-14648d76.cjs.dev.js +141 -0
  755. package/dist/Struct-b95eb81c.esm.js +134 -0
  756. package/dist/Struct-c6b00f29.cjs.prod.js +141 -0
  757. package/dist/SubscriptionRef-53e8686c.cjs.dev.js +269 -0
  758. package/dist/SubscriptionRef-62745b92.cjs.prod.js +269 -0
  759. package/dist/SubscriptionRef-93d8d20b.esm.js +245 -0
  760. package/dist/Supervisor-0ea7382b.cjs.prod.js +170 -0
  761. package/dist/Supervisor-802f0ad0.esm.js +160 -0
  762. package/dist/Supervisor-cf21fcaa.cjs.dev.js +170 -0
  763. package/dist/Symbol-55d0b3d8.cjs.prod.js +40 -0
  764. package/dist/Symbol-5d74a5f2.cjs.dev.js +40 -0
  765. package/dist/Symbol-81368584.esm.js +36 -0
  766. package/dist/SynchronizedRef-2cc5af97.cjs.prod.js +212 -0
  767. package/dist/SynchronizedRef-5b418159.esm.js +187 -0
  768. package/dist/SynchronizedRef-9e9689e9.cjs.dev.js +212 -0
  769. package/dist/TArray-0b280c93.cjs.dev.js +455 -0
  770. package/dist/TArray-6057170a.cjs.prod.js +455 -0
  771. package/dist/TArray-e0699120.esm.js +412 -0
  772. package/dist/TDeferred-73b5dfc2.cjs.prod.js +129 -0
  773. package/dist/TDeferred-786b2b13.cjs.dev.js +129 -0
  774. package/dist/TDeferred-96a9e821.esm.js +120 -0
  775. package/dist/THub-573c2fb3.esm.js +553 -0
  776. package/dist/THub-810db270.cjs.prod.js +570 -0
  777. package/dist/THub-bcd35bc0.cjs.dev.js +570 -0
  778. package/dist/TMap-06e0747b.cjs.dev.js +463 -0
  779. package/dist/TMap-0b08af84.esm.js +419 -0
  780. package/dist/TMap-7206da08.cjs.prod.js +463 -0
  781. package/dist/TPriorityQueue-0844551b.cjs.dev.js +381 -0
  782. package/dist/TPriorityQueue-71490af5.cjs.prod.js +381 -0
  783. package/dist/TPriorityQueue-a5eb73d4.esm.js +360 -0
  784. package/dist/TQueue-2c224826.esm.js +324 -0
  785. package/dist/TQueue-5621ef6e.cjs.dev.js +353 -0
  786. package/dist/TQueue-67ccf55b.cjs.prod.js +353 -0
  787. package/dist/TRandom-557dc8e1.cjs.prod.js +203 -0
  788. package/dist/TRandom-c974e739.cjs.dev.js +203 -0
  789. package/dist/TRandom-dbfd1b25.esm.js +192 -0
  790. package/dist/TReentrantLock-5f7cba2d.cjs.dev.js +456 -0
  791. package/dist/TReentrantLock-83290260.esm.js +435 -0
  792. package/dist/TReentrantLock-e6ee830e.cjs.prod.js +456 -0
  793. package/dist/TRef-38eac0f0.cjs.dev.js +152 -0
  794. package/dist/TRef-bb02383a.esm.js +135 -0
  795. package/dist/TRef-f7b2bc6f.cjs.prod.js +152 -0
  796. package/dist/TSemaphore-28d87428.cjs.prod.js +197 -0
  797. package/dist/TSemaphore-3cf15f77.cjs.dev.js +197 -0
  798. package/dist/TSemaphore-9a746009.esm.js +183 -0
  799. package/dist/TSet-1dca2ef3.cjs.dev.js +444 -0
  800. package/dist/TSet-677ac73c.cjs.prod.js +444 -0
  801. package/dist/TSet-91c5d646.esm.js +412 -0
  802. package/dist/Take-880079f7.esm.js +214 -0
  803. package/dist/Take-bfdbd28d.cjs.dev.js +236 -0
  804. package/dist/Take-e40627bd.cjs.prod.js +236 -0
  805. package/dist/TestAnnotation-73be7a68.cjs.dev.js +135 -0
  806. package/dist/TestAnnotation-b9b93d03.cjs.prod.js +135 -0
  807. package/dist/TestAnnotation-f4477615.esm.js +124 -0
  808. package/dist/TestAnnotationMap-11d08509.esm.js +114 -0
  809. package/dist/TestAnnotationMap-80c87410.cjs.dev.js +125 -0
  810. package/dist/TestAnnotationMap-e946bab5.cjs.prod.js +125 -0
  811. package/dist/TestAnnotations-14444032.cjs.prod.js +97 -0
  812. package/dist/TestAnnotations-39f7e011.esm.js +91 -0
  813. package/dist/TestAnnotations-ee0f8c79.cjs.dev.js +97 -0
  814. package/dist/TestClock-30ba14e8.cjs.prod.js +581 -0
  815. package/dist/TestClock-ab72e391.esm.js +565 -0
  816. package/dist/TestClock-d782f3ee.cjs.dev.js +581 -0
  817. package/dist/TestConfig-0d2c885c.esm.js +33 -0
  818. package/dist/TestConfig-1a73e844.cjs.prod.js +37 -0
  819. package/dist/TestConfig-e5ffa946.cjs.dev.js +37 -0
  820. package/dist/TestContext-61178585.esm.js +36 -0
  821. package/dist/TestContext-eebb1aad.cjs.dev.js +41 -0
  822. package/dist/TestContext-f76f750e.cjs.prod.js +41 -0
  823. package/dist/TestLive-61a5e471.esm.js +55 -0
  824. package/dist/TestLive-dc458127.cjs.dev.js +60 -0
  825. package/dist/TestLive-e5d614fe.cjs.prod.js +60 -0
  826. package/dist/TestServices-310ebe14.esm.js +306 -0
  827. package/dist/TestServices-7a60d735.cjs.dev.js +341 -0
  828. package/dist/TestServices-b3af20a3.cjs.prod.js +341 -0
  829. package/dist/TestSized-6c1abc21.cjs.dev.js +64 -0
  830. package/dist/TestSized-745ac7e5.esm.js +58 -0
  831. package/dist/TestSized-a9a87d64.cjs.prod.js +64 -0
  832. package/dist/Tracer-3cd1e3bc.cjs.prod.js +81 -0
  833. package/dist/Tracer-435e56fd.cjs.dev.js +81 -0
  834. package/dist/Tracer-da65ce12.esm.js +75 -0
  835. package/dist/Tuple-27ecf3a1.cjs.prod.js +199 -0
  836. package/dist/Tuple-75d2a389.cjs.dev.js +199 -0
  837. package/dist/Tuple-eefd2c03.esm.js +187 -0
  838. package/dist/Unify-118c2d56.esm.js +45 -0
  839. package/dist/Unify-99be0499.cjs.dev.js +48 -0
  840. package/dist/Unify-e86fd412.cjs.prod.js +48 -0
  841. package/dist/Utils-80c21479.esm.js +362 -0
  842. package/dist/Utils-864e1d48.cjs.prod.js +370 -0
  843. package/dist/Utils-b0c14d1b.cjs.dev.js +370 -0
  844. package/dist/boundaries-03c7494a.cjs.dev.js +54 -0
  845. package/dist/boundaries-52029180.esm.js +48 -0
  846. package/dist/boundaries-5d1a46e1.cjs.prod.js +54 -0
  847. package/dist/cache-66637407.cjs.dev.js +523 -0
  848. package/dist/cache-c88afdc0.cjs.prod.js +523 -0
  849. package/dist/cache-d62912e6.esm.js +514 -0
  850. package/dist/childExecutorDecision-2b30946c.cjs.prod.js +98 -0
  851. package/dist/childExecutorDecision-a7b466d2.esm.js +85 -0
  852. package/dist/childExecutorDecision-ad3db696.cjs.dev.js +98 -0
  853. package/dist/circular-08fb0138.esm.js +311 -0
  854. package/dist/circular-5c436934.cjs.dev.js +107 -0
  855. package/dist/circular-7eed8a92.cjs.prod.js +341 -0
  856. package/dist/circular-c8f8e360.cjs.prod.js +107 -0
  857. package/dist/circular-d08ca815.cjs.dev.js +341 -0
  858. package/dist/circular-e463e1e6.esm.js +82 -0
  859. package/dist/config-10f2a1d1.cjs.dev.js +474 -0
  860. package/dist/config-78feb1ac.cjs.prod.js +474 -0
  861. package/dist/config-b039b99f.esm.js +428 -0
  862. package/dist/configError-1686533e.cjs.dev.js +323 -0
  863. package/dist/configError-6a3652f8.cjs.prod.js +323 -0
  864. package/dist/configError-8b2e2999.esm.js +305 -0
  865. package/dist/configProvider-2b177eac.cjs.prod.js +447 -0
  866. package/dist/configProvider-c997961d.esm.js +428 -0
  867. package/dist/configProvider-e2eb112d.cjs.dev.js +447 -0
  868. package/dist/configSecret-5812fa69.cjs.dev.js +74 -0
  869. package/dist/configSecret-6e9eaf9d.esm.js +66 -0
  870. package/dist/configSecret-ecb6c5b3.cjs.prod.js +74 -0
  871. package/dist/core-20a91d69.cjs.prod.js +1072 -0
  872. package/dist/core-64ab7ff5.esm.js +3225 -0
  873. package/dist/core-6e50c01f.cjs.dev.js +1072 -0
  874. package/dist/core-ac668be0.cjs.dev.js +3502 -0
  875. package/dist/core-c2eb171a.cjs.prod.js +3502 -0
  876. package/dist/core-effect-023f4abe.cjs.prod.js +1030 -0
  877. package/dist/core-effect-57445976.esm.js +902 -0
  878. package/dist/core-effect-780f9db7.cjs.dev.js +1030 -0
  879. package/dist/core-f6cae6d7.esm.js +1032 -0
  880. package/dist/dataSource-1f41ea46.esm.js +60 -0
  881. package/dist/dataSource-7ec08fa5.cjs.prod.js +74 -0
  882. package/dist/dataSource-e56e2a99.cjs.dev.js +74 -0
  883. package/dist/declarations/src/Bigint.d.ts +22 -22
  884. package/dist/declarations/src/Boolean.d.ts +15 -15
  885. package/dist/declarations/src/Brand.d.ts +20 -20
  886. package/dist/declarations/src/Cache.d.ts +14 -14
  887. package/dist/declarations/src/Cause.d.ts +81 -81
  888. package/dist/declarations/src/Channel.d.ts +117 -117
  889. package/dist/declarations/src/ChannelChildExecutorDecision.d.ts +16 -16
  890. package/dist/declarations/src/ChannelMergeDecision.d.ts +11 -11
  891. package/dist/declarations/src/ChannelMergeState.d.ts +17 -17
  892. package/dist/declarations/src/ChannelMergeStrategy.d.ts +13 -13
  893. package/dist/declarations/src/ChannelSingleProducerAsyncInput.d.ts +5 -5
  894. package/dist/declarations/src/ChannelUpstreamPullRequest.d.ts +13 -13
  895. package/dist/declarations/src/ChannelUpstreamPullStrategy.d.ts +13 -13
  896. package/dist/declarations/src/Chunk.d.ts +84 -84
  897. package/dist/declarations/src/Clock.d.ts +13 -13
  898. package/dist/declarations/src/Config.d.ts +40 -40
  899. package/dist/declarations/src/ConfigError.d.ts +31 -31
  900. package/dist/declarations/src/ConfigProvider.d.ts +27 -27
  901. package/dist/declarations/src/ConfigProviderPathPatch.d.ts +11 -11
  902. package/dist/declarations/src/ConfigSecret.d.ts +12 -12
  903. package/dist/declarations/src/Console.d.ts +26 -26
  904. package/dist/declarations/src/Context.d.ts +24 -24
  905. package/dist/declarations/src/Data.d.ts +22 -22
  906. package/dist/declarations/src/DefaultServices.d.ts +4 -4
  907. package/dist/declarations/src/Deferred.d.ts +26 -26
  908. package/dist/declarations/src/Differ.d.ts +34 -34
  909. package/dist/declarations/src/Duration.d.ts +37 -37
  910. package/dist/declarations/src/Effect.d.ts +351 -351
  911. package/dist/declarations/src/Effectable.d.ts +16 -16
  912. package/dist/declarations/src/Either.d.ts +35 -35
  913. package/dist/declarations/src/Encoding.d.ts +15 -15
  914. package/dist/declarations/src/Equal.d.ts +6 -6
  915. package/dist/declarations/src/Equivalence.d.ts +20 -20
  916. package/dist/declarations/src/Error.d.ts +4 -4
  917. package/dist/declarations/src/ExecutionStrategy.d.ts +12 -12
  918. package/dist/declarations/src/Exit.d.ts +41 -41
  919. package/dist/declarations/src/Fiber.d.ts +57 -57
  920. package/dist/declarations/src/FiberId.d.ts +23 -23
  921. package/dist/declarations/src/FiberRef.d.ts +49 -49
  922. package/dist/declarations/src/FiberRefs.d.ts +14 -14
  923. package/dist/declarations/src/FiberRefsPatch.d.ts +11 -11
  924. package/dist/declarations/src/FiberStatus.d.ts +14 -14
  925. package/dist/declarations/src/Function.d.ts +24 -24
  926. package/dist/declarations/src/GlobalValue.d.ts +1 -1
  927. package/dist/declarations/src/GroupBy.d.ts +9 -9
  928. package/dist/declarations/src/HKT.d.ts +5 -5
  929. package/dist/declarations/src/Hash.d.ts +12 -12
  930. package/dist/declarations/src/HashMap.d.ts +37 -37
  931. package/dist/declarations/src/HashSet.d.ts +28 -28
  932. package/dist/declarations/src/Hub.d.ts +16 -16
  933. package/dist/declarations/src/Inspectable.d.ts +6 -6
  934. package/dist/declarations/src/KeyedPool.d.ts +12 -12
  935. package/dist/declarations/src/Layer.d.ts +70 -70
  936. package/dist/declarations/src/List.d.ts +50 -50
  937. package/dist/declarations/src/LogLevel.d.ts +27 -27
  938. package/dist/declarations/src/LogSpan.d.ts +3 -3
  939. package/dist/declarations/src/Logger.d.ts +33 -33
  940. package/dist/declarations/src/Metric.d.ts +55 -55
  941. package/dist/declarations/src/MetricBoundaries.d.ts +8 -8
  942. package/dist/declarations/src/MetricHook.d.ts +20 -20
  943. package/dist/declarations/src/MetricKey.d.ts +21 -21
  944. package/dist/declarations/src/MetricKeyType.d.ts +35 -35
  945. package/dist/declarations/src/MetricLabel.d.ts +6 -6
  946. package/dist/declarations/src/MetricPair.d.ts +8 -8
  947. package/dist/declarations/src/MetricPolling.d.ts +11 -11
  948. package/dist/declarations/src/MetricRegistry.d.ts +5 -5
  949. package/dist/declarations/src/MetricState.d.ts +33 -33
  950. package/dist/declarations/src/MutableHashMap.d.ts +12 -12
  951. package/dist/declarations/src/MutableHashSet.d.ts +9 -9
  952. package/dist/declarations/src/MutableList.d.ts +13 -13
  953. package/dist/declarations/src/MutableQueue.d.ts +16 -16
  954. package/dist/declarations/src/MutableRef.d.ts +18 -18
  955. package/dist/declarations/src/NonEmptyIterable.d.ts +4 -4
  956. package/dist/declarations/src/Number.d.ts +22 -22
  957. package/dist/declarations/src/Option.d.ts +69 -69
  958. package/dist/declarations/src/Order.d.ts +28 -28
  959. package/dist/declarations/src/Ordering.d.ts +7 -7
  960. package/dist/declarations/src/Pipeable.d.ts +3 -3
  961. package/dist/declarations/src/Pool.d.ts +11 -11
  962. package/dist/declarations/src/Predicate.d.ts +42 -42
  963. package/dist/declarations/src/Queue.d.ts +44 -44
  964. package/dist/declarations/src/Random.d.ts +11 -11
  965. package/dist/declarations/src/ReadonlyArray.d.ts +139 -139
  966. package/dist/declarations/src/ReadonlyRecord.d.ts +25 -25
  967. package/dist/declarations/src/RedBlackTree.d.ts +40 -40
  968. package/dist/declarations/src/Ref.d.ts +20 -20
  969. package/dist/declarations/src/Reloadable.d.ts +13 -13
  970. package/dist/declarations/src/Request.d.ts +29 -29
  971. package/dist/declarations/src/RequestBlock.d.ts +16 -16
  972. package/dist/declarations/src/RequestResolver.d.ts +23 -23
  973. package/dist/declarations/src/Resource.d.ts +10 -10
  974. package/dist/declarations/src/Runtime.d.ts +22 -22
  975. package/dist/declarations/src/RuntimeFlags.d.ts +38 -38
  976. package/dist/declarations/src/RuntimeFlagsPatch.d.ts +18 -18
  977. package/dist/declarations/src/STM.d.ts +140 -140
  978. package/dist/declarations/src/Schedule.d.ts +106 -106
  979. package/dist/declarations/src/ScheduleDecision.d.ts +8 -8
  980. package/dist/declarations/src/ScheduleInterval.d.ts +16 -16
  981. package/dist/declarations/src/ScheduleIntervals.d.ts +14 -14
  982. package/dist/declarations/src/Scheduler.d.ts +34 -34
  983. package/dist/declarations/src/Scope.d.ts +18 -18
  984. package/dist/declarations/src/ScopedCache.d.ts +9 -9
  985. package/dist/declarations/src/ScopedRef.d.ts +10 -10
  986. package/dist/declarations/src/Sink.d.ts +115 -115
  987. package/dist/declarations/src/SortedMap.d.ts +21 -21
  988. package/dist/declarations/src/SortedSet.d.ts +24 -24
  989. package/dist/declarations/src/Stream.d.ts +303 -303
  990. package/dist/declarations/src/StreamEmit.d.ts +3 -3
  991. package/dist/declarations/src/StreamHaltStrategy.d.ts +16 -16
  992. package/dist/declarations/src/String.d.ts +50 -50
  993. package/dist/declarations/src/Struct.d.ts +6 -6
  994. package/dist/declarations/src/SubscriptionRef.d.ts +27 -27
  995. package/dist/declarations/src/Supervisor.d.ts +23 -23
  996. package/dist/declarations/src/Symbol.d.ts +3 -3
  997. package/dist/declarations/src/SynchronizedRef.d.ts +28 -28
  998. package/dist/declarations/src/TArray.d.ts +46 -46
  999. package/dist/declarations/src/TDeferred.d.ts +12 -12
  1000. package/dist/declarations/src/THub.d.ts +18 -18
  1001. package/dist/declarations/src/TMap.d.ts +46 -46
  1002. package/dist/declarations/src/TPriorityQueue.d.ts +23 -23
  1003. package/dist/declarations/src/TQueue.d.ts +36 -36
  1004. package/dist/declarations/src/TRandom.d.ts +12 -12
  1005. package/dist/declarations/src/TReentrantLock.d.ts +24 -24
  1006. package/dist/declarations/src/TRef.d.ts +19 -19
  1007. package/dist/declarations/src/TSemaphore.d.ts +17 -17
  1008. package/dist/declarations/src/TSet.d.ts +35 -35
  1009. package/dist/declarations/src/Take.d.ts +25 -25
  1010. package/dist/declarations/src/TestAnnotation.d.ts +12 -12
  1011. package/dist/declarations/src/TestAnnotationMap.d.ts +11 -11
  1012. package/dist/declarations/src/TestAnnotations.d.ts +7 -7
  1013. package/dist/declarations/src/TestClock.d.ts +16 -16
  1014. package/dist/declarations/src/TestConfig.d.ts +4 -4
  1015. package/dist/declarations/src/TestContext.d.ts +3 -3
  1016. package/dist/declarations/src/TestLive.d.ts +6 -6
  1017. package/dist/declarations/src/TestServices.d.ts +35 -35
  1018. package/dist/declarations/src/TestSized.d.ts +7 -7
  1019. package/dist/declarations/src/Tracer.d.ts +13 -13
  1020. package/dist/declarations/src/Tuple.d.ts +12 -12
  1021. package/dist/declarations/src/Types.d.ts +10 -10
  1022. package/dist/declarations/src/Unify.d.ts +9 -9
  1023. package/dist/declarations/src/Utils.d.ts +29 -29
  1024. package/dist/declarations/src/index.d.ts +169 -141
  1025. package/dist/declarations/src/index.d.ts.map +1 -1
  1026. package/dist/defaultServices-452aebad.cjs.prod.js +388 -0
  1027. package/dist/defaultServices-b9ca1236.esm.js +359 -0
  1028. package/dist/defaultServices-e9a9b935.cjs.dev.js +388 -0
  1029. package/dist/effect.cjs.dev.js +199 -193
  1030. package/dist/effect.cjs.mjs +7 -1
  1031. package/dist/effect.cjs.prod.js +199 -193
  1032. package/dist/effect.esm.js +192 -192
  1033. package/dist/fiber-1132297b.cjs.dev.js +411 -0
  1034. package/dist/fiber-2975db3a.cjs.prod.js +411 -0
  1035. package/dist/fiber-8fb398f3.esm.js +363 -0
  1036. package/dist/fiberRefs-64c35250.cjs.prod.js +181 -0
  1037. package/dist/fiberRefs-69cce1a0.esm.js +169 -0
  1038. package/dist/fiberRefs-a7e00f7e.cjs.dev.js +181 -0
  1039. package/dist/fiberRuntime-9d6d53be.cjs.prod.js +3012 -0
  1040. package/dist/fiberRuntime-ac7fae54.cjs.dev.js +3012 -0
  1041. package/dist/fiberRuntime-bfcf5f49.esm.js +2857 -0
  1042. package/dist/groupBy-d11b31b1.esm.js +206 -0
  1043. package/dist/groupBy-e1d3c5e8.cjs.dev.js +216 -0
  1044. package/dist/groupBy-f0a83f90.cjs.prod.js +216 -0
  1045. package/dist/hook-0bf192b2.cjs.prod.js +371 -0
  1046. package/dist/hook-9e86d119.cjs.dev.js +371 -0
  1047. package/dist/hook-fd61107b.esm.js +362 -0
  1048. package/dist/key-340a2bae.esm.js +68 -0
  1049. package/dist/key-6ac569ca.cjs.dev.js +79 -0
  1050. package/dist/key-a79acfe7.cjs.prod.js +79 -0
  1051. package/dist/keyType-681c1c4a.cjs.prod.js +236 -0
  1052. package/dist/keyType-869d90f8.esm.js +218 -0
  1053. package/dist/keyType-c1e7cfc5.cjs.dev.js +236 -0
  1054. package/dist/label-0cc6c9a0.esm.js +40 -0
  1055. package/dist/label-246fb11d.cjs.dev.js +44 -0
  1056. package/dist/label-3e143765.cjs.prod.js +44 -0
  1057. package/dist/layer-35828af7.esm.js +596 -0
  1058. package/dist/layer-db9c42be.cjs.prod.js +658 -0
  1059. package/dist/layer-f0c8023d.cjs.dev.js +658 -0
  1060. package/dist/mergeDecision-d31cb28c.esm.js +78 -0
  1061. package/dist/mergeDecision-e457a76b.cjs.dev.js +86 -0
  1062. package/dist/mergeDecision-e483c280.cjs.prod.js +86 -0
  1063. package/dist/mergeState-1325df20.esm.js +96 -0
  1064. package/dist/mergeState-83204f38.cjs.dev.js +109 -0
  1065. package/dist/mergeState-dba66248.cjs.prod.js +109 -0
  1066. package/dist/mergeStrategy-845a1279.cjs.prod.js +72 -0
  1067. package/dist/mergeStrategy-a88b5442.esm.js +64 -0
  1068. package/dist/mergeStrategy-b19dc19a.cjs.dev.js +72 -0
  1069. package/dist/pair-08a8685e.cjs.dev.js +42 -0
  1070. package/dist/pair-5bb3eef4.esm.js +38 -0
  1071. package/dist/pair-e5443c93.cjs.prod.js +42 -0
  1072. package/dist/patch-4671ab7f.cjs.dev.js +132 -0
  1073. package/dist/patch-743d675c.esm.js +127 -0
  1074. package/dist/patch-f27e9f08.cjs.prod.js +132 -0
  1075. package/dist/pathPatch-ded405f6.cjs.prod.js +90 -0
  1076. package/dist/pathPatch-e46d4168.cjs.dev.js +90 -0
  1077. package/dist/pathPatch-f393ab1b.esm.js +83 -0
  1078. package/dist/pool-7d5c25ef.esm.js +271 -0
  1079. package/dist/pool-975b7d21.cjs.prod.js +278 -0
  1080. package/dist/pool-cd9f1284.cjs.dev.js +278 -0
  1081. package/dist/query-12e387cf.cjs.dev.js +104 -0
  1082. package/dist/query-242f7fda.esm.js +97 -0
  1083. package/dist/query-eb8a7001.cjs.prod.js +104 -0
  1084. package/dist/queue-0dbc2b3f.cjs.dev.js +538 -0
  1085. package/dist/queue-f70dda1a.cjs.prod.js +538 -0
  1086. package/dist/queue-f74db567.esm.js +505 -0
  1087. package/dist/registry-92c00ecd.cjs.prod.js +114 -0
  1088. package/dist/registry-9e9ae2c7.cjs.dev.js +114 -0
  1089. package/dist/registry-c59aeb06.esm.js +111 -0
  1090. package/dist/runtime-0ada41f2.cjs.prod.js +288 -0
  1091. package/dist/runtime-bcdd4416.esm.js +266 -0
  1092. package/dist/runtime-f8d0f39b.cjs.dev.js +288 -0
  1093. package/dist/schedule-18b063cb.cjs.dev.js +956 -0
  1094. package/dist/schedule-566ae18c.esm.js +843 -0
  1095. package/dist/schedule-f918adf5.cjs.prod.js +956 -0
  1096. package/dist/scopedRef-0fdefef8.esm.js +49 -0
  1097. package/dist/scopedRef-50091b28.cjs.dev.js +55 -0
  1098. package/dist/scopedRef-d6396f06.cjs.prod.js +55 -0
  1099. package/dist/singleProducerAsyncInput-5b2ede75.esm.js +191 -0
  1100. package/dist/singleProducerAsyncInput-bd600183.cjs.prod.js +193 -0
  1101. package/dist/singleProducerAsyncInput-f3dd657f.cjs.dev.js +193 -0
  1102. package/dist/sink-637a9670.esm.js +2877 -0
  1103. package/dist/sink-6a1db2b0.cjs.prod.js +3094 -0
  1104. package/dist/sink-bb64c8a6.cjs.dev.js +3094 -0
  1105. package/dist/state-0d29362f.cjs.prod.js +227 -0
  1106. package/dist/state-2c6abdb1.esm.js +209 -0
  1107. package/dist/state-8a8a647c.cjs.dev.js +227 -0
  1108. package/dist/stm-2b8fa344.cjs.dev.js +678 -0
  1109. package/dist/stm-6937f6f2.esm.js +582 -0
  1110. package/dist/stm-e3401389.cjs.prod.js +678 -0
  1111. package/dist/stream-22ea5a61.cjs.prod.js +3649 -0
  1112. package/dist/stream-7bc5bfac.cjs.dev.js +3649 -0
  1113. package/dist/stream-e44fba40.esm.js +3355 -0
  1114. package/dist/synchronizedRef-1ceb6bd3.esm.js +53 -0
  1115. package/dist/synchronizedRef-58a64ffe.cjs.dev.js +62 -0
  1116. package/dist/synchronizedRef-6cfe9354.cjs.prod.js +62 -0
  1117. package/dist/tArray-36a6e713.cjs.dev.js +330 -0
  1118. package/dist/tArray-79024770.esm.js +287 -0
  1119. package/dist/tArray-a211cc29.cjs.prod.js +330 -0
  1120. package/dist/tMap-907e37f4.esm.js +492 -0
  1121. package/dist/tMap-9c22a2ff.cjs.prod.js +535 -0
  1122. package/dist/tMap-fd504724.cjs.dev.js +535 -0
  1123. package/dist/tQueue-4b66ca7b.cjs.prod.js +367 -0
  1124. package/dist/tQueue-565f8994.cjs.dev.js +367 -0
  1125. package/dist/tQueue-74395d76.esm.js +331 -0
  1126. package/dist/tRef-565db536.cjs.dev.js +133 -0
  1127. package/dist/tRef-74dff65b.cjs.prod.js +133 -0
  1128. package/dist/tRef-fc8ff438.esm.js +115 -0
  1129. package/dist/take-05ea3c27.cjs.prod.js +152 -0
  1130. package/dist/take-0d5e0eab.esm.js +130 -0
  1131. package/dist/take-f87477f8.cjs.dev.js +152 -0
  1132. package/dist/upstreamPullRequest-705e868d.cjs.prod.js +79 -0
  1133. package/dist/upstreamPullRequest-c08f06a4.cjs.dev.js +79 -0
  1134. package/dist/upstreamPullRequest-fed99e29.esm.js +71 -0
  1135. package/dist/upstreamPullStrategy-0ccf2960.cjs.dev.js +81 -0
  1136. package/dist/upstreamPullStrategy-34452db1.cjs.prod.js +81 -0
  1137. package/dist/upstreamPullStrategy-d5d1aa92.esm.js +71 -0
  1138. package/package.json +1 -1
  1139. package/dist/Bigint-1c684209.esm.js +0 -370
  1140. package/dist/Bigint-504df838.cjs.dev.js +0 -392
  1141. package/dist/Bigint-d1a7e44e.cjs.prod.js +0 -392
  1142. package/dist/Boolean-7513c999.cjs.prod.js +0 -264
  1143. package/dist/Boolean-9427fc24.cjs.dev.js +0 -264
  1144. package/dist/Boolean-f564d31a.esm.js +0 -248
  1145. package/dist/Brand-c3918667.cjs.dev.js +0 -224
  1146. package/dist/Brand-fa4e9f22.esm.js +0 -215
  1147. package/dist/Brand-ff4af468.cjs.prod.js +0 -224
  1148. package/dist/Cache-447337f2.esm.js +0 -120
  1149. package/dist/Cache-4b4ea2b3.cjs.prod.js +0 -127
  1150. package/dist/Cache-62ebdae3.cjs.dev.js +0 -127
  1151. package/dist/Cause-8be0b9a6.esm.js +0 -730
  1152. package/dist/Cause-b769f517.cjs.prod.js +0 -791
  1153. package/dist/Cause-d77e20dc.cjs.dev.js +0 -791
  1154. package/dist/Channel-2039c280.cjs.dev.js +0 -1217
  1155. package/dist/Channel-806a0a5a.esm.js +0 -1109
  1156. package/dist/Channel-dcff73a4.cjs.prod.js +0 -1217
  1157. package/dist/ChannelChildExecutorDecision-2d3c20b1.esm.js +0 -125
  1158. package/dist/ChannelChildExecutorDecision-adce4b58.cjs.dev.js +0 -136
  1159. package/dist/ChannelChildExecutorDecision-fc90c987.cjs.prod.js +0 -136
  1160. package/dist/ChannelMergeDecision-39e12893.cjs.prod.js +0 -78
  1161. package/dist/ChannelMergeDecision-4488ba22.esm.js +0 -70
  1162. package/dist/ChannelMergeDecision-f05da806.cjs.dev.js +0 -78
  1163. package/dist/ChannelMergeState-65723a71.cjs.dev.js +0 -125
  1164. package/dist/ChannelMergeState-937282d2.esm.js +0 -114
  1165. package/dist/ChannelMergeState-ab626a77.cjs.prod.js +0 -125
  1166. package/dist/ChannelMergeStrategy-c2f956a9.esm.js +0 -95
  1167. package/dist/ChannelMergeStrategy-d5bdc89d.cjs.prod.js +0 -104
  1168. package/dist/ChannelMergeStrategy-d956e3fa.cjs.dev.js +0 -104
  1169. package/dist/ChannelSingleProducerAsyncInput-00708a29.esm.js +0 -52
  1170. package/dist/ChannelSingleProducerAsyncInput-90f3b171.cjs.prod.js +0 -55
  1171. package/dist/ChannelSingleProducerAsyncInput-ecc79242.cjs.dev.js +0 -55
  1172. package/dist/ChannelUpstreamPullRequest-011526e6.esm.js +0 -95
  1173. package/dist/ChannelUpstreamPullRequest-6a610523.cjs.dev.js +0 -104
  1174. package/dist/ChannelUpstreamPullRequest-d7413c53.cjs.prod.js +0 -104
  1175. package/dist/ChannelUpstreamPullStrategy-0af49b72.esm.js +0 -94
  1176. package/dist/ChannelUpstreamPullStrategy-6e0a338e.cjs.prod.js +0 -103
  1177. package/dist/ChannelUpstreamPullStrategy-90ec240c.cjs.dev.js +0 -103
  1178. package/dist/Chunk-937f4423.cjs.dev.js +0 -1248
  1179. package/dist/Chunk-98371336.esm.js +0 -1167
  1180. package/dist/Chunk-f001938d.cjs.prod.js +0 -1248
  1181. package/dist/Clock-27c1110d.cjs.prod.js +0 -97
  1182. package/dist/Clock-589e9dc5.cjs.dev.js +0 -97
  1183. package/dist/Clock-ab907687.esm.js +0 -88
  1184. package/dist/Config-50e56bbd.cjs.prod.js +0 -393
  1185. package/dist/Config-7e7f7335.cjs.dev.js +0 -393
  1186. package/dist/Config-a3a06665.esm.js +0 -358
  1187. package/dist/ConfigError-5801d561.esm.js +0 -206
  1188. package/dist/ConfigError-684b6267.cjs.dev.js +0 -225
  1189. package/dist/ConfigError-f5303a19.cjs.prod.js +0 -225
  1190. package/dist/ConfigProvider-0aeb6513.esm.js +0 -220
  1191. package/dist/ConfigProvider-b47b08f3.cjs.dev.js +0 -240
  1192. package/dist/ConfigProvider-e278c5f7.cjs.prod.js +0 -240
  1193. package/dist/ConfigProviderPathPatch-78826e8c.cjs.dev.js +0 -86
  1194. package/dist/ConfigProviderPathPatch-97b52760.esm.js +0 -79
  1195. package/dist/ConfigProviderPathPatch-bb5f5228.cjs.prod.js +0 -86
  1196. package/dist/ConfigSecret-2db4c372.cjs.prod.js +0 -83
  1197. package/dist/ConfigSecret-646df696.esm.js +0 -74
  1198. package/dist/ConfigSecret-a10a12aa.cjs.dev.js +0 -83
  1199. package/dist/Console-b92ceaf0.esm.js +0 -247
  1200. package/dist/Console-d4590f3a.cjs.prod.js +0 -271
  1201. package/dist/Console-f063615c.cjs.dev.js +0 -271
  1202. package/dist/Context-119d62eb.cjs.prod.js +0 -327
  1203. package/dist/Context-231e9c1b.cjs.prod.js +0 -222
  1204. package/dist/Context-48179faa.esm.js +0 -312
  1205. package/dist/Context-5099940c.cjs.dev.js +0 -222
  1206. package/dist/Context-fcee7bba.esm.js +0 -208
  1207. package/dist/Context-fdaa5c44.cjs.dev.js +0 -327
  1208. package/dist/Data-3389525f.cjs.dev.js +0 -237
  1209. package/dist/Data-815a1868.cjs.prod.js +0 -237
  1210. package/dist/Data-bad1ffeb.esm.js +0 -224
  1211. package/dist/DefaultServices-848d6929.cjs.dev.js +0 -34
  1212. package/dist/DefaultServices-8c298120.esm.js +0 -30
  1213. package/dist/DefaultServices-9ea98d30.cjs.prod.js +0 -34
  1214. package/dist/Deferred-143efa7b.cjs.dev.js +0 -253
  1215. package/dist/Deferred-554d3588.esm.js +0 -230
  1216. package/dist/Deferred-77579e00.cjs.prod.js +0 -253
  1217. package/dist/Differ-0069a8c0.cjs.dev.js +0 -992
  1218. package/dist/Differ-3be1df41.esm.js +0 -975
  1219. package/dist/Differ-cbfa45cb.cjs.prod.js +0 -992
  1220. package/dist/Duration-205d0b80.cjs.prod.js +0 -500
  1221. package/dist/Duration-5e9f2327.esm.js +0 -467
  1222. package/dist/Duration-8b174e0b.cjs.dev.js +0 -500
  1223. package/dist/Effect-6713972b.cjs.prod.js +0 -3740
  1224. package/dist/Effect-d362f43a.cjs.dev.js +0 -3740
  1225. package/dist/Effect-d5910dae.esm.js +0 -3417
  1226. package/dist/Effectable-2c8e8441.cjs.prod.js +0 -99
  1227. package/dist/Effectable-954172fc.cjs.prod.js +0 -181
  1228. package/dist/Effectable-a76b6aa1.esm.js +0 -158
  1229. package/dist/Effectable-bc017f96.cjs.dev.js +0 -99
  1230. package/dist/Effectable-e85a1847.cjs.dev.js +0 -181
  1231. package/dist/Effectable-ec9e4204.esm.js +0 -89
  1232. package/dist/Either-09270bbc.esm.js +0 -473
  1233. package/dist/Either-34ce9059.cjs.dev.js +0 -178
  1234. package/dist/Either-41cb7522.cjs.prod.js +0 -178
  1235. package/dist/Either-ae722a9e.cjs.dev.js +0 -502
  1236. package/dist/Either-be9c40b9.esm.js +0 -163
  1237. package/dist/Either-d995ebb4.cjs.prod.js +0 -502
  1238. package/dist/Encoding-0d990bbf.esm.js +0 -295
  1239. package/dist/Encoding-39f7d9a8.cjs.dev.js +0 -309
  1240. package/dist/Encoding-82d009b9.cjs.prod.js +0 -309
  1241. package/dist/Equal-7d4ae7e7.esm.js +0 -65
  1242. package/dist/Equal-8654b1af.cjs.dev.js +0 -71
  1243. package/dist/Equal-ed1e8c3c.cjs.prod.js +0 -71
  1244. package/dist/Equivalence-87295c78.cjs.prod.js +0 -238
  1245. package/dist/Equivalence-a4b5f56d.cjs.dev.js +0 -238
  1246. package/dist/Equivalence-e5c9cba4.esm.js +0 -218
  1247. package/dist/Error-7e84d828.esm.js +0 -53
  1248. package/dist/Error-be89adc9.cjs.prod.js +0 -57
  1249. package/dist/Error-e1ceeea7.cjs.dev.js +0 -57
  1250. package/dist/ExecutionStrategy-080f0b2b.cjs.prod.js +0 -180
  1251. package/dist/ExecutionStrategy-c6f7c490.esm.js +0 -168
  1252. package/dist/ExecutionStrategy-cd9204b4.cjs.dev.js +0 -180
  1253. package/dist/Exit-7a385294.cjs.dev.js +0 -408
  1254. package/dist/Exit-e31718e3.esm.js +0 -371
  1255. package/dist/Exit-eb04f98e.cjs.prod.js +0 -408
  1256. package/dist/Fiber-1a996e3f.cjs.dev.js +0 -521
  1257. package/dist/Fiber-38517971.esm.js +0 -473
  1258. package/dist/Fiber-a7306b77.cjs.prod.js +0 -521
  1259. package/dist/FiberId-3b23bc04.cjs.dev.js +0 -443
  1260. package/dist/FiberId-556ab9ef.esm.js +0 -422
  1261. package/dist/FiberId-95c92b7e.cjs.prod.js +0 -443
  1262. package/dist/FiberRef-6f63843b.cjs.prod.js +0 -385
  1263. package/dist/FiberRef-912b6248.cjs.dev.js +0 -385
  1264. package/dist/FiberRef-b81d5a7e.esm.js +0 -338
  1265. package/dist/FiberRefs-1a6a1b5f.cjs.prod.js +0 -135
  1266. package/dist/FiberRefs-44fda74a.cjs.dev.js +0 -135
  1267. package/dist/FiberRefs-a6ab4b8d.esm.js +0 -122
  1268. package/dist/FiberRefsPatch-549967e3.cjs.prod.js +0 -90
  1269. package/dist/FiberRefsPatch-56f10acc.cjs.dev.js +0 -90
  1270. package/dist/FiberRefsPatch-f84453c3.esm.js +0 -84
  1271. package/dist/FiberStatus-90291b8c.esm.js +0 -187
  1272. package/dist/FiberStatus-db497d70.cjs.dev.js +0 -197
  1273. package/dist/FiberStatus-ff18b445.cjs.prod.js +0 -197
  1274. package/dist/Function-52fb7d21.esm.js +0 -516
  1275. package/dist/Function-8336aeeb.cjs.prod.js +0 -538
  1276. package/dist/Function-fd10bde3.cjs.dev.js +0 -538
  1277. package/dist/GlobalValue-00457222.cjs.dev.js +0 -28
  1278. package/dist/GlobalValue-c5f1e8e5.esm.js +0 -25
  1279. package/dist/GlobalValue-f65cc41d.cjs.prod.js +0 -28
  1280. package/dist/GroupBy-cabfa667.cjs.dev.js +0 -79
  1281. package/dist/GroupBy-d0ad2148.cjs.prod.js +0 -79
  1282. package/dist/GroupBy-eef333fa.esm.js +0 -72
  1283. package/dist/Hash-039222d1.esm.js +0 -179
  1284. package/dist/Hash-2171bcec.cjs.prod.js +0 -192
  1285. package/dist/Hash-9d5502e5.cjs.dev.js +0 -192
  1286. package/dist/HashMap-2604a8b0.cjs.prod.js +0 -361
  1287. package/dist/HashMap-e644e23b.esm.js +0 -327
  1288. package/dist/HashMap-ee35ace5.cjs.dev.js +0 -361
  1289. package/dist/HashSet-206ea53b.cjs.dev.js +0 -965
  1290. package/dist/HashSet-286fb998.cjs.prod.js +0 -965
  1291. package/dist/HashSet-43b520e9.cjs.dev.js +0 -283
  1292. package/dist/HashSet-99f1529e.cjs.prod.js +0 -283
  1293. package/dist/HashSet-d051e0ea.esm.js +0 -907
  1294. package/dist/HashSet-dff2542b.esm.js +0 -256
  1295. package/dist/Hub-4223bb07.cjs.prod.js +0 -1280
  1296. package/dist/Hub-9f3d5c5d.esm.js +0 -1264
  1297. package/dist/Hub-dd9d70e7.cjs.dev.js +0 -1280
  1298. package/dist/Inspectable-46a7668e.cjs.prod.js +0 -50
  1299. package/dist/Inspectable-654412c2.cjs.dev.js +0 -50
  1300. package/dist/Inspectable-bda84223.esm.js +0 -45
  1301. package/dist/KeyedPool-0b5851a2.cjs.prod.js +0 -282
  1302. package/dist/KeyedPool-50b8f75b.esm.js +0 -273
  1303. package/dist/KeyedPool-8b979aac.cjs.dev.js +0 -282
  1304. package/dist/Layer-11122c64.cjs.dev.js +0 -687
  1305. package/dist/Layer-79fa5f4a.cjs.prod.js +0 -687
  1306. package/dist/Layer-f7be72db.esm.js +0 -623
  1307. package/dist/List-48f2b78f.cjs.prod.js +0 -912
  1308. package/dist/List-95e1e081.cjs.dev.js +0 -912
  1309. package/dist/List-c066a506.esm.js +0 -865
  1310. package/dist/LogLevel-2e6b00c7.esm.js +0 -222
  1311. package/dist/LogLevel-a609dd63.cjs.prod.js +0 -240
  1312. package/dist/LogLevel-c14e29fb.cjs.dev.js +0 -240
  1313. package/dist/LogSpan-c216a78b.cjs.prod.js +0 -46
  1314. package/dist/LogSpan-cd4b8f34.cjs.dev.js +0 -46
  1315. package/dist/LogSpan-e5cf11a5.esm.js +0 -42
  1316. package/dist/Logger-029fccab.cjs.prod.js +0 -275
  1317. package/dist/Logger-28d5e7ff.cjs.dev.js +0 -275
  1318. package/dist/Logger-52ffeafa.esm.js +0 -246
  1319. package/dist/Metric-2b4867b2.cjs.dev.js +0 -488
  1320. package/dist/Metric-cd4dfaba.cjs.prod.js +0 -488
  1321. package/dist/Metric-f2c8888b.esm.js +0 -442
  1322. package/dist/MetricBoundaries-8ef331f0.cjs.dev.js +0 -68
  1323. package/dist/MetricBoundaries-9707829f.esm.js +0 -61
  1324. package/dist/MetricBoundaries-fc377a5e.cjs.prod.js +0 -68
  1325. package/dist/MetricHook-74ebef65.esm.js +0 -80
  1326. package/dist/MetricHook-9d1ff9f5.cjs.prod.js +0 -90
  1327. package/dist/MetricHook-ebd34eea.cjs.dev.js +0 -90
  1328. package/dist/MetricKey-7536999c.cjs.dev.js +0 -130
  1329. package/dist/MetricKey-d96ef128.cjs.prod.js +0 -130
  1330. package/dist/MetricKey-fb261d1b.esm.js +0 -118
  1331. package/dist/MetricKeyType-637f6694.cjs.prod.js +0 -187
  1332. package/dist/MetricKeyType-6a10f955.esm.js +0 -168
  1333. package/dist/MetricKeyType-ed70a508.cjs.dev.js +0 -187
  1334. package/dist/MetricLabel-30df73d1.esm.js +0 -48
  1335. package/dist/MetricLabel-b6a3c628.cjs.prod.js +0 -53
  1336. package/dist/MetricLabel-e6d1cb96.cjs.dev.js +0 -53
  1337. package/dist/MetricPair-5f5f6f1b.esm.js +0 -45
  1338. package/dist/MetricPair-a1551790.cjs.prod.js +0 -50
  1339. package/dist/MetricPair-f1f0edbd.cjs.dev.js +0 -50
  1340. package/dist/MetricPolling-258af71e.esm.js +0 -167
  1341. package/dist/MetricPolling-b2accbbd.cjs.dev.js +0 -177
  1342. package/dist/MetricPolling-c6caba9d.cjs.prod.js +0 -177
  1343. package/dist/MetricRegistry-2ae45fdf.cjs.dev.js +0 -38
  1344. package/dist/MetricRegistry-44d3af51.esm.js +0 -34
  1345. package/dist/MetricRegistry-d61eb47d.cjs.prod.js +0 -38
  1346. package/dist/MetricState-a3499d98.cjs.prod.js +0 -191
  1347. package/dist/MetricState-cd7a1775.cjs.dev.js +0 -191
  1348. package/dist/MetricState-d4fcb7d0.esm.js +0 -172
  1349. package/dist/MutableHashMap-b3ab7261.esm.js +0 -142
  1350. package/dist/MutableHashMap-d6cb38d9.cjs.prod.js +0 -154
  1351. package/dist/MutableHashMap-f08d01f5.cjs.dev.js +0 -154
  1352. package/dist/MutableHashSet-9e2ea672.cjs.dev.js +0 -110
  1353. package/dist/MutableHashSet-ec9f7a0b.esm.js +0 -101
  1354. package/dist/MutableHashSet-fa860611.cjs.prod.js +0 -110
  1355. package/dist/MutableList-4ef847b7.cjs.prod.js +0 -296
  1356. package/dist/MutableList-85cf4e37.cjs.dev.js +0 -296
  1357. package/dist/MutableList-8c671944.esm.js +0 -281
  1358. package/dist/MutableQueue-3dfd5fea.cjs.dev.js +0 -215
  1359. package/dist/MutableQueue-416dfcd9.cjs.prod.js +0 -215
  1360. package/dist/MutableQueue-54a4b584.esm.js +0 -202
  1361. package/dist/MutableRef-82c6fe46.cjs.prod.js +0 -194
  1362. package/dist/MutableRef-cb4d2fc0.esm.js +0 -176
  1363. package/dist/MutableRef-ef31c15d.cjs.dev.js +0 -194
  1364. package/dist/NonEmptyIterable-26ed16e4.cjs.prod.js +0 -36
  1365. package/dist/NonEmptyIterable-7ef320e0.esm.js +0 -33
  1366. package/dist/NonEmptyIterable-b064c1af.cjs.dev.js +0 -36
  1367. package/dist/Number-d021c8f9.cjs.prod.js +0 -417
  1368. package/dist/Number-dc454336.esm.js +0 -394
  1369. package/dist/Number-dddf713e.cjs.dev.js +0 -417
  1370. package/dist/Option-1d073850.esm.js +0 -1135
  1371. package/dist/Option-837ae0da.cjs.dev.js +0 -1198
  1372. package/dist/Option-b07f2b1d.cjs.prod.js +0 -1198
  1373. package/dist/Order-2f11aa24.esm.js +0 -293
  1374. package/dist/Order-2f785421.cjs.prod.js +0 -321
  1375. package/dist/Order-cbf22e18.cjs.dev.js +0 -321
  1376. package/dist/Ordering-9892085c.esm.js +0 -97
  1377. package/dist/Ordering-e20427cc.cjs.dev.js +0 -104
  1378. package/dist/Ordering-f3e378ef.cjs.prod.js +0 -104
  1379. package/dist/Pipeable-856ddd7c.cjs.prod.js +0 -52
  1380. package/dist/Pipeable-ef202667.cjs.dev.js +0 -52
  1381. package/dist/Pipeable-fe51dc02.esm.js +0 -49
  1382. package/dist/Pool-68590a64.cjs.dev.js +0 -122
  1383. package/dist/Pool-718f79ff.cjs.prod.js +0 -122
  1384. package/dist/Pool-cdfcfabe.esm.js +0 -114
  1385. package/dist/Predicate-52271838.esm.js +0 -677
  1386. package/dist/Predicate-54d8c8de.cjs.dev.js +0 -718
  1387. package/dist/Predicate-a3fd4088.cjs.prod.js +0 -718
  1388. package/dist/Queue-48d0b9d4.cjs.dev.js +0 -394
  1389. package/dist/Queue-9f8579c0.cjs.prod.js +0 -394
  1390. package/dist/Queue-bbebbeda.esm.js +0 -362
  1391. package/dist/Random-0bdc1bcb.cjs.prod.js +0 -104
  1392. package/dist/Random-14987953.esm.js +0 -94
  1393. package/dist/Random-f495bcbc.cjs.dev.js +0 -104
  1394. package/dist/ReadonlyArray-199ff80e.esm.js +0 -1584
  1395. package/dist/ReadonlyArray-3b1a15d8.cjs.dev.js +0 -10
  1396. package/dist/ReadonlyArray-6fbc78a1.cjs.prod.js +0 -1721
  1397. package/dist/ReadonlyArray-84c71385.esm.js +0 -8
  1398. package/dist/ReadonlyArray-885e80a2.cjs.dev.js +0 -1721
  1399. package/dist/ReadonlyArray-8adb9a46.cjs.prod.js +0 -10
  1400. package/dist/ReadonlyRecord-4969b34f.cjs.prod.js +0 -568
  1401. package/dist/ReadonlyRecord-c1f5d048.esm.js +0 -544
  1402. package/dist/ReadonlyRecord-c6dc7deb.cjs.dev.js +0 -568
  1403. package/dist/RedBlackTree-22839235.esm.js +0 -1632
  1404. package/dist/RedBlackTree-59192950.cjs.prod.js +0 -1669
  1405. package/dist/RedBlackTree-98a93ec6.cjs.dev.js +0 -1669
  1406. package/dist/Ref-88c1d56d.cjs.prod.js +0 -282
  1407. package/dist/Ref-8d85fc7a.cjs.dev.js +0 -282
  1408. package/dist/Ref-9a9de951.esm.js +0 -248
  1409. package/dist/Reloadable-10cfae17.esm.js +0 -159
  1410. package/dist/Reloadable-3ca716d9.cjs.prod.js +0 -169
  1411. package/dist/Reloadable-65bf6783.cjs.dev.js +0 -169
  1412. package/dist/Request-5b794c27.cjs.dev.js +0 -190
  1413. package/dist/Request-6d646956.cjs.prod.js +0 -190
  1414. package/dist/Request-9f0b571a.esm.js +0 -175
  1415. package/dist/RequestBlock-15e7d048.cjs.prod.js +0 -124
  1416. package/dist/RequestBlock-6105623d.esm.js +0 -114
  1417. package/dist/RequestBlock-ec5299d4.cjs.dev.js +0 -124
  1418. package/dist/RequestResolver-10227a7b.esm.js +0 -213
  1419. package/dist/RequestResolver-a3fe9b72.cjs.prod.js +0 -233
  1420. package/dist/RequestResolver-bc7e6050.cjs.dev.js +0 -233
  1421. package/dist/Resource-966460b5.cjs.dev.js +0 -118
  1422. package/dist/Resource-9f1084b9.cjs.prod.js +0 -118
  1423. package/dist/Resource-afd128d6.esm.js +0 -111
  1424. package/dist/Runtime-15bf8fcd.cjs.prod.js +0 -191
  1425. package/dist/Runtime-1a63e954.cjs.dev.js +0 -191
  1426. package/dist/Runtime-4f6fc384.esm.js +0 -175
  1427. package/dist/RuntimeFlags-4d3b4ba7.esm.js +0 -344
  1428. package/dist/RuntimeFlags-a43dcce7.cjs.dev.js +0 -381
  1429. package/dist/RuntimeFlags-ef10d73a.cjs.prod.js +0 -381
  1430. package/dist/RuntimeFlagsPatch-0c131e8e.cjs.dev.js +0 -411
  1431. package/dist/RuntimeFlagsPatch-a1da6096.esm.js +0 -365
  1432. package/dist/RuntimeFlagsPatch-bfdf133d.cjs.prod.js +0 -411
  1433. package/dist/STM-2bdad2bd.cjs.dev.js +0 -1447
  1434. package/dist/STM-55e91604.esm.js +0 -1321
  1435. package/dist/STM-e6749b84.cjs.prod.js +0 -1447
  1436. package/dist/Schedule-35a9436e.cjs.prod.js +0 -1159
  1437. package/dist/Schedule-d9b0f037.cjs.dev.js +0 -1159
  1438. package/dist/Schedule-da001b13.esm.js +0 -1059
  1439. package/dist/ScheduleDecision-2ab823c2.cjs.dev.js +0 -106
  1440. package/dist/ScheduleDecision-369cf2a1.cjs.prod.js +0 -106
  1441. package/dist/ScheduleDecision-e794f66d.esm.js +0 -99
  1442. package/dist/ScheduleInterval-2db9be83.cjs.dev.js +0 -244
  1443. package/dist/ScheduleInterval-3e9b8eca.cjs.prod.js +0 -244
  1444. package/dist/ScheduleInterval-94e80ec4.esm.js +0 -229
  1445. package/dist/ScheduleIntervals-ab412802.cjs.dev.js +0 -265
  1446. package/dist/ScheduleIntervals-e6ed15fa.cjs.prod.js +0 -265
  1447. package/dist/ScheduleIntervals-ef5cd7c5.esm.js +0 -252
  1448. package/dist/Scheduler-44f252da.cjs.prod.js +0 -358
  1449. package/dist/Scheduler-6122a3ee.cjs.dev.js +0 -358
  1450. package/dist/Scheduler-d2f7e5c7.esm.js +0 -343
  1451. package/dist/Scope-0ffde3bb.esm.js +0 -131
  1452. package/dist/Scope-326194e2.cjs.prod.js +0 -143
  1453. package/dist/Scope-3cf29072.cjs.dev.js +0 -143
  1454. package/dist/ScopedCache-01a07a6d.cjs.prod.js +0 -467
  1455. package/dist/ScopedCache-77c605e8.cjs.dev.js +0 -467
  1456. package/dist/ScopedCache-9c558fd1.esm.js +0 -462
  1457. package/dist/ScopedRef-2f0e2b33.cjs.dev.js +0 -87
  1458. package/dist/ScopedRef-5c29a8a2.cjs.prod.js +0 -87
  1459. package/dist/ScopedRef-dd8a823e.esm.js +0 -80
  1460. package/dist/Sink-923b4ad8.esm.js +0 -1107
  1461. package/dist/Sink-c4ca577a.cjs.prod.js +0 -1215
  1462. package/dist/Sink-fa1f105b.cjs.dev.js +0 -1215
  1463. package/dist/SortedMap-44f47d83.esm.js +0 -190
  1464. package/dist/SortedMap-abf39a75.cjs.prod.js +0 -210
  1465. package/dist/SortedMap-b04da739.cjs.dev.js +0 -210
  1466. package/dist/SortedSet-3339ea7f.esm.js +0 -288
  1467. package/dist/SortedSet-4efa4f05.cjs.dev.js +0 -311
  1468. package/dist/SortedSet-b588ac70.cjs.prod.js +0 -311
  1469. package/dist/Stream-1d51d0be.esm.js +0 -3175
  1470. package/dist/Stream-55dd689b.cjs.prod.js +0 -3469
  1471. package/dist/Stream-b1eaedfc.cjs.dev.js +0 -3469
  1472. package/dist/StreamHaltStrategy-292ed375.cjs.dev.js +0 -214
  1473. package/dist/StreamHaltStrategy-506d4abb.cjs.prod.js +0 -214
  1474. package/dist/StreamHaltStrategy-9864a080.esm.js +0 -201
  1475. package/dist/String-9702a941.cjs.dev.js +0 -694
  1476. package/dist/String-ba45d520.esm.js +0 -648
  1477. package/dist/String-fa7c1c88.cjs.prod.js +0 -694
  1478. package/dist/Struct-3d8b2a81.cjs.prod.js +0 -141
  1479. package/dist/Struct-62f329c0.cjs.dev.js +0 -141
  1480. package/dist/Struct-8bc142d1.esm.js +0 -134
  1481. package/dist/SubscriptionRef-1eb76544.cjs.prod.js +0 -269
  1482. package/dist/SubscriptionRef-33b302b6.esm.js +0 -245
  1483. package/dist/SubscriptionRef-faf570c5.cjs.dev.js +0 -269
  1484. package/dist/Supervisor-34de9985.cjs.dev.js +0 -170
  1485. package/dist/Supervisor-3706300f.cjs.prod.js +0 -170
  1486. package/dist/Supervisor-5b9943cf.esm.js +0 -160
  1487. package/dist/Symbol-9ad0bde8.esm.js +0 -36
  1488. package/dist/Symbol-e3ea5627.cjs.dev.js +0 -40
  1489. package/dist/Symbol-e5af99ce.cjs.prod.js +0 -40
  1490. package/dist/SynchronizedRef-01f585dc.cjs.prod.js +0 -212
  1491. package/dist/SynchronizedRef-c389137f.esm.js +0 -187
  1492. package/dist/SynchronizedRef-cda883b7.cjs.dev.js +0 -212
  1493. package/dist/TArray-1200bf6a.esm.js +0 -412
  1494. package/dist/TArray-97bc3f87.cjs.prod.js +0 -455
  1495. package/dist/TArray-9bd73c38.cjs.dev.js +0 -455
  1496. package/dist/TDeferred-875fd41c.esm.js +0 -120
  1497. package/dist/TDeferred-bf21b756.cjs.prod.js +0 -129
  1498. package/dist/TDeferred-f97247d3.cjs.dev.js +0 -129
  1499. package/dist/THub-917198c0.esm.js +0 -553
  1500. package/dist/THub-c4a3e52c.cjs.dev.js +0 -570
  1501. package/dist/THub-d9d3b223.cjs.prod.js +0 -570
  1502. package/dist/TMap-459696e5.cjs.dev.js +0 -463
  1503. package/dist/TMap-786b8508.esm.js +0 -419
  1504. package/dist/TMap-a6aab3c3.cjs.prod.js +0 -463
  1505. package/dist/TPriorityQueue-31c32afb.esm.js +0 -360
  1506. package/dist/TPriorityQueue-918056c3.cjs.prod.js +0 -381
  1507. package/dist/TPriorityQueue-e8429066.cjs.dev.js +0 -381
  1508. package/dist/TQueue-adee58b8.esm.js +0 -324
  1509. package/dist/TQueue-b9593214.cjs.prod.js +0 -353
  1510. package/dist/TQueue-d1c8153e.cjs.dev.js +0 -353
  1511. package/dist/TRandom-65721a5b.cjs.prod.js +0 -203
  1512. package/dist/TRandom-677ba64f.esm.js +0 -192
  1513. package/dist/TRandom-79057bd9.cjs.dev.js +0 -203
  1514. package/dist/TReentrantLock-0dbd6074.cjs.prod.js +0 -456
  1515. package/dist/TReentrantLock-164c0898.cjs.dev.js +0 -456
  1516. package/dist/TReentrantLock-65156c11.esm.js +0 -435
  1517. package/dist/TRef-4a45f5af.cjs.dev.js +0 -152
  1518. package/dist/TRef-edd5ff88.esm.js +0 -135
  1519. package/dist/TRef-ff8497e4.cjs.prod.js +0 -152
  1520. package/dist/TSemaphore-1f5dc074.cjs.dev.js +0 -197
  1521. package/dist/TSemaphore-bccebfec.esm.js +0 -183
  1522. package/dist/TSemaphore-d1096593.cjs.prod.js +0 -197
  1523. package/dist/TSet-0f61d448.cjs.prod.js +0 -444
  1524. package/dist/TSet-48903882.cjs.dev.js +0 -444
  1525. package/dist/TSet-bd3a1de2.esm.js +0 -412
  1526. package/dist/Take-1e6b1ba3.esm.js +0 -214
  1527. package/dist/Take-7797160f.cjs.dev.js +0 -236
  1528. package/dist/Take-d245cc08.cjs.prod.js +0 -236
  1529. package/dist/TestAnnotation-5b23b64a.cjs.prod.js +0 -135
  1530. package/dist/TestAnnotation-c2b6bb64.esm.js +0 -124
  1531. package/dist/TestAnnotation-ca7ea5d9.cjs.dev.js +0 -135
  1532. package/dist/TestAnnotationMap-5ef91d33.cjs.prod.js +0 -125
  1533. package/dist/TestAnnotationMap-83b0e761.cjs.dev.js +0 -125
  1534. package/dist/TestAnnotationMap-d180214b.esm.js +0 -114
  1535. package/dist/TestAnnotations-758011e7.cjs.prod.js +0 -97
  1536. package/dist/TestAnnotations-89733ab7.cjs.dev.js +0 -97
  1537. package/dist/TestAnnotations-cf445345.esm.js +0 -91
  1538. package/dist/TestClock-0a012f75.esm.js +0 -565
  1539. package/dist/TestClock-0abac759.cjs.prod.js +0 -581
  1540. package/dist/TestClock-3bdb0c0b.cjs.dev.js +0 -581
  1541. package/dist/TestConfig-3f48c7f2.cjs.prod.js +0 -37
  1542. package/dist/TestConfig-e52495c3.esm.js +0 -33
  1543. package/dist/TestConfig-ff283076.cjs.dev.js +0 -37
  1544. package/dist/TestContext-64f40523.esm.js +0 -36
  1545. package/dist/TestContext-7a6420d3.cjs.prod.js +0 -41
  1546. package/dist/TestContext-b44d97ae.cjs.dev.js +0 -41
  1547. package/dist/TestLive-64c62bfe.cjs.dev.js +0 -60
  1548. package/dist/TestLive-906c173d.cjs.prod.js +0 -60
  1549. package/dist/TestLive-bfab4add.esm.js +0 -55
  1550. package/dist/TestServices-844e305d.esm.js +0 -306
  1551. package/dist/TestServices-944b625c.cjs.prod.js +0 -341
  1552. package/dist/TestServices-f8c51bbd.cjs.dev.js +0 -341
  1553. package/dist/TestSized-0fa739ff.cjs.prod.js +0 -64
  1554. package/dist/TestSized-3a0fa658.esm.js +0 -58
  1555. package/dist/TestSized-955a228e.cjs.dev.js +0 -64
  1556. package/dist/Tracer-1610aba4.cjs.dev.js +0 -81
  1557. package/dist/Tracer-700da80a.cjs.prod.js +0 -81
  1558. package/dist/Tracer-b07052e2.esm.js +0 -75
  1559. package/dist/Tuple-1fa12d6e.esm.js +0 -187
  1560. package/dist/Tuple-73682170.cjs.prod.js +0 -199
  1561. package/dist/Tuple-9822259f.cjs.dev.js +0 -199
  1562. package/dist/Unify-150ebcee.cjs.dev.js +0 -48
  1563. package/dist/Unify-77f78d08.cjs.prod.js +0 -48
  1564. package/dist/Unify-9d27a1f3.esm.js +0 -45
  1565. package/dist/Utils-32587b0c.cjs.dev.js +0 -370
  1566. package/dist/Utils-6484334f.cjs.prod.js +0 -370
  1567. package/dist/Utils-657e8bfa.esm.js +0 -362
  1568. package/dist/boundaries-6bacf30a.cjs.prod.js +0 -54
  1569. package/dist/boundaries-8475a9b4.esm.js +0 -48
  1570. package/dist/boundaries-c6f4c3da.cjs.dev.js +0 -54
  1571. package/dist/cache-2fa366f0.esm.js +0 -514
  1572. package/dist/cache-7b578624.cjs.prod.js +0 -523
  1573. package/dist/cache-8db60799.cjs.dev.js +0 -523
  1574. package/dist/childExecutorDecision-49f0f19c.esm.js +0 -85
  1575. package/dist/childExecutorDecision-744cd5fb.cjs.prod.js +0 -98
  1576. package/dist/childExecutorDecision-c1c3b8b6.cjs.dev.js +0 -98
  1577. package/dist/circular-1dfea59d.cjs.prod.js +0 -107
  1578. package/dist/circular-3ebc9b78.esm.js +0 -82
  1579. package/dist/circular-604e98e5.cjs.prod.js +0 -341
  1580. package/dist/circular-8088cc19.cjs.dev.js +0 -341
  1581. package/dist/circular-cff58c30.esm.js +0 -311
  1582. package/dist/circular-e5da795a.cjs.dev.js +0 -107
  1583. package/dist/config-05de256b.cjs.dev.js +0 -474
  1584. package/dist/config-3003c43a.cjs.prod.js +0 -474
  1585. package/dist/config-64a67e36.esm.js +0 -428
  1586. package/dist/configError-84c0742e.esm.js +0 -305
  1587. package/dist/configError-a7c4fcc2.cjs.dev.js +0 -323
  1588. package/dist/configError-b3dd6ec2.cjs.prod.js +0 -323
  1589. package/dist/configProvider-35a1a3c7.cjs.prod.js +0 -447
  1590. package/dist/configProvider-56d1b842.cjs.dev.js +0 -447
  1591. package/dist/configProvider-cd15d971.esm.js +0 -428
  1592. package/dist/configSecret-18ba6f6e.cjs.dev.js +0 -74
  1593. package/dist/configSecret-3dd7ab72.cjs.prod.js +0 -74
  1594. package/dist/configSecret-793e52b4.esm.js +0 -66
  1595. package/dist/core-01c0ed9d.cjs.prod.js +0 -1072
  1596. package/dist/core-218f7617.cjs.prod.js +0 -3502
  1597. package/dist/core-5346c1e5.cjs.dev.js +0 -1072
  1598. package/dist/core-9276b625.esm.js +0 -1032
  1599. package/dist/core-9f5f0dc2.esm.js +0 -3225
  1600. package/dist/core-bedc63fe.cjs.dev.js +0 -3502
  1601. package/dist/core-effect-a839563d.cjs.dev.js +0 -1030
  1602. package/dist/core-effect-e762d50b.esm.js +0 -902
  1603. package/dist/core-effect-fea8dde9.cjs.prod.js +0 -1030
  1604. package/dist/dataSource-43c62f8e.esm.js +0 -60
  1605. package/dist/dataSource-8ab8a0ec.cjs.dev.js +0 -74
  1606. package/dist/dataSource-cc1edaa1.cjs.prod.js +0 -74
  1607. package/dist/defaultServices-1d4f144a.cjs.prod.js +0 -388
  1608. package/dist/defaultServices-1f1298e8.cjs.dev.js +0 -388
  1609. package/dist/defaultServices-86214de4.esm.js +0 -359
  1610. package/dist/fiber-1511340a.esm.js +0 -363
  1611. package/dist/fiber-18f7cf87.cjs.dev.js +0 -411
  1612. package/dist/fiber-957d5291.cjs.prod.js +0 -411
  1613. package/dist/fiberRefs-76ecbcfd.cjs.dev.js +0 -181
  1614. package/dist/fiberRefs-b32de18b.esm.js +0 -169
  1615. package/dist/fiberRefs-f0429b31.cjs.prod.js +0 -181
  1616. package/dist/fiberRuntime-233db874.cjs.dev.js +0 -3012
  1617. package/dist/fiberRuntime-5e42f85c.cjs.prod.js +0 -3012
  1618. package/dist/fiberRuntime-98f09d31.esm.js +0 -2857
  1619. package/dist/groupBy-36e6ca3f.cjs.prod.js +0 -216
  1620. package/dist/groupBy-3a32c4b6.cjs.dev.js +0 -216
  1621. package/dist/groupBy-8d753c19.esm.js +0 -206
  1622. package/dist/hook-8fc9006f.esm.js +0 -362
  1623. package/dist/hook-e169b712.cjs.prod.js +0 -371
  1624. package/dist/hook-fe9f948d.cjs.dev.js +0 -371
  1625. package/dist/key-215ea6fd.esm.js +0 -68
  1626. package/dist/key-4824d1ad.cjs.prod.js +0 -79
  1627. package/dist/key-d8dc829b.cjs.dev.js +0 -79
  1628. package/dist/keyType-c980adcc.cjs.dev.js +0 -236
  1629. package/dist/keyType-d85714ed.cjs.prod.js +0 -236
  1630. package/dist/keyType-fefd9ef8.esm.js +0 -218
  1631. package/dist/label-14b7d517.cjs.dev.js +0 -44
  1632. package/dist/label-5cb21441.esm.js +0 -40
  1633. package/dist/label-e78b2f8f.cjs.prod.js +0 -44
  1634. package/dist/layer-3da5a933.cjs.prod.js +0 -658
  1635. package/dist/layer-e1d1db03.cjs.dev.js +0 -658
  1636. package/dist/layer-f8ec8454.esm.js +0 -596
  1637. package/dist/mergeDecision-32146c34.esm.js +0 -78
  1638. package/dist/mergeDecision-75feaab3.cjs.dev.js +0 -86
  1639. package/dist/mergeDecision-a1822db2.cjs.prod.js +0 -86
  1640. package/dist/mergeState-21728f0b.esm.js +0 -96
  1641. package/dist/mergeState-2c24c562.cjs.prod.js +0 -109
  1642. package/dist/mergeState-e9aa09b9.cjs.dev.js +0 -109
  1643. package/dist/mergeStrategy-84dd9011.esm.js +0 -64
  1644. package/dist/mergeStrategy-8fe47c7e.cjs.dev.js +0 -72
  1645. package/dist/mergeStrategy-909bebb0.cjs.prod.js +0 -72
  1646. package/dist/pair-67530b23.cjs.dev.js +0 -42
  1647. package/dist/pair-cb46f77c.esm.js +0 -38
  1648. package/dist/pair-fb591d12.cjs.prod.js +0 -42
  1649. package/dist/patch-99e8591b.esm.js +0 -127
  1650. package/dist/patch-cdcb5e42.cjs.dev.js +0 -132
  1651. package/dist/patch-f440dab6.cjs.prod.js +0 -132
  1652. package/dist/pathPatch-5ac830c8.esm.js +0 -83
  1653. package/dist/pathPatch-75afe967.cjs.dev.js +0 -90
  1654. package/dist/pathPatch-775a0838.cjs.prod.js +0 -90
  1655. package/dist/pool-0da00d67.cjs.prod.js +0 -278
  1656. package/dist/pool-54820a71.esm.js +0 -271
  1657. package/dist/pool-bfa5c974.cjs.dev.js +0 -278
  1658. package/dist/query-1685a476.esm.js +0 -97
  1659. package/dist/query-3ab8cd4e.cjs.prod.js +0 -104
  1660. package/dist/query-68bb7c45.cjs.dev.js +0 -104
  1661. package/dist/queue-499cacee.cjs.prod.js +0 -538
  1662. package/dist/queue-b79c472d.esm.js +0 -505
  1663. package/dist/queue-bf262207.cjs.dev.js +0 -538
  1664. package/dist/registry-38f0ed9d.esm.js +0 -111
  1665. package/dist/registry-6f465b2f.cjs.prod.js +0 -114
  1666. package/dist/registry-dfe7ed01.cjs.dev.js +0 -114
  1667. package/dist/runtime-5b7472d5.cjs.dev.js +0 -288
  1668. package/dist/runtime-68e90981.cjs.prod.js +0 -288
  1669. package/dist/runtime-f91ca239.esm.js +0 -266
  1670. package/dist/schedule-0d31f4cc.esm.js +0 -843
  1671. package/dist/schedule-616cf1b8.cjs.prod.js +0 -956
  1672. package/dist/schedule-d3f9b258.cjs.dev.js +0 -956
  1673. package/dist/scopedRef-5e59cf54.cjs.prod.js +0 -55
  1674. package/dist/scopedRef-730d8d35.cjs.dev.js +0 -55
  1675. package/dist/scopedRef-e54a3d93.esm.js +0 -49
  1676. package/dist/singleProducerAsyncInput-6508b7f1.cjs.dev.js +0 -193
  1677. package/dist/singleProducerAsyncInput-c67ef1c6.esm.js +0 -191
  1678. package/dist/singleProducerAsyncInput-d3225b4e.cjs.prod.js +0 -193
  1679. package/dist/sink-05d54662.cjs.prod.js +0 -3094
  1680. package/dist/sink-3105a90f.cjs.dev.js +0 -3094
  1681. package/dist/sink-3f26fc31.esm.js +0 -2877
  1682. package/dist/state-38610229.esm.js +0 -209
  1683. package/dist/state-6d974829.cjs.dev.js +0 -227
  1684. package/dist/state-abef4d59.cjs.prod.js +0 -227
  1685. package/dist/stm-43c3b262.cjs.dev.js +0 -678
  1686. package/dist/stm-d01a804c.esm.js +0 -582
  1687. package/dist/stm-e1200304.cjs.prod.js +0 -678
  1688. package/dist/stream-3ebec4f3.cjs.prod.js +0 -3649
  1689. package/dist/stream-9270c6b1.esm.js +0 -3355
  1690. package/dist/stream-b819c5b3.cjs.dev.js +0 -3649
  1691. package/dist/synchronizedRef-5bbb64b2.cjs.prod.js +0 -62
  1692. package/dist/synchronizedRef-e9682c8e.cjs.dev.js +0 -62
  1693. package/dist/synchronizedRef-f7077a5f.esm.js +0 -53
  1694. package/dist/tArray-0d2e8fae.cjs.dev.js +0 -330
  1695. package/dist/tArray-442d22a4.cjs.prod.js +0 -330
  1696. package/dist/tArray-fa2759e8.esm.js +0 -287
  1697. package/dist/tMap-2a001015.cjs.prod.js +0 -535
  1698. package/dist/tMap-2a98e9a7.esm.js +0 -492
  1699. package/dist/tMap-2fd8c9e6.cjs.dev.js +0 -535
  1700. package/dist/tQueue-13f8f402.esm.js +0 -331
  1701. package/dist/tQueue-84a0d0eb.cjs.dev.js +0 -367
  1702. package/dist/tQueue-e2e96d1f.cjs.prod.js +0 -367
  1703. package/dist/tRef-4772a528.cjs.prod.js +0 -133
  1704. package/dist/tRef-b5d0cc28.esm.js +0 -115
  1705. package/dist/tRef-bbbdd134.cjs.dev.js +0 -133
  1706. package/dist/take-68ed448f.cjs.dev.js +0 -152
  1707. package/dist/take-7c168e8e.esm.js +0 -130
  1708. package/dist/take-d293f721.cjs.prod.js +0 -152
  1709. package/dist/upstreamPullRequest-be86e51c.esm.js +0 -71
  1710. package/dist/upstreamPullRequest-d2eaf7f5.cjs.prod.js +0 -79
  1711. package/dist/upstreamPullRequest-f986731f.cjs.dev.js +0 -79
  1712. package/dist/upstreamPullStrategy-08e7185f.cjs.prod.js +0 -81
  1713. package/dist/upstreamPullStrategy-29c0b698.cjs.dev.js +0 -81
  1714. package/dist/upstreamPullStrategy-d1505fa4.esm.js +0 -71
@@ -1,3355 +0,0 @@
1
- import { m as map$1, g as flipCauseOption, a as failureOrCause, b as isInterrupted, d as die$2, I as IllegalArgumentException, R as RuntimeException, c as isDieType, h as isRuntimeException, s as squash } from './Cause-8be0b9a6.esm.js';
2
- import { D as Done, A as Await } from './ChannelMergeDecision-4488ba22.esm.js';
3
- import { f as fromIterable$1, o as of, e as empty$1, h as isNonEmpty, s as map$3, D as range$1, l as unsafeFromArray, E as reduceRight, p as prepend$1, i as isEmpty, A as dropWhile$1, g as filter$1, F as filterMap$1, G as filterMapWhile$1, H as findFirst, I as flatMap$3, J as takeWhile$1, K as take$3, d as drop$1, b as appendAll, w as unsafeLast, L as zipWith$2, y as reduce, c as append, C as last$1, x as splitWhere, k as head$1, M as mapAccum$1, m as make$7, u as unsafeGet$1, z as flatten$2, N as isChunk, B as splitAt, O as takeRight$1 } from './Chunk-98371336.esm.js';
4
- import { s as sleep, a as currentTimeMillis } from './Clock-ab907687.esm.js';
5
- import { b as add, u as unsafeGet } from './Context-48179faa.esm.js';
6
- import { m as make$4, _ as _await, s as succeed$2, f as failCause$5, p as poll, a as fail$4 } from './Deferred-554d3588.esm.js';
7
- import { t as toMillis, m as millis, c as greaterThan, z as zero } from './Duration-5e9f2327.esm.js';
8
- import { w as succeed$1, a4 as die$1, F as dieMessage$1, l as suspend$1, a5 as fail$1, a6 as mapBoth$2, a7 as mapError$1, f as failCause$2, r as map$2, k as flatMap$1, d as flatten$1, j as zipRight$1, b as as$1, N as acquireRelease$1, D as all, V as when$1, A as forkScoped, y as scope, a8 as runtime, a9 as match$1, s as sync$1, e as unit$2, aa as onError$1, J as tap$1, M as gen, ab as transplant, ac as dieSync$1, O as makeSemaphore, m as matchCauseEffect, v as forEach, c as catchAllCause$2, a1 as dropUntil$1, a2 as dropWhile$2, K as context$1, ad as failSync$1, ae as failCauseSync$1, af as findFirst$1, ag as tryPromise, ah as promise, i as isEffect, t as zip$1, X as never$1, ai as orDie$1, aj as matchEffect, x as scoped$1, Q as asUnit, n as forkDaemon, o as ensuring$2, ak as timeoutFail$1, al as timeoutFailCause$1, am as runSync, an as catchTags$1, I as tapErrorCause$1, ao as runPromise, Y as withSpanScoped, T as raceWith, z as zipWith$1, ap as forkIn, aq as reduce$1, a3 as catchSomeCause$1, ar as orElse$2, C as zipLeft$1, as as catchAll$2, at as asSome, au as succeedNone, av as fork } from './Effect-d5910dae.esm.js';
9
- import { b as match, l as left, r as right } from './Either-09270bbc.esm.js';
10
- import { e as equals } from './Equal-7d4ae7e7.esm.js';
11
- import { n as mapBoth$1, m as match$3, a as failCause$4, f as fail$3, c as isSuccess, s as succeed$4, u as unit$3, e as isFailure } from './Exit-e31718e3.esm.js';
12
- import { j as join, i as interrupt, p as poll$1 } from './Fiber-38517971.esm.js';
13
- import { f as constUndefined, p as pipe, d as dual, i as identity, c as constTrue } from './Function-52fb7d21.esm.js';
14
- import { b as bounded$1, s as subscribe, a as shutdown$1 } from './Hub-9f3d5c5d.esm.js';
15
- import { b as build, c as context$2, m as merge$1 } from './Layer-f7be72db.esm.js';
16
- import { e as fromNullable, s as some$1, n as none, b as match$2, g as getOrElse, m as map$4, i as isSome, a as isNone } from './Option-1d073850.esm.js';
17
- import { p as pipeArguments } from './Pipeable-fe51dc02.esm.js';
18
- import { t as take$2, s as shutdown, b as bounded, m as dropping, n as sliding$1, i as isShutdown, k as takeBetween, c as offerAll, o as offer$1, u as unbounded } from './Queue-bbebbeda.esm.js';
19
- import { m as make$3, a as modify, b as getAndSet, s as set, g as get, u as update } from './Ref-9a9de951.esm.js';
20
- import { r as runPromiseExit } from './Runtime-4f6fc384.esm.js';
21
- import { f as forever$1, d as driver, s as spaced } from './Schedule-da001b13.esm.js';
22
- import { m as make$6, c as close, u as use } from './Scope-0ffde3bb.esm.js';
23
- import { f as fromInput, B as Both } from './StreamHaltStrategy-9864a080.esm.js';
24
- import { a as readWithCause, f as flatMap$2, b as fromEffect$1, w as write, u as unwrap$1, c as failCause$3, z as zipRight$2, e as unit$1, p as pipeTo, g as run$1, h as pipeToOrFail, t as toChannel$1, i as collectElements, j as unwrapScoped$1, k as fail$2, r as runScoped$1, l as catchAllCause$1, m as concatMap, n as writeChunk, d as drain$1, o as readWith, s as suspend$2, q as identityChannel, v as succeedNow, x as ensuring$1, y as ensuringWith$1, A as succeed$3, B as mapOut, D as mapOutEffectPar, E as repeated, F as collectAllN, G as interruptWhen$1, H as interruptWhenDeferred$1, I as mapOutEffect, J as mapError$2, K as mapErrorCause$1, L as mergeWith$1, M as mkString$1, N as orDieWith$1, O as orElse$1, P as foldSink, Q as collectLeftover, R as zipRight$3, T as fromEffect$2, U as fail$5, V as fromChannel$1, W as provideContext$1, X as catchAll$1, Y as runDrain$1, Z as collectAll, _ as count, $ as drain$2, a0 as fold, a1 as foldEffect, a2 as forEach$1, a3 as forEachChunk, a4 as forEachWhile, a5 as head, a6 as last, a7 as sum, a8 as scoped$2, a9 as foldCauseChannel, aa as toPull$1, ab as fromInput$1, ac as embedInput, ad as mergeMap, ae as sync$2, af as writeAll } from './sink-3f26fc31.esm.js';
25
- import { a as BufferSliding } from './mergeStrategy-84dd9011.esm.js';
26
- import { m as make$5 } from './singleProducerAsyncInput-c67ef1c6.esm.js';
27
- import './GlobalValue-c5f1e8e5.esm.js';
28
- import './Effectable-a76b6aa1.esm.js';
29
- import './Differ-3be1df41.esm.js';
30
- import './timeout-4180303d.esm.js';
31
- import { d as done, m as match$4, c as chunk, f as failCause$6, e as end$2, a as fromPull$1, o as of$1 } from './take-7c168e8e.esm.js';
32
-
33
- /** @internal */
34
- class RingBuffer {
35
- size = 0;
36
- current = 0;
37
- constructor(capacity) {
38
- this.capacity = capacity;
39
- this.array = Array.from({
40
- length: capacity
41
- }, constUndefined);
42
- }
43
- head() {
44
- return fromNullable(this.array[this.current]);
45
- }
46
- lastOrNull() {
47
- if (this.size === 0) {
48
- return undefined;
49
- }
50
- const index = this.current === 0 ? this.array.length - 1 : this.current - 1;
51
- return this.array[index] ?? undefined;
52
- }
53
- put(value) {
54
- this.array[this.current] = value;
55
- this.increment();
56
- }
57
- dropLast() {
58
- if (this.size > 0) {
59
- this.decrement();
60
- this.array[this.current] = undefined;
61
- }
62
- }
63
- toChunk() {
64
- const begin = this.current - this.size;
65
- const newArray = begin < 0 ? [...this.array.slice(this.capacity + begin, this.capacity), ...this.array.slice(0, this.current)] : this.array.slice(begin, this.current);
66
- return fromIterable$1(newArray);
67
- }
68
- increment() {
69
- if (this.size < this.capacity) {
70
- this.size += 1;
71
- }
72
- this.current = (this.current + 1) % this.capacity;
73
- }
74
- decrement() {
75
- this.size -= 1;
76
- if (this.current > 0) {
77
- this.current -= 1;
78
- } else {
79
- this.current = this.capacity - 1;
80
- }
81
- }
82
- }
83
-
84
- /** @internal */
85
-
86
- /** @internal */
87
- const OP_NOT_STARTED = "NotStarted";
88
-
89
- /** @internal */
90
-
91
- /** @internal */
92
- const OP_PREVIOUS = "Previous";
93
-
94
- /** @internal */
95
-
96
- /** @internal */
97
- const OP_CURRENT = "Current";
98
-
99
- /** @internal */
100
-
101
- /** @internal */
102
-
103
- /** @internal */
104
-
105
- /** @internal */
106
- const notStarted = {
107
- _tag: OP_NOT_STARTED
108
- };
109
-
110
- /** @internal */
111
- const previous = fiber => ({
112
- _tag: OP_PREVIOUS,
113
- fiber
114
- });
115
-
116
- /** @internal */
117
- const current = fiber => ({
118
- _tag: OP_CURRENT,
119
- fiber
120
- });
121
-
122
- /** @internal */
123
- const make$2 = emit => {
124
- const ops = {
125
- chunk(as) {
126
- return this(succeed$1(as));
127
- },
128
- die(defect) {
129
- return this(die$1(defect));
130
- },
131
- dieMessage(message) {
132
- return this(dieMessage$1(message));
133
- },
134
- done(exit) {
135
- return this(suspend$1(() => mapBoth$1(exit, {
136
- onFailure: some$1,
137
- onSuccess: of
138
- })));
139
- },
140
- end() {
141
- return this(fail$1(none()));
142
- },
143
- fail(e) {
144
- return this(fail$1(some$1(e)));
145
- },
146
- fromEffect(effect) {
147
- return this(mapBoth$2(effect, {
148
- onFailure: some$1,
149
- onSuccess: of
150
- }));
151
- },
152
- fromEffectChunk(effect) {
153
- return this(pipe(effect, mapError$1(some$1)));
154
- },
155
- halt(cause) {
156
- return this(failCause$2(pipe(cause, map$1(some$1))));
157
- },
158
- single(value) {
159
- return this(succeed$1(of(value)));
160
- }
161
- };
162
- return Object.assign(emit, ops);
163
- };
164
-
165
- /** @internal */
166
- const HandoffTypeId = /*#__PURE__*/Symbol.for("effect/Stream/Handoff");
167
-
168
- /** @internal */
169
-
170
- /**
171
- * A synchronous queue-like abstraction that allows a producer to offer an
172
- * element and wait for it to be taken, and allows a consumer to wait for an
173
- * element to be available.
174
- *
175
- * @internal
176
- */
177
-
178
- /** @internal */
179
- const OP_HANDOFF_STATE_EMPTY = "Empty";
180
-
181
- /** @internal */
182
-
183
- /** @internal */
184
- const OP_HANDOFF_STATE_FULL = "Full";
185
-
186
- /** @internal */
187
-
188
- /** @internal */
189
-
190
- /** @internal */
191
- const handoffStateEmpty = notifyConsumer => ({
192
- _tag: OP_HANDOFF_STATE_EMPTY,
193
- notifyConsumer
194
- });
195
-
196
- /** @internal */
197
- const handoffStateFull = (value, notifyProducer) => ({
198
- _tag: OP_HANDOFF_STATE_FULL,
199
- value,
200
- notifyProducer
201
- });
202
-
203
- /** @internal */
204
- const handoffStateMatch = (onEmpty, onFull) => {
205
- return self => {
206
- switch (self._tag) {
207
- case OP_HANDOFF_STATE_EMPTY:
208
- {
209
- return onEmpty(self.notifyConsumer);
210
- }
211
- case OP_HANDOFF_STATE_FULL:
212
- {
213
- return onFull(self.value, self.notifyProducer);
214
- }
215
- }
216
- };
217
- };
218
-
219
- /** @internal */
220
- const handoffVariance = {
221
- _A: _ => _
222
- };
223
-
224
- /** @internal */
225
- const make$1 = () => pipe(make$4(), flatMap$1(deferred => make$3(handoffStateEmpty(deferred))), map$2(ref => ({
226
- [HandoffTypeId]: handoffVariance,
227
- ref
228
- })));
229
-
230
- /** @internal */
231
- const offer = /*#__PURE__*/dual(2, (self, value) => {
232
- return flatMap$1(make$4(), deferred => flatten$1(modify(self.ref, state => pipe(state, handoffStateMatch(notifyConsumer => [zipRight$1(succeed$2(notifyConsumer, void 0), _await(deferred)), handoffStateFull(value, deferred)], (_, notifyProducer) => [flatMap$1(_await(notifyProducer), () => pipe(self, offer(value))), state])))));
233
- });
234
-
235
- /** @internal */
236
- const take$1 = self => flatMap$1(make$4(), deferred => flatten$1(modify(self.ref, state => pipe(state, handoffStateMatch(notifyConsumer => [flatMap$1(_await(notifyConsumer), () => take$1(self)), state], (value, notifyProducer) => [as$1(succeed$2(notifyProducer, void 0), value), handoffStateEmpty(deferred)])))));
237
-
238
- /** @internal */
239
-
240
- /** @internal */
241
- const OP_EMIT = "Emit";
242
-
243
- /** @internal */
244
-
245
- /** @internal */
246
- const OP_HALT = "Halt";
247
-
248
- /** @internal */
249
-
250
- /** @internal */
251
- const OP_END = "End";
252
-
253
- /** @internal */
254
-
255
- /** @internal */
256
-
257
- /** @internal */
258
-
259
- /** @internal */
260
- const emit = elements => ({
261
- _tag: OP_EMIT,
262
- elements
263
- });
264
-
265
- /** @internal */
266
- const halt = cause => ({
267
- _tag: OP_HALT,
268
- cause
269
- });
270
-
271
- /** @internal */
272
- const end$1 = reason => ({
273
- _tag: OP_END,
274
- reason
275
- });
276
-
277
- /** @internal */
278
- const end = () => fail$1(none());
279
-
280
- /** @internal */
281
- const failCause$1 = cause => mapError$1(failCause$2(cause), some$1);
282
-
283
- /** @internal */
284
-
285
- /** @internal */
286
- const OP_SCHEDULE_END = "ScheduleEnd";
287
-
288
- /** @internal */
289
-
290
- /** @internal */
291
- const OP_UPSTREAM_END = "UpstreamEnd";
292
-
293
- /** @internal */
294
-
295
- /** @internal */
296
-
297
- /** @internal */
298
-
299
- /** @internal */
300
- const ScheduleEnd = {
301
- _tag: OP_SCHEDULE_END
302
- };
303
-
304
- /** @internal */
305
- const UpstreamEnd = {
306
- _tag: OP_UPSTREAM_END
307
- };
308
-
309
- /** @internal */
310
-
311
- /** @internal */
312
- const OP_DRAIN_LEFT = "DrainLeft";
313
-
314
- /** @internal */
315
-
316
- /** @internal */
317
- const OP_DRAIN_RIGHT = "DrainRight";
318
-
319
- /** @internal */
320
-
321
- /** @internal */
322
- const OP_PULL_BOTH$1 = "PullBoth";
323
-
324
- /** @internal */
325
-
326
- /** @internal */
327
- const OP_PULL_LEFT$1 = "PullLeft";
328
-
329
- /** @internal */
330
-
331
- /** @internal */
332
- const OP_PULL_RIGHT$1 = "PullRight";
333
-
334
- /** @internal */
335
-
336
- /** @internal */
337
-
338
- /** @internal */
339
-
340
- /** @internal */
341
-
342
- /** @internal */
343
-
344
- /** @internal */
345
-
346
- /** @internal */
347
- const DrainLeft = {
348
- _tag: OP_DRAIN_LEFT
349
- };
350
-
351
- /** @internal */
352
- const DrainRight = {
353
- _tag: OP_DRAIN_RIGHT
354
- };
355
-
356
- /** @internal */
357
- const PullBoth$1 = {
358
- _tag: OP_PULL_BOTH$1
359
- };
360
-
361
- /** @internal */
362
- const PullLeft$1 = rightChunk => ({
363
- _tag: OP_PULL_LEFT$1,
364
- rightChunk
365
- });
366
-
367
- /** @internal */
368
- const PullRight$1 = leftChunk => ({
369
- _tag: OP_PULL_RIGHT$1,
370
- leftChunk
371
- });
372
-
373
- /** @internal */
374
-
375
- /** @internal */
376
- const OP_PULL_BOTH = "PullBoth";
377
-
378
- /** @internal */
379
-
380
- /** @internal */
381
- const OP_PULL_LEFT = "PullLet";
382
-
383
- /** @internal */
384
-
385
- /** @internal */
386
- const OP_PULL_RIGHT = "PullRight";
387
-
388
- /** @internal */
389
-
390
- /** @internal */
391
-
392
- /** @internal */
393
-
394
- /** @internal */
395
-
396
- /** @internal */
397
- const PullBoth = {
398
- _tag: OP_PULL_BOTH
399
- };
400
-
401
- /** @internal */
402
- const PullLeft = rightChunk => ({
403
- _tag: OP_PULL_LEFT,
404
- rightChunk
405
- });
406
-
407
- /** @internal */
408
- const PullRight = leftChunk => ({
409
- _tag: OP_PULL_RIGHT,
410
- leftChunk
411
- });
412
-
413
- /** @internal */
414
- const StreamSymbolKey = "effect/Stream";
415
-
416
- /** @internal */
417
- const StreamTypeId = /*#__PURE__*/Symbol.for(StreamSymbolKey);
418
-
419
- /** @internal */
420
- const streamVariance = {
421
- _R: _ => _,
422
- _E: _ => _,
423
- _A: _ => _
424
- };
425
-
426
- /** @internal */
427
- class StreamImpl {
428
- [StreamTypeId] = streamVariance;
429
- constructor(channel) {
430
- this.channel = channel;
431
- }
432
- pipe() {
433
- return pipeArguments(this, arguments);
434
- }
435
- }
436
-
437
- /** @internal */
438
- const isStream = u => typeof u === "object" && u != null && StreamTypeId in u || isEffect(u);
439
-
440
- /** @internal */
441
- const DefaultChunkSize = 4096;
442
-
443
- /** @internal */
444
- const acquireRelease = (acquire, release) => scoped(acquireRelease$1(acquire, release));
445
-
446
- /** @internal */
447
- const aggregate = /*#__PURE__*/dual(2, (self, sink) => aggregateWithin(self, sink, forever$1));
448
-
449
- /** @internal */
450
- const aggregateWithin = /*#__PURE__*/dual(3, (self, sink, schedule) => filterMap(aggregateWithinEither(self, sink, schedule), _ => match(_, {
451
- onLeft: none,
452
- onRight: some$1
453
- })));
454
-
455
- /** @internal */
456
- const aggregateWithinEither = /*#__PURE__*/dual(3, (self, sink, schedule) => {
457
- const layer = all([make$1(), make$3(ScheduleEnd), make$3(empty$1()), driver(schedule), make$3(false), make$3(false)]);
458
- return pipe(fromEffect(layer), flatMap(([handoff, sinkEndReason, sinkLeftovers, scheduleDriver, consumed, endAfterEmit]) => {
459
- const handoffProducer = readWithCause({
460
- onInput: input => flatMap$2(fromEffect$1(pipe(handoff, offer(emit(input)), when$1(() => isNonEmpty(input)))), () => handoffProducer),
461
- onFailure: cause => fromEffect$1(offer(handoff, halt(cause))),
462
- onDone: () => fromEffect$1(offer(handoff, end$1(UpstreamEnd)))
463
- });
464
- const handoffConsumer = pipe(getAndSet(sinkLeftovers, empty$1()), flatMap$1(leftovers => {
465
- if (isNonEmpty(leftovers)) {
466
- return pipe(set(consumed, true), zipRight$1(succeed$1(pipe(write(leftovers), flatMap$2(() => handoffConsumer)))));
467
- }
468
- return pipe(take$1(handoff), map$2(signal => {
469
- switch (signal._tag) {
470
- case OP_EMIT:
471
- {
472
- return pipe(fromEffect$1(set(consumed, true)), zipRight$2(write(signal.elements)), zipRight$2(fromEffect$1(get(endAfterEmit))), flatMap$2(bool => bool ? unit$1 : handoffConsumer));
473
- }
474
- case OP_HALT:
475
- {
476
- return failCause$3(signal.cause);
477
- }
478
- case OP_END:
479
- {
480
- if (signal.reason._tag === OP_SCHEDULE_END) {
481
- return pipe(get(consumed), map$2(bool => bool ? fromEffect$1(pipe(set(sinkEndReason, ScheduleEnd), zipRight$1(set(endAfterEmit, true)))) : pipe(fromEffect$1(pipe(set(sinkEndReason, ScheduleEnd), zipRight$1(set(endAfterEmit, true)))), flatMap$2(() => handoffConsumer))), unwrap$1);
482
- }
483
- return pipe(set(sinkEndReason, signal.reason), zipRight$1(set(endAfterEmit, true)), fromEffect$1);
484
- }
485
- }
486
- }));
487
- }), unwrap$1);
488
- const timeout = lastB => scheduleDriver.next(lastB);
489
- const scheduledAggregator = (sinkFiber, scheduleFiber, scope) => {
490
- const forkSink = pipe(set(consumed, false), zipRight$1(set(endAfterEmit, false)), zipRight$1(pipe(handoffConsumer, pipeToOrFail(toChannel$1(sink)), collectElements, run$1, forkIn(scope))));
491
- const handleSide = (leftovers, b, c) => pipe(set(sinkLeftovers, flatten$2(leftovers)), zipRight$1(map$2(get(sinkEndReason), reason => {
492
- switch (reason._tag) {
493
- case OP_SCHEDULE_END:
494
- {
495
- return pipe(all([get(consumed), forkSink, pipe(timeout(some$1(b)), forkIn(scope))]), map$2(([wasConsumed, sinkFiber, scheduleFiber]) => {
496
- const toWrite = pipe(c, match$2({
497
- onNone: () => of(right(b)),
498
- onSome: c => make$7(right(b), left(c))
499
- }));
500
- if (wasConsumed) {
501
- return pipe(write(toWrite), flatMap$2(() => scheduledAggregator(sinkFiber, scheduleFiber, scope)));
502
- }
503
- return scheduledAggregator(sinkFiber, scheduleFiber, scope);
504
- }), unwrap$1);
505
- }
506
- case OP_UPSTREAM_END:
507
- {
508
- return pipe(get(consumed), map$2(wasConsumed => wasConsumed ? write(of(right(b))) : unit$1), unwrap$1);
509
- }
510
- }
511
- })), unwrap$1);
512
- return unwrap$1(raceWith(join(sinkFiber), join(scheduleFiber), {
513
- onSelfDone: (sinkExit, _) => pipe(interrupt(scheduleFiber), zipRight$1(pipe(suspend$1(() => sinkExit), map$2(([leftovers, b]) => handleSide(leftovers, b, none()))))),
514
- onOtherDone: (scheduleExit, _) => matchCauseEffect(suspend$1(() => scheduleExit), {
515
- onFailure: cause => match(failureOrCause(cause), {
516
- onLeft: () => pipe(handoff, offer(end$1(ScheduleEnd)), forkDaemon, zipRight$1(pipe(join(sinkFiber), map$2(([leftovers, b]) => handleSide(leftovers, b, none()))))),
517
- onRight: cause => pipe(handoff, offer(halt(cause)), forkDaemon, zipRight$1(pipe(join(sinkFiber), map$2(([leftovers, b]) => handleSide(leftovers, b, none())))))
518
- }),
519
- onSuccess: c => pipe(handoff, offer(end$1(ScheduleEnd)), forkDaemon, zipRight$1(pipe(join(sinkFiber), map$2(([leftovers, b]) => handleSide(leftovers, b, some$1(c))))))
520
- })
521
- }));
522
- };
523
- return unwrapScoped(pipe(self, toChannel, pipeTo(handoffProducer), run$1, forkScoped, zipRight$1(pipe(handoffConsumer, pipeToOrFail(toChannel$1(sink)), collectElements, run$1, forkScoped, flatMap$1(sinkFiber => pipe(forkScoped(timeout(none())), flatMap$1(scheduleFiber => pipe(scope, map$2(scope => new StreamImpl(scheduledAggregator(sinkFiber, scheduleFiber, scope)))))))))));
524
- }));
525
- });
526
-
527
- /** @internal */
528
- const as = /*#__PURE__*/dual(2, (self, value) => map(self, () => value));
529
-
530
- /** @internal */
531
- const _async = (register, outputBuffer = 16) => asyncOption(cb => {
532
- register(cb);
533
- return none();
534
- }, outputBuffer);
535
-
536
- /** @internal */
537
- const asyncEffect = (register, outputBuffer = 16) => pipe(acquireRelease$1(bounded(outputBuffer), queue => shutdown(queue)), flatMap$1(output => pipe(runtime(), flatMap$1(runtime => pipe(register(make$2(k => pipe(fromPull$1(k), flatMap$1(take => offer$1(output, take)), asUnit, runPromiseExit(runtime)).then(exit => {
538
- if (isFailure(exit)) {
539
- if (!isInterrupted(exit.cause)) {
540
- throw squash(exit.cause);
541
- }
542
- }
543
- }))), map$2(() => {
544
- const loop = pipe(take$2(output), flatMap$1(done), match$1({
545
- onFailure: maybeError => pipe(fromEffect$1(shutdown(output)), zipRight$2(match$2(maybeError, {
546
- onNone: () => unit$1,
547
- onSome: fail$2
548
- }))),
549
- onSuccess: chunk => pipe(write(chunk), flatMap$2(() => loop))
550
- }), unwrap$1);
551
- return loop;
552
- }))))), unwrapScoped$1, fromChannel);
553
-
554
- /** @internal */
555
- const asyncInterrupt = (register, outputBuffer = 16) => pipe(acquireRelease$1(bounded(outputBuffer), queue => shutdown(queue)), flatMap$1(output => pipe(runtime(), flatMap$1(runtime => pipe(sync$1(() => register(make$2(k => pipe(fromPull$1(k), flatMap$1(take => offer$1(output, take)), asUnit, runPromiseExit(runtime)).then(exit => {
556
- if (isFailure(exit)) {
557
- if (!isInterrupted(exit.cause)) {
558
- throw squash(exit.cause);
559
- }
560
- }
561
- })))), map$2(match({
562
- onLeft: canceler => {
563
- const loop = pipe(take$2(output), flatMap$1(done), match$1({
564
- onFailure: maybeError => zipRight$2(fromEffect$1(shutdown(output)), match$2(maybeError, {
565
- onNone: () => unit$1,
566
- onSome: fail$2
567
- })),
568
- onSuccess: chunk => pipe(write(chunk), flatMap$2(() => loop))
569
- }), unwrap$1);
570
- return pipe(fromChannel(loop), ensuring(canceler));
571
- },
572
- onRight: stream => unwrap(pipe(shutdown(output), as$1(stream)))
573
- })))))), unwrapScoped);
574
-
575
- /** @internal */
576
- const asyncOption = (register, outputBuffer = 16) => asyncInterrupt(emit => match$2(register(emit), {
577
- onNone: () => left(unit$2),
578
- onSome: right
579
- }), outputBuffer);
580
-
581
- /** @internal */
582
- const asyncScoped = (register, outputBuffer = 16) => pipe(acquireRelease$1(bounded(outputBuffer), queue => shutdown(queue)), flatMap$1(output => pipe(runtime(), flatMap$1(runtime => pipe(register(make$2(k => pipe(fromPull$1(k), flatMap$1(take => offer$1(output, take)), asUnit, runPromiseExit(runtime)).then(exit => {
583
- if (isFailure(exit)) {
584
- if (!isInterrupted(exit.cause)) {
585
- throw squash(exit.cause);
586
- }
587
- }
588
- }))), zipRight$1(make$3(false)), flatMap$1(ref => pipe(get(ref), map$2(isDone => isDone ? end() : pipe(take$2(output), flatMap$1(done), onError$1(() => pipe(set(ref, true), zipRight$1(shutdown(output)))))))))))), scoped, flatMap(repeatEffectChunkOption));
589
-
590
- /** @internal */
591
- const branchAfter = /*#__PURE__*/dual(3, (self, n, f) => suspend(() => {
592
- const buffering = acc => readWith({
593
- onInput: input => {
594
- const nextSize = acc.length + input.length;
595
- if (nextSize >= n) {
596
- const [b1, b2] = pipe(input, splitAt(n - acc.length));
597
- return running(pipe(acc, appendAll(b1)), b2);
598
- }
599
- return buffering(pipe(acc, appendAll(input)));
600
- },
601
- onFailure: fail$2,
602
- onDone: () => running(acc, empty$1())
603
- });
604
- const running = (prefix, leftover) => pipeTo(zipRight$2(write(leftover), identityChannel()), toChannel(f(prefix)));
605
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(buffering(empty$1()))));
606
- }));
607
-
608
- /** @internal */
609
- const broadcast = /*#__PURE__*/dual(3, (self, n, maximumLag) => pipe(self, broadcastedQueues(n, maximumLag), map$2(tuple => tuple.map(queue => flattenTake(fromQueue(queue, {
610
- shutdown: true
611
- }))))));
612
-
613
- /** @internal */
614
- const broadcastDynamic = /*#__PURE__*/dual(2, (self, maximumLag) => pipe(self, broadcastedQueuesDynamic(maximumLag), map$2(effect => flattenTake(flatMap(scoped(effect), fromQueue)))));
615
-
616
- /** @internal */
617
- const broadcastedQueues = /*#__PURE__*/dual(3, (self, n, maximumLag) => flatMap$1(bounded$1(maximumLag), hub => pipe(all(Array.from({
618
- length: n
619
- }, () => subscribe(hub))), tap$1(() => forkScoped(runIntoHubScoped(self, hub))))));
620
-
621
- /** @internal */
622
- const broadcastedQueuesDynamic = /*#__PURE__*/dual(2, (self, maximumLag) => map$2(toHub(self, maximumLag), subscribe));
623
-
624
- /** @internal */
625
- const buffer = /*#__PURE__*/dual(2, (self, options) => {
626
- if (options.capacity === "unbounded") {
627
- return bufferUnbounded(self);
628
- } else if (options.strategy === "dropping") {
629
- return bufferDropping(self, options.capacity);
630
- } else if (options.strategy === "sliding") {
631
- return bufferSliding(self, options.capacity);
632
- }
633
- const queue = toQueueOfElements(self, options);
634
- return new StreamImpl(unwrapScoped$1(map$2(queue, queue => {
635
- const process = pipe(fromEffect$1(take$2(queue)), flatMap$2(match$3({
636
- onFailure: cause => pipe(flipCauseOption(cause), match$2({
637
- onNone: () => unit$1,
638
- onSome: failCause$3
639
- })),
640
- onSuccess: value => flatMap$2(write(of(value)), () => process)
641
- })));
642
- return process;
643
- })));
644
- });
645
-
646
- /** @internal */
647
- const bufferChunks = /*#__PURE__*/dual(2, (self, options) => {
648
- if (options.strategy === "dropping") {
649
- return bufferChunksDropping(self, options.capacity);
650
- } else if (options.strategy === "sliding") {
651
- return bufferChunksSliding(self, options.capacity);
652
- }
653
- const queue = toQueue(self, options);
654
- return new StreamImpl(unwrapScoped$1(map$2(queue, queue => {
655
- const process = pipe(fromEffect$1(take$2(queue)), flatMap$2(match$4({
656
- onEnd: () => unit$1,
657
- onFailure: failCause$3,
658
- onSuccess: value => pipe(write(value), flatMap$2(() => process))
659
- })));
660
- return process;
661
- })));
662
- });
663
- const bufferChunksDropping = /*#__PURE__*/dual(2, (self, capacity) => {
664
- const queue = acquireRelease$1(dropping(capacity), queue => shutdown(queue));
665
- return new StreamImpl(bufferSignal(queue, toChannel(self)));
666
- });
667
- const bufferChunksSliding = /*#__PURE__*/dual(2, (self, capacity) => {
668
- const queue = acquireRelease$1(sliding$1(capacity), queue => shutdown(queue));
669
- return new StreamImpl(bufferSignal(queue, toChannel(self)));
670
- });
671
- const bufferDropping = /*#__PURE__*/dual(2, (self, capacity) => {
672
- const queue = acquireRelease$1(dropping(capacity), queue => shutdown(queue));
673
- return new StreamImpl(bufferSignal(queue, toChannel(rechunk(1)(self))));
674
- });
675
- const bufferSliding = /*#__PURE__*/dual(2, (self, capacity) => {
676
- const queue = acquireRelease$1(sliding$1(capacity), queue => shutdown(queue));
677
- return new StreamImpl(bufferSignal(queue, toChannel(pipe(self, rechunk(1)))));
678
- });
679
- const bufferUnbounded = self => {
680
- const queue = toQueue(self, {
681
- strategy: "unbounded"
682
- });
683
- return new StreamImpl(unwrapScoped$1(map$2(queue, queue => {
684
- const process = pipe(fromEffect$1(take$2(queue)), flatMap$2(match$4({
685
- onEnd: () => unit$1,
686
- onFailure: failCause$3,
687
- onSuccess: value => flatMap$2(write(value), () => process)
688
- })));
689
- return process;
690
- })));
691
- };
692
-
693
- /** @internal */
694
- const bufferSignal = (scoped, bufferChannel) => {
695
- const producer = (queue, ref) => {
696
- const terminate = take => pipe(get(ref), tap$1(_await), zipRight$1(make$4()), flatMap$1(deferred => pipe(offer$1(queue, [take, deferred]), zipRight$1(set(ref, deferred)), zipRight$1(_await(deferred)))), asUnit, fromEffect$1);
697
- return readWithCause({
698
- onInput: input => pipe(make$4(), flatMap$1(deferred => pipe(offer$1(queue, [chunk(input), deferred]), flatMap$1(added => pipe(set(ref, deferred), when$1(() => added))))), asUnit, fromEffect$1, flatMap$2(() => producer(queue, ref))),
699
- onFailure: error => terminate(failCause$6(error)),
700
- onDone: () => terminate(end$2)
701
- });
702
- };
703
- const consumer = queue => {
704
- const process = pipe(fromEffect$1(take$2(queue)), flatMap$2(([take, deferred]) => zipRight$2(fromEffect$1(succeed$2(deferred, void 0)), match$4(take, {
705
- onEnd: () => unit$1,
706
- onFailure: failCause$3,
707
- onSuccess: value => pipe(write(value), flatMap$2(() => process))
708
- }))));
709
- return process;
710
- };
711
- return unwrapScoped$1(pipe(scoped, flatMap$1(queue => pipe(make$4(), tap$1(start => succeed$2(start, void 0)), flatMap$1(start => pipe(make$3(start), flatMap$1(ref => pipe(bufferChannel, pipeTo(producer(queue, ref)), runScoped$1, forkScoped)), as$1(consumer(queue))))))));
712
- };
713
-
714
- /** @internal */
715
- const catchAll = /*#__PURE__*/dual(2, (self, f) => catchAllCause(self, cause => match(failureOrCause(cause), {
716
- onLeft: f,
717
- onRight: failCause
718
- })));
719
-
720
- /** @internal */
721
- const catchAllCause = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), catchAllCause$1(cause => toChannel(f(cause))))));
722
-
723
- /** @internal */
724
- const catchSome = /*#__PURE__*/dual(2, (self, pf) => pipe(self, catchAll(error => pipe(pf(error), getOrElse(() => fail(error))))));
725
-
726
- /** @internal */
727
- const catchSomeCause = /*#__PURE__*/dual(2, (self, pf) => pipe(self, catchAllCause(cause => pipe(pf(cause), getOrElse(() => failCause(cause))))));
728
-
729
- /* @internal */
730
- const catchTag = /*#__PURE__*/dual(3, (self, k, f) => catchAll(self, e => {
731
- if ("_tag" in e && e["_tag"] === k) {
732
- return f(e);
733
- }
734
- return fail(e);
735
- }));
736
-
737
- /** @internal */
738
- const catchTags = /*#__PURE__*/dual(2, (self, cases) => catchAll(self, e => {
739
- const keys = Object.keys(cases);
740
- if ("_tag" in e && keys.includes(e["_tag"])) {
741
- return cases[e["_tag"]](e);
742
- }
743
- return fail(e);
744
- }));
745
-
746
- /** @internal */
747
- const changes = self => pipe(self, changesWith((x, y) => equals(y)(x)));
748
-
749
- /** @internal */
750
- const changesWith = /*#__PURE__*/dual(2, (self, f) => {
751
- const writer = last => readWithCause({
752
- onInput: input => {
753
- const [newLast, newChunk] = reduce(input, [last, empty$1()], ([option, outputs], output) => {
754
- if (isSome(option) && f(option.value, output)) {
755
- return [some$1(output), outputs];
756
- }
757
- return [some$1(output), pipe(outputs, append(output))];
758
- });
759
- return flatMap$2(write(newChunk), () => writer(newLast));
760
- },
761
- onFailure: failCause$3,
762
- onDone: () => unit$1
763
- });
764
- return new StreamImpl(pipe(toChannel(self), pipeTo(writer(none()))));
765
- });
766
-
767
- /** @internal */
768
- const changesWithEffect = /*#__PURE__*/dual(2, (self, f) => {
769
- const writer = last => readWithCause({
770
- onInput: input => pipe(input, reduce$1([last, empty$1()], ([option, outputs], output) => {
771
- if (isSome(option)) {
772
- return pipe(f(option.value, output), map$2(bool => bool ? [some$1(output), outputs] : [some$1(output), pipe(outputs, append(output))]));
773
- }
774
- return succeed$1([some$1(output), pipe(outputs, append(output))]);
775
- }), fromEffect$1, flatMap$2(([newLast, newChunk]) => pipe(write(newChunk), flatMap$2(() => writer(newLast))))),
776
- onFailure: failCause$3,
777
- onDone: () => unit$1
778
- });
779
- return new StreamImpl(pipe(toChannel(self), pipeTo(writer(none()))));
780
- });
781
-
782
- /** @internal */
783
- const chunks = self => pipe(self, mapChunks(of));
784
-
785
- /** @internal */
786
- const chunksWith = /*#__PURE__*/dual(2, (self, f) => flattenChunks(f(chunks(self))));
787
- const unsome = effect => catchAll$2(asSome(effect), o => o._tag === "None" ? succeedNone : fail$1(o.value));
788
-
789
- /** @internal */
790
- const combine = /*#__PURE__*/dual(4, (self, that, s, f) => {
791
- const producer = (handoff, latch) => pipe(fromEffect$1(take$1(latch)), zipRight$2(readWithCause({
792
- onInput: input => flatMap$2(fromEffect$1(pipe(handoff, offer(succeed$4(input)))), () => producer(handoff, latch)),
793
- onFailure: cause => fromEffect$1(offer(handoff, failCause$4(pipe(cause, map$1(some$1))))),
794
- onDone: () => flatMap$2(fromEffect$1(offer(handoff, fail$3(none()))), () => producer(handoff, latch))
795
- })));
796
- return new StreamImpl(unwrapScoped$1(gen(function* ($) {
797
- const left = yield* $(make$1());
798
- const right = yield* $(make$1());
799
- const latchL = yield* $(make$1());
800
- const latchR = yield* $(make$1());
801
- yield* $(toChannel(self), concatMap(writeChunk), pipeTo(producer(left, latchL)), runScoped$1, forkScoped);
802
- yield* $(toChannel(that), concatMap(writeChunk), pipeTo(producer(right, latchR)), runScoped$1, forkScoped);
803
- const pullLeft = pipe(latchL, offer(void 0),
804
- // TODO: remove
805
- zipRight$1(pipe(take$1(left), flatMap$1(exit => suspend$1(() => exit)))));
806
- const pullRight = pipe(latchR, offer(void 0),
807
- // TODO: remove
808
- zipRight$1(pipe(take$1(right), flatMap$1(exit => suspend$1(() => exit)))));
809
- return toChannel(unfoldEffect(s, s => flatMap$1(f(s, pullLeft, pullRight), unsome)));
810
- })));
811
- });
812
-
813
- /** @internal */
814
- const combineChunks = /*#__PURE__*/dual(4, (self, that, s, f) => {
815
- const producer = (handoff, latch) => zipRight$2(fromEffect$1(take$1(latch)), readWithCause({
816
- onInput: input => flatMap$2(fromEffect$1(pipe(handoff, offer(chunk(input)))), () => producer(handoff, latch)),
817
- onFailure: cause => fromEffect$1(offer(handoff, failCause$6(cause))),
818
- onDone: () => fromEffect$1(offer(handoff, end$2))
819
- }));
820
- return new StreamImpl(pipe(all([make$1(), make$1(), make$1(), make$1()]), tap$1(([left, _, latchL]) => pipe(toChannel(self), pipeTo(producer(left, latchL)), runScoped$1, forkScoped)), tap$1(([_, right, __, latchR]) => pipe(toChannel(that), pipeTo(producer(right, latchR)), runScoped$1, forkScoped)), map$2(([left, right, latchL, latchR]) => {
821
- const pullLeft = pipe(latchL, offer(void 0), zipRight$1(pipe(take$1(left), flatMap$1(done))));
822
- const pullRight = pipe(latchR, offer(void 0), zipRight$1(pipe(take$1(right), flatMap$1(done))));
823
- return toChannel(unfoldChunkEffect(s, s => flatMap$1(f(s, pullLeft, pullRight), unsome)));
824
- }), unwrapScoped$1));
825
- });
826
-
827
- /** @internal */
828
- const concat = /*#__PURE__*/dual(2, (self, that) => new StreamImpl(pipe(toChannel(self), zipRight$2(toChannel(that)))));
829
-
830
- /** @internal */
831
- const concatAll = streams => suspend(() => pipe(streams, reduce(empty, (x, y) => concat(y)(x))));
832
-
833
- /** @internal */
834
- const cross = /*#__PURE__*/dual(2, (self, that) => pipe(self, crossWith(that, (a, a2) => [a, a2])));
835
-
836
- /** @internal */
837
- const crossLeft = /*#__PURE__*/dual(2, (self, that) => pipe(self, crossWith(that, (a, _) => a)));
838
-
839
- /** @internal */
840
- const crossRight = /*#__PURE__*/dual(2, (self, that) => flatMap(self, () => that));
841
-
842
- /** @internal */
843
- const crossWith = /*#__PURE__*/dual(3, (self, that, f) => pipe(self, flatMap(a => pipe(that, map(b => f(a, b))))));
844
-
845
- /** @internal */
846
- const debounce = /*#__PURE__*/dual(2, (self, duration) => pipe(make$5(), flatMap$1(input => transplant(grafter => pipe(make$1(), map$2(handoff => {
847
- const enqueue = last => pipe(sleep(duration), as$1(last), fork, grafter, map$2(fiber => consumer(previous(fiber))));
848
- const producer = readWithCause({
849
- onInput: input => match$2(last$1(input), {
850
- onNone: () => producer,
851
- onSome: last => flatMap$2(fromEffect$1(offer(handoff, emit(of(last)))), () => producer)
852
- }),
853
- onFailure: cause => fromEffect$1(offer(handoff, halt(cause))),
854
- onDone: () => fromEffect$1(offer(handoff, end$1(UpstreamEnd)))
855
- });
856
- const consumer = state => {
857
- switch (state._tag) {
858
- case OP_NOT_STARTED:
859
- {
860
- return pipe(take$1(handoff), map$2(signal => {
861
- switch (signal._tag) {
862
- case OP_EMIT:
863
- {
864
- return unwrap$1(enqueue(signal.elements));
865
- }
866
- case OP_HALT:
867
- {
868
- return failCause$3(signal.cause);
869
- }
870
- case OP_END:
871
- {
872
- return unit$1;
873
- }
874
- }
875
- }), unwrap$1);
876
- }
877
- case OP_PREVIOUS:
878
- {
879
- return unwrap$1(raceWith(join(state.fiber), take$1(handoff), {
880
- onSelfDone: (leftExit, current$1) => match$3(leftExit, {
881
- onFailure: cause => pipe(interrupt(current$1), as$1(failCause$3(cause))),
882
- onSuccess: chunk => succeed$1(pipe(write(chunk), flatMap$2(() => consumer(current(current$1)))))
883
- }),
884
- onOtherDone: (rightExit, previous) => match$3(rightExit, {
885
- onFailure: cause => pipe(interrupt(previous), as$1(failCause$3(cause))),
886
- onSuccess: signal => {
887
- switch (signal._tag) {
888
- case OP_EMIT:
889
- {
890
- return pipe(interrupt(previous), zipRight$1(enqueue(signal.elements)));
891
- }
892
- case OP_HALT:
893
- {
894
- return pipe(interrupt(previous), as$1(failCause$3(signal.cause)));
895
- }
896
- case OP_END:
897
- {
898
- return pipe(join(previous), map$2(chunk => pipe(write(chunk), zipRight$2(unit$1))));
899
- }
900
- }
901
- }
902
- })
903
- }));
904
- }
905
- case OP_CURRENT:
906
- {
907
- return pipe(join(state.fiber), map$2(signal => {
908
- switch (signal._tag) {
909
- case OP_EMIT:
910
- {
911
- return unwrap$1(enqueue(signal.elements));
912
- }
913
- case OP_HALT:
914
- {
915
- return failCause$3(signal.cause);
916
- }
917
- case OP_END:
918
- {
919
- return unit$1;
920
- }
921
- }
922
- }), unwrap$1);
923
- }
924
- }
925
- };
926
- const debounceChannel = pipe(fromInput$1(input), pipeTo(producer), run$1, forkScoped, as$1(pipe(consumer(notStarted), embedInput(input))), unwrapScoped$1);
927
- return new StreamImpl(pipe(toChannel(self), pipeTo(debounceChannel)));
928
- })))), unwrap));
929
-
930
- /** @internal */
931
- const die = defect => fromEffect(die$1(defect));
932
-
933
- /** @internal */
934
- const dieSync = evaluate => fromEffect(dieSync$1(evaluate));
935
-
936
- /** @internal */
937
- const dieMessage = message => fromEffect(dieMessage$1(message));
938
-
939
- /** @internal */
940
- const distributedWith = /*#__PURE__*/dual(2, (self, options) => pipe(make$4(), flatMap$1(deferred => pipe(self, distributedWithDynamic({
941
- maximumLag: options.maximumLag,
942
- decide: a => flatMap$1(_await(deferred), f => f(a))
943
- }), flatMap$1(next => pipe(all(map$3(range$1(0, options.size - 1), id => map$2(next, ([key, queue]) => [[key, id], queue]))), map$2(unsafeFromArray), flatMap$1(entries => {
944
- const [mappings, queues] = reduceRight(entries, [new Map(), empty$1()], ([mappings, queues], [mapping, queue]) => [mappings.set(mapping[0], mapping[1]), pipe(queues, prepend$1(queue))]);
945
- return pipe(succeed$2(deferred, a => map$2(options.decide(a), f => key => pipe(f(mappings.get(key))))), as$1(Array.from(queues)));
946
- })))))));
947
-
948
- /** @internal */
949
- const distributedWithDynamicId = {
950
- ref: 0
951
- };
952
- const newDistributedWithDynamicId = () => {
953
- const current = distributedWithDynamicId.ref;
954
- distributedWithDynamicId.ref = current + 1;
955
- return current;
956
- };
957
-
958
- /** @internal */
959
- const distributedWithDynamic = /*#__PURE__*/dual(2, (self, options) => distributedWithDynamicCallback(self, options.maximumLag, options.decide, () => unit$2));
960
- const distributedWithDynamicCallback = /*#__PURE__*/dual(4, (self, maximumLag, decide, done) => pipe(acquireRelease$1(make$3(new Map()), (ref, _) => pipe(get(ref), flatMap$1(queues => pipe(queues.values(), forEach(shutdown))))), flatMap$1(queuesRef => gen(function* ($) {
961
- const offer = a => pipe(decide(a), flatMap$1(shouldProcess => pipe(get(queuesRef), flatMap$1(queues => pipe(queues.entries(), reduce$1(empty$1(), (acc, [id, queue]) => {
962
- if (shouldProcess(id)) {
963
- return pipe(offer$1(queue, succeed$4(a)), matchCauseEffect({
964
- onFailure: cause =>
965
- // Ignore all downstream queues that were shut
966
- // down and remove them later
967
- isInterrupted(cause) ? succeed$1(pipe(acc, prepend$1(id))) : failCause$2(cause),
968
- onSuccess: () => succeed$1(acc)
969
- }));
970
- }
971
- return succeed$1(acc);
972
- }), flatMap$1(ids => {
973
- if (isNonEmpty(ids)) {
974
- return pipe(update(queuesRef, map => {
975
- for (const id of ids) {
976
- map.delete(id);
977
- }
978
- return map;
979
- }));
980
- }
981
- return unit$2;
982
- }))))), asUnit);
983
- const queuesLock = yield* $(makeSemaphore(1));
984
- const newQueue = yield* $(make$3(pipe(bounded(maximumLag), flatMap$1(queue => {
985
- const id = newDistributedWithDynamicId();
986
- return pipe(update(queuesRef, map => map.set(id, queue)), as$1([id, queue]));
987
- }))));
988
- const finalize = endTake =>
989
- // Make sure that no queues are currently being added
990
- queuesLock.withPermits(1)(pipe(set(newQueue, pipe(
991
- // All newly created queues should end immediately
992
- bounded(1), tap$1(queue => offer$1(queue, endTake)), flatMap$1(queue => {
993
- const id = newDistributedWithDynamicId();
994
- return pipe(update(queuesRef, map => map.set(id, queue)), as$1([id, queue]));
995
- }))), zipRight$1(pipe(get(queuesRef), flatMap$1(map => pipe(fromIterable$1(map.values()), forEach(queue => pipe(offer$1(queue, endTake), catchSomeCause$1(cause => isInterrupted(cause) ? some$1(unit$2) : none()))))))), zipRight$1(done(endTake)), asUnit));
996
- yield* $(self, runForEachScoped(offer), matchCauseEffect({
997
- onFailure: cause => finalize(failCause$4(pipe(cause, map$1(some$1)))),
998
- onSuccess: () => finalize(fail$3(none()))
999
- }), forkScoped);
1000
- return queuesLock.withPermits(1)(flatten$1(get(newQueue)));
1001
- }))));
1002
-
1003
- /** @internal */
1004
- const drain = self => new StreamImpl(drain$1(toChannel(self)));
1005
-
1006
- /** @internal */
1007
- const drainFork = /*#__PURE__*/dual(2, (self, that) => pipe(fromEffect(make$4()), flatMap(backgroundDied => pipe(scoped(pipe(that, runForEachScoped(() => unit$2), catchAllCause$2(cause => failCause$5(backgroundDied, cause)), forkScoped)), crossRight(pipe(self, interruptWhenDeferred(backgroundDied)))))));
1008
-
1009
- /** @internal */
1010
- const drop = /*#__PURE__*/dual(2, (self, n) => {
1011
- const loop = r => readWith({
1012
- onInput: input => {
1013
- const dropped = pipe(input, drop$1(r));
1014
- const leftover = Math.max(0, r - input.length);
1015
- const more = isEmpty(input) || leftover > 0;
1016
- if (more) {
1017
- return loop(leftover);
1018
- }
1019
- return pipe(write(dropped), zipRight$2(identityChannel()));
1020
- },
1021
- onFailure: fail$2,
1022
- onDone: () => unit$1
1023
- });
1024
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop(n))));
1025
- });
1026
-
1027
- /** @internal */
1028
- const dropRight = /*#__PURE__*/dual(2, (self, n) => {
1029
- if (n <= 0) {
1030
- return identityStream();
1031
- }
1032
- return suspend(() => {
1033
- const queue = new RingBuffer(n);
1034
- const reader = readWith({
1035
- onInput: input => {
1036
- const outputs = pipe(input, filterMap$1(elem => {
1037
- const head = queue.head();
1038
- queue.put(elem);
1039
- return head;
1040
- }));
1041
- return pipe(write(outputs), flatMap$2(() => reader));
1042
- },
1043
- onFailure: fail$2,
1044
- onDone: () => unit$1
1045
- });
1046
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(reader)));
1047
- });
1048
- });
1049
-
1050
- /** @internal */
1051
- const dropUntil = /*#__PURE__*/dual(2, (self, predicate) => drop(dropWhile(self, a => !predicate(a)), 1));
1052
-
1053
- /** @internal */
1054
- const dropUntilEffect = /*#__PURE__*/dual(2, (self, predicate) => {
1055
- const loop = readWith({
1056
- onInput: input => pipe(dropUntil$1(input, predicate), map$2(unsafeFromArray), map$2(leftover => {
1057
- const more = isEmpty(leftover);
1058
- if (more) {
1059
- return suspend$2(() => loop);
1060
- }
1061
- return pipe(write(leftover), zipRight$2(identityChannel()));
1062
- }), unwrap$1),
1063
- onFailure: fail$2,
1064
- onDone: () => unit$1
1065
- });
1066
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop)));
1067
- });
1068
-
1069
- /** @internal */
1070
- const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => {
1071
- const loop = readWith({
1072
- onInput: input => {
1073
- const output = dropWhile$1(input, predicate);
1074
- if (isEmpty(output)) {
1075
- return suspend$2(() => loop);
1076
- }
1077
- return zipRight$2(write(output), identityChannel());
1078
- },
1079
- onFailure: fail$2,
1080
- onDone: succeedNow
1081
- });
1082
- return new StreamImpl(pipeToOrFail(toChannel(self), loop));
1083
- });
1084
-
1085
- /** @internal */
1086
- const dropWhileEffect = /*#__PURE__*/dual(2, (self, predicate) => {
1087
- const loop = readWith({
1088
- onInput: input => pipe(dropWhile$2(input, predicate), map$2(unsafeFromArray), map$2(leftover => {
1089
- const more = isEmpty(leftover);
1090
- if (more) {
1091
- return suspend$2(() => loop);
1092
- }
1093
- return zipRight$2(write(leftover), identityChannel());
1094
- }), unwrap$1),
1095
- onFailure: fail$2,
1096
- onDone: () => unit$1
1097
- });
1098
- return new StreamImpl(pipeToOrFail(toChannel(self), loop));
1099
- });
1100
-
1101
- /** @internal */
1102
- const either = self => pipe(self, map(right), catchAll(error => make(left(error))));
1103
-
1104
- /** @internal */
1105
- const empty = /*#__PURE__*/new StreamImpl( /*#__PURE__*/write( /*#__PURE__*/empty$1()));
1106
-
1107
- /** @internal */
1108
- const ensuring = /*#__PURE__*/dual(2, (self, finalizer) => new StreamImpl(pipe(toChannel(self), ensuring$1(finalizer))));
1109
-
1110
- /** @internal */
1111
- const ensuringWith = /*#__PURE__*/dual(2, (self, finalizer) => new StreamImpl(ensuringWith$1(toChannel(self), finalizer)));
1112
-
1113
- /** @internal */
1114
- const context = () => fromEffect(context$1());
1115
-
1116
- /** @internal */
1117
- const contextWith = f => pipe(context(), map(f));
1118
-
1119
- /** @internal */
1120
- const contextWithEffect = f => pipe(context(), mapEffectSequential(f));
1121
-
1122
- /** @internal */
1123
- const contextWithStream = f => pipe(context(), flatMap(f));
1124
-
1125
- /** @internal */
1126
- const execute = effect => drain(fromEffect(effect));
1127
-
1128
- /** @internal */
1129
- const fail = error => fromEffectOption(fail$1(some$1(error)));
1130
-
1131
- /** @internal */
1132
- const failSync = evaluate => fromEffectOption(failSync$1(() => some$1(evaluate())));
1133
-
1134
- /** @internal */
1135
- const failCause = cause => fromEffect(failCause$2(cause));
1136
-
1137
- /** @internal */
1138
- const failCauseSync = evaluate => fromEffect(failCauseSync$1(evaluate));
1139
-
1140
- /** @internal */
1141
- const filter = /*#__PURE__*/dual(2, (self, predicate) => mapChunks(self, filter$1(predicate)));
1142
-
1143
- /** @internal */
1144
- const filterEffect = /*#__PURE__*/dual(2, (self, f) => {
1145
- const loop = iterator => {
1146
- const next = iterator.next();
1147
- if (next.done) {
1148
- return readWithCause({
1149
- onInput: input => loop(input[Symbol.iterator]()),
1150
- onFailure: failCause$3,
1151
- onDone: succeed$3
1152
- });
1153
- } else {
1154
- return pipe(f(next.value), map$2(bool => bool ? pipe(write(of(next.value)), flatMap$2(() => loop(iterator))) : loop(iterator)), unwrap$1);
1155
- }
1156
- };
1157
- return new StreamImpl(suspend$2(() => pipe(toChannel(self), pipeTo(loop(empty$1()[Symbol.iterator]())))));
1158
- });
1159
-
1160
- /** @internal */
1161
- const filterMap = /*#__PURE__*/dual(2, (self, pf) => mapChunks(self, filterMap$1(pf)));
1162
-
1163
- /** @internal */
1164
- const filterMapEffect = /*#__PURE__*/dual(2, (self, pf) => suspend(() => {
1165
- const loop = iterator => {
1166
- const next = iterator.next();
1167
- if (next.done) {
1168
- return readWithCause({
1169
- onInput: input => loop(input[Symbol.iterator]()),
1170
- onFailure: failCause$3,
1171
- onDone: succeed$3
1172
- });
1173
- } else {
1174
- return pipe(pf(next.value), match$2({
1175
- onNone: () => sync$1(() => loop(iterator)),
1176
- onSome: map$2(a2 => flatMap$2(write(of(a2)), () => loop(iterator)))
1177
- }), unwrap$1);
1178
- }
1179
- };
1180
- return new StreamImpl(pipe(toChannel(self), pipeTo(loop(empty$1()[Symbol.iterator]()))));
1181
- }));
1182
-
1183
- /** @internal */
1184
- const filterMapWhile = /*#__PURE__*/dual(2, (self, pf) => {
1185
- const loop = readWith({
1186
- onInput: input => {
1187
- const mapped = filterMapWhile$1(input, pf);
1188
- if (mapped.length === input.length) {
1189
- return pipe(write(mapped), flatMap$2(() => loop));
1190
- }
1191
- return write(mapped);
1192
- },
1193
- onFailure: fail$2,
1194
- onDone: succeed$3
1195
- });
1196
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop)));
1197
- });
1198
-
1199
- /** @internal */
1200
- const filterMapWhileEffect = /*#__PURE__*/dual(2, (self, pf) => suspend(() => {
1201
- const loop = iterator => {
1202
- const next = iterator.next();
1203
- if (next.done) {
1204
- return readWithCause({
1205
- onInput: input => loop(input[Symbol.iterator]()),
1206
- onFailure: failCause$3,
1207
- onDone: succeed$3
1208
- });
1209
- } else {
1210
- return unwrap$1(match$2(pf(next.value), {
1211
- onNone: () => succeed$1(unit$1),
1212
- onSome: map$2(a2 => flatMap$2(write(of(a2)), () => loop(iterator)))
1213
- }));
1214
- }
1215
- };
1216
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop(empty$1()[Symbol.iterator]()))));
1217
- }));
1218
-
1219
- /** @internal */
1220
- const finalizer = finalizer => acquireRelease(unit$2, () => finalizer);
1221
-
1222
- /** @internal */
1223
- const find = /*#__PURE__*/dual(2, (self, predicate) => {
1224
- const loop = readWith({
1225
- onInput: input => match$2(findFirst(input, predicate), {
1226
- onNone: () => loop,
1227
- onSome: n => write(of(n))
1228
- }),
1229
- onFailure: fail$2,
1230
- onDone: () => unit$1
1231
- });
1232
- return new StreamImpl(pipe(toChannel(self), pipeTo(loop)));
1233
- });
1234
-
1235
- /** @internal */
1236
- const findEffect = /*#__PURE__*/dual(2, (self, predicate) => {
1237
- const loop = readWith({
1238
- onInput: input => pipe(findFirst$1(input, predicate), map$2(match$2({
1239
- onNone: () => loop,
1240
- onSome: n => write(of(n))
1241
- })), unwrap$1),
1242
- onFailure: fail$2,
1243
- onDone: () => unit$1
1244
- });
1245
- return new StreamImpl(pipe(toChannel(self), pipeTo(loop)));
1246
- });
1247
-
1248
- /** @internal */
1249
- const flatMap = /*#__PURE__*/dual(args => typeof args[0] !== "function", (self, f, options) => {
1250
- const bufferSize = options?.bufferSize ?? 16;
1251
- if (options?.switch) {
1252
- return matchConcurrency(options?.concurrency, () => flatMapParSwitchBuffer(self, 1, bufferSize, f), n => flatMapParSwitchBuffer(self, n, bufferSize, f));
1253
- }
1254
- return matchConcurrency(options?.concurrency, () => new StreamImpl(concatMap(toChannel(self), as => pipe(as, map$3(a => toChannel(f(a))), reduce(unit$1, (left, right) => pipe(left, zipRight$2(right)))))), n => new StreamImpl(pipe(toChannel(self), concatMap(writeChunk), mergeMap(out => toChannel(f(out)), {
1255
- concurrency: n,
1256
- bufferSize
1257
- }))));
1258
- });
1259
-
1260
- /** @internal */
1261
- const matchConcurrency = (concurrency, sequential, bounded) => {
1262
- switch (concurrency) {
1263
- case undefined:
1264
- return sequential();
1265
- case "unbounded":
1266
- return bounded(Number.POSITIVE_INFINITY);
1267
- default:
1268
- return concurrency > 1 ? bounded(concurrency) : sequential();
1269
- }
1270
- };
1271
- const flatMapParSwitchBuffer = /*#__PURE__*/dual(4, (self, n, bufferSize, f) => new StreamImpl(pipe(toChannel(self), concatMap(writeChunk), mergeMap(out => toChannel(f(out)), {
1272
- concurrency: n,
1273
- mergeStrategy: BufferSliding(),
1274
- bufferSize
1275
- }))));
1276
-
1277
- /** @internal */
1278
- const flatten = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => flatMap(self, identity, options));
1279
-
1280
- /** @internal */
1281
- const flattenChunks = self => {
1282
- const flatten = readWithCause({
1283
- onInput: chunks => flatMap$2(writeChunk(chunks), () => flatten),
1284
- onFailure: failCause$3,
1285
- onDone: () => unit$1
1286
- });
1287
- return new StreamImpl(pipe(toChannel(self), pipeTo(flatten)));
1288
- };
1289
-
1290
- /** @internal */
1291
- const flattenEffect = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => options?.unordered ? flatMap(self, a => fromEffect(a), {
1292
- concurrency: options.concurrency
1293
- }) : matchConcurrency(options?.concurrency, () => mapEffectSequential(self, identity), n => new StreamImpl(pipe(toChannel(self), concatMap(writeChunk), mapOutEffectPar(identity, n), mapOut(of)))));
1294
-
1295
- /** @internal */
1296
- const flattenExitOption = self => {
1297
- const processChunk = (chunk, cont) => {
1298
- const [toEmit, rest] = pipe(chunk, splitWhere(exit => !isSuccess(exit)));
1299
- const next = pipe(head$1(rest), match$2({
1300
- onNone: () => cont,
1301
- onSome: match$3({
1302
- onFailure: cause => match$2(flipCauseOption(cause), {
1303
- onNone: () => unit$1,
1304
- onSome: failCause$3
1305
- }),
1306
- onSuccess: () => unit$1
1307
- })
1308
- }));
1309
- return pipe(write(pipe(toEmit, filterMap$1(exit => isSuccess(exit) ? some$1(exit.value) : none()))), flatMap$2(() => next));
1310
- };
1311
- const process = readWithCause({
1312
- onInput: chunk => processChunk(chunk, process),
1313
- onFailure: cause => failCause$3(cause),
1314
- onDone: () => unit$1
1315
- });
1316
- return new StreamImpl(pipe(toChannel(self), pipeTo(process)));
1317
- };
1318
-
1319
- /** @internal */
1320
- const flattenIterables = self => pipe(self, map(fromIterable$1), flattenChunks);
1321
-
1322
- /** @internal */
1323
- const flattenTake = self => flattenChunks(flattenExitOption(pipe(self, map(take => take.exit))));
1324
-
1325
- /** @internal */
1326
- const forever = self => new StreamImpl(repeated(toChannel(self)));
1327
-
1328
- /** @internal */
1329
- const fromAsyncIterable = (iterable, onError) => pipe(acquireRelease$1(sync$1(() => iterable[Symbol.asyncIterator]()), iterator => iterator.return ? promise(async () => iterator.return()) : unit$2), map$2(iterator => repeatEffectOption(pipe(tryPromise({
1330
- try: async () => iterator.next(),
1331
- catch: reason => some$1(onError(reason))
1332
- }), flatMap$1(result => result.done ? fail$1(none()) : succeed$1(result.value))))), unwrapScoped);
1333
-
1334
- /** @internal */
1335
- const fromChannel = channel => new StreamImpl(channel);
1336
-
1337
- /** @internal */
1338
- const toChannel = stream => {
1339
- if (isEffect(stream)) {
1340
- return toChannel(fromEffect(stream));
1341
- }
1342
- return stream.channel;
1343
- };
1344
-
1345
- /** @internal */
1346
- const fromChunk = chunk => new StreamImpl(isEmpty(chunk) ? unit$1 : write(chunk));
1347
-
1348
- /** @internal */
1349
- const fromChunkHub = (hub, options) => {
1350
- if (options?.scoped) {
1351
- const effect = map$2(subscribe(hub), fromChunkQueue);
1352
- return options.shutdown ? map$2(effect, ensuring(shutdown$1(hub))) : effect;
1353
- }
1354
- const stream = flatMap(scoped(subscribe(hub)), fromChunkQueue);
1355
- return options?.shutdown ? ensuring(stream, shutdown$1(hub)) : stream;
1356
- };
1357
-
1358
- /** @internal */
1359
- const fromChunkQueue = (queue, options) => pipe(take$2(queue), catchAllCause$2(cause => pipe(isShutdown(queue), flatMap$1(isShutdown => isShutdown && isInterrupted(cause) ? end() : failCause$1(cause)))), repeatEffectChunkOption, options?.shutdown ? ensuring(shutdown(queue)) : identity);
1360
-
1361
- /** @internal */
1362
- const fromChunks = (...chunks) => pipe(fromIterable(chunks), flatMap(fromChunk));
1363
-
1364
- /** @internal */
1365
- const fromEffect = effect => pipe(effect, mapError$1(some$1), fromEffectOption);
1366
-
1367
- /** @internal */
1368
- const fromEffectOption = effect => new StreamImpl(unwrap$1(match$1(effect, {
1369
- onFailure: match$2({
1370
- onNone: () => unit$1,
1371
- onSome: fail$2
1372
- }),
1373
- onSuccess: a => write(of(a))
1374
- })));
1375
-
1376
- /** @internal */
1377
- const fromHub = (hub, options) => {
1378
- const maxChunkSize = options?.maxChunkSize ?? DefaultChunkSize;
1379
- if (options?.scoped) {
1380
- const effect = map$2(subscribe(hub), queue => fromQueue(queue, {
1381
- maxChunkSize,
1382
- shutdown: true
1383
- }));
1384
- return options.shutdown ? map$2(effect, ensuring(shutdown$1(hub))) : effect;
1385
- }
1386
- const stream = flatMap(scoped(subscribe(hub)), queue => fromQueue(queue, {
1387
- maxChunkSize
1388
- }));
1389
- return options?.shutdown ? ensuring(stream, shutdown$1(hub)) : stream;
1390
- };
1391
-
1392
- /** @internal */
1393
- const fromIterable = iterable => suspend(() => isChunk(iterable) ? fromChunk(iterable) : fromIteratorSucceed(iterable[Symbol.iterator]()));
1394
-
1395
- /** @internal */
1396
- const fromIterableEffect = effect => pipe(effect, map$2(fromIterable), unwrap);
1397
-
1398
- /** @internal */
1399
- const fromIteratorSucceed = (iterator, maxChunkSize = DefaultChunkSize) => {
1400
- return pipe(sync$1(() => {
1401
- let builder = [];
1402
- const loop = iterator => pipe(sync$1(() => {
1403
- let next = iterator.next();
1404
- if (maxChunkSize === 1) {
1405
- if (next.done) {
1406
- return unit$1;
1407
- }
1408
- return pipe(write(of(next.value)), flatMap$2(() => loop(iterator)));
1409
- }
1410
- builder = [];
1411
- let count = 0;
1412
- while (count < maxChunkSize && !next.done) {
1413
- builder.push(next.value);
1414
- next = iterator.next();
1415
- count = count + 1;
1416
- }
1417
- if (count > 0) {
1418
- return pipe(write(unsafeFromArray(builder)), flatMap$2(() => loop(iterator)));
1419
- }
1420
- return unit$1;
1421
- }), unwrap$1);
1422
- return new StreamImpl(loop(iterator));
1423
- }), unwrap);
1424
- };
1425
-
1426
- /** @internal */
1427
- const fromPull = effect => pipe(effect, map$2(repeatEffectChunkOption), unwrapScoped);
1428
-
1429
- /** @internal */
1430
- const fromQueue = (queue, options) => pipe(takeBetween(queue, 1, options?.maxChunkSize ?? DefaultChunkSize), catchAllCause$2(cause => pipe(isShutdown(queue), flatMap$1(isShutdown => isShutdown && isInterrupted(cause) ? end() : failCause$1(cause)))), repeatEffectChunkOption, options?.shutdown ? ensuring(shutdown(queue)) : identity);
1431
-
1432
- /** @internal */
1433
- const fromSchedule = schedule => pipe(driver(schedule), map$2(driver => repeatEffectOption(driver.next(void 0))), unwrap);
1434
-
1435
- /** @internal */
1436
- const fromReadableStream = (evaluate, onError) => unwrapScoped(map$2(acquireRelease$1(sync$1(() => evaluate().getReader()), reader => promise(() => reader.cancel())), reader => repeatEffectOption(flatMap$1(tryPromise({
1437
- try: () => reader.read(),
1438
- catch: reason => some$1(onError(reason))
1439
- }), ({
1440
- done,
1441
- value
1442
- }) => done ? fail$1(none()) : succeed$1(value)))));
1443
-
1444
- /** @internal */
1445
- const fromReadableStreamByob = (evaluate, onError, allocSize = 4096) => unwrapScoped(map$2(acquireRelease$1(sync$1(() => evaluate().getReader({
1446
- mode: "byob"
1447
- })), reader => promise(() => reader.cancel())), reader => catchAll(forever(readChunkStreamByobReader(reader, onError, allocSize)), error => typeof error === "object" && error !== null && "_tag" in error && error._tag === "EOF" ? empty : fail(error))));
1448
- const readChunkStreamByobReader = (reader, onError, size) => {
1449
- const buffer = new ArrayBuffer(size);
1450
- return paginateEffect(0, offset => flatMap$1(tryPromise({
1451
- try: () => reader.read(new Uint8Array(buffer, offset, buffer.byteLength - offset)),
1452
- catch: reason => onError(reason)
1453
- }), ({
1454
- done,
1455
- value
1456
- }) => {
1457
- if (done) {
1458
- return fail$1({
1459
- _tag: "EOF"
1460
- });
1461
- }
1462
- const newOffset = offset + value.byteLength;
1463
- return succeed$1([value, newOffset >= buffer.byteLength ? none() : some$1(newOffset)]);
1464
- }));
1465
- };
1466
-
1467
- /** @internal */
1468
- const groupAdjacentBy = /*#__PURE__*/dual(2, (self, f) => {
1469
- const groupAdjacentByChunk = (state, chunk) => {
1470
- if (isEmpty(chunk)) {
1471
- return [state, empty$1()];
1472
- }
1473
- const builder = [];
1474
- let from = 0;
1475
- let until = 0;
1476
- let key = undefined;
1477
- let previousChunk = empty$1();
1478
- switch (state._tag) {
1479
- case "Some":
1480
- {
1481
- const tuple = state.value;
1482
- key = tuple[0];
1483
- let loop = true;
1484
- while (loop && until < chunk.length) {
1485
- const input = unsafeGet$1(chunk, until);
1486
- const updatedKey = f(input);
1487
- if (!equals(key, updatedKey)) {
1488
- builder.push([key, unsafeFromArray(Array.from(tuple[1]).slice(from, until))]);
1489
- key = updatedKey;
1490
- from = until;
1491
- loop = false;
1492
- }
1493
- until = until + 1;
1494
- }
1495
- if (loop) {
1496
- previousChunk = tuple[1];
1497
- }
1498
- break;
1499
- }
1500
- case "None":
1501
- {
1502
- key = f(unsafeGet$1(chunk, until));
1503
- until = until + 1;
1504
- break;
1505
- }
1506
- }
1507
- while (until < chunk.length) {
1508
- const input = unsafeGet$1(chunk, until);
1509
- const updatedKey = f(input);
1510
- if (!equals(key, updatedKey)) {
1511
- builder.push([key, unsafeFromArray(Array.from(chunk).slice(from, until))]);
1512
- key = updatedKey;
1513
- from = until;
1514
- }
1515
- until = until + 1;
1516
- }
1517
- const nonEmptyChunk = appendAll(previousChunk, unsafeFromArray(Array.from(chunk).slice(from, until)));
1518
- const output = unsafeFromArray(builder);
1519
- return [some$1([key, nonEmptyChunk]), output];
1520
- };
1521
- const groupAdjacent = state => readWithCause({
1522
- onInput: input => {
1523
- const [updatedState, output] = groupAdjacentByChunk(state, input);
1524
- return isEmpty(output) ? groupAdjacent(updatedState) : flatMap$2(write(output), () => groupAdjacent(updatedState));
1525
- },
1526
- onFailure: cause => match$2(state, {
1527
- onNone: () => failCause$3(cause),
1528
- onSome: output => flatMap$2(write(of(output)), () => failCause$3(cause))
1529
- }),
1530
- onDone: done => match$2(state, {
1531
- onNone: () => succeedNow(done),
1532
- onSome: output => flatMap$2(write(of(output)), () => succeedNow(done))
1533
- })
1534
- });
1535
- return new StreamImpl(pipeToOrFail(toChannel(self), groupAdjacent(none())));
1536
- });
1537
-
1538
- /** @internal */
1539
- const grouped = /*#__PURE__*/dual(2, (self, chunkSize) => pipe(self, rechunk(chunkSize), chunks));
1540
-
1541
- /** @internal */
1542
- const groupedWithin = /*#__PURE__*/dual(3, (self, chunkSize, duration) => aggregateWithin(self, collectAllN(chunkSize), spaced(duration)));
1543
-
1544
- /** @internal */
1545
- const haltWhen = /*#__PURE__*/dual(2, (self, effect) => {
1546
- const writer = fiber => pipe(poll$1(fiber), map$2(match$2({
1547
- onNone: () => readWith({
1548
- onInput: input => flatMap$2(write(input), () => writer(fiber)),
1549
- onFailure: fail$2,
1550
- onDone: () => unit$1
1551
- }),
1552
- onSome: match$3({
1553
- onFailure: failCause$3,
1554
- onSuccess: () => unit$1
1555
- })
1556
- })), unwrap$1);
1557
- return new StreamImpl(pipe(forkScoped(effect), map$2(fiber => pipe(toChannel(self), pipeTo(writer(fiber)))), unwrapScoped$1));
1558
- });
1559
-
1560
- /** @internal */
1561
- const haltAfter = /*#__PURE__*/dual(2, (self, duration) => pipe(self, haltWhen(sleep(duration))));
1562
-
1563
- /** @internal */
1564
- const haltWhenDeferred = /*#__PURE__*/dual(2, (self, deferred) => {
1565
- const writer = pipe(poll(deferred), map$2(match$2({
1566
- onNone: () => readWith({
1567
- onInput: input => pipe(write(input), flatMap$2(() => writer)),
1568
- onFailure: fail$2,
1569
- onDone: () => unit$1
1570
- }),
1571
- onSome: effect => unwrap$1(match$1(effect, {
1572
- onFailure: fail$2,
1573
- onSuccess: () => unit$1
1574
- }))
1575
- })), unwrap$1);
1576
- return new StreamImpl(pipe(toChannel(self), pipeTo(writer)));
1577
- });
1578
-
1579
- /** @internal */
1580
- const identityStream = () => new StreamImpl(identityChannel());
1581
-
1582
- /** @internal */
1583
- const interleave = /*#__PURE__*/dual(2, (self, that) => pipe(self, interleaveWith(that, forever(make(true, false)))));
1584
-
1585
- /** @internal */
1586
- const interleaveWith = /*#__PURE__*/dual(3, (self, that, decider) => {
1587
- const producer = handoff => readWithCause({
1588
- onInput: value => flatMap$2(fromEffect$1(offer(handoff, of$1(value))), () => producer(handoff)),
1589
- onFailure: cause => fromEffect$1(offer(handoff, failCause$6(cause))),
1590
- onDone: () => fromEffect$1(offer(handoff, end$2))
1591
- });
1592
- return new StreamImpl(unwrapScoped$1(pipe(make$1(), zip$1(make$1()), tap$1(([left]) => pipe(toChannel(self), concatMap(writeChunk), pipeTo(producer(left)), runScoped$1, forkScoped)), tap$1(([_, right]) => pipe(toChannel(that), concatMap(writeChunk), pipeTo(producer(right)), runScoped$1, forkScoped)), map$2(([left, right]) => {
1593
- const process = (leftDone, rightDone) => readWithCause({
1594
- onInput: bool => {
1595
- if (bool && !leftDone) {
1596
- return pipe(fromEffect$1(take$1(left)), flatMap$2(match$4({
1597
- onEnd: () => rightDone ? unit$1 : process(true, rightDone),
1598
- onFailure: failCause$3,
1599
- onSuccess: chunk => pipe(write(chunk), flatMap$2(() => process(leftDone, rightDone)))
1600
- })));
1601
- }
1602
- if (!bool && !rightDone) {
1603
- return pipe(fromEffect$1(take$1(right)), flatMap$2(match$4({
1604
- onEnd: () => leftDone ? unit$1 : process(leftDone, true),
1605
- onFailure: failCause$3,
1606
- onSuccess: chunk => pipe(write(chunk), flatMap$2(() => process(leftDone, rightDone)))
1607
- })));
1608
- }
1609
- return process(leftDone, rightDone);
1610
- },
1611
- onFailure: failCause$3,
1612
- onDone: () => unit$1
1613
- });
1614
- return pipe(toChannel(decider), concatMap(writeChunk), pipeTo(process(false, false)));
1615
- }))));
1616
- });
1617
-
1618
- /** @internal */
1619
- const intersperse = /*#__PURE__*/dual(2, (self, element) => new StreamImpl(pipe(toChannel(self), pipeToOrFail(suspend$2(() => {
1620
- const writer = isFirst => readWithCause({
1621
- onInput: chunk => {
1622
- const builder = [];
1623
- let flagResult = isFirst;
1624
- for (const output of chunk) {
1625
- if (flagResult) {
1626
- flagResult = false;
1627
- builder.push(output);
1628
- } else {
1629
- builder.push(element);
1630
- builder.push(output);
1631
- }
1632
- }
1633
- return pipe(write(unsafeFromArray(builder)), flatMap$2(() => writer(flagResult)));
1634
- },
1635
- onFailure: failCause$3,
1636
- onDone: () => unit$1
1637
- });
1638
- return writer(true);
1639
- })))));
1640
-
1641
- /** @internal */
1642
- const intersperseAffixes = /*#__PURE__*/dual(2, (self, {
1643
- end,
1644
- middle,
1645
- start
1646
- }) => pipe(make(start), concat(pipe(self, intersperse(middle))), concat(make(end))));
1647
-
1648
- /** @internal */
1649
- const interruptAfter = /*#__PURE__*/dual(2, (self, duration) => pipe(self, interruptWhen(sleep(duration))));
1650
-
1651
- /** @internal */
1652
- const interruptWhen = /*#__PURE__*/dual(2, (self, effect) => new StreamImpl(pipe(toChannel(self), interruptWhen$1(effect))));
1653
-
1654
- /** @internal */
1655
- const interruptWhenDeferred = /*#__PURE__*/dual(2, (self, deferred) => new StreamImpl(pipe(toChannel(self), interruptWhenDeferred$1(deferred))));
1656
-
1657
- /** @internal */
1658
- const iterate = (value, next) => unfold(value, a => some$1([a, next(a)]));
1659
-
1660
- /** @internal */
1661
- const make = (...as) => fromIterable(as);
1662
-
1663
- /** @internal */
1664
- const map = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapOut(map$3(f)))));
1665
-
1666
- /** @internal */
1667
- const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
1668
- const accumulator = s => readWith({
1669
- onInput: input => {
1670
- const [nextS, chunk] = mapAccum$1(input, s, f);
1671
- return flatMap$2(write(chunk), () => accumulator(nextS));
1672
- },
1673
- onFailure: fail$2,
1674
- onDone: () => unit$1
1675
- });
1676
- return new StreamImpl(pipe(toChannel(self), pipeTo(accumulator(s))));
1677
- });
1678
-
1679
- /** @internal */
1680
- const mapAccumEffect = /*#__PURE__*/dual(3, (self, s, f) => suspend(() => {
1681
- const accumulator = s => readWith({
1682
- onInput: input => pipe(suspend$1(() => {
1683
- const outputs = [];
1684
- const emit = output => sync$1(() => {
1685
- outputs.push(output);
1686
- });
1687
- return pipe(input, reduce$1(s, (s, a) => pipe(f(s, a), flatMap$1(([s, a]) => pipe(emit(a), as$1(s))))), match$1({
1688
- onFailure: error => {
1689
- if (outputs.length !== 0) {
1690
- return zipRight$2(write(unsafeFromArray(outputs)), fail$2(error));
1691
- }
1692
- return fail$2(error);
1693
- },
1694
- onSuccess: s => flatMap$2(write(unsafeFromArray(outputs)), () => accumulator(s))
1695
- }));
1696
- }), unwrap$1),
1697
- onFailure: fail$2,
1698
- onDone: () => unit$1
1699
- });
1700
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(accumulator(s))));
1701
- }));
1702
-
1703
- /** @internal */
1704
- const mapBoth = /*#__PURE__*/dual(2, (self, options) => pipe(self, mapError(options.onFailure), map(options.onSuccess)));
1705
-
1706
- /** @internal */
1707
- const mapChunks = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapOut(f))));
1708
-
1709
- /** @internal */
1710
- const mapChunksEffect = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapOutEffect(f))));
1711
-
1712
- /** @internal */
1713
- const mapConcat = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapConcatChunk(a => fromIterable$1(f(a)))));
1714
-
1715
- /** @internal */
1716
- const mapConcatChunk = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapChunks(flatMap$3(f))));
1717
-
1718
- /** @internal */
1719
- const mapConcatChunkEffect = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapEffectSequential(f), mapConcatChunk(identity)));
1720
-
1721
- /** @internal */
1722
- const mapConcatEffect = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapEffectSequential(a => pipe(f(a), map$2(fromIterable$1))), mapConcatChunk(identity)));
1723
-
1724
- /** @internal */
1725
- const mapEffectSequential = /*#__PURE__*/dual(2, (self, f) => {
1726
- const loop = iterator => {
1727
- const next = iterator.next();
1728
- if (next.done) {
1729
- return readWithCause({
1730
- onInput: elem => loop(elem[Symbol.iterator]()),
1731
- onFailure: failCause$3,
1732
- onDone: succeed$3
1733
- });
1734
- } else {
1735
- const value = next.value;
1736
- return unwrap$1(map$2(f(value), a2 => flatMap$2(write(of(a2)), () => loop(iterator))));
1737
- }
1738
- };
1739
- return new StreamImpl(pipe(toChannel(self), pipeTo(suspend$2(() => loop(empty$1()[Symbol.iterator]())))));
1740
- });
1741
-
1742
- /** @internal */
1743
- const mapEffectPar = /*#__PURE__*/dual(3, (self, n, f) => new StreamImpl(pipe(toChannel(self), concatMap(writeChunk), mapOutEffectPar(f, n), mapOut(of))));
1744
-
1745
- /** @internal */
1746
- const mapError = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapError$2(f))));
1747
-
1748
- /** @internal */
1749
- const mapErrorCause = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), mapErrorCause$1(f))));
1750
-
1751
- /** @internal */
1752
- const merge = /*#__PURE__*/dual(args => isStream(args[1]), (self, that, options) => mergeWith(self, that, {
1753
- onSelf: identity,
1754
- onOther: identity,
1755
- haltStrategy: options?.haltStrategy
1756
- }));
1757
-
1758
- /** @internal */
1759
- const mergeAll = /*#__PURE__*/dual(args => Symbol.iterator in args[0], (streams, options) => flatten(fromIterable(streams), options));
1760
-
1761
- /** @internal */
1762
- const mergeEither = /*#__PURE__*/dual(2, (self, that) => mergeWith(self, that, {
1763
- onSelf: left,
1764
- onOther: right
1765
- }));
1766
-
1767
- /** @internal */
1768
- const mergeLeft = /*#__PURE__*/dual(2, (self, that) => pipe(self, merge(drain(that))));
1769
-
1770
- /** @internal */
1771
- const mergeRight = /*#__PURE__*/dual(2, (self, that) => pipe(drain(self), merge(that)));
1772
-
1773
- /** @internal */
1774
- const mergeWith = /*#__PURE__*/dual(3, (self, other, options) => {
1775
- const strategy = options.haltStrategy ? fromInput(options.haltStrategy) : Both;
1776
- const handler = terminate => exit => terminate || !isSuccess(exit) ?
1777
- // TODO: remove
1778
- Done(suspend$1(() => exit)) : Await(exit => suspend$1(() => exit));
1779
- return new StreamImpl(mergeWith$1(toChannel(map(self, options.onSelf)), {
1780
- other: toChannel(map(other, options.onOther)),
1781
- onSelfDone: handler(strategy._tag === "Either" || strategy._tag === "Left"),
1782
- onOtherDone: handler(strategy._tag === "Either" || strategy._tag === "Right")
1783
- }));
1784
- });
1785
-
1786
- /** @internal */
1787
- const mkString = self => run(self, mkString$1);
1788
-
1789
- /** @internal */
1790
- const never = /*#__PURE__*/fromEffect(never$1);
1791
-
1792
- /** @internal */
1793
- const onError = /*#__PURE__*/dual(2, (self, cleanup) => pipe(self, catchAllCause(cause => fromEffect(pipe(cleanup(cause), zipRight$1(failCause$2(cause)))))));
1794
-
1795
- /** @internal */
1796
- const onDone = /*#__PURE__*/dual(2, (self, cleanup) => new StreamImpl(pipe(toChannel(self), ensuringWith$1(exit => isSuccess(exit) ? cleanup() : unit$2))));
1797
-
1798
- /** @internal */
1799
- const orDie = self => pipe(self, orDieWith(identity));
1800
-
1801
- /** @internal */
1802
- const orDieWith = /*#__PURE__*/dual(2, (self, f) => new StreamImpl(pipe(toChannel(self), orDieWith$1(f))));
1803
-
1804
- /** @internal */
1805
- const orElse = /*#__PURE__*/dual(2, (self, that) => new StreamImpl(pipe(toChannel(self), orElse$1(() => toChannel(that())))));
1806
-
1807
- /** @internal */
1808
- const orElseEither = /*#__PURE__*/dual(2, (self, that) => pipe(self, map(left), orElse(() => pipe(that(), map(right)))));
1809
-
1810
- /** @internal */
1811
- const orElseFail = /*#__PURE__*/dual(2, (self, error) => pipe(self, orElse(() => failSync(error))));
1812
-
1813
- /** @internal */
1814
- const orElseIfEmpty = /*#__PURE__*/dual(2, (self, element) => pipe(self, orElseIfEmptyChunk(() => of(element()))));
1815
-
1816
- /** @internal */
1817
- const orElseIfEmptyChunk = /*#__PURE__*/dual(2, (self, chunk) => pipe(self, orElseIfEmptyStream(() => new StreamImpl(write(chunk())))));
1818
-
1819
- /** @internal */
1820
- const orElseIfEmptyStream = /*#__PURE__*/dual(2, (self, stream) => {
1821
- const writer = readWith({
1822
- onInput: input => {
1823
- if (isEmpty(input)) {
1824
- return suspend$2(() => writer);
1825
- }
1826
- return pipe(write(input), zipRight$2(identityChannel()));
1827
- },
1828
- onFailure: fail$2,
1829
- onDone: () => suspend$2(() => toChannel(stream()))
1830
- });
1831
- return new StreamImpl(pipe(toChannel(self), pipeTo(writer)));
1832
- });
1833
-
1834
- /** @internal */
1835
- const orElseSucceed = /*#__PURE__*/dual(2, (self, value) => pipe(self, orElse(() => sync(value))));
1836
-
1837
- /** @internal */
1838
- const paginate = (s, f) => paginateChunk(s, s => {
1839
- const page = f(s);
1840
- return [of(page[0]), page[1]];
1841
- });
1842
-
1843
- /** @internal */
1844
- const paginateChunk = (s, f) => {
1845
- const loop = s => {
1846
- const page = f(s);
1847
- return match$2(page[1], {
1848
- onNone: () => zipRight$2(write(page[0]), unit$1),
1849
- onSome: s => flatMap$2(write(page[0]), () => loop(s))
1850
- });
1851
- };
1852
- return new StreamImpl(suspend$2(() => loop(s)));
1853
- };
1854
-
1855
- /** @internal */
1856
- const paginateChunkEffect = (s, f) => {
1857
- const loop = s => unwrap$1(map$2(f(s), ([chunk, option]) => match$2(option, {
1858
- onNone: () => zipRight$2(write(chunk), unit$1),
1859
- onSome: s => flatMap$2(write(chunk), () => loop(s))
1860
- })));
1861
- return new StreamImpl(suspend$2(() => loop(s)));
1862
- };
1863
-
1864
- /** @internal */
1865
- const paginateEffect = (s, f) => paginateChunkEffect(s, s => pipe(f(s), map$2(([a, s]) => [of(a), s])));
1866
-
1867
- /** @internal */
1868
- const peel = /*#__PURE__*/dual(2, (self, sink) => {
1869
- const OP_EMIT = "Emit";
1870
- const OP_HALT = "Halt";
1871
- const OP_END = "End";
1872
- return pipe(make$4(), flatMap$1(deferred => pipe(make$1(), map$2(handoff => {
1873
- const consumer = foldSink(collectLeftover(sink), {
1874
- onFailure: error => zipRight$3(fromEffect$2(fail$4(deferred, error)), fail$5(error)),
1875
- onSuccess: ([z, leftovers]) => {
1876
- const loop = readWithCause({
1877
- onInput: elements => flatMap$2(fromEffect$1(offer(handoff, {
1878
- _tag: OP_EMIT,
1879
- elements
1880
- })), () => loop),
1881
- onFailure: cause => zipRight$2(fromEffect$1(offer(handoff, {
1882
- _tag: OP_HALT,
1883
- cause
1884
- })), failCause$3(cause)),
1885
- onDone: _ => zipRight$2(fromEffect$1(offer(handoff, {
1886
- _tag: OP_END
1887
- })), unit$1)
1888
- });
1889
- return fromChannel$1(pipe(fromEffect$1(succeed$2(deferred, z)), zipRight$2(fromEffect$1(pipe(handoff, offer({
1890
- _tag: OP_EMIT,
1891
- elements: leftovers
1892
- })))), zipRight$2(loop)));
1893
- }
1894
- });
1895
- const producer = pipe(take$1(handoff), map$2(signal => {
1896
- switch (signal._tag) {
1897
- case OP_EMIT:
1898
- {
1899
- return pipe(write(signal.elements), flatMap$2(() => producer));
1900
- }
1901
- case OP_HALT:
1902
- {
1903
- return failCause$3(signal.cause);
1904
- }
1905
- case OP_END:
1906
- {
1907
- return unit$1;
1908
- }
1909
- }
1910
- }), unwrap$1);
1911
- return pipe(self, tapErrorCause(cause => failCause$5(deferred, cause)), run(consumer), forkScoped, zipRight$1(_await(deferred)), map$2(z => [z, new StreamImpl(producer)]));
1912
- }))), flatten$1);
1913
- });
1914
-
1915
- /** @internal */
1916
- const partition = /*#__PURE__*/dual(args => typeof args[1] === "function", (self, predicate, options) => partitionEither(self, a => succeed$1(predicate(a) ? left(a) : right(a)), options));
1917
-
1918
- /** @internal */
1919
- const partitionEither = /*#__PURE__*/dual(args => typeof args[1] === "function", (self, predicate, options) => pipe(mapEffectSequential(self, predicate), distributedWith({
1920
- size: 2,
1921
- maximumLag: options?.bufferSize ?? 16,
1922
- decide: match({
1923
- onLeft: () => succeed$1(n => n === 0),
1924
- onRight: () => succeed$1(n => n === 1)
1925
- })
1926
- }), flatMap$1(([queue1, queue2]) => succeed$1([filterMap(flattenExitOption(fromQueue(queue1, {
1927
- shutdown: true
1928
- })), _ => match(_, {
1929
- onLeft: some$1,
1930
- onRight: none
1931
- })), filterMap(flattenExitOption(fromQueue(queue2, {
1932
- shutdown: true
1933
- })), _ => match(_, {
1934
- onLeft: none,
1935
- onRight: some$1
1936
- }))]))));
1937
-
1938
- /** @internal */
1939
- const pipeThrough = /*#__PURE__*/dual(2, (self, sink) => new StreamImpl(pipe(toChannel(self), pipeToOrFail(toChannel$1(sink)))));
1940
-
1941
- /** @internal */
1942
- const pipeThroughChannel = /*#__PURE__*/dual(2, (self, channel) => new StreamImpl(pipe(toChannel(self), pipeTo(channel))));
1943
-
1944
- /** @internal */
1945
- const pipeThroughChannelOrFail = /*#__PURE__*/dual(2, (self, chan) => new StreamImpl(pipe(toChannel(self), pipeToOrFail(chan))));
1946
-
1947
- /** @internal */
1948
- const prepend = /*#__PURE__*/dual(2, (self, values) => new StreamImpl(zipRight$2(write(values), toChannel(self))));
1949
-
1950
- /** @internal */
1951
- const provideContext = /*#__PURE__*/dual(2, (self, context) => new StreamImpl(pipe(toChannel(self), provideContext$1(context))));
1952
-
1953
- /** @internal */
1954
- const provideLayer = /*#__PURE__*/dual(2, (self, layer) => new StreamImpl(unwrapScoped$1(pipe(build(layer), map$2(env => pipe(toChannel(self), provideContext$1(env)))))));
1955
-
1956
- /** @internal */
1957
- const provideService = /*#__PURE__*/dual(3, (self, tag, resource) => provideServiceEffect(self, tag, succeed$1(resource)));
1958
-
1959
- /** @internal */
1960
- const provideServiceEffect = /*#__PURE__*/dual(3, (self, tag, effect) => provideServiceStream(self, tag, fromEffect(effect)));
1961
-
1962
- /** @internal */
1963
- const provideServiceStream = /*#__PURE__*/dual(3, (self, tag, stream) => contextWithStream(env => flatMap(stream, service => pipe(self, provideContext(add(env, tag, service))))));
1964
-
1965
- /** @internal */
1966
- const mapInputContext = /*#__PURE__*/dual(2, (self, f) => contextWithStream(env => pipe(self, provideContext(f(env)))));
1967
-
1968
- /** @internal */
1969
- const provideSomeLayer = /*#__PURE__*/dual(2, (self, layer) =>
1970
- // @ts-expect-error
1971
- pipe(self, provideLayer(pipe(context$2(), merge$1(layer)))));
1972
-
1973
- /** @internal */
1974
- const range = (min, max, chunkSize = DefaultChunkSize) => suspend(() => {
1975
- if (min > max) {
1976
- return empty;
1977
- }
1978
- const go = (min, max, chunkSize) => {
1979
- const remaining = max - min + 1;
1980
- if (remaining > chunkSize) {
1981
- return pipe(write(range$1(min, min + chunkSize - 1)), flatMap$2(() => go(min + chunkSize, max, chunkSize)));
1982
- }
1983
- return write(range$1(min, min + remaining - 1));
1984
- };
1985
- return new StreamImpl(go(min, max, chunkSize));
1986
- });
1987
-
1988
- /** @internal */
1989
- const rechunk = /*#__PURE__*/dual(2, (self, n) => suspend(() => {
1990
- const target = Math.max(n, 1);
1991
- const process = rechunkProcess(new StreamRechunker(target), target);
1992
- return new StreamImpl(pipe(toChannel(self), pipeTo(process)));
1993
- }));
1994
-
1995
- /** @internal */
1996
- const rechunkProcess = (rechunker, target) => readWithCause({
1997
- onInput: chunk => {
1998
- if (chunk.length === target && rechunker.isEmpty()) {
1999
- return flatMap$2(write(chunk), () => rechunkProcess(rechunker, target));
2000
- }
2001
- if (chunk.length > 0) {
2002
- const chunks = [];
2003
- let result = undefined;
2004
- let index = 0;
2005
- while (index < chunk.length) {
2006
- while (index < chunk.length && result === undefined) {
2007
- result = rechunker.write(pipe(chunk, unsafeGet$1(index)));
2008
- index = index + 1;
2009
- }
2010
- if (result !== undefined) {
2011
- chunks.push(result);
2012
- result = undefined;
2013
- }
2014
- }
2015
- return flatMap$2(writeAll(...chunks), () => rechunkProcess(rechunker, target));
2016
- }
2017
- return suspend$2(() => rechunkProcess(rechunker, target));
2018
- },
2019
- onFailure: cause => zipRight$2(rechunker.emitIfNotEmpty(), failCause$3(cause)),
2020
- onDone: () => rechunker.emitIfNotEmpty()
2021
- });
2022
-
2023
- /** @internal */
2024
- class StreamRechunker {
2025
- builder = [];
2026
- pos = 0;
2027
- constructor(n) {
2028
- this.n = n;
2029
- }
2030
- isEmpty() {
2031
- return this.pos === 0;
2032
- }
2033
- write(elem) {
2034
- this.builder.push(elem);
2035
- this.pos += 1;
2036
- if (this.pos === this.n) {
2037
- const result = unsafeFromArray(this.builder);
2038
- this.builder = [];
2039
- this.pos = 0;
2040
- return result;
2041
- }
2042
- return undefined;
2043
- }
2044
- emitIfNotEmpty() {
2045
- if (this.pos !== 0) {
2046
- return write(unsafeFromArray(this.builder));
2047
- }
2048
- return unit$1;
2049
- }
2050
- }
2051
-
2052
- /** @internal */
2053
- const refineOrDie = /*#__PURE__*/dual(2, (self, pf) => pipe(self, refineOrDieWith(pf, identity)));
2054
-
2055
- /** @internal */
2056
- const refineOrDieWith = /*#__PURE__*/dual(3, (self, pf, f) => new StreamImpl(catchAll$1(toChannel(self), error => match$2(pf(error), {
2057
- onNone: () => failCause$3(die$2(f(error))),
2058
- onSome: fail$2
2059
- }))));
2060
-
2061
- /** @internal */
2062
- const repeat = /*#__PURE__*/dual(2, (self, schedule) => filterMap(repeatEither(self, schedule), _ => match(_, {
2063
- onLeft: none,
2064
- onRight: some$1
2065
- })));
2066
-
2067
- /** @internal */
2068
- const repeatEffect = effect => repeatEffectOption(pipe(effect, mapError$1(some$1)));
2069
-
2070
- /** @internal */
2071
- const repeatEffectChunk = effect => repeatEffectChunkOption(pipe(effect, mapError$1(some$1)));
2072
-
2073
- /** @internal */
2074
- const repeatEffectChunkOption = effect => unfoldChunkEffect(effect, effect => pipe(map$2(effect, chunk => some$1([chunk, effect])), catchAll$2(match$2({
2075
- onNone: () => succeed$1(none()),
2076
- onSome: fail$1
2077
- }))));
2078
-
2079
- /** @internal */
2080
- const repeatEffectOption = effect => repeatEffectChunkOption(pipe(effect, map$2(of)));
2081
-
2082
- /** @internal */
2083
- const repeatEither = /*#__PURE__*/dual(2, (self, schedule) => repeatWith(self, schedule, {
2084
- onElement: a => right(a),
2085
- onSchedule: left
2086
- }));
2087
-
2088
- /** @internal */
2089
- const repeatElements = /*#__PURE__*/dual(2, (self, schedule) => filterMap(repeatElementsWith(self, schedule, {
2090
- onElement: a => some$1(a),
2091
- onSchedule: none
2092
- }), identity));
2093
-
2094
- /** @internal */
2095
- const repeatElementsWith = /*#__PURE__*/dual(3, (self, schedule, options) => {
2096
- const driver$1 = pipe(driver(schedule), map$2(driver => {
2097
- const feed = input => match$2(head$1(input), {
2098
- onNone: () => loop,
2099
- onSome: a => zipRight$2(write(of(options.onElement(a))), step(pipe(input, drop$1(1)), a))
2100
- });
2101
- const step = (input, a) => {
2102
- const advance = pipe(driver.next(a), as$1(pipe(write(of(options.onElement(a))), flatMap$2(() => step(input, a)))));
2103
- const reset = pipe(driver.last(), orDie$1, flatMap$1(b => pipe(driver.reset(), map$2(() => pipe(write(of(options.onSchedule(b))), zipRight$2(feed(input)))))));
2104
- return pipe(advance, orElse$2(() => reset), unwrap$1);
2105
- };
2106
- const loop = readWith({
2107
- onInput: feed,
2108
- onFailure: fail$2,
2109
- onDone: () => unit$1
2110
- });
2111
- return loop;
2112
- }), unwrap$1);
2113
- return new StreamImpl(pipe(toChannel(self), pipeTo(driver$1)));
2114
- });
2115
-
2116
- /** @internal */
2117
- const repeatValue = value => new StreamImpl(repeated(write(of(value))));
2118
-
2119
- /** @internal */
2120
- const repeatWith = /*#__PURE__*/dual(3, (self, schedule, options) => {
2121
- return pipe(driver(schedule), map$2(driver => {
2122
- const scheduleOutput = pipe(driver.last(), orDie$1, map$2(options.onSchedule));
2123
- const process = pipe(self, map(options.onElement), toChannel);
2124
- const loop = unwrap$1(match$1(driver.next(void 0), {
2125
- onFailure: () => unit$1,
2126
- onSuccess: () => pipe(process, zipRight$2(pipe(scheduleOutput, map$2(c => pipe(write(of(c)), flatMap$2(() => loop))), unwrap$1)))
2127
- }));
2128
- return new StreamImpl(pipe(process, zipRight$2(loop)));
2129
- }), unwrap);
2130
- });
2131
-
2132
- /** @internal */
2133
- const repeatWithSchedule = (value, schedule) => repeatEffectWithSchedule(succeed$1(value), schedule);
2134
-
2135
- /** @internal */
2136
- const repeatEffectWithSchedule = (effect, schedule) => flatMap(fromEffect(zip$1(effect, driver(schedule))), ([a, driver]) => concat(succeed(a), unfoldEffect(a, s => matchEffect(driver.next(s), {
2137
- onFailure: succeed$1,
2138
- onSuccess: () => map$2(effect, nextA => some$1([nextA, nextA]))
2139
- }))));
2140
-
2141
- /** @internal */
2142
- const retry = /*#__PURE__*/dual(2, (self, schedule) => unwrap(map$2(driver(schedule), driver => {
2143
- const loop = catchAll(self, error => unwrap(matchEffect(driver.next(error), {
2144
- onFailure: () => fail$1(error),
2145
- onSuccess: () => succeed$1(pipe(loop, tap(() => driver.reset())))
2146
- })));
2147
- return loop;
2148
- })));
2149
-
2150
- /** @internal */
2151
- const run = /*#__PURE__*/dual(2, (self, sink) => pipe(toChannel(self), pipeToOrFail(toChannel$1(sink)), runDrain$1));
2152
-
2153
- /** @internal */
2154
- const runCollect = self => pipe(self, run(collectAll()));
2155
-
2156
- /** @internal */
2157
- const runCount = self => pipe(self, run(count));
2158
-
2159
- /** @internal */
2160
- const runDrain = self => pipe(self, run(drain$2));
2161
-
2162
- /** @internal */
2163
- const runFold = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, runFoldWhileScoped(s, constTrue, f), scoped$1));
2164
-
2165
- /** @internal */
2166
- const runFoldEffect = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, runFoldWhileScopedEffect(s, constTrue, f), scoped$1));
2167
-
2168
- /** @internal */
2169
- const runFoldScoped = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, runFoldWhileScoped(s, constTrue, f)));
2170
-
2171
- /** @internal */
2172
- const runFoldScopedEffect = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, runFoldWhileScopedEffect(s, constTrue, f)));
2173
-
2174
- /** @internal */
2175
- const runFoldWhile = /*#__PURE__*/dual(4, (self, s, cont, f) => pipe(self, runFoldWhileScoped(s, cont, f), scoped$1));
2176
-
2177
- /** @internal */
2178
- const runFoldWhileEffect = /*#__PURE__*/dual(4, (self, s, cont, f) => pipe(self, runFoldWhileScopedEffect(s, cont, f), scoped$1));
2179
-
2180
- /** @internal */
2181
- const runFoldWhileScoped = /*#__PURE__*/dual(4, (self, s, cont, f) => pipe(self, runScoped(fold(s, cont, f))));
2182
-
2183
- /** @internal */
2184
- const runFoldWhileScopedEffect = /*#__PURE__*/dual(4, (self, s, cont, f) => pipe(self, runScoped(foldEffect(s, cont, f))));
2185
-
2186
- /** @internal */
2187
- const runForEach = /*#__PURE__*/dual(2, (self, f) => pipe(self, run(forEach$1(f))));
2188
-
2189
- /** @internal */
2190
- const runForEachChunk = /*#__PURE__*/dual(2, (self, f) => pipe(self, run(forEachChunk(f))));
2191
-
2192
- /** @internal */
2193
- const runForEachChunkScoped = /*#__PURE__*/dual(2, (self, f) => pipe(self, runScoped(forEachChunk(f))));
2194
-
2195
- /** @internal */
2196
- const runForEachScoped = /*#__PURE__*/dual(2, (self, f) => pipe(self, runScoped(forEach$1(f))));
2197
-
2198
- /** @internal */
2199
- const runForEachWhile = /*#__PURE__*/dual(2, (self, f) => pipe(self, run(forEachWhile(f))));
2200
-
2201
- /** @internal */
2202
- const runForEachWhileScoped = /*#__PURE__*/dual(2, (self, f) => pipe(self, runScoped(forEachWhile(f))));
2203
-
2204
- /** @internal */
2205
- const runHead = self => pipe(self, run(head()));
2206
-
2207
- /** @internal */
2208
- const runIntoHub = /*#__PURE__*/dual(2, (self, hub) => pipe(self, runIntoQueue(hub)));
2209
-
2210
- /** @internal */
2211
- const runIntoHubScoped = /*#__PURE__*/dual(2, (self, hub) => pipe(self, runIntoQueueScoped(hub)));
2212
-
2213
- /** @internal */
2214
- const runIntoQueue = /*#__PURE__*/dual(2, (self, queue) => pipe(self, runIntoQueueScoped(queue), scoped$1));
2215
-
2216
- /** @internal */
2217
- const runIntoQueueElementsScoped = /*#__PURE__*/dual(2, (self, queue) => {
2218
- const writer = readWithCause({
2219
- onInput: input => flatMap$2(fromEffect$1(offerAll(queue, map$3(input, succeed$4))), () => writer),
2220
- onFailure: cause => fromEffect$1(offer$1(queue, failCause$4(map$1(cause, some$1)))),
2221
- onDone: () => fromEffect$1(offer$1(queue, fail$3(none())))
2222
- });
2223
- return pipe(pipeTo(toChannel(self), writer), drain$1, runScoped$1, asUnit);
2224
- });
2225
-
2226
- /** @internal */
2227
- const runIntoQueueScoped = /*#__PURE__*/dual(2, (self, queue) => {
2228
- const writer = readWithCause({
2229
- onInput: input => flatMap$2(write(chunk(input)), () => writer),
2230
- onFailure: cause => write(failCause$6(cause)),
2231
- onDone: () => write(end$2)
2232
- });
2233
- return pipe(pipeTo(toChannel(self), writer), mapOutEffect(take => offer$1(queue, take)), drain$1, runScoped$1, asUnit);
2234
- });
2235
-
2236
- /** @internal */
2237
- const runLast = self => pipe(self, run(last()));
2238
-
2239
- /** @internal */
2240
- const runScoped = /*#__PURE__*/dual(2, (self, sink) => pipe(toChannel(self), pipeToOrFail(toChannel$1(sink)), drain$1, runScoped$1));
2241
-
2242
- /** @internal */
2243
- const runSum = self => pipe(self, run(sum));
2244
-
2245
- /** @internal */
2246
- const scan = /*#__PURE__*/dual(3, (self, s, f) => pipe(self, scanEffect(s, (s, a) => succeed$1(f(s, a)))));
2247
-
2248
- /** @internal */
2249
- const scanReduce = /*#__PURE__*/dual(2, (self, f) => pipe(self, scanReduceEffect((a2, a) => succeed$1(f(a2, a)))));
2250
-
2251
- /** @internal */
2252
- const scanReduceEffect = /*#__PURE__*/dual(2, (self, f) => pipe(self, mapAccumEffect(none(), (option, a) => {
2253
- switch (option._tag) {
2254
- case "None":
2255
- {
2256
- return succeed$1([some$1(a), a]);
2257
- }
2258
- case "Some":
2259
- {
2260
- return pipe(f(option.value, a), map$2(b => [some$1(b), b]));
2261
- }
2262
- }
2263
- })));
2264
-
2265
- /** @internal */
2266
- const schedule = /*#__PURE__*/dual(2, (self, schedule) => filterMap(scheduleWith(self, schedule, {
2267
- onElement: some$1,
2268
- onSchedule: none
2269
- }), identity));
2270
-
2271
- /** @internal */
2272
- const scheduleWith = /*#__PURE__*/dual(3, (self, schedule, options) => {
2273
- const loop = (driver, iterator) => {
2274
- const next = iterator.next();
2275
- if (next.done) {
2276
- return readWithCause({
2277
- onInput: chunk => loop(driver, chunk[Symbol.iterator]()),
2278
- onFailure: failCause$3,
2279
- onDone: succeedNow
2280
- });
2281
- }
2282
- return unwrap$1(matchEffect(driver.next(next.value), {
2283
- onFailure: () => pipe(driver.last(), orDie$1, map$2(b => pipe(write(make$7(options.onElement(next.value), options.onSchedule(b))), flatMap$2(() => loop(driver, iterator)))), zipLeft$1(driver.reset())),
2284
- onSuccess: () => succeed$1(pipe(write(of(options.onElement(next.value))), flatMap$2(() => loop(driver, iterator))))
2285
- }));
2286
- };
2287
- return new StreamImpl(pipe(fromEffect$1(driver(schedule)), flatMap$2(driver => pipe(toChannel(self), pipeTo(loop(driver, empty$1()[Symbol.iterator]()))))));
2288
- });
2289
-
2290
- /** @internal */
2291
- const scanEffect = /*#__PURE__*/dual(3, (self, s, f) => new StreamImpl(pipe(write(of(s)), flatMap$2(() => toChannel(pipe(self, mapAccumEffect(s, (s, a) => pipe(f(s, a), map$2(s => [s, s])))))))));
2292
-
2293
- /** @internal */
2294
- const scoped = effect => new StreamImpl(ensuring$1(scoped$2(pipe(effect, map$2(of))), unit$2));
2295
-
2296
- /** @internal */
2297
- const some = self => pipe(self, mapError(some$1), someOrFail(() => none()));
2298
-
2299
- /** @internal */
2300
- const someOrElse = /*#__PURE__*/dual(2, (self, fallback) => pipe(self, map(getOrElse(fallback))));
2301
-
2302
- /** @internal */
2303
- const someOrFail = /*#__PURE__*/dual(2, (self, error) => mapEffectSequential(self, match$2({
2304
- onNone: () => failSync$1(error),
2305
- onSome: succeed$1
2306
- })));
2307
-
2308
- /** @internal */
2309
- const sliding = /*#__PURE__*/dual(2, (self, chunkSize) => slidingSize(self, chunkSize, 1));
2310
-
2311
- /** @internal */
2312
- const slidingSize = /*#__PURE__*/dual(3, (self, chunkSize, stepSize) => {
2313
- if (chunkSize <= 0 || stepSize <= 0) {
2314
- return die(IllegalArgumentException("Invalid bounds - `chunkSize` and `stepSize` must be greater than zero"));
2315
- }
2316
- return new StreamImpl(suspend$2(() => {
2317
- const queue = new RingBuffer(chunkSize);
2318
- const emitOnStreamEnd = (queueSize, channelEnd) => {
2319
- if (queueSize < chunkSize) {
2320
- const items = queue.toChunk();
2321
- const result = isEmpty(items) ? empty$1() : of(items);
2322
- return pipe(write(result), flatMap$2(() => channelEnd));
2323
- }
2324
- const lastEmitIndex = queueSize - (queueSize - chunkSize) % stepSize;
2325
- if (lastEmitIndex === queueSize) {
2326
- return channelEnd;
2327
- }
2328
- const leftovers = queueSize - (lastEmitIndex - chunkSize + stepSize);
2329
- const lastItems = pipe(queue.toChunk(), takeRight$1(leftovers));
2330
- const result = isEmpty(lastItems) ? empty$1() : of(lastItems);
2331
- return pipe(write(result), flatMap$2(() => channelEnd));
2332
- };
2333
- const reader = queueSize => readWithCause({
2334
- onInput: input => flatMap$2(write(filterMap$1(input, (element, index) => {
2335
- queue.put(element);
2336
- const currentIndex = queueSize + index + 1;
2337
- if (currentIndex < chunkSize || (currentIndex - chunkSize) % stepSize > 0) {
2338
- return none();
2339
- }
2340
- return some$1(queue.toChunk());
2341
- })), () => reader(queueSize + input.length)),
2342
- onFailure: cause => emitOnStreamEnd(queueSize, failCause$3(cause)),
2343
- onDone: () => emitOnStreamEnd(queueSize, unit$1)
2344
- });
2345
- return pipe(toChannel(self), pipeTo(reader(0)));
2346
- }));
2347
- });
2348
-
2349
- /** @internal */
2350
- const split = /*#__PURE__*/dual(2, (self, predicate) => {
2351
- const split = (leftovers, input) => {
2352
- const [chunk, remaining] = pipe(leftovers, appendAll(input), splitWhere(predicate));
2353
- if (isEmpty(chunk) || isEmpty(remaining)) {
2354
- return loop(pipe(chunk, appendAll(pipe(remaining, drop$1(1)))));
2355
- }
2356
- return pipe(write(of(chunk)), flatMap$2(() => split(empty$1(), pipe(remaining, drop$1(1)))));
2357
- };
2358
- const loop = leftovers => readWith({
2359
- onInput: input => split(leftovers, input),
2360
- onFailure: fail$2,
2361
- onDone: () => {
2362
- if (isEmpty(leftovers)) {
2363
- return unit$1;
2364
- }
2365
- if (isNone(pipe(leftovers, findFirst(predicate)))) {
2366
- return zipRight$2(write(of(leftovers)), unit$1);
2367
- }
2368
- return zipRight$2(split(empty$1(), leftovers), unit$1);
2369
- }
2370
- });
2371
- return new StreamImpl(pipe(toChannel(self), pipeTo(loop(empty$1()))));
2372
- });
2373
-
2374
- /** @internal */
2375
- const splitOnChunk = /*#__PURE__*/dual(2, (self, delimiter) => {
2376
- const next = (leftover, delimiterIndex) => readWithCause({
2377
- onInput: inputChunk => {
2378
- let buffer;
2379
- const [carry, delimiterCursor] = pipe(inputChunk, reduce([pipe(leftover, getOrElse(() => empty$1())), delimiterIndex], ([carry, delimiterCursor], a) => {
2380
- const concatenated = pipe(carry, append(a));
2381
- if (delimiterCursor < delimiter.length && equals(a, pipe(delimiter, unsafeGet$1(delimiterCursor)))) {
2382
- if (delimiterCursor + 1 === delimiter.length) {
2383
- if (buffer === undefined) {
2384
- buffer = [];
2385
- }
2386
- buffer.push(pipe(concatenated, take$3(concatenated.length - delimiter.length)));
2387
- return [empty$1(), 0];
2388
- }
2389
- return [concatenated, delimiterCursor + 1];
2390
- }
2391
- return [concatenated, equals(a, pipe(delimiter, unsafeGet$1(0))) ? 1 : 0];
2392
- }));
2393
- const output = buffer === undefined ? empty$1() : unsafeFromArray(buffer);
2394
- return flatMap$2(write(output), () => next(isNonEmpty(carry) ? some$1(carry) : none(), delimiterCursor));
2395
- },
2396
- onFailure: cause => match$2(leftover, {
2397
- onNone: () => failCause$3(cause),
2398
- onSome: chunk => zipRight$2(write(of(chunk)), failCause$3(cause))
2399
- }),
2400
- onDone: done => match$2(leftover, {
2401
- onNone: () => succeed$3(done),
2402
- onSome: chunk => zipRight$2(write(of(chunk)), succeed$3(done))
2403
- })
2404
- });
2405
- return new StreamImpl(pipe(toChannel(self), pipeTo(next(none(), 0))));
2406
- });
2407
-
2408
- /** @internal */
2409
- const splitLines = self => suspend(() => {
2410
- let stringBuilder = "";
2411
- let midCRLF = false;
2412
- const splitLinesChunk = chunk => {
2413
- const chunkBuilder = [];
2414
- map$3(chunk, str => {
2415
- if (str.length !== 0) {
2416
- let from = 0;
2417
- let indexOfCR = str.indexOf("\r");
2418
- let indexOfLF = str.indexOf("\n");
2419
- if (midCRLF) {
2420
- if (indexOfLF === 0) {
2421
- chunkBuilder.push(stringBuilder);
2422
- stringBuilder = "";
2423
- from = 1;
2424
- indexOfLF = str.indexOf("\n", from);
2425
- } else {
2426
- stringBuilder = stringBuilder + "\r";
2427
- }
2428
- midCRLF = false;
2429
- }
2430
- while (indexOfCR !== -1 || indexOfLF !== -1) {
2431
- if (indexOfCR === -1 || indexOfLF !== -1 && indexOfLF < indexOfCR) {
2432
- if (stringBuilder.length === 0) {
2433
- chunkBuilder.push(str.substring(from, indexOfLF));
2434
- } else {
2435
- chunkBuilder.push(stringBuilder + str.substring(from, indexOfLF));
2436
- stringBuilder = "";
2437
- }
2438
- from = indexOfLF + 1;
2439
- indexOfLF = str.indexOf("\n", from);
2440
- } else {
2441
- if (str.length === indexOfCR + 1) {
2442
- midCRLF = true;
2443
- indexOfCR = -1;
2444
- } else {
2445
- if (indexOfLF === indexOfCR + 1) {
2446
- if (stringBuilder.length === 0) {
2447
- chunkBuilder.push(str.substring(from, indexOfCR));
2448
- } else {
2449
- stringBuilder = stringBuilder + str.substring(from, indexOfCR);
2450
- chunkBuilder.push(stringBuilder);
2451
- stringBuilder = "";
2452
- }
2453
- from = indexOfCR + 2;
2454
- indexOfCR = str.indexOf("\r", from);
2455
- indexOfLF = str.indexOf("\n", from);
2456
- } else {
2457
- indexOfCR = str.indexOf("\r", indexOfCR + 1);
2458
- }
2459
- }
2460
- }
2461
- }
2462
- if (midCRLF) {
2463
- stringBuilder = stringBuilder + str.substring(from, str.length - 1);
2464
- } else {
2465
- stringBuilder = stringBuilder + str.substring(from, str.length);
2466
- }
2467
- }
2468
- });
2469
- return unsafeFromArray(chunkBuilder);
2470
- };
2471
- const loop = readWithCause({
2472
- onInput: input => {
2473
- const out = splitLinesChunk(input);
2474
- return isEmpty(out) ? loop : flatMap$2(write(out), () => loop);
2475
- },
2476
- onFailure: cause => stringBuilder.length === 0 ? failCause$3(cause) : flatMap$2(write(of(stringBuilder)), () => failCause$3(cause)),
2477
- onDone: done => stringBuilder.length === 0 ? succeed$3(done) : flatMap$2(write(of(stringBuilder)), () => succeed$3(done))
2478
- });
2479
- return new StreamImpl(pipeTo(toChannel(self), loop));
2480
- });
2481
-
2482
- /** @internal */
2483
- const succeed = value => fromChunk(of(value));
2484
-
2485
- /** @internal */
2486
- const sync = evaluate => suspend(() => fromChunk(of(evaluate())));
2487
-
2488
- /** @internal */
2489
- const suspend = stream => new StreamImpl(suspend$2(() => toChannel(stream())));
2490
-
2491
- /** @internal */
2492
- const take = /*#__PURE__*/dual(2, (self, n) => {
2493
- if (!Number.isInteger(n)) {
2494
- return die(IllegalArgumentException(`${n} must be an integer`));
2495
- }
2496
- const loop = n => readWith({
2497
- onInput: input => {
2498
- const taken = pipe(input, take$3(Math.min(n, Number.POSITIVE_INFINITY)));
2499
- const leftover = Math.max(0, n - taken.length);
2500
- const more = leftover > 0;
2501
- if (more) {
2502
- return pipe(write(taken), flatMap$2(() => loop(leftover)));
2503
- }
2504
- return write(taken);
2505
- },
2506
- onFailure: fail$2,
2507
- onDone: succeed$3
2508
- });
2509
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(0 < n ? loop(n) : unit$1)));
2510
- });
2511
-
2512
- /** @internal */
2513
- const takeRight = /*#__PURE__*/dual(2, (self, n) => {
2514
- if (n <= 0) {
2515
- return empty;
2516
- }
2517
- return new StreamImpl(pipe(succeed$1(new RingBuffer(n)), map$2(queue => {
2518
- const reader = readWith({
2519
- onInput: input => {
2520
- for (const element of input) {
2521
- queue.put(element);
2522
- }
2523
- return reader;
2524
- },
2525
- onFailure: fail$2,
2526
- onDone: () => pipe(write(queue.toChunk()), zipRight$2(unit$1))
2527
- });
2528
- return pipe(toChannel(self), pipeTo(reader));
2529
- }), unwrap$1));
2530
- });
2531
-
2532
- /** @internal */
2533
- const takeUntil = /*#__PURE__*/dual(2, (self, predicate) => {
2534
- const loop = readWith({
2535
- onInput: input => {
2536
- const taken = pipe(input, takeWhile$1(a => !predicate(a)));
2537
- const last = pipe(input, drop$1(taken.length), take$3(1));
2538
- if (isEmpty(last)) {
2539
- return pipe(write(taken), flatMap$2(() => loop));
2540
- }
2541
- return write(pipe(taken, appendAll(last)));
2542
- },
2543
- onFailure: fail$2,
2544
- onDone: succeed$3
2545
- });
2546
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop)));
2547
- });
2548
-
2549
- /** @internal */
2550
- const takeUntilEffect = /*#__PURE__*/dual(2, (self, predicate) => {
2551
- const loop = iterator => {
2552
- const next = iterator.next();
2553
- if (next.done) {
2554
- return readWithCause({
2555
- onInput: elem => loop(elem[Symbol.iterator]()),
2556
- onFailure: failCause$3,
2557
- onDone: succeed$3
2558
- });
2559
- }
2560
- return pipe(predicate(next.value), map$2(bool => bool ? write(of(next.value)) : pipe(write(of(next.value)), flatMap$2(() => loop(iterator)))), unwrap$1);
2561
- };
2562
- return new StreamImpl(pipe(toChannel(self), pipeTo(loop(empty$1()[Symbol.iterator]()))));
2563
- });
2564
-
2565
- /** @internal */
2566
- const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => {
2567
- const loop = readWith({
2568
- onInput: input => {
2569
- const taken = pipe(input, takeWhile$1(predicate));
2570
- const more = taken.length === input.length;
2571
- if (more) {
2572
- return pipe(write(taken), flatMap$2(() => loop));
2573
- }
2574
- return write(taken);
2575
- },
2576
- onFailure: fail$2,
2577
- onDone: succeed$3
2578
- });
2579
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(loop)));
2580
- });
2581
-
2582
- /** @internal */
2583
- const tap = /*#__PURE__*/dual(2, (self, f) => mapEffectSequential(self, a => as$1(f(a), a)));
2584
-
2585
- /** @internal */
2586
- const tapBoth = /*#__PURE__*/dual(2, (self, {
2587
- onFailure,
2588
- onSuccess
2589
- }) => pipe(self, tapError(onFailure), tap(onSuccess)));
2590
-
2591
- /** @internal */
2592
- const tapError = /*#__PURE__*/dual(2, (self, f) => catchAll(self, error => fromEffect(zipRight$1(f(error), fail$1(error)))));
2593
-
2594
- /** @internal */
2595
- const tapErrorCause = /*#__PURE__*/dual(2, (self, f) => {
2596
- const loop = readWithCause({
2597
- onInput: chunk => flatMap$2(write(chunk), () => loop),
2598
- onFailure: cause => fromEffect$1(zipRight$1(f(cause), failCause$2(cause))),
2599
- onDone: succeedNow
2600
- });
2601
- return new StreamImpl(pipe(toChannel(self), pipeTo(loop)));
2602
- });
2603
-
2604
- /** @internal */
2605
- const tapSink = /*#__PURE__*/dual(2, (self, sink) => pipe(fromEffect(all([bounded(1), make$4()])), flatMap(([queue, deferred]) => {
2606
- const right = flattenTake(fromQueue(queue, {
2607
- maxChunkSize: 1
2608
- }));
2609
- const loop = readWithCause({
2610
- onInput: chunk$1 => pipe(fromEffect$1(offer$1(queue, chunk(chunk$1))), foldCauseChannel({
2611
- onFailure: () => flatMap$2(write(chunk$1), () => identityChannel()),
2612
- onSuccess: () => flatMap$2(write(chunk$1), () => loop)
2613
- })),
2614
- onFailure: cause => pipe(fromEffect$1(offer$1(queue, failCause$6(cause))), foldCauseChannel({
2615
- onFailure: () => failCause$3(cause),
2616
- onSuccess: () => failCause$3(cause)
2617
- })),
2618
- onDone: () => pipe(fromEffect$1(offer$1(queue, end$2)), foldCauseChannel({
2619
- onFailure: () => unit$1,
2620
- onSuccess: () => unit$1
2621
- }))
2622
- });
2623
- return pipe(new StreamImpl(pipe(pipeTo(toChannel(self), loop), ensuring$1(zipRight$1(forkDaemon(offer$1(queue, end$2)), _await(deferred))))), merge(execute(pipe(run(right, sink), ensuring$2(zipRight$1(shutdown(queue), succeed$2(deferred, void 0)))))));
2624
- })));
2625
-
2626
- /** @internal */
2627
- const throttle = /*#__PURE__*/dual(2, (self, options) => throttleEffect(self, {
2628
- ...options,
2629
- cost: chunk => succeed$1(options.cost(chunk))
2630
- }));
2631
-
2632
- /** @internal */
2633
- const throttleEffect = /*#__PURE__*/dual(2, (self, options) => {
2634
- if (options.strategy === "enforce") {
2635
- return throttleEnforceEffect(self, options.cost, options.units, options.duration, options.burst ?? 0);
2636
- }
2637
- return throttleShapeEffect(self, options.cost, options.units, options.duration, options.burst ?? 0);
2638
- });
2639
- const throttleEnforceEffect = (self, cost, units, duration, burst) => {
2640
- const loop = (tokens, timestampMillis) => readWithCause({
2641
- onInput: input => pipe(cost(input), zip$1(currentTimeMillis), map$2(([weight, currentTimeMillis]) => {
2642
- const elapsed = currentTimeMillis - timestampMillis;
2643
- const cycles = elapsed / toMillis(duration);
2644
- const sum = tokens + cycles * units;
2645
- const max = units + burst < 0 ? Number.POSITIVE_INFINITY : units + burst;
2646
- const available = sum < 0 ? max : Math.min(sum, max);
2647
- if (weight <= available) {
2648
- return pipe(write(input), flatMap$2(() => loop(available - weight, currentTimeMillis)));
2649
- }
2650
- return loop(tokens, timestampMillis);
2651
- }), unwrap$1),
2652
- onFailure: failCause$3,
2653
- onDone: () => unit$1
2654
- });
2655
- const throttled = pipe(currentTimeMillis, map$2(currentTimeMillis => loop(units, currentTimeMillis)), unwrap$1);
2656
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(throttled)));
2657
- };
2658
- const throttleShapeEffect = (self, costFn, units, duration, burst) => {
2659
- const loop = (tokens, timestampMillis) => readWithCause({
2660
- onInput: input => pipe(costFn(input), zip$1(currentTimeMillis), map$2(([weight, currentTimeMillis]) => {
2661
- const elapsed = currentTimeMillis - timestampMillis;
2662
- const cycles = elapsed / toMillis(duration);
2663
- const sum = tokens + cycles * units;
2664
- const max = units + burst < 0 ? Number.POSITIVE_INFINITY : units + burst;
2665
- const available = sum < 0 ? max : Math.min(sum, max);
2666
- const remaining = available - weight;
2667
- const waitCycles = remaining >= 0 ? 0 : -remaining / units;
2668
- const delay = millis(Math.max(0, waitCycles * toMillis(duration)));
2669
- if (greaterThan(delay, zero)) {
2670
- return pipe(fromEffect$1(sleep(delay)), zipRight$2(write(input)), flatMap$2(() => loop(remaining, currentTimeMillis)));
2671
- }
2672
- return flatMap$2(write(input), () => loop(remaining, currentTimeMillis));
2673
- }), unwrap$1),
2674
- onFailure: failCause$3,
2675
- onDone: () => unit$1
2676
- });
2677
- const throttled = pipe(currentTimeMillis, map$2(currentTimeMillis => loop(units, currentTimeMillis)), unwrap$1);
2678
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(throttled)));
2679
- };
2680
-
2681
- /** @internal */
2682
- const tick = interval => repeatWithSchedule(void 0, spaced(interval));
2683
-
2684
- /** @internal */
2685
- const timeout = /*#__PURE__*/dual(2, (self, duration) => pipe(toPull(self), map$2(timeoutFail$1({
2686
- onTimeout: () => none(),
2687
- duration
2688
- })), fromPull));
2689
-
2690
- /** @internal */
2691
- const timeoutFail = /*#__PURE__*/dual(3, (self, error, duration) => pipe(self, timeoutTo(duration, failSync(error))));
2692
-
2693
- /** @internal */
2694
- const timeoutFailCause = /*#__PURE__*/dual(3, (self, cause, duration) => pipe(toPull(self), map$2(timeoutFailCause$1({
2695
- onTimeout: () => map$1(cause(), some$1),
2696
- duration
2697
- })), fromPull));
2698
-
2699
- /** @internal */
2700
- const timeoutTo = /*#__PURE__*/dual(3, (self, duration, that) => {
2701
- const StreamTimeout = RuntimeException("Stream Timeout");
2702
- return pipe(self, timeoutFailCause(() => die$2(StreamTimeout), duration), catchSomeCause(cause => isDieType(cause) && isRuntimeException(cause.defect) && cause.defect.message !== undefined && cause.defect.message === "Stream Timeout" ? some$1(that) : none()));
2703
- });
2704
-
2705
- /** @internal */
2706
- const toHub = /*#__PURE__*/dual(2, (self, capacity) => pipe(acquireRelease$1(bounded$1(capacity), hub => shutdown$1(hub)), tap$1(hub => pipe(self, runIntoHubScoped(hub), forkScoped))));
2707
-
2708
- /** @internal */
2709
- const toPull = self => map$2(toPull$1(toChannel(self)), pull => pipe(pull, mapError$1(some$1), flatMap$1(match({
2710
- onLeft: () => fail$1(none()),
2711
- onRight: succeed$1
2712
- }))));
2713
-
2714
- /** @internal */
2715
- const toQueue = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => tap$1(acquireRelease$1(options?.strategy === "unbounded" ? unbounded() : options?.strategy === "dropping" ? dropping(options.capacity ?? 2) : options?.strategy === "sliding" ? sliding$1(options.capacity ?? 2) : bounded(options?.capacity ?? 2), queue => shutdown(queue)), queue => forkScoped(runIntoQueueScoped(self, queue))));
2716
-
2717
- /** @internal */
2718
- const toQueueOfElements = /*#__PURE__*/dual(args => isStream(args[0]), (self, options) => tap$1(acquireRelease$1(bounded(options?.capacity ?? 2), queue => shutdown(queue)), queue => forkScoped(runIntoQueueElementsScoped(self, queue))));
2719
-
2720
- /** @internal */
2721
- const toReadableStream = source => {
2722
- let pull;
2723
- let scope;
2724
- return new ReadableStream({
2725
- start(controller) {
2726
- scope = runSync(make$6());
2727
- pull = pipe(toPull(source), use(scope), runSync, tap$1(chunk => sync$1(() => {
2728
- map$3(chunk, a => {
2729
- controller.enqueue(a);
2730
- });
2731
- })), tapErrorCause$1(() => close(scope, unit$3)), catchTags$1({
2732
- "None": () => sync$1(() => {
2733
- controller.close();
2734
- }),
2735
- "Some": error => sync$1(() => {
2736
- controller.error(error.value);
2737
- })
2738
- }), asUnit);
2739
- },
2740
- pull() {
2741
- return runPromise(pull);
2742
- },
2743
- cancel() {
2744
- return runPromise(close(scope, unit$3));
2745
- }
2746
- });
2747
- };
2748
-
2749
- /** @internal */
2750
- const transduce = /*#__PURE__*/dual(2, (self, sink) => {
2751
- const newChannel = suspend$2(() => {
2752
- const leftovers = {
2753
- ref: empty$1()
2754
- };
2755
- const upstreamDone = {
2756
- ref: false
2757
- };
2758
- const buffer = suspend$2(() => {
2759
- const leftover = leftovers.ref;
2760
- if (isEmpty(leftover)) {
2761
- return readWith({
2762
- onInput: input => pipe(write(input), flatMap$2(() => buffer)),
2763
- onFailure: fail$2,
2764
- onDone: succeedNow
2765
- });
2766
- }
2767
- leftovers.ref = empty$1();
2768
- return pipe(writeChunk(leftover), flatMap$2(() => buffer));
2769
- });
2770
- const concatAndGet = chunk => {
2771
- const leftover = leftovers.ref;
2772
- const concatenated = appendAll(leftover, filter$1(chunk, chunk => chunk.length !== 0));
2773
- leftovers.ref = concatenated;
2774
- return concatenated;
2775
- };
2776
- const upstreamMarker = readWith({
2777
- onInput: input => flatMap$2(write(input), () => upstreamMarker),
2778
- onFailure: fail$2,
2779
- onDone: done => zipRight$2(sync$2(() => {
2780
- upstreamDone.ref = true;
2781
- }), succeedNow(done))
2782
- });
2783
- const transducer = pipe(sink, toChannel$1, collectElements, flatMap$2(([leftover, z]) => pipe(succeed$3([upstreamDone.ref, concatAndGet(leftover)]), flatMap$2(([done, newLeftovers]) => {
2784
- const nextChannel = done && isEmpty(newLeftovers) ? unit$1 : transducer;
2785
- return pipe(write(of(z)), flatMap$2(() => nextChannel));
2786
- }))));
2787
- return pipe(toChannel(self), pipeTo(upstreamMarker), pipeTo(buffer), pipeToOrFail(transducer));
2788
- });
2789
- return new StreamImpl(newChannel);
2790
- });
2791
-
2792
- /** @internal */
2793
- const unfold = (s, f) => unfoldChunk(s, s => pipe(f(s), map$4(([a, s]) => [of(a), s])));
2794
-
2795
- /** @internal */
2796
- const unfoldChunk = (s, f) => {
2797
- const loop = s => match$2(f(s), {
2798
- onNone: () => unit$1,
2799
- onSome: ([chunk, s]) => flatMap$2(write(chunk), () => loop(s))
2800
- });
2801
- return new StreamImpl(suspend$2(() => loop(s)));
2802
- };
2803
-
2804
- /** @internal */
2805
- const unfoldChunkEffect = (s, f) => suspend(() => {
2806
- const loop = s => unwrap$1(map$2(f(s), match$2({
2807
- onNone: () => unit$1,
2808
- onSome: ([chunk, s]) => flatMap$2(write(chunk), () => loop(s))
2809
- })));
2810
- return new StreamImpl(loop(s));
2811
- });
2812
-
2813
- /** @internal */
2814
- const unfoldEffect = (s, f) => unfoldChunkEffect(s, s => pipe(f(s), map$2(map$4(([a, s]) => [of(a), s]))));
2815
-
2816
- /** @internal */
2817
- const unit = /*#__PURE__*/succeed(void 0);
2818
-
2819
- /** @internal */
2820
- const unwrap = effect => flatten(fromEffect(effect));
2821
-
2822
- /** @internal */
2823
- const unwrapScoped = effect => flatten(scoped(effect));
2824
-
2825
- /** @internal */
2826
- const updateService = /*#__PURE__*/dual(3, (self, tag, f) => pipe(self, mapInputContext(context => pipe(context, add(tag, f(pipe(context, unsafeGet(tag))))))));
2827
-
2828
- /** @internal */
2829
- const when = /*#__PURE__*/dual(2, (self, predicate) => pipe(self, whenEffect(sync$1(predicate))));
2830
-
2831
- /** @internal */
2832
- const whenCase = (evaluate, pf) => whenCaseEffect(pf)(sync$1(evaluate));
2833
-
2834
- /** @internal */
2835
- const whenCaseEffect = /*#__PURE__*/dual(2, (self, pf) => pipe(fromEffect(self), flatMap(a => pipe(pf(a), getOrElse(() => empty)))));
2836
-
2837
- /** @internal */
2838
- const whenEffect = /*#__PURE__*/dual(2, (self, effect) => pipe(fromEffect(effect), flatMap(bool => bool ? self : empty)));
2839
-
2840
- /** @internal */
2841
- const withSpan = /*#__PURE__*/dual(3, (self, name, options) => unwrapScoped(as$1(withSpanScoped(name, options), self)));
2842
-
2843
- /** @internal */
2844
- const zip = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWith(that, (a, a2) => [a, a2])));
2845
-
2846
- /** @internal */
2847
- const zipFlatten = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWith(that, (a, a2) => [...a, a2])));
2848
-
2849
- /** @internal */
2850
- const zipAll = /*#__PURE__*/dual(2, (self, options) => zipAllWith(self, {
2851
- other: options.other,
2852
- onSelf: a => [a, options.defaultOther],
2853
- onOther: a2 => [options.defaultSelf, a2],
2854
- onBoth: (a, a2) => [a, a2]
2855
- }));
2856
-
2857
- /** @internal */
2858
- const zipAllLeft = /*#__PURE__*/dual(3, (self, other, defaultSelf) => zipAllWith(self, {
2859
- other,
2860
- onSelf: identity,
2861
- onOther: () => defaultSelf,
2862
- onBoth: a => a
2863
- }));
2864
-
2865
- /** @internal */
2866
- const zipAllRight = /*#__PURE__*/dual(3, (self, other, defaultRight) => zipAllWith(self, {
2867
- other,
2868
- onSelf: () => defaultRight,
2869
- onOther: identity,
2870
- onBoth: (_, a2) => a2
2871
- }));
2872
-
2873
- /** @internal */
2874
- const zipAllSortedByKey = /*#__PURE__*/dual(2, (self, options) => zipAllSortedByKeyWith(self, {
2875
- other: options.other,
2876
- onSelf: a => [a, options.defaultOther],
2877
- onOther: a2 => [options.defaultSelf, a2],
2878
- onBoth: (a, a2) => [a, a2],
2879
- order: options.order
2880
- }));
2881
-
2882
- /** @internal */
2883
- const zipAllSortedByKeyLeft = /*#__PURE__*/dual(2, (self, options) => zipAllSortedByKeyWith(self, {
2884
- other: options.other,
2885
- onSelf: identity,
2886
- onOther: () => options.defaultSelf,
2887
- onBoth: a => a,
2888
- order: options.order
2889
- }));
2890
-
2891
- /** @internal */
2892
- const zipAllSortedByKeyRight = /*#__PURE__*/dual(2, (self, options) => zipAllSortedByKeyWith(self, {
2893
- other: options.other,
2894
- onSelf: () => options.defaultOther,
2895
- onOther: identity,
2896
- onBoth: (_, a2) => a2,
2897
- order: options.order
2898
- }));
2899
-
2900
- /** @internal */
2901
- const zipAllSortedByKeyWith = /*#__PURE__*/dual(2, (self, options) => {
2902
- const pull = (state, pullLeft, pullRight) => {
2903
- switch (state._tag) {
2904
- case OP_DRAIN_LEFT:
2905
- {
2906
- return pipe(pullLeft, match$1({
2907
- onFailure: fail$3,
2908
- onSuccess: leftChunk => succeed$4([map$3(leftChunk, ([k, a]) => [k, options.onSelf(a)]), DrainLeft])
2909
- }));
2910
- }
2911
- case OP_DRAIN_RIGHT:
2912
- {
2913
- return pipe(pullRight, match$1({
2914
- onFailure: fail$3,
2915
- onSuccess: rightChunk => succeed$4([map$3(rightChunk, ([k, a2]) => [k, options.onOther(a2)]), DrainRight])
2916
- }));
2917
- }
2918
- case OP_PULL_BOTH$1:
2919
- {
2920
- return pipe(unsome(pullLeft), zip$1(unsome(pullRight), {
2921
- concurrent: true
2922
- }), matchEffect({
2923
- onFailure: error => succeed$1(fail$3(some$1(error))),
2924
- onSuccess: ([leftOption, rightOption]) => {
2925
- if (isSome(leftOption) && isSome(rightOption)) {
2926
- if (isEmpty(leftOption.value) && isEmpty(rightOption.value)) {
2927
- return pull(PullBoth$1, pullLeft, pullRight);
2928
- }
2929
- if (isEmpty(leftOption.value)) {
2930
- return pull(PullLeft$1(rightOption.value), pullLeft, pullRight);
2931
- }
2932
- if (isEmpty(rightOption.value)) {
2933
- return pull(PullRight$1(leftOption.value), pullLeft, pullRight);
2934
- }
2935
- return succeed$1(succeed$4(merge(leftOption.value, rightOption.value)));
2936
- }
2937
- if (isSome(leftOption) && isNone(rightOption)) {
2938
- if (isEmpty(leftOption.value)) {
2939
- return pull(DrainLeft, pullLeft, pullRight);
2940
- }
2941
- return succeed$1(succeed$4([pipe(leftOption.value, map$3(([k, a]) => [k, options.onSelf(a)])), DrainLeft]));
2942
- }
2943
- if (isNone(leftOption) && isSome(rightOption)) {
2944
- if (isEmpty(rightOption.value)) {
2945
- return pull(DrainRight, pullLeft, pullRight);
2946
- }
2947
- return succeed$1(succeed$4([pipe(rightOption.value, map$3(([k, a2]) => [k, options.onOther(a2)])), DrainRight]));
2948
- }
2949
- return succeed$1(fail$3(none()));
2950
- }
2951
- }));
2952
- }
2953
- case OP_PULL_LEFT$1:
2954
- {
2955
- return matchEffect(pullLeft, {
2956
- onFailure: match$2({
2957
- onNone: () => succeed$1(succeed$4([pipe(state.rightChunk, map$3(([k, a2]) => [k, options.onOther(a2)])), DrainRight])),
2958
- onSome: error => succeed$1(fail$3(some$1(error)))
2959
- }),
2960
- onSuccess: leftChunk => isEmpty(leftChunk) ? pull(PullLeft$1(state.rightChunk), pullLeft, pullRight) : succeed$1(succeed$4(merge(leftChunk, state.rightChunk)))
2961
- });
2962
- }
2963
- case OP_PULL_RIGHT$1:
2964
- {
2965
- return matchEffect(pullRight, {
2966
- onFailure: match$2({
2967
- onNone: () => succeed$1(succeed$4([map$3(state.leftChunk, ([k, a]) => [k, options.onSelf(a)]), DrainLeft])),
2968
- onSome: error => succeed$1(fail$3(some$1(error)))
2969
- }),
2970
- onSuccess: rightChunk => isEmpty(rightChunk) ? pull(PullRight$1(state.leftChunk), pullLeft, pullRight) : succeed$1(succeed$4(merge(state.leftChunk, rightChunk)))
2971
- });
2972
- }
2973
- }
2974
- };
2975
- const merge = (leftChunk, rightChunk) => {
2976
- const hasNext = (chunk, index) => index < chunk.length - 1;
2977
- const builder = [];
2978
- let state = undefined;
2979
- let leftIndex = 0;
2980
- let rightIndex = 0;
2981
- let leftTuple = pipe(leftChunk, unsafeGet$1(leftIndex));
2982
- let rightTuple = pipe(rightChunk, unsafeGet$1(rightIndex));
2983
- let k1 = leftTuple[0];
2984
- let a = leftTuple[1];
2985
- let k2 = rightTuple[0];
2986
- let a2 = rightTuple[1];
2987
- let loop = true;
2988
- while (loop) {
2989
- const compare = options.order(k1, k2);
2990
- if (compare === 0) {
2991
- builder.push([k1, options.onBoth(a, a2)]);
2992
- if (hasNext(leftChunk, leftIndex) && hasNext(rightChunk, rightIndex)) {
2993
- leftIndex = leftIndex + 1;
2994
- rightIndex = rightIndex + 1;
2995
- leftTuple = pipe(leftChunk, unsafeGet$1(leftIndex));
2996
- rightTuple = pipe(rightChunk, unsafeGet$1(rightIndex));
2997
- k1 = leftTuple[0];
2998
- a = leftTuple[1];
2999
- k2 = rightTuple[0];
3000
- a2 = rightTuple[1];
3001
- } else if (hasNext(leftChunk, leftIndex)) {
3002
- state = PullRight$1(pipe(leftChunk, drop$1(leftIndex + 1)));
3003
- loop = false;
3004
- } else if (hasNext(rightChunk, rightIndex)) {
3005
- state = PullLeft$1(pipe(rightChunk, drop$1(rightIndex + 1)));
3006
- loop = false;
3007
- } else {
3008
- state = PullBoth$1;
3009
- loop = false;
3010
- }
3011
- } else if (compare < 0) {
3012
- builder.push([k1, options.onSelf(a)]);
3013
- if (hasNext(leftChunk, leftIndex)) {
3014
- leftIndex = leftIndex + 1;
3015
- leftTuple = pipe(leftChunk, unsafeGet$1(leftIndex));
3016
- k1 = leftTuple[0];
3017
- a = leftTuple[1];
3018
- } else {
3019
- const rightBuilder = [];
3020
- rightBuilder.push(rightTuple);
3021
- while (hasNext(rightChunk, rightIndex)) {
3022
- rightIndex = rightIndex + 1;
3023
- rightTuple = pipe(rightChunk, unsafeGet$1(rightIndex));
3024
- rightBuilder.push(rightTuple);
3025
- }
3026
- state = PullLeft$1(unsafeFromArray(rightBuilder));
3027
- loop = false;
3028
- }
3029
- } else {
3030
- builder.push([k2, options.onOther(a2)]);
3031
- if (hasNext(rightChunk, rightIndex)) {
3032
- rightIndex = rightIndex + 1;
3033
- rightTuple = pipe(rightChunk, unsafeGet$1(rightIndex));
3034
- k2 = rightTuple[0];
3035
- a2 = rightTuple[1];
3036
- } else {
3037
- const leftBuilder = [];
3038
- leftBuilder.push(leftTuple);
3039
- while (hasNext(leftChunk, leftIndex)) {
3040
- leftIndex = leftIndex + 1;
3041
- leftTuple = pipe(leftChunk, unsafeGet$1(leftIndex));
3042
- leftBuilder.push(leftTuple);
3043
- }
3044
- state = PullRight$1(unsafeFromArray(leftBuilder));
3045
- loop = false;
3046
- }
3047
- }
3048
- }
3049
- return [unsafeFromArray(builder), state];
3050
- };
3051
- return combineChunks(self, options.other, PullBoth$1, pull);
3052
- });
3053
-
3054
- /** @internal */
3055
- const zipAllWith = /*#__PURE__*/dual(2, (self, options) => {
3056
- const pull = (state, pullLeft, pullRight) => {
3057
- switch (state._tag) {
3058
- case OP_DRAIN_LEFT:
3059
- {
3060
- return matchEffect(pullLeft, {
3061
- onFailure: error => succeed$1(fail$3(error)),
3062
- onSuccess: leftChunk => succeed$1(succeed$4([map$3(leftChunk, options.onSelf), DrainLeft]))
3063
- });
3064
- }
3065
- case OP_DRAIN_RIGHT:
3066
- {
3067
- return matchEffect(pullRight, {
3068
- onFailure: error => succeed$1(fail$3(error)),
3069
- onSuccess: rightChunk => succeed$1(succeed$4([map$3(rightChunk, options.onOther), DrainRight]))
3070
- });
3071
- }
3072
- case OP_PULL_BOTH$1:
3073
- {
3074
- return pipe(unsome(pullLeft), zip$1(unsome(pullRight), {
3075
- concurrent: true
3076
- }), matchEffect({
3077
- onFailure: error => succeed$1(fail$3(some$1(error))),
3078
- onSuccess: ([leftOption, rightOption]) => {
3079
- if (isSome(leftOption) && isSome(rightOption)) {
3080
- if (isEmpty(leftOption.value) && isEmpty(rightOption.value)) {
3081
- return pull(PullBoth$1, pullLeft, pullRight);
3082
- }
3083
- if (isEmpty(leftOption.value)) {
3084
- return pull(PullLeft$1(rightOption.value), pullLeft, pullRight);
3085
- }
3086
- if (isEmpty(rightOption.value)) {
3087
- return pull(PullRight$1(leftOption.value), pullLeft, pullRight);
3088
- }
3089
- return succeed$1(succeed$4(zip(leftOption.value, rightOption.value, options.onBoth)));
3090
- }
3091
- if (isSome(leftOption) && isNone(rightOption)) {
3092
- return succeed$1(succeed$4([map$3(leftOption.value, options.onSelf), DrainLeft]));
3093
- }
3094
- if (isNone(leftOption) && isSome(rightOption)) {
3095
- return succeed$1(succeed$4([map$3(rightOption.value, options.onOther), DrainRight]));
3096
- }
3097
- return succeed$1(fail$3(none()));
3098
- }
3099
- }));
3100
- }
3101
- case OP_PULL_LEFT$1:
3102
- {
3103
- return matchEffect(pullLeft, {
3104
- onFailure: match$2({
3105
- onNone: () => succeed$1(succeed$4([map$3(state.rightChunk, options.onOther), DrainRight])),
3106
- onSome: error => succeed$1(fail$3(some$1(error)))
3107
- }),
3108
- onSuccess: leftChunk => {
3109
- if (isEmpty(leftChunk)) {
3110
- return pull(PullLeft$1(state.rightChunk), pullLeft, pullRight);
3111
- }
3112
- if (isEmpty(state.rightChunk)) {
3113
- return pull(PullRight$1(leftChunk), pullLeft, pullRight);
3114
- }
3115
- return succeed$1(succeed$4(zip(leftChunk, state.rightChunk, options.onBoth)));
3116
- }
3117
- });
3118
- }
3119
- case OP_PULL_RIGHT$1:
3120
- {
3121
- return matchEffect(pullRight, {
3122
- onFailure: match$2({
3123
- onNone: () => succeed$1(succeed$4([map$3(state.leftChunk, options.onSelf), DrainLeft])),
3124
- onSome: error => succeed$1(fail$3(some$1(error)))
3125
- }),
3126
- onSuccess: rightChunk => {
3127
- if (isEmpty(rightChunk)) {
3128
- return pull(PullRight$1(state.leftChunk), pullLeft, pullRight);
3129
- }
3130
- if (isEmpty(state.leftChunk)) {
3131
- return pull(PullLeft$1(rightChunk), pullLeft, pullRight);
3132
- }
3133
- return succeed$1(succeed$4(zip(state.leftChunk, rightChunk, options.onBoth)));
3134
- }
3135
- });
3136
- }
3137
- }
3138
- };
3139
- const zip = (leftChunk, rightChunk, f) => {
3140
- const [output, either] = zipChunks(leftChunk, rightChunk, f);
3141
- switch (either._tag) {
3142
- case "Left":
3143
- {
3144
- if (isEmpty(either.left)) {
3145
- return [output, PullBoth$1];
3146
- }
3147
- return [output, PullRight$1(either.left)];
3148
- }
3149
- case "Right":
3150
- {
3151
- if (isEmpty(either.right)) {
3152
- return [output, PullBoth$1];
3153
- }
3154
- return [output, PullLeft$1(either.right)];
3155
- }
3156
- }
3157
- };
3158
- return combineChunks(self, options.other, PullBoth$1, pull);
3159
- });
3160
-
3161
- /** @internal */
3162
- const zipLatest = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipLatestWith(that, (a, a2) => [a, a2])));
3163
-
3164
- /** @internal */
3165
- const zipLatestWith = /*#__PURE__*/dual(3, (self, that, f) => {
3166
- const pullNonEmpty = pull => pipe(pull, flatMap$1(chunk => isEmpty(chunk) ? pullNonEmpty(pull) : succeed$1(chunk)));
3167
- return pipe(toPull(self), map$2(pullNonEmpty), zip$1(pipe(toPull(that), map$2(pullNonEmpty))), flatMap$1(([left, right]) => pipe(fromEffectOption(raceWith(left, right, {
3168
- onSelfDone: (leftDone, rightFiber) => pipe(suspend$1(() => leftDone), zipWith$1(join(rightFiber), (l, r) => [l, r, true])),
3169
- onOtherDone: (rightDone, leftFiber) => pipe(suspend$1(() => rightDone), zipWith$1(join(leftFiber), (l, r) => [r, l, false]))
3170
- })), flatMap(([l, r, leftFirst]) => pipe(fromEffect(make$3([unsafeLast(l), unsafeLast(r)])), flatMap(latest => pipe(fromChunk(leftFirst ? pipe(r, map$3(a2 => f(unsafeLast(l), a2))) : pipe(l, map$3(a => f(a, unsafeLast(r))))), concat(pipe(repeatEffectOption(left), mergeEither(repeatEffectOption(right)), mapEffectSequential(match({
3171
- onLeft: leftChunk => pipe(modify(latest, ([_, rightLatest]) => [pipe(leftChunk, map$3(a => f(a, rightLatest))), [unsafeLast(leftChunk), rightLatest]])),
3172
- onRight: rightChunk => pipe(modify(latest, ([leftLatest, _]) => [pipe(rightChunk, map$3(a2 => f(leftLatest, a2))), [leftLatest, unsafeLast(rightChunk)]]))
3173
- })), flatMap(fromChunk))))))), toPull)), fromPull);
3174
- });
3175
-
3176
- /** @internal */
3177
- const zipLeft = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWithChunks(that, (left$1, right$1) => {
3178
- if (left$1.length > right$1.length) {
3179
- return [pipe(left$1, take$3(right$1.length)), left(pipe(left$1, take$3(right$1.length)))];
3180
- }
3181
- return [left$1, right(pipe(right$1, drop$1(left$1.length)))];
3182
- })));
3183
-
3184
- /** @internal */
3185
- const zipRight = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWithChunks(that, (left$1, right$1) => {
3186
- if (left$1.length > right$1.length) {
3187
- return [right$1, left(pipe(left$1, take$3(right$1.length)))];
3188
- }
3189
- return [pipe(right$1, take$3(left$1.length)), right(pipe(right$1, drop$1(left$1.length)))];
3190
- })));
3191
-
3192
- /** @internal */
3193
- const zipWith = /*#__PURE__*/dual(3, (self, that, f) => pipe(self, zipWithChunks(that, (leftChunk, rightChunk) => zipChunks(leftChunk, rightChunk, f))));
3194
-
3195
- /** @internal */
3196
- const zipWithChunks = /*#__PURE__*/dual(3, (self, that, f) => {
3197
- const pull = (state, pullLeft, pullRight) => {
3198
- switch (state._tag) {
3199
- case OP_PULL_BOTH:
3200
- {
3201
- return pipe(unsome(pullLeft), zip$1(unsome(pullRight), {
3202
- concurrent: true
3203
- }), matchEffect({
3204
- onFailure: error => succeed$1(fail$3(some$1(error))),
3205
- onSuccess: ([leftOption, rightOption]) => {
3206
- if (isSome(leftOption) && isSome(rightOption)) {
3207
- if (isEmpty(leftOption.value) && isEmpty(rightOption.value)) {
3208
- return pull(PullBoth, pullLeft, pullRight);
3209
- }
3210
- if (isEmpty(leftOption.value)) {
3211
- return pull(PullLeft(rightOption.value), pullLeft, pullRight);
3212
- }
3213
- if (isEmpty(rightOption.value)) {
3214
- return pull(PullRight(leftOption.value), pullLeft, pullRight);
3215
- }
3216
- return succeed$1(succeed$4(zip(leftOption.value, rightOption.value)));
3217
- }
3218
- return succeed$1(fail$3(none()));
3219
- }
3220
- }));
3221
- }
3222
- case OP_PULL_LEFT:
3223
- {
3224
- return matchEffect(pullLeft, {
3225
- onFailure: error => succeed$1(fail$3(error)),
3226
- onSuccess: leftChunk => {
3227
- if (isEmpty(leftChunk)) {
3228
- return pull(PullLeft(state.rightChunk), pullLeft, pullRight);
3229
- }
3230
- if (isEmpty(state.rightChunk)) {
3231
- return pull(PullRight(leftChunk), pullLeft, pullRight);
3232
- }
3233
- return succeed$1(succeed$4(zip(leftChunk, state.rightChunk)));
3234
- }
3235
- });
3236
- }
3237
- case OP_PULL_RIGHT:
3238
- {
3239
- return matchEffect(pullRight, {
3240
- onFailure: error => succeed$1(fail$3(error)),
3241
- onSuccess: rightChunk => {
3242
- if (isEmpty(rightChunk)) {
3243
- return pull(PullRight(state.leftChunk), pullLeft, pullRight);
3244
- }
3245
- if (isEmpty(state.leftChunk)) {
3246
- return pull(PullLeft(rightChunk), pullLeft, pullRight);
3247
- }
3248
- return succeed$1(succeed$4(zip(state.leftChunk, rightChunk)));
3249
- }
3250
- });
3251
- }
3252
- }
3253
- };
3254
- const zip = (leftChunk, rightChunk) => {
3255
- const [output, either] = f(leftChunk, rightChunk);
3256
- switch (either._tag) {
3257
- case "Left":
3258
- {
3259
- if (isEmpty(either.left)) {
3260
- return [output, PullBoth];
3261
- }
3262
- return [output, PullRight(either.left)];
3263
- }
3264
- case "Right":
3265
- {
3266
- if (isEmpty(either.right)) {
3267
- return [output, PullBoth];
3268
- }
3269
- return [output, PullLeft(either.right)];
3270
- }
3271
- }
3272
- };
3273
- return pipe(self, combineChunks(that, PullBoth, pull));
3274
- });
3275
-
3276
- /** @internal */
3277
- const zipWithIndex = self => pipe(self, mapAccum(0, (index, a) => [index + 1, [a, index]]));
3278
-
3279
- /** @internal */
3280
- const zipWithNext = self => {
3281
- const process = last => readWithCause({
3282
- onInput: input => {
3283
- const [newLast, chunk] = mapAccum$1(input, last, (prev, curr) => [some$1(curr), pipe(prev, map$4(a => [a, curr]))]);
3284
- const output = filterMap$1(chunk, option => isSome(option) ? some$1([option.value[0], some$1(option.value[1])]) : none());
3285
- return flatMap$2(write(output), () => process(newLast));
3286
- },
3287
- onFailure: failCause$3,
3288
- onDone: () => match$2(last, {
3289
- onNone: () => unit$1,
3290
- onSome: value => zipRight$2(write(of([value, none()])), unit$1)
3291
- })
3292
- });
3293
- return new StreamImpl(pipe(toChannel(self), pipeToOrFail(process(none()))));
3294
- };
3295
-
3296
- /** @internal */
3297
- const zipWithPrevious = self => pipe(self, mapAccum(none(), (prev, curr) => [some$1(curr), [prev, curr]]));
3298
-
3299
- /** @internal */
3300
- const zipWithPreviousAndNext = self => pipe(zipWithNext(zipWithPrevious(self)), map(([[prev, curr], next]) => [prev, curr, pipe(next, map$4(tuple => tuple[1]))]));
3301
-
3302
- /** @internal */
3303
- const zipChunks = (left$1, right$1, f) => {
3304
- if (left$1.length > right$1.length) {
3305
- return [pipe(left$1, take$3(right$1.length), zipWith$2(right$1, f)), left(pipe(left$1, drop$1(right$1.length)))];
3306
- }
3307
- return [pipe(left$1, zipWith$2(pipe(right$1, take$3(left$1.length)), f)), right(pipe(right$1, drop$1(left$1.length)))];
3308
- };
3309
-
3310
- // Do notation
3311
-
3312
- /** @internal */
3313
- const Do = /*#__PURE__*/succeed({});
3314
-
3315
- /** @internal */
3316
- const bind = /*#__PURE__*/dual(args => typeof args[0] !== "string", (self, tag, f, options) => flatMap(self, k => map(f(k), a => ({
3317
- ...k,
3318
- [tag]: a
3319
- })), options));
3320
-
3321
- /* @internal */
3322
- const bindTo = /*#__PURE__*/dual(2, (self, tag) => map(self, a => ({
3323
- [tag]: a
3324
- })));
3325
-
3326
- /* @internal */
3327
- const let_ = /*#__PURE__*/dual(3, (self, tag, f) => map(self, k => ({
3328
- ...k,
3329
- [tag]: f(k)
3330
- })));
3331
-
3332
- // Circular with Channel
3333
-
3334
- /** @internal */
3335
- const channelToStream = self => {
3336
- return new StreamImpl(self);
3337
- };
3338
-
3339
- // =============================================================================
3340
- // encoding
3341
- // =============================================================================
3342
-
3343
- /** @internal */
3344
- const decodeText = /*#__PURE__*/dual(args => isStream(args[0]), (self, encoding = "utf-8") => suspend(() => {
3345
- const decoder = new TextDecoder(encoding);
3346
- return map(self, s => decoder.decode(s));
3347
- }));
3348
-
3349
- /** @internal */
3350
- const encodeText = self => suspend(() => {
3351
- const encoder = new TextEncoder();
3352
- return map(self, s => encoder.encode(s));
3353
- });
3354
-
3355
- export { empty as $, chunksWith as A, combine as B, combineChunks as C, DefaultChunkSize as D, concat as E, concatAll as F, cross as G, crossLeft as H, crossRight as I, crossWith as J, debounce as K, die as L, dieSync as M, dieMessage as N, distributedWith as O, distributedWithDynamic as P, drain as Q, drainFork as R, StreamTypeId as S, drop as T, dropRight as U, dropUntil as V, dropUntilEffect as W, dropWhile as X, dropWhileEffect as Y, either as Z, _async as _, acquireRelease as a, mapAccum as a$, ensuring as a0, ensuringWith as a1, context as a2, contextWith as a3, contextWithEffect as a4, contextWithStream as a5, execute as a6, fail as a7, failSync as a8, failCause as a9, fromEffectOption as aA, fromHub as aB, fromIterable as aC, fromIterableEffect as aD, fromIteratorSucceed as aE, fromPull as aF, fromQueue as aG, fromReadableStream as aH, fromReadableStreamByob as aI, fromSchedule as aJ, groupAdjacentBy as aK, grouped as aL, groupedWithin as aM, haltAfter as aN, haltWhen as aO, haltWhenDeferred as aP, identityStream as aQ, interleave as aR, interleaveWith as aS, intersperse as aT, intersperseAffixes as aU, interruptAfter as aV, interruptWhen as aW, interruptWhenDeferred as aX, iterate as aY, make as aZ, map as a_, failCauseSync as aa, filter as ab, filterEffect as ac, filterMap as ad, filterMapEffect as ae, filterMapWhile as af, filterMapWhileEffect as ag, finalizer as ah, find as ai, findEffect as aj, flatMap as ak, flatten as al, flattenChunks as am, flattenEffect as an, flattenExitOption as ao, flattenIterables as ap, flattenTake as aq, forever as ar, fromAsyncIterable as as, fromChannel as at, toChannel as au, fromChunk as av, fromChunkHub as aw, fromChunkQueue as ax, fromChunks as ay, fromEffect as az, aggregate as b, run as b$, mapAccumEffect as b0, mapBoth as b1, mapChunks as b2, mapChunksEffect as b3, mapConcat as b4, mapConcatChunk as b5, mapConcatChunkEffect as b6, mapConcatEffect as b7, mapError as b8, mapErrorCause as b9, pipeThrough as bA, pipeThroughChannel as bB, pipeThroughChannelOrFail as bC, prepend as bD, provideContext as bE, provideLayer as bF, provideService as bG, provideServiceEffect as bH, provideServiceStream as bI, mapInputContext as bJ, provideSomeLayer as bK, range as bL, rechunk as bM, refineOrDie as bN, refineOrDieWith as bO, repeat as bP, repeatEffect as bQ, repeatEffectChunk as bR, repeatEffectChunkOption as bS, repeatEffectOption as bT, repeatEffectWithSchedule as bU, repeatEither as bV, repeatElements as bW, repeatElementsWith as bX, repeatValue as bY, repeatWith as bZ, retry as b_, merge as ba, mergeAll as bb, mergeWith as bc, mergeEither as bd, mergeLeft as be, mergeRight as bf, mkString as bg, never as bh, onError as bi, onDone as bj, orDie as bk, orDieWith as bl, orElse as bm, orElseEither as bn, orElseFail as bo, orElseIfEmpty as bp, orElseIfEmptyChunk as bq, orElseIfEmptyStream as br, orElseSucceed as bs, paginate as bt, paginateChunk as bu, paginateChunkEffect as bv, paginateEffect as bw, partition as bx, partitionEither as by, peel as bz, aggregateWithin as c, toQueue as c$, runCollect as c0, runCount as c1, runDrain as c2, runFold as c3, runFoldEffect as c4, runFoldScoped as c5, runFoldScopedEffect as c6, runFoldWhile as c7, runFoldWhileEffect as c8, runFoldWhileScoped as c9, someOrElse as cA, someOrFail as cB, split as cC, splitOnChunk as cD, splitLines as cE, succeed as cF, sync as cG, suspend as cH, take as cI, takeRight as cJ, takeUntil as cK, takeUntilEffect as cL, takeWhile as cM, tap as cN, tapBoth as cO, tapError as cP, tapErrorCause as cQ, tapSink as cR, throttle as cS, throttleEffect as cT, tick as cU, timeout as cV, timeoutFail as cW, timeoutFailCause as cX, timeoutTo as cY, toHub as cZ, toPull as c_, runFoldWhileScopedEffect as ca, runForEach as cb, runForEachChunk as cc, runForEachChunkScoped as cd, runForEachScoped as ce, runForEachWhile as cf, runForEachWhileScoped as cg, runHead as ch, runIntoHub as ci, runIntoHubScoped as cj, runIntoQueue as ck, runIntoQueueElementsScoped as cl, runIntoQueueScoped as cm, runLast as cn, runScoped as co, runSum as cp, scan as cq, scanEffect as cr, scanReduce as cs, scanReduceEffect as ct, schedule as cu, scheduleWith as cv, scoped as cw, sliding as cx, slidingSize as cy, some as cz, aggregateWithinEither as d, toQueueOfElements as d0, toReadableStream as d1, transduce as d2, unfold as d3, unfoldChunk as d4, unfoldChunkEffect as d5, unfoldEffect as d6, unit as d7, unwrap as d8, unwrapScoped as d9, zipWithIndex as dA, Do as dB, bind as dC, bindTo as dD, let_ as dE, decodeText as dF, encodeText as dG, mapEffectSequential as dH, distributedWithDynamicCallback as dI, matchConcurrency as dJ, mapEffectPar as dK, channelToStream as dL, updateService as da, when as db, whenCase as dc, whenCaseEffect as dd, whenEffect as de, withSpan as df, zip as dg, zipFlatten as dh, zipAll as di, zipAllLeft as dj, zipAllRight as dk, zipAllSortedByKey as dl, zipAllSortedByKeyLeft as dm, zipAllSortedByKeyRight as dn, zipAllSortedByKeyWith as dp, zipAllWith as dq, zipLatest as dr, zipLatestWith as ds, zipLeft as dt, zipRight as du, zipWith as dv, zipWithChunks as dw, zipWithNext as dx, zipWithPrevious as dy, zipWithPreviousAndNext as dz, as as e, asyncEffect as f, asyncInterrupt as g, asyncOption as h, asyncScoped as i, branchAfter as j, broadcast as k, broadcastDynamic as l, broadcastedQueues as m, broadcastedQueuesDynamic as n, buffer as o, bufferChunks as p, catchAll as q, catchAllCause as r, catchSome as s, catchTag as t, catchTags as u, catchSomeCause as v, changes as w, changesWith as x, changesWithEffect as y, chunks as z };