Comparing version 3.2.9 to 3.2.10
# Changelog | ||
## 3.2.10 | ||
- fix: sources added to npm package as source maps in compiled version was referencing it | ||
## 3.2.9 | ||
@@ -4,0 +8,0 @@ |
@@ -56,7 +56,10 @@ "use strict"; | ||
Dispatcher.prototype.tooManyCalls = function () { | ||
'If you see this, that means your code streamed many subsequent messages.'; | ||
'This situation might be harmful, as it may introduce serious lag of your app.'; | ||
'This is just a warning and a way to introduce a break, so you won\'t end up with unresponsive app'; | ||
'Please handle this situation and limit how many messages are pushed at once if possible.'; | ||
debugger; | ||
if (typeof console === 'undefined' || !console || !console.warn) { | ||
return; | ||
} | ||
console.warn(['If you see this, that means your code streamed many subsequent messages.', | ||
'This situation might be harmful, as it may introduce serious lag of your app.', | ||
'This is just a warning and a way to introduce a break, so you won\'t end up with unresponsive app', | ||
'Please handle this situation and limit how many messages are pushed at once if possible.',].join('\r\n')); | ||
}; | ||
@@ -63,0 +66,0 @@ Dispatcher.prototype.findNextTask = function () { |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.immview=e():t.immview=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=15)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.ATOM=-2]="ATOM",t[t.OBSERVABLE=1]="OBSERVABLE",t[t.ACTION=2]="ACTION",t[t.BUFFER=3]="BUFFER",t[t.EXTERNAL=4]="EXTERNAL",t[t.DIAGNOSE=5]="DIAGNOSE",t[t.ALL=10]="ALL"}(e.DispatcherPriorities||(e.DispatcherPriorities={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),o=n(0),i=new r.Dispatcher;e.dispatcher=i;var s=function(t,e){i.push(t,e),i.run()};e.dispatch=s;var u=function(){return new Promise(function(t){return s(t,o.DispatcherPriorities.ALL)})};e.flush=u;var a=function(t,e){return new Promise(function(n,r){var o,i,u;s(function(){try{i=t(),o=!0}catch(t){u=t,o=!1}},e),s(function(){o?n(i):r(u)},e)})};e.dispatchAndReturn=a},function(t,e,n){"use strict";var r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){this.list=null,this.tableIsRequested=!1}return Object.defineProperty(t.prototype,"isOn",{get:function(){return void 0!==this.list},enumerable:!0,configurable:!0}),t.prototype.on=function(t){if(void 0===t&&(t={}),!window.performance)throw new Error("Performance measurements are not available in this environment");this.options=r({tableDetails:!0,tableSummary:!0,tableClear:!0,timeline:!0},t),this.list=[]},t.prototype.off=function(){this.list=null,this.tableIsRequested=!1},t.prototype.measure=function(t){var e=this;if(this.list){if((this.options.tableDetails||this.options.tableSummary)&&!this.tableIsRequested){this.tableIsRequested=!0;var n=setInterval(function(){if(!e.tableIsRequested||null===e.list||0===e.list.length)return e.tableIsRequested=!1,void clearInterval(n);var t=e.list.splice(0).reduce(function(t,e){for(var n=0,o=t;n<o.length;n++){var i=o[n],s=function(n){if(n["action name"]===e["action name"])return{value:t.map(function(t){return t!==n?t:r({},n,{"duration in ms":n["duration in ms"]+e["duration in ms"],occurences:n.occurences+1})})}}(i);if("object"==typeof s)return s.value}return t.concat([r({},e,{occurences:1})])},[]);e.options.tableClear&&console.clear(),e.options.tableDetails&&console.table(t.map(function(t){return{"action name":t["action name"],duration:t["duration in ms"]+" ms",occurences:t.occurences,"avg duration":t["duration in ms"]/t.occurences+" ms"}}));var o=t.reduce(function(t,e){return t+e["duration in ms"]},0);e.options.tableSummary&&console.table({all:{"duration in ms":o,"est. duration budget":500,"est. duration budget usage":o/500*100+"%"}})},1e3)}this.options.timeline&&window.performance.mark(t+"_start");var o=(this.options.tableDetails||this.options.tableSummary)&&window.performance.now();return function(){(e.options.tableDetails||e.options.tableSummary)&&e.list.push({"action name":t,"duration in ms":window.performance.now()-o}),e.options.timeline&&(window.performance.mark(t+"_end"),window.performance.measure(t,t+"_start",t+"_end"))}}},t}();e.Diagnose=o,e.diagnose=new o},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),i=n(4),s=n(7),u="undefined"!=typeof Symbol?Symbol("AtomSymbol"):"AtomSymbol",a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.of=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.from(t)},e.from=function(t){if(t[u]){var n=t[u](),r=new e(n.deref());return n.subscribe(r),r.name=this.name+" โ๐",r}if(t[Symbol.iterator]){for(var o=t[Symbol.iterator](),i=void 0,s=o.next();!1===s.done;s=o.next())i=s.value;var r=new e(i);return t.toString()&&(r.name=t.toString()),r.complete(),r}throw new Error("Atom.from incorrect input")},e.prototype.toPromise=function(){return this.then()},e.prototype.map=function(t){var n=t(this.deref()),r=new e(n),o=!1;return s.map(this,r,function(e){return o?t(e):(o=!0,n)}),r},e.prototype.flatten=function(){var t=new e(this.deref().deref());return s.flatten(this,t),t},e.prototype.scan=function(t,n){var r=new e(n);return s.scan(this,r,t,n),r},e.prototype.filter=function(t){var n=new e(this.deref()),r=function(e){return r=t,!0};return s.filter(this,n,function(t){return r(t)}),n},e.prototype.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=new e(this.deref());return s.merge([this].concat(t),r),r},e.prototype.distinct=function(t){var n=new e(this.deref());return t?s.distinct(this,n,t):s.distinct(this,n),n},e.prototype.buffer=function(t){var n=new e([this.deref()]);return s.buffer(this,n,t),n},e.prototype.materialize=function(t){return this},e.prototype.vaporize=function(){var t=new i.Observable;return this.subscribe(t),t},e}(o.BaseAtom);e.Atom=a,a.prototype[u]=function(){return this}},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(13),i=n(3),s=n(7),u="undefined"!=typeof Symbol?Symbol("ObservableSymbol"):"ObservableSymbol",a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.of=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.from(t)},e.from=function(t){if(t[u]){var n=t[u](),r=new e;return n.subscribe(r),r.name=this.name+" โ๐",r}if(t[Symbol.iterator]){var r=new e(function(e){for(var n=e.next,r=e.error,o=e.complete,i=t[Symbol.iterator](),s=i.next();!1===s.done;s=i.next())s.value instanceof Error?r(s.value):n(s.value);o()});return t.toString()&&(r.name=t.toString()),r}throw new Error("Observable.from incorrect input")},e.fromPromise=function(t){var n=new e(function(e){t.then(e.next,e.error).then(e.complete)});return n.name="Promise",n},e.prototype.startWith=function(t){var n=new e;return n.next(t),this.subscribe(n),n.name=this.name+" โน๏ธโโน๏ธโน๏ธโน๏ธโฆ",n},e.prototype.reemit=function(){var t=new e;return this.hasRef()&&t.next(this.deref()),this.subscribe(t),t.name=this.name+" ๐ฃ",t},e.prototype.toPromise=function(){return this.then()},e.prototype.map=function(t){var n=new e;return s.map(this,n,t),n},e.prototype.flatten=function(){var t=new e;return s.flatten(this,t),t},e.prototype.scan=function(t,n){var r=new e;return s.scan(this,r,t,n),r},e.prototype.filter=function(t){var n=new e;return s.filter(this,n,t),n},e.prototype.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=new e;return s.merge([this].concat(t),r),r},e.prototype.distinct=function(t){var n=new e;return s.distinct(this,n,t),n},e.prototype.bufferCount=function(t,n){var r=new e;return s.bufferCount(this,r,t,n),r},e.prototype.buffer=function(t){var n=new e;return s.buffer(this,n,t),n},e.prototype.materialize=function(t){var e=new i.Atom(t);return this.subscribe(e),e.name=this.name+" โ๏ธ",e},e.prototype.vaporize=function(){return this},e}(o.BaseObservable);e.Observable=a,a.prototype[u]=function(){return this}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NO_VALUE={},function(t){t[t.Next=0]="Next",t[t.Error=1]="Error",t[t.Complete=2]="Complete"}(e.MessageTypes||(e.MessageTypes={}))},function(t,e,n){"use strict";function r(t){if("object"!=typeof t[0]||null===t[0]){var e=t,n=e[0],r=e[1],o=e[2];return{start:i,next:n||i,error:r||i,complete:o||i}}var s=t[0];return s.start=s.start||i,s.next=s.next||i,s.error=s.error||i,s.complete=s.complete||i,s}function o(){return++f}function i(){}Object.defineProperty(e,"__esModule",{value:!0});var s=n(2),u=n(5);try{!function(){void 0===Symbol.asyncIterator&&Object.assign(Symbol,{asyncIterator:Symbol("Symbol.asyncIterator")})}()}catch(t){}var a=function(){return!0},c=function(){function t(t){this.dispatch=t,this.closed=!1,this.name=o()+"$",this.observers=[],this.awaitingMessages=[]}return t.prototype.ref=function(t){this.deref=function(){return t},this.hasRef=a,this.observers.forEach(function(e){return e.next(t)})},t.prototype.deref=function(){return null},t.prototype.hasRef=function(){return!1},t.prototype.start=function(t){},t.prototype.next=function(t){this.closed||(this.awaitingMessages.push([u.MessageTypes.Next,t]),this.dispatch(this.flush))},t.prototype.error=function(t){this.closed||(this.awaitingMessages.push([u.MessageTypes.Error,t]),this.dispatch(this.flush))},t.prototype.complete=function(){this.closed||(this.awaitingMessages.push([u.MessageTypes.Complete,void 0]),this.dispatch(this.flush))},t.prototype.addSubscription=function(t){this.observers.push(t);var e=this;return{unsubscribe:function(){var n;(n=e.observers.indexOf(t))<0||e.observers.splice(n,1)},get closed(){return-1===e.observers.indexOf(t)}}},t.prototype.swallow=function(t,e){switch(t){case u.MessageTypes.Next:var n=e;if("function"==typeof n){var r=s.diagnose.isOn&&s.diagnose.measure(this.name+" next("+(n.name||"")+")"),o=n(this.deref());r&&r(),this.ref(o)}else this.ref(n);break;case u.MessageTypes.Error:var i=e;this.observers.forEach(function(t){return t.error(i)});break;case u.MessageTypes.Complete:this.closed=!0,this.awaitingMessages.splice(0),this.observers.splice(0).forEach(function(t){return t.complete()})}},t.prototype[Symbol.asyncIterator]=function(){function t(){for(;r.length&&n.length;)r[0].done?n.shift()(r[0]):n.shift()(r.shift())}var e=this,n=[],r=[],o=null;return this.subscribe({start:function(t){o=t},next:function(n){e.closed||r.push({done:!1,value:n}),t()},complete:function(){r.push({done:!0,value:e.deref()}),t()}}),{next:function(){var e=new Promise(function(t){n.push(t)});return t(),e},throw:function(t){return o.unsubscribe(),Promise.resolve({done:!0,value:e.deref()})},return:function(){return o.unsubscribe(),Promise.resolve({done:!0,value:e.deref()})}}},t.prototype.then=function(t,e){var n=this;return new Promise(function(t,e){var r;n.subscribe({start:function(t){r=t},next:function(e){r.unsubscribe(),t(e)},error:function(t){r.unsubscribe(),e(t)},complete:function(){r.unsubscribe(),e(new Error("no value emitted"))}})}).then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t}();e.Base=c,e.normalizeToObserver=r;var f=0},function(t,e,n){"use strict";function r(){}function o(t,e,n){var r=null;return t.subscribe({start:function(t){r=t,n.start(r)},next:function(t){if(e.closed)return void r.unsubscribe();n.next(t)},error:function(t){if(e.closed)return void r.unsubscribe();n.error(t)},complete:function(){if(e.closed)return void r.unsubscribe();n.complete()}}),r}function i(t,e,n){o(t,e,{start:r,next:function(t){try{var r=h.diagnose.isOn&&h.diagnose.measure("$> "+e.name),o=n(t);r&&r(),e.next(o)}catch(t){e.error(t)}},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" โก๏ธ "+n.name}function s(t,e){o(t,e,{start:r,next:function(t){t&&t.subscribe(function(t){e.next(t)},function(t){return e.error(t)})},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" ๐๏ธ"}function u(t,e,n,i){var s=i,u=0;o(t,e,{start:r,next:function(t){try{s=n(s,t,u++),e.next(s)}catch(t){e.error(t)}},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" โคต๏ธ "+n.name}function a(t,e,n){o(t,e,{start:r,next:function(t){try{n(t)&&e.next(t)}catch(t){e.error(t)}},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" ๐ "+n.name}function c(t,e){for(var n=0,i={start:r,next:function(t){e.next(t)},error:function(t){e.error(t)},complete:function(){++n===t.length&&e.complete()}},s=0,u=t;s<u.length;s++)o(u[s],e,i);e.name="(๐ "+t.map(function(t){return t.name}).join(",")+" )"}function f(t,e,n){var i,s=!1;o(t,e,{start:r,next:function(t){if(s)if(n){if(!n(i,t))return}else if(i===t)return;s=!0,i=t,e.next(t)},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" ๐ "+(n?n.name?n.name:"(unnamed)":"(reference)")}function p(t,e,n,i){var s=void 0===i?n:i,u=[];o(t,e,{start:r,next:function(t){u.push(t),u.length===n&&(e.next(u.slice()),u=u.splice(s,n-s))},error:function(t){e.error(t)},complete:function(){u.length>n-s&&e.next(u.slice()),e.complete()}}),e.name=t.name+" ๐ค"+n+","+s}function l(t,e,n){void 0===n&&(n=0);var i=[];o(t,e,{start:r,next:function(t){i=n>0?[t].concat(i).splice(0,n):[t].concat(i),m.dispatch(function(){0!==i.length&&e.next(i.splice(0).reverse())},b.DispatcherPriorities.BUFFER)},error:function(t){e.error(t)},complete:function(){i.length>0&&e.next(i.splice(0).reverse()),e.complete()}}),e.name=t.name+" ๐ค"}Object.defineProperty(e,"__esModule",{value:!0});var h=n(2),b=n(0),m=n(1);e.map=i,e.flatten=s,e.scan=u,e.filter=a,e.merge=c,e.distinct=f,e.bufferCount=p,e.buffer=l},function(t,e,n){"use strict";function r(t,e){var n={};return o(t,function(t,r){n[r]=e(t,r)}),n}function o(t,e){for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))return;e(t[n],n)}}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,"__esModule",{value:!0});var u=n(3),a=function(t){function e(e){var n=this,i=[];return n=t.call(this,r(e,function(t,e){return t.deref()}))||this,n.sources=e,n.subs=[],o(e,function(t,e){i.push({key:e,name:t.name}),n.subs.push(t.subscribe(function(t){n.next(function(n){return s({},n,(r={},r[e]=t,r));var r})},function(t){n.error(t)},function(){n.complete()}))}),n.name="{"+i.map(function(t){var e=t.key,n=t.name;return n||n===e?e:e+": "+n}).join(", ")+"}",n}return i(e,t),e.prototype.complete=function(){this.subs.splice(0).forEach(function(t){!t.closed&&t.unsubscribe()}),u.Atom.prototype.complete.call(this)},e}(u.Atom);e.Combine=a},function(t,e,n){"use strict";function r(t,e,n){var r=n.value;n.value=function(){for(var t=this,n=[],u=0;u<arguments.length;u++)n[u]=arguments[u];return i.dispatchAndReturn(function(){var o=s.diagnose.measure("<$ "+(t.name?t.name+".":"")+e),i=r.apply(t,n);return o&&o(),i},o.DispatcherPriorities.ACTION)}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),i=n(1),s=n(2);e.action=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(2);try{!function(){void 0===Symbol.asyncIterator&&Object.assign(Symbol,{asyncIterator:Symbol("Symbol.asyncIterator")})}()}catch(t){}var s=function(){function t(t){if(this.$=t,!t)throw new Error("Domain cannot be created without a (Observable/Atom/Domain) source")}return t.create=function(e,n,s){var u=new t(e);if(u.name=u.$.name+"$!",n)for(var a in n)!function(t){var e=t;if(!Object.prototype.hasOwnProperty.call(n,t))return"continue";u[t]=function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o.dispatchAndReturn(function(){var r=i.diagnose.measure("<$ "+(u.name?u.name+".":"")+e),o=n[t].apply(u,s);return r&&r(),o},r.DispatcherPriorities.ACTION)}}(a);if(s)for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(u[c]=s[c]);return u},t.prototype.start=function(t){this.$.start(t)},t.prototype.next=function(t){this.$.next(t)},t.prototype.error=function(t){this.$.error(t)},t.prototype.complete=function(){this.$.complete()},Object.defineProperty(t.prototype,"closed",{get:function(){return this.$.closed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"observers",{get:function(){return this.$.observers},enumerable:!0,configurable:!0}),t.prototype.subscribe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(n=this.$).subscribe.apply(n,t);var n},t.prototype.ref=function(t){this.$.ref(t)},t.prototype.deref=function(){return this.$.deref()},t.prototype.hasRef=function(){return this.$.hasRef()},t.prototype.toPromise=function(){return this.$.toPromise()},t.prototype.map=function(t){return this.$.map(t)},t.prototype.flatten=function(){return this.$.flatten()},t.prototype.scan=function(t,e){return this.$.scan(t,e)},t.prototype.filter=function(t){return this.$.filter(t)},t.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(n=this.$).merge.apply(n,t);var n},t.prototype.distinct=function(t){return this.distinct(t)},t.prototype.buffer=function(t){return this.$.buffer(t)},t.prototype.materialize=function(t){return this.$.materialize(t)},t.prototype.vaporize=function(){return this.$.vaporize()},t.prototype[Symbol.asyncIterator]=function(){return this.$[Symbol.asyncIterator]()},t.prototype.then=function(t,e){return this.$.toPromise().then(t,e)},t}();e.Domain=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(s,u)}a((r=r.apply(t,e||[])).next())})},o=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(i,n[1])).done)return s;switch(i=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,i=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(s=a.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){a.label=n[1];break}if(6===n[0]&&a.label<s[1]){a.label=s[1],s=n;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(n);break}s[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],i=0}finally{o=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,s,u,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),s=function(){function t(t){var e=this;this.messageBox=new i.Observable,this.closed=!1,this.end=new Promise(function(n){return r(e,void 0,void 0,function(){var e;return o(this,function(r){switch(r.label){case 0:return[4,t.call(void 0,this.messageBox)];case 1:return e=r.sent(),this.closed=!0,this.sub&&!this.sub.closed&&this.sub.unsubscribe(),this.messageBox.closed||(this.messageBox.subscribe(function(){}).unsubscribe(),this.messageBox.complete()),n(e),[2]}})})})}return t.prototype.start=function(t){this.sub=t},t.prototype.next=function(t){this.messageBox.next(t)},t.prototype.error=function(t){this.messageBox.error(t)},t.prototype.complete=function(){this.messageBox.complete()},t.prototype.then=function(t,e){return this.end.then(t,e)},t}();e.Process=s},function(t,e,n){"use strict";function r(){}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),s=n(0),u=n(6),a=function(t){return i.dispatch(t,s.DispatcherPriorities.ATOM)},c=function(t){function e(e){var n=t.call(this,a)||this;return n.flush=function(){if(!n.closed&&0!==n.awaitingMessages.length){var t=n.awaitingMessages.shift(),e=t[0],r=t[1];n.swallow(e,r),n.dispatch(n.flush)}},n.ref(e),n}return o(e,t),e.prototype.subscribe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=u.normalizeToObserver(t);if(this.closed){var o={unsubscribe:r,closed:!1};return n.start(o),n.next(this.deref()),n.complete(),o}var o=this.addSubscription(n);return n.start(o),n.next(this.deref()),this.dispatch(this.flush),o},e}(u.Base);e.BaseAtom=c},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(0),s=n(5),u=n(6),a=function(){},c=function(t){return o.dispatch(t,i.DispatcherPriorities.OBSERVABLE)},f=function(t){function e(e){var n=t.call(this,c)||this;if(n.cancelSubscriber=a,n.flush=function(){if(!n.closed&&0!==n.awaitingMessages.length&&(n.awaitingMessages[0][0]===s.MessageTypes.Complete||0!==n.observers.length)){var t=n.awaitingMessages.shift(),e=t[0],r=t[1];n.swallow(e,r),n.dispatch(n.flush)}},e&&"string"==typeof e.name&&e.name.length>0&&(n.name=e.name+"$"),e){var r=n;n.cancelSubscriber=e({start:r.start.bind(r),next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r),get closed(){return r.observers.length>0}})||a}return n}return r(e,t),e.prototype.previous=function(){return console.log("Observable#previous is deprecated! Use Observable#hasRef and Observable#deref."),this.hasRef()?this.deref():s.NO_VALUE},e.prototype.complete=function(){this.cancelSubscriber(),this.cancelSubscriber=a,u.Base.prototype.complete.call(this)},e.prototype.subscribe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=u.normalizeToObserver(t);if(this.closed){var r={unsubscribe:a,closed:!1};return n.start(r),n.complete(),r}var r=this.addSubscription(n);return n.start(r),this.dispatch(this.flush),r},e}(u.Base);e.BaseObservable=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){var t=this;this.running=!1,this.subsequentCalls=0,this.tasks=[],this.loop=function(){var e=t.findNextTask();if(!e)return t.running=!1,void(t.subsequentCalls=0);t.subsequentCalls>1024&&(t.tooManyCalls(),t.subsequentCalls=0),t.subsequentCalls++,t.execute(e.execute)}}return Object.defineProperty(t.prototype,"isRunning",{get:function(){return this.running},enumerable:!0,configurable:!0}),t.prototype.push=function(t,e){for(var n=0;n<this.tasks.length;n++)if(this.tasks[n].priority>e)return this.tasks.splice(n,0,{execute:t,priority:e}),this;return this.tasks.push({execute:t,priority:e}),this},t.prototype.run=function(){this.running||(this.running=!0,this.loop())},t.prototype.execute=function(t){try{this.next(t,this.loop)}catch(t){console.error(t.stack||t.message||t)}},t.prototype.tooManyCalls=function(){"If you see this, that means your code streamed many subsequent messages.";"This situation might be harmful, as it may introduce serious lag of your app."},t.prototype.findNextTask=function(){return 0===this.tasks.length?null:this.tasks.splice(0,1)[0]},t.prototype.next=function(t,e){t(),e()},t}();e.Dispatcher=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1);e.dispatcher=r.dispatcher,e.flush=r.flush;var o=n(0);e.priorities=o.DispatcherPriorities;var i=n(5);e.NO_VALUE=i.NO_VALUE;var s=n(4);e.Observable=s.Observable;var u=n(3);e.Atom=u.Atom;var a=n(8);e.Combine=a.Combine;var c=n(10);e.Domain=c.Domain;var f=n(11);e.Process=f.Process;var p=n(9);e.action=p.action;var l=n(2);e.diagnose=l.diagnose;var h=function(t,e){void 0===e&&(e=o.DispatcherPriorities.EXTERNAL),r.dispatch(t,e)};e.dispatch=h}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.immview=e():t.immview=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=15)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.ATOM=-2]="ATOM",t[t.OBSERVABLE=1]="OBSERVABLE",t[t.ACTION=2]="ACTION",t[t.BUFFER=3]="BUFFER",t[t.EXTERNAL=4]="EXTERNAL",t[t.DIAGNOSE=5]="DIAGNOSE",t[t.ALL=10]="ALL"}(e.DispatcherPriorities||(e.DispatcherPriorities={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14),o=n(0),i=new r.Dispatcher;e.dispatcher=i;var s=function(t,e){i.push(t,e),i.run()};e.dispatch=s;var u=function(){return new Promise(function(t){return s(t,o.DispatcherPriorities.ALL)})};e.flush=u;var a=function(t,e){return new Promise(function(n,r){var o,i,u;s(function(){try{i=t(),o=!0}catch(t){u=t,o=!1}},e),s(function(){o?n(i):r(u)},e)})};e.dispatchAndReturn=a},function(t,e,n){"use strict";var r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){this.list=null,this.tableIsRequested=!1}return Object.defineProperty(t.prototype,"isOn",{get:function(){return void 0!==this.list},enumerable:!0,configurable:!0}),t.prototype.on=function(t){if(void 0===t&&(t={}),!window.performance)throw new Error("Performance measurements are not available in this environment");this.options=r({tableDetails:!0,tableSummary:!0,tableClear:!0,timeline:!0},t),this.list=[]},t.prototype.off=function(){this.list=null,this.tableIsRequested=!1},t.prototype.measure=function(t){var e=this;if(this.list){if((this.options.tableDetails||this.options.tableSummary)&&!this.tableIsRequested){this.tableIsRequested=!0;var n=setInterval(function(){if(!e.tableIsRequested||null===e.list||0===e.list.length)return e.tableIsRequested=!1,void clearInterval(n);var t=e.list.splice(0).reduce(function(t,e){for(var n=0,o=t;n<o.length;n++){var i=o[n],s=function(n){if(n["action name"]===e["action name"])return{value:t.map(function(t){return t!==n?t:r({},n,{"duration in ms":n["duration in ms"]+e["duration in ms"],occurences:n.occurences+1})})}}(i);if("object"==typeof s)return s.value}return t.concat([r({},e,{occurences:1})])},[]);e.options.tableClear&&console.clear(),e.options.tableDetails&&console.table(t.map(function(t){return{"action name":t["action name"],duration:t["duration in ms"]+" ms",occurences:t.occurences,"avg duration":t["duration in ms"]/t.occurences+" ms"}}));var o=t.reduce(function(t,e){return t+e["duration in ms"]},0);e.options.tableSummary&&console.table({all:{"duration in ms":o,"est. duration budget":500,"est. duration budget usage":o/500*100+"%"}})},1e3)}this.options.timeline&&window.performance.mark(t+"_start");var o=(this.options.tableDetails||this.options.tableSummary)&&window.performance.now();return function(){(e.options.tableDetails||e.options.tableSummary)&&e.list.push({"action name":t,"duration in ms":window.performance.now()-o}),e.options.timeline&&(window.performance.mark(t+"_end"),window.performance.measure(t,t+"_start",t+"_end"))}}},t}();e.Diagnose=o,e.diagnose=new o},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),i=n(4),s=n(7),u="undefined"!=typeof Symbol?Symbol("AtomSymbol"):"AtomSymbol",a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.of=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.from(t)},e.from=function(t){if(t[u]){var n=t[u](),r=new e(n.deref());return n.subscribe(r),r.name=this.name+" โ๐",r}if(t[Symbol.iterator]){for(var o=t[Symbol.iterator](),i=void 0,s=o.next();!1===s.done;s=o.next())i=s.value;var r=new e(i);return t.toString()&&(r.name=t.toString()),r.complete(),r}throw new Error("Atom.from incorrect input")},e.prototype.toPromise=function(){return this.then()},e.prototype.map=function(t){var n=t(this.deref()),r=new e(n),o=!1;return s.map(this,r,function(e){return o?t(e):(o=!0,n)}),r},e.prototype.flatten=function(){var t=new e(this.deref().deref());return s.flatten(this,t),t},e.prototype.scan=function(t,n){var r=new e(n);return s.scan(this,r,t,n),r},e.prototype.filter=function(t){var n=new e(this.deref()),r=function(e){return r=t,!0};return s.filter(this,n,function(t){return r(t)}),n},e.prototype.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=new e(this.deref());return s.merge([this].concat(t),r),r},e.prototype.distinct=function(t){var n=new e(this.deref());return t?s.distinct(this,n,t):s.distinct(this,n),n},e.prototype.buffer=function(t){var n=new e([this.deref()]);return s.buffer(this,n,t),n},e.prototype.materialize=function(t){return this},e.prototype.vaporize=function(){var t=new i.Observable;return this.subscribe(t),t},e}(o.BaseAtom);e.Atom=a,a.prototype[u]=function(){return this}},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(13),i=n(3),s=n(7),u="undefined"!=typeof Symbol?Symbol("ObservableSymbol"):"ObservableSymbol",a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.of=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.from(t)},e.from=function(t){if(t[u]){var n=t[u](),r=new e;return n.subscribe(r),r.name=this.name+" โ๐",r}if(t[Symbol.iterator]){var r=new e(function(e){for(var n=e.next,r=e.error,o=e.complete,i=t[Symbol.iterator](),s=i.next();!1===s.done;s=i.next())s.value instanceof Error?r(s.value):n(s.value);o()});return t.toString()&&(r.name=t.toString()),r}throw new Error("Observable.from incorrect input")},e.fromPromise=function(t){var n=new e(function(e){t.then(e.next,e.error).then(e.complete)});return n.name="Promise",n},e.prototype.startWith=function(t){var n=new e;return n.next(t),this.subscribe(n),n.name=this.name+" โน๏ธโโน๏ธโน๏ธโน๏ธโฆ",n},e.prototype.reemit=function(){var t=new e;return this.hasRef()&&t.next(this.deref()),this.subscribe(t),t.name=this.name+" ๐ฃ",t},e.prototype.toPromise=function(){return this.then()},e.prototype.map=function(t){var n=new e;return s.map(this,n,t),n},e.prototype.flatten=function(){var t=new e;return s.flatten(this,t),t},e.prototype.scan=function(t,n){var r=new e;return s.scan(this,r,t,n),r},e.prototype.filter=function(t){var n=new e;return s.filter(this,n,t),n},e.prototype.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=new e;return s.merge([this].concat(t),r),r},e.prototype.distinct=function(t){var n=new e;return s.distinct(this,n,t),n},e.prototype.bufferCount=function(t,n){var r=new e;return s.bufferCount(this,r,t,n),r},e.prototype.buffer=function(t){var n=new e;return s.buffer(this,n,t),n},e.prototype.materialize=function(t){var e=new i.Atom(t);return this.subscribe(e),e.name=this.name+" โ๏ธ",e},e.prototype.vaporize=function(){return this},e}(o.BaseObservable);e.Observable=a,a.prototype[u]=function(){return this}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NO_VALUE={},function(t){t[t.Next=0]="Next",t[t.Error=1]="Error",t[t.Complete=2]="Complete"}(e.MessageTypes||(e.MessageTypes={}))},function(t,e,n){"use strict";function r(t){if("object"!=typeof t[0]||null===t[0]){var e=t,n=e[0],r=e[1],o=e[2];return{start:i,next:n||i,error:r||i,complete:o||i}}var s=t[0];return s.start=s.start||i,s.next=s.next||i,s.error=s.error||i,s.complete=s.complete||i,s}function o(){return++f}function i(){}Object.defineProperty(e,"__esModule",{value:!0});var s=n(2),u=n(5);try{!function(){void 0===Symbol.asyncIterator&&Object.assign(Symbol,{asyncIterator:Symbol("Symbol.asyncIterator")})}()}catch(t){}var a=function(){return!0},c=function(){function t(t){this.dispatch=t,this.closed=!1,this.name=o()+"$",this.observers=[],this.awaitingMessages=[]}return t.prototype.ref=function(t){this.deref=function(){return t},this.hasRef=a,this.observers.forEach(function(e){return e.next(t)})},t.prototype.deref=function(){return null},t.prototype.hasRef=function(){return!1},t.prototype.start=function(t){},t.prototype.next=function(t){this.closed||(this.awaitingMessages.push([u.MessageTypes.Next,t]),this.dispatch(this.flush))},t.prototype.error=function(t){this.closed||(this.awaitingMessages.push([u.MessageTypes.Error,t]),this.dispatch(this.flush))},t.prototype.complete=function(){this.closed||(this.awaitingMessages.push([u.MessageTypes.Complete,void 0]),this.dispatch(this.flush))},t.prototype.addSubscription=function(t){this.observers.push(t);var e=this;return{unsubscribe:function(){var n;(n=e.observers.indexOf(t))<0||e.observers.splice(n,1)},get closed(){return-1===e.observers.indexOf(t)}}},t.prototype.swallow=function(t,e){switch(t){case u.MessageTypes.Next:var n=e;if("function"==typeof n){var r=s.diagnose.isOn&&s.diagnose.measure(this.name+" next("+(n.name||"")+")"),o=n(this.deref());r&&r(),this.ref(o)}else this.ref(n);break;case u.MessageTypes.Error:var i=e;this.observers.forEach(function(t){return t.error(i)});break;case u.MessageTypes.Complete:this.closed=!0,this.awaitingMessages.splice(0),this.observers.splice(0).forEach(function(t){return t.complete()})}},t.prototype[Symbol.asyncIterator]=function(){function t(){for(;r.length&&n.length;)r[0].done?n.shift()(r[0]):n.shift()(r.shift())}var e=this,n=[],r=[],o=null;return this.subscribe({start:function(t){o=t},next:function(n){e.closed||r.push({done:!1,value:n}),t()},complete:function(){r.push({done:!0,value:e.deref()}),t()}}),{next:function(){var e=new Promise(function(t){n.push(t)});return t(),e},throw:function(t){return o.unsubscribe(),Promise.resolve({done:!0,value:e.deref()})},return:function(){return o.unsubscribe(),Promise.resolve({done:!0,value:e.deref()})}}},t.prototype.then=function(t,e){var n=this;return new Promise(function(t,e){var r;n.subscribe({start:function(t){r=t},next:function(e){r.unsubscribe(),t(e)},error:function(t){r.unsubscribe(),e(t)},complete:function(){r.unsubscribe(),e(new Error("no value emitted"))}})}).then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t}();e.Base=c,e.normalizeToObserver=r;var f=0},function(t,e,n){"use strict";function r(){}function o(t,e,n){var r=null;return t.subscribe({start:function(t){r=t,n.start(r)},next:function(t){if(e.closed)return void r.unsubscribe();n.next(t)},error:function(t){if(e.closed)return void r.unsubscribe();n.error(t)},complete:function(){if(e.closed)return void r.unsubscribe();n.complete()}}),r}function i(t,e,n){o(t,e,{start:r,next:function(t){try{var r=h.diagnose.isOn&&h.diagnose.measure("$> "+e.name),o=n(t);r&&r(),e.next(o)}catch(t){e.error(t)}},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" โก๏ธ "+n.name}function s(t,e){o(t,e,{start:r,next:function(t){t&&t.subscribe(function(t){e.next(t)},function(t){return e.error(t)})},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" ๐๏ธ"}function u(t,e,n,i){var s=i,u=0;o(t,e,{start:r,next:function(t){try{s=n(s,t,u++),e.next(s)}catch(t){e.error(t)}},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" โคต๏ธ "+n.name}function a(t,e,n){o(t,e,{start:r,next:function(t){try{n(t)&&e.next(t)}catch(t){e.error(t)}},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" ๐ "+n.name}function c(t,e){for(var n=0,i={start:r,next:function(t){e.next(t)},error:function(t){e.error(t)},complete:function(){++n===t.length&&e.complete()}},s=0,u=t;s<u.length;s++)o(u[s],e,i);e.name="(๐ "+t.map(function(t){return t.name}).join(",")+" )"}function f(t,e,n){var i,s=!1;o(t,e,{start:r,next:function(t){if(s)if(n){if(!n(i,t))return}else if(i===t)return;s=!0,i=t,e.next(t)},error:function(t){e.error(t)},complete:function(){e.complete()}}),e.name=t.name+" ๐ "+(n?n.name?n.name:"(unnamed)":"(reference)")}function p(t,e,n,i){var s=void 0===i?n:i,u=[];o(t,e,{start:r,next:function(t){u.push(t),u.length===n&&(e.next(u.slice()),u=u.splice(s,n-s))},error:function(t){e.error(t)},complete:function(){u.length>n-s&&e.next(u.slice()),e.complete()}}),e.name=t.name+" ๐ค"+n+","+s}function l(t,e,n){void 0===n&&(n=0);var i=[];o(t,e,{start:r,next:function(t){i=n>0?[t].concat(i).splice(0,n):[t].concat(i),b.dispatch(function(){0!==i.length&&e.next(i.splice(0).reverse())},m.DispatcherPriorities.BUFFER)},error:function(t){e.error(t)},complete:function(){i.length>0&&e.next(i.splice(0).reverse()),e.complete()}}),e.name=t.name+" ๐ค"}Object.defineProperty(e,"__esModule",{value:!0});var h=n(2),m=n(0),b=n(1);e.map=i,e.flatten=s,e.scan=u,e.filter=a,e.merge=c,e.distinct=f,e.bufferCount=p,e.buffer=l},function(t,e,n){"use strict";function r(t,e){var n={};return o(t,function(t,r){n[r]=e(t,r)}),n}function o(t,e){for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))return;e(t[n],n)}}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,"__esModule",{value:!0});var u=n(3),a=function(t){function e(e){var n=this,i=[];return n=t.call(this,r(e,function(t,e){return t.deref()}))||this,n.sources=e,n.subs=[],o(e,function(t,e){i.push({key:e,name:t.name}),n.subs.push(t.subscribe(function(t){n.next(function(n){return s({},n,(r={},r[e]=t,r));var r})},function(t){n.error(t)},function(){n.complete()}))}),n.name="{"+i.map(function(t){var e=t.key,n=t.name;return n||n===e?e:e+": "+n}).join(", ")+"}",n}return i(e,t),e.prototype.complete=function(){this.subs.splice(0).forEach(function(t){!t.closed&&t.unsubscribe()}),u.Atom.prototype.complete.call(this)},e}(u.Atom);e.Combine=a},function(t,e,n){"use strict";function r(t,e,n){var r=n.value;n.value=function(){for(var t=this,n=[],u=0;u<arguments.length;u++)n[u]=arguments[u];return i.dispatchAndReturn(function(){var o=s.diagnose.measure("<$ "+(t.name?t.name+".":"")+e),i=r.apply(t,n);return o&&o(),i},o.DispatcherPriorities.ACTION)}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),i=n(1),s=n(2);e.action=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(2);try{!function(){void 0===Symbol.asyncIterator&&Object.assign(Symbol,{asyncIterator:Symbol("Symbol.asyncIterator")})}()}catch(t){}var s=function(){function t(t){if(this.$=t,!t)throw new Error("Domain cannot be created without a (Observable/Atom/Domain) source")}return t.create=function(e,n,s){var u=new t(e);if(u.name=u.$.name+"$!",n)for(var a in n)!function(t){var e=t;if(!Object.prototype.hasOwnProperty.call(n,t))return"continue";u[t]=function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o.dispatchAndReturn(function(){var r=i.diagnose.measure("<$ "+(u.name?u.name+".":"")+e),o=n[t].apply(u,s);return r&&r(),o},r.DispatcherPriorities.ACTION)}}(a);if(s)for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(u[c]=s[c]);return u},t.prototype.start=function(t){this.$.start(t)},t.prototype.next=function(t){this.$.next(t)},t.prototype.error=function(t){this.$.error(t)},t.prototype.complete=function(){this.$.complete()},Object.defineProperty(t.prototype,"closed",{get:function(){return this.$.closed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"observers",{get:function(){return this.$.observers},enumerable:!0,configurable:!0}),t.prototype.subscribe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(n=this.$).subscribe.apply(n,t);var n},t.prototype.ref=function(t){this.$.ref(t)},t.prototype.deref=function(){return this.$.deref()},t.prototype.hasRef=function(){return this.$.hasRef()},t.prototype.toPromise=function(){return this.$.toPromise()},t.prototype.map=function(t){return this.$.map(t)},t.prototype.flatten=function(){return this.$.flatten()},t.prototype.scan=function(t,e){return this.$.scan(t,e)},t.prototype.filter=function(t){return this.$.filter(t)},t.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(n=this.$).merge.apply(n,t);var n},t.prototype.distinct=function(t){return this.distinct(t)},t.prototype.buffer=function(t){return this.$.buffer(t)},t.prototype.materialize=function(t){return this.$.materialize(t)},t.prototype.vaporize=function(){return this.$.vaporize()},t.prototype[Symbol.asyncIterator]=function(){return this.$[Symbol.asyncIterator]()},t.prototype.then=function(t,e){return this.$.toPromise().then(t,e)},t}();e.Domain=s},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(s,u)}a((r=r.apply(t,e||[])).next())})},o=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(s=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(i,n[1])).done)return s;switch(i=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,i=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(s=a.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){a.label=n[1];break}if(6===n[0]&&a.label<s[1]){a.label=s[1],s=n;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(n);break}s[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],i=0}finally{o=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,s,u,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return u={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u};Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),s=function(){function t(t){var e=this;this.messageBox=new i.Observable,this.closed=!1,this.end=new Promise(function(n){return r(e,void 0,void 0,function(){var e;return o(this,function(r){switch(r.label){case 0:return[4,t.call(void 0,this.messageBox)];case 1:return e=r.sent(),this.closed=!0,this.sub&&!this.sub.closed&&this.sub.unsubscribe(),this.messageBox.closed||(this.messageBox.subscribe(function(){}).unsubscribe(),this.messageBox.complete()),n(e),[2]}})})})}return t.prototype.start=function(t){this.sub=t},t.prototype.next=function(t){this.messageBox.next(t)},t.prototype.error=function(t){this.messageBox.error(t)},t.prototype.complete=function(){this.messageBox.complete()},t.prototype.then=function(t,e){return this.end.then(t,e)},t}();e.Process=s},function(t,e,n){"use strict";function r(){}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),s=n(0),u=n(6),a=function(t){return i.dispatch(t,s.DispatcherPriorities.ATOM)},c=function(t){function e(e){var n=t.call(this,a)||this;return n.flush=function(){if(!n.closed&&0!==n.awaitingMessages.length){var t=n.awaitingMessages.shift(),e=t[0],r=t[1];n.swallow(e,r),n.dispatch(n.flush)}},n.ref(e),n}return o(e,t),e.prototype.subscribe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=u.normalizeToObserver(t);if(this.closed){var o={unsubscribe:r,closed:!1};return n.start(o),n.next(this.deref()),n.complete(),o}var o=this.addSubscription(n);return n.start(o),n.next(this.deref()),this.dispatch(this.flush),o},e}(u.Base);e.BaseAtom=c},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(0),s=n(5),u=n(6),a=function(){},c=function(t){return o.dispatch(t,i.DispatcherPriorities.OBSERVABLE)},f=function(t){function e(e){var n=t.call(this,c)||this;if(n.cancelSubscriber=a,n.flush=function(){if(!n.closed&&0!==n.awaitingMessages.length&&(n.awaitingMessages[0][0]===s.MessageTypes.Complete||0!==n.observers.length)){var t=n.awaitingMessages.shift(),e=t[0],r=t[1];n.swallow(e,r),n.dispatch(n.flush)}},e&&"string"==typeof e.name&&e.name.length>0&&(n.name=e.name+"$"),e){var r=n;n.cancelSubscriber=e({start:r.start.bind(r),next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r),get closed(){return r.observers.length>0}})||a}return n}return r(e,t),e.prototype.previous=function(){return console.log("Observable#previous is deprecated! Use Observable#hasRef and Observable#deref."),this.hasRef()?this.deref():s.NO_VALUE},e.prototype.complete=function(){this.cancelSubscriber(),this.cancelSubscriber=a,u.Base.prototype.complete.call(this)},e.prototype.subscribe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=u.normalizeToObserver(t);if(this.closed){var r={unsubscribe:a,closed:!1};return n.start(r),n.complete(),r}var r=this.addSubscription(n);return n.start(r),this.dispatch(this.flush),r},e}(u.Base);e.BaseObservable=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){var t=this;this.running=!1,this.subsequentCalls=0,this.tasks=[],this.loop=function(){var e=t.findNextTask();if(!e)return t.running=!1,void(t.subsequentCalls=0);t.subsequentCalls>1024&&(t.tooManyCalls(),t.subsequentCalls=0),t.subsequentCalls++,t.execute(e.execute)}}return Object.defineProperty(t.prototype,"isRunning",{get:function(){return this.running},enumerable:!0,configurable:!0}),t.prototype.push=function(t,e){for(var n=0;n<this.tasks.length;n++)if(this.tasks[n].priority>e)return this.tasks.splice(n,0,{execute:t,priority:e}),this;return this.tasks.push({execute:t,priority:e}),this},t.prototype.run=function(){this.running||(this.running=!0,this.loop())},t.prototype.execute=function(t){try{this.next(t,this.loop)}catch(t){console.error(t.stack||t.message||t)}},t.prototype.tooManyCalls=function(){"undefined"!=typeof console&&console&&console.warn&&console.warn(["If you see this, that means your code streamed many subsequent messages.","This situation might be harmful, as it may introduce serious lag of your app.","This is just a warning and a way to introduce a break, so you won't end up with unresponsive app","Please handle this situation and limit how many messages are pushed at once if possible."].join("\r\n"))},t.prototype.findNextTask=function(){return 0===this.tasks.length?null:this.tasks.splice(0,1)[0]},t.prototype.next=function(t,e){t(),e()},t}();e.Dispatcher=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1);e.dispatcher=r.dispatcher,e.flush=r.flush;var o=n(0);e.priorities=o.DispatcherPriorities;var i=n(5);e.NO_VALUE=i.NO_VALUE;var s=n(4);e.Observable=s.Observable;var u=n(3);e.Atom=u.Atom;var a=n(8);e.Combine=a.Combine;var c=n(10);e.Domain=c.Domain;var f=n(11);e.Process=f.Process;var p=n(9);e.action=p.action;var l=n(2);e.diagnose=l.diagnose;var h=function(t,e){void 0===e&&(e=o.DispatcherPriorities.EXTERNAL),r.dispatch(t,e)};e.dispatch=h}])}); | ||
//# sourceMappingURL=immview.js.map |
@@ -11,5 +11,2 @@ import { Atom } from './Atom'; | ||
export declare type NextStep<T> = T | Transformer<T>; | ||
export interface Closeable { | ||
closed: boolean; | ||
} | ||
export interface Observer<T> { | ||
@@ -21,8 +18,2 @@ start: (subscription: Subscription) => void; | ||
} | ||
export interface StreamObserver<T> { | ||
start: (subscription: Subscription) => void; | ||
next: (candidate: NextStep<T>) => void; | ||
error: (error: Error) => void; | ||
complete: () => void; | ||
} | ||
export interface ValueListener<T> { | ||
@@ -37,3 +28,4 @@ (nextValue: T): any; | ||
} | ||
export interface SubscriptionObserver<T> extends Observer<T>, Closeable { | ||
export interface SubscriptionObserver<T> extends Observer<T> { | ||
closed: boolean; | ||
} | ||
@@ -43,8 +35,12 @@ export interface Subscriber<T> { | ||
} | ||
export interface Subscribable<T> { | ||
export interface Stream<T> extends AsyncIterable<T>, PromiseLike<T> { | ||
start: (subscription: Subscription) => void; | ||
next: (candidate: NextStep<T>) => void; | ||
error: (error: Error) => void; | ||
complete: () => void; | ||
closed: boolean; | ||
observers: Observer<T>[]; | ||
subscribe(observer: Observer<T>): Subscription; | ||
subscribe(onNext?: ValueListener<T>, onError?: ErrorListener, onCompletion?: CompletionListener): Subscription; | ||
} | ||
export interface Receiver<T> { | ||
name: string; | ||
ref(reference: T): void; | ||
@@ -54,7 +50,2 @@ deref(): T; | ||
} | ||
export interface Named { | ||
name: string; | ||
} | ||
export interface Stream<T> extends StreamObserver<T>, Closeable, Subscribable<T>, Named, Receiver<T>, AsyncIterable<T>, PromiseLike<T> { | ||
} | ||
export interface OpStream<T> extends Stream<T> { | ||
@@ -61,0 +52,0 @@ toPromise(): Promise<T>; |
{ | ||
"name": "immview", | ||
"version": "3.2.9", | ||
"version": "3.2.10", | ||
"description": "", | ||
@@ -15,3 +15,3 @@ "main": "./dist/index.js", | ||
"build:bundled": "NODE_ENV=production webpack -p", | ||
"build:unbundled": "tsc --declaration --outDir ./dist ; rm -rf ./dist/*.spec.d.ts", | ||
"build:unbundled": "tsc --declaration --outDir ./dist ; rm -rf ./dist/*.spec.d.ts ; rm -rf ./dist/*.spec.js ; rm -rf ./dist/*.spec.js.map", | ||
"preversion": "npm run test && npm run build", | ||
@@ -18,0 +18,0 @@ "lint": "tslint --project ./tsconfig.json --config ./tslint.json --fix --format stylish", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
92
4639
423971
1