Comparing version 4.0.14 to 4.0.15
@@ -317,3 +317,7 @@ 'use strict'; | ||
function _ref3$1(a, b, c) { | ||
function _ref2() {} | ||
function _ref3$1() {} | ||
function _ref3$2(a, b, c) { | ||
a.addEventListener(b, c); | ||
@@ -399,5 +403,5 @@ } | ||
__(0, [ | ||
function (a) { | ||
function (c) { | ||
if (!k) { | ||
if (a) { | ||
if (c) { | ||
return (k = !0), f(1), g(1); | ||
@@ -844,17 +848,19 @@ } | ||
var b = { | ||
subscribe: function (b) { | ||
let c = talkbackPlaceholder, | ||
d = !1; | ||
subscribe: function (b, e, d) { | ||
var c = ('object' == typeof b ? b.next.bind(b) : b) || _ref2, | ||
g = ('object' == typeof b ? b.complete.bind(b) : d) || _ref3$1; | ||
let h = talkbackPlaceholder, | ||
k = !1; | ||
a(function (a) { | ||
if ('number' == typeof a) { | ||
return (d = !0), b.complete(); | ||
return (k = !0), g(); | ||
} | ||
if (a.tag) { | ||
if (d) { | ||
if (k) { | ||
return; | ||
} | ||
b.next(a[0]); | ||
return c(0); | ||
c(a[0]); | ||
return h(0); | ||
} | ||
c = a = a[0]; | ||
h = a = a[0]; | ||
a(0); | ||
@@ -864,6 +870,7 @@ }); | ||
unsubscribe: function () { | ||
if (!d) { | ||
return (d = !0), c(1); | ||
if (!k) { | ||
return (this.closed = !1), (k = !0), h(1); | ||
} | ||
}, | ||
closed: !1, | ||
}; | ||
@@ -1045,3 +1052,3 @@ }, | ||
return function (c) { | ||
var e = _ref3$1, | ||
var e = _ref3$2, | ||
d = _ref4$2, | ||
@@ -1181,11 +1188,11 @@ f = function (a) { | ||
return { | ||
source: function (a) { | ||
source: function (c) { | ||
function d(d) { | ||
return d !== a; | ||
return d !== c; | ||
} | ||
b = b.concat(a); | ||
a( | ||
b = b.concat(c); | ||
c( | ||
__(0, [ | ||
function (a) { | ||
a && (b = b.filter(d)); | ||
function (c) { | ||
c && (b = b.filter(d)); | ||
}, | ||
@@ -1197,4 +1204,4 @@ ]) | ||
c || | ||
b.forEach(function (d) { | ||
d(__(1, [a])); | ||
b.forEach(function (c) { | ||
c(__(1, [a])); | ||
}); | ||
@@ -1201,0 +1208,0 @@ }, |
@@ -1,1 +0,1 @@ | ||
"use strict";function n(n,t){return t.tag=n,t}function t(n){}function e(t){return function(e){var r=t.length;let u=!1,o=!1,i=!1,f=0;e(n(0,[function(c){if(c)u=!0;else if(o)i=!0;else{for(o=i=!0;i&&!u;)f<r?(c=t[f],f=f+1|0,i=!1,e(n(1,[c]))):(u=!0,e(0));o=!1}}]))}}function r(){}function u(n){n(0)}function o(t){let e=!1;t(n(0,[function(n){n?e=!0:e||t(0)}]))}var i=e,f=o,c=[];function l(n){return void 0===n?((n=[c,0]).tag=256,n):(null===n||n[0]!==c||((n=[c,n[1]+1|0]).tag=256),n)}function s(n){return null===n||n[0]!==c?n:0!==(n=n[1])?[c,n-1|0]:void 0}function a(e){return function(r){return function(u){function o(n){"number"==typeof n?a&&(a=!1,void 0!==(n=i.shift())?(n=e(s(n)),a=!0,n(o)):b?u(0):c||(c=!0,f(0))):n.tag?a&&(u(n),p?p=!1:l(0)):(l=n=n[0],p=!1,n(0))}let i=[],f=t,c=!1,l=t,a=!1,p=!1,b=!1;r((function(n){"number"==typeof n?b||(b=!0,!a&&function(n){return 0===n.length}(i)&&u(0)):n.tag?b||(n=n[0],c=!1,a?i.push(n):(n=e(n),a=!0,n(o))):f=n[0]})),u(n(0,[function(n){if(n){if(b||(b=!0,f(1)),a)return a=!1,l(1)}else b||c||(c=!0,f(0)),a&&!p&&(p=!0,l(0))}]))}}}function p(n){return n}function b(n){return n}function m(n){return n(0)}function g(e){return function(r){return function(u){let o=t,i=!1,f=[],c=!1;r((function(r){"number"==typeof r?c||(c=!0,0===f.length&&u(0)):r.tag?c||(i=!1,function(e){function r(n){return n!==s}var l=function(t){"number"==typeof t?0!==f.length&&(f=f.filter(r),t=0===f.length,c&&t?u(0):!i&&t&&(i=!0,o(0))):t.tag?0!==f.length&&(u(n(1,[t[0]])),s(0)):(s=t=t[0],f=f.concat(t),t(0))};let s=t;1===e.length?e(l):e.bind(null,l)}(e(r[0])),i||(i=!0,o(0))):o=r[0]})),u(n(0,[function(n){n?(c||(c=!0,o(n)),f.forEach((function(t){return t(n)})),f=[]):(i||c?i=!1:(i=!0,o(0)),f.forEach(m))}]))}}}function v(n){return n}function x(n){return n}function y(n){return g(x)(n)}function h(t){return function(e){return function(r){let u=!1;return e((function(e){if("number"==typeof e)u||(u=!0,r(e));else if(e.tag)u||(t(e[0]),r(e));else{var o=e[0];r(n(0,[function(n){if(!u)return n&&(u=!0),o(n)}]))}}))}}}function d(n){n(0)}function k(e){return function(r){return function(u){function o(n){l&&("number"==typeof n?(l=!1,a?u(n):f||(f=!0,i(0))):n.tag?(u(n),s?s=!1:c(0)):(c=n=n[0],s=!1,n(0)))}let i=t,f=!1,c=t,l=!1,s=!1,a=!1;r((function(n){"number"==typeof n?a||(a=!0,l||u(0)):n.tag?a||(l&&(c(1),c=t),f?f=!1:(f=!0,i(0)),n=e(n[0]),l=!0,n(o)):i=n[0]})),u(n(0,[function(n){if(n){if(a||(a=!0,i(1)),l)return l=!1,c(1)}else a||f||(f=!0,i(0)),l&&!s&&(s=!0,c(0))}]))}}}function E(n){return n}function S(n){return function(r){return function(u){let i=[],f=t;return r((function(t){"number"==typeof t?e(i)(u):t.tag?(i.length>=n&&0<n&&i.shift(),i.push(t[0]),f(0)):(t=t[0],0>=n?(t(1),o(u)):(f=t,t(0)))}))}}}var w=a,A=g,P=y,T=y,L=h,M=h,C=k,I=S;function O(n){return function(e){let r=t,u=!1;return e((function(t){"number"==typeof t?u=!0:t.tag?u||(n(t[0]),r(0)):(r=t=t[0],t(0))})),{unsubscribe:function(n){if(!u)return u=!0,r(1)}}}}function U(n){}var W=O,j="function"==typeof Symbol?Symbol.observable||(Symbol.observable=Symbol("observable")):"@@observable";function D(n){}function V(n,t,e){n.addEventListener(t,e)}function q(n,t,e){n.removeEventListener(t,e)}exports.buffer=function(e){return function(r){return function(u){function o(t){"number"==typeof t?s||(s=!0,f(1),0<i.length&&u(n(1,[i])),u(0)):t.tag?!s&&0<i.length&&(t=i,i=[],u(n(1,[t]))):c=t[0]}let i=[],f=t,c=t,l=!1,s=!1;r((function(t){"number"==typeof t?s||(s=!0,c(1),0<i.length&&u(n(1,[i])),u(0)):t.tag?s||(i.push(t[0]),l?l=!1:(l=!0,f(0),c(0))):(f=t[0],e(o))})),u(n(0,[function(n){if(!s){if(n)return s=!0,f(1),c(1);if(!l)return l=!0,f(0),c(0)}}]))}}},exports.combine=function(e,r){return function(e,r){return function(u){let o=t,i=t,f=void 0,c=void 0,a=!1,p=0,b=!1;e((function(t){var e=c;"number"==typeof t?1>p?p=p+1|0:b||(b=!0,u(0)):t.tag?(t=t[0],void 0!==e?b||(f=l(t),a=!1,u(n(1,[[t,s(e)]]))):(f=l(t),a?a=!1:i(0))):o=t[0]})),r((function(t){var e=f;"number"==typeof t?1>p?p=p+1|0:b||(b=!0,u(0)):t.tag?(t=t[0],void 0!==e?b||(c=l(t),a=!1,u(n(1,[[s(e),t]]))):(c=l(t),a?a=!1:o(0))):i=t[0]})),u(n(0,[function(n){if(!b){if(n)return b=!0,o(1),i(1);if(!a)return a=!0,o(n),i(n)}}]))}}(e,r)},exports.concat=function(n){return a(b)(e(n))},exports.concatAll=function(n){return a(p)(n)},exports.concatMap=w,exports.debounce=function(t){return function(e){return function(r){let u=void 0,o=!1,i=!1;var f=function(n){void 0!==(n=u)&&(u=void 0,clearTimeout(s(n)))};return e((function(e){if("number"==typeof e)i||(i=!0,void 0!==u?o=!0:r(0));else if(e.tag)i||(f(),u=l(setTimeout((function(n){u=void 0,r(e),o&&r(0)}),t(e[0]))));else{var c=e[0];r(n(0,[function(n){if(!i)return n?(i=!0,o=!1,f(),c(1)):c(0)}]))}}))}}},exports.delay=function(n){return function(t){return function(e){let r=0;return t((function(t){"number"==typeof t||t.tag?(r=r+1|0,setTimeout((function(n){0!==r&&(r=r-1|0,e(t))}),n)):e(t)}))}}},exports.empty=f,exports.filter=function(n){return function(e){return function(r){let u=t;return e((function(t){"number"==typeof t?r(t):t.tag?n(t[0])?r(t):u(0):(u=t[0],r(t))}))}}},exports.flatten=T,exports.forEach=function(n){return function(t){O(n)(t)}},exports.fromArray=i,exports.fromCallbag=function(t){return function(e){var r=function(t,r){switch(t){case 0:e(n(0,[function(n){return r(n?2:1)}]));break;case 1:e(n(1,[r]));break;case 2:e(0)}};return 2===t.length?t(0,r):t.bind(null,0,r)}},exports.fromDomEvent=function(t,e){return function(t,e){return function(r){var u=V,o=q,i=function(t){r(n(1,[t]))};return r(n(0,[function(n){if(n)return o(t,e,i)}])),u(t,e,i)}}(t,e)},exports.fromList=function(t){return function(e){let r=!1,u=!1,o=!1,i=t;e(n(0,[function(t){if(t)r=!0;else if(u)o=!0;else{for(u=o=!0;o&&!r;)(t=i)?(i=t[1],o=!1,e(n(1,[t[0]]))):(r=!0,e(0));u=!1}}]))}},exports.fromObservable=function(t){var e=void 0!==t[j]?t[j]():t;return function(t){var r=e.subscribe({next:function(e){t(n(1,[e]))},complete:function(){t(0)},error:D});t(n(0,[function(n){if(n)return r.unsubscribe()}]))}},exports.fromPromise=function(t){return function(e){let r=!1;t.then((function(t){return r||(e(n(1,[t])),e(0)),Promise.resolve(void 0)})),e(n(0,[function(n){n&&(r=!0)}]))}},exports.fromValue=function(t){return function(e){let r=!1;e(n(0,[function(u){u?r=!0:r||(r=!0,e(n(1,[t])),e(0))}]))}},exports.interval=function(t){return function(e){let r=0;var u=setInterval((function(t){t=r,r=r+1|0,e(n(1,[t]))}),t);e(n(0,[function(n){n&&clearInterval(u)}]))}},exports.make=function(t){return function(e){let u=r,o=!1;u=t({next:function(t){o||e(n(1,[t]))},complete:function(n){o||(o=!0,e(0))}}),e(n(0,[function(n){if(n&&!o)return o=!0,u()}]))}},exports.makeSubject=function(t){let e=[],r=!1;return{source:function(t){function r(n){return n!==t}e=e.concat(t),t(n(0,[function(n){n&&(e=e.filter(r))}]))},next:function(t){r||e.forEach((function(e){e(n(1,[t]))}))},complete:function(n){r||(r=!0,e.forEach(u))}}},exports.map=function(t){return function(e){return function(r){return e((function(e){e="number"==typeof e?0:e.tag?n(1,[t(e[0])]):n(0,[e[0]]),r(e)}))}}},exports.merge=function(n){return g(v)(e(n))},exports.mergeAll=P,exports.mergeMap=A,exports.never=function(e){e(n(0,[t]))},exports.onEnd=function(t){return function(e){return function(r){let u=!1;return e((function(e){if("number"==typeof e){if(u)return;return u=!0,r(e),t()}if(e.tag)u||r(e);else{var o=e[0];r(n(0,[function(n){if(!u)return n?(u=!0,o(n),t()):o(n)}]))}}))}}},exports.onPush=L,exports.onStart=function(n){return function(t){return function(e){return t((function(t){"number"==typeof t||t.tag?e(t):(e(t),n())}))}}},exports.pipe=function(){for(var n=arguments,t=arguments[0],e=1,r=arguments.length;e<r;e++)t=n[e](t);return t},exports.publish=function(n){return O(U)(n)},exports.sample=function(e){return function(r){return function(u){let o=t,i=t,f=void 0,c=!1,a=!1;r((function(n){"number"==typeof n?a||(a=!0,i(1),u(0)):n.tag?(f=l(n[0]),c?c=!1:(c=!0,i(0),o(0))):o=n[0]})),e((function(t){var e=f;"number"==typeof t?a||(a=!0,o(1),u(0)):t.tag?void 0===e||a||(f=void 0,u(n(1,[s(e)]))):i=t[0]})),u(n(0,[function(n){if(!a){if(n)return a=!0,o(1),i(1);if(!c)return c=!0,o(0),i(0)}}]))}}},exports.scan=function(t,e){return function(t,e){return function(r){return function(u){let o=e;return r((function(e){"number"==typeof e?e=0:e.tag?(o=t(o,e[0]),e=n(1,[o])):e=n(0,[e[0]]),u(e)}))}}}(t,e)},exports.share=function(e){function r(n){"number"==typeof n?(u.forEach(d),u=[]):n.tag?(i=!1,u.forEach((function(t){t(n)}))):o=n[0]}let u=[],o=t,i=!1;return function(t){function f(n){return n!==t}u=u.concat(t),1===u.length&&e(r),t(n(0,[function(n){if(n){if(u=u.filter(f),0===u.length)return o(1)}else i||(i=!0,o(n))}]))}},exports.skip=function(n){return function(e){return function(r){let u=t,o=n;return e((function(n){"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(e){return function(r){return function(u){function o(n){"number"==typeof n?c&&(s=!0,i(1)):n.tag?(c=!1,f(1)):(f=n=n[0],n(0))}let i=t,f=t,c=!0,l=!1,s=!1;r((function(n){"number"==typeof n?(c&&f(1),s=!0,u(0)):n.tag?c||s?l?l=!1:(l=!0,i(0),f(0)):(l=!1,u(n)):(i=n[0],e(o))})),u(n(0,[function(n){if(!s)if(n){if(s=!0,i(1),c)return f(1)}else l||(l=!0,c&&f(0),i(0))}]))}}},exports.skipWhile=function(n){return function(e){return function(r){let u=t,o=!0;return e((function(t){"number"==typeof t?r(t):t.tag?o?n(t[0])?u(0):(o=!1,r(t)):r(t):(u=t[0],r(t))}))}}},exports.subscribe=W,exports.switchAll=function(n){return k(E)(n)},exports.switchMap=C,exports.take=function(e){return function(r){return function(u){let o=!1,i=0,f=t;r((function(n){"number"==typeof n?o||(o=!0,u(0)):n.tag?i<e&&!o&&(i=i+1|0,u(n),!o&&i>=e&&(o=!0,u(0),f(1))):(n=n[0],0>=e?(o=!0,u(0),n(1)):f=n)})),u(n(0,[function(n){if(!o){if(n)return o=!0,f(1);if(i<e)return f(0)}}]))}}},exports.takeLast=I,exports.takeUntil=function(e){return function(r){return function(u){function o(n){"number"!=typeof n&&(n.tag?(i=!0,f(1),u(0)):(c=n=n[0],n(0)))}let i=!1,f=t,c=t;r((function(n){"number"==typeof n?i||(i=!0,c(1),u(0)):n.tag?i||u(n):(f=n[0],e(o))})),u(n(0,[function(n){if(!i)return n?(i=!0,f(1),c(1)):f(0)}]))}}},exports.takeWhile=function(n){return function(e){return function(r){let u=t,o=!1;return e((function(t){"number"==typeof t?o||(o=!0,r(0)):t.tag?o||(n(t[0])?r(t):(o=!0,r(0),u(1))):(u=t[0],r(t))}))}}},exports.tap=M,exports.throttle=function(t){return function(e){return function(r){function u(n){i=void 0,o=!1}let o=!1,i=void 0;var f=function(n){void 0!==(n=i)&&clearTimeout(s(n))};return e((function(e){if("number"==typeof e)f(),r(0);else if(e.tag)o||(o=!0,f(),i=l(setTimeout(u,t(e[0]))),r(e));else{var c=e[0];r(n(0,[function(n){return n?(f(),c(1)):c(n)}]))}}))}}},exports.toArray=function(n){let e=[],r=t,u=!1;return n((function(n){"number"==typeof n?u=!0:n.tag?(e.push(n[0]),r(0)):(r=n=n[0],n(0))})),u||r(1),e},exports.toCallbag=function(n){return function(t,e){if(0===t)return n((function(n){if("number"==typeof n)return 2===e.length?e(2,void 0):e.bind(null,2,void 0);if(n.tag)return n=n[0],2===e.length?e(1,n):e.bind(null,1,n);var t=n[0];return n=function(n){switch(n){case 1:t(0);break;case 2:t(1)}},2===e.length?e(0,n):e.bind(null,0,n)}))}},exports.toObservable=function(n){var e={subscribe:function(e){let r=t,u=!1;return n((function(n){if("number"==typeof n)return u=!0,e.complete();if(n.tag){if(u)return;return e.next(n[0]),r(0)}r=n=n[0],n(0)})),{unsubscribe:function(){if(!u)return u=!0,r(1)}}}};return e[j]=function(n){return e},e},exports.toPromise=function(n){return new Promise((function(t,e){S(1)(n)((function(n){"number"!=typeof n&&(n.tag?t(n[0]):n[0](0))}))}))}; | ||
"use strict";function n(n,t){return t.tag=n,t}function t(n){}function e(t){return function(e){var r=t.length;let u=!1,o=!1,i=!1,f=0;e(n(0,[function(c){if(c)u=!0;else if(o)i=!0;else{for(o=i=!0;i&&!u;)f<r?(c=t[f],f=f+1|0,i=!1,e(n(1,[c]))):(u=!0,e(0));o=!1}}]))}}function r(){}function u(n){n(0)}function o(t){let e=!1;t(n(0,[function(n){n?e=!0:e||t(0)}]))}var i=e,f=o,c=[];function l(n){return void 0===n?((n=[c,0]).tag=256,n):(null===n||n[0]!==c||((n=[c,n[1]+1|0]).tag=256),n)}function s(n){return null===n||n[0]!==c?n:0!==(n=n[1])?[c,n-1|0]:void 0}function a(e){return function(r){return function(u){function o(n){"number"==typeof n?a&&(a=!1,void 0!==(n=i.shift())?(n=e(s(n)),a=!0,n(o)):b?u(0):c||(c=!0,f(0))):n.tag?a&&(u(n),p?p=!1:l(0)):(l=n=n[0],p=!1,n(0))}let i=[],f=t,c=!1,l=t,a=!1,p=!1,b=!1;r((function(n){"number"==typeof n?b||(b=!0,!a&&function(n){return 0===n.length}(i)&&u(0)):n.tag?b||(n=n[0],c=!1,a?i.push(n):(n=e(n),a=!0,n(o))):f=n[0]})),u(n(0,[function(n){if(n){if(b||(b=!0,f(1)),a)return a=!1,l(1)}else b||c||(c=!0,f(0)),a&&!p&&(p=!0,l(0))}]))}}}function p(n){return n}function b(n){return n}function m(n){return n(0)}function g(e){return function(r){return function(u){let o=t,i=!1,f=[],c=!1;r((function(r){"number"==typeof r?c||(c=!0,0===f.length&&u(0)):r.tag?c||(i=!1,function(e){function r(n){return n!==s}var l=function(t){"number"==typeof t?0!==f.length&&(f=f.filter(r),t=0===f.length,c&&t?u(0):!i&&t&&(i=!0,o(0))):t.tag?0!==f.length&&(u(n(1,[t[0]])),s(0)):(s=t=t[0],f=f.concat(t),t(0))};let s=t;1===e.length?e(l):e.bind(null,l)}(e(r[0])),i||(i=!0,o(0))):o=r[0]})),u(n(0,[function(n){n?(c||(c=!0,o(n)),f.forEach((function(t){return t(n)})),f=[]):(i||c?i=!1:(i=!0,o(0)),f.forEach(m))}]))}}}function v(n){return n}function x(n){return n}function y(n){return g(x)(n)}function h(t){return function(e){return function(r){let u=!1;return e((function(e){if("number"==typeof e)u||(u=!0,r(e));else if(e.tag)u||(t(e[0]),r(e));else{var o=e[0];r(n(0,[function(n){if(!u)return n&&(u=!0),o(n)}]))}}))}}}function d(n){n(0)}function k(e){return function(r){return function(u){function o(n){l&&("number"==typeof n?(l=!1,a?u(n):f||(f=!0,i(0))):n.tag?(u(n),s?s=!1:c(0)):(c=n=n[0],s=!1,n(0)))}let i=t,f=!1,c=t,l=!1,s=!1,a=!1;r((function(n){"number"==typeof n?a||(a=!0,l||u(0)):n.tag?a||(l&&(c(1),c=t),f?f=!1:(f=!0,i(0)),n=e(n[0]),l=!0,n(o)):i=n[0]})),u(n(0,[function(n){if(n){if(a||(a=!0,i(1)),l)return l=!1,c(1)}else a||f||(f=!0,i(0)),l&&!s&&(s=!0,c(0))}]))}}}function E(n){return n}function S(n){return function(r){return function(u){let i=[],f=t;return r((function(t){"number"==typeof t?e(i)(u):t.tag?(i.length>=n&&0<n&&i.shift(),i.push(t[0]),f(0)):(t=t[0],0>=n?(t(1),o(u)):(f=t,t(0)))}))}}}var w=a,A=g,P=y,T=y,L=h,j=h,M=k,C=S;function I(n){return function(e){let r=t,u=!1;return e((function(t){"number"==typeof t?u=!0:t.tag?u||(n(t[0]),r(0)):(r=t=t[0],t(0))})),{unsubscribe:function(n){if(!u)return u=!0,r(1)}}}}function O(n){}var U=I,W="function"==typeof Symbol?Symbol.observable||(Symbol.observable=Symbol("observable")):"@@observable";function D(n){}function V(){}function q(){}function z(n,t,e){n.addEventListener(t,e)}function B(n,t,e){n.removeEventListener(t,e)}exports.buffer=function(e){return function(r){return function(u){function o(t){"number"==typeof t?s||(s=!0,f(1),0<i.length&&u(n(1,[i])),u(0)):t.tag?!s&&0<i.length&&(t=i,i=[],u(n(1,[t]))):c=t[0]}let i=[],f=t,c=t,l=!1,s=!1;r((function(t){"number"==typeof t?s||(s=!0,c(1),0<i.length&&u(n(1,[i])),u(0)):t.tag?s||(i.push(t[0]),l?l=!1:(l=!0,f(0),c(0))):(f=t[0],e(o))})),u(n(0,[function(n){if(!s){if(n)return s=!0,f(1),c(1);if(!l)return l=!0,f(0),c(0)}}]))}}},exports.combine=function(e,r){return function(e,r){return function(u){let o=t,i=t,f=void 0,c=void 0,a=!1,p=0,b=!1;e((function(t){var e=c;"number"==typeof t?1>p?p=p+1|0:b||(b=!0,u(0)):t.tag?(t=t[0],void 0!==e?b||(f=l(t),a=!1,u(n(1,[[t,s(e)]]))):(f=l(t),a?a=!1:i(0))):o=t[0]})),r((function(t){var e=f;"number"==typeof t?1>p?p=p+1|0:b||(b=!0,u(0)):t.tag?(t=t[0],void 0!==e?b||(c=l(t),a=!1,u(n(1,[[s(e),t]]))):(c=l(t),a?a=!1:o(0))):i=t[0]})),u(n(0,[function(n){if(!b){if(n)return b=!0,o(1),i(1);if(!a)return a=!0,o(n),i(n)}}]))}}(e,r)},exports.concat=function(n){return a(b)(e(n))},exports.concatAll=function(n){return a(p)(n)},exports.concatMap=w,exports.debounce=function(t){return function(e){return function(r){let u=void 0,o=!1,i=!1;var f=function(n){void 0!==(n=u)&&(u=void 0,clearTimeout(s(n)))};return e((function(e){if("number"==typeof e)i||(i=!0,void 0!==u?o=!0:r(0));else if(e.tag)i||(f(),u=l(setTimeout((function(n){u=void 0,r(e),o&&r(0)}),t(e[0]))));else{var c=e[0];r(n(0,[function(n){if(!i)return n?(i=!0,o=!1,f(),c(1)):c(0)}]))}}))}}},exports.delay=function(n){return function(t){return function(e){let r=0;return t((function(t){"number"==typeof t||t.tag?(r=r+1|0,setTimeout((function(n){0!==r&&(r=r-1|0,e(t))}),n)):e(t)}))}}},exports.empty=f,exports.filter=function(n){return function(e){return function(r){let u=t;return e((function(t){"number"==typeof t?r(t):t.tag?n(t[0])?r(t):u(0):(u=t[0],r(t))}))}}},exports.flatten=T,exports.forEach=function(n){return function(t){I(n)(t)}},exports.fromArray=i,exports.fromCallbag=function(t){return function(e){var r=function(t,r){switch(t){case 0:e(n(0,[function(n){return r(n?2:1)}]));break;case 1:e(n(1,[r]));break;case 2:e(0)}};return 2===t.length?t(0,r):t.bind(null,0,r)}},exports.fromDomEvent=function(t,e){return function(t,e){return function(r){var u=z,o=B,i=function(t){r(n(1,[t]))};return r(n(0,[function(n){if(n)return o(t,e,i)}])),u(t,e,i)}}(t,e)},exports.fromList=function(t){return function(e){let r=!1,u=!1,o=!1,i=t;e(n(0,[function(t){if(t)r=!0;else if(u)o=!0;else{for(u=o=!0;o&&!r;)(t=i)?(i=t[1],o=!1,e(n(1,[t[0]]))):(r=!0,e(0));u=!1}}]))}},exports.fromObservable=function(t){var e=void 0!==t[W]?t[W]():t;return function(t){var r=e.subscribe({next:function(e){t(n(1,[e]))},complete:function(){t(0)},error:D});t(n(0,[function(n){if(n)return r.unsubscribe()}]))}},exports.fromPromise=function(t){return function(e){let r=!1;t.then((function(t){return r||(e(n(1,[t])),e(0)),Promise.resolve(void 0)})),e(n(0,[function(n){n&&(r=!0)}]))}},exports.fromValue=function(t){return function(e){let r=!1;e(n(0,[function(u){u?r=!0:r||(r=!0,e(n(1,[t])),e(0))}]))}},exports.interval=function(t){return function(e){let r=0;var u=setInterval((function(t){t=r,r=r+1|0,e(n(1,[t]))}),t);e(n(0,[function(n){n&&clearInterval(u)}]))}},exports.make=function(t){return function(e){let u=r,o=!1;u=t({next:function(t){o||e(n(1,[t]))},complete:function(n){o||(o=!0,e(0))}}),e(n(0,[function(n){if(n&&!o)return o=!0,u()}]))}},exports.makeSubject=function(t){let e=[],r=!1;return{source:function(t){function r(n){return n!==t}e=e.concat(t),t(n(0,[function(n){n&&(e=e.filter(r))}]))},next:function(t){r||e.forEach((function(e){e(n(1,[t]))}))},complete:function(n){r||(r=!0,e.forEach(u))}}},exports.map=function(t){return function(e){return function(r){return e((function(e){e="number"==typeof e?0:e.tag?n(1,[t(e[0])]):n(0,[e[0]]),r(e)}))}}},exports.merge=function(n){return g(v)(e(n))},exports.mergeAll=P,exports.mergeMap=A,exports.never=function(e){e(n(0,[t]))},exports.onEnd=function(t){return function(e){return function(r){let u=!1;return e((function(e){if("number"==typeof e){if(u)return;return u=!0,r(e),t()}if(e.tag)u||r(e);else{var o=e[0];r(n(0,[function(n){if(!u)return n?(u=!0,o(n),t()):o(n)}]))}}))}}},exports.onPush=L,exports.onStart=function(n){return function(t){return function(e){return t((function(t){"number"==typeof t||t.tag?e(t):(e(t),n())}))}}},exports.pipe=function(){for(var n=arguments,t=arguments[0],e=1,r=arguments.length;e<r;e++)t=n[e](t);return t},exports.publish=function(n){return I(O)(n)},exports.sample=function(e){return function(r){return function(u){let o=t,i=t,f=void 0,c=!1,a=!1;r((function(n){"number"==typeof n?a||(a=!0,i(1),u(0)):n.tag?(f=l(n[0]),c?c=!1:(c=!0,i(0),o(0))):o=n[0]})),e((function(t){var e=f;"number"==typeof t?a||(a=!0,o(1),u(0)):t.tag?void 0===e||a||(f=void 0,u(n(1,[s(e)]))):i=t[0]})),u(n(0,[function(n){if(!a){if(n)return a=!0,o(1),i(1);if(!c)return c=!0,o(0),i(0)}}]))}}},exports.scan=function(t,e){return function(t,e){return function(r){return function(u){let o=e;return r((function(e){"number"==typeof e?e=0:e.tag?(o=t(o,e[0]),e=n(1,[o])):e=n(0,[e[0]]),u(e)}))}}}(t,e)},exports.share=function(e){function r(n){"number"==typeof n?(u.forEach(d),u=[]):n.tag?(i=!1,u.forEach((function(t){t(n)}))):o=n[0]}let u=[],o=t,i=!1;return function(t){function f(n){return n!==t}u=u.concat(t),1===u.length&&e(r),t(n(0,[function(n){if(n){if(u=u.filter(f),0===u.length)return o(1)}else i||(i=!0,o(n))}]))}},exports.skip=function(n){return function(e){return function(r){let u=t,o=n;return e((function(n){"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(e){return function(r){return function(u){function o(n){"number"==typeof n?c&&(s=!0,i(1)):n.tag?(c=!1,f(1)):(f=n=n[0],n(0))}let i=t,f=t,c=!0,l=!1,s=!1;r((function(n){"number"==typeof n?(c&&f(1),s=!0,u(0)):n.tag?c||s?l?l=!1:(l=!0,i(0),f(0)):(l=!1,u(n)):(i=n[0],e(o))})),u(n(0,[function(n){if(!s)if(n){if(s=!0,i(1),c)return f(1)}else l||(l=!0,c&&f(0),i(0))}]))}}},exports.skipWhile=function(n){return function(e){return function(r){let u=t,o=!0;return e((function(t){"number"==typeof t?r(t):t.tag?o?n(t[0])?u(0):(o=!1,r(t)):r(t):(u=t[0],r(t))}))}}},exports.subscribe=U,exports.switchAll=function(n){return k(E)(n)},exports.switchMap=M,exports.take=function(e){return function(r){return function(u){let o=!1,i=0,f=t;r((function(n){"number"==typeof n?o||(o=!0,u(0)):n.tag?i<e&&!o&&(i=i+1|0,u(n),!o&&i>=e&&(o=!0,u(0),f(1))):(n=n[0],0>=e?(o=!0,u(0),n(1)):f=n)})),u(n(0,[function(n){if(!o){if(n)return o=!0,f(1);if(i<e)return f(0)}}]))}}},exports.takeLast=C,exports.takeUntil=function(e){return function(r){return function(u){function o(n){"number"!=typeof n&&(n.tag?(i=!0,f(1),u(0)):(c=n=n[0],n(0)))}let i=!1,f=t,c=t;r((function(n){"number"==typeof n?i||(i=!0,c(1),u(0)):n.tag?i||u(n):(f=n[0],e(o))})),u(n(0,[function(n){if(!i)return n?(i=!0,f(1),c(1)):f(0)}]))}}},exports.takeWhile=function(n){return function(e){return function(r){let u=t,o=!1;return e((function(t){"number"==typeof t?o||(o=!0,r(0)):t.tag?o||(n(t[0])?r(t):(o=!0,r(0),u(1))):(u=t[0],r(t))}))}}},exports.tap=j,exports.throttle=function(t){return function(e){return function(r){function u(n){i=void 0,o=!1}let o=!1,i=void 0;var f=function(n){void 0!==(n=i)&&clearTimeout(s(n))};return e((function(e){if("number"==typeof e)f(),r(0);else if(e.tag)o||(o=!0,f(),i=l(setTimeout(u,t(e[0]))),r(e));else{var c=e[0];r(n(0,[function(n){return n?(f(),c(1)):c(n)}]))}}))}}},exports.toArray=function(n){let e=[],r=t,u=!1;return n((function(n){"number"==typeof n?u=!0:n.tag?(e.push(n[0]),r(0)):(r=n=n[0],n(0))})),u||r(1),e},exports.toCallbag=function(n){return function(t,e){if(0===t)return n((function(n){if("number"==typeof n)return 2===e.length?e(2,void 0):e.bind(null,2,void 0);if(n.tag)return n=n[0],2===e.length?e(1,n):e.bind(null,1,n);var t=n[0];return n=function(n){switch(n){case 1:t(0);break;case 2:t(1)}},2===e.length?e(0,n):e.bind(null,0,n)}))}},exports.toObservable=function(n){var e={subscribe:function(e,r,u){var o=("object"==typeof e?e.next.bind(e):e)||V,i=("object"==typeof e?e.complete.bind(e):u)||q;let f=t,c=!1;return n((function(n){if("number"==typeof n)return c=!0,i();if(n.tag){if(c)return;return o(n[0]),f(0)}f=n=n[0],n(0)})),{unsubscribe:function(){if(!c)return this.closed=!1,c=!0,f(1)},closed:!1}}};return e[W]=function(n){return e},e},exports.toPromise=function(n){return new Promise((function(t,e){S(1)(n)((function(n){"number"!=typeof n&&(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.14", | ||
"version": "4.0.15", | ||
"author": "Phil Pluckthun <phil@kitten.sh>", | ||
@@ -17,3 +17,4 @@ "source": "./src/Wonka.ts", | ||
}, | ||
"./package.json": "./package.json" | ||
"./package.json": "./package.json", | ||
"./": "./" | ||
}, | ||
@@ -27,3 +28,2 @@ "sideEffects": false, | ||
"index.js.flow", | ||
"esy.lock", | ||
"dune-project", | ||
@@ -30,0 +30,0 @@ "wonka.opam", |
@@ -38,3 +38,5 @@ | ||
var observable = { | ||
subscribe: (function (observer) { | ||
subscribe: (function (_observer) { | ||
var next = ((typeof _observer === 'object' ? _observer.next.bind(_observer) : _observer) || function () {}); | ||
var complete = ((typeof _observer === 'object' ? _observer.complete.bind(_observer) : arguments[2]) || function () {}); | ||
var state = { | ||
@@ -47,7 +49,7 @@ talkback: Wonka_helpers.talkbackPlaceholder, | ||
state.ended = true; | ||
return observer.complete(); | ||
return complete(); | ||
} | ||
if (signal.tag) { | ||
if (!state.ended) { | ||
observer.next(signal[0]); | ||
next(signal[0]); | ||
return state.talkback(/* Pull */0); | ||
@@ -62,11 +64,15 @@ } else { | ||
})); | ||
return { | ||
unsubscribe: (function () { | ||
if (!state.ended) { | ||
state.ended = true; | ||
return state.talkback(/* Close */1); | ||
} | ||
}) | ||
}; | ||
var subscription = { | ||
unsubscribe: (function () { | ||
var self = this ; | ||
if (!state.ended) { | ||
self["closed"] = false; | ||
state.ended = true; | ||
return state.talkback(/* Close */1); | ||
} | ||
}) | ||
}; | ||
subscription["closed"] = false; | ||
return subscription; | ||
}) | ||
@@ -73,0 +79,0 @@ }; |
Sorry, the diff of this file is not supported yet
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
7591
348827
108