Comparing version 1.9.14 to 1.10.0
@@ -1,2 +0,2 @@ | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).evt=t()}}((function(){return function t(e,r,n){function o(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}};e[a][0].call(l.exports,(function(t){return o(e[a][1][t]||t)}),l,l.exports,t,e,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};r.__esModule=!0,r.Ctx=void 0;var i=t("minimal-polyfills/Set"),a=t("minimal-polyfills/WeakMap"),s=t("../tools/typeSafety/assert"),u=t("../tools/typeSafety/typeGuard"),c=t("./LazyEvt"),l=t("./importProxy"),f=t("../tools/typeSafety/defineAccessors"),p=t("../tools/typeSafety/overwriteReadonlyProp"),h=function(){function t(){this.lazyEvtAttach=new c.LazyEvt,this.lazyEvtDetach=new c.LazyEvt,this.lazyEvtDoneOrAborted=new c.LazyEvt,this.handlers=new i.Polyfill,this.evtByHandler=new a.Polyfill}return t.prototype.onDoneOrAborted=function(t){this.lazyEvtDoneOrAborted.post(t)},t.prototype.waitFor=function(t){var e=this;return this.evtDoneOrAborted.waitFor(t).then((function(t){if("ABORTED"===t.type)throw t.error;return t.result}),(function(t){throw e.abort(t),t}))},t.prototype.abort=function(t){return this.__done(t)},t.prototype.done=function(t){return this.__done(void 0,t)},t.prototype.__done=function(t,e){var r,i,a=[];try{for(var s=o(this.handlers.values()),u=s.next();!u.done;u=s.next()){var c=u.value,l=this.evtByHandler.get(c);c.detach()&&a.push({handler:c,evt:l})}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return this.onDoneOrAborted(n(n({},t?{type:"ABORTED",error:t}:{type:"DONE",result:e}),{handlers:a})),a},t.prototype.getHandlers=function(){var t=this;return Array.from(this.handlers.values()).map((function(e){return{handler:e,evt:t.evtByHandler.get(e)}}))},t.prototype.zz__addHandler=function(t,e){s.assert(t.ctx===this),s.assert(u.typeGuard(t)),this.handlers.add(t),this.evtByHandler.set(t,e),this.lazyEvtAttach.post({handler:t,evt:e})},t.prototype.zz__removeHandler=function(t){s.assert(t.ctx===this),s.assert(u.typeGuard(t)),this.lazyEvtDetach.post({handler:t,evt:this.evtByHandler.get(t)}),this.handlers.delete(t)},t.__1=(f.defineAccessors(t.prototype,"evtDoneOrAborted",{get:function(){return this.lazyEvtDoneOrAborted.evt}}),f.defineAccessors(t.prototype,"evtAttach",{get:function(){return this.lazyEvtAttach.evt}}),void f.defineAccessors(t.prototype,"evtDetach",{get:function(){return this.lazyEvtDetach.evt}})),t}();r.Ctx=h;try{p.overwriteReadonlyProp(r.Ctx,"name","Ctx")}catch(t){}l.importProxy.Ctx=r.Ctx},{"../tools/typeSafety/assert":48,"../tools/typeSafety/defineAccessors":49,"../tools/typeSafety/overwriteReadonlyProp":56,"../tools/typeSafety/typeGuard":57,"./LazyEvt":15,"./importProxy":18,"minimal-polyfills/Set":61,"minimal-polyfills/WeakMap":62}],2:[function(t,e,r){"use strict";r.__esModule=!0,r.asNonPostable=void 0,r.asNonPostable=function(t){return t}},{}],3:[function(t,e,r){"use strict";r.__esModule=!0,r.asPostable=void 0,r.asPostable=function(t){return t}},{}],4:[function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};r.__esModule=!0,r.asyncPipe=void 0;var i=t("./Evt");r.asyncPipe=function(t,e){var r=this,a="state"in t?i.Evt.create(void 0):i.Evt.create(),s=0,u=function(i){return n(r,void 0,void 0,(function(){var r,n,u;return o(this,(function(o){switch(o.label){case 0:return s++,r=s,null!==(n=e(i))&&"then"in n?[4,n]:[3,2];case 1:return u=o.sent(),"state"in t&&r!==s?[2]:[3,3];case 2:u=n,o.label=3;case 3:return null===u||a.post(u[0]),[2]}}))}))};return t.attach(u),"state"in t&&u(t.state),a}},{"./Evt":9}],5:[function(t,e,r){"use strict";r.__esModule=!0,r.create=void 0;var n=t("./importProxy");r.create=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?new n.importProxy.Evt:new n.importProxy.StatefulEvt(t[0])}},{"./importProxy":18}],6:[function(t,e,r){"use strict";r.__esModule=!0,r.factorize=void 0,r.factorize=function(t){return t}},{}],7:[function(t,e,r){"use strict";r.__esModule=!0,r.from=void 0;var n=t("../tools/typeSafety/id"),o=t("../tools/typeSafety/assert"),i=t("../tools/typeSafety/typeGuard"),a=t("./Evt.merge"),s=t("./importProxy"),u=t("./types/EventTargetLike");function c(t,e,r,i){var l,f,p,h;if(p=e,!u.z_2.canBe(p)){if("then"in e){var d=new s.importProxy.Evt,y=(f=(l=function(){return null==t?void 0:t.evtDoneOrAborted.postCount})(),function(){return f!==l()});return e.then((function(t){y()||d.post(t)})),d}return a.mergeImpl(t,Array.from(e).map((function(e){return c(t,e,r,i)})))}if(u.z_2.NodeStyleEventEmitter_match(e))h={on:function(t,r){return e.addListener(r,t)},off:function(t,r){return e.removeListener(r,t)}};else if(u.z_2.JQueryStyleEventEmitter_match(e))h={on:function(t,r){return e.on(r,t)},off:function(t,r){return e.off(r,t)}};else if(u.z_2.HasEventTargetAddRemove_match(e))h={on:function(t,r,n){return e.addEventListener(r,t,n)},off:function(t,r,n){return e.removeEventListener(r,t,n)}};else if(u.z_2.RxJSSubject_match(e)){var v;h={on:function(t){return v=e.subscribe((function(e){return t(e)}))},off:function(){return v.unsubscribe()}}}else n.id(e),o.assert(!1);var _=new s.importProxy.Evt,m=function(t){return _.post(t)};return null==t||t.evtDoneOrAborted.attachOnce((function(){return h.off(m,r,i)})),h.on(m,r,i),_}r.from=function(t,e,r,n){return"evtDoneOrAborted"in t?(o.assert(i.typeGuard(e)&&i.typeGuard(r)&&i.typeGuard(n)),c(t,e,r,n)):(o.assert(i.typeGuard(e)&&i.typeGuard(r)),c(void 0,t,e,r))}},{"../tools/typeSafety/assert":48,"../tools/typeSafety/id":51,"../tools/typeSafety/typeGuard":57,"./Evt.merge":11,"./importProxy":18,"./types/EventTargetLike":20}],8:[function(t,e,r){"use strict";r.__esModule=!0,r.getCtxFactory=void 0;var n=t("minimal-polyfills/WeakMap"),o=t("./importProxy");r.getCtxFactory=function(){var t=new n.Polyfill;return function(e){var r=t.get(e);return void 0===r&&(r=new o.importProxy.Ctx,t.set(e,r)),r}}},{"./importProxy":18,"minimal-polyfills/WeakMap":62}],9:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};r.__esModule=!0,r.Evt=r.doDetachIfNeeded=void 0,t("minimal-polyfills/Array.prototype.find");var s=t("./importProxy"),u=t("./Evt.create"),c=t("./Evt.getCtx"),l=t("./Evt.factorize"),f=t("./Evt.merge"),p=t("./Evt.from"),h=t("./Evt.useEffect"),d=t("./Evt.asPostable"),y=t("./Evt.asyncPipe"),v=t("./Evt.asNonPostable"),_=t("./Evt.parsePropsFromArgs"),m=t("./Evt.newCtx"),g=t("./LazyEvt"),E=t("../tools/typeSafety/defineAccessors"),b=t("./util/invokeOperator"),x=t("minimal-polyfills/Map"),O=t("minimal-polyfills/WeakMap"),P=t("run-exclusive"),S=t("../tools/typeSafety/overwriteReadonlyProp"),w=t("../tools/typeSafety/typeGuard"),M=t("./util/encapsulateOpState"),C=t("../tools/Deferred"),z=t("./Evt.loosenType"),A=t("../tools/safeSetTimeout"),k=t("../tools/typeSafety/isPromiseLike"),R=t("./types/Operator"),j=t("./types/EvtError"),D=t("./types/interfaces/CtxLike"),T=function(){function t(){this.lazyEvtAttach=new g.LazyEvt,this.lazyEvtDetach=new g.LazyEvt,this.__maxHandlers=void 0,this.postCount=0,this.traceId=null,this.handlers=[],this.handlerTriggers=new x.Polyfill,this.__currentChronologyMark=0,this.asyncHandlerCount=0}return t.setDefaultMaxHandlers=function(t){this.__defaultMaxHandlers=isFinite(t)?t:0},t.prototype.toStateful=function(t,e){var r=D.z_3.match(t),n=r?void 0:t,o=e||(r?t:void 0),i=new s.importProxy.StatefulEvt(n),a=function(t){return i.post(t)};return o?this.attach(o,a):this.attach(a),i},t.prototype.setMaxHandlers=function(t){return this.__maxHandlers=isFinite(t)?t:0,this},t.prototype.enableTrace=function(t){var e=t.id,r=t.formatter,n=t.log;this.traceId=e,this.traceFormatter=r||function(t){try{return JSON.stringify(t,null,2)}catch(e){return""+t}},this.log=void 0===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.log.apply(console,i(t))}:!1===n?void 0:n},t.prototype.disableTrace=function(){return this.traceId=null,this},t.prototype.getChronologyMark=function(){return this.__currentChronologyMark++},t.prototype.detachHandler=function(t,e,r){var n=this.handlers.indexOf(t);return!(n<0)&&(w.typeGuard(t,!!t.ctx)&&t.ctx.zz__removeHandler(t),this.handlers.splice(n,1),t.async&&this.asyncHandlerCount--,this.handlerTriggers.delete(t),void 0!==e[0]&&(A.safeClearTimeout(e[0]),r(new j.EvtError.Detached)),this.lazyEvtDetach.post(t),!0)},t.prototype.triggerHandler=function(t,e,r,n){var i=t.callback,a=t.once;void 0!==e[0]&&(A.safeClearTimeout(e[0]),e[0]=void 0),H(t,n,a);var s=o(n,1)[0],u=null==i?void 0:i.call(this,s);return null==r||r(s),k.isPromiseLike(u)?u:void 0},t.prototype.addHandler=function(t,e){var r=this;R.z_f1.fλ_Stateful_match(t.op)&&this.statelessByStatefulOp.set(t.op,M.encapsulateOpState(t.op));var o=new C.Deferred,i=[void 0],a=n(n(n({},t),e),{detach:function(){return r.detachHandler(a,i,o.reject)},promise:o.pr});if("number"==typeof a.timeout&&(i[0]=A.safeSetTimeout((function(){i[0]=void 0,a.detach(),o.reject(new j.EvtError.Timeout(a.timeout))}),a.timeout)),this.handlerTriggers.set(a,(function(t){return r.triggerHandler(a,i,o.isPending?o.resolve:void 0,t)})),a.async&&this.asyncHandlerChronologyMark.set(a,this.getChronologyMark()),a.prepend){var s=void 0;for(s=0;s<this.handlers.length&&this.handlers[s].extract;s++);this.handlers.splice(s,0,a)}else this.handlers.push(a);return a.async&&this.asyncHandlerCount++,this.checkForPotentialMemoryLeak(),w.typeGuard(a,!!a.ctx)&&a.ctx.zz__addHandler(a,this),this.lazyEvtAttach.post(a),a},t.prototype.checkForPotentialMemoryLeak=function(){var e=void 0!==this.__maxHandlers?this.__maxHandlers:t.__defaultMaxHandlers;if(0!==e&&this.handlers.length%(e+1)==0){var r=["MaxHandlersExceededWarning: Possible Evt memory leak detected.",this.handlers.length+" handlers attached"+(this.traceId?' to "'+this.traceId+'"':"")+".\n","Use Evt.prototype.setMaxHandlers(n) to increase limit on a specific Evt.\n","Use Evt.setDefaultMaxHandlers(n) to change the default limit currently set to "+t.__defaultMaxHandlers+".\n"].join(""),o=new x.Polyfill;this.getHandlers().map((function(t){var e=t.ctx,r=t.async,o=t.once,i=t.prepend,a=t.extract,s=t.op,u=t.callback;return n(n({hasCtx:!!e,once:o,prepend:i,extract:a,isWaitFor:r},s===_.matchAll?{}:{op:s.toString()}),u?{callback:u.toString()}:{})})).map((function(t){return"{\n"+Object.keys(t).map((function(e){return" "+e+": "+t[e]})).join(",\n")+"\n}"})).forEach((function(t){return o.set(t,(o.has(t)?o.get(t):0)+1)})),r+="\n"+Array.from(o.keys()).map((function(t){return o.get(t)+" handler"+(1===o.get(t)?"":"s")+" like:\n"+t})).join("\n")+"\n",null===this.traceId&&(r+="\n"+["To validate the identify of the Evt instance that is triggering this warning you can call",'Evt.prototype.enableTrace({ "id": "My evt id", "log": false }) on the Evt that you suspect.\n'].join(" "));try{console.warn(r)}catch(t){}}},t.prototype.getStatelessOp=function(t){return R.z_f1.fλ_Stateful_match(t)?this.statelessByStatefulOp.get(t):t},t.prototype.trace=function(t){var e,r=this;if(null!==this.traceId){var n="("+this.traceId+") ";if(!!this.handlers.find((function(e){var n=e.extract,o=e.op;return n&&!!r.getStatelessOp(o)(t)})))n+="extracted ";else{var o=this.handlers.filter((function(e){var n=e.extract,o=e.op;return!n&&!!r.getStatelessOp(o)(t)})).length;n+=o+" handler"+(o>1?"s":"")+", "}null===(e=this.log)||void 0===e||e.call(this,n+this.traceFormatter(t))}},t.prototype.postSync=function(t){var e,r,n=[],o=function(t){return[t,Promise.all(n).then((function(){}))]};try{for(var s=a(i(this.handlers)),u=s.next();!u.done;u=s.next()){var c=u.value,l=c.async,f=c.op,p=c.extract;if(!l){var h=b.invokeOperator(this.getStatelessOp(f),t,!0);if(R.z_f1.fλ_Result_NotMatched_match(h))H(c,h);else{var d=this.handlerTriggers.get(c);if(d){var y=d(h);if(void 0!==y&&n.push(y),p)return o(!0)}}}}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o(!1)},t.prototype.postAsyncFactory=function(){var t=this;return P.buildMethodCb((function(e,r,n){var o,s;if(0!==t.asyncHandlerCount){var u,c=[];Promise.resolve().then((function(){return u=t.getChronologyMark()}));var l=function(n){if(!n.async)return"continue";var o=b.invokeOperator(t.getStatelessOp(n.op),e,!0);if(R.z_f1.fλ_Result_NotMatched_match(o))return H(n,o),"continue";var i=t.handlerTriggers.get(n);return i&&function(){var e=t.asyncHandlerChronologyMark.get(n);if(r>e)return!0;var o=t.asyncHandlerChronologyExceptionRange.get(n);return void 0!==o&&o.lowerMark<r&&r<o.upperMark&&e>o.upperMark}()?(c.push(new Promise((function(t){return n.promise.then((function(){return t()})).catch((function(){return t()}))}))),void i(o)):"continue"};try{for(var f=a(i(t.handlers)),p=f.next();!p.done;p=f.next()){l(p.value)}}catch(t){o={error:t}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}if(0!==c.length){var h=i(t.handlers);Promise.all(c).then((function(){var e,o;try{for(var i=a(t.handlers),s=i.next();!s.done;s=i.next()){var c=s.value;c.async&&(h.indexOf(c)>=0||t.asyncHandlerChronologyExceptionRange.set(c,{lowerMark:r,upperMark:u}))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}n()}))}else n()}else n()}))},t.prototype.isHandled=function(t){var e=this;return!!this.getHandlers().find((function(r){var n=r.op;return!!e.getStatelessOp(n)(t)}))},t.prototype.getHandlers=function(){return i(this.handlers)},t.prototype.detach=function(t){var e,r,n=[];try{for(var o=a(this.getHandlers()),i=o.next();!i.done;i=o.next()){var s=i.value;if(void 0===t||s.ctx===t)s.detach()&&n.push(s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=new t;return this.addHandler(n(n({},_.parsePropsFromArgs(e,"pipe")),{callback:function(t){return o.post(t)}}),t.propsFormMethodNames.attach),o},t.prototype.waitFor=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.addHandler(_.parsePropsFromArgs(e,"waitFor"),t.propsFormMethodNames.waitFor).promise},t.prototype.$attach=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attach.apply(this,i(t))},t.prototype.attach=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attach")},t.prototype.$attachOnce=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOnce.apply(this,i(t))},t.prototype.attachOnce=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOnce")},t.prototype.$attachExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachExtract.apply(this,i(t))},t.prototype.attachExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachExtract")},t.prototype.$attachPrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachPrepend.apply(this,i(t))},t.prototype.attachPrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachPrepend")},t.prototype.$attachOncePrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOncePrepend.apply(this,i(t))},t.prototype.attachOncePrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOncePrepend")},t.prototype.$attachOnceExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOnceExtract.apply(this,i(t))},t.prototype.attachOnceExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOnceExtract")},t.prototype.__attachX=function(e,r){var n=_.parsePropsFromArgs(e,"attach*"),o=this.addHandler(n,t.propsFormMethodNames[r]);return void 0===n.timeout?this:o.promise},t.prototype.postAsyncOnceHandled=function(t){var e=this;if(this.isHandled(t))return this.post(t);var r=new C.Deferred;return this.evtAttach.attachOnce((function(r){var n=r.op;return!!b.invokeOperator(e.getStatelessOp(n),t)}),(function(){return Promise.resolve().then((function(){return r.resolve(e.post(t))}))})),r.pr},t.prototype.postOrPostAndWait=function(t,e){var r=this;this.trace(t),S.overwriteReadonlyProp(this,"postCount",this.postCount+1);var n=this.getChronologyMark(),i=o(this.postSync(t),2),a=i[0],s=i[1],u=e?function(){return s}:function(){return r.postCount};if(a)return u();if(void 0===this.postAsync){if(0===this.asyncHandlerCount)return u();this.postAsync=this.postAsyncFactory()}return this.postAsync(t,n),u()},t.prototype.post=function(t){return this.postOrPostAndWait(t,!1)},t.prototype.postAndWait=function(t){return this.postOrPostAndWait(t,!0)},t.create=u.create,t.newCtx=m.newCtx,t.merge=f.merge,t.from=p.from,t.useEffect=h.useEffect,t.getCtx=c.getCtxFactory(),t.loosenType=z.loosenType,t.factorize=l.factorize,t.asPostable=d.asPostable,t.asyncPipe=y.asyncPipe,t.asNonPostable=v.asNonPostable,t.__defaultMaxHandlers=25,t.__1=(E.defineAccessors(t.prototype,"evtAttach",{get:function(){return this.lazyEvtAttach.evt}}),void E.defineAccessors(t.prototype,"evtDetach",{get:function(){return this.lazyEvtDetach.evt}})),t.__2=void Object.defineProperties(t.prototype,["__asyncHandlerChronologyMark","__asyncHandlerChronologyExceptionRange","__statelessByStatefulOp"].map((function(t){return[t.substr(2),{get:function(){return void 0===this[t]&&(this[t]=new O.Polyfill),this[t]}}]})).reduce((function(t,e){var r,i=o(e,2),a=i[0],s=i[1];return n(n({},t),((r={})[a]=s,r))}),{})),t.propsFormMethodNames={waitFor:{async:!0,extract:!1,once:!0,prepend:!1},attach:{async:!1,extract:!1,once:!1,prepend:!1},attachExtract:{async:!1,extract:!0,once:!1,prepend:!0},attachPrepend:{async:!1,extract:!1,once:!1,prepend:!0},attachOnce:{async:!1,extract:!1,once:!0,prepend:!1},attachOncePrepend:{async:!1,extract:!1,once:!0,prepend:!0},attachOnceExtract:{async:!1,extract:!0,once:!0,prepend:!0}},t}();function H(t,e,r){var n=R.z_f1.fλ_Result_getDetachArg(e);if("boolean"!=typeof n){var i=o(n,3),a=i[0],s=i[1],u=i[2];s?a.abort(s):a.done(u)}else(n||r)&&t.detach()}r.doDetachIfNeeded=H,r.Evt=T;try{S.overwriteReadonlyProp(r.Evt,"name","Evt")}catch(t){}s.importProxy.Evt=r.Evt},{"../tools/Deferred":46,"../tools/safeSetTimeout":47,"../tools/typeSafety/defineAccessors":49,"../tools/typeSafety/isPromiseLike":53,"../tools/typeSafety/overwriteReadonlyProp":56,"../tools/typeSafety/typeGuard":57,"./Evt.asNonPostable":2,"./Evt.asPostable":3,"./Evt.asyncPipe":4,"./Evt.create":5,"./Evt.factorize":6,"./Evt.from":7,"./Evt.getCtx":8,"./Evt.loosenType":10,"./Evt.merge":11,"./Evt.newCtx":12,"./Evt.parsePropsFromArgs":13,"./Evt.useEffect":14,"./LazyEvt":15,"./importProxy":18,"./types/EvtError":23,"./types/Operator":25,"./types/interfaces/CtxLike":29,"./util/encapsulateOpState":39,"./util/invokeOperator":45,"minimal-polyfills/Array.prototype.find":58,"minimal-polyfills/Map":59,"minimal-polyfills/WeakMap":62,"run-exclusive":63}],10:[function(t,e,r){"use strict";r.__esModule=!0,r.loosenType=void 0,r.loosenType=function(t){return t}},{}],11:[function(t,e,r){"use strict";r.__esModule=!0,r.merge=r.mergeImpl=void 0;var n=t("./importProxy");function o(t,e){var r=new n.importProxy.Evt,o=function(t){return r.post(t)};return e.forEach((function(e){void 0===t?e.attach(o):e.attach(t,o)})),r}r.mergeImpl=o,r.merge=function(t,e){return"length"in t?o(void 0,t):o(t,e)}},{"./importProxy":18}],12:[function(t,e,r){"use strict";r.__esModule=!0,r.newCtx=void 0;var n=t("./importProxy");r.newCtx=function(){return new n.importProxy.Ctx}},{"./importProxy":18}],13:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t};r.__esModule=!0,r.parsePropsFromArgs=r.matchAll=void 0;var a=t("../tools/typeSafety/id"),s=t("./util/compose"),u=t("../tools/typeSafety/typeGuard");function c(){return!0}r.matchAll=c;var l=function(t){return void 0!==t&&u.typeGuard(t)&&("function"==typeof t||"function"==typeof t[0])},f={op:c,ctx:void 0,timeout:void 0,callback:void 0};r.parsePropsFromArgs=function t(e,r){switch(u.typeGuard(f),r){case"pipe":var c=function(t){return 0===t.length?{}:{op:1===t.length?t[0]:s.compose.apply(void 0,i(t))}};if(l(e[0]))return a.id(n(n({},f),c(e)));var p=o(e),h=p[0],d=p.slice(1);return a.id(n(n(n({},f),void 0!==h?{ctx:h}:{}),c(d)));case"waitFor":return t(i(e.filter((function(t,r){return!(r===e.length-1&&void 0===t)})),[f.callback]),"attach*");case"attach*":switch(e.length){case 4:var y=o(e,4),v=y[0],_=y[1],m=y[2],g=y[3];return a.id(n(n({},f),{op:v,ctx:_,timeout:m,callback:g}));case 3:var E=o(e,3);v=E[0],_=E[1],m=E[2];if("number"==typeof _){var b=_,x=m;return l(v)?a.id(n(n({},f),{timeout:b,callback:x,op:v})):a.id(n(n({},f),{timeout:b,callback:x,ctx:v}))}return a.id(n(n({},f),{op:v,ctx:_,callback:m}));case 2:var O=o(e,2);v=O[0],_=O[1];if("number"==typeof v)return a.id(n(n({},f),{timeout:v,callback:_}));x=_;return l(v)?a.id(n(n({},f),{callback:x,op:v})):a.id(n(n({},f),{callback:x,ctx:v}));case 1:var P=o(e,1)[0];return a.id(n(n({},f),{callback:P}));case 0:return a.id(n({},f))}}}},{"../tools/typeSafety/id":51,"../tools/typeSafety/typeGuard":57,"./util/compose":38}],14:[function(t,e,r){"use strict";r.__esModule=!0,r.useEffect=void 0,r.useEffect=function(t,e,r){var n=0;("state"in e?e.evtChange:e).attach((function(e){return t(e,{isFirst:!1,data:e},n++)})),t("state"in e?e.state:null==r?void 0:r[0],{isFirst:!0},n++)}},{}],15:[function(t,e,r){"use strict";r.__esModule=!0,r.LazyEvt=void 0;var n=t("../tools/typeSafety/overwriteReadonlyProp"),o=t("./importProxy"),i=t("../tools/typeSafety/defineAccessors"),a=function(){function t(){this.initialPostCount=0}return t.prototype.post=function(t){return void 0===this.__evt?++this.initialPostCount:this.__evt.post(t)},t.__1=void i.defineAccessors(t.prototype,"evt",{get:function(){return void 0===this.__evt&&(this.__evt=new o.importProxy.Evt,n.overwriteReadonlyProp(this.__evt,"postCount",this.initialPostCount)),this.__evt}}),t}();r.LazyEvt=a},{"../tools/typeSafety/defineAccessors":49,"../tools/typeSafety/overwriteReadonlyProp":56,"./importProxy":18}],16:[function(t,e,r){"use strict";r.__esModule=!0,r.LazyStatefulEvt=void 0;var n=t("../tools/typeSafety/overwriteReadonlyProp"),o=t("./importProxy"),i=t("../tools/typeSafety/defineAccessors"),a=function(){function t(t){this.initialPostCount=0,this.initialState=t}return t.prototype.post=function(t){return void 0===this.__evt?(this.initialState=t,++this.initialPostCount):this.__evt.post(t)},t.__1=void i.defineAccessors(t.prototype,"evt",{get:function(){return void 0===this.__evt&&(this.__evt=new o.importProxy.StatefulEvt(this.initialState),delete this.initialState,n.overwriteReadonlyProp(this.__evt,"postCount",this.initialPostCount)),this.__evt}}),t}();r.LazyStatefulEvt=a},{"../tools/typeSafety/defineAccessors":49,"../tools/typeSafety/overwriteReadonlyProp":56,"./importProxy":18}],17:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t};r.__esModule=!0,r.StatefulEvt=void 0,t("minimal-polyfills/Object.is");var s=t("../tools/typeSafety/defineAccessors"),u=t("./LazyEvt"),c=t("./LazyStatefulEvt"),l=t("./importProxy"),f=t("./util/invokeOperator"),p=t("./Evt.parsePropsFromArgs"),h=t("./Evt"),d=t("./types/Operator"),y=function(t){function e(e){var r=t.call(this)||this;return r.lazyEvtDiff=new u.LazyEvt,r.lazyEvtChangeDiff=new u.LazyEvt,r.__state=e,r.lazyEvtChange=new c.LazyStatefulEvt(r.__state),r}return o(e,t),e.prototype.post=function(t){return this.__post(t,!1)},e.prototype.postForceChange=function(t){return this.__post(t?t[0]:this.state,!0)},e.prototype.__post=function(e,r){var n=this.state;this.__state=e;var o={prevState:n,newState:this.state};return this.lazyEvtDiff.post(o),!r&&Object.is(n,this.state)||(this.lazyEvtChange.post(this.state),this.lazyEvtChangeDiff.post(o)),t.prototype.post.call(this,e)},e.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.prototype.pipe.apply(this,a(e)),o=f.invokeOperator(this.getStatelessOp(p.parsePropsFromArgs(e,"pipe").op),this.state);if(d.z_f1.fλ_Result_NotMatched_match(o))throw new Error(["Cannot pipe StatefulEvt because the operator does not match","it's current state.","Use evt.toStateless([ctx]).pipe(op).toStatic(initialState)","to be sure the StatefulEvt is correctly initialized"].join(" "));return n.toStateful(o[0])},e.prototype.toStateless=function(e){return e?t.prototype.pipe.call(this,e):t.prototype.pipe.call(this)},e.__4=(s.defineAccessors(e.prototype,"state",{get:function(){return this.__state},set:function(t){this.post(t)}}),s.defineAccessors(e.prototype,"evtDiff",{get:function(){return this.lazyEvtDiff.evt}}),s.defineAccessors(e.prototype,"evtChange",{get:function(){return this.lazyEvtChange.evt}}),void s.defineAccessors(e.prototype,"evtChangeDiff",{get:function(){return this.lazyEvtChangeDiff.evt}})),e}(h.Evt);r.StatefulEvt=y,l.importProxy.StatefulEvt=r.StatefulEvt},{"../tools/typeSafety/defineAccessors":49,"./Evt":9,"./Evt.parsePropsFromArgs":13,"./LazyEvt":15,"./LazyStatefulEvt":16,"./importProxy":18,"./types/Operator":25,"./util/invokeOperator":45,"minimal-polyfills/Object.is":60}],18:[function(t,e,r){"use strict";r.__esModule=!0,r.importProxy=void 0,r.importProxy={}},{}],19:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};r.__esModule=!0,o(t("./types"),r),o(t("./util"),r);var i=t("./Ctx");n(r,i,"Ctx");var a=t("./Evt");n(r,a,"Evt");var s=t("./StatefulEvt");n(r,s,"StatefulEvt");var u=t("../tools/typeSafety/matchVoid");n(r,u,"matchVoid")},{"../tools/typeSafety/matchVoid":54,"./Ctx":1,"./Evt":9,"./StatefulEvt":17,"./types":27,"./util":44}],20:[function(t,e,r){"use strict";r.__esModule=!0,r.EventTargetLike=r.z_2=void 0;var n=t("../../tools/typeSafety");r.z_2={RxJSSubject_match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.subscribe},NodeStyleEventEmitter_match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.addListener&&"function"==typeof t.removeListener},JQueryStyleEventEmitter_match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.on&&"function"==typeof t.off},HasEventTargetAddRemove_match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener},canBe:function(t){try{return r.z_2.HasEventTargetAddRemove_match(t)||r.z_2.NodeStyleEventEmitter_match(t)||r.z_2.JQueryStyleEventEmitter_match(t)||r.z_2.RxJSSubject_match(t)}catch(t){return!1}}},function(t){!function(t){t.match=r.z_2.RxJSSubject_match}(t.RxJSSubject||(t.RxJSSubject={})),function(t){t.match=r.z_2.NodeStyleEventEmitter_match}(t.NodeStyleEventEmitter||(t.NodeStyleEventEmitter={})),function(t){t.match=r.z_2.JQueryStyleEventEmitter_match}(t.JQueryStyleEventEmitter||(t.JQueryStyleEventEmitter={})),function(t){t.match=r.z_2.HasEventTargetAddRemove_match}(t.HasEventTargetAddRemove||(t.HasEventTargetAddRemove={})),t.canBe=r.z_2.canBe}(r.EventTargetLike||(r.EventTargetLike={}))},{"../../tools/typeSafety":52}],21:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});r.__esModule=!0,r.Detached=void 0;var i=function(t){function e(){var e=this.constructor,r=t.call(this,"Evt handler detached")||this;return Object.setPrototypeOf(r,e.prototype),r}return o(e,t),e}(Error);r.Detached=i},{}],22:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});r.__esModule=!0,r.Timeout=void 0;var i=function(t){function e(e){var r=this.constructor,n=t.call(this,"Evt timeout after "+e+"ms")||this;return n.timeout=e,Object.setPrototypeOf(n,r.prototype),n}return o(e,t),e}(Error);r.Timeout=i},{}],23:[function(t,e,r){"use strict";r.__esModule=!0,r.EvtError=void 0;var n=t("./EvtError.Timeout"),o=t("./EvtError.Detached");!function(t){t.Timeout=n.Timeout,t.Detached=o.Detached}(r.EvtError||(r.EvtError={}))},{"./EvtError.Detached":21,"./EvtError.Timeout":22}],24:[function(t,e,r){"use strict";r.__esModule=!0},{}],25:[function(t,e,r){"use strict";r.__esModule=!0,r.Operator=r.z_f1=void 0;var n=t("../../tools/typeSafety");r.z_f1={"fλ_Stateful_match":function(t){return"function"!=typeof t},"fλ_Result_match":function(t){return r.z_f1.fλ_Result_Matched_match(t)||r.z_f1.fλ_Result_NotMatched_match(t)},"fλ_Result_getDetachArg":function(t){var e=r.z_f1.fλ_Result_Matched_match(t)?t[1]:t;return!!r.z_f1.fλ_Result_Detach_FromEvt_match(e)||!!r.z_f1.fλ_Result_Detach_WithCtxArg_match(e)&&[e.DETACH,e.err,e.res]},"fλ_Result_NotMatched_match":function(t){return null===t||r.z_f1.fλ_Result_Detach_match(t)},"fλ_Result_Matched_match":function(t){return n.typeGuard(t)&&t instanceof Object&&!("input"in t)&&(1===t.length||2===t.length&&(null===t[1]||r.z_f1.fλ_Result_Detach_match(t[1])))},"fλ_Result_Detach_FromEvt_match":function(t){return"DETACH"===t},"fλ_Result_Detach_WithCtxArg_match":function(t){return n.typeGuard(t)&&t instanceof Object&&t.DETACH instanceof Object},"fλ_Result_Detach_match":function(t){return r.z_f1.fλ_Result_Detach_FromEvt_match(t)||r.z_f1.fλ_Result_Detach_WithCtxArg_match(t)}},function(t){!function(t){!function(t){t.match=r.z_f1.fλ_Stateful_match}(t.Stateful||(t.Stateful={})),function(t){t.match=r.z_f1.fλ_Result_match,t.getDetachArg=r.z_f1.fλ_Result_getDetachArg,function(t){t.match=r.z_f1.fλ_Result_NotMatched_match}(t.NotMatched||(t.NotMatched={})),function(t){t.match=r.z_f1.fλ_Result_Matched_match}(t.Matched||(t.Matched={})),function(t){!function(t){t.match=r.z_f1.fλ_Result_Detach_FromEvt_match}(t.FromEvt||(t.FromEvt={})),function(t){t.match=r.z_f1.fλ_Result_Detach_WithCtxArg_match}(t.WithCtxArg||(t.WithCtxArg={})),t.match=r.z_f1.fλ_Result_Detach_match}(t.Detach||(t.Detach={}))}(t.Result||(t.Result={}))}(t.fλ||(t.fλ={}))}(r.Operator||(r.Operator={}))},{"../../tools/typeSafety":52}],26:[function(t,e,r){"use strict";r.__esModule=!0},{}],27:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};r.__esModule=!0,r.dom=void 0,o(t("./helper"),r),o(t("./interfaces"),r),o(t("./EventTargetLike"),r),o(t("./EvtError"),r),o(t("./Handler"),r);var i=t("./lib.dom");r.dom=i,o(t("./Operator"),r)},{"./EventTargetLike":20,"./EvtError":23,"./Handler":24,"./Operator":25,"./helper":26,"./interfaces":36,"./lib.dom":37}],28:[function(t,e,r){"use strict";r.__esModule=!0},{}],29:[function(t,e,r){"use strict";r.__esModule=!0,r.CtxLike=r.z_3=void 0;var n=t("../../../tools/typeSafety/typeGuard");r.z_3={match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.done&&"function"==typeof t.abort&&"function"==typeof t.zz__addHandler&&"function"==typeof t.zz__removeHandler}},function(t){t.match=r.z_3.match}(r.CtxLike||(r.CtxLike={}))},{"../../../tools/typeSafety/typeGuard":57}],30:[function(t,e,r){"use strict";r.__esModule=!0},{}],31:[function(t,e,r){"use strict";r.__esModule=!0},{}],32:[function(t,e,r){"use strict";r.__esModule=!0},{}],33:[function(t,e,r){"use strict";r.__esModule=!0},{}],34:[function(t,e,r){"use strict";r.__esModule=!0},{}],35:[function(t,e,r){"use strict";r.__esModule=!0},{}],36:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};r.__esModule=!0,o(t("./Ctx"),r),o(t("./CtxLike"),r),o(t("./Evt"),r),o(t("./Postable"),r),o(t("./StatefulEvt"),r),o(t("./StatefulPostable"),r),o(t("./VoidCtx"),r),o(t("./VoidEvt"),r)},{"./Ctx":28,"./CtxLike":29,"./Evt":30,"./Postable":31,"./StatefulEvt":32,"./StatefulPostable":33,"./VoidCtx":34,"./VoidEvt":35}],37:[function(t,e,r){"use strict";r.__esModule=!0,r.__hack=void 0, | ||
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).evt=t()}}((function(){return function t(e,r,n){function o(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}};e[a][0].call(l.exports,(function(t){return o(e[a][1][t]||t)}),l,l.exports,t,e,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};r.__esModule=!0,r.Ctx=void 0;var i=t("minimal-polyfills/Set"),a=t("minimal-polyfills/WeakMap"),s=t("../tools/typeSafety/assert"),u=t("../tools/typeSafety/typeGuard"),c=t("./LazyEvt"),l=t("./importProxy"),f=t("../tools/typeSafety/defineAccessors"),p=t("../tools/typeSafety/overwriteReadonlyProp"),h=function(){function t(){this.lazyEvtAttach=new c.LazyEvt,this.lazyEvtDetach=new c.LazyEvt,this.lazyEvtDoneOrAborted=new c.LazyEvt,this.handlers=new i.Polyfill,this.evtByHandler=new a.Polyfill}return t.prototype.onDoneOrAborted=function(t){this.lazyEvtDoneOrAborted.post(t)},t.prototype.waitFor=function(t){var e=this;return this.evtDoneOrAborted.waitFor(t).then((function(t){if("ABORTED"===t.type)throw t.error;return t.result}),(function(t){throw e.abort(t),t}))},t.prototype.abort=function(t){return this.__done(t)},t.prototype.done=function(t){return this.__done(void 0,t)},t.prototype.__done=function(t,e){var r,i,a=[];try{for(var s=o(this.handlers.values()),u=s.next();!u.done;u=s.next()){var c=u.value,l=this.evtByHandler.get(c);c.detach()&&a.push({handler:c,evt:l})}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return this.onDoneOrAborted(n(n({},t?{type:"ABORTED",error:t}:{type:"DONE",result:e}),{handlers:a})),a},t.prototype.getHandlers=function(){var t=this;return Array.from(this.handlers.values()).map((function(e){return{handler:e,evt:t.evtByHandler.get(e)}}))},t.prototype.zz__addHandler=function(t,e){s.assert(t.ctx===this),s.assert(u.typeGuard(t)),this.handlers.add(t),this.evtByHandler.set(t,e),this.lazyEvtAttach.post({handler:t,evt:e})},t.prototype.zz__removeHandler=function(t){s.assert(t.ctx===this),s.assert(u.typeGuard(t)),this.lazyEvtDetach.post({handler:t,evt:this.evtByHandler.get(t)}),this.handlers.delete(t)},t.__1=(f.defineAccessors(t.prototype,"evtDoneOrAborted",{get:function(){return this.lazyEvtDoneOrAborted.evt}}),f.defineAccessors(t.prototype,"evtAttach",{get:function(){return this.lazyEvtAttach.evt}}),void f.defineAccessors(t.prototype,"evtDetach",{get:function(){return this.lazyEvtDetach.evt}})),t}();r.Ctx=h;try{p.overwriteReadonlyProp(r.Ctx,"name","Ctx")}catch(t){}l.importProxy.Ctx=r.Ctx},{"../tools/typeSafety/assert":49,"../tools/typeSafety/defineAccessors":50,"../tools/typeSafety/overwriteReadonlyProp":57,"../tools/typeSafety/typeGuard":58,"./LazyEvt":15,"./importProxy":18,"minimal-polyfills/Set":62,"minimal-polyfills/WeakMap":63}],2:[function(t,e,r){"use strict";r.__esModule=!0,r.asNonPostable=void 0,r.asNonPostable=function(t){return t}},{}],3:[function(t,e,r){"use strict";r.__esModule=!0,r.asPostable=void 0,r.asPostable=function(t){return t}},{}],4:[function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};r.__esModule=!0,r.asyncPipe=void 0;var i=t("./Evt");r.asyncPipe=function(t,e){var r=this,a="state"in t?i.Evt.create(void 0):i.Evt.create(),s=0,u=function(i){return n(r,void 0,void 0,(function(){var r,n,u;return o(this,(function(o){switch(o.label){case 0:return s++,r=s,null!==(n=e(i))&&"then"in n?[4,n]:[3,2];case 1:return u=o.sent(),"state"in t&&r!==s?[2]:[3,3];case 2:u=n,o.label=3;case 3:return null===u||a.post(u[0]),[2]}}))}))};return t.attach(u),"state"in t&&u(t.state),a}},{"./Evt":9}],5:[function(t,e,r){"use strict";r.__esModule=!0,r.create=void 0;var n=t("./importProxy");r.create=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?new n.importProxy.Evt:new n.importProxy.StatefulEvt(t[0])}},{"./importProxy":18}],6:[function(t,e,r){"use strict";r.__esModule=!0,r.factorize=void 0,r.factorize=function(t){return t}},{}],7:[function(t,e,r){"use strict";r.__esModule=!0,r.from=void 0;var n=t("../tools/typeSafety/id"),o=t("../tools/typeSafety/assert"),i=t("../tools/typeSafety/typeGuard"),a=t("./Evt.merge"),s=t("./importProxy"),u=t("./types/EventTargetLike");function c(t,e,r,i){var l,f,p,h;if(p=e,!u.z_2.canBe(p)){if("then"in e){var d=new s.importProxy.Evt,y=(f=(l=function(){return null==t?void 0:t.evtDoneOrAborted.postCount})(),function(){return f!==l()});return e.then((function(t){y()||d.post(t)})),d}return a.mergeImpl(t,Array.from(e).map((function(e){return c(t,e,r,i)})))}if(u.z_2.NodeStyleEventEmitter_match(e))h={on:function(t,r){return e.addListener(r,t)},off:function(t,r){return e.removeListener(r,t)}};else if(u.z_2.JQueryStyleEventEmitter_match(e))h={on:function(t,r){return e.on(r,t)},off:function(t,r){return e.off(r,t)}};else if(u.z_2.HasEventTargetAddRemove_match(e))h={on:function(t,r,n){return e.addEventListener(r,t,n)},off:function(t,r,n){return e.removeEventListener(r,t,n)}};else if(u.z_2.RxJSSubject_match(e)){var v;h={on:function(t){return v=e.subscribe((function(e){return t(e)}))},off:function(){return v.unsubscribe()}}}else n.id(e),o.assert(!1);var _=new s.importProxy.Evt,m=function(t){return _.post(t)};return null==t||t.evtDoneOrAborted.attachOnce((function(){return h.off(m,r,i)})),h.on(m,r,i),_}r.from=function(t,e,r,n){return"evtDoneOrAborted"in t?(o.assert(i.typeGuard(e)&&i.typeGuard(r)&&i.typeGuard(n)),c(t,e,r,n)):(o.assert(i.typeGuard(e)&&i.typeGuard(r)),c(void 0,t,e,r))}},{"../tools/typeSafety/assert":49,"../tools/typeSafety/id":52,"../tools/typeSafety/typeGuard":58,"./Evt.merge":11,"./importProxy":18,"./types/EventTargetLike":20}],8:[function(t,e,r){"use strict";r.__esModule=!0,r.getCtxFactory=void 0;var n=t("minimal-polyfills/WeakMap"),o=t("./importProxy");r.getCtxFactory=function(){var t=new n.Polyfill;return function(e){var r=t.get(e);return void 0===r&&(r=new o.importProxy.Ctx,t.set(e,r)),r}}},{"./importProxy":18,"minimal-polyfills/WeakMap":63}],9:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t},a=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};r.__esModule=!0,r.Evt=r.doDetachIfNeeded=void 0,t("minimal-polyfills/Array.prototype.find");var s=t("./importProxy"),u=t("./Evt.create"),c=t("./Evt.getCtx"),l=t("./Evt.factorize"),f=t("./Evt.merge"),p=t("./Evt.from"),h=t("./Evt.useEffect"),d=t("./Evt.asPostable"),y=t("./Evt.asyncPipe"),v=t("./Evt.asNonPostable"),_=t("./Evt.parsePropsFromArgs"),m=t("./Evt.newCtx"),g=t("./LazyEvt"),E=t("../tools/typeSafety/defineAccessors"),b=t("./util/invokeOperator"),x=t("minimal-polyfills/Map"),P=t("minimal-polyfills/WeakMap"),O=t("run-exclusive"),S=t("../tools/typeSafety/overwriteReadonlyProp"),w=t("../tools/typeSafety/typeGuard"),M=t("./util/encapsulateOpState"),C=t("../tools/Deferred"),z=t("./Evt.loosenType"),A=t("../tools/safeSetTimeout"),k=t("../tools/typeSafety/isPromiseLike"),R=t("./types/Operator"),j=t("./types/EvtError"),D=t("./types/interfaces/CtxLike"),T=function(){function t(){this.lazyEvtAttach=new g.LazyEvt,this.lazyEvtDetach=new g.LazyEvt,this.__maxHandlers=void 0,this.postCount=0,this.traceId=null,this.handlers=[],this.handlerTriggers=new x.Polyfill,this.__currentChronologyMark=0,this.asyncHandlerCount=0}return t.setDefaultMaxHandlers=function(t){this.__defaultMaxHandlers=isFinite(t)?t:0},t.prototype.toStateful=function(t,e){var r=D.z_3.match(t),n=r?void 0:t,o=e||(r?t:void 0),i=new s.importProxy.StatefulEvt(n),a=function(t){return i.post(t)};return o?this.attach(o,a):this.attach(a),i},t.prototype.setMaxHandlers=function(t){return this.__maxHandlers=isFinite(t)?t:0,this},t.prototype.enableTrace=function(t){var e=t.id,r=t.formatter,n=t.log;this.traceId=e,this.traceFormatter=r||function(t){try{return JSON.stringify(t,null,2)}catch(e){return""+t}},this.log=void 0===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.log.apply(console,i(t))}:!1===n?void 0:n},t.prototype.disableTrace=function(){return this.traceId=null,this},t.prototype.getChronologyMark=function(){return this.__currentChronologyMark++},t.prototype.detachHandler=function(t,e,r){var n=this.handlers.indexOf(t);return!(n<0)&&(w.typeGuard(t,!!t.ctx)&&t.ctx.zz__removeHandler(t),this.handlers.splice(n,1),t.async&&this.asyncHandlerCount--,this.handlerTriggers.delete(t),void 0!==e[0]&&(A.safeClearTimeout(e[0]),r(new j.EvtError.Detached)),this.lazyEvtDetach.post(t),!0)},t.prototype.triggerHandler=function(t,e,r,n){var i=t.callback,a=t.once;void 0!==e[0]&&(A.safeClearTimeout(e[0]),e[0]=void 0),H(t,n,a);var s=o(n,1)[0],u=null==i?void 0:i.call(this,s);return null==r||r(s),k.isPromiseLike(u)?u:void 0},t.prototype.addHandler=function(t,e){var r=this;R.z_f1.fλ_Stateful_match(t.op)&&this.statelessByStatefulOp.set(t.op,M.encapsulateOpState(t.op));var o=new C.Deferred,i=[void 0],a=n(n(n({},t),e),{detach:function(){return r.detachHandler(a,i,o.reject)},promise:o.pr});if("number"==typeof a.timeout&&(i[0]=A.safeSetTimeout((function(){i[0]=void 0,a.detach(),o.reject(new j.EvtError.Timeout(a.timeout))}),a.timeout)),this.handlerTriggers.set(a,(function(t){return r.triggerHandler(a,i,o.isPending?o.resolve:void 0,t)})),a.async&&this.asyncHandlerChronologyMark.set(a,this.getChronologyMark()),a.prepend){var s=void 0;for(s=0;s<this.handlers.length&&this.handlers[s].extract;s++);this.handlers.splice(s,0,a)}else this.handlers.push(a);return a.async&&this.asyncHandlerCount++,this.checkForPotentialMemoryLeak(),w.typeGuard(a,!!a.ctx)&&a.ctx.zz__addHandler(a,this),this.lazyEvtAttach.post(a),a},t.prototype.checkForPotentialMemoryLeak=function(){var e=void 0!==this.__maxHandlers?this.__maxHandlers:t.__defaultMaxHandlers;if(0!==e&&this.handlers.length%(e+1)==0){var r=["MaxHandlersExceededWarning: Possible Evt memory leak detected.",this.handlers.length+" handlers attached"+(this.traceId?' to "'+this.traceId+'"':"")+".\n","Use Evt.prototype.setMaxHandlers(n) to increase limit on a specific Evt.\n","Use Evt.setDefaultMaxHandlers(n) to change the default limit currently set to "+t.__defaultMaxHandlers+".\n"].join(""),o=new x.Polyfill;this.getHandlers().map((function(t){var e=t.ctx,r=t.async,o=t.once,i=t.prepend,a=t.extract,s=t.op,u=t.callback;return n(n({hasCtx:!!e,once:o,prepend:i,extract:a,isWaitFor:r},s===_.matchAll?{}:{op:s.toString()}),u?{callback:u.toString()}:{})})).map((function(t){return"{\n"+Object.keys(t).map((function(e){return" "+e+": "+t[e]})).join(",\n")+"\n}"})).forEach((function(t){return o.set(t,(o.has(t)?o.get(t):0)+1)})),r+="\n"+Array.from(o.keys()).map((function(t){return o.get(t)+" handler"+(1===o.get(t)?"":"s")+" like:\n"+t})).join("\n")+"\n",null===this.traceId&&(r+="\n"+["To validate the identify of the Evt instance that is triggering this warning you can call",'Evt.prototype.enableTrace({ "id": "My evt id", "log": false }) on the Evt that you suspect.\n'].join(" "));try{console.warn(r)}catch(t){}}},t.prototype.getStatelessOp=function(t){return R.z_f1.fλ_Stateful_match(t)?this.statelessByStatefulOp.get(t):t},t.prototype.trace=function(t){var e,r=this;if(null!==this.traceId){var n="("+this.traceId+") ";if(!!this.handlers.find((function(e){var n=e.extract,o=e.op;return n&&!!r.getStatelessOp(o)(t)})))n+="extracted ";else{var o=this.handlers.filter((function(e){var n=e.extract,o=e.op;return!n&&!!r.getStatelessOp(o)(t)})).length;n+=o+" handler"+(o>1?"s":"")+", "}null===(e=this.log)||void 0===e||e.call(this,n+this.traceFormatter(t))}},t.prototype.postSync=function(t){var e,r,n=[],o=function(t){return[t,Promise.all(n).then((function(){}))]};try{for(var s=a(i(this.handlers)),u=s.next();!u.done;u=s.next()){var c=u.value,l=c.async,f=c.op,p=c.extract;if(!l){var h=b.invokeOperator(this.getStatelessOp(f),t,!0);if(R.z_f1.fλ_Result_NotMatched_match(h))H(c,h);else{var d=this.handlerTriggers.get(c);if(d){var y=d(h);if(void 0!==y&&n.push(y),p)return o(!0)}}}}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return o(!1)},t.prototype.postAsyncFactory=function(){var t=this;return O.buildMethodCb((function(e,r,n){var o,s;if(0!==t.asyncHandlerCount){var u,c=[];Promise.resolve().then((function(){return u=t.getChronologyMark()}));var l=function(n){if(!n.async)return"continue";var o=b.invokeOperator(t.getStatelessOp(n.op),e,!0);if(R.z_f1.fλ_Result_NotMatched_match(o))return H(n,o),"continue";var i=t.handlerTriggers.get(n);return i&&function(){var e=t.asyncHandlerChronologyMark.get(n);if(r>e)return!0;var o=t.asyncHandlerChronologyExceptionRange.get(n);return void 0!==o&&o.lowerMark<r&&r<o.upperMark&&e>o.upperMark}()?(c.push(new Promise((function(t){return n.promise.then((function(){return t()})).catch((function(){return t()}))}))),void i(o)):"continue"};try{for(var f=a(i(t.handlers)),p=f.next();!p.done;p=f.next()){l(p.value)}}catch(t){o={error:t}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}if(0!==c.length){var h=i(t.handlers);Promise.all(c).then((function(){var e,o;try{for(var i=a(t.handlers),s=i.next();!s.done;s=i.next()){var c=s.value;c.async&&(h.indexOf(c)>=0||t.asyncHandlerChronologyExceptionRange.set(c,{lowerMark:r,upperMark:u}))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}n()}))}else n()}else n()}))},t.prototype.isHandled=function(t){var e=this;return!!this.getHandlers().find((function(r){var n=r.op;return!!e.getStatelessOp(n)(t)}))},t.prototype.getHandlers=function(){return i(this.handlers)},t.prototype.detach=function(t){var e,r,n=[];try{for(var o=a(this.getHandlers()),i=o.next();!i.done;i=o.next()){var s=i.value;if(void 0===t||s.ctx===t)s.detach()&&n.push(s)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=new t;return this.addHandler(n(n({},_.parsePropsFromArgs(e,"pipe")),{callback:function(t){return o.post(t)}}),t.propsFormMethodNames.attach),o},t.prototype.waitFor=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.addHandler(_.parsePropsFromArgs(e,"waitFor"),t.propsFormMethodNames.waitFor).promise},t.prototype.$attach=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attach.apply(this,i(t))},t.prototype.attach=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attach")},t.prototype.$attachOnce=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOnce.apply(this,i(t))},t.prototype.attachOnce=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOnce")},t.prototype.$attachExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachExtract.apply(this,i(t))},t.prototype.attachExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachExtract")},t.prototype.$attachPrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachPrepend.apply(this,i(t))},t.prototype.attachPrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachPrepend")},t.prototype.$attachOncePrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOncePrepend.apply(this,i(t))},t.prototype.attachOncePrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOncePrepend")},t.prototype.$attachOnceExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOnceExtract.apply(this,i(t))},t.prototype.attachOnceExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOnceExtract")},t.prototype.__attachX=function(e,r){var n=_.parsePropsFromArgs(e,"attach*"),o=this.addHandler(n,t.propsFormMethodNames[r]);return void 0===n.timeout?this:o.promise},t.prototype.postAsyncOnceHandled=function(t){var e=this;if(this.isHandled(t))return this.post(t);var r=new C.Deferred;return this.evtAttach.attachOnce((function(r){var n=r.op;return!!b.invokeOperator(e.getStatelessOp(n),t)}),(function(){return Promise.resolve().then((function(){return r.resolve(e.post(t))}))})),r.pr},t.prototype.postOrPostAndWait=function(t,e){var r=this;this.trace(t),S.overwriteReadonlyProp(this,"postCount",this.postCount+1);var n=this.getChronologyMark(),i=o(this.postSync(t),2),a=i[0],s=i[1],u=e?function(){return s}:function(){return r.postCount};if(a)return u();if(void 0===this.postAsync){if(0===this.asyncHandlerCount)return u();this.postAsync=this.postAsyncFactory()}return this.postAsync(t,n),u()},t.prototype.post=function(t){return this.postOrPostAndWait(t,!1)},t.prototype.postAndWait=function(t){return this.postOrPostAndWait(t,!0)},t.create=u.create,t.newCtx=m.newCtx,t.merge=f.merge,t.from=p.from,t.useEffect=h.useEffect,t.getCtx=c.getCtxFactory(),t.loosenType=z.loosenType,t.factorize=l.factorize,t.asPostable=d.asPostable,t.asyncPipe=y.asyncPipe,t.asNonPostable=v.asNonPostable,t.__defaultMaxHandlers=25,t.__1=(E.defineAccessors(t.prototype,"evtAttach",{get:function(){return this.lazyEvtAttach.evt}}),void E.defineAccessors(t.prototype,"evtDetach",{get:function(){return this.lazyEvtDetach.evt}})),t.__2=void Object.defineProperties(t.prototype,["__asyncHandlerChronologyMark","__asyncHandlerChronologyExceptionRange","__statelessByStatefulOp"].map((function(t){return[t.substr(2),{get:function(){return void 0===this[t]&&(this[t]=new P.Polyfill),this[t]}}]})).reduce((function(t,e){var r,i=o(e,2),a=i[0],s=i[1];return n(n({},t),((r={})[a]=s,r))}),{})),t.propsFormMethodNames={waitFor:{async:!0,extract:!1,once:!0,prepend:!1},attach:{async:!1,extract:!1,once:!1,prepend:!1},attachExtract:{async:!1,extract:!0,once:!1,prepend:!0},attachPrepend:{async:!1,extract:!1,once:!1,prepend:!0},attachOnce:{async:!1,extract:!1,once:!0,prepend:!1},attachOncePrepend:{async:!1,extract:!1,once:!0,prepend:!0},attachOnceExtract:{async:!1,extract:!0,once:!0,prepend:!0}},t}();function H(t,e,r){var n=R.z_f1.fλ_Result_getDetachArg(e);if("boolean"!=typeof n){var i=o(n,3),a=i[0],s=i[1],u=i[2];s?a.abort(s):a.done(u)}else(n||r)&&t.detach()}r.doDetachIfNeeded=H,r.Evt=T;try{S.overwriteReadonlyProp(r.Evt,"name","Evt")}catch(t){}s.importProxy.Evt=r.Evt},{"../tools/Deferred":47,"../tools/safeSetTimeout":48,"../tools/typeSafety/defineAccessors":50,"../tools/typeSafety/isPromiseLike":54,"../tools/typeSafety/overwriteReadonlyProp":57,"../tools/typeSafety/typeGuard":58,"./Evt.asNonPostable":2,"./Evt.asPostable":3,"./Evt.asyncPipe":4,"./Evt.create":5,"./Evt.factorize":6,"./Evt.from":7,"./Evt.getCtx":8,"./Evt.loosenType":10,"./Evt.merge":11,"./Evt.newCtx":12,"./Evt.parsePropsFromArgs":13,"./Evt.useEffect":14,"./LazyEvt":15,"./importProxy":18,"./types/EvtError":23,"./types/Operator":25,"./types/interfaces/CtxLike":29,"./util/encapsulateOpState":39,"./util/invokeOperator":46,"minimal-polyfills/Array.prototype.find":59,"minimal-polyfills/Map":60,"minimal-polyfills/WeakMap":63,"run-exclusive":64}],10:[function(t,e,r){"use strict";r.__esModule=!0,r.loosenType=void 0,r.loosenType=function(t){return t}},{}],11:[function(t,e,r){"use strict";r.__esModule=!0,r.merge=r.mergeImpl=void 0;var n=t("./importProxy");function o(t,e){var r=new n.importProxy.Evt,o=function(t){return r.post(t)};return e.forEach((function(e){void 0===t?e.attach(o):e.attach(t,o)})),r}r.mergeImpl=o,r.merge=function(t,e){return"length"in t?o(void 0,t):o(t,e)}},{"./importProxy":18}],12:[function(t,e,r){"use strict";r.__esModule=!0,r.newCtx=void 0;var n=t("./importProxy");r.newCtx=function(){return new n.importProxy.Ctx}},{"./importProxy":18}],13:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t};r.__esModule=!0,r.parsePropsFromArgs=r.matchAll=void 0;var a=t("../tools/typeSafety/id"),s=t("./util/compose"),u=t("../tools/typeSafety/typeGuard");function c(){return!0}r.matchAll=c;var l=function(t){return void 0!==t&&u.typeGuard(t)&&("function"==typeof t||"function"==typeof t[0])},f={op:c,ctx:void 0,timeout:void 0,callback:void 0};r.parsePropsFromArgs=function t(e,r){switch(u.typeGuard(f),r){case"pipe":var c=function(t){return 0===t.length?{}:{op:1===t.length?t[0]:s.compose.apply(void 0,i(t))}};if(l(e[0]))return a.id(n(n({},f),c(e)));var p=o(e),h=p[0],d=p.slice(1);return a.id(n(n(n({},f),void 0!==h?{ctx:h}:{}),c(d)));case"waitFor":return t(i(e.filter((function(t,r){return!(r===e.length-1&&void 0===t)})),[f.callback]),"attach*");case"attach*":switch(e.length){case 4:var y=o(e,4),v=y[0],_=y[1],m=y[2],g=y[3];return a.id(n(n({},f),{op:v,ctx:_,timeout:m,callback:g}));case 3:var E=o(e,3);v=E[0],_=E[1],m=E[2];if("number"==typeof _){var b=_,x=m;return l(v)?a.id(n(n({},f),{timeout:b,callback:x,op:v})):a.id(n(n({},f),{timeout:b,callback:x,ctx:v}))}return a.id(n(n({},f),{op:v,ctx:_,callback:m}));case 2:var P=o(e,2);v=P[0],_=P[1];if("number"==typeof v)return a.id(n(n({},f),{timeout:v,callback:_}));x=_;return l(v)?a.id(n(n({},f),{callback:x,op:v})):a.id(n(n({},f),{callback:x,ctx:v}));case 1:var O=o(e,1)[0];return a.id(n(n({},f),{callback:O}));case 0:return a.id(n({},f))}}}},{"../tools/typeSafety/id":52,"../tools/typeSafety/typeGuard":58,"./util/compose":38}],14:[function(t,e,r){"use strict";r.__esModule=!0,r.useEffect=void 0,r.useEffect=function(t,e,r){var n=0;("state"in e?e.evtChange:e).attach((function(e){return t(e,{isFirst:!1,data:e},n++)})),t("state"in e?e.state:null==r?void 0:r[0],{isFirst:!0},n++)}},{}],15:[function(t,e,r){"use strict";r.__esModule=!0,r.LazyEvt=void 0;var n=t("../tools/typeSafety/overwriteReadonlyProp"),o=t("./importProxy"),i=t("../tools/typeSafety/defineAccessors"),a=function(){function t(){this.initialPostCount=0}return t.prototype.post=function(t){return void 0===this.__evt?++this.initialPostCount:this.__evt.post(t)},t.__1=void i.defineAccessors(t.prototype,"evt",{get:function(){return void 0===this.__evt&&(this.__evt=new o.importProxy.Evt,n.overwriteReadonlyProp(this.__evt,"postCount",this.initialPostCount)),this.__evt}}),t}();r.LazyEvt=a},{"../tools/typeSafety/defineAccessors":50,"../tools/typeSafety/overwriteReadonlyProp":57,"./importProxy":18}],16:[function(t,e,r){"use strict";r.__esModule=!0,r.LazyStatefulEvt=void 0;var n=t("../tools/typeSafety/overwriteReadonlyProp"),o=t("./importProxy"),i=t("../tools/typeSafety/defineAccessors"),a=function(){function t(t){this.initialPostCount=0,this.initialState=t}return t.prototype.post=function(t){return void 0===this.__evt?(this.initialState=t,++this.initialPostCount):this.__evt.post(t)},t.__1=void i.defineAccessors(t.prototype,"evt",{get:function(){return void 0===this.__evt&&(this.__evt=new o.importProxy.StatefulEvt(this.initialState),delete this.initialState,n.overwriteReadonlyProp(this.__evt,"postCount",this.initialPostCount)),this.__evt}}),t}();r.LazyStatefulEvt=a},{"../tools/typeSafety/defineAccessors":50,"../tools/typeSafety/overwriteReadonlyProp":57,"./importProxy":18}],17:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t};r.__esModule=!0,r.StatefulEvt=void 0,t("minimal-polyfills/Object.is");var s=t("../tools/typeSafety/defineAccessors"),u=t("./LazyEvt"),c=t("./LazyStatefulEvt"),l=t("./importProxy"),f=t("./util/invokeOperator"),p=t("./Evt.parsePropsFromArgs"),h=t("./Evt"),d=t("./types/Operator"),y=function(t){function e(e){var r=t.call(this)||this;return r.lazyEvtDiff=new u.LazyEvt,r.lazyEvtChangeDiff=new u.LazyEvt,r.__state=e,r.lazyEvtChange=new c.LazyStatefulEvt(r.__state),r}return o(e,t),e.prototype.post=function(t){return this.__post(t,!1)},e.prototype.postForceChange=function(t){return this.__post(t?t[0]:this.state,!0)},e.prototype.__post=function(e,r){var n=this.state;this.__state=e;var o={prevState:n,newState:this.state};return this.lazyEvtDiff.post(o),!r&&Object.is(n,this.state)||(this.lazyEvtChange.post(this.state),this.lazyEvtChangeDiff.post(o)),t.prototype.post.call(this,e)},e.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=t.prototype.pipe.apply(this,a(e)),o=f.invokeOperator(this.getStatelessOp(p.parsePropsFromArgs(e,"pipe").op),this.state);if(d.z_f1.fλ_Result_NotMatched_match(o))throw new Error(["Cannot pipe StatefulEvt because the operator does not match","it's current state.","Use evt.toStateless([ctx]).pipe(op).toStatic(initialState)","to be sure the StatefulEvt is correctly initialized"].join(" "));return n.toStateful(o[0])},e.prototype.toStateless=function(e){return e?t.prototype.pipe.call(this,e):t.prototype.pipe.call(this)},e.__4=(s.defineAccessors(e.prototype,"state",{get:function(){return this.__state},set:function(t){this.post(t)}}),s.defineAccessors(e.prototype,"evtDiff",{get:function(){return this.lazyEvtDiff.evt}}),s.defineAccessors(e.prototype,"evtChange",{get:function(){return this.lazyEvtChange.evt}}),void s.defineAccessors(e.prototype,"evtChangeDiff",{get:function(){return this.lazyEvtChangeDiff.evt}})),e}(h.Evt);r.StatefulEvt=y,l.importProxy.StatefulEvt=r.StatefulEvt},{"../tools/typeSafety/defineAccessors":50,"./Evt":9,"./Evt.parsePropsFromArgs":13,"./LazyEvt":15,"./LazyStatefulEvt":16,"./importProxy":18,"./types/Operator":25,"./util/invokeOperator":46,"minimal-polyfills/Object.is":61}],18:[function(t,e,r){"use strict";r.__esModule=!0,r.importProxy=void 0,r.importProxy={}},{}],19:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};r.__esModule=!0,o(t("./types"),r),o(t("./util"),r);var i=t("./Ctx");n(r,i,"Ctx");var a=t("./Evt");n(r,a,"Evt");var s=t("./StatefulEvt");n(r,s,"StatefulEvt");var u=t("../tools/typeSafety/matchVoid");n(r,u,"matchVoid")},{"../tools/typeSafety/matchVoid":55,"./Ctx":1,"./Evt":9,"./StatefulEvt":17,"./types":27,"./util":45}],20:[function(t,e,r){"use strict";r.__esModule=!0,r.EventTargetLike=r.z_2=void 0;var n=t("../../tools/typeSafety");r.z_2={RxJSSubject_match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.subscribe},NodeStyleEventEmitter_match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.addListener&&"function"==typeof t.removeListener},JQueryStyleEventEmitter_match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.on&&"function"==typeof t.off},HasEventTargetAddRemove_match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener},canBe:function(t){try{return r.z_2.HasEventTargetAddRemove_match(t)||r.z_2.NodeStyleEventEmitter_match(t)||r.z_2.JQueryStyleEventEmitter_match(t)||r.z_2.RxJSSubject_match(t)}catch(t){return!1}}},function(t){!function(t){t.match=r.z_2.RxJSSubject_match}(t.RxJSSubject||(t.RxJSSubject={})),function(t){t.match=r.z_2.NodeStyleEventEmitter_match}(t.NodeStyleEventEmitter||(t.NodeStyleEventEmitter={})),function(t){t.match=r.z_2.JQueryStyleEventEmitter_match}(t.JQueryStyleEventEmitter||(t.JQueryStyleEventEmitter={})),function(t){t.match=r.z_2.HasEventTargetAddRemove_match}(t.HasEventTargetAddRemove||(t.HasEventTargetAddRemove={})),t.canBe=r.z_2.canBe}(r.EventTargetLike||(r.EventTargetLike={}))},{"../../tools/typeSafety":53}],21:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});r.__esModule=!0,r.Detached=void 0;var i=function(t){function e(){var e=this.constructor,r=t.call(this,"Evt handler detached")||this;return Object.setPrototypeOf(r,e.prototype),r}return o(e,t),e}(Error);r.Detached=i},{}],22:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});r.__esModule=!0,r.Timeout=void 0;var i=function(t){function e(e){var r=this.constructor,n=t.call(this,"Evt timeout after "+e+"ms")||this;return n.timeout=e,Object.setPrototypeOf(n,r.prototype),n}return o(e,t),e}(Error);r.Timeout=i},{}],23:[function(t,e,r){"use strict";r.__esModule=!0,r.EvtError=void 0;var n=t("./EvtError.Timeout"),o=t("./EvtError.Detached");!function(t){t.Timeout=n.Timeout,t.Detached=o.Detached}(r.EvtError||(r.EvtError={}))},{"./EvtError.Detached":21,"./EvtError.Timeout":22}],24:[function(t,e,r){"use strict";r.__esModule=!0},{}],25:[function(t,e,r){"use strict";r.__esModule=!0,r.Operator=r.z_f1=void 0;var n=t("../../tools/typeSafety");r.z_f1={"fλ_Stateful_match":function(t){return"function"!=typeof t},"fλ_Result_match":function(t){return r.z_f1.fλ_Result_Matched_match(t)||r.z_f1.fλ_Result_NotMatched_match(t)},"fλ_Result_getDetachArg":function(t){var e=r.z_f1.fλ_Result_Matched_match(t)?t[1]:t;return!!r.z_f1.fλ_Result_Detach_FromEvt_match(e)||!!r.z_f1.fλ_Result_Detach_WithCtxArg_match(e)&&[e.DETACH,e.err,e.res]},"fλ_Result_NotMatched_match":function(t){return null===t||r.z_f1.fλ_Result_Detach_match(t)},"fλ_Result_Matched_match":function(t){return n.typeGuard(t)&&t instanceof Object&&!("input"in t)&&(1===t.length||2===t.length&&(null===t[1]||r.z_f1.fλ_Result_Detach_match(t[1])))},"fλ_Result_Detach_FromEvt_match":function(t){return"DETACH"===t},"fλ_Result_Detach_WithCtxArg_match":function(t){return n.typeGuard(t)&&t instanceof Object&&t.DETACH instanceof Object},"fλ_Result_Detach_match":function(t){return r.z_f1.fλ_Result_Detach_FromEvt_match(t)||r.z_f1.fλ_Result_Detach_WithCtxArg_match(t)}},function(t){!function(t){!function(t){t.match=r.z_f1.fλ_Stateful_match}(t.Stateful||(t.Stateful={})),function(t){t.match=r.z_f1.fλ_Result_match,t.getDetachArg=r.z_f1.fλ_Result_getDetachArg,function(t){t.match=r.z_f1.fλ_Result_NotMatched_match}(t.NotMatched||(t.NotMatched={})),function(t){t.match=r.z_f1.fλ_Result_Matched_match}(t.Matched||(t.Matched={})),function(t){!function(t){t.match=r.z_f1.fλ_Result_Detach_FromEvt_match}(t.FromEvt||(t.FromEvt={})),function(t){t.match=r.z_f1.fλ_Result_Detach_WithCtxArg_match}(t.WithCtxArg||(t.WithCtxArg={})),t.match=r.z_f1.fλ_Result_Detach_match}(t.Detach||(t.Detach={}))}(t.Result||(t.Result={}))}(t.fλ||(t.fλ={}))}(r.Operator||(r.Operator={}))},{"../../tools/typeSafety":53}],26:[function(t,e,r){"use strict";r.__esModule=!0},{}],27:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};r.__esModule=!0,r.dom=void 0,o(t("./helper"),r),o(t("./interfaces"),r),o(t("./EventTargetLike"),r),o(t("./EvtError"),r),o(t("./Handler"),r);var i=t("./lib.dom");r.dom=i,o(t("./Operator"),r)},{"./EventTargetLike":20,"./EvtError":23,"./Handler":24,"./Operator":25,"./helper":26,"./interfaces":36,"./lib.dom":37}],28:[function(t,e,r){"use strict";r.__esModule=!0},{}],29:[function(t,e,r){"use strict";r.__esModule=!0,r.CtxLike=r.z_3=void 0;var n=t("../../../tools/typeSafety/typeGuard");r.z_3={match:function(t){return n.typeGuard(t)&&t instanceof Object&&"function"==typeof t.done&&"function"==typeof t.abort&&"function"==typeof t.zz__addHandler&&"function"==typeof t.zz__removeHandler}},function(t){t.match=r.z_3.match}(r.CtxLike||(r.CtxLike={}))},{"../../../tools/typeSafety/typeGuard":58}],30:[function(t,e,r){"use strict";r.__esModule=!0},{}],31:[function(t,e,r){"use strict";r.__esModule=!0},{}],32:[function(t,e,r){"use strict";r.__esModule=!0},{}],33:[function(t,e,r){"use strict";r.__esModule=!0},{}],34:[function(t,e,r){"use strict";r.__esModule=!0},{}],35:[function(t,e,r){"use strict";r.__esModule=!0},{}],36:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};r.__esModule=!0,o(t("./Ctx"),r),o(t("./CtxLike"),r),o(t("./Evt"),r),o(t("./Postable"),r),o(t("./StatefulEvt"),r),o(t("./StatefulPostable"),r),o(t("./VoidCtx"),r),o(t("./VoidEvt"),r)},{"./Ctx":28,"./CtxLike":29,"./Evt":30,"./Postable":31,"./StatefulEvt":32,"./StatefulPostable":33,"./VoidCtx":34,"./VoidEvt":35}],37:[function(t,e,r){"use strict";r.__esModule=!0,r.__hack=void 0, | ||
/*! ***************************************************************************** | ||
@@ -16,2 +16,2 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
r.__hack="NOT TYPE ONLY"},{}],38:[function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t};r.__esModule=!0,r.compose=void 0;var i=t("./encapsulateOpState"),a=t("./invokeOperator"),s=t("../../tools/typeSafety/id"),u=t("../../tools/typeSafety/assert"),c=t("../../tools/typeSafety/typeGuard"),l=t("../types/Operator");function f(t,e){var r=l.z_f1.fλ_Stateful_match(t)?i.encapsulateOpState(t):s.id(t),o=l.z_f1.fλ_Stateful_match(e)?i.encapsulateOpState(e):s.id(e);return s.id((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=n(t,3),f=i[0],p=i[2],h=a.invokeOperator(r,f,p);if(l.z_f1.fλ_Result_NotMatched_match(h))return u.assert(c.typeGuard(h)),h;var d=h[1]?h[1]:null;u.assert(c.typeGuard(d));var y=n(h,1),v=y[0],_=a.invokeOperator(o,v,p);return l.Operator.fλ.Result.NotMatched.match(_)?(u.assert(c.typeGuard(_)),null!==d?d:_):s.id([_[0],d||(_[1]?_[1]:null)])}))}r.compose=function t(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(1===e.length){var a=n(e,1),s=a[0];return l.z_f1.fλ_Stateful_match(s)?i.encapsulateOpState(s):s}var u=n(e),c=u[0],p=u[1],h=u.slice(2),d=f(c,p);return 0===h.length?d:t.apply(void 0,o([d],h))}},{"../../tools/typeSafety/assert":48,"../../tools/typeSafety/id":51,"../../tools/typeSafety/typeGuard":57,"../types/Operator":25,"./encapsulateOpState":39,"./invokeOperator":45}],39:[function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};r.__esModule=!0,r.encapsulateOpState=void 0;var o=t("../../tools/typeSafety/id"),i=t("../types/Operator");r.encapsulateOpState=function(t){var e=t[1];return o.id((function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=n(r,3),s=a[0],u=a[2],c=t[0](s,e,u);return u&&i.z_f1.fλ_Result_Matched_match(c)&&(e=c[0]),c}))}},{"../../tools/typeSafety/id":51,"../types/Operator":25}],40:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]});r.__esModule=!0,n(r,t("./throttleTime"),"throttleTime"),n(r,t("./to"),"to"),n(r,t("./nonNullable"),"nonNullable")},{"./nonNullable":41,"./throttleTime":42,"./to":43}],41:[function(t,e,r){"use strict";r.__esModule=!0,r.nonNullable=void 0;r.nonNullable=function(t){return null==t?null:[t]}},{}],42:[function(t,e,r){"use strict";r.__esModule=!0,r.throttleTime=void 0;var n=t("../compose");r.throttleTime=function(t){return n.compose([function(e,r){var n=r.lastClick,o=Date.now();return o-n<t?null:[{data:e,lastClick:o}]},{lastClick:0,data:null}],(function(t){return[t.data]}))}},{"../compose":38}],43:[function(t,e,r){"use strict";r.__esModule=!0,r.to=void 0;var n=new Map;r.to=function(t){var e;return null!==(e=n.get(t))&&void 0!==e?e:(n.set(t,(function(e){return e[0]!==t?null:[e[1]]})),r.to(t))}},{}],44:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};r.__esModule=!0,o(t("./genericOperators"),r);var i=t("./compose");n(r,i,"compose");var a=t("./invokeOperator");n(r,a,"invokeOperator")},{"./compose":38,"./genericOperators":40,"./invokeOperator":45}],45:[function(t,e,r){"use strict";r.__esModule=!0,r.invokeOperator=void 0;var n=t("../types/Operator");r.invokeOperator=function(t,e,r){var o=t(e,void 0,r);return n.z_f1.fλ_Result_match(o)?o:o?[e]:null}},{"../types/Operator":25}],46:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});r.__esModule=!0,r.VoidDeferred=r.Deferred=void 0;var i=t("./typeSafety/overwriteReadonlyProp"),a=function(){var t,e,r=this;this.isPending=!0,this.pr=new Promise((function(n,o){t=function(t){i.overwriteReadonlyProp(r,"isPending",!1),n(t)},e=function(t){i.overwriteReadonlyProp(r,"isPending",!1),o(t)}})),this.resolve=t,this.reject=e};r.Deferred=a;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(a);r.VoidDeferred=s},{"./typeSafety/overwriteReadonlyProp":56}],47:[function(t,e,r){"use strict";r.__esModule=!0,r.safeClearTimeout=r.safeSetTimeout=void 0,r.safeSetTimeout=function(t,e){return setTimeout(t,e)},r.safeClearTimeout=function(t){return clearTimeout(t)}},{}],48:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};r.__esModule=!0,r.assert=r.AssertionError=void 0;var a=t("./overwriteReadonlyProp"),s=function(t){function e(e){var r=this.constructor,n=t.call(this,"Wrong assertion encountered"+(e?': "'+e+'"':""))||this;if(Object.setPrototypeOf(n,r.prototype),!n.stack)return n;try{a.overwriteReadonlyProp(n,"stack",n.stack.split("\n").filter((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=i(t,2),n=r[1];return 1!==n&&2!==n})).join("\n"))}catch(t){}return n}return o(e,t),e}(Error);r.AssertionError=s,r.assert=function(t,e){if(!t)throw new s(e)}},{"./overwriteReadonlyProp":56}],49:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};r.__esModule=!0,r.defineAccessors=void 0,r.defineAccessors=function(t,e,r){var o=r.get,i=r.set;Object.defineProperty(t,e,n(n(n({},Object.getOwnPropertyDescriptor(t,e)||{enumerable:!0,configurable:!0}),void 0!==o?{get:function(){return o.call(this)}}:{}),void 0!==i?{set:function(t){i.call(this,t)}}:{}))}},{}],50:[function(t,e,r){"use strict";r.__esModule=!0,r.exclude=void 0,r.exclude=function(t){var e=t instanceof Object?function(e){return t.indexOf(e)<0}:function(e){return e!==t};return function(t){return e(t)}}},{}],51:[function(t,e,r){"use strict";r.__esModule=!0,r.id=void 0,r.id=function(t){return t}},{}],52:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]});r.__esModule=!0,n(r,t("./assert"),"assert"),n(r,t("./exclude"),"exclude"),n(r,t("./id"),"id"),n(r,t("./matchVoid"),"matchVoid"),n(r,t("./objectKeys"),"objectKeys"),n(r,t("./typeGuard"),"typeGuard")},{"./assert":48,"./exclude":50,"./id":51,"./matchVoid":54,"./objectKeys":55,"./typeGuard":57}],53:[function(t,e,r){"use strict";r.__esModule=!0,r.isPromiseLike=void 0,r.isPromiseLike=function(t){return"function"==typeof(null==t?void 0:t.then)}},{}],54:[function(t,e,r){"use strict";r.__esModule=!0,r.matchVoid=void 0,r.matchVoid=function(t){return void 0===t}},{}],55:[function(t,e,r){"use strict";r.__esModule=!0,r.objectKeys=void 0,r.objectKeys=function(t){return Object.keys(t)}},{}],56:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};r.__esModule=!0,r.overwriteReadonlyProp=void 0,r.overwriteReadonlyProp=function(t,e,r){try{t[e]=r}catch(t){}if(t[e]===r)return r;var o=void 0,i=Object.getOwnPropertyDescriptor(t,e)||{enumerable:!0,configurable:!0};if(i.get)throw new Error("Probably a wrong ides to overwrite "+e+" getter");try{Object.defineProperty(t,e,n(n({},i),{value:r}))}catch(t){o=t}if(t[e]!==r)throw o||new Error("Can't assign");return r}},{}],57:[function(t,e,r){"use strict";r.__esModule=!0,r.typeGuard=void 0,r.typeGuard=function(t,e){return void 0===e&&(e=!0),e}},{}],58:[function(t,e,r){"use strict";r.__esModule=!0,Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),r=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<r;){var i=e[o];if(t.call(n,i,o,e))return i;o++}},configurable:!0,writable:!0})},{}],59:[function(t,e,r){"use strict";r.__esModule=!0,r.Polyfill=r.LightMapImpl=void 0;var n=function(){function t(){this.record=[]}return t.prototype.has=function(t){return this.record.map((function(t){return t[0]})).indexOf(t)>=0},t.prototype.get=function(t){var e=this.record.filter((function(e){return e[0]===t}))[0];if(void 0!==e)return e[1]},t.prototype.set=function(t,e){var r=this.record.filter((function(e){return e[0]===t}))[0];return void 0===r?this.record.push([t,e]):r[1]=e,this},t.prototype.delete=function(t){var e=this.record.map((function(t){return t[0]})).indexOf(t);return!(e<0)&&(this.record.splice(e,1),!0)},t.prototype.keys=function(){return this.record.map((function(t){return t[0]}))},t}();r.LightMapImpl=n,r.Polyfill="undefined"!=typeof Map?Map:n},{}],60:[function(t,e,r){"use strict";r.__esModule=!0,Object.is||(Object.is=function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e})},{}],61:[function(t,e,r){"use strict";r.__esModule=!0,r.Polyfill=r.LightSetImpl=void 0;var n=t("./Map"),o=function(){function t(t){if(this.map=new n.Polyfill,void 0!==t)for(var e=0,r=t;e<r.length;e++){var o=r[e];this.add(o)}}return t.prototype.has=function(t){return this.map.has(t)},t.prototype.add=function(t){return this.map.set(t,!0),this},t.prototype.values=function(){return this.map.keys()},t.prototype.delete=function(t){return this.map.delete(t)},t}();r.LightSetImpl=o,r.Polyfill="undefined"!=typeof Set?Set:o},{"./Map":59}],62:[function(t,e,r){"use strict";r.__esModule=!0,r.Polyfill=void 0;var n=t("./Map");r.Polyfill="undefined"!=typeof WeakMap?WeakMap:n.Polyfill},{"./Map":59}],63:[function(t,e,r){"use strict";var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n};r.__esModule=!0,r.buildMethodCb=r.buildCb=r.getPrComplete=r.isRunning=r.cancelAllQueuedCalls=r.getQueuedCallCount=r.buildMethod=r.build=r.createGroupRef=void 0;var o=t("minimal-polyfills/WeakMap"),i=function(){function t(){this.queuedCalls=[],this.isRunning=!1,this.prComplete=Promise.resolve()}return t.prototype.cancelAllQueuedCalls=function(){var t;return this.queuedCalls.splice(0,t=this.queuedCalls.length),t},t}(),a={},s=new o.Polyfill;function u(t,e){var r=s.get(t);r||(r=new o.Polyfill,s.set(t,r));var n=r.get(e);return n||(n=new i,r.set(e,n)),n}function c(){return new Array(0)}r.createGroupRef=c,r.build=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return p(!0,c(),t[0]);case 2:return p(!0,t[0],t[1])}},r.buildMethod=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return p(!1,c(),t[0]);case 2:return p(!1,t[0],t[1])}},r.getQueuedCallCount=function(t,e){var r=f(t,e);return r?r.queuedCalls.length:0},r.cancelAllQueuedCalls=function(t,e){var r=f(t,e);return r?r.cancelAllQueuedCalls():0},r.isRunning=function(t,e){var r=f(t,e);return!!r&&r.isRunning},r.getPrComplete=function(t,e){var r=f(t,e);return r?r.prComplete:Promise.resolve()};var l=new o.Polyfill;function f(t,e){void 0===e&&(e=a);var r=l.get(t);if(!r)throw Error("Not a run exclusiveFunction");var n=s.get(e);if(n)return n.get(r)}function p(t,e,r){var n,o=function(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(!t){if(!(this instanceof Object))throw new Error("Run exclusive, <this> should be an object");n=u(this,e)}return new Promise((function(t,e){var a;n.prComplete=new Promise((function(t){return a=function(){return t()}}));var s=function(r){a(),n.isRunning=!1,n.queuedCalls.length&&n.queuedCalls.shift()(),"data"in r?t(r.data):e(r.reason)};(function t(){for(var e=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n.isRunning)n.queuedCalls.push((function(){return t.apply(e,o)}));else{n.isRunning=!0;try{r.apply(this,o).then((function(t){return s({data:t})})).catch((function(t){return s({reason:t})}))}catch(t){s({reason:t})}}}).apply(o,i)}))};return t&&(n=u(a,e)),l.set(o,e),o}function h(t,e,r){var o,i=function(){for(var i=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];if(!t){if(!(this instanceof Object))throw new Error("Run exclusive, <this> should be an object");o=u(this,e)}var c,l=void 0;a.length&&"function"==typeof a[a.length-1]&&(l=a.pop()),o.prComplete=new Promise((function(t){return c=function(){return t()}}));var f=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];c(),o.isRunning=!1,o.queuedCalls.length&&o.queuedCalls.shift()(),l&&l.apply(i,t)};f.hasCallback=!!l,function t(){for(var e=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(o.isRunning)o.queuedCalls.push((function(){return t.apply(e,i)}));else{o.isRunning=!0;try{r.apply(this,n(i,[f]))}catch(t){throw t.message+=" ( This exception should not have been thrown, miss use of run-exclusive buildCb )",t}}}.apply(this,a)};return t&&(o=u(a,e)),l.set(i,e),i}r.buildCb=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return h(!0,c(),t[0]);case 2:return h(!0,t[0],t[1])}},r.buildMethodCb=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return h(!1,c(),t[0]);case 2:return h(!1,t[0],t[1])}}},{"minimal-polyfills/WeakMap":62}]},{},[19])(19)})); | ||
r.__hack="NOT TYPE ONLY"},{}],38:[function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t};r.__esModule=!0,r.compose=void 0;var i=t("./encapsulateOpState"),a=t("./invokeOperator"),s=t("../../tools/typeSafety/id"),u=t("../../tools/typeSafety/assert"),c=t("../../tools/typeSafety/typeGuard"),l=t("../types/Operator");function f(t,e){var r=l.z_f1.fλ_Stateful_match(t)?i.encapsulateOpState(t):s.id(t),o=l.z_f1.fλ_Stateful_match(e)?i.encapsulateOpState(e):s.id(e);return s.id((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=n(t,3),f=i[0],p=i[2],h=a.invokeOperator(r,f,p);if(l.z_f1.fλ_Result_NotMatched_match(h))return u.assert(c.typeGuard(h)),h;var d=h[1]?h[1]:null;u.assert(c.typeGuard(d));var y=n(h,1),v=y[0],_=a.invokeOperator(o,v,p);return l.Operator.fλ.Result.NotMatched.match(_)?(u.assert(c.typeGuard(_)),null!==d?d:_):s.id([_[0],d||(_[1]?_[1]:null)])}))}r.compose=function t(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(1===e.length){var a=n(e,1),s=a[0];return l.z_f1.fλ_Stateful_match(s)?i.encapsulateOpState(s):s}var u=n(e),c=u[0],p=u[1],h=u.slice(2),d=f(c,p);return 0===h.length?d:t.apply(void 0,o([d],h))}},{"../../tools/typeSafety/assert":49,"../../tools/typeSafety/id":52,"../../tools/typeSafety/typeGuard":58,"../types/Operator":25,"./encapsulateOpState":39,"./invokeOperator":46}],39:[function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};r.__esModule=!0,r.encapsulateOpState=void 0;var o=t("../../tools/typeSafety/id"),i=t("../types/Operator");r.encapsulateOpState=function(t){var e=t[1];return o.id((function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=n(r,3),s=a[0],u=a[2],c=t[0](s,e,u);return u&&i.z_f1.fλ_Result_Matched_match(c)&&(e=c[0]),c}))}},{"../../tools/typeSafety/id":52,"../types/Operator":25}],40:[function(t,e,r){"use strict";var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t};r.__esModule=!0,r.distinct=r.scan=void 0;var i=t("../compose");r.scan=function(t,e){return i.compose([function(e,r){var o=n(r,3),i=o[1],a=o[2];return[[e,t(i,e,a),a+1]]},[null,e,0]],(function(t){return[n(t,2)[1]]}))},r.distinct=function(t,e){var r;return i.compose((function(r){var n,o;return[{data:r,selectedKey:null!==(n=null==t?void 0:t(r))&&void 0!==n?n:r,currentFlushCount:null!==(o=null==e?void 0:e.evtDoneOrAborted.postCount)&&void 0!==o?o:0}]}),[function(t,e){var r=t.data,n=t.selectedKey,i=t.currentFlushCount,a=e.alreadyPostedData,s=e.previousFlushCount;return[{boxedData:i===s&&a.has(n)?null:[r],alreadyPostedData:new Set(o(i!==s?[]:Array.from(a),[n])),previousFlushCount:i}]},{boxedData:null,alreadyPostedData:new Set,previousFlushCount:null!==(r=null==e?void 0:e.evtDoneOrAborted.postCount)&&void 0!==r?r:0}],(function(t){return t.boxedData}))}},{"../compose":38}],41:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]});r.__esModule=!0,n(r,t("./throttleTime"),"throttleTime"),n(r,t("./to"),"to"),n(r,t("./nonNullable"),"nonNullable"),n(r,t("./distinct"),"distinct")},{"./distinct":40,"./nonNullable":42,"./throttleTime":43,"./to":44}],42:[function(t,e,r){"use strict";r.__esModule=!0,r.nonNullable=void 0;r.nonNullable=function(t){return null==t?null:[t]}},{}],43:[function(t,e,r){"use strict";r.__esModule=!0,r.throttleTime=void 0;var n=t("../compose");r.throttleTime=function(t){return n.compose([function(e,r){var n=r.lastClick,o=Date.now();return o-n<t?null:[{data:e,lastClick:o}]},{lastClick:0,data:null}],(function(t){return[t.data]}))}},{"../compose":38}],44:[function(t,e,r){"use strict";r.__esModule=!0,r.to=void 0;var n=new Map;r.to=function(t){var e;return null!==(e=n.get(t))&&void 0!==e?e:(n.set(t,(function(e){return e[0]!==t?null:[e[1]]})),r.to(t))}},{}],45:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};r.__esModule=!0,o(t("./genericOperators"),r);var i=t("./compose");n(r,i,"compose");var a=t("./invokeOperator");n(r,a,"invokeOperator")},{"./compose":38,"./genericOperators":41,"./invokeOperator":46}],46:[function(t,e,r){"use strict";r.__esModule=!0,r.invokeOperator=void 0;var n=t("../types/Operator");r.invokeOperator=function(t,e,r){var o=t(e,void 0,r);return n.z_f1.fλ_Result_match(o)?o:o?[e]:null}},{"../types/Operator":25}],47:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});r.__esModule=!0,r.VoidDeferred=r.Deferred=void 0;var i=t("./typeSafety/overwriteReadonlyProp"),a=function(){var t,e,r=this;this.isPending=!0,this.pr=new Promise((function(n,o){t=function(t){i.overwriteReadonlyProp(r,"isPending",!1),n(t)},e=function(t){i.overwriteReadonlyProp(r,"isPending",!1),o(t)}})),this.resolve=t,this.reject=e};r.Deferred=a;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(a);r.VoidDeferred=s},{"./typeSafety/overwriteReadonlyProp":57}],48:[function(t,e,r){"use strict";r.__esModule=!0,r.safeClearTimeout=r.safeSetTimeout=void 0,r.safeSetTimeout=function(t,e){return setTimeout(t,e)},r.safeClearTimeout=function(t){return clearTimeout(t)}},{}],49:[function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};r.__esModule=!0,r.assert=r.AssertionError=void 0;var a=t("./overwriteReadonlyProp"),s=function(t){function e(e){var r=this.constructor,n=t.call(this,"Wrong assertion encountered"+(e?': "'+e+'"':""))||this;if(Object.setPrototypeOf(n,r.prototype),!n.stack)return n;try{a.overwriteReadonlyProp(n,"stack",n.stack.split("\n").filter((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=i(t,2),n=r[1];return 1!==n&&2!==n})).join("\n"))}catch(t){}return n}return o(e,t),e}(Error);r.AssertionError=s,r.assert=function(t,e){if(!t)throw new s(e)}},{"./overwriteReadonlyProp":57}],50:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};r.__esModule=!0,r.defineAccessors=void 0,r.defineAccessors=function(t,e,r){var o=r.get,i=r.set;Object.defineProperty(t,e,n(n(n({},Object.getOwnPropertyDescriptor(t,e)||{enumerable:!0,configurable:!0}),void 0!==o?{get:function(){return o.call(this)}}:{}),void 0!==i?{set:function(t){i.call(this,t)}}:{}))}},{}],51:[function(t,e,r){"use strict";r.__esModule=!0,r.exclude=void 0,r.exclude=function(t){var e=t instanceof Object?function(e){return t.indexOf(e)<0}:function(e){return e!==t};return function(t){return e(t)}}},{}],52:[function(t,e,r){"use strict";r.__esModule=!0,r.id=void 0,r.id=function(t){return t}},{}],53:[function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]});r.__esModule=!0,n(r,t("./assert"),"assert"),n(r,t("./exclude"),"exclude"),n(r,t("./id"),"id"),n(r,t("./matchVoid"),"matchVoid"),n(r,t("./objectKeys"),"objectKeys"),n(r,t("./typeGuard"),"typeGuard")},{"./assert":49,"./exclude":51,"./id":52,"./matchVoid":55,"./objectKeys":56,"./typeGuard":58}],54:[function(t,e,r){"use strict";r.__esModule=!0,r.isPromiseLike=void 0,r.isPromiseLike=function(t){return"function"==typeof(null==t?void 0:t.then)}},{}],55:[function(t,e,r){"use strict";r.__esModule=!0,r.matchVoid=void 0,r.matchVoid=function(t){return void 0===t}},{}],56:[function(t,e,r){"use strict";r.__esModule=!0,r.objectKeys=void 0,r.objectKeys=function(t){return Object.keys(t)}},{}],57:[function(t,e,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};r.__esModule=!0,r.overwriteReadonlyProp=void 0,r.overwriteReadonlyProp=function(t,e,r){try{t[e]=r}catch(t){}if(t[e]===r)return r;var o=void 0,i=Object.getOwnPropertyDescriptor(t,e)||{enumerable:!0,configurable:!0};if(i.get)throw new Error("Probably a wrong ides to overwrite "+e+" getter");try{Object.defineProperty(t,e,n(n({},i),{value:r}))}catch(t){o=t}if(t[e]!==r)throw o||new Error("Can't assign");return r}},{}],58:[function(t,e,r){"use strict";r.__esModule=!0,r.typeGuard=void 0,r.typeGuard=function(t,e){return void 0===e&&(e=!0),e}},{}],59:[function(t,e,r){"use strict";r.__esModule=!0,Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),r=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<r;){var i=e[o];if(t.call(n,i,o,e))return i;o++}},configurable:!0,writable:!0})},{}],60:[function(t,e,r){"use strict";r.__esModule=!0,r.Polyfill=r.LightMapImpl=void 0;var n=function(){function t(){this.record=[]}return t.prototype.has=function(t){return this.record.map((function(t){return t[0]})).indexOf(t)>=0},t.prototype.get=function(t){var e=this.record.filter((function(e){return e[0]===t}))[0];if(void 0!==e)return e[1]},t.prototype.set=function(t,e){var r=this.record.filter((function(e){return e[0]===t}))[0];return void 0===r?this.record.push([t,e]):r[1]=e,this},t.prototype.delete=function(t){var e=this.record.map((function(t){return t[0]})).indexOf(t);return!(e<0)&&(this.record.splice(e,1),!0)},t.prototype.keys=function(){return this.record.map((function(t){return t[0]}))},t}();r.LightMapImpl=n,r.Polyfill="undefined"!=typeof Map?Map:n},{}],61:[function(t,e,r){"use strict";r.__esModule=!0,Object.is||(Object.is=function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e})},{}],62:[function(t,e,r){"use strict";r.__esModule=!0,r.Polyfill=r.LightSetImpl=void 0;var n=t("./Map"),o=function(){function t(t){if(this.map=new n.Polyfill,void 0!==t)for(var e=0,r=t;e<r.length;e++){var o=r[e];this.add(o)}}return t.prototype.has=function(t){return this.map.has(t)},t.prototype.add=function(t){return this.map.set(t,!0),this},t.prototype.values=function(){return this.map.keys()},t.prototype.delete=function(t){return this.map.delete(t)},t}();r.LightSetImpl=o,r.Polyfill="undefined"!=typeof Set?Set:o},{"./Map":60}],63:[function(t,e,r){"use strict";r.__esModule=!0,r.Polyfill=void 0;var n=t("./Map");r.Polyfill="undefined"!=typeof WeakMap?WeakMap:n.Polyfill},{"./Map":60}],64:[function(t,e,r){"use strict";var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n};r.__esModule=!0,r.buildMethodCb=r.buildCb=r.getPrComplete=r.isRunning=r.cancelAllQueuedCalls=r.getQueuedCallCount=r.buildMethod=r.build=r.createGroupRef=void 0;var o=t("minimal-polyfills/WeakMap"),i=function(){function t(){this.queuedCalls=[],this.isRunning=!1,this.prComplete=Promise.resolve()}return t.prototype.cancelAllQueuedCalls=function(){var t;return this.queuedCalls.splice(0,t=this.queuedCalls.length),t},t}(),a={},s=new o.Polyfill;function u(t,e){var r=s.get(t);r||(r=new o.Polyfill,s.set(t,r));var n=r.get(e);return n||(n=new i,r.set(e,n)),n}function c(){return new Array(0)}r.createGroupRef=c,r.build=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return p(!0,c(),t[0]);case 2:return p(!0,t[0],t[1])}},r.buildMethod=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return p(!1,c(),t[0]);case 2:return p(!1,t[0],t[1])}},r.getQueuedCallCount=function(t,e){var r=f(t,e);return r?r.queuedCalls.length:0},r.cancelAllQueuedCalls=function(t,e){var r=f(t,e);return r?r.cancelAllQueuedCalls():0},r.isRunning=function(t,e){var r=f(t,e);return!!r&&r.isRunning},r.getPrComplete=function(t,e){var r=f(t,e);return r?r.prComplete:Promise.resolve()};var l=new o.Polyfill;function f(t,e){void 0===e&&(e=a);var r=l.get(t);if(!r)throw Error("Not a run exclusiveFunction");var n=s.get(e);if(n)return n.get(r)}function p(t,e,r){var n,o=function(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(!t){if(!(this instanceof Object))throw new Error("Run exclusive, <this> should be an object");n=u(this,e)}return new Promise((function(t,e){var a;n.prComplete=new Promise((function(t){return a=function(){return t()}}));var s=function(r){a(),n.isRunning=!1,n.queuedCalls.length&&n.queuedCalls.shift()(),"data"in r?t(r.data):e(r.reason)};(function t(){for(var e=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n.isRunning)n.queuedCalls.push((function(){return t.apply(e,o)}));else{n.isRunning=!0;try{r.apply(this,o).then((function(t){return s({data:t})})).catch((function(t){return s({reason:t})}))}catch(t){s({reason:t})}}}).apply(o,i)}))};return t&&(n=u(a,e)),l.set(o,e),o}function h(t,e,r){var o,i=function(){for(var i=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];if(!t){if(!(this instanceof Object))throw new Error("Run exclusive, <this> should be an object");o=u(this,e)}var c,l=void 0;a.length&&"function"==typeof a[a.length-1]&&(l=a.pop()),o.prComplete=new Promise((function(t){return c=function(){return t()}}));var f=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];c(),o.isRunning=!1,o.queuedCalls.length&&o.queuedCalls.shift()(),l&&l.apply(i,t)};f.hasCallback=!!l,function t(){for(var e=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(o.isRunning)o.queuedCalls.push((function(){return t.apply(e,i)}));else{o.isRunning=!0;try{r.apply(this,n(i,[f]))}catch(t){throw t.message+=" ( This exception should not have been thrown, miss use of run-exclusive buildCb )",t}}}.apply(this,a)};return t&&(o=u(a,e)),l.set(i,e),i}r.buildCb=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return h(!0,c(),t[0]);case 2:return h(!0,t[0],t[1])}},r.buildMethodCb=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return h(!1,c(),t[0]);case 2:return h(!1,t[0],t[1])}}},{"minimal-polyfills/WeakMap":63}]},{},[19])(19)})); |
@@ -0,1 +1,5 @@ | ||
## **1.10.0** (2021-07-20) | ||
- #21: Feat distinct operator | ||
### **1.9.14** (2021-05-08) | ||
@@ -2,0 +6,0 @@ |
export { throttleTime } from "./throttleTime"; | ||
export { to } from "./to"; | ||
export { nonNullable } from "./nonNullable"; | ||
export { distinct } from "./distinct"; |
@@ -16,2 +16,4 @@ "use strict"; | ||
__createBinding(exports, nonNullable_1, "nonNullable"); | ||
var distinct_1 = require("./distinct"); | ||
__createBinding(exports, distinct_1, "distinct"); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "evt", | ||
"version": "1.9.14", | ||
"version": "1.10.0", | ||
"description": "Type safe replacement for node's EventEmitter", | ||
@@ -174,2 +174,5 @@ "repository": { | ||
"lib/util/genericOperators/chunksOf.js.map", | ||
"lib/util/genericOperators/distinct.d.ts", | ||
"lib/util/genericOperators/distinct.js", | ||
"lib/util/genericOperators/distinct.js.map", | ||
"lib/util/genericOperators/index.d.ts", | ||
@@ -380,2 +383,3 @@ "lib/util/genericOperators/index.js", | ||
"src/lib/util/genericOperators/chunksOf.ts", | ||
"src/lib/util/genericOperators/distinct.ts", | ||
"src/lib/util/genericOperators/index.ts", | ||
@@ -382,0 +386,0 @@ "src/lib/util/genericOperators/nonNullable.ts", |
@@ -68,3 +68,3 @@ <p align="center"> | ||
``` | ||
in React | ||
in React, it let you attach event listeners without having to worry about detaching them. | ||
```typescript | ||
@@ -111,2 +111,5 @@ import { useState } from "react"; | ||
</a> | ||
<a href="https://insee.fr"> | ||
<img src="https://user-images.githubusercontent.com/6702424/117936881-a9358f00-b305-11eb-84b9-e61593632bdd.png"> | ||
</a> | ||
</p> | ||
@@ -113,0 +116,0 @@ |
export { throttleTime } from "./throttleTime"; | ||
export { to } from "./to"; | ||
export { nonNullable } from "./nonNullable"; | ||
export { nonNullable } from "./nonNullable"; | ||
export { distinct } from "./distinct"; |
Sorry, the diff of this file is too big to display
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
2577266
420
45414
178