@graphrefly/graphrefly 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/README.md +8 -0
  2. package/dist/ai-CaR_912Q.d.cts +1033 -0
  3. package/dist/ai-WlRltJV7.d.ts +1033 -0
  4. package/dist/audit-ClmqGOCx.d.cts +245 -0
  5. package/dist/audit-DRlSzBu9.d.ts +245 -0
  6. package/dist/{chunk-QOWVNWOC.js → chunk-3ZWCKRHX.js} +27 -25
  7. package/dist/{chunk-QOWVNWOC.js.map → chunk-3ZWCKRHX.js.map} +1 -1
  8. package/dist/chunk-APFNLIRG.js +62 -0
  9. package/dist/chunk-APFNLIRG.js.map +1 -0
  10. package/dist/chunk-AT5LKYNL.js +395 -0
  11. package/dist/chunk-AT5LKYNL.js.map +1 -0
  12. package/dist/{chunk-IAHGTNOZ.js → chunk-BQ6RQQFF.js} +351 -2095
  13. package/dist/chunk-BQ6RQQFF.js.map +1 -0
  14. package/dist/{chunk-L2GLW2U7.js → chunk-BVZYTZ5H.js} +9 -103
  15. package/dist/chunk-BVZYTZ5H.js.map +1 -0
  16. package/dist/{chunk-EVR6UFUV.js → chunk-DST5DKZS.js} +19 -15
  17. package/dist/{chunk-EVR6UFUV.js.map → chunk-DST5DKZS.js.map} +1 -1
  18. package/dist/{chunk-TKE3JGOH.js → chunk-GTE6PWRZ.js} +5 -692
  19. package/dist/chunk-GTE6PWRZ.js.map +1 -0
  20. package/dist/chunk-HXZEYDUR.js +94 -0
  21. package/dist/chunk-HXZEYDUR.js.map +1 -0
  22. package/dist/chunk-J22W6HV3.js +107 -0
  23. package/dist/chunk-J22W6HV3.js.map +1 -0
  24. package/dist/{chunk-PY4XCDLR.js → chunk-J2VBW3DZ.js} +6 -95
  25. package/dist/chunk-J2VBW3DZ.js.map +1 -0
  26. package/dist/{chunk-HWPIFSW2.js → chunk-JSCT3CR4.js} +6 -4
  27. package/dist/{chunk-HWPIFSW2.js.map → chunk-JSCT3CR4.js.map} +1 -1
  28. package/dist/chunk-JWBCY4NC.js +330 -0
  29. package/dist/chunk-JWBCY4NC.js.map +1 -0
  30. package/dist/chunk-K2AUJHVP.js +2251 -0
  31. package/dist/chunk-K2AUJHVP.js.map +1 -0
  32. package/dist/chunk-MJ2NKQQL.js +119 -0
  33. package/dist/chunk-MJ2NKQQL.js.map +1 -0
  34. package/dist/chunk-N6UR7YVY.js +198 -0
  35. package/dist/chunk-N6UR7YVY.js.map +1 -0
  36. package/dist/chunk-NC6S43JJ.js +456 -0
  37. package/dist/chunk-NC6S43JJ.js.map +1 -0
  38. package/dist/chunk-OFVJBJXR.js +98 -0
  39. package/dist/chunk-OFVJBJXR.js.map +1 -0
  40. package/dist/chunk-OHISZPOJ.js +97 -0
  41. package/dist/chunk-OHISZPOJ.js.map +1 -0
  42. package/dist/chunk-OU5CQKNW.js +102 -0
  43. package/dist/chunk-OU5CQKNW.js.map +1 -0
  44. package/dist/{chunk-XOFWRC73.js → chunk-PF7GRZMW.js} +316 -21
  45. package/dist/chunk-PF7GRZMW.js.map +1 -0
  46. package/dist/{chunk-5DJTTKX3.js → chunk-PHOUUNK7.js} +74 -111
  47. package/dist/chunk-PHOUUNK7.js.map +1 -0
  48. package/dist/chunk-RNHBMHKA.js +1665 -0
  49. package/dist/chunk-RNHBMHKA.js.map +1 -0
  50. package/dist/chunk-SX52TAR4.js +110 -0
  51. package/dist/chunk-SX52TAR4.js.map +1 -0
  52. package/dist/{chunk-H4RVA4VE.js → chunk-VYPWMZ6H.js} +2 -2
  53. package/dist/chunk-WBZOVTYK.js +171 -0
  54. package/dist/chunk-WBZOVTYK.js.map +1 -0
  55. package/dist/chunk-WKNUIZOY.js +354 -0
  56. package/dist/chunk-WKNUIZOY.js.map +1 -0
  57. package/dist/chunk-X3VMZYBT.js +713 -0
  58. package/dist/chunk-X3VMZYBT.js.map +1 -0
  59. package/dist/chunk-X5R3GL6H.js +525 -0
  60. package/dist/chunk-X5R3GL6H.js.map +1 -0
  61. package/dist/chunk-XGPU467M.js +136 -0
  62. package/dist/chunk-XGPU467M.js.map +1 -0
  63. package/dist/compat/index.cjs +7656 -0
  64. package/dist/compat/index.cjs.map +1 -0
  65. package/dist/compat/index.d.cts +18 -0
  66. package/dist/compat/index.d.ts +18 -0
  67. package/dist/compat/index.js +50 -0
  68. package/dist/compat/index.js.map +1 -0
  69. package/dist/compat/jotai/index.cjs +2048 -0
  70. package/dist/compat/jotai/index.cjs.map +1 -0
  71. package/dist/compat/jotai/index.d.cts +2 -0
  72. package/dist/compat/jotai/index.d.ts +2 -0
  73. package/dist/compat/jotai/index.js +9 -0
  74. package/dist/compat/jotai/index.js.map +1 -0
  75. package/dist/compat/nanostores/index.cjs +2175 -0
  76. package/dist/compat/nanostores/index.cjs.map +1 -0
  77. package/dist/compat/nanostores/index.d.cts +2 -0
  78. package/dist/compat/nanostores/index.d.ts +2 -0
  79. package/dist/compat/nanostores/index.js +23 -0
  80. package/dist/compat/nanostores/index.js.map +1 -0
  81. package/dist/compat/nestjs/index.cjs +350 -16
  82. package/dist/compat/nestjs/index.cjs.map +1 -1
  83. package/dist/compat/nestjs/index.d.cts +6 -6
  84. package/dist/compat/nestjs/index.d.ts +6 -6
  85. package/dist/compat/nestjs/index.js +11 -9
  86. package/dist/compat/react/index.cjs +141 -0
  87. package/dist/compat/react/index.cjs.map +1 -0
  88. package/dist/compat/react/index.d.cts +2 -0
  89. package/dist/compat/react/index.d.ts +2 -0
  90. package/dist/compat/react/index.js +12 -0
  91. package/dist/compat/react/index.js.map +1 -0
  92. package/dist/compat/solid/index.cjs +128 -0
  93. package/dist/compat/solid/index.cjs.map +1 -0
  94. package/dist/compat/solid/index.d.cts +2 -0
  95. package/dist/compat/solid/index.d.ts +2 -0
  96. package/dist/compat/solid/index.js +12 -0
  97. package/dist/compat/solid/index.js.map +1 -0
  98. package/dist/compat/svelte/index.cjs +131 -0
  99. package/dist/compat/svelte/index.cjs.map +1 -0
  100. package/dist/compat/svelte/index.d.cts +2 -0
  101. package/dist/compat/svelte/index.d.ts +2 -0
  102. package/dist/compat/svelte/index.js +12 -0
  103. package/dist/compat/svelte/index.js.map +1 -0
  104. package/dist/compat/vue/index.cjs +146 -0
  105. package/dist/compat/vue/index.cjs.map +1 -0
  106. package/dist/compat/vue/index.d.cts +3 -0
  107. package/dist/compat/vue/index.d.ts +3 -0
  108. package/dist/compat/vue/index.js +12 -0
  109. package/dist/compat/vue/index.js.map +1 -0
  110. package/dist/compat/zustand/index.cjs +4931 -0
  111. package/dist/compat/zustand/index.cjs.map +1 -0
  112. package/dist/compat/zustand/index.d.cts +5 -0
  113. package/dist/compat/zustand/index.d.ts +5 -0
  114. package/dist/compat/zustand/index.js +12 -0
  115. package/dist/compat/zustand/index.js.map +1 -0
  116. package/dist/composite-C7PcQvcs.d.cts +303 -0
  117. package/dist/composite-aUCvjZVR.d.ts +303 -0
  118. package/dist/core/index.cjs +53 -4
  119. package/dist/core/index.cjs.map +1 -1
  120. package/dist/core/index.d.cts +4 -3
  121. package/dist/core/index.d.ts +4 -3
  122. package/dist/core/index.js +26 -24
  123. package/dist/demo-shell-BDkOptd6.d.ts +102 -0
  124. package/dist/demo-shell-Crid1WdR.d.cts +102 -0
  125. package/dist/extra/index.cjs +222 -110
  126. package/dist/extra/index.cjs.map +1 -1
  127. package/dist/extra/index.d.cts +6 -4
  128. package/dist/extra/index.d.ts +6 -4
  129. package/dist/extra/index.js +72 -65
  130. package/dist/extra/sources.cjs +2486 -0
  131. package/dist/extra/sources.cjs.map +1 -0
  132. package/dist/extra/sources.d.cts +465 -0
  133. package/dist/extra/sources.d.ts +465 -0
  134. package/dist/extra/sources.js +57 -0
  135. package/dist/extra/sources.js.map +1 -0
  136. package/dist/graph/index.cjs +408 -14
  137. package/dist/graph/index.cjs.map +1 -1
  138. package/dist/graph/index.d.cts +5 -5
  139. package/dist/graph/index.d.ts +5 -5
  140. package/dist/graph/index.js +13 -5
  141. package/dist/{graph-D-3JIQme.d.cts → graph-CCwGKLCm.d.ts} +195 -4
  142. package/dist/{graph-B6NFqv3z.d.ts → graph-DNCrvZSn.d.cts} +195 -4
  143. package/dist/index-3lsddbbS.d.ts +86 -0
  144. package/dist/index-B1tloyhO.d.cts +34 -0
  145. package/dist/{index-CYkjxu3s.d.ts → index-B6D3QNSA.d.ts} +33 -4
  146. package/dist/index-B6EhDnjH.d.cts +37 -0
  147. package/dist/index-B9B7_HEY.d.ts +37 -0
  148. package/dist/{index-Ds23Wvou.d.ts → index-BHlKbUwO.d.cts} +131 -883
  149. package/dist/{index-DiobMNwE.d.ts → index-BPVt8kqc.d.ts} +3 -3
  150. package/dist/index-BaSM3aYt.d.ts +195 -0
  151. package/dist/index-BuEoe-Qu.d.ts +121 -0
  152. package/dist/{index-Ch0IpIO0.d.cts → index-BwfLUNw4.d.ts} +131 -883
  153. package/dist/index-ByQxazQJ.d.cts +86 -0
  154. package/dist/index-C0svESO4.d.ts +127 -0
  155. package/dist/{index-OXImXMq6.d.ts → index-C8oil6M6.d.ts} +18 -196
  156. package/dist/{index-DKE1EATr.d.cts → index-CI3DprxP.d.cts} +18 -196
  157. package/dist/{index-AMWewNDe.d.cts → index-CO8uBlUh.d.cts} +33 -4
  158. package/dist/index-CxFrXH4m.d.ts +45 -0
  159. package/dist/index-D8wS_PeY.d.cts +121 -0
  160. package/dist/index-DO_6JN9Z.d.cts +127 -0
  161. package/dist/index-DVGiGFGT.d.cts +195 -0
  162. package/dist/index-DYme44FM.d.cts +44 -0
  163. package/dist/{index-J7Kc0oIQ.d.cts → index-DlLp-2Xn.d.cts} +3 -3
  164. package/dist/index-Dzk2hrlR.d.ts +44 -0
  165. package/dist/index-VHqptjhu.d.cts +45 -0
  166. package/dist/index-VdHQMPy1.d.ts +36 -0
  167. package/dist/index-Xi3u0HCQ.d.cts +36 -0
  168. package/dist/index-wEn0eFe8.d.ts +34 -0
  169. package/dist/index.cjs +1780 -176
  170. package/dist/index.cjs.map +1 -1
  171. package/dist/index.d.cts +784 -2082
  172. package/dist/index.d.ts +784 -2082
  173. package/dist/index.js +955 -4349
  174. package/dist/index.js.map +1 -1
  175. package/dist/memory-C6Z2tGpC.d.cts +139 -0
  176. package/dist/memory-li6FL5RM.d.ts +139 -0
  177. package/dist/messaging-Gt4LPbyA.d.cts +269 -0
  178. package/dist/messaging-XDoYablx.d.ts +269 -0
  179. package/dist/{meta-DWbkoq1s.d.cts → meta-BxCA7rcr.d.cts} +1 -1
  180. package/dist/{meta-CnkLA_43.d.ts → meta-CbznRPYJ.d.ts} +1 -1
  181. package/dist/{node-B-f-Lu-k.d.cts → node-BmerH3kS.d.cts} +26 -1
  182. package/dist/{node-B-f-Lu-k.d.ts → node-BmerH3kS.d.ts} +26 -1
  183. package/dist/{observable-uP-wy_uK.d.ts → observable-BgGUwcqp.d.ts} +1 -1
  184. package/dist/{observable-DBnrwcar.d.cts → observable-DJt_AxzQ.d.cts} +1 -1
  185. package/dist/patterns/ai.cjs +7930 -0
  186. package/dist/patterns/ai.cjs.map +1 -0
  187. package/dist/patterns/ai.d.cts +10 -0
  188. package/dist/patterns/ai.d.ts +10 -0
  189. package/dist/patterns/ai.js +71 -0
  190. package/dist/patterns/ai.js.map +1 -0
  191. package/dist/patterns/audit.cjs +5805 -0
  192. package/dist/patterns/audit.cjs.map +1 -0
  193. package/dist/patterns/audit.d.cts +6 -0
  194. package/dist/patterns/audit.d.ts +6 -0
  195. package/dist/patterns/audit.js +29 -0
  196. package/dist/patterns/audit.js.map +1 -0
  197. package/dist/patterns/demo-shell.cjs +5604 -0
  198. package/dist/patterns/demo-shell.cjs.map +1 -0
  199. package/dist/patterns/demo-shell.d.cts +6 -0
  200. package/dist/patterns/demo-shell.d.ts +6 -0
  201. package/dist/patterns/demo-shell.js +15 -0
  202. package/dist/patterns/demo-shell.js.map +1 -0
  203. package/dist/patterns/memory.cjs +5283 -0
  204. package/dist/patterns/memory.cjs.map +1 -0
  205. package/dist/patterns/memory.d.cts +5 -0
  206. package/dist/patterns/memory.d.ts +5 -0
  207. package/dist/patterns/memory.js +20 -0
  208. package/dist/patterns/memory.js.map +1 -0
  209. package/dist/patterns/reactive-layout/index.cjs +355 -13
  210. package/dist/patterns/reactive-layout/index.cjs.map +1 -1
  211. package/dist/patterns/reactive-layout/index.d.cts +6 -5
  212. package/dist/patterns/reactive-layout/index.d.ts +6 -5
  213. package/dist/patterns/reactive-layout/index.js +15 -12
  214. package/dist/reactive-layout-MQP--J3F.d.cts +183 -0
  215. package/dist/reactive-layout-u5Ulnqag.d.ts +183 -0
  216. package/dist/{storage-BuTdpCI1.d.cts → storage-CMjUUuxn.d.ts} +10 -2
  217. package/dist/{storage-F2X1U1x0.d.ts → storage-DdWlZo6U.d.cts} +10 -2
  218. package/dist/sugar-CCOxXK1e.d.ts +201 -0
  219. package/dist/sugar-D02n5JjF.d.cts +201 -0
  220. package/package.json +63 -3
  221. package/dist/chunk-5DJTTKX3.js.map +0 -1
  222. package/dist/chunk-IAHGTNOZ.js.map +0 -1
  223. package/dist/chunk-L2GLW2U7.js.map +0 -1
  224. package/dist/chunk-MW4VAKAO.js +0 -47
  225. package/dist/chunk-MW4VAKAO.js.map +0 -1
  226. package/dist/chunk-PY4XCDLR.js.map +0 -1
  227. package/dist/chunk-TKE3JGOH.js.map +0 -1
  228. package/dist/chunk-XOFWRC73.js.map +0 -1
  229. package/dist/index-BJB7t9gg.d.cts +0 -392
  230. package/dist/index-C-TXEa7C.d.ts +0 -392
  231. /package/dist/{chunk-H4RVA4VE.js.map → chunk-VYPWMZ6H.js.map} +0 -0
@@ -0,0 +1,1665 @@
1
+ import {
2
+ reactiveMap
3
+ } from "./chunk-WKNUIZOY.js";
4
+ import {
5
+ forEach,
6
+ fromAny
7
+ } from "./chunk-BVZYTZ5H.js";
8
+ import {
9
+ batch,
10
+ derived,
11
+ monotonicNs,
12
+ node,
13
+ producer,
14
+ state
15
+ } from "./chunk-PHOUUNK7.js";
16
+ import {
17
+ COMPLETE,
18
+ DATA,
19
+ DIRTY,
20
+ ERROR,
21
+ RESOLVED,
22
+ START
23
+ } from "./chunk-SX52TAR4.js";
24
+
25
+ // src/extra/backoff.ts
26
+ var NS_PER_MS = 1e6;
27
+ var NS_PER_SEC = 1e9;
28
+ function clampNonNegative(value) {
29
+ return value < 0 ? 0 : value;
30
+ }
31
+ function applyJitter(delay2, jitter) {
32
+ if (jitter === "none") return delay2;
33
+ if (jitter === "full") return Math.random() * delay2;
34
+ return delay2 / 2 + Math.random() * (delay2 / 2);
35
+ }
36
+ function randomBetween(min, max) {
37
+ return min + Math.random() * (max - min);
38
+ }
39
+ function constant(delayNs) {
40
+ const safe = clampNonNegative(delayNs);
41
+ return () => safe;
42
+ }
43
+ function linear(baseNs, stepNs) {
44
+ const safeBase = clampNonNegative(baseNs);
45
+ const safeStep = stepNs === void 0 ? safeBase : clampNonNegative(stepNs);
46
+ return (attempt) => safeBase + safeStep * Math.max(0, attempt);
47
+ }
48
+ function exponential(options) {
49
+ const baseNs = clampNonNegative(options?.baseNs ?? 100 * NS_PER_MS);
50
+ const factor = options?.factor !== void 0 && options.factor < 1 ? 1 : options?.factor ?? 2;
51
+ const maxDelayNs = clampNonNegative(options?.maxDelayNs ?? 30 * NS_PER_SEC);
52
+ const jitter = options?.jitter ?? "none";
53
+ return (attempt) => {
54
+ let delay2;
55
+ if (baseNs === 0) {
56
+ delay2 = 0;
57
+ } else if (factor === 1) {
58
+ delay2 = baseNs;
59
+ } else {
60
+ const capRatio = maxDelayNs / baseNs;
61
+ let growth = 1;
62
+ for (let i = 0; i < Math.max(0, attempt); i++) {
63
+ if (growth >= capRatio) {
64
+ growth = capRatio;
65
+ break;
66
+ }
67
+ growth *= factor;
68
+ }
69
+ delay2 = baseNs * growth;
70
+ if (delay2 > maxDelayNs) delay2 = maxDelayNs;
71
+ }
72
+ return applyJitter(delay2, jitter);
73
+ };
74
+ }
75
+ function fibonacci(baseNs = 100 * NS_PER_MS, maxDelayNs = 30 * NS_PER_SEC) {
76
+ const safeBase = clampNonNegative(baseNs);
77
+ const safeMax = clampNonNegative(maxDelayNs);
78
+ function fibUnit(attempt) {
79
+ if (attempt <= 0) return 1;
80
+ let prev = 1;
81
+ let cur = 2;
82
+ for (let i = 1; i < attempt; i++) {
83
+ const next = prev + cur;
84
+ prev = cur;
85
+ cur = next;
86
+ }
87
+ return cur;
88
+ }
89
+ return (attempt) => {
90
+ const raw = fibUnit(attempt) * safeBase;
91
+ return raw <= safeMax ? raw : safeMax;
92
+ };
93
+ }
94
+ function decorrelatedJitter(baseNs = 100 * NS_PER_MS, maxNs = 30 * NS_PER_SEC) {
95
+ return (_attempt, _error, prevDelayNs) => {
96
+ const last2 = prevDelayNs ?? baseNs;
97
+ const ceiling = Math.min(maxNs, last2 * 3);
98
+ return randomBetween(baseNs, ceiling);
99
+ };
100
+ }
101
+ function withMaxAttempts(strategy, maxAttempts) {
102
+ return (attempt, error, prevDelayNs) => {
103
+ if (attempt >= maxAttempts) return null;
104
+ return strategy(attempt, error, prevDelayNs);
105
+ };
106
+ }
107
+ function resolveBackoffPreset(name) {
108
+ if (name === "constant") return constant(1 * NS_PER_SEC);
109
+ if (name === "linear") return linear(1 * NS_PER_SEC);
110
+ if (name === "exponential") return exponential();
111
+ if (name === "fibonacci") return fibonacci();
112
+ if (name === "decorrelatedJitter") return decorrelatedJitter();
113
+ throw new Error(
114
+ `Unknown backoff preset: "${String(name)}". Use one of: constant, linear, exponential, fibonacci, decorrelatedJitter`
115
+ );
116
+ }
117
+
118
+ // src/extra/operators.ts
119
+ function operatorOpts(opts) {
120
+ return { describeKind: "derived", ...opts };
121
+ }
122
+ function map(source, project, opts) {
123
+ return node(
124
+ [source],
125
+ (data, a) => {
126
+ const batch0 = data[0];
127
+ if (batch0 == null || batch0.length === 0) {
128
+ a.down([[RESOLVED]]);
129
+ return;
130
+ }
131
+ for (const v of batch0) {
132
+ a.emit(project(v));
133
+ }
134
+ },
135
+ operatorOpts(opts)
136
+ );
137
+ }
138
+ function filter(source, predicate, opts) {
139
+ return node(
140
+ [source],
141
+ (data, a) => {
142
+ const batch0 = data[0];
143
+ if (batch0 == null || batch0.length === 0) {
144
+ a.down([[RESOLVED]]);
145
+ return;
146
+ }
147
+ let emitted = false;
148
+ for (const v of batch0) {
149
+ if (predicate(v)) {
150
+ a.emit(v);
151
+ emitted = true;
152
+ }
153
+ }
154
+ if (!emitted) a.down([[RESOLVED]]);
155
+ },
156
+ operatorOpts(opts)
157
+ );
158
+ }
159
+ function scan(source, reducer, seed, opts) {
160
+ return node(
161
+ [source],
162
+ (data, a, ctx) => {
163
+ if (!("acc" in ctx.store)) ctx.store.acc = seed;
164
+ const batch0 = data[0];
165
+ if (batch0 == null || batch0.length === 0) {
166
+ a.down([[RESOLVED]]);
167
+ return;
168
+ }
169
+ for (const v of batch0) {
170
+ ctx.store.acc = reducer(ctx.store.acc, v);
171
+ a.emit(ctx.store.acc);
172
+ }
173
+ },
174
+ { ...operatorOpts(opts), initial: seed, resetOnTeardown: true }
175
+ );
176
+ }
177
+ function reduce(source, reducer, seed, opts) {
178
+ return node(
179
+ [source],
180
+ (data, a, ctx) => {
181
+ if (!("acc" in ctx.store)) ctx.store.acc = seed;
182
+ if (ctx.terminalDeps[0] === true) {
183
+ a.emit(ctx.store.acc);
184
+ a.down([[COMPLETE]]);
185
+ return;
186
+ }
187
+ const batch0 = data[0];
188
+ if (batch0 == null || batch0.length === 0) {
189
+ a.down([[RESOLVED]]);
190
+ return;
191
+ }
192
+ for (const v of batch0) {
193
+ ctx.store.acc = reducer(ctx.store.acc, v);
194
+ }
195
+ },
196
+ {
197
+ ...operatorOpts(opts),
198
+ completeWhenDepsComplete: false
199
+ }
200
+ );
201
+ }
202
+ function take(source, count, opts) {
203
+ if (count <= 0) {
204
+ return node(
205
+ [source],
206
+ (_d, a, ctx) => {
207
+ if (ctx.store.completed) return;
208
+ ctx.store.completed = true;
209
+ a.down([[COMPLETE]]);
210
+ },
211
+ {
212
+ ...operatorOpts(opts),
213
+ completeWhenDepsComplete: false
214
+ }
215
+ );
216
+ }
217
+ return node(
218
+ [source],
219
+ (data, a, ctx) => {
220
+ if (!("taken" in ctx.store)) ctx.store.taken = 0;
221
+ if (ctx.store.done) {
222
+ a.down([[RESOLVED]]);
223
+ return;
224
+ }
225
+ if (ctx.terminalDeps[0] === true) {
226
+ ctx.store.done = true;
227
+ a.down([[COMPLETE]]);
228
+ return;
229
+ }
230
+ const batch0 = data[0];
231
+ if (batch0 == null || batch0.length === 0) {
232
+ a.down([[RESOLVED]]);
233
+ return;
234
+ }
235
+ for (const v of batch0) {
236
+ ctx.store.taken++;
237
+ a.emit(v);
238
+ if (ctx.store.taken >= count) {
239
+ ctx.store.done = true;
240
+ a.down([[COMPLETE]]);
241
+ return;
242
+ }
243
+ }
244
+ },
245
+ {
246
+ ...operatorOpts(opts),
247
+ completeWhenDepsComplete: false
248
+ }
249
+ );
250
+ }
251
+ function skip(source, count, opts) {
252
+ return node(
253
+ [source],
254
+ (data, a, ctx) => {
255
+ if (!("skipped" in ctx.store)) ctx.store.skipped = 0;
256
+ const batch0 = data[0];
257
+ if (batch0 == null || batch0.length === 0) {
258
+ a.down([[RESOLVED]]);
259
+ return;
260
+ }
261
+ let emitted = false;
262
+ for (const v of batch0) {
263
+ ctx.store.skipped++;
264
+ if (ctx.store.skipped <= count) {
265
+ } else {
266
+ a.emit(v);
267
+ emitted = true;
268
+ }
269
+ }
270
+ if (!emitted) a.down([[RESOLVED]]);
271
+ },
272
+ operatorOpts(opts)
273
+ );
274
+ }
275
+ function takeWhile(source, predicate, opts) {
276
+ return node(
277
+ [source],
278
+ (data, a, ctx) => {
279
+ if (ctx.store.done) {
280
+ a.down([[RESOLVED]]);
281
+ return;
282
+ }
283
+ const batch0 = data[0];
284
+ if (batch0 == null || batch0.length === 0) {
285
+ a.down([[RESOLVED]]);
286
+ return;
287
+ }
288
+ for (const v of batch0) {
289
+ if (!predicate(v)) {
290
+ ctx.store.done = true;
291
+ a.down([[COMPLETE]]);
292
+ return;
293
+ }
294
+ a.emit(v);
295
+ }
296
+ },
297
+ {
298
+ ...operatorOpts(opts),
299
+ completeWhenDepsComplete: false
300
+ }
301
+ );
302
+ }
303
+ function takeUntil(source, notifier, opts) {
304
+ const pred = opts?.predicate ?? ((m) => m[0] === DATA);
305
+ const { predicate: _, ...restOpts } = opts ?? {};
306
+ return producer(
307
+ (a) => {
308
+ let stopped = false;
309
+ const srcUnsub = source.subscribe((msgs) => {
310
+ if (stopped) return;
311
+ for (const m of msgs) {
312
+ if (stopped) return;
313
+ if (m[0] === DATA) a.emit(m[1]);
314
+ else if (m[0] === COMPLETE || m[0] === ERROR) {
315
+ stopped = true;
316
+ a.down([m]);
317
+ }
318
+ }
319
+ });
320
+ const notUnsub = notifier.subscribe((msgs) => {
321
+ if (stopped) return;
322
+ for (const m of msgs) {
323
+ if (stopped) return;
324
+ if (pred(m)) {
325
+ stopped = true;
326
+ a.down([[COMPLETE]]);
327
+ return;
328
+ }
329
+ }
330
+ });
331
+ return () => {
332
+ srcUnsub();
333
+ notUnsub();
334
+ };
335
+ },
336
+ operatorOpts(restOpts)
337
+ );
338
+ }
339
+ function first(source, opts) {
340
+ return take(source, 1, opts);
341
+ }
342
+ function last(source, options) {
343
+ const { defaultValue, ...rest } = options ?? {};
344
+ const useDefault = options != null && Object.hasOwn(options, "defaultValue");
345
+ return node(
346
+ [source],
347
+ (data, a, ctx) => {
348
+ if (ctx.terminalDeps[0] === true) {
349
+ if (ctx.store.has) {
350
+ a.emit(ctx.store.latest);
351
+ } else if (useDefault) {
352
+ a.emit(defaultValue);
353
+ }
354
+ a.down([[COMPLETE]]);
355
+ return;
356
+ }
357
+ const batch0 = data[0];
358
+ if (batch0 == null || batch0.length === 0) {
359
+ a.down([[RESOLVED]]);
360
+ return;
361
+ }
362
+ ctx.store.latest = batch0.at(-1);
363
+ ctx.store.has = true;
364
+ },
365
+ {
366
+ ...operatorOpts(rest),
367
+ completeWhenDepsComplete: false
368
+ }
369
+ );
370
+ }
371
+ function find(source, predicate, opts) {
372
+ return take(filter(source, predicate, opts), 1, opts);
373
+ }
374
+ function elementAt(source, index, opts) {
375
+ return take(skip(source, index, opts), 1, opts);
376
+ }
377
+ function tap(source, fnOrObserver, opts) {
378
+ if (typeof fnOrObserver === "function") {
379
+ return node(
380
+ [source],
381
+ (data, a) => {
382
+ const batch0 = data[0];
383
+ if (batch0 == null || batch0.length === 0) {
384
+ a.down([[RESOLVED]]);
385
+ return;
386
+ }
387
+ for (const v of batch0) {
388
+ fnOrObserver(v);
389
+ a.emit(v);
390
+ }
391
+ },
392
+ operatorOpts(opts)
393
+ );
394
+ }
395
+ const obs = fnOrObserver;
396
+ return node(
397
+ [source],
398
+ (data, a, ctx) => {
399
+ if (ctx.terminalDeps[0] !== void 0) {
400
+ if (ctx.terminalDeps[0] === true) {
401
+ obs.complete?.();
402
+ a.down([[COMPLETE]]);
403
+ } else {
404
+ obs.error?.(ctx.terminalDeps[0]);
405
+ a.down([[ERROR, ctx.terminalDeps[0]]]);
406
+ }
407
+ return;
408
+ }
409
+ const batch0 = data[0];
410
+ if (batch0 == null || batch0.length === 0) {
411
+ a.down([[RESOLVED]]);
412
+ return;
413
+ }
414
+ for (const v of batch0) {
415
+ obs.data?.(v);
416
+ a.emit(v);
417
+ }
418
+ },
419
+ {
420
+ ...operatorOpts(opts),
421
+ completeWhenDepsComplete: false
422
+ }
423
+ );
424
+ }
425
+ function distinctUntilChanged(source, equals = Object.is, opts) {
426
+ return node(
427
+ [source],
428
+ (data, a, ctx) => {
429
+ const batch0 = data[0];
430
+ if (batch0 == null || batch0.length === 0) {
431
+ a.down([[RESOLVED]]);
432
+ return;
433
+ }
434
+ let emitted = false;
435
+ for (const val of batch0) {
436
+ if (ctx.store.hasPrev && equals(ctx.store.prev, val)) {
437
+ } else {
438
+ ctx.store.prev = val;
439
+ ctx.store.hasPrev = true;
440
+ a.emit(val);
441
+ emitted = true;
442
+ }
443
+ }
444
+ if (!emitted) a.down([[RESOLVED]]);
445
+ },
446
+ operatorOpts(opts)
447
+ );
448
+ }
449
+ function pairwise(source, opts) {
450
+ return node(
451
+ [source],
452
+ (data, a, ctx) => {
453
+ const batch0 = data[0];
454
+ if (batch0 == null || batch0.length === 0) {
455
+ a.down([[RESOLVED]]);
456
+ return;
457
+ }
458
+ let emitted = false;
459
+ for (const x of batch0) {
460
+ if (!ctx.store.hasPrev) {
461
+ ctx.store.prev = x;
462
+ ctx.store.hasPrev = true;
463
+ } else {
464
+ const pair = [ctx.store.prev, x];
465
+ ctx.store.prev = x;
466
+ a.emit(pair);
467
+ emitted = true;
468
+ }
469
+ }
470
+ if (!emitted) a.down([[RESOLVED]]);
471
+ },
472
+ operatorOpts(opts)
473
+ );
474
+ }
475
+ function combine(...sources) {
476
+ const deps = [...sources];
477
+ return derived(deps, (vals) => vals, {
478
+ ...operatorOpts(),
479
+ equals: (a, b) => {
480
+ if (a.length !== b.length) return false;
481
+ for (let i = 0; i < a.length; i++) {
482
+ if (!Object.is(a[i], b[i])) return false;
483
+ }
484
+ return true;
485
+ }
486
+ });
487
+ }
488
+ function withLatestFrom(primary, secondary, opts) {
489
+ return node(
490
+ [primary, secondary],
491
+ (data, a, ctx) => {
492
+ const batch0 = data[0];
493
+ const batch1 = data[1];
494
+ const secondaryVal = batch1 != null && batch1.length > 0 ? batch1.at(-1) : ctx.prevData[1];
495
+ if (batch0 != null && batch0.length > 0) {
496
+ if (!(batch1 != null && batch1.length > 0) && ctx.prevData[1] === void 0) {
497
+ a.down([[RESOLVED]]);
498
+ return;
499
+ }
500
+ for (const v of batch0) {
501
+ a.emit([v, secondaryVal]);
502
+ }
503
+ } else {
504
+ a.down([[RESOLVED]]);
505
+ }
506
+ },
507
+ operatorOpts(opts)
508
+ );
509
+ }
510
+ function merge(...sources) {
511
+ if (sources.length === 0) {
512
+ return producer((a) => {
513
+ a.down([[COMPLETE]]);
514
+ }, operatorOpts());
515
+ }
516
+ return producer((a) => {
517
+ const n = sources.length;
518
+ let completed = 0;
519
+ const unsubs = [];
520
+ for (const src of sources) {
521
+ const u = src.subscribe((msgs) => {
522
+ for (const m of msgs) {
523
+ if (m[0] === DATA) {
524
+ a.emit(m[1]);
525
+ } else if (m[0] === COMPLETE) {
526
+ completed += 1;
527
+ if (completed >= n) {
528
+ a.down([[COMPLETE]]);
529
+ }
530
+ } else if (m[0] === ERROR) {
531
+ a.down([m]);
532
+ }
533
+ }
534
+ });
535
+ unsubs.push(u);
536
+ }
537
+ return () => {
538
+ for (const u of unsubs) u();
539
+ };
540
+ }, operatorOpts());
541
+ }
542
+ function zip(...sources) {
543
+ const n = sources.length;
544
+ if (n === 0) {
545
+ return producer((a) => {
546
+ a.emit([]);
547
+ a.down([[COMPLETE]]);
548
+ }, operatorOpts());
549
+ }
550
+ return producer((a) => {
551
+ const queues = Array.from({ length: n }, () => []);
552
+ let active = n;
553
+ function tryEmit() {
554
+ while (queues.every((q) => q.length > 0)) {
555
+ const tuple = queues.map((q) => q.shift());
556
+ a.emit(tuple);
557
+ }
558
+ }
559
+ const unsubs = [];
560
+ for (let i = 0; i < n; i++) {
561
+ const idx = i;
562
+ const u = sources[i].subscribe((msgs) => {
563
+ for (const m of msgs) {
564
+ if (m[0] === DATA) {
565
+ queues[idx].push(m[1]);
566
+ tryEmit();
567
+ } else if (m[0] === COMPLETE) {
568
+ active -= 1;
569
+ if (active === 0 || queues[idx].length === 0) {
570
+ a.down([[COMPLETE]]);
571
+ }
572
+ } else if (m[0] === ERROR) {
573
+ a.down([m]);
574
+ }
575
+ }
576
+ });
577
+ unsubs.push(u);
578
+ }
579
+ return () => {
580
+ for (const u of unsubs) u();
581
+ };
582
+ }, operatorOpts());
583
+ }
584
+ function concat(firstSrc, secondSrc, opts) {
585
+ return producer((a) => {
586
+ let phase = 0;
587
+ const pending = [];
588
+ let firstUnsub;
589
+ let secondUnsub;
590
+ secondUnsub = secondSrc.subscribe((msgs) => {
591
+ for (const m of msgs) {
592
+ if (phase === 0) {
593
+ if (m[0] === DATA) pending.push(m[1]);
594
+ else if (m[0] === ERROR) a.down([m]);
595
+ } else {
596
+ if (m[0] === DATA) a.emit(m[1]);
597
+ else if (m[0] === COMPLETE || m[0] === ERROR) a.down([m]);
598
+ }
599
+ }
600
+ });
601
+ firstUnsub = firstSrc.subscribe((msgs) => {
602
+ for (const m of msgs) {
603
+ if (phase === 0) {
604
+ if (m[0] === DATA) {
605
+ a.emit(m[1]);
606
+ } else if (m[0] === COMPLETE) {
607
+ phase = 1;
608
+ for (const v of pending) {
609
+ a.emit(v);
610
+ }
611
+ pending.length = 0;
612
+ } else if (m[0] === ERROR) {
613
+ a.down([m]);
614
+ }
615
+ }
616
+ }
617
+ });
618
+ return () => {
619
+ firstUnsub?.();
620
+ secondUnsub?.();
621
+ };
622
+ }, operatorOpts(opts));
623
+ }
624
+ function race(...sources) {
625
+ if (sources.length === 0) {
626
+ return producer((a) => {
627
+ a.down([[COMPLETE]]);
628
+ }, operatorOpts());
629
+ }
630
+ if (sources.length === 1) {
631
+ return node(
632
+ [sources[0]],
633
+ (data, a) => {
634
+ const batch0 = data[0];
635
+ if (batch0 == null || batch0.length === 0) {
636
+ a.down([[RESOLVED]]);
637
+ return;
638
+ }
639
+ for (const v of batch0) a.emit(v);
640
+ },
641
+ operatorOpts()
642
+ );
643
+ }
644
+ return producer((a) => {
645
+ let winner = null;
646
+ const unsubs = [];
647
+ for (let i = 0; i < sources.length; i++) {
648
+ const idx = i;
649
+ const u = sources[i].subscribe((msgs) => {
650
+ for (const m of msgs) {
651
+ if (winner !== null && idx !== winner) return;
652
+ if (m[0] === DATA) {
653
+ if (winner === null) winner = idx;
654
+ a.emit(m[1]);
655
+ } else if (m[0] === COMPLETE || m[0] === ERROR) {
656
+ if (winner === null || idx === winner) {
657
+ a.down([m]);
658
+ }
659
+ }
660
+ }
661
+ });
662
+ unsubs.push(u);
663
+ }
664
+ return () => {
665
+ for (const u of unsubs) u();
666
+ };
667
+ }, operatorOpts());
668
+ }
669
+ function forwardInner(inner, a, onInnerComplete) {
670
+ let unsub;
671
+ let finished = false;
672
+ const finish = () => {
673
+ if (finished) return;
674
+ finished = true;
675
+ onInnerComplete();
676
+ };
677
+ unsub = inner.subscribe((msgs) => {
678
+ let sawComplete = false;
679
+ let sawError = false;
680
+ for (const m of msgs) {
681
+ if (m[0] === START) continue;
682
+ if (m[0] === DATA) {
683
+ a.emit(m[1]);
684
+ } else if (m[0] === COMPLETE) {
685
+ sawComplete = true;
686
+ } else if (m[0] === ERROR) {
687
+ sawError = true;
688
+ a.down([m]);
689
+ } else if (m[0] === DIRTY || m[0] === RESOLVED) {
690
+ a.down([m]);
691
+ }
692
+ }
693
+ if (sawError) {
694
+ unsub?.();
695
+ unsub = void 0;
696
+ finish();
697
+ } else if (sawComplete) {
698
+ finish();
699
+ }
700
+ });
701
+ return () => {
702
+ unsub?.();
703
+ unsub = void 0;
704
+ };
705
+ }
706
+ function switchMap(source, project, opts) {
707
+ let innerUnsub;
708
+ let sourceDone = false;
709
+ function clearInner() {
710
+ innerUnsub?.();
711
+ innerUnsub = void 0;
712
+ }
713
+ return node(
714
+ [source],
715
+ (data, a, ctx) => {
716
+ if (ctx.terminalDeps[0] != null && ctx.terminalDeps[0] !== true) {
717
+ clearInner();
718
+ return;
719
+ }
720
+ if (ctx.terminalDeps[0] === true) {
721
+ sourceDone = true;
722
+ if (!innerUnsub) a.down([[COMPLETE]]);
723
+ return;
724
+ }
725
+ const batch0 = data[0];
726
+ if (batch0 == null || batch0.length === 0) return;
727
+ clearInner();
728
+ innerUnsub = forwardInner(fromAny(project(batch0[batch0.length - 1])), a, () => {
729
+ clearInner();
730
+ if (sourceDone) a.down([[COMPLETE]]);
731
+ });
732
+ return {
733
+ deactivation: () => {
734
+ clearInner();
735
+ sourceDone = false;
736
+ }
737
+ };
738
+ },
739
+ { ...operatorOpts(opts), completeWhenDepsComplete: false }
740
+ );
741
+ }
742
+ function exhaustMap(source, project, opts) {
743
+ let innerUnsub;
744
+ let sourceDone = false;
745
+ function clearInner() {
746
+ innerUnsub?.();
747
+ innerUnsub = void 0;
748
+ }
749
+ return node(
750
+ [source],
751
+ (data, a, ctx) => {
752
+ if (ctx.terminalDeps[0] != null && ctx.terminalDeps[0] !== true) {
753
+ clearInner();
754
+ return;
755
+ }
756
+ if (ctx.terminalDeps[0] === true) {
757
+ sourceDone = true;
758
+ if (!innerUnsub) a.down([[COMPLETE]]);
759
+ return;
760
+ }
761
+ const batch0 = data[0];
762
+ if (batch0 == null || batch0.length === 0) return;
763
+ if (innerUnsub === void 0) {
764
+ innerUnsub = forwardInner(fromAny(project(batch0[0])), a, () => {
765
+ clearInner();
766
+ if (sourceDone) a.down([[COMPLETE]]);
767
+ });
768
+ } else {
769
+ a.down([[RESOLVED]]);
770
+ }
771
+ return {
772
+ deactivation: () => {
773
+ clearInner();
774
+ sourceDone = false;
775
+ }
776
+ };
777
+ },
778
+ { ...operatorOpts(opts), completeWhenDepsComplete: false }
779
+ );
780
+ }
781
+ function concatMap(source, project, opts) {
782
+ const { maxBuffer: maxBuf, ...concatNodeOpts } = opts ?? {};
783
+ const queue = [];
784
+ let innerUnsub;
785
+ let sourceDone = false;
786
+ let actions;
787
+ function clearInner() {
788
+ innerUnsub?.();
789
+ innerUnsub = void 0;
790
+ }
791
+ function tryPump() {
792
+ if (!actions || innerUnsub !== void 0) return;
793
+ if (queue.length === 0) {
794
+ if (sourceDone) actions.down([[COMPLETE]]);
795
+ return;
796
+ }
797
+ const v = queue.shift();
798
+ innerUnsub = forwardInner(fromAny(project(v)), actions, () => {
799
+ clearInner();
800
+ tryPump();
801
+ });
802
+ }
803
+ function enqueue(v) {
804
+ if (maxBuf && maxBuf > 0 && queue.length >= maxBuf) queue.shift();
805
+ queue.push(v);
806
+ tryPump();
807
+ }
808
+ return node(
809
+ [source],
810
+ (data, a, ctx) => {
811
+ actions = a;
812
+ if (ctx.terminalDeps[0] != null && ctx.terminalDeps[0] !== true) {
813
+ clearInner();
814
+ queue.length = 0;
815
+ return;
816
+ }
817
+ if (ctx.terminalDeps[0] === true) {
818
+ sourceDone = true;
819
+ tryPump();
820
+ return;
821
+ }
822
+ const batch0 = data[0];
823
+ if (batch0 == null || batch0.length === 0) return;
824
+ for (const v of batch0) {
825
+ enqueue(v);
826
+ }
827
+ return {
828
+ deactivation: () => {
829
+ clearInner();
830
+ queue.length = 0;
831
+ sourceDone = false;
832
+ }
833
+ };
834
+ },
835
+ { ...operatorOpts(concatNodeOpts), completeWhenDepsComplete: false }
836
+ );
837
+ }
838
+ function mergeMap(source, project, opts) {
839
+ const { concurrent: concurrentOpt, ...mergeNodeOpts } = opts ?? {};
840
+ const maxConcurrent = concurrentOpt != null && concurrentOpt > 0 ? concurrentOpt : Number.POSITIVE_INFINITY;
841
+ let active = 0;
842
+ let sourceDone = false;
843
+ const innerStops = /* @__PURE__ */ new Set();
844
+ const buffer2 = [];
845
+ let actions;
846
+ function tryComplete() {
847
+ if (sourceDone && active === 0 && buffer2.length === 0 && actions) {
848
+ actions.down([[COMPLETE]]);
849
+ }
850
+ }
851
+ function spawn(v) {
852
+ if (!actions) return;
853
+ active++;
854
+ let stop;
855
+ stop = forwardInner(fromAny(project(v)), actions, () => {
856
+ if (stop) innerStops.delete(stop);
857
+ active--;
858
+ drainBuffer();
859
+ tryComplete();
860
+ });
861
+ innerStops.add(stop);
862
+ }
863
+ function drainBuffer() {
864
+ while (buffer2.length > 0 && active < maxConcurrent) {
865
+ spawn(buffer2.shift());
866
+ }
867
+ }
868
+ function enqueue(v) {
869
+ if (active < maxConcurrent) spawn(v);
870
+ else buffer2.push(v);
871
+ }
872
+ function clearAll() {
873
+ for (const u of innerStops) u();
874
+ innerStops.clear();
875
+ active = 0;
876
+ buffer2.length = 0;
877
+ }
878
+ return node(
879
+ [source],
880
+ (data, a, ctx) => {
881
+ actions = a;
882
+ if (ctx.terminalDeps[0] != null && ctx.terminalDeps[0] !== true) {
883
+ clearAll();
884
+ return;
885
+ }
886
+ if (ctx.terminalDeps[0] === true) {
887
+ sourceDone = true;
888
+ tryComplete();
889
+ return;
890
+ }
891
+ const batch0 = data[0];
892
+ if (batch0 == null || batch0.length === 0) return;
893
+ for (const v of batch0) {
894
+ enqueue(v);
895
+ }
896
+ return {
897
+ deactivation: () => {
898
+ clearAll();
899
+ sourceDone = false;
900
+ }
901
+ };
902
+ },
903
+ { ...operatorOpts(mergeNodeOpts), completeWhenDepsComplete: false }
904
+ );
905
+ }
906
+ var flatMap = mergeMap;
907
+ function delay(source, ms, opts) {
908
+ return producer((a) => {
909
+ const timers = /* @__PURE__ */ new Set();
910
+ function clearAll() {
911
+ for (const id of timers) clearTimeout(id);
912
+ timers.clear();
913
+ }
914
+ const srcUnsub = source.subscribe((msgs) => {
915
+ for (const m of msgs) {
916
+ if (m[0] === DATA) {
917
+ const id = setTimeout(() => {
918
+ timers.delete(id);
919
+ a.emit(m[1]);
920
+ }, ms);
921
+ timers.add(id);
922
+ } else if (m[0] === COMPLETE) {
923
+ const id = setTimeout(() => {
924
+ timers.delete(id);
925
+ a.down([[COMPLETE]]);
926
+ }, ms);
927
+ timers.add(id);
928
+ } else if (m[0] === ERROR) {
929
+ clearAll();
930
+ a.down([m]);
931
+ }
932
+ }
933
+ });
934
+ return () => {
935
+ srcUnsub();
936
+ clearAll();
937
+ };
938
+ }, operatorOpts(opts));
939
+ }
940
+ function debounce(source, ms, opts) {
941
+ return producer((a) => {
942
+ let timer;
943
+ let pending;
944
+ function clearTimer() {
945
+ if (timer !== void 0) {
946
+ clearTimeout(timer);
947
+ timer = void 0;
948
+ }
949
+ }
950
+ const srcUnsub = source.subscribe((msgs) => {
951
+ for (const m of msgs) {
952
+ if (m[0] === DATA) {
953
+ clearTimer();
954
+ pending = m[1];
955
+ timer = setTimeout(() => {
956
+ timer = void 0;
957
+ a.emit(pending);
958
+ }, ms);
959
+ } else if (m[0] === COMPLETE) {
960
+ if (timer !== void 0) {
961
+ clearTimer();
962
+ a.emit(pending);
963
+ }
964
+ a.down([[COMPLETE]]);
965
+ } else if (m[0] === ERROR) {
966
+ clearTimer();
967
+ a.down([m]);
968
+ }
969
+ }
970
+ });
971
+ return () => {
972
+ srcUnsub();
973
+ clearTimer();
974
+ };
975
+ }, operatorOpts(opts));
976
+ }
977
+ function throttle(source, ms, opts) {
978
+ const { leading: leadingOpt, trailing: trailingOpt, ...throttleNodeOpts } = opts ?? {};
979
+ const leading = leadingOpt !== false;
980
+ const trailing = trailingOpt === true;
981
+ const windowNs = ms * NS_PER_MS;
982
+ return producer((a) => {
983
+ let timer;
984
+ let lastEmitNs = -Infinity;
985
+ let pending;
986
+ let hasPending = false;
987
+ function clearTimer() {
988
+ if (timer !== void 0) {
989
+ clearTimeout(timer);
990
+ timer = void 0;
991
+ }
992
+ }
993
+ const srcUnsub = source.subscribe((msgs) => {
994
+ for (const m of msgs) {
995
+ if (m[0] === DATA) {
996
+ const v = m[1];
997
+ const nowNs = monotonicNs();
998
+ if (leading && nowNs - lastEmitNs >= windowNs) {
999
+ lastEmitNs = nowNs;
1000
+ a.emit(v);
1001
+ clearTimer();
1002
+ if (trailing) {
1003
+ timer = setTimeout(() => {
1004
+ timer = void 0;
1005
+ if (hasPending) {
1006
+ lastEmitNs = monotonicNs();
1007
+ a.emit(pending);
1008
+ hasPending = false;
1009
+ }
1010
+ }, ms);
1011
+ }
1012
+ } else if (trailing) {
1013
+ pending = v;
1014
+ hasPending = true;
1015
+ if (timer === void 0) {
1016
+ const elapsedMs = (nowNs - lastEmitNs) / NS_PER_MS;
1017
+ timer = setTimeout(
1018
+ () => {
1019
+ timer = void 0;
1020
+ if (hasPending) {
1021
+ lastEmitNs = monotonicNs();
1022
+ a.emit(pending);
1023
+ hasPending = false;
1024
+ }
1025
+ },
1026
+ Math.max(0, ms - elapsedMs)
1027
+ );
1028
+ }
1029
+ }
1030
+ } else if (m[0] === COMPLETE || m[0] === ERROR) {
1031
+ clearTimer();
1032
+ a.down([m]);
1033
+ }
1034
+ }
1035
+ });
1036
+ return () => {
1037
+ srcUnsub();
1038
+ clearTimer();
1039
+ };
1040
+ }, operatorOpts(throttleNodeOpts));
1041
+ }
1042
+ function sample(source, notifier, opts) {
1043
+ return producer((a) => {
1044
+ let lastSourceValue;
1045
+ let terminated = false;
1046
+ let sourceCompleted = false;
1047
+ const srcUnsub = source.subscribe((msgs) => {
1048
+ if (terminated) return;
1049
+ for (const m of msgs) {
1050
+ if (terminated) return;
1051
+ if (m[0] === DATA) {
1052
+ lastSourceValue = { v: m[1] };
1053
+ } else if (m[0] === ERROR) {
1054
+ terminated = true;
1055
+ a.down([m]);
1056
+ } else if (m[0] === COMPLETE) {
1057
+ sourceCompleted = true;
1058
+ lastSourceValue = void 0;
1059
+ }
1060
+ }
1061
+ });
1062
+ const notUnsub = notifier.subscribe((msgs) => {
1063
+ if (terminated) return;
1064
+ for (const m of msgs) {
1065
+ if (terminated) return;
1066
+ if (m[0] === DATA) {
1067
+ if (lastSourceValue !== void 0 && !sourceCompleted) {
1068
+ a.emit(lastSourceValue.v);
1069
+ }
1070
+ } else if (m[0] === ERROR) {
1071
+ terminated = true;
1072
+ a.down([m]);
1073
+ } else if (m[0] === COMPLETE) {
1074
+ terminated = true;
1075
+ a.down([[COMPLETE]]);
1076
+ }
1077
+ }
1078
+ });
1079
+ return () => {
1080
+ srcUnsub();
1081
+ notUnsub();
1082
+ };
1083
+ }, operatorOpts(opts));
1084
+ }
1085
+ function audit(source, ms, opts) {
1086
+ return producer((a) => {
1087
+ let timer;
1088
+ let latest;
1089
+ let has = false;
1090
+ function clearTimer() {
1091
+ if (timer !== void 0) {
1092
+ clearTimeout(timer);
1093
+ timer = void 0;
1094
+ }
1095
+ }
1096
+ const srcUnsub = source.subscribe((msgs) => {
1097
+ for (const m of msgs) {
1098
+ if (m[0] === DATA) {
1099
+ latest = m[1];
1100
+ has = true;
1101
+ clearTimer();
1102
+ timer = setTimeout(() => {
1103
+ timer = void 0;
1104
+ if (has) {
1105
+ has = false;
1106
+ a.emit(latest);
1107
+ }
1108
+ }, ms);
1109
+ } else if (m[0] === COMPLETE || m[0] === ERROR) {
1110
+ clearTimer();
1111
+ a.down([m]);
1112
+ }
1113
+ }
1114
+ });
1115
+ return () => {
1116
+ srcUnsub();
1117
+ clearTimer();
1118
+ };
1119
+ }, operatorOpts(opts));
1120
+ }
1121
+ function buffer(source, notifier, opts) {
1122
+ return producer((a) => {
1123
+ const buf = [];
1124
+ const srcUnsub = source.subscribe((msgs) => {
1125
+ for (const m of msgs) {
1126
+ if (m[0] === DATA) {
1127
+ buf.push(m[1]);
1128
+ } else if (m[0] === COMPLETE) {
1129
+ if (buf.length > 0) a.emit([...buf]);
1130
+ buf.length = 0;
1131
+ a.down([[COMPLETE]]);
1132
+ } else if (m[0] === ERROR) {
1133
+ a.down([m]);
1134
+ }
1135
+ }
1136
+ });
1137
+ const notUnsub = notifier.subscribe((msgs) => {
1138
+ for (const m of msgs) {
1139
+ if (m[0] === DATA) {
1140
+ if (buf.length > 0) {
1141
+ a.emit([...buf]);
1142
+ buf.length = 0;
1143
+ }
1144
+ } else if (m[0] === COMPLETE) {
1145
+ a.down([[COMPLETE]]);
1146
+ } else if (m[0] === ERROR) {
1147
+ a.down([m]);
1148
+ }
1149
+ }
1150
+ });
1151
+ return () => {
1152
+ srcUnsub();
1153
+ notUnsub();
1154
+ buf.length = 0;
1155
+ };
1156
+ }, operatorOpts(opts));
1157
+ }
1158
+ function bufferCount(source, count, opts) {
1159
+ if (count <= 0) throw new RangeError("bufferCount expects count > 0");
1160
+ return producer((a) => {
1161
+ const buf = [];
1162
+ const srcUnsub = source.subscribe((msgs) => {
1163
+ for (const m of msgs) {
1164
+ if (m[0] === DATA) {
1165
+ buf.push(m[1]);
1166
+ if (buf.length >= count) {
1167
+ a.emit(buf.splice(0, buf.length));
1168
+ }
1169
+ } else if (m[0] === COMPLETE) {
1170
+ if (buf.length > 0) a.emit([...buf]);
1171
+ buf.length = 0;
1172
+ a.down([[COMPLETE]]);
1173
+ } else if (m[0] === ERROR) {
1174
+ a.down([m]);
1175
+ }
1176
+ }
1177
+ });
1178
+ return () => {
1179
+ srcUnsub();
1180
+ buf.length = 0;
1181
+ };
1182
+ }, operatorOpts(opts));
1183
+ }
1184
+ function windowCount(source, count, opts) {
1185
+ if (count <= 0) throw new RangeError("windowCount expects count > 0");
1186
+ return producer((a) => {
1187
+ let winDown;
1188
+ let n = 0;
1189
+ function openWindow() {
1190
+ const s = producer((actions) => {
1191
+ winDown = actions.down.bind(actions);
1192
+ return () => {
1193
+ winDown = void 0;
1194
+ };
1195
+ }, operatorOpts());
1196
+ n = 0;
1197
+ a.emit(s);
1198
+ }
1199
+ const srcUnsub = source.subscribe((msgs) => {
1200
+ for (const m of msgs) {
1201
+ if (m[0] === DATA) {
1202
+ if (!winDown) openWindow();
1203
+ winDown?.([[DATA, m[1]]]);
1204
+ n += 1;
1205
+ if (n >= count) {
1206
+ winDown?.([[COMPLETE]]);
1207
+ winDown = void 0;
1208
+ }
1209
+ } else if (m[0] === COMPLETE) {
1210
+ winDown?.([[COMPLETE]]);
1211
+ winDown = void 0;
1212
+ a.down([[COMPLETE]]);
1213
+ } else if (m[0] === ERROR) {
1214
+ winDown?.([m]);
1215
+ winDown = void 0;
1216
+ a.down([m]);
1217
+ }
1218
+ }
1219
+ });
1220
+ return () => {
1221
+ srcUnsub();
1222
+ winDown?.([[COMPLETE]]);
1223
+ winDown = void 0;
1224
+ };
1225
+ }, operatorOpts(opts));
1226
+ }
1227
+ function bufferTime(source, ms, opts) {
1228
+ return producer((a) => {
1229
+ const buf = [];
1230
+ const iv = setInterval(() => {
1231
+ if (buf.length > 0) {
1232
+ a.emit([...buf]);
1233
+ buf.length = 0;
1234
+ }
1235
+ }, ms);
1236
+ const srcUnsub = source.subscribe((msgs) => {
1237
+ for (const m of msgs) {
1238
+ if (m[0] === DATA) {
1239
+ buf.push(m[1]);
1240
+ } else if (m[0] === COMPLETE) {
1241
+ clearInterval(iv);
1242
+ if (buf.length > 0) a.emit([...buf]);
1243
+ buf.length = 0;
1244
+ a.down([[COMPLETE]]);
1245
+ } else if (m[0] === ERROR) {
1246
+ clearInterval(iv);
1247
+ a.down([m]);
1248
+ }
1249
+ }
1250
+ });
1251
+ return () => {
1252
+ srcUnsub();
1253
+ clearInterval(iv);
1254
+ buf.length = 0;
1255
+ };
1256
+ }, operatorOpts(opts));
1257
+ }
1258
+ function windowTime(source, ms, opts) {
1259
+ return producer((a) => {
1260
+ let winDown;
1261
+ function closeWindow() {
1262
+ winDown?.([[COMPLETE]]);
1263
+ winDown = void 0;
1264
+ }
1265
+ function openWindow() {
1266
+ const s = producer((actions) => {
1267
+ winDown = actions.down.bind(actions);
1268
+ return () => {
1269
+ winDown = void 0;
1270
+ };
1271
+ }, operatorOpts());
1272
+ a.emit(s);
1273
+ }
1274
+ openWindow();
1275
+ const iv = setInterval(() => {
1276
+ closeWindow();
1277
+ openWindow();
1278
+ }, ms);
1279
+ const srcUnsub = source.subscribe((msgs) => {
1280
+ for (const m of msgs) {
1281
+ if (m[0] === DATA) {
1282
+ winDown?.([[DATA, m[1]]]);
1283
+ } else if (m[0] === COMPLETE) {
1284
+ clearInterval(iv);
1285
+ closeWindow();
1286
+ a.down([[COMPLETE]]);
1287
+ } else if (m[0] === ERROR) {
1288
+ clearInterval(iv);
1289
+ winDown?.([m]);
1290
+ closeWindow();
1291
+ a.down([m]);
1292
+ }
1293
+ }
1294
+ });
1295
+ return () => {
1296
+ srcUnsub();
1297
+ clearInterval(iv);
1298
+ closeWindow();
1299
+ };
1300
+ }, operatorOpts(opts));
1301
+ }
1302
+ function window(source, notifier, opts) {
1303
+ return producer((a) => {
1304
+ let winDown;
1305
+ function closeWindow() {
1306
+ winDown?.([[COMPLETE]]);
1307
+ winDown = void 0;
1308
+ }
1309
+ function openWindow() {
1310
+ const s = producer((actions) => {
1311
+ winDown = actions.down.bind(actions);
1312
+ return () => {
1313
+ winDown = void 0;
1314
+ };
1315
+ }, operatorOpts());
1316
+ a.emit(s);
1317
+ }
1318
+ const srcUnsub = source.subscribe((msgs) => {
1319
+ for (const m of msgs) {
1320
+ if (m[0] === DATA) {
1321
+ if (!winDown) openWindow();
1322
+ winDown?.([[DATA, m[1]]]);
1323
+ } else if (m[0] === COMPLETE) {
1324
+ closeWindow();
1325
+ a.down([[COMPLETE]]);
1326
+ } else if (m[0] === ERROR) {
1327
+ winDown?.([m]);
1328
+ winDown = void 0;
1329
+ a.down([m]);
1330
+ }
1331
+ }
1332
+ });
1333
+ const notUnsub = notifier.subscribe((msgs) => {
1334
+ for (const m of msgs) {
1335
+ if (m[0] === DATA) {
1336
+ closeWindow();
1337
+ openWindow();
1338
+ }
1339
+ }
1340
+ });
1341
+ return () => {
1342
+ srcUnsub();
1343
+ notUnsub();
1344
+ closeWindow();
1345
+ };
1346
+ }, operatorOpts(opts));
1347
+ }
1348
+ function interval(periodMs, opts) {
1349
+ return producer((a, ctx) => {
1350
+ if (!("n" in ctx.store)) ctx.store.n = 0;
1351
+ const id = setInterval(() => {
1352
+ a.emit(ctx.store.n);
1353
+ ctx.store.n = ctx.store.n + 1;
1354
+ }, periodMs);
1355
+ return () => clearInterval(id);
1356
+ }, operatorOpts(opts));
1357
+ }
1358
+ function repeat(source, count, opts) {
1359
+ if (count <= 0) throw new RangeError("repeat expects count > 0");
1360
+ return producer((a) => {
1361
+ let remaining = count;
1362
+ let innerU;
1363
+ const start = () => {
1364
+ innerU?.();
1365
+ innerU = source.subscribe((msgs) => {
1366
+ let completed = false;
1367
+ const fwd = [];
1368
+ for (const m of msgs) {
1369
+ if (m[0] === COMPLETE) completed = true;
1370
+ else fwd.push(m);
1371
+ }
1372
+ if (fwd.length > 0) a.down(fwd);
1373
+ if (completed) {
1374
+ innerU?.();
1375
+ innerU = void 0;
1376
+ remaining -= 1;
1377
+ if (remaining > 0) start();
1378
+ else a.down([[COMPLETE]]);
1379
+ }
1380
+ });
1381
+ };
1382
+ start();
1383
+ return () => {
1384
+ innerU?.();
1385
+ };
1386
+ }, operatorOpts(opts));
1387
+ }
1388
+ function pausable(source, opts) {
1389
+ return node(
1390
+ [source],
1391
+ (data, a) => {
1392
+ const batch0 = data[0];
1393
+ if (batch0 == null || batch0.length === 0) {
1394
+ a.down([[RESOLVED]]);
1395
+ return;
1396
+ }
1397
+ for (const v of batch0) a.emit(v);
1398
+ },
1399
+ operatorOpts(opts)
1400
+ );
1401
+ }
1402
+ function rescue(source, recover, opts) {
1403
+ return producer((a) => {
1404
+ const srcUnsub = source.subscribe((msgs) => {
1405
+ for (const m of msgs) {
1406
+ if (m[0] === DATA) {
1407
+ a.emit(m[1]);
1408
+ } else if (m[0] === ERROR) {
1409
+ try {
1410
+ a.emit(recover(m[1]));
1411
+ } catch (recoverErr) {
1412
+ a.down([[ERROR, recoverErr]]);
1413
+ }
1414
+ } else if (m[0] === COMPLETE) {
1415
+ a.down([[COMPLETE]]);
1416
+ }
1417
+ }
1418
+ });
1419
+ return () => {
1420
+ srcUnsub();
1421
+ };
1422
+ }, operatorOpts(opts));
1423
+ }
1424
+ function valve(source, control, opts) {
1425
+ return node(
1426
+ [source, control],
1427
+ (data, a, ctx) => {
1428
+ const batch1 = data[1];
1429
+ const controlValue = batch1 != null && batch1.length > 0 ? batch1.at(-1) : ctx.prevData[1];
1430
+ if (!controlValue) {
1431
+ a.down([[RESOLVED]]);
1432
+ return;
1433
+ }
1434
+ const batch0 = data[0];
1435
+ if (batch0 != null && batch0.length > 0) {
1436
+ for (const v of batch0) a.emit(v);
1437
+ return;
1438
+ }
1439
+ if (batch1 != null && batch1.length > 0 && ctx.prevData[0] !== void 0) {
1440
+ a.emit(ctx.prevData[0]);
1441
+ return;
1442
+ }
1443
+ a.down([[RESOLVED]]);
1444
+ },
1445
+ operatorOpts(opts)
1446
+ );
1447
+ }
1448
+ var combineLatest = combine;
1449
+ var debounceTime = debounce;
1450
+ var throttleTime = throttle;
1451
+ var catchError = rescue;
1452
+
1453
+ // src/extra/composite.ts
1454
+ function isNodeLike(value) {
1455
+ return typeof value === "object" && value !== null && "cache" in value && typeof value.subscribe === "function";
1456
+ }
1457
+ function verifiable(source, verifyFn, opts) {
1458
+ const sourceNode = fromAny(source);
1459
+ const hasSourceVersioning = sourceNode.v != null;
1460
+ const verified = state(opts?.initialVerified ?? null, {
1461
+ ...hasSourceVersioning ? { meta: { sourceVersion: null } } : {}
1462
+ });
1463
+ const hasTrigger = opts?.trigger !== void 0 && opts.trigger !== null;
1464
+ let triggerNode = null;
1465
+ if (hasTrigger && opts?.autoVerify) {
1466
+ triggerNode = merge(fromAny(opts.trigger), sourceNode);
1467
+ } else if (hasTrigger) {
1468
+ triggerNode = fromAny(opts.trigger);
1469
+ } else if (opts?.autoVerify) {
1470
+ triggerNode = sourceNode;
1471
+ }
1472
+ if (triggerNode !== null) {
1473
+ let verifyStream;
1474
+ if (triggerNode === sourceNode) {
1475
+ verifyStream = switchMap(sourceNode, (src) => verifyFn(src));
1476
+ } else {
1477
+ let latestSource = sourceNode.cache;
1478
+ sourceNode.subscribe((msgs) => {
1479
+ for (const m of msgs) {
1480
+ if (m[0] === DATA) latestSource = m[1];
1481
+ }
1482
+ });
1483
+ verifyStream = switchMap(triggerNode, () => verifyFn(latestSource));
1484
+ }
1485
+ forEach(verifyStream, (value) => {
1486
+ batch(() => {
1487
+ verified.down([[DATA, value]]);
1488
+ if (hasSourceVersioning) {
1489
+ const sv = sourceNode.v;
1490
+ if (sv != null) {
1491
+ verified.meta.sourceVersion.down([[DATA, { id: sv.id, version: sv.version }]]);
1492
+ }
1493
+ }
1494
+ });
1495
+ });
1496
+ }
1497
+ return { node: sourceNode, verified, trigger: triggerNode };
1498
+ }
1499
+ function keepalive(node2) {
1500
+ node2.subscribe(() => void 0);
1501
+ }
1502
+ function mapFromSnapshot(snapshot) {
1503
+ if (snapshot instanceof Map) return snapshot;
1504
+ return /* @__PURE__ */ new Map();
1505
+ }
1506
+ function applyExtraction(store, extraction) {
1507
+ if (!Array.isArray(extraction.upsert)) {
1508
+ throw new TypeError("distill extraction requires upsert: Array<{ key, value }>");
1509
+ }
1510
+ batch(() => {
1511
+ for (const { key, value } of extraction.upsert) {
1512
+ store.set(key, value);
1513
+ }
1514
+ for (const key of extraction.remove ?? []) {
1515
+ store.delete(key);
1516
+ }
1517
+ });
1518
+ }
1519
+ function distill(source, extractFn, opts) {
1520
+ const sourceNode = fromAny(source);
1521
+ const store = reactiveMap(opts.mapOptions ?? {});
1522
+ const budget = opts.budget ?? 2e3;
1523
+ const hasContext = opts.context !== void 0 && opts.context !== null;
1524
+ const contextNode = hasContext ? fromAny(opts.context) : state(null);
1525
+ let latestStore = mapFromSnapshot(store.entries.cache);
1526
+ store.entries.subscribe((msgs) => {
1527
+ for (const m of msgs) {
1528
+ if (m[0] === DATA) latestStore = mapFromSnapshot(m[1]);
1529
+ }
1530
+ });
1531
+ const extractionStream = switchMap(sourceNode, (raw) => extractFn(raw, latestStore));
1532
+ forEach(extractionStream, (extraction) => {
1533
+ applyExtraction(store, extraction);
1534
+ });
1535
+ if (opts.evict) {
1536
+ const verdictUnsubs = /* @__PURE__ */ new Map();
1537
+ const evictionKeys = derived([store.entries], ([snapshot]) => {
1538
+ const out = [];
1539
+ const entries = mapFromSnapshot(snapshot);
1540
+ for (const key of verdictUnsubs.keys()) {
1541
+ if (!entries.has(key)) {
1542
+ verdictUnsubs.get(key)();
1543
+ verdictUnsubs.delete(key);
1544
+ }
1545
+ }
1546
+ for (const [key, mem] of entries) {
1547
+ const verdict = opts.evict(key, mem);
1548
+ if (isNodeLike(verdict)) {
1549
+ if (!verdictUnsubs.has(key)) {
1550
+ const unsub = forEach(verdict, (val) => {
1551
+ if (val === true && store.has(key)) {
1552
+ store.delete(key);
1553
+ }
1554
+ });
1555
+ verdictUnsubs.set(key, unsub);
1556
+ }
1557
+ continue;
1558
+ }
1559
+ if (typeof verdict === "boolean") {
1560
+ if (verdict) out.push(key);
1561
+ continue;
1562
+ }
1563
+ throw new TypeError("distill evict() must return boolean or Node<boolean>");
1564
+ }
1565
+ return out;
1566
+ });
1567
+ forEach(evictionKeys, (keys) => {
1568
+ for (const key of keys) store.delete(key);
1569
+ });
1570
+ }
1571
+ const hasConsolidateTrigger = opts.consolidateTrigger !== void 0 && opts.consolidateTrigger !== null;
1572
+ if (opts.consolidate && hasConsolidateTrigger) {
1573
+ const consolidateTriggerNode = fromAny(opts.consolidateTrigger);
1574
+ const consolidationStream = switchMap(
1575
+ consolidateTriggerNode,
1576
+ () => opts.consolidate(latestStore)
1577
+ );
1578
+ forEach(consolidationStream, (extraction) => {
1579
+ applyExtraction(store, extraction);
1580
+ });
1581
+ }
1582
+ const compact = derived([store.entries, contextNode], ([snapshot, context]) => {
1583
+ const entries = [...mapFromSnapshot(snapshot).entries()].map(([key, value]) => ({
1584
+ key,
1585
+ value,
1586
+ score: opts.score(value, context),
1587
+ cost: opts.cost(value)
1588
+ }));
1589
+ entries.sort((a, b) => b.score - a.score);
1590
+ const packed = [];
1591
+ let remaining = budget;
1592
+ for (const item of entries) {
1593
+ if (item.cost <= remaining) {
1594
+ packed.push({ key: item.key, value: item.value, score: item.score });
1595
+ remaining -= item.cost;
1596
+ }
1597
+ }
1598
+ return packed;
1599
+ });
1600
+ const size = derived([store.entries], ([snapshot]) => mapFromSnapshot(snapshot).size);
1601
+ keepalive(compact);
1602
+ keepalive(size);
1603
+ return { store, compact, size };
1604
+ }
1605
+
1606
+ export {
1607
+ NS_PER_MS,
1608
+ NS_PER_SEC,
1609
+ constant,
1610
+ linear,
1611
+ exponential,
1612
+ fibonacci,
1613
+ decorrelatedJitter,
1614
+ withMaxAttempts,
1615
+ resolveBackoffPreset,
1616
+ map,
1617
+ filter,
1618
+ scan,
1619
+ reduce,
1620
+ take,
1621
+ skip,
1622
+ takeWhile,
1623
+ takeUntil,
1624
+ first,
1625
+ last,
1626
+ find,
1627
+ elementAt,
1628
+ tap,
1629
+ distinctUntilChanged,
1630
+ pairwise,
1631
+ combine,
1632
+ withLatestFrom,
1633
+ merge,
1634
+ zip,
1635
+ concat,
1636
+ race,
1637
+ switchMap,
1638
+ exhaustMap,
1639
+ concatMap,
1640
+ mergeMap,
1641
+ flatMap,
1642
+ delay,
1643
+ debounce,
1644
+ throttle,
1645
+ sample,
1646
+ audit,
1647
+ buffer,
1648
+ bufferCount,
1649
+ windowCount,
1650
+ bufferTime,
1651
+ windowTime,
1652
+ window,
1653
+ interval,
1654
+ repeat,
1655
+ pausable,
1656
+ rescue,
1657
+ valve,
1658
+ combineLatest,
1659
+ debounceTime,
1660
+ throttleTime,
1661
+ catchError,
1662
+ verifiable,
1663
+ distill
1664
+ };
1665
+ //# sourceMappingURL=chunk-RNHBMHKA.js.map