Comparing version 4.0.0-rc.3 to 4.0.0-rc.4
@@ -454,5 +454,26 @@ function k(a, b) { | ||
return function(c) { | ||
return C(b, (function(b) { | ||
"number" != typeof b && b.tag && a(b[0]); | ||
return c(b); | ||
let d = !1; | ||
return C(b, (function(e) { | ||
if ("number" == typeof e) { | ||
if (d) { | ||
return 0; | ||
} | ||
d = !0; | ||
return c(e); | ||
} | ||
if (e.tag) { | ||
if (d) { | ||
return 0; | ||
} | ||
a(e[0]); | ||
return c(e); | ||
} | ||
var b = e[0]; | ||
return c(k(0, [ function(a) { | ||
if (d) { | ||
return 0; | ||
} | ||
a && (d = !0); | ||
return b(a); | ||
} ])); | ||
})); | ||
@@ -952,13 +973,18 @@ }; | ||
return function(c) { | ||
let d = !1; | ||
return C(b, (function(b) { | ||
if ("number" == typeof b) { | ||
return c(b), a(); | ||
if (d) { | ||
return 0; | ||
} | ||
d = !0; | ||
c(b); | ||
return a(); | ||
} | ||
if (b.tag) { | ||
return c(b); | ||
return d ? 0 : c(b); | ||
} | ||
var e = b[0]; | ||
return c(k(0, [ function(b) { | ||
b && a(); | ||
return e(b); | ||
return d ? 0 : b ? (d = !0, e(b), a()) : e(b); | ||
} ])); | ||
@@ -965,0 +991,0 @@ })); |
@@ -33,13 +33,13 @@ "use strict"; | ||
function makeTrampoline(a, b) { | ||
let c = !1, d = !1, e = !1; | ||
let c = !1, e = !1, d = !1; | ||
return a(__(0, [ function(f) { | ||
if (f) { | ||
c = !0; | ||
} else if (d) { | ||
e = !0; | ||
} else if (e) { | ||
d = !0; | ||
} else { | ||
for (d = e = !0; e && !c; ) { | ||
void 0 !== (f = b()) ? (e = !1, a(__(1, [ valFromOption(f) ]))) : (c = !0, a(0)); | ||
for (e = d = !0; d && !c; ) { | ||
void 0 !== (f = b()) ? (d = !1, a(__(1, [ valFromOption(f) ]))) : (c = !0, a(0)); | ||
} | ||
d = !1; | ||
e = !1; | ||
} | ||
@@ -53,8 +53,8 @@ return 0; | ||
var c = a.length; | ||
let d = 0; | ||
let e = 0; | ||
return makeTrampoline(b, (function() { | ||
if (d < c) { | ||
var e = a[d]; | ||
d = d + 1 | 0; | ||
return some(e); | ||
if (e < c) { | ||
var d = a[e]; | ||
e = e + 1 | 0; | ||
return some(d); | ||
} | ||
@@ -93,4 +93,4 @@ })); | ||
let c = !1; | ||
return b(__(0, [ function(d) { | ||
if (d) { | ||
return b(__(0, [ function(e) { | ||
if (e) { | ||
return c = !0, 0; | ||
@@ -108,12 +108,12 @@ } | ||
return function(b) { | ||
let c = _ref, d = !1; | ||
let c = _ref, e = !1; | ||
c = a({ | ||
next: function(a) { | ||
return d ? 0 : b(__(1, [ a ])); | ||
return e ? 0 : b(__(1, [ a ])); | ||
}, | ||
complete: function(a) { | ||
if (d) { | ||
if (e) { | ||
return 0; | ||
} | ||
d = !0; | ||
e = !0; | ||
return b(0); | ||
@@ -123,3 +123,3 @@ } | ||
return b(__(0, [ function(a) { | ||
return a && !d ? (d = !0, c()) : 0; | ||
return a && !e ? (e = !0, c()) : 0; | ||
} ])); | ||
@@ -156,6 +156,6 @@ }; | ||
function caml_array_sub(a, b, c) { | ||
for (var d = Array(c), e = 0; e < c; ) { | ||
d[e] = a[b], e = e + 1 | 0, b = b + 1 | 0; | ||
for (var e = Array(c), d = 0; d < c; ) { | ||
e[d] = a[b], d = d + 1 | 0, b = b + 1 | 0; | ||
} | ||
return d; | ||
return e; | ||
} | ||
@@ -166,8 +166,8 @@ | ||
var c = b; | ||
var d = 0 === (b = a.length) ? 1 : b; | ||
if (0 === (b = d - c.length | 0)) { | ||
var e = 0 === (b = a.length) ? 1 : b; | ||
if (0 === (b = e - c.length | 0)) { | ||
return a.apply(null, c); | ||
} | ||
if (0 > b) { | ||
b = caml_array_sub(c, d, 0 | -b), a = a.apply(null, caml_array_sub(c, 0, d)); | ||
b = caml_array_sub(c, e, 0 | -b), a = a.apply(null, caml_array_sub(c, 0, e)); | ||
} else { | ||
@@ -196,24 +196,24 @@ return function(a, c) { | ||
case 3: | ||
return function(c, e) { | ||
return a(b, c, e); | ||
return function(c, d) { | ||
return a(b, c, d); | ||
}; | ||
case 4: | ||
return function(c, e, f) { | ||
return a(b, c, e, f); | ||
return function(c, d, f) { | ||
return a(b, c, d, f); | ||
}; | ||
case 5: | ||
return function(c, e, f, g) { | ||
return a(b, c, e, f, g); | ||
return function(c, d, f, g) { | ||
return a(b, c, d, f, g); | ||
}; | ||
case 6: | ||
return function(c, e, f, g, h) { | ||
return a(b, c, e, f, g, h); | ||
return function(c, d, f, g, h) { | ||
return a(b, c, d, f, g, h); | ||
}; | ||
case 7: | ||
return function(c, e, f, g, h, k) { | ||
return a(b, c, e, f, g, h, k); | ||
return function(c, d, f, g, h, k) { | ||
return a(b, c, d, f, g, h, k); | ||
}; | ||
@@ -228,5 +228,5 @@ | ||
function _2(a, b, c) { | ||
var d = a.length; | ||
return 2 === d ? a(b, c) : function curry_2(a, b, c, d) { | ||
switch (d) { | ||
var e = a.length; | ||
return 2 === e ? a(b, c) : function curry_2(a, b, c, e) { | ||
switch (e) { | ||
case 1: | ||
@@ -239,24 +239,24 @@ return app(a(b), [ c ]); | ||
case 3: | ||
return function(e) { | ||
return a(b, c, e); | ||
return function(d) { | ||
return a(b, c, d); | ||
}; | ||
case 4: | ||
return function(e, d) { | ||
return a(b, c, e, d); | ||
return function(d, e) { | ||
return a(b, c, d, e); | ||
}; | ||
case 5: | ||
return function(e, d, g) { | ||
return a(b, c, e, d, g); | ||
return function(d, e, g) { | ||
return a(b, c, d, e, g); | ||
}; | ||
case 6: | ||
return function(e, d, g, h) { | ||
return a(b, c, e, d, g, h); | ||
return function(d, e, g, h) { | ||
return a(b, c, d, e, g, h); | ||
}; | ||
case 7: | ||
return function(d, f, g, h, k) { | ||
return a(b, c, d, f, g, h, k); | ||
return function(d, e, g, h, k) { | ||
return a(b, c, d, e, g, h, k); | ||
}; | ||
@@ -267,42 +267,42 @@ | ||
} | ||
}(a, b, c, d); | ||
}(a, b, c, e); | ||
} | ||
function _3(a, b, c, d) { | ||
var e = a.length; | ||
return 3 === e ? a(b, c, d) : function curry_3(a, b, c, d, e) { | ||
switch (e) { | ||
function _3(a, b, c, e) { | ||
var d = a.length; | ||
return 3 === d ? a(b, c, e) : function curry_3(a, b, c, e, d) { | ||
switch (d) { | ||
case 1: | ||
return app(a(b), [ c, d ]); | ||
return app(a(b), [ c, e ]); | ||
case 2: | ||
return app(a(b, c), [ d ]); | ||
return app(a(b, c), [ e ]); | ||
case 3: | ||
return a(b, c, d); | ||
return a(b, c, e); | ||
case 4: | ||
return function(e) { | ||
return a(b, c, d, e); | ||
return function(d) { | ||
return a(b, c, e, d); | ||
}; | ||
case 5: | ||
return function(e, g) { | ||
return a(b, c, d, e, g); | ||
return function(d, g) { | ||
return a(b, c, e, d, g); | ||
}; | ||
case 6: | ||
return function(e, g, h) { | ||
return a(b, c, d, e, g, h); | ||
return function(d, g, h) { | ||
return a(b, c, e, d, g, h); | ||
}; | ||
case 7: | ||
return function(e, g, h, k) { | ||
return a(b, c, d, e, g, h, k); | ||
return function(d, g, h, k) { | ||
return a(b, c, e, d, g, h, k); | ||
}; | ||
default: | ||
return app(a, [ b, c, d ]); | ||
return app(a, [ b, c, e ]); | ||
} | ||
}(a, b, c, d, e); | ||
}(a, b, c, e, d); | ||
} | ||
@@ -312,3 +312,3 @@ | ||
return function(c) { | ||
let d = talkbackPlaceholder, e = talkbackPlaceholder, f = void 0, g = void 0, h = !1, k = 0, l = !1; | ||
let e = talkbackPlaceholder, d = talkbackPlaceholder, f = void 0, g = void 0, h = !1, k = 0, l = !1; | ||
_1(a, (function(a) { | ||
@@ -337,5 +337,5 @@ var b = g; | ||
f = some(a); | ||
return h ? (h = !1, 0) : e(0); | ||
return h ? (h = !1, 0) : d(0); | ||
} | ||
d = a[0]; | ||
e = a[0]; | ||
return 0; | ||
@@ -366,5 +366,5 @@ })); | ||
g = some(a); | ||
return h ? (h = !1, 0) : d(0); | ||
return h ? (h = !1, 0) : e(0); | ||
} | ||
e = a[0]; | ||
d = a[0]; | ||
return 0; | ||
@@ -377,3 +377,3 @@ })); | ||
if (a) { | ||
return l = !0, d(1), e(1); | ||
return l = !0, e(1), d(1); | ||
} | ||
@@ -384,4 +384,4 @@ if (h) { | ||
h = !0; | ||
d(a); | ||
return e(a); | ||
e(a); | ||
return d(a); | ||
} ])); | ||
@@ -394,8 +394,8 @@ }; | ||
return function(c) { | ||
function d(b) { | ||
function e(b) { | ||
if ("number" == typeof b) { | ||
if (k) { | ||
k = !1; | ||
if (void 0 !== (b = e.shift())) { | ||
return _1(a(valFromOption(b)), d); | ||
if (void 0 !== (b = d.shift())) { | ||
return _1(a(valFromOption(b)), e); | ||
} | ||
@@ -421,3 +421,3 @@ if (m) { | ||
} | ||
let e = [], f = talkbackPlaceholder, g = !1, h = talkbackPlaceholder, k = !1, l = !1, m = !1; | ||
let d = [], f = talkbackPlaceholder, g = !1, h = talkbackPlaceholder, k = !1, l = !1, m = !1; | ||
_1(b, (function(b) { | ||
@@ -431,3 +431,3 @@ if ("number" == typeof b) { | ||
return 0 === a.length; | ||
}(e) ? c(0) : 0; | ||
}(d) ? c(0) : 0; | ||
} | ||
@@ -440,3 +440,3 @@ if (b.tag) { | ||
g = !1; | ||
return k ? (e.push(b), 0) : _1(a(b), d); | ||
return k ? (d.push(b), 0) : _1(a(b), e); | ||
} | ||
@@ -475,3 +475,3 @@ f = b[0]; | ||
return function(c) { | ||
let d = talkbackPlaceholder, e = !1, f = [], g = !1; | ||
let e = talkbackPlaceholder, d = !1, f = [], g = !1; | ||
_1(b, (function(b) { | ||
@@ -489,3 +489,3 @@ if ("number" == typeof b) { | ||
} | ||
e = !1; | ||
d = !1; | ||
!function(a) { | ||
@@ -504,4 +504,4 @@ function b(a) { | ||
} | ||
if (!e && a) { | ||
return e = !0, d(0); | ||
if (!d && a) { | ||
return d = !0, e(0); | ||
} | ||
@@ -519,15 +519,15 @@ } | ||
}(a(b[0])); | ||
if (e) { | ||
if (d) { | ||
return 0; | ||
} | ||
e = !0; | ||
return d(0); | ||
d = !0; | ||
return e(0); | ||
} | ||
d = b[0]; | ||
e = b[0]; | ||
return 0; | ||
})); | ||
return c(__(0, [ function(a) { | ||
a ? (g || (g = !0, d(a)), f.forEach((function c(c) { | ||
a ? (g || (g = !0, e(a)), f.forEach((function c(c) { | ||
return c(a); | ||
})), f = []) : (e || g ? e = !1 : (e = !0, d(0)), f.forEach(_ref7)); | ||
})), f = []) : (d || g ? d = !1 : (d = !0, e(0)), f.forEach(_ref7)); | ||
return 0; | ||
@@ -554,5 +554,26 @@ } ])); | ||
return function(c) { | ||
let e = !1; | ||
return _1(b, (function(b) { | ||
"number" != typeof b && b.tag && a(b[0]); | ||
return c(b); | ||
if ("number" == typeof b) { | ||
if (e) { | ||
return 0; | ||
} | ||
e = !0; | ||
return c(b); | ||
} | ||
if (b.tag) { | ||
if (e) { | ||
return 0; | ||
} | ||
a(b[0]); | ||
return c(b); | ||
} | ||
var d = b[0]; | ||
return c(__(0, [ function(a) { | ||
if (e) { | ||
return 0; | ||
} | ||
a && (e = !0); | ||
return d(a); | ||
} ])); | ||
})); | ||
@@ -565,7 +586,7 @@ }; | ||
return function(c) { | ||
return function(d) { | ||
let e = b; | ||
return _1(c, (function(b) { | ||
"number" == typeof b ? b = 0 : b.tag ? (e = a(e, b[0]), b = __(1, [ e ])) : b = __(0, [ b[0] ]); | ||
return d(b); | ||
return function(e) { | ||
let d = b; | ||
return _1(c, (function(c) { | ||
"number" == typeof c ? c = 0 : c.tag ? (d = a(d, c[0]), c = __(1, [ d ])) : c = __(0, [ c[0] ]); | ||
return e(c); | ||
})); | ||
@@ -576,3 +597,3 @@ }; | ||
function _ref11(a) { | ||
function _ref12(a) { | ||
return a(0); | ||
@@ -584,3 +605,3 @@ } | ||
return function(c) { | ||
function d(a) { | ||
function e(a) { | ||
if ("number" == typeof a) { | ||
@@ -596,3 +617,3 @@ if (h) { | ||
f = !0; | ||
return e(0); | ||
return d(0); | ||
} | ||
@@ -609,3 +630,3 @@ return 0; | ||
} | ||
let e = talkbackPlaceholder, f = !1, g = talkbackPlaceholder, h = !1, k = !1, l = !1; | ||
let d = talkbackPlaceholder, f = !1, g = talkbackPlaceholder, h = !1, k = !1, l = !1; | ||
_1(b, (function(b) { | ||
@@ -624,6 +645,6 @@ if ("number" == typeof b) { | ||
h && (g(1), g = talkbackPlaceholder); | ||
f ? f = !1 : (f = !0, e(0)); | ||
return _1(b = a(b[0]), d); | ||
f ? f = !1 : (f = !0, d(0)); | ||
return _1(b = a(b[0]), e); | ||
} | ||
e = b[0]; | ||
d = b[0]; | ||
return 0; | ||
@@ -633,6 +654,6 @@ })); | ||
if (a) { | ||
if (l || (l = !0, e(1)), h) { | ||
if (l || (l = !0, d(1)), h) { | ||
return h = !1, g(1); | ||
} | ||
} else if (l || f || (f = !0, e(0)), h && !k) { | ||
} else if (l || f || (f = !0, d(0)), h && !k) { | ||
return k = !0, g(0); | ||
@@ -646,3 +667,3 @@ } | ||
function _ref17(a) { | ||
function _ref18(a) { | ||
return a; | ||
@@ -654,13 +675,13 @@ } | ||
return function(c) { | ||
function d() { | ||
function e() { | ||
return f.shift(); | ||
} | ||
let e = talkbackPlaceholder; | ||
let d = talkbackPlaceholder; | ||
var f = []; | ||
return _1(b, (function(b) { | ||
if ("number" == typeof b) { | ||
return makeTrampoline(c, d); | ||
return makeTrampoline(c, e); | ||
} | ||
if (b.tag) { | ||
return f.length >= a && 0 < a && f.shift(), f.push(b[0]), e(0); | ||
return f.length >= a && 0 < a && f.shift(), f.push(b[0]), d(0); | ||
} | ||
@@ -671,3 +692,3 @@ b = b[0]; | ||
} | ||
e = b; | ||
d = b; | ||
return b(0); | ||
@@ -682,3 +703,3 @@ })); | ||
return function(c) { | ||
function d(a) { | ||
function e(a) { | ||
if ("number" == typeof a) { | ||
@@ -690,11 +711,11 @@ if (k) { | ||
f(1); | ||
0 < e.length && c(__(1, [ e ])); | ||
0 < d.length && c(__(1, [ d ])); | ||
return c(0); | ||
} | ||
if (a.tag) { | ||
if (k || 0 >= e.length) { | ||
if (k || 0 >= d.length) { | ||
return 0; | ||
} | ||
a = e; | ||
e = []; | ||
a = d; | ||
d = []; | ||
return c(__(1, [ a ])); | ||
@@ -705,3 +726,3 @@ } | ||
} | ||
let e = [], f = talkbackPlaceholder, g = talkbackPlaceholder, h = !1, k = !1; | ||
let d = [], f = talkbackPlaceholder, g = talkbackPlaceholder, h = !1, k = !1; | ||
_1(b, (function(b) { | ||
@@ -714,3 +735,3 @@ if ("number" == typeof b) { | ||
g(1); | ||
0 < e.length && c(__(1, [ e ])); | ||
0 < d.length && c(__(1, [ d ])); | ||
return c(0); | ||
@@ -722,3 +743,3 @@ } | ||
} | ||
e.push(b[0]); | ||
d.push(b[0]); | ||
if (h) { | ||
@@ -732,3 +753,3 @@ return h = !1, 0; | ||
f = b[0]; | ||
return _1(a, d); | ||
return _1(a, e); | ||
})); | ||
@@ -758,12 +779,12 @@ return c(__(0, [ function(a) { | ||
return function(c) { | ||
let d = talkbackPlaceholder; | ||
return _1(b, (function(b) { | ||
if ("number" == typeof b) { | ||
return c(b); | ||
let e = talkbackPlaceholder; | ||
return _1(b, (function(d) { | ||
if ("number" == typeof d) { | ||
return c(d); | ||
} | ||
if (b.tag) { | ||
return a(b[0]) ? c(b) : d(0); | ||
if (d.tag) { | ||
return a(d[0]) ? c(d) : e(0); | ||
} | ||
d = b[0]; | ||
return c(b); | ||
e = d[0]; | ||
return c(d); | ||
})); | ||
@@ -786,13 +807,18 @@ }; | ||
return function(c) { | ||
let e = !1; | ||
return _1(b, (function(b) { | ||
if ("number" == typeof b) { | ||
return c(b), a(); | ||
if (e) { | ||
return 0; | ||
} | ||
e = !0; | ||
c(b); | ||
return a(); | ||
} | ||
if (b.tag) { | ||
return c(b); | ||
return e ? 0 : c(b); | ||
} | ||
var e = b[0]; | ||
var d = b[0]; | ||
return c(__(0, [ function(c) { | ||
c && a(); | ||
return e(c); | ||
return e ? 0 : c ? (e = !0, d(c), a()) : d(c); | ||
} ])); | ||
@@ -817,3 +843,3 @@ })); | ||
return function(c) { | ||
let d = talkbackPlaceholder, e = talkbackPlaceholder, f = void 0, g = !1, h = !1; | ||
let e = talkbackPlaceholder, d = talkbackPlaceholder, f = void 0, g = !1, h = !1; | ||
_1(b, (function(a) { | ||
@@ -825,3 +851,3 @@ if ("number" == typeof a) { | ||
h = !0; | ||
e(1); | ||
d(1); | ||
return c(0); | ||
@@ -835,6 +861,6 @@ } | ||
g = !0; | ||
e(0); | ||
return d(0); | ||
d(0); | ||
return e(0); | ||
} | ||
d = a[0]; | ||
e = a[0]; | ||
return 0; | ||
@@ -849,3 +875,3 @@ })); | ||
h = !0; | ||
d(1); | ||
e(1); | ||
return c(0); | ||
@@ -860,3 +886,3 @@ } | ||
} | ||
e = a[0]; | ||
d = a[0]; | ||
return 0; | ||
@@ -869,3 +895,3 @@ })); | ||
if (a) { | ||
return h = !0, d(1), e(1); | ||
return h = !0, e(1), d(1); | ||
} | ||
@@ -876,4 +902,4 @@ if (g) { | ||
g = !0; | ||
d(0); | ||
return e(0); | ||
e(0); | ||
return d(0); | ||
} ])); | ||
@@ -884,8 +910,8 @@ }; | ||
function b(a) { | ||
"number" == typeof a ? (c.forEach(_ref11), c = []) : a.tag ? (e = !1, c.forEach((function b(b) { | ||
return b(a); | ||
}))) : d = a[0]; | ||
"number" == typeof a ? (c.forEach(_ref12), c = []) : a.tag ? (d = !1, c.forEach((function b(c) { | ||
return c(a); | ||
}))) : e = a[0]; | ||
return 0; | ||
} | ||
let c = [], d = talkbackPlaceholder, e = !1; | ||
let c = [], e = talkbackPlaceholder, d = !1; | ||
return function(f) { | ||
@@ -899,9 +925,9 @@ function g(a) { | ||
if (a) { | ||
return c = c.filter(g), 0 === c.length ? d(1) : 0; | ||
return c = c.filter(g), 0 === c.length ? e(1) : 0; | ||
} | ||
if (e) { | ||
if (d) { | ||
return 0; | ||
} | ||
e = !0; | ||
return d(a); | ||
d = !0; | ||
return e(a); | ||
} ])); | ||
@@ -912,3 +938,3 @@ }; | ||
return function(c) { | ||
let d = talkbackPlaceholder, e = a; | ||
let e = talkbackPlaceholder, d = a; | ||
return _1(b, (function(a) { | ||
@@ -919,5 +945,5 @@ if ("number" == typeof a) { | ||
if (a.tag) { | ||
return 0 < e ? (e = e - 1 | 0, d(0)) : c(a); | ||
return 0 < d ? (d = d - 1 | 0, e(0)) : c(a); | ||
} | ||
d = a[0]; | ||
e = a[0]; | ||
return c(a); | ||
@@ -930,5 +956,5 @@ })); | ||
return function(c) { | ||
function d(a) { | ||
function e(a) { | ||
if ("number" == typeof a) { | ||
return g ? (k = !0, e(1)) : 0; | ||
return g ? (k = !0, d(1)) : 0; | ||
} | ||
@@ -941,3 +967,3 @@ if (a.tag) { | ||
} | ||
let e = talkbackPlaceholder, f = talkbackPlaceholder, g = !0, h = !1, k = !1; | ||
let d = talkbackPlaceholder, f = talkbackPlaceholder, g = !0, h = !1, k = !1; | ||
_1(b, (function(b) { | ||
@@ -953,3 +979,3 @@ if ("number" == typeof b) { | ||
h = !0; | ||
e(0); | ||
d(0); | ||
return f(0); | ||
@@ -960,4 +986,4 @@ } | ||
} | ||
e = b[0]; | ||
return _1(a, d); | ||
d = b[0]; | ||
return _1(a, e); | ||
})); | ||
@@ -969,3 +995,3 @@ return c(__(0, [ function(a) { | ||
if (a) { | ||
return k = !0, e(1), g ? f(1) : 0; | ||
return k = !0, d(1), g ? f(1) : 0; | ||
} | ||
@@ -977,3 +1003,3 @@ if (h) { | ||
g && f(0); | ||
return e(0); | ||
return d(0); | ||
} ])); | ||
@@ -985,3 +1011,3 @@ }; | ||
return function(c) { | ||
let d = talkbackPlaceholder, e = !0; | ||
let e = talkbackPlaceholder, d = !0; | ||
return _1(b, (function(b) { | ||
@@ -992,11 +1018,11 @@ if ("number" == typeof b) { | ||
if (b.tag) { | ||
if (e) { | ||
if (d) { | ||
if (a(b[0])) { | ||
return d(0); | ||
return e(0); | ||
} | ||
e = !1; | ||
d = !1; | ||
} | ||
return c(b); | ||
} | ||
d = b[0]; | ||
e = b[0]; | ||
return c(b); | ||
@@ -1007,21 +1033,21 @@ })); | ||
}, switchMap$1 = switchMap, switchAll$1 = function switchAll(a) { | ||
return switchMap(_ref17)(a); | ||
return switchMap(_ref18)(a); | ||
}, take$1 = function take(a) { | ||
return function(b) { | ||
return function(c) { | ||
let d = !1, e = 0, f = talkbackPlaceholder; | ||
let e = !1, d = 0, f = talkbackPlaceholder; | ||
_1(b, (function(b) { | ||
if ("number" == typeof b) { | ||
if (d) { | ||
if (e) { | ||
return 0; | ||
} | ||
d = !0; | ||
e = !0; | ||
return c(0); | ||
} | ||
if (b.tag) { | ||
return e < a && !d && (e = e + 1 | 0, c(b), !d && e >= a) ? (d = !0, c(0), f(1)) : 0; | ||
return d < a && !e && (d = d + 1 | 0, c(b), !e && d >= a) ? (e = !0, c(0), f(1)) : 0; | ||
} | ||
b = b[0]; | ||
if (0 >= a) { | ||
return d = !0, c(0), b(1); | ||
return e = !0, c(0), b(1); | ||
} | ||
@@ -1032,3 +1058,3 @@ f = b; | ||
return c(__(0, [ function(b) { | ||
return d ? 0 : b ? (d = !0, f(1)) : e < a ? f(0) : 0; | ||
return e ? 0 : b ? (e = !0, f(1)) : d < a ? f(0) : 0; | ||
} ])); | ||
@@ -1040,3 +1066,3 @@ }; | ||
return function(c) { | ||
function d(a) { | ||
function e(a) { | ||
if ("number" == typeof a) { | ||
@@ -1046,3 +1072,3 @@ return 0; | ||
if (a.tag) { | ||
return e = !0, f(1), c(0); | ||
return d = !0, f(1), c(0); | ||
} | ||
@@ -1052,9 +1078,9 @@ g = a = a[0]; | ||
} | ||
let e = !1, f = talkbackPlaceholder, g = talkbackPlaceholder; | ||
let d = !1, f = talkbackPlaceholder, g = talkbackPlaceholder; | ||
_1(b, (function(b) { | ||
if ("number" == typeof b) { | ||
if (e) { | ||
if (d) { | ||
return 0; | ||
} | ||
e = !0; | ||
d = !0; | ||
g(1); | ||
@@ -1064,9 +1090,9 @@ return c(0); | ||
if (b.tag) { | ||
return e ? 0 : c(b); | ||
return d ? 0 : c(b); | ||
} | ||
f = b[0]; | ||
return _1(a, d); | ||
return _1(a, e); | ||
})); | ||
return c(__(0, [ function(a) { | ||
return e ? 0 : a ? (e = !0, f(1), g(1)) : f(0); | ||
return d ? 0 : a ? (d = !0, f(1), g(1)) : f(0); | ||
} ])); | ||
@@ -1078,13 +1104,13 @@ }; | ||
return function(c) { | ||
let d = talkbackPlaceholder, e = !1; | ||
let e = talkbackPlaceholder, d = !1; | ||
return _1(b, (function(b) { | ||
if ("number" == typeof b) { | ||
if (e) { | ||
if (d) { | ||
return 0; | ||
} | ||
e = !0; | ||
d = !0; | ||
return c(0); | ||
} | ||
if (b.tag) { | ||
if (e) { | ||
if (d) { | ||
return 0; | ||
@@ -1095,7 +1121,7 @@ } | ||
} | ||
e = !0; | ||
d = !0; | ||
c(0); | ||
return d(1); | ||
return e(1); | ||
} | ||
d = b[0]; | ||
e = b[0]; | ||
return c(b); | ||
@@ -1109,9 +1135,9 @@ })); | ||
return function(b) { | ||
let c = talkbackPlaceholder, d = !1; | ||
let c = talkbackPlaceholder, e = !1; | ||
_1(b, (function(b) { | ||
if ("number" == typeof b) { | ||
return d = !0, 0; | ||
return e = !0, 0; | ||
} | ||
if (b.tag) { | ||
if (d) { | ||
if (e) { | ||
return 0; | ||
@@ -1127,6 +1153,6 @@ } | ||
unsubscribe: function(a) { | ||
if (d) { | ||
if (e) { | ||
return 0; | ||
} | ||
d = !0; | ||
e = !0; | ||
return c(1); | ||
@@ -1150,6 +1176,6 @@ } | ||
}, toArray$1 = function toArray(a) { | ||
let b = [], c = talkbackPlaceholder, d = !1; | ||
let b = [], c = talkbackPlaceholder, e = !1; | ||
_1(a, (function(a) { | ||
if ("number" == typeof a) { | ||
return d = !0, 0; | ||
return e = !0, 0; | ||
} | ||
@@ -1162,3 +1188,3 @@ if (a.tag) { | ||
})); | ||
d || c(1); | ||
e || c(1); | ||
return b; | ||
@@ -1183,9 +1209,9 @@ }; | ||
return function(c) { | ||
var d = _ref5, e = _ref6, f = function(a) { | ||
var e = _ref5, d = _ref6, f = function(a) { | ||
return c(__(1, [ a ])); | ||
}; | ||
c(__(0, [ function(c) { | ||
return c ? _3(e, a, b, f) : 0; | ||
return c ? _3(d, a, b, f) : 0; | ||
} ])); | ||
return _3(d, a, b, f); | ||
return _3(e, a, b, f); | ||
}; | ||
@@ -1213,9 +1239,9 @@ } | ||
subscribe: function(b) { | ||
let c = talkbackPlaceholder, e = !1; | ||
let c = talkbackPlaceholder, d = !1; | ||
_1(a, (function(a) { | ||
if ("number" == typeof a) { | ||
return e = !0, b.complete(); | ||
return d = !0, b.complete(); | ||
} | ||
if (a.tag) { | ||
if (e) { | ||
if (d) { | ||
return 0; | ||
@@ -1231,6 +1257,6 @@ } | ||
unsubscribe: function() { | ||
if (e) { | ||
if (d) { | ||
return 0; | ||
} | ||
e = !0; | ||
d = !0; | ||
return c(1); | ||
@@ -1247,11 +1273,11 @@ } | ||
return function(b) { | ||
return _2(a, 0, (function(a, d) { | ||
return _2(a, 0, (function(a, e) { | ||
switch (a) { | ||
case 0: | ||
return b(__(0, [ function c(a) { | ||
return a ? d(2) : d(1); | ||
return a ? e(2) : e(1); | ||
} ])); | ||
case 1: | ||
return b(__(1, [ d ])); | ||
return b(__(1, [ e ])); | ||
@@ -1265,3 +1291,3 @@ case 2: | ||
return function(b, c) { | ||
return 0 === b ? _1(a, (function d(a) { | ||
return 0 === b ? _1(a, (function e(a) { | ||
if ("number" == typeof a) { | ||
@@ -1291,5 +1317,5 @@ return _2(c, 2, 0); | ||
return function(c) { | ||
let d = void 0, e = !1, f = !1; | ||
let e = void 0, d = !1, f = !1; | ||
var g = function(a) { | ||
void 0 !== (a = d) && (d = void 0, clearTimeout(valFromOption(a))); | ||
void 0 !== (a = e) && (e = void 0, clearTimeout(valFromOption(a))); | ||
return 0; | ||
@@ -1303,9 +1329,9 @@ }; | ||
f = !0; | ||
return void 0 !== d ? (e = !0, 0) : c(0); | ||
return void 0 !== e ? (d = !0, 0) : c(0); | ||
} | ||
if (b.tag) { | ||
return f || (g(), d = some(setTimeout((function h(a) { | ||
d = void 0; | ||
return f || (g(), e = some(setTimeout((function h(a) { | ||
e = void 0; | ||
c(b); | ||
return e ? c(0) : 0; | ||
return d ? c(0) : 0; | ||
}), a(b[0])))), 0; | ||
@@ -1315,3 +1341,3 @@ } | ||
return c(__(0, [ function(a) { | ||
return f ? 0 : a ? (f = !0, e = !1, g(), l(1)) : l(0); | ||
return f ? 0 : a ? (f = !0, d = !1, g(), l(1)) : l(0); | ||
} ])); | ||
@@ -1324,3 +1350,3 @@ })); | ||
return function(c) { | ||
let d = 0; | ||
let e = 0; | ||
return _1(b, (function(b) { | ||
@@ -1330,5 +1356,5 @@ if ("number" != typeof b && !b.tag) { | ||
} | ||
d = d + 1 | 0; | ||
e = e + 1 | 0; | ||
setTimeout((function(a) { | ||
return 0 !== d ? (d = d - 1 | 0, c(b)) : 0; | ||
return 0 !== e ? (e = e - 1 | 0, c(b)) : 0; | ||
}), a); | ||
@@ -1342,8 +1368,8 @@ return 0; | ||
return function(c) { | ||
function d(a) { | ||
function e(a) { | ||
f = void 0; | ||
e = !1; | ||
d = !1; | ||
return 0; | ||
} | ||
let e = !1, f = void 0; | ||
let d = !1, f = void 0; | ||
var g = function(a) { | ||
@@ -1358,8 +1384,8 @@ void 0 !== (a = f) && clearTimeout(valFromOption(a)); | ||
if (b.tag) { | ||
if (e) { | ||
if (d) { | ||
return 0; | ||
} | ||
e = !0; | ||
d = !0; | ||
g(); | ||
f = some(setTimeout(d, a(b[0]))); | ||
f = some(setTimeout(e, a(b[0]))); | ||
return c(b); | ||
@@ -1383,3 +1409,3 @@ } | ||
let c = 0; | ||
var d = setInterval((function(a) { | ||
var e = setInterval((function(a) { | ||
a = c; | ||
@@ -1390,3 +1416,3 @@ c = c + 1 | 0; | ||
return b(__(0, [ function(a) { | ||
a && clearInterval(d); | ||
a && clearInterval(e); | ||
return 0; | ||
@@ -1472,3 +1498,3 @@ } ])); | ||
exports.pipe = function pipe() { | ||
for (var a = arguments, b = arguments[0], c = 1, d = arguments.length; c < d; c++) { | ||
for (var a = arguments, b = arguments[0], c = 1, e = arguments.length; c < e; c++) { | ||
b = a[c](b); | ||
@@ -1475,0 +1501,0 @@ } |
@@ -1,1 +0,1 @@ | ||
"use strict";function n(n,t){return t.tag=n,t}var t=[];function r(n){return void 0===n?((n=[t,0]).tag=256,n):(null!==n&&n[0]===t&&((n=[t,n[1]+1|0]).tag=256),n)}function u(n){return null===n||n[0]!==t?n:0!==(n=n[1])?[t,n-1|0]:void 0}function e(n){return 0}function o(t,r){let e=!1,o=!1,f=!1;return t(n(0,[function(i){if(i)e=!0;else if(o)f=!0;else{for(o=f=!0;f&&!e;)void 0!==(i=r())?(f=!1,t(n(1,[u(i)]))):(e=!0,t(0));o=!1}return 0}]))}function f(n){return function(t){var u=n.length;let e=0;return o(t,(function(){if(e<u){var t=n[e];return e=e+1|0,r(t)}}))}}function i(){return 0}function c(n){return n(0)}function a(t){let r=!1;return t(n(0,[function(n){return n?(r=!0,0):r?0:t(0)}]))}var s=f,l=a;function p(n,t,r){for(var u=Array(r),e=0;e<r;)u[e]=n[t],e=e+1|0,t=t+1|0;return u}function b(n,t){for(;;){var r=t,u=0===(t=n.length)?1:t;if(0==(t=u-r.length|0))return n.apply(null,r);if(!(0>t))return function(n,t){return function(r){return b(n,t.concat([r]))}}(n,r);t=p(r,u,0|-t),n=n.apply(null,p(r,0,u))}}function m(n,t){var r=n.length;return 1===r?n(t):function(n,t,r){switch(r){case 1:return n(t);case 2:return function(r){return n(t,r)};case 3:return function(r,u){return n(t,r,u)};case 4:return function(r,u,e){return n(t,r,u,e)};case 5:return function(r,u,e,o){return n(t,r,u,e,o)};case 6:return function(r,u,e,o,f){return n(t,r,u,e,o,f)};case 7:return function(r,u,e,o,f,i){return n(t,r,u,e,o,f,i)};default:return b(n,[t])}}(n,t,r)}function v(n,t,r){var u=n.length;return 2===u?n(t,r):function(n,t,r,u){switch(u){case 1:return b(n(t),[r]);case 2:return n(t,r);case 3:return function(u){return n(t,r,u)};case 4:return function(u,e){return n(t,r,u,e)};case 5:return function(u,e,o){return n(t,r,u,e,o)};case 6:return function(u,e,o,f){return n(t,r,u,e,o,f)};case 7:return function(u,e,o,f,i){return n(t,r,u,e,o,f,i)};default:return b(n,[t,r])}}(n,t,r,u)}function g(n,t,r,u){var e=n.length;return 3===e?n(t,r,u):function(n,t,r,u,e){switch(e){case 1:return b(n(t),[r,u]);case 2:return b(n(t,r),[u]);case 3:return n(t,r,u);case 4:return function(e){return n(t,r,u,e)};case 5:return function(e,o){return n(t,r,u,e,o)};case 6:return function(e,o,f){return n(t,r,u,e,o,f)};case 7:return function(e,o,f,i){return n(t,r,u,e,o,f,i)};default:return b(n,[t,r,u])}}(n,t,r,u,e)}function x(t,o){return function(f){let i=e,c=e,a=void 0,s=void 0,l=!1,p=0,b=!1;return m(t,(function(t){var e=s;return"number"==typeof t?1>p?(p=p+1|0,0):b?0:(b=!0,f(0)):t.tag?(t=t[0],void 0!==e?b?0:(a=r(t),l=!1,f(n(1,[[t,u(e)]]))):(a=r(t),l?(l=!1,0):c(0))):(i=t[0],0)})),m(o,(function(t){var e=a;return"number"==typeof t?1>p?(p=p+1|0,0):b?0:(b=!0,f(0)):t.tag?(t=t[0],void 0!==e?b?0:(s=r(t),l=!1,f(n(1,[[u(e),t]]))):(s=r(t),l?(l=!1,0):i(0))):(c=t[0],0)})),f(n(0,[function(n){return b?0:n?(b=!0,i(1),c(1)):l?0:(l=!0,i(n),c(n))}]))}}function y(t){return function(r){return function(o){function f(n){return"number"==typeof n?l?(l=!1,void 0!==(n=i.shift())?m(t(u(n)),f):b?o(0):a?0:(a=!0,c(0))):0:n.tag?l?(o(n),p?(p=!1,0):s(0)):0:(l=!0,s=n=n[0],p=!1,n(0))}let i=[],c=e,a=!1,s=e,l=!1,p=!1,b=!1;return m(r,(function(n){return"number"==typeof n?b?0:(b=!0,!l&&function(n){return 0===n.length}(i)?o(0):0):n.tag?b?0:(n=n[0],a=!1,l?(i.push(n),0):m(t(n),f)):(c=n[0],0)})),o(n(0,[function(n){if(n){if(b||(b=!0,c(1)),l)return l=!1,s(1)}else if(b||a||(a=!0,c(0)),l&&!p)return p=!0,s(0);return 0}]))}}}function h(n){return n}function d(n){return n}function E(n){return n(0)}function k(t){return function(r){return function(u){let o=e,f=!1,i=[],c=!1;return m(r,(function(r){return"number"==typeof r?c?0:(c=!0,0===i.length?u(0):0):r.tag?c?0:(f=!1,function(t){function r(n){return n!==a}let a=e;m(t,(function(t){if("number"==typeof t){if(0!==i.length){if(i=i.filter(r),t=0===i.length,c&&t)return u(0);if(!f&&t)return f=!0,o(0)}return 0}return t.tag?0!==i.length?(u(n(1,[t[0]])),a(0)):0:(a=t=t[0],i=i.concat(t),t(0))}))}(t(r[0])),f?0:(f=!0,o(0))):(o=r[0],0)})),u(n(0,[function(n){return n?(c||(c=!0,o(n)),i.forEach((function(t){return t(n)})),i=[]):(f||c?f=!1:(f=!0,o(0)),i.forEach(E)),0}]))}}}function w(n){return n}function A(n){return n}function S(n){return k(A)(n)}function P(n){return function(t){return function(r){return m(t,(function(t){return"number"!=typeof t&&t.tag&&n(t[0]),r(t)}))}}}function T(t,r){return function(u){return function(e){let o=r;return m(u,(function(r){return"number"==typeof r?r=0:r.tag?(o=t(o,r[0]),r=n(1,[o])):r=n(0,[r[0]]),e(r)}))}}}function L(n){return n(0)}function M(t){return function(r){return function(u){function o(n){return"number"==typeof n?a?(a=!1,l?u(n):i?0:(i=!0,f(0))):0:n.tag?a?(u(n),s?(s=!1,0):c(0)):0:(a=!0,c=n=n[0],s=!1,n(0))}let f=e,i=!1,c=e,a=!1,s=!1,l=!1;return m(r,(function(n){return"number"==typeof n?l?0:(l=!0,a?0:u(0)):n.tag?l?0:(a&&(c(1),c=e),i?i=!1:(i=!0,f(0)),m(n=t(n[0]),o)):(f=n[0],0)})),u(n(0,[function(n){if(n){if(l||(l=!0,f(1)),a)return a=!1,c(1)}else if(l||i||(i=!0,f(0)),a&&!s)return s=!0,c(0);return 0}]))}}}function C(n){return n}function I(n){return function(t){return function(r){function u(){return i.shift()}let f=e;var i=[];return m(t,(function(t){return"number"==typeof t?o(r,u):t.tag?(i.length>=n&&0<n&&i.shift(),i.push(t[0]),f(0)):(t=t[0],0>=n?(t(1),a(r)):(f=t,t(0)))}))}}}var O=y,U=k,W=S,j=S,D=P,V=P,q=M,z=I;function B(n){return function(t){let r=e,u=!1;return m(t,(function(t){return"number"==typeof t?(u=!0,0):t.tag?u?0:(n(t[0]),r(0)):(r=t=t[0],t(0))})),{unsubscribe:function(n){return u?0:(u=!0,r(1))}}}}function F(n){return 0}var G=B,H="function"==typeof Symbol?Symbol.observable||(Symbol.observable=Symbol("observable")):"@@observable";function J(n){return 0}function K(n,t,r){n.addEventListener(t,r)}function N(n,t,r){n.removeEventListener(t,r)}function Q(t,r){return function(u){var e=K,o=N,f=function(t){return u(n(1,[t]))};return u(n(0,[function(n){return n?g(o,t,r,f):0}])),g(e,t,r,f)}}exports.buffer=function(t){return function(r){return function(u){function o(t){return"number"==typeof t?s?0:(s=!0,i(1),0<f.length&&u(n(1,[f])),u(0)):t.tag?s||0>=f.length?0:(t=f,f=[],u(n(1,[t]))):(c=t[0],0)}let f=[],i=e,c=e,a=!1,s=!1;return m(r,(function(r){return"number"==typeof r?s?0:(s=!0,c(1),0<f.length&&u(n(1,[f])),u(0)):r.tag?s?0:(f.push(r[0]),a?(a=!1,0):(a=!0,i(0),c(0))):(i=r[0],m(t,o))})),u(n(0,[function(n){return s?0:n?(s=!0,i(1),c(1)):a?0:(a=!0,i(0),c(0))}]))}}},exports.combine=function(n,t){return v(x,n,t)},exports.concat=function(n){return y(d)(f(n))},exports.concatAll=function(n){return y(h)(n)},exports.concatMap=O,exports.debounce=function(t){return function(e){return function(o){let f=void 0,i=!1,c=!1;var a=function(n){return void 0!==(n=f)&&(f=void 0,clearTimeout(u(n))),0};return m(e,(function(u){if("number"==typeof u)return c?0:(c=!0,void 0!==f?(i=!0,0):o(0));if(u.tag)return c||(a(),f=r(setTimeout((function(n){return f=void 0,o(u),i?o(0):0}),t(u[0])))),0;var e=u[0];return o(n(0,[function(n){return c?0:n?(c=!0,i=!1,a(),e(1)):e(0)}]))}))}}},exports.delay=function(n){return function(t){return function(r){let u=0;return m(t,(function(t){return"number"==typeof t||t.tag?(u=u+1|0,setTimeout((function(n){return 0!==u?(u=u-1|0,r(t)):0}),n),0):r(t)}))}}},exports.empty=l,exports.filter=function(n){return function(t){return function(r){let u=e;return m(t,(function(t){return"number"==typeof t?r(t):t.tag?n(t[0])?r(t):u(0):(u=t[0],r(t))}))}}},exports.flatten=j,exports.forEach=function(n){return function(t){return B(n)(t),0}},exports.fromArray=s,exports.fromCallbag=function(t){return function(r){return v(t,0,(function(t,u){switch(t){case 0:return r(n(0,[function(n){return u(n?2:1)}]));case 1:return r(n(1,[u]));case 2:return r(0)}}))}},exports.fromDomEvent=function(n,t){return v(Q,n,t)},exports.fromList=function(n){return function(t){let u=n;return o(t,(function(){var n=u;if(n)return u=n[1],r(n[0])}))}},exports.fromObservable=function(t){var r=void 0!==t[H]?t[H]():t;return function(t){var u=r.subscribe({next:function(r){return t(n(1,[r]))},complete:function(){return t(0)},error:J});return t(n(0,[function(n){return n?u.unsubscribe():0}]))}},exports.fromPromise=function(t){return function(r){let u=!1;return t.then((function(t){return u||(r(n(1,[t])),r(0)),Promise.resolve(0)})),r(n(0,[function(n){return n&&(u=!0),0}]))}},exports.fromValue=function(t){return function(r){let u=!1;return r(n(0,[function(e){return e?(u=!0,0):u?0:(u=!0,r(n(1,[t])),r(0))}]))}},exports.interval=function(t){return function(r){let u=0;var e=setInterval((function(t){return t=u,u=u+1|0,r(n(1,[t]))}),t);return r(n(0,[function(n){return n&&clearInterval(e),0}]))}},exports.make=function(t){return function(r){let u=i,e=!1;return u=t({next:function(t){return e?0:r(n(1,[t]))},complete:function(n){return e?0:(e=!0,r(0))}}),r(n(0,[function(n){return n&&!e?(e=!0,u()):0}]))}},exports.makeSubject=function(t){let r=[],u=!1;return{source:function(t){function u(n){return n!==t}return r=r.concat(t),t(n(0,[function(n){return n&&(r=r.filter(u)),0}]))},next:function(t){return u||r.forEach((function(r){return r(n(1,[t]))})),0},complete:function(n){return u||(u=!0,r.forEach(c)),0}}},exports.map=function(t){return function(r){return function(u){return m(r,(function(r){return r="number"==typeof r?0:r.tag?n(1,[t(r[0])]):n(0,[r[0]]),u(r)}))}}},exports.merge=function(n){return k(w)(f(n))},exports.mergeAll=W,exports.mergeMap=U,exports.never=function(t){return t(n(0,[e]))},exports.onEnd=function(t){return function(r){return function(u){return m(r,(function(r){if("number"==typeof r)return u(r),t();if(r.tag)return u(r);var e=r[0];return u(n(0,[function(n){return n&&t(),e(n)}]))}))}}},exports.onPush=D,exports.onStart=function(n){return function(t){return function(r){return m(t,(function(t){return"number"==typeof t||t.tag?r(t):(r(t),n())}))}}},exports.pipe=function(){for(var n=arguments,t=arguments[0],r=1,u=arguments.length;r<u;r++)t=n[r](t);return t},exports.publish=function(n){return B(F)(n)},exports.sample=function(t){return function(o){return function(f){let i=e,c=e,a=void 0,s=!1,l=!1;return m(o,(function(n){return"number"==typeof n?l?0:(l=!0,c(1),f(0)):n.tag?(a=r(n[0]),s?(s=!1,0):(s=!0,c(0),i(0))):(i=n[0],0)})),m(t,(function(t){var r=a;return"number"==typeof t?l?0:(l=!0,i(1),f(0)):t.tag?void 0===r||l?0:(a=void 0,f(n(1,[u(r)]))):(c=t[0],0)})),f(n(0,[function(n){return l?0:n?(l=!0,i(1),c(1)):s?0:(s=!0,i(0),c(0))}]))}}},exports.scan=function(n,t){return v(T,n,t)},exports.share=function(t){function r(n){return"number"==typeof n?(u.forEach(L),u=[]):n.tag?(f=!1,u.forEach((function(t){return t(n)}))):o=n[0],0}let u=[],o=e,f=!1;return function(e){function i(n){return n!==e}return u=u.concat(e),1===u.length&&m(t,r),e(n(0,[function(n){return n?(u=u.filter(i),0===u.length?o(1):0):f?0:(f=!0,o(n))}]))}},exports.skip=function(n){return function(t){return function(r){let u=e,o=n;return m(t,(function(n){return"number"==typeof n?r(n):n.tag?0<o?(o=o-1|0,u(0)):r(n):(u=n[0],r(n))}))}}},exports.skipUntil=function(t){return function(r){return function(u){function o(n){return"number"==typeof n?c?(s=!0,f(1)):0:n.tag?(c=!1,i(1)):(i=n=n[0],n(0))}let f=e,i=e,c=!0,a=!1,s=!1;return m(r,(function(n){return"number"==typeof n?(c&&i(1),s=!0,u(0)):n.tag?c||s?a?(a=!1,0):(a=!0,f(0),i(0)):(a=!1,u(n)):(f=n[0],m(t,o))})),u(n(0,[function(n){return s?0:n?(s=!0,f(1),c?i(1):0):a?0:(a=!0,c&&i(0),f(0))}]))}}},exports.skipWhile=function(n){return function(t){return function(r){let u=e,o=!0;return m(t,(function(t){if("number"==typeof t)return r(t);if(t.tag){if(o){if(n(t[0]))return u(0);o=!1}return r(t)}return u=t[0],r(t)}))}}},exports.subscribe=G,exports.switchAll=function(n){return M(C)(n)},exports.switchMap=q,exports.take=function(t){return function(r){return function(u){let o=!1,f=0,i=e;return m(r,(function(n){return"number"==typeof n?o?0:(o=!0,u(0)):n.tag?f<t&&!o&&(f=f+1|0,u(n),!o&&f>=t)?(o=!0,u(0),i(1)):0:(n=n[0],0>=t?(o=!0,u(0),n(1)):(i=n,0))})),u(n(0,[function(n){return o?0:n?(o=!0,i(1)):f<t?i(0):0}]))}}},exports.takeLast=z,exports.takeUntil=function(t){return function(r){return function(u){function o(n){return"number"==typeof n?0:n.tag?(f=!0,i(1),u(0)):(c=n=n[0],n(0))}let f=!1,i=e,c=e;return m(r,(function(n){return"number"==typeof n?f?0:(f=!0,c(1),u(0)):n.tag?f?0:u(n):(i=n[0],m(t,o))})),u(n(0,[function(n){return f?0:n?(f=!0,i(1),c(1)):i(0)}]))}}},exports.takeWhile=function(n){return function(t){return function(r){let u=e,o=!1;return m(t,(function(t){return"number"==typeof t?o?0:(o=!0,r(0)):t.tag?o?0:n(t[0])?r(t):(o=!0,r(0),u(1)):(u=t[0],r(t))}))}}},exports.tap=V,exports.throttle=function(t){return function(e){return function(o){function f(n){return c=void 0,i=!1,0}let i=!1,c=void 0;var a=function(n){return void 0!==(n=c)&&clearTimeout(u(n)),0};return m(e,(function(u){if("number"==typeof u)return a(),o(0);if(u.tag)return i?0:(i=!0,a(),c=r(setTimeout(f,t(u[0]))),o(u));var e=u[0];return o(n(0,[function(n){return n?(a(),e(1)):e(n)}]))}))}}},exports.toArray=function(n){let t=[],r=e,u=!1;return m(n,(function(n){return"number"==typeof n?(u=!0,0):n.tag?(t.push(n[0]),r(0)):(r=n=n[0],n(0))})),u||r(1),t},exports.toCallbag=function(n){return function(t,r){return 0===t?m(n,(function(n){if("number"==typeof n)return v(r,2,0);if(n.tag)return v(r,1,n[0]);var t=n[0];return v(r,0,(function(n){switch(n){case 0:return 0;case 1:return t(0);case 2:return t(1)}}))})):0}},exports.toObservable=function(n){var t={subscribe:function(t){let r=e,u=!1;return m(n,(function(n){return"number"==typeof n?(u=!0,t.complete()):n.tag?u?0:(t.next(n[0]),r(0)):(r=n=n[0],n(0))})),{unsubscribe:function(){return u?0:(u=!0,r(1))}}}};return t[H]=function(n){return t},t},exports.toPromise=function(n){return new Promise((function(t,r){return m(I(1)(n),(function(n){return"number"==typeof n?0:n.tag?t(n[0]):n[0](0)}))}))}; | ||
"use strict";function n(n,t){return t.tag=n,t}var t=[];function r(n){return void 0===n?((n=[t,0]).tag=256,n):(null!==n&&n[0]===t&&((n=[t,n[1]+1|0]).tag=256),n)}function u(n){return null===n||n[0]!==t?n:0!==(n=n[1])?[t,n-1|0]:void 0}function e(n){return 0}function o(t,r){let e=!1,o=!1,f=!1;return t(n(0,[function(i){if(i)e=!0;else if(o)f=!0;else{for(o=f=!0;f&&!e;)void 0!==(i=r())?(f=!1,t(n(1,[u(i)]))):(e=!0,t(0));o=!1}return 0}]))}function f(n){return function(t){var u=n.length;let e=0;return o(t,(function(){if(e<u){var t=n[e];return e=e+1|0,r(t)}}))}}function i(){return 0}function c(n){return n(0)}function a(t){let r=!1;return t(n(0,[function(n){return n?(r=!0,0):r?0:t(0)}]))}var s=f,l=a;function p(n,t,r){for(var u=Array(r),e=0;e<r;)u[e]=n[t],e=e+1|0,t=t+1|0;return u}function b(n,t){for(;;){var r=t,u=0===(t=n.length)?1:t;if(0==(t=u-r.length|0))return n.apply(null,r);if(!(0>t))return function(n,t){return function(r){return b(n,t.concat([r]))}}(n,r);t=p(r,u,0|-t),n=n.apply(null,p(r,0,u))}}function m(n,t){var r=n.length;return 1===r?n(t):function(n,t,r){switch(r){case 1:return n(t);case 2:return function(r){return n(t,r)};case 3:return function(r,u){return n(t,r,u)};case 4:return function(r,u,e){return n(t,r,u,e)};case 5:return function(r,u,e,o){return n(t,r,u,e,o)};case 6:return function(r,u,e,o,f){return n(t,r,u,e,o,f)};case 7:return function(r,u,e,o,f,i){return n(t,r,u,e,o,f,i)};default:return b(n,[t])}}(n,t,r)}function v(n,t,r){var u=n.length;return 2===u?n(t,r):function(n,t,r,u){switch(u){case 1:return b(n(t),[r]);case 2:return n(t,r);case 3:return function(u){return n(t,r,u)};case 4:return function(u,e){return n(t,r,u,e)};case 5:return function(u,e,o){return n(t,r,u,e,o)};case 6:return function(u,e,o,f){return n(t,r,u,e,o,f)};case 7:return function(u,e,o,f,i){return n(t,r,u,e,o,f,i)};default:return b(n,[t,r])}}(n,t,r,u)}function g(n,t,r,u){var e=n.length;return 3===e?n(t,r,u):function(n,t,r,u,e){switch(e){case 1:return b(n(t),[r,u]);case 2:return b(n(t,r),[u]);case 3:return n(t,r,u);case 4:return function(e){return n(t,r,u,e)};case 5:return function(e,o){return n(t,r,u,e,o)};case 6:return function(e,o,f){return n(t,r,u,e,o,f)};case 7:return function(e,o,f,i){return n(t,r,u,e,o,f,i)};default:return b(n,[t,r,u])}}(n,t,r,u,e)}function x(t,o){return function(f){let i=e,c=e,a=void 0,s=void 0,l=!1,p=0,b=!1;return m(t,(function(t){var e=s;return"number"==typeof t?1>p?(p=p+1|0,0):b?0:(b=!0,f(0)):t.tag?(t=t[0],void 0!==e?b?0:(a=r(t),l=!1,f(n(1,[[t,u(e)]]))):(a=r(t),l?(l=!1,0):c(0))):(i=t[0],0)})),m(o,(function(t){var e=a;return"number"==typeof t?1>p?(p=p+1|0,0):b?0:(b=!0,f(0)):t.tag?(t=t[0],void 0!==e?b?0:(s=r(t),l=!1,f(n(1,[[u(e),t]]))):(s=r(t),l?(l=!1,0):i(0))):(c=t[0],0)})),f(n(0,[function(n){return b?0:n?(b=!0,i(1),c(1)):l?0:(l=!0,i(n),c(n))}]))}}function y(t){return function(r){return function(o){function f(n){return"number"==typeof n?l?(l=!1,void 0!==(n=i.shift())?m(t(u(n)),f):b?o(0):a?0:(a=!0,c(0))):0:n.tag?l?(o(n),p?(p=!1,0):s(0)):0:(l=!0,s=n=n[0],p=!1,n(0))}let i=[],c=e,a=!1,s=e,l=!1,p=!1,b=!1;return m(r,(function(n){return"number"==typeof n?b?0:(b=!0,!l&&function(n){return 0===n.length}(i)?o(0):0):n.tag?b?0:(n=n[0],a=!1,l?(i.push(n),0):m(t(n),f)):(c=n[0],0)})),o(n(0,[function(n){if(n){if(b||(b=!0,c(1)),l)return l=!1,s(1)}else if(b||a||(a=!0,c(0)),l&&!p)return p=!0,s(0);return 0}]))}}}function h(n){return n}function d(n){return n}function E(n){return n(0)}function k(t){return function(r){return function(u){let o=e,f=!1,i=[],c=!1;return m(r,(function(r){return"number"==typeof r?c?0:(c=!0,0===i.length?u(0):0):r.tag?c?0:(f=!1,function(t){function r(n){return n!==a}let a=e;m(t,(function(t){if("number"==typeof t){if(0!==i.length){if(i=i.filter(r),t=0===i.length,c&&t)return u(0);if(!f&&t)return f=!0,o(0)}return 0}return t.tag?0!==i.length?(u(n(1,[t[0]])),a(0)):0:(a=t=t[0],i=i.concat(t),t(0))}))}(t(r[0])),f?0:(f=!0,o(0))):(o=r[0],0)})),u(n(0,[function(n){return n?(c||(c=!0,o(n)),i.forEach((function(t){return t(n)})),i=[]):(f||c?f=!1:(f=!0,o(0)),i.forEach(E)),0}]))}}}function w(n){return n}function A(n){return n}function S(n){return k(A)(n)}function P(t){return function(r){return function(u){let e=!1;return m(r,(function(r){if("number"==typeof r)return e?0:(e=!0,u(r));if(r.tag)return e?0:(t(r[0]),u(r));var o=r[0];return u(n(0,[function(n){return e?0:(n&&(e=!0),o(n))}]))}))}}}function T(t,r){return function(u){return function(e){let o=r;return m(u,(function(r){return"number"==typeof r?r=0:r.tag?(o=t(o,r[0]),r=n(1,[o])):r=n(0,[r[0]]),e(r)}))}}}function L(n){return n(0)}function M(t){return function(r){return function(u){function o(n){return"number"==typeof n?a?(a=!1,l?u(n):i?0:(i=!0,f(0))):0:n.tag?a?(u(n),s?(s=!1,0):c(0)):0:(a=!0,c=n=n[0],s=!1,n(0))}let f=e,i=!1,c=e,a=!1,s=!1,l=!1;return m(r,(function(n){return"number"==typeof n?l?0:(l=!0,a?0:u(0)):n.tag?l?0:(a&&(c(1),c=e),i?i=!1:(i=!0,f(0)),m(n=t(n[0]),o)):(f=n[0],0)})),u(n(0,[function(n){if(n){if(l||(l=!0,f(1)),a)return a=!1,c(1)}else if(l||i||(i=!0,f(0)),a&&!s)return s=!0,c(0);return 0}]))}}}function C(n){return n}function I(n){return function(t){return function(r){function u(){return i.shift()}let f=e;var i=[];return m(t,(function(t){return"number"==typeof t?o(r,u):t.tag?(i.length>=n&&0<n&&i.shift(),i.push(t[0]),f(0)):(t=t[0],0>=n?(t(1),a(r)):(f=t,t(0)))}))}}}var O=y,U=k,W=S,j=S,D=P,V=P,q=M,z=I;function B(n){return function(t){let r=e,u=!1;return m(t,(function(t){return"number"==typeof t?(u=!0,0):t.tag?u?0:(n(t[0]),r(0)):(r=t=t[0],t(0))})),{unsubscribe:function(n){return u?0:(u=!0,r(1))}}}}function F(n){return 0}var G=B,H="function"==typeof Symbol?Symbol.observable||(Symbol.observable=Symbol("observable")):"@@observable";function J(n){return 0}function K(n,t,r){n.addEventListener(t,r)}function N(n,t,r){n.removeEventListener(t,r)}function Q(t,r){return function(u){var e=K,o=N,f=function(t){return u(n(1,[t]))};return u(n(0,[function(n){return n?g(o,t,r,f):0}])),g(e,t,r,f)}}exports.buffer=function(t){return function(r){return function(u){function o(t){return"number"==typeof t?s?0:(s=!0,i(1),0<f.length&&u(n(1,[f])),u(0)):t.tag?s||0>=f.length?0:(t=f,f=[],u(n(1,[t]))):(c=t[0],0)}let f=[],i=e,c=e,a=!1,s=!1;return m(r,(function(r){return"number"==typeof r?s?0:(s=!0,c(1),0<f.length&&u(n(1,[f])),u(0)):r.tag?s?0:(f.push(r[0]),a?(a=!1,0):(a=!0,i(0),c(0))):(i=r[0],m(t,o))})),u(n(0,[function(n){return s?0:n?(s=!0,i(1),c(1)):a?0:(a=!0,i(0),c(0))}]))}}},exports.combine=function(n,t){return v(x,n,t)},exports.concat=function(n){return y(d)(f(n))},exports.concatAll=function(n){return y(h)(n)},exports.concatMap=O,exports.debounce=function(t){return function(e){return function(o){let f=void 0,i=!1,c=!1;var a=function(n){return void 0!==(n=f)&&(f=void 0,clearTimeout(u(n))),0};return m(e,(function(u){if("number"==typeof u)return c?0:(c=!0,void 0!==f?(i=!0,0):o(0));if(u.tag)return c||(a(),f=r(setTimeout((function(n){return f=void 0,o(u),i?o(0):0}),t(u[0])))),0;var e=u[0];return o(n(0,[function(n){return c?0:n?(c=!0,i=!1,a(),e(1)):e(0)}]))}))}}},exports.delay=function(n){return function(t){return function(r){let u=0;return m(t,(function(t){return"number"==typeof t||t.tag?(u=u+1|0,setTimeout((function(n){return 0!==u?(u=u-1|0,r(t)):0}),n),0):r(t)}))}}},exports.empty=l,exports.filter=function(n){return function(t){return function(r){let u=e;return m(t,(function(t){return"number"==typeof t?r(t):t.tag?n(t[0])?r(t):u(0):(u=t[0],r(t))}))}}},exports.flatten=j,exports.forEach=function(n){return function(t){return B(n)(t),0}},exports.fromArray=s,exports.fromCallbag=function(t){return function(r){return v(t,0,(function(t,u){switch(t){case 0:return r(n(0,[function(n){return u(n?2:1)}]));case 1:return r(n(1,[u]));case 2:return r(0)}}))}},exports.fromDomEvent=function(n,t){return v(Q,n,t)},exports.fromList=function(n){return function(t){let u=n;return o(t,(function(){var n=u;if(n)return u=n[1],r(n[0])}))}},exports.fromObservable=function(t){var r=void 0!==t[H]?t[H]():t;return function(t){var u=r.subscribe({next:function(r){return t(n(1,[r]))},complete:function(){return t(0)},error:J});return t(n(0,[function(n){return n?u.unsubscribe():0}]))}},exports.fromPromise=function(t){return function(r){let u=!1;return t.then((function(t){return u||(r(n(1,[t])),r(0)),Promise.resolve(0)})),r(n(0,[function(n){return n&&(u=!0),0}]))}},exports.fromValue=function(t){return function(r){let u=!1;return r(n(0,[function(e){return e?(u=!0,0):u?0:(u=!0,r(n(1,[t])),r(0))}]))}},exports.interval=function(t){return function(r){let u=0;var e=setInterval((function(t){return t=u,u=u+1|0,r(n(1,[t]))}),t);return r(n(0,[function(n){return n&&clearInterval(e),0}]))}},exports.make=function(t){return function(r){let u=i,e=!1;return u=t({next:function(t){return e?0:r(n(1,[t]))},complete:function(n){return e?0:(e=!0,r(0))}}),r(n(0,[function(n){return n&&!e?(e=!0,u()):0}]))}},exports.makeSubject=function(t){let r=[],u=!1;return{source:function(t){function u(n){return n!==t}return r=r.concat(t),t(n(0,[function(n){return n&&(r=r.filter(u)),0}]))},next:function(t){return u||r.forEach((function(r){return r(n(1,[t]))})),0},complete:function(n){return u||(u=!0,r.forEach(c)),0}}},exports.map=function(t){return function(r){return function(u){return m(r,(function(r){return r="number"==typeof r?0:r.tag?n(1,[t(r[0])]):n(0,[r[0]]),u(r)}))}}},exports.merge=function(n){return k(w)(f(n))},exports.mergeAll=W,exports.mergeMap=U,exports.never=function(t){return t(n(0,[e]))},exports.onEnd=function(t){return function(r){return function(u){let e=!1;return m(r,(function(r){if("number"==typeof r)return e?0:(e=!0,u(r),t());if(r.tag)return e?0:u(r);var o=r[0];return u(n(0,[function(n){return e?0:n?(e=!0,o(n),t()):o(n)}]))}))}}},exports.onPush=D,exports.onStart=function(n){return function(t){return function(r){return m(t,(function(t){return"number"==typeof t||t.tag?r(t):(r(t),n())}))}}},exports.pipe=function(){for(var n=arguments,t=arguments[0],r=1,u=arguments.length;r<u;r++)t=n[r](t);return t},exports.publish=function(n){return B(F)(n)},exports.sample=function(t){return function(o){return function(f){let i=e,c=e,a=void 0,s=!1,l=!1;return m(o,(function(n){return"number"==typeof n?l?0:(l=!0,c(1),f(0)):n.tag?(a=r(n[0]),s?(s=!1,0):(s=!0,c(0),i(0))):(i=n[0],0)})),m(t,(function(t){var r=a;return"number"==typeof t?l?0:(l=!0,i(1),f(0)):t.tag?void 0===r||l?0:(a=void 0,f(n(1,[u(r)]))):(c=t[0],0)})),f(n(0,[function(n){return l?0:n?(l=!0,i(1),c(1)):s?0:(s=!0,i(0),c(0))}]))}}},exports.scan=function(n,t){return v(T,n,t)},exports.share=function(t){function r(n){return"number"==typeof n?(u.forEach(L),u=[]):n.tag?(f=!1,u.forEach((function(t){return t(n)}))):o=n[0],0}let u=[],o=e,f=!1;return function(e){function i(n){return n!==e}return u=u.concat(e),1===u.length&&m(t,r),e(n(0,[function(n){return n?(u=u.filter(i),0===u.length?o(1):0):f?0:(f=!0,o(n))}]))}},exports.skip=function(n){return function(t){return function(r){let u=e,o=n;return m(t,(function(n){return"number"==typeof n?r(n):n.tag?0<o?(o=o-1|0,u(0)):r(n):(u=n[0],r(n))}))}}},exports.skipUntil=function(t){return function(r){return function(u){function o(n){return"number"==typeof n?c?(s=!0,f(1)):0:n.tag?(c=!1,i(1)):(i=n=n[0],n(0))}let f=e,i=e,c=!0,a=!1,s=!1;return m(r,(function(n){return"number"==typeof n?(c&&i(1),s=!0,u(0)):n.tag?c||s?a?(a=!1,0):(a=!0,f(0),i(0)):(a=!1,u(n)):(f=n[0],m(t,o))})),u(n(0,[function(n){return s?0:n?(s=!0,f(1),c?i(1):0):a?0:(a=!0,c&&i(0),f(0))}]))}}},exports.skipWhile=function(n){return function(t){return function(r){let u=e,o=!0;return m(t,(function(t){if("number"==typeof t)return r(t);if(t.tag){if(o){if(n(t[0]))return u(0);o=!1}return r(t)}return u=t[0],r(t)}))}}},exports.subscribe=G,exports.switchAll=function(n){return M(C)(n)},exports.switchMap=q,exports.take=function(t){return function(r){return function(u){let o=!1,f=0,i=e;return m(r,(function(n){return"number"==typeof n?o?0:(o=!0,u(0)):n.tag?f<t&&!o&&(f=f+1|0,u(n),!o&&f>=t)?(o=!0,u(0),i(1)):0:(n=n[0],0>=t?(o=!0,u(0),n(1)):(i=n,0))})),u(n(0,[function(n){return o?0:n?(o=!0,i(1)):f<t?i(0):0}]))}}},exports.takeLast=z,exports.takeUntil=function(t){return function(r){return function(u){function o(n){return"number"==typeof n?0:n.tag?(f=!0,i(1),u(0)):(c=n=n[0],n(0))}let f=!1,i=e,c=e;return m(r,(function(n){return"number"==typeof n?f?0:(f=!0,c(1),u(0)):n.tag?f?0:u(n):(i=n[0],m(t,o))})),u(n(0,[function(n){return f?0:n?(f=!0,i(1),c(1)):i(0)}]))}}},exports.takeWhile=function(n){return function(t){return function(r){let u=e,o=!1;return m(t,(function(t){return"number"==typeof t?o?0:(o=!0,r(0)):t.tag?o?0:n(t[0])?r(t):(o=!0,r(0),u(1)):(u=t[0],r(t))}))}}},exports.tap=V,exports.throttle=function(t){return function(e){return function(o){function f(n){return c=void 0,i=!1,0}let i=!1,c=void 0;var a=function(n){return void 0!==(n=c)&&clearTimeout(u(n)),0};return m(e,(function(u){if("number"==typeof u)return a(),o(0);if(u.tag)return i?0:(i=!0,a(),c=r(setTimeout(f,t(u[0]))),o(u));var e=u[0];return o(n(0,[function(n){return n?(a(),e(1)):e(n)}]))}))}}},exports.toArray=function(n){let t=[],r=e,u=!1;return m(n,(function(n){return"number"==typeof n?(u=!0,0):n.tag?(t.push(n[0]),r(0)):(r=n=n[0],n(0))})),u||r(1),t},exports.toCallbag=function(n){return function(t,r){return 0===t?m(n,(function(n){if("number"==typeof n)return v(r,2,0);if(n.tag)return v(r,1,n[0]);var t=n[0];return v(r,0,(function(n){switch(n){case 0:return 0;case 1:return t(0);case 2:return t(1)}}))})):0}},exports.toObservable=function(n){var t={subscribe:function(t){let r=e,u=!1;return m(n,(function(n){return"number"==typeof n?(u=!0,t.complete()):n.tag?u?0:(t.next(n[0]),r(0)):(r=n=n[0],n(0))})),{unsubscribe:function(){return u?0:(u=!0,r(1))}}}};return t[H]=function(n){return t},t},exports.toPromise=function(n){return new Promise((function(t,r){return m(I(1)(n),(function(n){return"number"==typeof n?0:n.tag?t(n[0]):n[0](0)}))}))}; |
{ | ||
"name": "wonka", | ||
"description": "A fast push & pull stream library for Reason/OCaml, Flow, and TypeScript", | ||
"version": "4.0.0-rc.3", | ||
"version": "4.0.0-rc.4", | ||
"author": "Phil Pluckthun <phil@kitten.sh>", | ||
@@ -34,3 +34,3 @@ "source": "./src/wonka.ts", | ||
"build": "run-s bs:build bundle flowgen", | ||
"prepublishOnly": "run-s clean build bundle flowgen check test" | ||
"prepublishOnly": "run-s clean build check test" | ||
}, | ||
@@ -37,0 +37,0 @@ "keywords": [ |
@@ -481,15 +481,32 @@ | ||
return (function (sink) { | ||
var ended = { | ||
contents: false | ||
}; | ||
return Curry._1(source, (function (signal) { | ||
if (typeof signal === "number") { | ||
sink(signal); | ||
return f(); | ||
if (ended.contents) { | ||
return /* () */0; | ||
} else { | ||
ended.contents = true; | ||
sink(signal); | ||
return f(); | ||
} | ||
} else if (signal.tag) { | ||
return sink(signal); | ||
if (ended.contents) { | ||
return /* () */0; | ||
} else { | ||
return sink(signal); | ||
} | ||
} else { | ||
var talkback = signal[0]; | ||
return sink(/* Start */Block.__(0, [(function (signal) { | ||
if (signal) { | ||
f(); | ||
if (ended.contents) { | ||
return 0; | ||
} else if (signal) { | ||
ended.contents = true; | ||
talkback(signal); | ||
return f(); | ||
} else { | ||
return talkback(signal); | ||
} | ||
return talkback(signal); | ||
})])); | ||
@@ -505,7 +522,33 @@ } | ||
return (function (sink) { | ||
var ended = { | ||
contents: false | ||
}; | ||
return Curry._1(source, (function (signal) { | ||
if (typeof signal !== "number" && signal.tag) { | ||
f(signal[0]); | ||
if (typeof signal === "number") { | ||
if (ended.contents) { | ||
return /* () */0; | ||
} else { | ||
ended.contents = true; | ||
return sink(signal); | ||
} | ||
} else if (signal.tag) { | ||
if (ended.contents) { | ||
return /* () */0; | ||
} else { | ||
f(signal[0]); | ||
return sink(signal); | ||
} | ||
} else { | ||
var talkback = signal[0]; | ||
return sink(/* Start */Block.__(0, [(function (signal) { | ||
if (ended.contents) { | ||
return 0; | ||
} else if (signal) { | ||
ended.contents = true; | ||
return talkback(signal); | ||
} else { | ||
return talkback(signal); | ||
} | ||
})])); | ||
} | ||
return sink(signal); | ||
})); | ||
@@ -512,0 +555,0 @@ }); |
@@ -761,2 +761,3 @@ import * as deriving from './helpers/wonka_deriving'; | ||
passesSourceEnd(noop); | ||
passesStrictEnd(noop); | ||
passesSingleStart(noop); | ||
@@ -785,2 +786,3 @@ passesAsyncSequence(noop); | ||
passesSourceEnd(noop); | ||
passesStrictEnd(noop); | ||
passesSingleStart(noop); | ||
@@ -787,0 +789,0 @@ passesAsyncSequence(noop); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
368067
7795