futoin-asyncevent
Advanced tools
Comparing version 2.3.7 to 2.3.8
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["futoin-asyncevent"]=e():t.$asyncevent=e()}(self,(()=>{return t={818:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return c=t.done,t},e:function(t){a=!0,i=t},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function a(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===r(e)?e:String(e)}var l=n(898),s=Symbol("FutoIn Event Emitter"),f="_evt_",h="_evtonce_",y=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this._max=n,this._scheduleCall=l.ActiveAsyncTool.callImmediate;var r,o=i(t);try{for(o.s();!(r=o.n()).done;){var u=r.value;this["".concat(f).concat(u)]=[],this["".concat(h).concat(u)]=[]}}catch(t){o.e(t)}finally{o.f()}}var n,r,u;return n=e,r=[{key:"on",value:function(t,e){try{var n=this["".concat(f).concat(t)];n.length===this._max&&console.warn("Hitting max handler limit for: ".concat(t)),n.push(e)}catch(e){throw new Error("Unknown event: ".concat(t))}}},{key:"once",value:function(t,e){try{var n=this["".concat(h).concat(t)];n.length===this._max&&console.warn("Hitting max once handler limit for: ".concat(t)),n.push(e)}catch(e){throw new Error("Unknown event: ".concat(t))}}},{key:"off",value:function(t,e){try{var n="".concat(f).concat(t);this[n]=this[n].filter((function(t){return t!==e}));var r="".concat(h).concat(t);this[r]=this[r].filter((function(t){return t!==e}))}catch(e){throw new Error("Unknown event: ".concat(t))}}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var u=this["".concat(f).concat(t)],c=this["".concat(h).concat(t)];if(void 0===u)throw new Error("Unknown event: ".concat(t));var a,l=[],s=i(u);try{for(s.s();!(a=s.n()).done;){var y=a.value;l.push(y)}}catch(t){s.e(t)}finally{s.f()}if(c.length){var v,p=i(c);try{for(p.s();!(v=p.n()).done;){var _=v.value;l.push(_)}}catch(t){p.e(t)}finally{p.f()}this["".concat(h).concat(t)]=[]}this._scheduleCall((function(){for(var t=function(){var t=o[n];try{t.apply(void 0,r)}catch(t){e._scheduleCall((function(){throw t}))}},n=0,o=l;n<o.length;n++)t()}))}}],u=[{key:"SYM_EVENT_EMITTER",get:function(){return s}},{key:Symbol.hasInstance,value:function(t){return void 0!==t[s]||t.constructor===e}},{key:"attach",value:function(t,n){var r,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,c=t[s];if(void 0===c){var a=new e(n,u);Object.defineProperties(t,(o(r={},s,{configurable:!1,enumerable:!1,writable:!1,value:a}),o(r,"on",{configurable:!1,enumerable:!1,writable:!1,value:function(t,e){return a.on(t,e)}}),o(r,"off",{configurable:!1,enumerable:!1,writable:!1,value:function(t,e){return a.off(t,e)}}),o(r,"once",{configurable:!1,enumerable:!1,writable:!1,value:function(t,e){return a.once(t,e)}}),o(r,"emit",{configurable:!1,enumerable:!1,writable:!1,value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return a.emit.apply(a,[t].concat(n))}}),r))}else{c._max=u;var l,y=i(n);try{for(y.s();!(l=y.n()).done;){var v=l.value;if("".concat(f).concat(v)in c)throw new Error('Event "'.concat(v,'" has been already registered!'));c["".concat(f).concat(v)]=[],c["".concat(h).concat(v)]=[]}}catch(t){y.e(t)}finally{y.f()}}}},{key:"setMaxListeners",value:function(t,e){t[s]._max=e}}],r&&c(n.prototype,r),u&&c(n,u),Object.defineProperty(n,"prototype",{writable:!1}),e}();t.exports=y},748:(t,e,n)=>{"use strict";var r=n(818),o=r.attach;o.EventEmitter=r,t.exports=o},308:(t,e,n)=>{"use strict";!function(e){var r=e.FutoIn||e.futoin||{};if(void 0===r.$asyncevent){var o=n(748);e.$asyncevent=o,r.$asyncevent=o,r.EventEmitter=o.EventEmitter,e.FutoIn=r,e.futoin=r}t.exports=r.$asyncevent}(window)},178:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===r(i)?i:String(i)),o)}var i}var u=n(214),c=n(659).InternalError,a=n(644),l=n(561),s=n(740),f=s.isProduction,h=s.checkFunc,y=s.checkOnError,v=s.noop,p=s.loop,_=s.repeat,m=s.forEach,b=s.as_await,d=s.EMPTY_ARRAY,w=s.newExecStack,g=f?v:function(t){t._stack.length>0&&t.error(c,"Top level add in execution")},x=f?v:function(t,e,n){g(t),h(t,e),y(t,n)},k=100,S=null,E=function(t){t._post_exec=v,t._execute()},j=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null===n&&(n=function(){return this.state}),this.state=n,this._queue=[],this._stack=[],this._exec_stack=w(),this._in_exec=!1,this._post_exec=v,this._exec_event=null,this._next_args=d,this._async_tool=r;var o=r.callImmediate,i=function(){k=100,S=e,e._exec_event=null,e._execute()};this._scheduleExecute=function(){--k<=0||!e._in_exec||S!==e?e._exec_event=o(i):e._in_exec&&(e._post_exec=E)}}var e,n;return e=t,n=[{key:"add",value:function(t,e){return x(this,t,e),this._queue.push([t,e]),this}},{key:"parallel",value:function(t){g(this),y(this,t);var e=new l(this,this);return this._queue.push([function(t){e.executeParallel(t)},t]),e}},{key:"sync",value:function(t,e,n){return x(this,e,n),t.sync(this,e,n),this}},{key:"error",value:function(t,e){this.state.error_info=e;var n=new Error(t);throw this._in_exec||(this.state.last_exception=n,this._handle_error(t)),n}},{key:"copyFrom",value:function(t){this._queue.push.apply(this._queue,t._queue);var e=t.state,n=this.state;for(var r in e)r in n||(n[r]=e[r]);return this}},{key:"_handle_success",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,e=this._stack;e.length||this.error(c,"Invalid success completion"),this._next_args=t;for(var n=e[e.length-1];;){var r=n._limit_event;if(r&&(this._async_tool.cancelCall(r),n._limit_event=null),n._cleanup(),e.pop(),!e.length)break;if((n=e[e.length-1])._queue.length)break}(e.length||this._queue.length)&&this._scheduleExecute()}},{key:"_handle_error",value:function(t){if(this._exec_event)this.cancel();else{this._next_args=d;var e=this._stack,n=this._exec_stack;this.state.async_stack=n;for(var r=this._in_exec,o=!0;e.length;){var i=e[e.length-1],u=i._limit_event,c=i._on_cancel,a=i._on_error;if(u&&(this._async_tool.cancelCall(u),i._limit_event=null),c&&(c.call(null,i),i._on_cancel=null),a){var l=e.length;i._queue=null,i._on_error=null,n.push(a);try{if(this._in_exec=!0,a.call(null,i,t),l!==e.length){o=!1;break}if(null!==i._queue){o=!1,this._scheduleExecute();break}}catch(e){this.state.last_exception=e,t=e.message}finally{this._in_exec=r}}i._cleanup(),e.pop()}o?this._queue=[]:r||this._post_exec(this)}}},{key:"cancel",value:function(){this._next_args=d;var t=this._exec_event;t&&(this._async_tool.cancelImmediate(t),this._exec_event=null);for(var e=this._stack,n=this._async_tool;e.length;){var r=e.pop(),o=r._limit_event,i=r._on_cancel;o&&(n.cancelCall(o),r._limit_event=null),i&&(i.call(null,r),r._on_cancel=null),r._cleanup()}return this._queue=[],this}},{key:"execute",value:function(){var t=S;return S=this,this._execute(),S=t,this}},{key:"_execute",value:function(){var t,e,n=this._stack;if((t=n.length?n[n.length-1]._queue:this._queue).length){var r=t.shift(),i=r[0];this._exec_stack.push(i);var u=this._next_args,c=u.length,l=new a(this,r[1],u);n.push(l);try{var s=n.length;this._in_exec=!0,c?(this._next_args=d,i.apply(void 0,[l].concat(function(t){if(Array.isArray(t))return o(t)}(e=u)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))):i(l),s===n.length&&(null!==l._queue?this._scheduleExecute():l._on_cancel||l._limit_event||this._handle_success(this._next_args))}catch(t){this.state.last_exception=t,this._handle_error(t.message)}finally{this._in_exec=!1}this._post_exec(this)}}},{key:"_burst_success",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;try{this._in_exec=!0,S=this,this._handle_success(t)}catch(t){this.state.last_exception=t,this._handle_error(t.message)}finally{this._in_exec=!1}this._post_exec(this)}},{key:"loop",value:function(t,e){return x(this,t),p(this,this,t,e),this}},{key:"repeat",value:function(t,e,n){return x(this,e),_(this,this,t,e,n),this}},{key:"forEach",value:function(t,e,n){return x(this,e),m(this,this,t,e,n),this}},{key:"successStep",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];g(this);var o=this._queue;return o.length>0?o.push([function(){t._handle_success(n)},void 0]):this._next_args=n,this}},{key:"await",value:function(t,e){return g(this),b(this,this,t,e),this}},{key:"promise",value:function(){var t=this;return g(this),new Promise((function(e,n){var r=t._queue;t._queue=[[function(t){t._queue=r},function(t,e){n(new Error(e))}],[function(t,n){e(n)},void 0]],S=t,t._execute()}))}},{key:"newInstance",value:function(){return new t(null,this._async_tool)}},{key:"isAsyncSteps",value:function(){return!0}}],n&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=j},659:t=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,i=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===e(i)?i:String(i)),o)}var i}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var o=r((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));["ConnectError","CommError","UnknownInterface","NotSupportedVersion","NotImplemented","Unauthorized","InternalError","InvokerError","InvalidRequest","DefenseRejected","PleaseReauth","SecurityError","Timeout","LoopBreak","LoopCont"].forEach((function(t){return Object.defineProperty(o,t,{enumerable:!0,value:t})})),t.exports=o},658:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===r(i)?i:String(i)),o)}var i}var i=n(659).NotImplemented,u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,(n=[{key:"sync",value:function(t,e,n){t.error(i,"#sync() API")}}])&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=u},367:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===r(i)?i:String(i)),o)}var i}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}var c=n(658),a=n(525),l=n(88),s=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(h,t);var e,n,c,s,f=(c=h,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=u(c);if(s){var n=u(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function h(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(t=f.call(this))._mutex=new a(e.concurrent||1,e.max_queue||0),t._throttle=new l(e.rate||1,e.period_ms||1e3,e.burst||0),t}return e=h,(n=[{key:"sync",value:function(t,e,n){var r=this;t.sync(this._mutex,(function(t){t._root._next_args=t._call_args,t.sync(r._throttle,e,n)}))}}])&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),h}(c);t.exports=s},525:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===r(i)?i:String(i)),o)}var i}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}var c=n(658),a=n(659).DefenseRejected,l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(f,t);var e,n,c,l,s=(c=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=u(c);if(l){var n=u(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(t=s.call(this))._max=e,t._locked=0,t._owners=new WeakMap,t._queue=[],t._max_queue=n,t._release_handler=function(e){t._release(e._root)},t}return e=f,(n=[{key:"_lock",value:function(t,e){var n=this._owners,r=n.get(e);if(r)return n.set(e,r+1),!0;if(this._locked>=this._max){var o=this._queue,i=this._max_queue;return null!==i&&o.length>=i&&e.error(a,"Mutex queue limit"),o.push(t),!1}return this._locked+=1,n.set(e,1),!0}},{key:"_release",value:function(t){var e=this._owners,n=e.get(t);if(n){if(n>1)return void e.set(t,n-1);e.delete(t),this._locked-=1;for(var r=this._queue;r.length;){var o=r.shift();if(o.state){var i=o._root;this._lock(o,i),i._handle_success(o._call_args);break}}}else{var u=this._queue.indexOf(t);u>=0&&this._queue.splice(u,1)}}},{key:"sync",value:function(t,e,n){var r=this;t.add((function(t){!function(t,e,n,r){var o=t._root;t._on_cancel=e._release_handler,t._queue=[[function(n){e._lock(t,o)?o._handle_success(t._call_args):(n.waitExternal(),n._call_args=t._call_args)},void 0],[n,r],[function(t){e._release(o),o._handle_success(t._call_args)},void 0]]}(t,r,e,n)}))}}])&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(c);t.exports=l},88:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===r(i)?i:String(i)),o)}var i}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var a=n(658),l=n(659).DefenseRejected,s=n(740).prev_queue,f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(y,t);var e,n,a,f,h=(a=y,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=u(a);if(f){var n=u(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function y(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),(e=h.call(this))._max=t,e._current=0;var o=e._queue=[];return e._timer=null,e._period_ms=n,e._max_queue=r,e._cancel_handler=function(t){var e=o.indexOf(t);e>=0&&o.splice(e,1)},e}return e=y,(n=[{key:"_lock",value:function(t){if(this._ensureTimer(),this._current>=this._max){var e=this._queue,n=this._max_queue;return null!==n&&e.length>=n&&t.error(l,"Throttle queue limit"),e.push(t),!1}return this._current+=1,!0}},{key:"_ensureTimer",value:function(){var t=this;this._timer||(this._timer=setInterval((function(){t._resetPeriod()}),this._period_ms))}},{key:"_resetPeriod",value:function(){this._current=0;var t=this._queue;if(!t.length)return clearInterval(this._timer),void(this._timer=null);for(var e=this._max,n=0;t.length&&n<e;){var r=t.shift();if(r.state){++n;var o=r._root;o._handle_success(o._next_args)}}this._current=n}},{key:"sync",value:function(t,e,n){var r=this;t.add((function(t){!function(t,e,n,r){var o,i=t._root;e._lock(t)?(t._on_error=r,n.apply(void 0,[t].concat(function(t){if(Array.isArray(t))return c(t)}(o=t._call_args)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))):(t._on_cancel=e._cancel_handler,i._next_args=t._call_args,s(i).unshift([n,r]))}(t,r,e,n)}))}}])&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),y}(a);t.exports=f},644:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===r(i)?i:String(i)),o)}var i}var i=n(561),u=n(659),c=u.InternalError,a=u.Timeout,l=u.LoopBreak,s=u.LoopCont,f=n(740),h=f.isProduction,y=f.checkFunc,v=f.checkOnError,p=f.noop,_=f.loop,m=f.repeat,b=f.forEach,d=f.LOOP_TERM_LABEL,w=f.as_await,g=h?p:function(t){var e=t._root;if(e){var n=e._stack;if(n){if(n[n.length-1]===t)return;e.error(c,"Invalid call (sanity check)")}}throw new Error("InternalError: Unexpected call, object is out of service")},x=h?p:function(t,e,n){g(t),y(t,e),v(t,n)},k=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._root=e,this.state=e.state,this._queue=null,this._call_args=r,this._on_error=n,this._on_cancel=null,this._limit_event=null}var e,n;return e=t,n=[{key:"add",value:function(t,e){x(this,t,e);var n=[t,e],r=this._queue;return r?r.push(n):this._queue=[n],this}},{key:"parallel",value:function(t){var e=new i(this._root,this);return this.add((function(t){e.executeParallel(t)}),t),e}},{key:"success",value:function(){g(this),null!==this._queue&&this.error(c,"Invalid success() call");for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._root._handle_success(e)}},{key:"error",value:function(t,e){g(this),this._root.error(t,e)}},{key:"setTimeout",value:function(t){var e=this;g(this);var n=this._root._async_tool;return null!==this._limit_event&&n.cancelCall(this._limit_event),this._limit_event=n.callLater((function(){!function(t){t._limit_event=null;var e=t.state;e.error_info=void 0,e.last_exception=new Error(a),t._root._handle_error(a)}(e)}),t),this}},{key:"setCancel",value:function(t){return this._on_cancel=t,this}},{key:"waitExternal",value:function(){return this._on_cancel=p,this}},{key:"copyFrom",value:function(t){if(g(this),t._queue.length){var e=this._queue;null===e&&(e=[],this._queue=e),e.push.apply(e,t._queue)}var n=t.state,r=this.state;for(var o in n)void 0===r[o]&&(r[o]=n[o]);return this}},{key:"loop",value:function(t,e){return x(this,t),_(this,this._root,t,e),this}},{key:"repeat",value:function(t,e,n){return x(this,e),m(this,this._root,t,e,n),this}},{key:"forEach",value:function(t,e,n){return x(this,e),b(this,this._root,t,e,n),this}},{key:"break",value:function(t){g(this),this.state[d]=t,this._root.error(l)}},{key:"continue",value:function(t){g(this),this.state[d]=t,this._root.error(s)}},{key:"successStep",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];g(this);var o=this._queue;return o&&o.length?o.push([function(){t._root._handle_success(n)},void 0]):this._root._next_args=n,this}},{key:"await",value:function(t,e){return g(this),w(this,this._root,t,e),this}},{key:"sync",value:function(t,e,n){return x(this,e,n),t.sync(this,e,n),this}},{key:"newInstance",value:function(){return this._root.newInstance()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this.state=null}}],n&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=k},214:(t,e)=>{"use strict";if(e=t.exports={},"undefined"==typeof setImmediate){e.callLater=function(t,e){return setTimeout(t,e)},e.cancelCall=function(t){return clearTimeout(t)},window._FutoInEventLoopQueue=window._FutoInEventLoopQueue||[];var n=window._FutoInEventLoopQueue,r=window.performance,o=null,i=function(){o&&clearTimeout(o),o=setTimeout(u,0)},u=function(){o=null;for(var t=r.now()+10;n.length;){var e=n.shift();try{e()}catch(t){throw i(),t}if(r.now()>=t){i();break}}};e.callImmediate=function(t){n.length||i();var e=function(){t()};return n.push(e),e},e.cancelImmediate=function(t){var e=n.indexOf(t);e>=0&&n.splice(e,1)}}else e.callLater=function(t,e){return setTimeout(t,e)},e.cancelCall=function(t){clearTimeout(t)},e.callImmediate=function(t){return setImmediate(t)},e.cancelImmediate=function(t){clearImmediate(t)}},299:(t,e,n)=>{"use strict";var r=n(75),o=[];(e=t.exports={}).callLater=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=1e3*r();e&&(n+=e);for(var i={f:t,t:n},u=0;u<o.length;++u)if(o[u].t>n)return void o.splice(u,0,i);return o.push(i),i},e.cancelCall=function(t){var e=o.indexOf(t);e>=0&&o.splice(e,1)},e.nextEvent=function(){o.shift().f()},e.hasEvents=function(){return o.length>0},e.getEvents=function(){return o},e.resetEvents=function(){o.splice(0,o.length)},e.run=function(){for(;this.hasEvents();)this.nextEvent()},e.callImmediate=e.callLater,e.cancelImmediate=e.cancelCall},561:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===r(i)?i:String(i)),o)}var i}var i=n(740),u=i.checkFunc,c=i.checkOnError,a=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._root=e,this._as=n,this._queue=[],this._psteps=[],this._complete_count=0}var e,n;return e=t,(n=[{key:"add",value:function(t,e){return u(this,t),c(this,e),this._queue.push([t,e]),this}},{key:"_complete",value:function(){this._complete_count+=1,this._complete_count===this._psteps.length&&(this._as._root._handle_success(),this._cleanup())}},{key:"_error",value:function(t,e){try{this._as.error(t,e)}catch(t){}}},{key:"executeParallel",value:function(e){var n=this,r=this._queue,o=this._root;if(o!==e._root){var i=new t(e._root,e);return i._queue.push.apply(i._queue,r),void i.executeParallel(e)}if(this._as=e,r.length){e._on_cancel=function(){n.cancel()};var u=this._psteps,c=function(t){n._complete()},a=function(t,e){n._error(e,t.state.error_info)},l=o.constructor;r.forEach((function(t){var n=new l(e.state,o._async_tool);n._queue.push([function(e){e._queue=[[t[0],t[1]]]},a],[c,void 0]),u.push(n)})),u.forEach((function(t){t.execute()}))}else this._complete()}},{key:"cancel",value:function(){this._psteps.forEach((function(t){t.cancel()})),this._cleanup()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this._as=null,this._psteps=null}}])&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.exports=a},898:(t,e,n)=>{"use strict";!function(e){var r=e.FutoIn||e.futoin||{};if(void 0===r.AsyncSteps){var o=n(386);e.$as=o,r.$as=o,e.FutoInError=o.FutoInError,r.AsyncSteps=o.AsyncSteps,e.FutoIn=r,e.futoin=r}t.exports=r.$as}(window)},740:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o.key),"symbol"===r(i)?i:String(i)),o)}var i}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var u=n(659),c=(u.InternalError,u.LoopCont),a=u.LoopBreak,l="undefined"==typeof Symbol?function(t){return t}:function(t){return Symbol(t)},s=l("_loop_term_label"),f=function(t,e,n,r,o){o&&o()||t.add((function(t){var i=t.state,u=e._exec_stack,l=u.length,f=[n,function(e,n){!function(t,e,n,r,o){if(e===c){var i=r[s];i&&i!==o||(r.last_exception=null,t._root._handle_success())}else if(e===a){var u=r[s];u&&u!==o||(r.last_exception=null,n._queue.length=0,t._root._handle_success())}}(e,n,t,i,r)}],h=[function(t){o&&o()||(u.length=l,y())},null],y=function(){t._queue=[f,h]};y()}))},h=function(t,e,n,r,o){var i=0,u=n;f(t,e,(function(t){r(t,i++)}),o,(function(){return i>=u}))},y=[];Object.freeze(y);var v=function(){};t.exports=e={noop:v,makeSym:l,loop:f,repeat:h,forEach:function(t,e,n,r,o){if(Array.isArray(n)){var u=n;h(t,e,u.length,(function(t,e){r(t,e,u[e])}),o)}else if("undefined"!=typeof Map&&n instanceof Map){var c=n.entries();f(t,e,(function(t){var e=c.next();e.done&&t.break();var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,u,c=[],a=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{if(!a&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.value,2),o=n[0],u=n[1];r(t,o,u)}),o)}else{var a=n,l=Object.keys(a);h(t,e,l.length,(function(t,e){r(t,l[e],a[l[e]])}),o)}},LOOP_TERM_LABEL:s,as_await:function(t,e,n,r){var o,i;n.then((function(t){o?o.state&&e._burst_success([t]):i=function(){e._handle_success([t])}}),(function(t){o?function(t,e,n){var r=t.state;if(r){var o="PromiseReject";if(t._on_cancel=null,n instanceof Error)r.last_exception=n,r.error_info=void 0,e._handle_error(o);else{var i=n||o;r.last_exception=new Error(i),r.error_info=void 0,e._handle_error(i)}}}(o,e,t):(o=null,i=t instanceof Error?function(){throw t}:function(e){e.error(t||"PromiseReject")})})),t.add((function(t){i?i(t):(o=t,t._on_cancel=function(){if(o){o=null;try{n.cancel()}catch(t){}}})}),r)},EMPTY_ARRAY:y,prev_queue:function(t){var e=t._stack,n=e.length;return n>1?e[n-2]._queue:t._queue}},e.isProduction=!0,e.checkFunc=v,e.checkOnError=v;var p=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,(n=[{key:"push",value:function(){}},{key:"length",get:function(){return 0},set:function(t){}}])&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}());Object.freeze(p),e.newExecStack=function(){return p}},386:(t,e,n)=>{"use strict";(e=t.exports=n(414)).ISync=n(658),e.Mutex=n(525),e.Throttle=n(88),e.Limiter=n(367),e.testcase=n(819)},414:(t,e,n)=>{"use strict";var r=n(214),o=n(299),i=n(659),u=n(178),c=n(740).isProduction;(e=t.exports=function(){return new u(null,e.ActiveAsyncTool)}).ActiveAsyncTool=r,e.AsyncTool=r,e.AsyncToolTest=o,e.FutoInError=i,e.Errors=i,e.AsyncSteps=u,e.isProduction=c,e.installAsyncToolTest=function(t){e.ActiveAsyncTool=!1===t?r:o},e.assertAS=function(t){try{if(t.isAsyncSteps())return}catch(t){}throw new Error("Not an instance of AsyncSteps: ".concat(t))}},819:(t,e,n)=>{"use strict";var r=n(178);t.exports=function(t,e){return function(n){var o=this,i=new r;i.add((function(n){n.add((function(n){t.call(o,n),e&&n.add((function(t){t.error("NegativeTestMustThrow")}))}),e)}),(function(t,e){console.log("ERROR: ".concat(e," (").concat(t.state.error_info,")")),n(t.state.last_exception||new Error("Generic Fail"))})),i.add((function(t){return n()})),i.execute()}}},75:function(t){(function(){var e,n,r,o,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(t.exports=function(){return(e()-i)/1e6},n=process.hrtime,o=(e=function(){var t;return 1e9*(t=n())[0]+t[1]})(),u=1e9*process.uptime(),i=o-u):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}},e={},function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}(308);var t,e})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["futoin-asyncevent"]=e():t.$asyncevent=e()}(self,(()=>{return t={243:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return c=t.done,t},e:function(t){a=!0,i=t},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}var l=n(434),s=Symbol("FutoIn Event Emitter"),f="_evt_",h="_evtonce_",y=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._max=n,this._scheduleCall=l.ActiveAsyncTool.callImmediate;var r,o=i(e);try{for(o.s();!(r=o.n()).done;){var u=r.value;this["".concat(f).concat(u)]=[],this["".concat(h).concat(u)]=[]}}catch(t){o.e(t)}finally{o.f()}}return e=t,n=[{key:"on",value:function(t,e){try{var n=this["".concat(f).concat(t)];n.length===this._max&&console.warn("Hitting max handler limit for: ".concat(t)),n.push(e)}catch(e){throw new Error("Unknown event: ".concat(t))}}},{key:"once",value:function(t,e){try{var n=this["".concat(h).concat(t)];n.length===this._max&&console.warn("Hitting max once handler limit for: ".concat(t)),n.push(e)}catch(e){throw new Error("Unknown event: ".concat(t))}}},{key:"off",value:function(t,e){try{var n="".concat(f).concat(t);this[n]=this[n].filter((function(t){return t!==e}));var r="".concat(h).concat(t);this[r]=this[r].filter((function(t){return t!==e}))}catch(e){throw new Error("Unknown event: ".concat(t))}}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var u=this["".concat(f).concat(t)],c=this["".concat(h).concat(t)];if(void 0===u)throw new Error("Unknown event: ".concat(t));var a,l=[],s=i(u);try{for(s.s();!(a=s.n()).done;){var y=a.value;l.push(y)}}catch(t){s.e(t)}finally{s.f()}if(c.length){var _,v=i(c);try{for(v.s();!(_=v.n()).done;){var p=_.value;l.push(p)}}catch(t){v.e(t)}finally{v.f()}this["".concat(h).concat(t)]=[]}this._scheduleCall((function(){for(var t=function(){var t=o[n];try{t.apply(void 0,r)}catch(t){e._scheduleCall((function(){throw t}))}},n=0,o=l;n<o.length;n++)t()}))}}],r=[{key:"SYM_EVENT_EMITTER",get:function(){return s}},{key:Symbol.hasInstance,value:function(e){return void 0!==e[s]||e.constructor===t}},{key:"attach",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,u=e[s];if(void 0===u){var c=new t(n,r);Object.defineProperties(e,o(o(o(o(o({},s,{configurable:!1,enumerable:!1,writable:!1,value:c}),"on",{configurable:!1,enumerable:!1,writable:!1,value:function(t,e){return c.on(t,e)}}),"off",{configurable:!1,enumerable:!1,writable:!1,value:function(t,e){return c.off(t,e)}}),"once",{configurable:!1,enumerable:!1,writable:!1,value:function(t,e){return c.once(t,e)}}),"emit",{configurable:!1,enumerable:!1,writable:!1,value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return c.emit.apply(c,[t].concat(n))}}))}else{u._max=r;var a,l=i(n);try{for(l.s();!(a=l.n()).done;){var y=a.value;if("".concat(f).concat(y)in u)throw new Error('Event "'.concat(y,'" has been already registered!'));u["".concat(f).concat(y)]=[],u["".concat(h).concat(y)]=[]}}catch(t){l.e(t)}finally{l.f()}}}},{key:"setMaxListeners",value:function(t,e){t[s]._max=e}}],n&&c(e.prototype,n),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();t.exports=y},429:(t,e,n)=>{"use strict";var r=n(243),o=r.attach;o.EventEmitter=r,t.exports=o},953:(t,e,n)=>{"use strict";!function(e){var r=e.FutoIn||e.futoin||{};if(void 0===r.$asyncevent){var o=n(429);e.$asyncevent=o,r.$asyncevent=o,r.EventEmitter=o.EventEmitter,e.FutoIn=r,e.futoin=r}t.exports=r.$asyncevent}(window)},527:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}var c=n(596),a=n(651).InternalError,l=n(80),s=n(305),f=n(477),h=f.isProduction,y=f.checkFunc,_=f.checkOnError,v=f.noop,p=f.loop,m=f.repeat,b=f.forEach,d=f.as_await,w=f.EMPTY_ARRAY,g=f.newExecStack,x=h?v:function(t){t._stack.length>0&&t.error(a,"Top level add in execution")},k=h?v:function(t,e,n){x(t),y(t,e),_(t,n)},S=100,E=null,j=function(t){t._post_exec=v,t._execute()},O=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null===n&&(n=function(){return this.state}),this.state=n,this._queue=[],this._stack=[],this._exec_stack=g(),this._in_exec=!1,this._post_exec=v,this._exec_event=null,this._next_args=w,this._async_tool=r;var o=r.callImmediate,i=function(){S=100,E=e,e._exec_event=null,e._execute()};this._scheduleExecute=function(){--S<=0||!e._in_exec||E!==e?e._exec_event=o(i):e._in_exec&&(e._post_exec=j)}}return e=t,n=[{key:"add",value:function(t,e){return k(this,t,e),this._queue.push([t,e]),this}},{key:"parallel",value:function(t){x(this),_(this,t);var e=new s(this,this);return this._queue.push([function(t){e.executeParallel(t)},t]),e}},{key:"sync",value:function(t,e,n){return k(this,e,n),t.sync(this,e,n),this}},{key:"error",value:function(t,e){this.state.error_info=e;var n=new Error(t);throw this._in_exec||(this.state.last_exception=n,this._handle_error(t)),n}},{key:"copyFrom",value:function(t){this._queue.push.apply(this._queue,t._queue);var e=t.state,n=this.state;for(var r in e)r in n||(n[r]=e[r]);return this}},{key:"_handle_success",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,e=this._stack;e.length||this.error(a,"Invalid success completion"),this._next_args=t;for(var n=e[e.length-1];;){var r=n._limit_event;if(r&&(this._async_tool.cancelCall(r),n._limit_event=null),n._cleanup(),e.pop(),!e.length)break;if((n=e[e.length-1])._queue.length)break}(e.length||this._queue.length)&&this._scheduleExecute()}},{key:"_handle_error",value:function(t){if(this._exec_event)this.cancel();else{this._next_args=w;var e=this._stack,n=this._exec_stack;this.state.async_stack=n;for(var r=this._in_exec,o=!0;e.length;){var i=e[e.length-1],u=i._limit_event,c=i._on_cancel,a=i._on_error;if(u&&(this._async_tool.cancelCall(u),i._limit_event=null),c&&(c.call(null,i),i._on_cancel=null),a){var l=e.length;i._queue=null,i._on_error=null,n.push(a);try{if(this._in_exec=!0,a.call(null,i,t),l!==e.length){o=!1;break}if(null!==i._queue){o=!1,this._scheduleExecute();break}}catch(e){this.state.last_exception=e,t=e.message}finally{this._in_exec=r}}i._cleanup(),e.pop()}o?this._queue=[]:r||this._post_exec(this)}}},{key:"cancel",value:function(){this._next_args=w;var t=this._exec_event;t&&(this._async_tool.cancelImmediate(t),this._exec_event=null);for(var e=this._stack,n=this._async_tool;e.length;){var r=e.pop(),o=r._limit_event,i=r._on_cancel;o&&(n.cancelCall(o),r._limit_event=null),i&&(i.call(null,r),r._on_cancel=null),r._cleanup()}return this._queue=[],this}},{key:"execute",value:function(){var t=E;return E=this,this._execute(),E=t,this}},{key:"_execute",value:function(){var t,e=this._stack;if((t=e.length?e[e.length-1]._queue:this._queue).length){var n=t.shift(),r=n[0];this._exec_stack.push(r);var i=this._next_args,u=i.length,c=new l(this,n[1],i);e.push(c);try{var a=e.length;this._in_exec=!0,u?(this._next_args=w,r.apply(void 0,[c].concat(function(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i)))):r(c),a===e.length&&(null!==c._queue?this._scheduleExecute():c._on_cancel||c._limit_event||this._handle_success(this._next_args))}catch(t){this.state.last_exception=t,this._handle_error(t.message)}finally{this._in_exec=!1}this._post_exec(this)}}},{key:"_burst_success",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;try{this._in_exec=!0,E=this,this._handle_success(t)}catch(t){this.state.last_exception=t,this._handle_error(t.message)}finally{this._in_exec=!1}this._post_exec(this)}},{key:"loop",value:function(t,e){return k(this,t),p(this,this,t,e),this}},{key:"repeat",value:function(t,e,n){return k(this,e),m(this,this,t,e,n),this}},{key:"forEach",value:function(t,e,n){return k(this,e),b(this,this,t,e,n),this}},{key:"successStep",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];x(this);var o=this._queue;return o.length>0?o.push([function(){t._handle_success(n)},void 0]):this._next_args=n,this}},{key:"await",value:function(t,e){return x(this),d(this,this,t,e),this}},{key:"promise",value:function(){var t=this;return x(this),new Promise((function(e,n){var r=t._queue;t._queue=[[function(t){t._queue=r},function(t,e){n(new Error(e))}],[function(t,n){e(n)},void 0]],E=t,t._execute()}))}},{key:"newInstance",value:function(){return new t(null,this._async_tool)}},{key:"isAsyncSteps",value:function(){return!0}}],n&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();t.exports=O},651:t=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t){var n=function(t){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}var i=r((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));["ConnectError","CommError","UnknownInterface","NotSupportedVersion","NotImplemented","Unauthorized","InternalError","InvokerError","InvalidRequest","DefenseRejected","PleaseReauth","SecurityError","Timeout","LoopBreak","LoopCont"].forEach((function(t){return Object.defineProperty(i,t,{enumerable:!0,value:t})})),t.exports=i},602:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}var u=n(651).NotImplemented,c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"sync",value:function(t,e,n){t.error(u,"#sync() API")}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();t.exports=c},150:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var l=n(602),s=n(325),f=n(340),h=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=c(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],c(t).constructor):e.apply(t,n))}(this,e))._mutex=new s(n.concurrent||1,n.max_queue||0),t._throttle=new f(n.rate||1,n.period_ms||1e3,n.burst||0),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),n=e,(i=[{key:"sync",value:function(t,e,n){var r=this;t.sync(this._mutex,(function(t){t._root._next_args=t._call_args,t.sync(r._throttle,e,n)}))}}])&&o(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(l);t.exports=h},325:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var l=n(602),s=n(651).DefenseRejected,f=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=c(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],c(t).constructor):e.apply(t,n))}(this,e))._max=n,t._locked=0,t._owners=new WeakMap,t._queue=[],t._max_queue=o,t._release_handler=function(e){t._release(e._root)},t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),n=e,(i=[{key:"_lock",value:function(t,e){var n=this._owners,r=n.get(e);if(r)return n.set(e,r+1),!0;if(this._locked>=this._max){var o=this._queue,i=this._max_queue;return null!==i&&o.length>=i&&e.error(s,"Mutex queue limit"),o.push(t),!1}return this._locked+=1,n.set(e,1),!0}},{key:"_release",value:function(t){var e=this._owners,n=e.get(t);if(n){if(n>1)return void e.set(t,n-1);e.delete(t),this._locked-=1;for(var r=this._queue;r.length;){var o=r.shift();if(o.state){var i=o._root;this._lock(o,i),i._handle_success(o._call_args);break}}}else{var u=this._queue.indexOf(t);u>=0&&this._queue.splice(u,1)}}},{key:"sync",value:function(t,e,n){var r=this;t.add((function(t){!function(t,e,n,r){var o=t._root;t._on_cancel=e._release_handler,t._queue=[[function(n){e._lock(t,o)?o._handle_success(t._call_args):(n.waitExternal(),n._call_args=t._call_args)},void 0],[n,r],[function(t){e._release(o),o._handle_success(t._call_args)},void 0]]}(t,r,e,n)}))}}])&&o(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(l);t.exports=f},340:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var s=n(602),f=n(651).DefenseRejected,h=n(477).prev_queue,y=function(t){function e(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=c(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],c(t).constructor):e.apply(t,n))}(this,e))._max=t,n._current=0;var a=n._queue=[];return n._timer=null,n._period_ms=o,n._max_queue=i,n._cancel_handler=function(t){var e=a.indexOf(t);e>=0&&a.splice(e,1)},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),n=e,(i=[{key:"_lock",value:function(t){if(this._ensureTimer(),this._current>=this._max){var e=this._queue,n=this._max_queue;return null!==n&&e.length>=n&&t.error(f,"Throttle queue limit"),e.push(t),!1}return this._current+=1,!0}},{key:"_ensureTimer",value:function(){var t=this;this._timer||(this._timer=setInterval((function(){t._resetPeriod()}),this._period_ms))}},{key:"_resetPeriod",value:function(){this._current=0;var t=this._queue;if(!t.length)return clearInterval(this._timer),void(this._timer=null);for(var e=this._max,n=0;t.length&&n<e;){var r=t.shift();if(r.state){++n;var o=r._root;o._handle_success(o._next_args)}}this._current=n}},{key:"sync",value:function(t,e,n){var r=this;t.add((function(t){!function(t,e,n,r){var o=t._root;e._lock(t)?(t._on_error=r,n.apply(void 0,[t].concat(function(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t._call_args)))):(t._on_cancel=e._cancel_handler,o._next_args=t._call_args,h(o).unshift([n,r]))}(t,r,e,n)}))}}])&&o(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(s);t.exports=y},80:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}var u=n(305),c=n(651),a=c.InternalError,l=c.Timeout,s=c.LoopBreak,f=c.LoopCont,h=n(477),y=h.isProduction,_=h.checkFunc,v=h.checkOnError,p=h.noop,m=h.loop,b=h.repeat,d=h.forEach,w=h.LOOP_TERM_LABEL,g=h.as_await,x=y?p:function(t){var e=t._root;if(e){var n=e._stack;if(n){if(n[n.length-1]===t)return;e.error(a,"Invalid call (sanity check)")}}throw new Error("InternalError: Unexpected call, object is out of service")},k=y?p:function(t,e,n){x(t),_(t,e),v(t,n)},S=function(){return t=function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._root=e,this.state=e.state,this._queue=null,this._call_args=r,this._on_error=n,this._on_cancel=null,this._limit_event=null},e=[{key:"add",value:function(t,e){k(this,t,e);var n=[t,e],r=this._queue;return r?r.push(n):this._queue=[n],this}},{key:"parallel",value:function(t){var e=new u(this._root,this);return this.add((function(t){e.executeParallel(t)}),t),e}},{key:"success",value:function(){x(this),null!==this._queue&&this.error(a,"Invalid success() call");for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._root._handle_success(e)}},{key:"error",value:function(t,e){x(this),this._root.error(t,e)}},{key:"setTimeout",value:function(t){var e=this;x(this);var n=this._root._async_tool;return null!==this._limit_event&&n.cancelCall(this._limit_event),this._limit_event=n.callLater((function(){!function(t){t._limit_event=null;var e=t.state;e.error_info=void 0,e.last_exception=new Error(l),t._root._handle_error(l)}(e)}),t),this}},{key:"setCancel",value:function(t){return this._on_cancel=t,this}},{key:"waitExternal",value:function(){return this._on_cancel=p,this}},{key:"copyFrom",value:function(t){if(x(this),t._queue.length){var e=this._queue;null===e&&(e=[],this._queue=e),e.push.apply(e,t._queue)}var n=t.state,r=this.state;for(var o in n)void 0===r[o]&&(r[o]=n[o]);return this}},{key:"loop",value:function(t,e){return k(this,t),m(this,this._root,t,e),this}},{key:"repeat",value:function(t,e,n){return k(this,e),b(this,this._root,t,e,n),this}},{key:"forEach",value:function(t,e,n){return k(this,e),d(this,this._root,t,e,n),this}},{key:"break",value:function(t){x(this),this.state[w]=t,this._root.error(s)}},{key:"continue",value:function(t){x(this),this.state[w]=t,this._root.error(f)}},{key:"successStep",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];x(this);var o=this._queue;return o&&o.length?o.push([function(){t._root._handle_success(n)},void 0]):this._root._next_args=n,this}},{key:"await",value:function(t,e){return x(this),g(this,this._root,t,e),this}},{key:"sync",value:function(t,e,n){return k(this,e,n),t.sync(this,e,n),this}},{key:"newInstance",value:function(){return this._root.newInstance()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this.state=null}}],e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();t.exports=S},596:(t,e)=>{"use strict";if(e=t.exports={},"undefined"==typeof setImmediate){e.callLater=function(t,e){return setTimeout(t,e)},e.cancelCall=function(t){return clearTimeout(t)},window._FutoInEventLoopQueue=window._FutoInEventLoopQueue||[];var n=window._FutoInEventLoopQueue,r=window.performance,o=null,i=function(){o&&clearTimeout(o),o=setTimeout(u,0)},u=function(){o=null;for(var t=r.now()+10;n.length;){var e=n.shift();try{e()}catch(t){throw i(),t}if(r.now()>=t){i();break}}};e.callImmediate=function(t){n.length||i();var e=function(){t()};return n.push(e),e},e.cancelImmediate=function(t){var e=n.indexOf(t);e>=0&&n.splice(e,1)}}else e.callLater=function(t,e){return setTimeout(t,e)},e.cancelCall=function(t){clearTimeout(t)},e.callImmediate=function(t){return setImmediate(t)},e.cancelImmediate=function(t){clearImmediate(t)}},456:(t,e,n)=>{"use strict";var r=n(491),o=[];(e=t.exports={}).callLater=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=1e3*r();e&&(n+=e);for(var i={f:t,t:n},u=0;u<o.length;++u)if(o[u].t>n)return void o.splice(u,0,i);return o.push(i),i},e.cancelCall=function(t){var e=o.indexOf(t);e>=0&&o.splice(e,1)},e.nextEvent=function(){o.shift().f()},e.hasEvents=function(){return o.length>0},e.getEvents=function(){return o},e.resetEvents=function(){o.splice(0,o.length)},e.run=function(){for(;this.hasEvents();)this.nextEvent()},e.callImmediate=e.callLater,e.cancelImmediate=e.cancelCall},305:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}var u=n(477),c=u.checkFunc,a=u.checkOnError,l=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._root=e,this._as=n,this._queue=[],this._psteps=[],this._complete_count=0}return e=t,(n=[{key:"add",value:function(t,e){return c(this,t),a(this,e),this._queue.push([t,e]),this}},{key:"_complete",value:function(){this._complete_count+=1,this._complete_count===this._psteps.length&&(this._as._root._handle_success(),this._cleanup())}},{key:"_error",value:function(t,e){try{this._as.error(t,e)}catch(t){}}},{key:"executeParallel",value:function(e){var n=this,r=this._queue,o=this._root;if(o!==e._root){var i=new t(e._root,e);return i._queue.push.apply(i._queue,r),void i.executeParallel(e)}if(this._as=e,r.length){e._on_cancel=function(){n.cancel()};var u=this._psteps,c=function(t){n._complete()},a=function(t,e){n._error(e,t.state.error_info)},l=o.constructor;r.forEach((function(t){var n=new l(e.state,o._async_tool);n._queue.push([function(e){e._queue=[[t[0],t[1]]]},a],[c,void 0]),u.push(n)})),u.forEach((function(t){t.execute()}))}else this._complete()}},{key:"cancel",value:function(){this._psteps.forEach((function(t){t.cancel()})),this._cleanup()}},{key:"isAsyncSteps",value:function(){return!0}},{key:"_cleanup",value:function(){this._root=null,this._as=null,this._psteps=null}}])&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();t.exports=l},434:(t,e,n)=>{"use strict";!function(e){var r=e.FutoIn||e.futoin||{};if(void 0===r.AsyncSteps){var o=n(923);e.$as=o,r.$as=o,e.FutoInError=o.FutoInError,r.AsyncSteps=o.AsyncSteps,e.FutoIn=r,e.futoin=r}t.exports=r.$as}(window)},477:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var c=n(651),a=(c.InternalError,c.LoopCont),l=c.LoopBreak,s="undefined"==typeof Symbol?function(t){return t}:function(t){return Symbol(t)},f=s("_loop_term_label"),h=function(t,e,n,r,o){o&&o()||t.add((function(t){var i=t.state,u=e._exec_stack,c=u.length,s=[n,function(e,n){!function(t,e,n,r,o){if(e===a){var i=r[f];i&&i!==o||(r.last_exception=null,t._root._handle_success())}else if(e===l){var u=r[f];u&&u!==o||(r.last_exception=null,n._queue.length=0,t._root._handle_success())}}(e,n,t,i,r)}],h=[function(t){o&&o()||(u.length=c,y())},null],y=function(){t._queue=[s,h]};y()}))},y=function(t,e,n,r,o){var i=0,u=n;h(t,e,(function(t){r(t,i++)}),o,(function(){return i>=u}))},_=[];Object.freeze(_);var v=function(){};t.exports=e={noop:v,makeSym:s,loop:h,repeat:y,forEach:function(t,e,n,r,o){if(Array.isArray(n)){var i=n;y(t,e,i.length,(function(t,e){r(t,e,i[e])}),o)}else if("undefined"!=typeof Map&&n instanceof Map){var c=n.entries();h(t,e,(function(t){var e=c.next();e.done&&t.break();var n,o,i=(n=e.value,o=2,function(t){if(Array.isArray(t))return t}(n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,u,c=[],a=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{if(!a&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(l)throw o}}return c}}(n,o)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],l=i[1];r(t,a,l)}),o)}else{var a=n,l=Object.keys(a);y(t,e,l.length,(function(t,e){r(t,l[e],a[l[e]])}),o)}},LOOP_TERM_LABEL:f,as_await:function(t,e,n,r){var o,i;n.then((function(t){o?o.state&&e._burst_success([t]):i=function(){e._handle_success([t])}}),(function(t){o?function(t,e,n){var r=t.state;if(r){var o="PromiseReject";if(t._on_cancel=null,n instanceof Error)r.last_exception=n,r.error_info=void 0,e._handle_error(o);else{var i=n||o;r.last_exception=new Error(i),r.error_info=void 0,e._handle_error(i)}}}(o,e,t):(o=null,i=t instanceof Error?function(){throw t}:function(e){e.error(t||"PromiseReject")})})),t.add((function(t){i?i(t):(o=t,t._on_cancel=function(){if(o){o=null;try{n.cancel()}catch(t){}}})}),r)},EMPTY_ARRAY:_,prev_queue:function(t){var e=t._stack,n=e.length;return n>1?e[n-2]._queue:t._queue}},e.isProduction=!0,e.checkFunc=v,e.checkOnError=v;var p=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"push",value:function(){}},{key:"length",get:function(){return 0},set:function(t){}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());Object.freeze(p),e.newExecStack=function(){return p}},923:(t,e,n)=>{"use strict";(e=t.exports=n(933)).ISync=n(602),e.Mutex=n(325),e.Throttle=n(340),e.Limiter=n(150),e.testcase=n(892)},933:(t,e,n)=>{"use strict";var r=n(596),o=n(456),i=n(651),u=n(527),c=n(477).isProduction;(e=t.exports=function(){return new u(null,e.ActiveAsyncTool)}).ActiveAsyncTool=r,e.AsyncTool=r,e.AsyncToolTest=o,e.FutoInError=i,e.Errors=i,e.AsyncSteps=u,e.isProduction=c,e.installAsyncToolTest=function(t){e.ActiveAsyncTool=!1===t?r:o},e.assertAS=function(t){try{if(t.isAsyncSteps())return}catch(t){}throw new Error("Not an instance of AsyncSteps: ".concat(t))}},892:(t,e,n)=>{"use strict";var r=n(527);t.exports=function(t,e){return function(n){var o=this,i=new r;i.add((function(n){n.add((function(n){t.call(o,n),e&&n.add((function(t){t.error("NegativeTestMustThrow")}))}),e)}),(function(t,e){console.log("ERROR: ".concat(e," (").concat(t.state.error_info,")")),n(t.state.last_exception||new Error("Generic Fail"))})),i.add((function(t){return n()})),i.execute()}}},491:function(t){(function(){var e,n,r,o,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(t.exports=function(){return(e()-i)/1e6},n=process.hrtime,o=(e=function(){var t;return 1e9*(t=n())[0]+t[1]})(),u=1e9*process.uptime(),i=o-u):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}},e={},function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}(953);var t,e})); |
@@ -1,1 +0,1 @@ | ||
(()=>{var t={5483:(t,r,e)=>{e(2401),e(4855);var n=e(6061);t.exports=n.f("hasInstance")},9266:(t,r,e)=>{e(2222),e(1539),e(2526),e(2443),e(1817),e(2401),e(8722),e(2165),e(9007),e(6066),e(3510),e(1840),e(6982),e(2159),e(6649),e(9341),e(543),e(3706),e(408),e(1299);var n=e(857);t.exports=n.Symbol},5834:(t,r,e)=>{e(6992),e(1539),e(8783),e(2165);var n=e(6061);t.exports=n.f("iterator")},9662:(t,r,e)=>{var n=e(614),o=e(6330),i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not a function")}},6077:(t,r,e)=>{var n=e(614),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw i("Can't set "+o(t)+" as a prototype")}},1223:(t,r,e)=>{var n=e(5112),o=e(30),i=e(3070).f,a=n("unscopables"),u=Array.prototype;null==u[a]&&i(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},9670:(t,r,e)=>{var n=e(111),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not an object")}},1318:(t,r,e)=>{var n=e(5656),o=e(1400),i=e(6244),a=function(t){return function(r,e,a){var u,c=n(r),s=i(c),f=o(a,s);if(t&&e!=e){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===e)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},2092:(t,r,e)=>{var n=e(9974),o=e(1702),i=e(8361),a=e(7908),u=e(6244),c=e(5417),s=o([].push),f=function(t){var r=1==t,e=2==t,o=3==t,f=4==t,p=6==t,l=7==t,v=5==t||p;return function(y,g,b,h){for(var d,m,x=a(y),S=i(x),O=n(g,b),w=u(S),j=0,P=h||c,A=r?P(y,w):e||l?P(y,0):void 0;w>j;j++)if((v||j in S)&&(m=O(d=S[j],j,x),t))if(r)A[j]=m;else if(m)switch(t){case 3:return!0;case 5:return d;case 6:return j;case 2:s(A,d)}else switch(t){case 4:return!1;case 7:s(A,d)}return p?-1:o||f?f:A}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},1194:(t,r,e)=>{var n=e(7293),o=e(5112),i=e(7392),a=o("species");t.exports=function(t){return i>=51||!n((function(){var r=[];return(r.constructor={})[a]=function(){return{foo:1}},1!==r[t](Boolean).foo}))}},1589:(t,r,e)=>{var n=e(1400),o=e(6244),i=e(6135),a=Array,u=Math.max;t.exports=function(t,r,e){for(var c=o(t),s=n(r,c),f=n(void 0===e?c:e,c),p=a(u(f-s,0)),l=0;s<f;s++,l++)i(p,l,t[s]);return p.length=l,p}},206:(t,r,e)=>{var n=e(1702);t.exports=n([].slice)},7475:(t,r,e)=>{var n=e(3157),o=e(4411),i=e(111),a=e(5112)("species"),u=Array;t.exports=function(t){var r;return n(t)&&(r=t.constructor,(o(r)&&(r===u||n(r.prototype))||i(r)&&null===(r=r[a]))&&(r=void 0)),void 0===r?u:r}},5417:(t,r,e)=>{var n=e(7475);t.exports=function(t,r){return new(n(t))(0===r?0:r)}},4326:(t,r,e)=>{var n=e(1702),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:(t,r,e)=>{var n=e(1694),o=e(614),i=e(4326),a=e(5112)("toStringTag"),u=Object,c="Arguments"==i(function(){return arguments}());t.exports=n?i:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=u(t),a))?e:c?i(r):"Object"==(n=i(r))&&o(r.callee)?"Arguments":n}},9920:(t,r,e)=>{var n=e(2597),o=e(3887),i=e(1236),a=e(3070);t.exports=function(t,r,e){for(var u=o(r),c=a.f,s=i.f,f=0;f<u.length;f++){var p=u[f];n(t,p)||e&&n(e,p)||c(t,p,s(r,p))}}},8544:(t,r,e)=>{var n=e(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6178:t=>{t.exports=function(t,r){return{value:t,done:r}}},8880:(t,r,e)=>{var n=e(9781),o=e(3070),i=e(9114);t.exports=n?function(t,r,e){return o.f(t,r,i(1,e))}:function(t,r,e){return t[r]=e,t}},9114:t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},6135:(t,r,e)=>{"use strict";var n=e(4948),o=e(3070),i=e(9114);t.exports=function(t,r,e){var a=n(r);a in t?o.f(t,a,i(0,e)):t[a]=e}},7045:(t,r,e)=>{var n=e(6339),o=e(3070);t.exports=function(t,r,e){return e.get&&n(e.get,r,{getter:!0}),e.set&&n(e.set,r,{setter:!0}),o.f(t,r,e)}},8052:(t,r,e)=>{var n=e(614),o=e(3070),i=e(6339),a=e(3072);t.exports=function(t,r,e,u){u||(u={});var c=u.enumerable,s=void 0!==u.name?u.name:r;if(n(e)&&i(e,s,u),u.global)c?t[r]=e:a(r,e);else{try{u.unsafe?t[r]&&(c=!0):delete t[r]}catch(t){}c?t[r]=e:o.f(t,r,{value:e,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},3072:(t,r,e)=>{var n=e(7854),o=Object.defineProperty;t.exports=function(t,r){try{o(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},9781:(t,r,e)=>{var n=e(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:t=>{var r="object"==typeof document&&document.all,e=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:e}},317:(t,r,e)=>{var n=e(7854),o=e(111),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},7207:t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,r,e)=>{var n=e(317)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},8113:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7392:(t,r,e)=>{var n,o,i=e(7854),a=e(8113),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,f=s&&s.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,r,e)=>{var n=e(7854),o=e(1236).f,i=e(8880),a=e(8052),u=e(3072),c=e(9920),s=e(4705);t.exports=function(t,r){var e,f,p,l,v,y=t.target,g=t.global,b=t.stat;if(e=g?n:b?n[y]||u(y,{}):(n[y]||{}).prototype)for(f in r){if(l=r[f],p=t.dontCallGetSet?(v=o(e,f))&&v.value:e[f],!s(g?f:y+(b?".":"#")+f,t.forced)&&void 0!==p){if(typeof l==typeof p)continue;c(l,p)}(t.sham||p&&p.sham)&&i(l,"sham",!0),a(e,f,l,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},2104:(t,r,e)=>{var n=e(4374),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},9974:(t,r,e)=>{var n=e(1470),o=e(9662),i=e(4374),a=n(n.bind);t.exports=function(t,r){return o(t),void 0===r?t:i?a(t,r):function(){return t.apply(r,arguments)}}},4374:(t,r,e)=>{var n=e(7293);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:(t,r,e)=>{var n=e(4374),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},6530:(t,r,e)=>{var n=e(9781),o=e(2597),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},5668:(t,r,e)=>{var n=e(1702),o=e(9662);t.exports=function(t,r,e){try{return n(o(Object.getOwnPropertyDescriptor(t,r)[e]))}catch(t){}}},1470:(t,r,e)=>{var n=e(4326),o=e(1702);t.exports=function(t){if("Function"===n(t))return o(t)}},1702:(t,r,e)=>{var n=e(4374),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(t){return function(){return i.apply(t,arguments)}}},5005:(t,r,e)=>{var n=e(7854),o=e(614);t.exports=function(t,r){return arguments.length<2?(e=n[t],o(e)?e:void 0):n[t]&&n[t][r];var e}},8044:(t,r,e)=>{var n=e(1702),o=e(3157),i=e(614),a=e(4326),u=e(1340),c=n([].push);t.exports=function(t){if(i(t))return t;if(o(t)){for(var r=t.length,e=[],n=0;n<r;n++){var s=t[n];"string"==typeof s?c(e,s):"number"!=typeof s&&"Number"!=a(s)&&"String"!=a(s)||c(e,u(s))}var f=e.length,p=!0;return function(t,r){if(p)return p=!1,r;if(o(this))return r;for(var n=0;n<f;n++)if(e[n]===t)return r}}}},8173:(t,r,e)=>{var n=e(9662),o=e(8554);t.exports=function(t,r){var e=t[r];return o(e)?void 0:n(e)}},7854:t=>{var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof global&&global)||function(){return this}()||Function("return this")()},2597:(t,r,e)=>{var n=e(1702),o=e(7908),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},3501:t=>{t.exports={}},490:(t,r,e)=>{var n=e(5005);t.exports=n("document","documentElement")},4664:(t,r,e)=>{var n=e(9781),o=e(7293),i=e(317);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(t,r,e)=>{var n=e(1702),o=e(7293),i=e(4326),a=Object,u=n("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?u(t,""):a(t)}:a},2788:(t,r,e)=>{var n=e(1702),o=e(614),i=e(5465),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},9909:(t,r,e)=>{var n,o,i,a=e(4811),u=e(7854),c=e(111),s=e(8880),f=e(2597),p=e(5465),l=e(6200),v=e(3501),y="Object already initialized",g=u.TypeError,b=u.WeakMap;if(a||p.state){var h=p.state||(p.state=new b);h.get=h.get,h.has=h.has,h.set=h.set,n=function(t,r){if(h.has(t))throw g(y);return r.facade=t,h.set(t,r),r},o=function(t){return h.get(t)||{}},i=function(t){return h.has(t)}}else{var d=l("state");v[d]=!0,n=function(t,r){if(f(t,d))throw g(y);return r.facade=t,s(t,d,r),r},o=function(t){return f(t,d)?t[d]:{}},i=function(t){return f(t,d)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(r){var e;if(!c(r)||(e=o(r)).type!==t)throw g("Incompatible receiver, "+t+" required");return e}}}},3157:(t,r,e)=>{var n=e(4326);t.exports=Array.isArray||function(t){return"Array"==n(t)}},614:(t,r,e)=>{var n=e(4154),o=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},4411:(t,r,e)=>{var n=e(1702),o=e(7293),i=e(614),a=e(648),u=e(5005),c=e(2788),s=function(){},f=[],p=u("Reflect","construct"),l=/^\s*(?:class|function)\b/,v=n(l.exec),y=!l.exec(s),g=function(t){if(!i(t))return!1;try{return p(s,f,t),!0}catch(t){return!1}},b=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return y||!!v(l,c(t))}catch(t){return!0}};b.sham=!0,t.exports=!p||o((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?b:g},4705:(t,r,e)=>{var n=e(7293),o=e(614),i=/#|\.prototype\./,a=function(t,r){var e=c[u(t)];return e==f||e!=s&&(o(r)?n(r):!!r)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},8554:t=>{t.exports=function(t){return null==t}},111:(t,r,e)=>{var n=e(614),o=e(4154),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===i}:function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},2190:(t,r,e)=>{var n=e(5005),o=e(614),i=e(7976),a=e(3307),u=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var r=n("Symbol");return o(r)&&i(r.prototype,u(t))}},3061:(t,r,e)=>{"use strict";var n=e(3383).IteratorPrototype,o=e(30),i=e(9114),a=e(8003),u=e(7497),c=function(){return this};t.exports=function(t,r,e,s){var f=r+" Iterator";return t.prototype=o(n,{next:i(+!s,e)}),a(t,f,!1,!0),u[f]=c,t}},1656:(t,r,e)=>{"use strict";var n=e(2109),o=e(6916),i=e(1913),a=e(6530),u=e(614),c=e(3061),s=e(9518),f=e(7674),p=e(8003),l=e(8880),v=e(8052),y=e(5112),g=e(7497),b=e(3383),h=a.PROPER,d=a.CONFIGURABLE,m=b.IteratorPrototype,x=b.BUGGY_SAFARI_ITERATORS,S=y("iterator"),O="keys",w="values",j="entries",P=function(){return this};t.exports=function(t,r,e,a,y,b,A){c(e,r,a);var T,L,E,F=function(t){if(t===y&&_)return _;if(!x&&t in C)return C[t];switch(t){case O:case w:case j:return function(){return new e(this,t)}}return function(){return new e(this)}},I=r+" Iterator",M=!1,C=t.prototype,R=C[S]||C["@@iterator"]||y&&C[y],_=!x&&R||F(y),D="Array"==r&&C.entries||R;if(D&&(T=s(D.call(new t)))!==Object.prototype&&T.next&&(i||s(T)===m||(f?f(T,m):u(T[S])||v(T,S,P)),p(T,I,!0,!0),i&&(g[I]=P)),h&&y==w&&R&&R.name!==w&&(!i&&d?l(C,"name",w):(M=!0,_=function(){return o(R,this)})),y)if(L={values:F(w),keys:b?_:F(O),entries:F(j)},A)for(E in L)(x||M||!(E in C))&&v(C,E,L[E]);else n({target:r,proto:!0,forced:x||M},L);return i&&!A||C[S]===_||v(C,S,_,{name:y}),g[r]=_,L}},3383:(t,r,e)=>{"use strict";var n,o,i,a=e(7293),u=e(614),c=e(111),s=e(30),f=e(9518),p=e(8052),l=e(5112),v=e(1913),y=l("iterator"),g=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(n=o):g=!0),!c(n)||a((function(){var t={};return n[y].call(t)!==t}))?n={}:v&&(n=s(n)),u(n[y])||p(n,y,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},7497:t=>{t.exports={}},6244:(t,r,e)=>{var n=e(7466);t.exports=function(t){return n(t.length)}},6339:(t,r,e)=>{var n=e(1702),o=e(7293),i=e(614),a=e(2597),u=e(9781),c=e(6530).CONFIGURABLE,s=e(2788),f=e(9909),p=f.enforce,l=f.get,v=String,y=Object.defineProperty,g=n("".slice),b=n("".replace),h=n([].join),d=u&&!o((function(){return 8!==y((function(){}),"length",{value:8}).length})),m=String(String).split("String"),x=t.exports=function(t,r,e){"Symbol("===g(v(r),0,7)&&(r="["+b(v(r),/^Symbol\(([^)]*)\)/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!a(t,"name")||c&&t.name!==r)&&(u?y(t,"name",{value:r,configurable:!0}):t.name=r),d&&e&&a(e,"arity")&&t.length!==e.arity&&y(t,"length",{value:e.arity});try{e&&a(e,"constructor")&&e.constructor?u&&y(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=p(t);return a(n,"source")||(n.source=h(m,"string"==typeof r?r:"")),t};Function.prototype.toString=x((function(){return i(this)&&l(this).source||s(this)}),"toString")},4758:t=>{var r=Math.ceil,e=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?e:r)(n)}},30:(t,r,e)=>{var n,o=e(9670),i=e(6048),a=e(748),u=e(3501),c=e(490),s=e(317),f=e(6200),p="prototype",l="script",v=f("IE_PROTO"),y=function(){},g=function(t){return"<"+l+">"+t+"</"+l+">"},b=function(t){t.write(g("")),t.close();var r=t.parentWindow.Object;return t=null,r},h=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,r,e;h="undefined"!=typeof document?document.domain&&n?b(n):(r=s("iframe"),e="java"+l+":",r.style.display="none",c.appendChild(r),r.src=String(e),(t=r.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):b(n);for(var o=a.length;o--;)delete h[p][a[o]];return h()};u[v]=!0,t.exports=Object.create||function(t,r){var e;return null!==t?(y[p]=o(t),e=new y,y[p]=null,e[v]=t):e=h(),void 0===r?e:i.f(e,r)}},6048:(t,r,e)=>{var n=e(9781),o=e(3353),i=e(3070),a=e(9670),u=e(5656),c=e(1956);r.f=n&&!o?Object.defineProperties:function(t,r){a(t);for(var e,n=u(r),o=c(r),s=o.length,f=0;s>f;)i.f(t,e=o[f++],n[e]);return t}},3070:(t,r,e)=>{var n=e(9781),o=e(4664),i=e(3353),a=e(9670),u=e(4948),c=TypeError,s=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",v="writable";r.f=n?i?function(t,r,e){if(a(t),r=u(r),a(e),"function"==typeof t&&"prototype"===r&&"value"in e&&v in e&&!e[v]){var n=f(t,r);n&&n[v]&&(t[r]=e.value,e={configurable:l in e?e[l]:n[l],enumerable:p in e?e[p]:n[p],writable:!1})}return s(t,r,e)}:s:function(t,r,e){if(a(t),r=u(r),a(e),o)try{return s(t,r,e)}catch(t){}if("get"in e||"set"in e)throw c("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},1236:(t,r,e)=>{var n=e(9781),o=e(6916),i=e(5296),a=e(9114),u=e(5656),c=e(4948),s=e(2597),f=e(4664),p=Object.getOwnPropertyDescriptor;r.f=n?p:function(t,r){if(t=u(t),r=c(r),f)try{return p(t,r)}catch(t){}if(s(t,r))return a(!o(i.f,t,r),t[r])}},1156:(t,r,e)=>{var n=e(4326),o=e(5656),i=e(8006).f,a=e(1589),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"Window"==n(t)?function(t){try{return i(t)}catch(t){return a(u)}}(t):i(o(t))}},8006:(t,r,e)=>{var n=e(6324),o=e(748).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},5181:(t,r)=>{r.f=Object.getOwnPropertySymbols},9518:(t,r,e)=>{var n=e(2597),o=e(614),i=e(7908),a=e(6200),u=e(8544),c=a("IE_PROTO"),s=Object,f=s.prototype;t.exports=u?s.getPrototypeOf:function(t){var r=i(t);if(n(r,c))return r[c];var e=r.constructor;return o(e)&&r instanceof e?e.prototype:r instanceof s?f:null}},7976:(t,r,e)=>{var n=e(1702);t.exports=n({}.isPrototypeOf)},6324:(t,r,e)=>{var n=e(1702),o=e(2597),i=e(5656),a=e(1318).indexOf,u=e(3501),c=n([].push);t.exports=function(t,r){var e,n=i(t),s=0,f=[];for(e in n)!o(u,e)&&o(n,e)&&c(f,e);for(;r.length>s;)o(n,e=r[s++])&&(~a(f,e)||c(f,e));return f}},1956:(t,r,e)=>{var n=e(6324),o=e(748);t.exports=Object.keys||function(t){return n(t,o)}},5296:(t,r)=>{"use strict";var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!e.call({1:2},1);r.f=o?function(t){var r=n(this,t);return!!r&&r.enumerable}:e},7674:(t,r,e)=>{var n=e(5668),o=e(9670),i=e(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=n(Object.prototype,"__proto__","set"))(e,[]),r=e instanceof Array}catch(t){}return function(e,n){return o(e),i(n),r?t(e,n):e.__proto__=n,e}}():void 0)},288:(t,r,e)=>{"use strict";var n=e(1694),o=e(648);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},2140:(t,r,e)=>{var n=e(6916),o=e(614),i=e(111),a=TypeError;t.exports=function(t,r){var e,u;if("string"===r&&o(e=t.toString)&&!i(u=n(e,t)))return u;if(o(e=t.valueOf)&&!i(u=n(e,t)))return u;if("string"!==r&&o(e=t.toString)&&!i(u=n(e,t)))return u;throw a("Can't convert object to primitive value")}},3887:(t,r,e)=>{var n=e(5005),o=e(1702),i=e(8006),a=e(5181),u=e(9670),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var r=i.f(u(t)),e=a.f;return e?c(r,e(t)):r}},857:(t,r,e)=>{var n=e(7854);t.exports=n},4488:(t,r,e)=>{var n=e(8554),o=TypeError;t.exports=function(t){if(n(t))throw o("Can't call method on "+t);return t}},8003:(t,r,e)=>{var n=e(3070).f,o=e(2597),i=e(5112)("toStringTag");t.exports=function(t,r,e){t&&!e&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:r})}},6200:(t,r,e)=>{var n=e(2309),o=e(9711),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:(t,r,e)=>{var n=e(7854),o=e(3072),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},2309:(t,r,e)=>{var n=e(1913),o=e(5465);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.29.1",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"})},8710:(t,r,e)=>{var n=e(1702),o=e(9303),i=e(1340),a=e(4488),u=n("".charAt),c=n("".charCodeAt),s=n("".slice),f=function(t){return function(r,e){var n,f,p=i(a(r)),l=o(e),v=p.length;return l<0||l>=v?t?"":void 0:(n=c(p,l))<55296||n>56319||l+1===v||(f=c(p,l+1))<56320||f>57343?t?u(p,l):n:t?s(p,l,l+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},6293:(t,r,e)=>{var n=e(7392),o=e(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},6532:(t,r,e)=>{var n=e(6916),o=e(5005),i=e(5112),a=e(8052);t.exports=function(){var t=o("Symbol"),r=t&&t.prototype,e=r&&r.valueOf,u=i("toPrimitive");r&&!r[u]&&a(r,u,(function(t){return n(e,this)}),{arity:1})}},2015:(t,r,e)=>{var n=e(6293);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},1400:(t,r,e)=>{var n=e(9303),o=Math.max,i=Math.min;t.exports=function(t,r){var e=n(t);return e<0?o(e+r,0):i(e,r)}},5656:(t,r,e)=>{var n=e(8361),o=e(4488);t.exports=function(t){return n(o(t))}},9303:(t,r,e)=>{var n=e(4758);t.exports=function(t){var r=+t;return r!=r||0===r?0:n(r)}},7466:(t,r,e)=>{var n=e(9303),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},7908:(t,r,e)=>{var n=e(4488),o=Object;t.exports=function(t){return o(n(t))}},7593:(t,r,e)=>{var n=e(6916),o=e(111),i=e(2190),a=e(8173),u=e(2140),c=e(5112),s=TypeError,f=c("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var e,c=a(t,f);if(c){if(void 0===r&&(r="default"),e=n(c,t,r),!o(e)||i(e))return e;throw s("Can't convert object to primitive value")}return void 0===r&&(r="number"),u(t,r)}},4948:(t,r,e)=>{var n=e(7593),o=e(2190);t.exports=function(t){var r=n(t,"string");return o(r)?r:r+""}},1694:(t,r,e)=>{var n={};n[e(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},1340:(t,r,e)=>{var n=e(648),o=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},6330:t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},9711:(t,r,e)=>{var n=e(1702),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},3307:(t,r,e)=>{var n=e(6293);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,r,e)=>{var n=e(9781),o=e(7293);t.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4811:(t,r,e)=>{var n=e(7854),o=e(614),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},6800:(t,r,e)=>{var n=e(857),o=e(2597),i=e(6061),a=e(3070).f;t.exports=function(t){var r=n.Symbol||(n.Symbol={});o(r,t)||a(r,t,{value:i.f(t)})}},6061:(t,r,e)=>{var n=e(5112);r.f=n},5112:(t,r,e)=>{var n=e(7854),o=e(2309),i=e(2597),a=e(9711),u=e(6293),c=e(3307),s=n.Symbol,f=o("wks"),p=c?s.for||s:s&&s.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=u&&i(s,t)?s[t]:p("Symbol."+t)),f[t]}},2222:(t,r,e)=>{"use strict";var n=e(2109),o=e(7293),i=e(3157),a=e(111),u=e(7908),c=e(6244),s=e(7207),f=e(6135),p=e(5417),l=e(1194),v=e(5112),y=e(7392),g=v("isConcatSpreadable"),b=y>=51||!o((function(){var t=[];return t[g]=!1,t.concat()[0]!==t})),h=function(t){if(!a(t))return!1;var r=t[g];return void 0!==r?!!r:i(t)};n({target:"Array",proto:!0,arity:1,forced:!b||!l("concat")},{concat:function(t){var r,e,n,o,i,a=u(this),l=p(a,0),v=0;for(r=-1,n=arguments.length;r<n;r++)if(h(i=-1===r?a:arguments[r]))for(o=c(i),s(v+o),e=0;e<o;e++,v++)e in i&&f(l,v,i[e]);else s(v+1),f(l,v++,i);return l.length=v,l}})},6992:(t,r,e)=>{"use strict";var n=e(5656),o=e(1223),i=e(7497),a=e(9909),u=e(3070).f,c=e(1656),s=e(6178),f=e(1913),p=e(9781),l="Array Iterator",v=a.set,y=a.getterFor(l);t.exports=c(Array,"Array",(function(t,r){v(this,{type:l,target:n(t),index:0,kind:r})}),(function(){var t=y(this),r=t.target,e=t.kind,n=t.index++;return!r||n>=r.length?(t.target=void 0,s(void 0,!0)):s("keys"==e?n:"values"==e?r[n]:[n,r[n]],!1)}),"values");var g=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&p&&"values"!==g.name)try{u(g,"name",{value:"values"})}catch(t){}},4855:(t,r,e)=>{"use strict";var n=e(614),o=e(111),i=e(3070),a=e(9518),u=e(5112),c=e(6339),s=u("hasInstance"),f=Function.prototype;s in f||i.f(f,s,{value:c((function(t){if(!n(this)||!o(t))return!1;var r=this.prototype;if(!o(r))return t instanceof this;for(;t=a(t);)if(r===t)return!0;return!1}),s)})},8862:(t,r,e)=>{var n=e(2109),o=e(5005),i=e(2104),a=e(6916),u=e(1702),c=e(7293),s=e(614),f=e(2190),p=e(206),l=e(8044),v=e(6293),y=String,g=o("JSON","stringify"),b=u(/./.exec),h=u("".charAt),d=u("".charCodeAt),m=u("".replace),x=u(1..toString),S=/[\uD800-\uDFFF]/g,O=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,j=!v||c((function(){var t=o("Symbol")();return"[null]"!=g([t])||"{}"!=g({a:t})||"{}"!=g(Object(t))})),P=c((function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")})),A=function(t,r){var e=p(arguments),n=l(r);if(s(n)||void 0!==t&&!f(t))return e[1]=function(t,r){if(s(n)&&(r=a(n,this,y(t),r)),!f(r))return r},i(g,null,e)},T=function(t,r,e){var n=h(e,r-1),o=h(e,r+1);return b(O,t)&&!b(w,o)||b(w,t)&&!b(O,n)?"\\u"+x(d(t,0),16):t};g&&n({target:"JSON",stat:!0,arity:3,forced:j||P},{stringify:function(t,r,e){var n=p(arguments),o=i(j?A:g,null,n);return P&&"string"==typeof o?m(o,S,T):o}})},3706:(t,r,e)=>{var n=e(7854);e(8003)(n.JSON,"JSON",!0)},408:(t,r,e)=>{e(8003)(Math,"Math",!0)},9660:(t,r,e)=>{var n=e(2109),o=e(6293),i=e(7293),a=e(5181),u=e(7908);n({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(t){var r=a.f;return r?r(u(t)):[]}})},1539:(t,r,e)=>{var n=e(1694),o=e(8052),i=e(288);n||o(Object.prototype,"toString",i,{unsafe:!0})},1299:(t,r,e)=>{var n=e(2109),o=e(7854),i=e(8003);n({global:!0},{Reflect:{}}),i(o.Reflect,"Reflect",!0)},8783:(t,r,e)=>{"use strict";var n=e(8710).charAt,o=e(1340),i=e(9909),a=e(1656),u=e(6178),c="String Iterator",s=i.set,f=i.getterFor(c);a(String,"String",(function(t){s(this,{type:c,string:o(t),index:0})}),(function(){var t,r=f(this),e=r.string,o=r.index;return o>=e.length?u(void 0,!0):(t=n(e,o),r.index+=t.length,u(t,!1))}))},2443:(t,r,e)=>{e(6800)("asyncIterator")},4032:(t,r,e)=>{"use strict";var n=e(2109),o=e(7854),i=e(6916),a=e(1702),u=e(1913),c=e(9781),s=e(6293),f=e(7293),p=e(2597),l=e(7976),v=e(9670),y=e(5656),g=e(4948),b=e(1340),h=e(9114),d=e(30),m=e(1956),x=e(8006),S=e(1156),O=e(5181),w=e(1236),j=e(3070),P=e(6048),A=e(5296),T=e(8052),L=e(7045),E=e(2309),F=e(6200),I=e(3501),M=e(9711),C=e(5112),R=e(6061),_=e(6800),D=e(6532),k=e(8003),N=e(9909),G=e(2092).forEach,z=F("hidden"),B="Symbol",V="prototype",H=N.set,U=N.getterFor(B),W=Object[V],$=o.Symbol,J=$&&$[V],Y=o.TypeError,q=o.QObject,X=w.f,K=j.f,Q=S.f,Z=A.f,tt=a([].push),rt=E("symbols"),et=E("op-symbols"),nt=E("wks"),ot=!q||!q[V]||!q[V].findChild,it=c&&f((function(){return 7!=d(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(t,r,e){var n=X(W,r);n&&delete W[r],K(t,r,e),n&&t!==W&&K(W,r,n)}:K,at=function(t,r){var e=rt[t]=d(J);return H(e,{type:B,tag:t,description:r}),c||(e.description=r),e},ut=function(t,r,e){t===W&&ut(et,r,e),v(t);var n=g(r);return v(e),p(rt,n)?(e.enumerable?(p(t,z)&&t[z][n]&&(t[z][n]=!1),e=d(e,{enumerable:h(0,!1)})):(p(t,z)||K(t,z,h(1,{})),t[z][n]=!0),it(t,n,e)):K(t,n,e)},ct=function(t,r){v(t);var e=y(r),n=m(e).concat(lt(e));return G(n,(function(r){c&&!i(st,e,r)||ut(t,r,e[r])})),t},st=function(t){var r=g(t),e=i(Z,this,r);return!(this===W&&p(rt,r)&&!p(et,r))&&(!(e||!p(this,r)||!p(rt,r)||p(this,z)&&this[z][r])||e)},ft=function(t,r){var e=y(t),n=g(r);if(e!==W||!p(rt,n)||p(et,n)){var o=X(e,n);return!o||!p(rt,n)||p(e,z)&&e[z][n]||(o.enumerable=!0),o}},pt=function(t){var r=Q(y(t)),e=[];return G(r,(function(t){p(rt,t)||p(I,t)||tt(e,t)})),e},lt=function(t){var r=t===W,e=Q(r?et:y(t)),n=[];return G(e,(function(t){!p(rt,t)||r&&!p(W,t)||tt(n,rt[t])})),n};s||(T(J=($=function(){if(l(J,this))throw Y("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,r=M(t),e=function(t){this===W&&i(e,et,t),p(this,z)&&p(this[z],r)&&(this[z][r]=!1),it(this,r,h(1,t))};return c&&ot&&it(W,r,{configurable:!0,set:e}),at(r,t)})[V],"toString",(function(){return U(this).tag})),T($,"withoutSetter",(function(t){return at(M(t),t)})),A.f=st,j.f=ut,P.f=ct,w.f=ft,x.f=S.f=pt,O.f=lt,R.f=function(t){return at(C(t),t)},c&&(L(J,"description",{configurable:!0,get:function(){return U(this).description}}),u||T(W,"propertyIsEnumerable",st,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:$}),G(m(nt),(function(t){_(t)})),n({target:B,stat:!0,forced:!s},{useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),n({target:"Object",stat:!0,forced:!s,sham:!c},{create:function(t,r){return void 0===r?d(t):ct(d(t),r)},defineProperty:ut,defineProperties:ct,getOwnPropertyDescriptor:ft}),n({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:pt}),D(),k($,B),I[z]=!0},1817:(t,r,e)=>{"use strict";var n=e(2109),o=e(9781),i=e(7854),a=e(1702),u=e(2597),c=e(614),s=e(7976),f=e(1340),p=e(7045),l=e(9920),v=i.Symbol,y=v&&v.prototype;if(o&&c(v)&&(!("description"in y)||void 0!==v().description)){var g={},b=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),r=s(y,this)?new v(t):void 0===t?v():v(t);return""===t&&(g[r]=!0),r};l(b,v),b.prototype=y,y.constructor=b;var h="Symbol(test)"==String(v("test")),d=a(y.valueOf),m=a(y.toString),x=/^Symbol\((.*)\)[^)]+$/,S=a("".replace),O=a("".slice);p(y,"description",{configurable:!0,get:function(){var t=d(this);if(u(g,t))return"";var r=m(t),e=h?O(r,7,-1):S(r,x,"$1");return""===e?void 0:e}}),n({global:!0,constructor:!0,forced:!0},{Symbol:b})}},763:(t,r,e)=>{var n=e(2109),o=e(5005),i=e(2597),a=e(1340),u=e(2309),c=e(2015),s=u("string-to-symbol-registry"),f=u("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{for:function(t){var r=a(t);if(i(s,r))return s[r];var e=o("Symbol")(r);return s[r]=e,f[e]=r,e}})},2401:(t,r,e)=>{e(6800)("hasInstance")},8722:(t,r,e)=>{e(6800)("isConcatSpreadable")},2165:(t,r,e)=>{e(6800)("iterator")},2526:(t,r,e)=>{e(4032),e(763),e(6620),e(8862),e(9660)},6620:(t,r,e)=>{var n=e(2109),o=e(2597),i=e(2190),a=e(6330),u=e(2309),c=e(2015),s=u("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!i(t))throw TypeError(a(t)+" is not a symbol");if(o(s,t))return s[t]}})},6066:(t,r,e)=>{e(6800)("matchAll")},9007:(t,r,e)=>{e(6800)("match")},3510:(t,r,e)=>{e(6800)("replace")},1840:(t,r,e)=>{e(6800)("search")},6982:(t,r,e)=>{e(6800)("species")},2159:(t,r,e)=>{e(6800)("split")},6649:(t,r,e)=>{var n=e(6800),o=e(6532);n("toPrimitive"),o()},9341:(t,r,e)=>{var n=e(5005),o=e(6800),i=e(8003);o("toStringTag"),i(n("Symbol"),"Symbol")},543:(t,r,e)=>{e(6800)("unscopables")},3948:(t,r,e)=>{var n=e(7854),o=e(8324),i=e(8509),a=e(6992),u=e(8880),c=e(5112),s=c("iterator"),f=c("toStringTag"),p=a.values,l=function(t,r){if(t){if(t[s]!==p)try{u(t,s,p)}catch(r){t[s]=p}if(t[f]||u(t,f,r),o[r])for(var e in a)if(t[e]!==a[e])try{u(t,e,a[e])}catch(r){t[e]=a[e]}}};for(var v in o)l(n[v]&&n[v].prototype,v);l(i,"DOMTokenList")},618:(t,r,e)=>{var n=e(5483);t.exports=n},5914:(t,r,e)=>{var n=e(9266);e(3948),t.exports=n},8970:(t,r,e)=>{var n=e(5834);e(3948),t.exports=n}},r={};function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return t[n](i,i.exports,e),i.exports}(()=>{"use strict";e(5914),e(8970),e(618)})()})(); | ||
(()=>{"use strict";var t={541:(t,r,e)=>{e(193),e(8957);var n=e(1951);t.exports=n.f("hasInstance")},9281:(t,r,e)=>{e(8706),e(6099),e(2675),e(6412),e(9463),e(193),e(2168),e(2259),e(6964),e(3142),e(3237),e(1833),e(7947),e(1073),e(5700),e(8125),e(326),e(4731),e(479),e(5472);var n=e(9167);t.exports=n.Symbol},2151:(t,r,e)=>{e(3792),e(6099),e(7764),e(2259);var n=e(1951);t.exports=n.f("iterator")},9306:(t,r,e)=>{var n=e(4901),o=e(6823),i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not a function")}},3506:(t,r,e)=>{var n=e(3925),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},6469:(t,r,e)=>{var n=e(8227),o=e(2360),i=e(4913).f,a=n("unscopables"),u=Array.prototype;void 0===u[a]&&i(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},8551:(t,r,e)=>{var n=e(34),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw new i(o(t)+" is not an object")}},9617:(t,r,e)=>{var n=e(5397),o=e(5610),i=e(6198),a=function(t){return function(r,e,a){var u=n(r),c=i(u);if(0===c)return!t&&-1;var s,f=o(a,c);if(t&&e!=e){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===e)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9213:(t,r,e)=>{var n=e(6080),o=e(9504),i=e(7055),a=e(8981),u=e(6198),c=e(1469),s=o([].push),f=function(t){var r=1===t,e=2===t,o=3===t,f=4===t,p=6===t,l=7===t,v=5===t||p;return function(y,g,b,h){for(var d,m,x=a(y),S=i(x),O=u(S),w=n(g,b),j=0,P=h||c,A=r?P(y,O):e||l?P(y,0):void 0;O>j;j++)if((v||j in S)&&(m=w(d=S[j],j,x),t))if(r)A[j]=m;else if(m)switch(t){case 3:return!0;case 5:return d;case 6:return j;case 2:s(A,d)}else switch(t){case 4:return!1;case 7:s(A,d)}return p?-1:o||f?f:A}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},597:(t,r,e)=>{var n=e(9039),o=e(8227),i=e(9519),a=o("species");t.exports=function(t){return i>=51||!n((function(){var r=[];return(r.constructor={})[a]=function(){return{foo:1}},1!==r[t](Boolean).foo}))}},7680:(t,r,e)=>{var n=e(9504);t.exports=n([].slice)},7433:(t,r,e)=>{var n=e(4376),o=e(3517),i=e(34),a=e(8227)("species"),u=Array;t.exports=function(t){var r;return n(t)&&(r=t.constructor,(o(r)&&(r===u||n(r.prototype))||i(r)&&null===(r=r[a]))&&(r=void 0)),void 0===r?u:r}},1469:(t,r,e)=>{var n=e(7433);t.exports=function(t,r){return new(n(t))(0===r?0:r)}},2195:(t,r,e)=>{var n=e(9504),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},6955:(t,r,e)=>{var n=e(2140),o=e(4901),i=e(2195),a=e(8227)("toStringTag"),u=Object,c="Arguments"===i(function(){return arguments}());t.exports=n?i:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=u(t),a))?e:c?i(r):"Object"===(n=i(r))&&o(r.callee)?"Arguments":n}},7740:(t,r,e)=>{var n=e(9297),o=e(5031),i=e(7347),a=e(4913);t.exports=function(t,r,e){for(var u=o(r),c=a.f,s=i.f,f=0;f<u.length;f++){var p=u[f];n(t,p)||e&&n(e,p)||c(t,p,s(r,p))}}},2211:(t,r,e)=>{var n=e(9039);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2529:t=>{t.exports=function(t,r){return{value:t,done:r}}},6699:(t,r,e)=>{var n=e(3724),o=e(4913),i=e(6980);t.exports=n?function(t,r,e){return o.f(t,r,i(1,e))}:function(t,r,e){return t[r]=e,t}},6980:t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},4659:(t,r,e)=>{var n=e(3724),o=e(4913),i=e(6980);t.exports=function(t,r,e){n?o.f(t,r,i(0,e)):t[r]=e}},2106:(t,r,e)=>{var n=e(283),o=e(4913);t.exports=function(t,r,e){return e.get&&n(e.get,r,{getter:!0}),e.set&&n(e.set,r,{setter:!0}),o.f(t,r,e)}},6840:(t,r,e)=>{var n=e(4901),o=e(4913),i=e(283),a=e(9433);t.exports=function(t,r,e,u){u||(u={});var c=u.enumerable,s=void 0!==u.name?u.name:r;if(n(e)&&i(e,s,u),u.global)c?t[r]=e:a(r,e);else{try{u.unsafe?t[r]&&(c=!0):delete t[r]}catch(t){}c?t[r]=e:o.f(t,r,{value:e,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},9433:(t,r,e)=>{var n=e(4576),o=Object.defineProperty;t.exports=function(t,r){try{o(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},3724:(t,r,e)=>{var n=e(9039);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,r,e)=>{var n=e(4576),o=e(34),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},6837:t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},7400:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:(t,r,e)=>{var n=e(4055)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},8727:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2839:(t,r,e)=>{var n=e(4576).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},9519:(t,r,e)=>{var n,o,i=e(4576),a=e(2839),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,f=s&&s.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},6518:(t,r,e)=>{var n=e(4576),o=e(7347).f,i=e(6699),a=e(6840),u=e(9433),c=e(7740),s=e(2796);t.exports=function(t,r){var e,f,p,l,v,y=t.target,g=t.global,b=t.stat;if(e=g?n:b?n[y]||u(y,{}):n[y]&&n[y].prototype)for(f in r){if(l=r[f],p=t.dontCallGetSet?(v=o(e,f))&&v.value:e[f],!s(g?f:y+(b?".":"#")+f,t.forced)&&void 0!==p){if(typeof l==typeof p)continue;c(l,p)}(t.sham||p&&p.sham)&&i(l,"sham",!0),a(e,f,l,t)}}},9039:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},8745:(t,r,e)=>{var n=e(616),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},6080:(t,r,e)=>{var n=e(7476),o=e(9306),i=e(616),a=n(n.bind);t.exports=function(t,r){return o(t),void 0===r?t:i?a(t,r):function(){return t.apply(r,arguments)}}},616:(t,r,e)=>{var n=e(9039);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},9565:(t,r,e)=>{var n=e(616),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},350:(t,r,e)=>{var n=e(3724),o=e(9297),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},6706:(t,r,e)=>{var n=e(9504),o=e(9306);t.exports=function(t,r,e){try{return n(o(Object.getOwnPropertyDescriptor(t,r)[e]))}catch(t){}}},7476:(t,r,e)=>{var n=e(2195),o=e(9504);t.exports=function(t){if("Function"===n(t))return o(t)}},9504:(t,r,e)=>{var n=e(616),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=n?a:function(t){return function(){return i.apply(t,arguments)}}},7751:(t,r,e)=>{var n=e(4576),o=e(4901);t.exports=function(t,r){return arguments.length<2?(e=n[t],o(e)?e:void 0):n[t]&&n[t][r];var e}},6933:(t,r,e)=>{var n=e(9504),o=e(4376),i=e(4901),a=e(2195),u=e(655),c=n([].push);t.exports=function(t){if(i(t))return t;if(o(t)){for(var r=t.length,e=[],n=0;n<r;n++){var s=t[n];"string"==typeof s?c(e,s):"number"!=typeof s&&"Number"!==a(s)&&"String"!==a(s)||c(e,u(s))}var f=e.length,p=!0;return function(t,r){if(p)return p=!1,r;if(o(this))return r;for(var n=0;n<f;n++)if(e[n]===t)return r}}}},5966:(t,r,e)=>{var n=e(9306),o=e(4117);t.exports=function(t,r){var e=t[r];return o(e)?void 0:n(e)}},4576:function(t){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof global&&global)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(t,r,e)=>{var n=e(9504),o=e(8981),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,r){return i(o(t),r)}},421:t=>{t.exports={}},397:(t,r,e)=>{var n=e(7751);t.exports=n("document","documentElement")},5917:(t,r,e)=>{var n=e(3724),o=e(9039),i=e(4055);t.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},7055:(t,r,e)=>{var n=e(9504),o=e(9039),i=e(2195),a=Object,u=n("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===i(t)?u(t,""):a(t)}:a},3706:(t,r,e)=>{var n=e(9504),o=e(4901),i=e(7629),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},1181:(t,r,e)=>{var n,o,i,a=e(8622),u=e(4576),c=e(34),s=e(6699),f=e(9297),p=e(7629),l=e(6119),v=e(421),y="Object already initialized",g=u.TypeError,b=u.WeakMap;if(a||p.state){var h=p.state||(p.state=new b);h.get=h.get,h.has=h.has,h.set=h.set,n=function(t,r){if(h.has(t))throw new g(y);return r.facade=t,h.set(t,r),r},o=function(t){return h.get(t)||{}},i=function(t){return h.has(t)}}else{var d=l("state");v[d]=!0,n=function(t,r){if(f(t,d))throw new g(y);return r.facade=t,s(t,d,r),r},o=function(t){return f(t,d)?t[d]:{}},i=function(t){return f(t,d)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(r){var e;if(!c(r)||(e=o(r)).type!==t)throw new g("Incompatible receiver, "+t+" required");return e}}}},4376:(t,r,e)=>{var n=e(2195);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4901:t=>{var r="object"==typeof document&&document.all;t.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},3517:(t,r,e)=>{var n=e(9504),o=e(9039),i=e(4901),a=e(6955),u=e(7751),c=e(3706),s=function(){},f=u("Reflect","construct"),p=/^\s*(?:class|function)\b/,l=n(p.exec),v=!p.test(s),y=function(t){if(!i(t))return!1;try{return f(s,[],t),!0}catch(t){return!1}},g=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return v||!!l(p,c(t))}catch(t){return!0}};g.sham=!0,t.exports=!f||o((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?g:y},2796:(t,r,e)=>{var n=e(9039),o=e(4901),i=/#|\.prototype\./,a=function(t,r){var e=c[u(t)];return e===f||e!==s&&(o(r)?n(r):!!r)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},4117:t=>{t.exports=function(t){return null==t}},34:(t,r,e)=>{var n=e(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925:(t,r,e)=>{var n=e(34);t.exports=function(t){return n(t)||null===t}},6395:t=>{t.exports=!1},757:(t,r,e)=>{var n=e(7751),o=e(4901),i=e(1625),a=e(7040),u=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var r=n("Symbol");return o(r)&&i(r.prototype,u(t))}},3994:(t,r,e)=>{var n=e(7657).IteratorPrototype,o=e(2360),i=e(6980),a=e(687),u=e(6269),c=function(){return this};t.exports=function(t,r,e,s){var f=r+" Iterator";return t.prototype=o(n,{next:i(+!s,e)}),a(t,f,!1,!0),u[f]=c,t}},1088:(t,r,e)=>{var n=e(6518),o=e(9565),i=e(6395),a=e(350),u=e(4901),c=e(3994),s=e(2787),f=e(2967),p=e(687),l=e(6699),v=e(6840),y=e(8227),g=e(6269),b=e(7657),h=a.PROPER,d=a.CONFIGURABLE,m=b.IteratorPrototype,x=b.BUGGY_SAFARI_ITERATORS,S=y("iterator"),O="keys",w="values",j="entries",P=function(){return this};t.exports=function(t,r,e,a,y,b,A){c(e,r,a);var T,E,L,F=function(t){if(t===y&&k)return k;if(!x&&t&&t in C)return C[t];switch(t){case O:case w:case j:return function(){return new e(this,t)}}return function(){return new e(this)}},I=r+" Iterator",R=!1,C=t.prototype,M=C[S]||C["@@iterator"]||y&&C[y],k=!x&&M||F(y),_="Array"===r&&C.entries||M;if(_&&(T=s(_.call(new t)))!==Object.prototype&&T.next&&(i||s(T)===m||(f?f(T,m):u(T[S])||v(T,S,P)),p(T,I,!0,!0),i&&(g[I]=P)),h&&y===w&&M&&M.name!==w&&(!i&&d?l(C,"name",w):(R=!0,k=function(){return o(M,this)})),y)if(E={values:F(w),keys:b?k:F(O),entries:F(j)},A)for(L in E)(x||R||!(L in C))&&v(C,L,E[L]);else n({target:r,proto:!0,forced:x||R},E);return i&&!A||C[S]===k||v(C,S,k,{name:y}),g[r]=k,E}},7657:(t,r,e)=>{var n,o,i,a=e(9039),u=e(4901),c=e(34),s=e(2360),f=e(2787),p=e(6840),l=e(8227),v=e(6395),y=l("iterator"),g=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(n=o):g=!0),!c(n)||a((function(){var t={};return n[y].call(t)!==t}))?n={}:v&&(n=s(n)),u(n[y])||p(n,y,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},6269:t=>{t.exports={}},6198:(t,r,e)=>{var n=e(8014);t.exports=function(t){return n(t.length)}},283:(t,r,e)=>{var n=e(9504),o=e(9039),i=e(4901),a=e(9297),u=e(3724),c=e(350).CONFIGURABLE,s=e(3706),f=e(1181),p=f.enforce,l=f.get,v=String,y=Object.defineProperty,g=n("".slice),b=n("".replace),h=n([].join),d=u&&!o((function(){return 8!==y((function(){}),"length",{value:8}).length})),m=String(String).split("String"),x=t.exports=function(t,r,e){"Symbol("===g(v(r),0,7)&&(r="["+b(v(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!a(t,"name")||c&&t.name!==r)&&(u?y(t,"name",{value:r,configurable:!0}):t.name=r),d&&e&&a(e,"arity")&&t.length!==e.arity&&y(t,"length",{value:e.arity});try{e&&a(e,"constructor")&&e.constructor?u&&y(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=p(t);return a(n,"source")||(n.source=h(m,"string"==typeof r?r:"")),t};Function.prototype.toString=x((function(){return i(this)&&l(this).source||s(this)}),"toString")},741:t=>{var r=Math.ceil,e=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?e:r)(n)}},2360:(t,r,e)=>{var n,o=e(8551),i=e(6801),a=e(8727),u=e(421),c=e(397),s=e(4055),f=e(6119),p="prototype",l="script",v=f("IE_PROTO"),y=function(){},g=function(t){return"<"+l+">"+t+"</"+l+">"},b=function(t){t.write(g("")),t.close();var r=t.parentWindow.Object;return t=null,r},h=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,r,e;h="undefined"!=typeof document?document.domain&&n?b(n):(r=s("iframe"),e="java"+l+":",r.style.display="none",c.appendChild(r),r.src=String(e),(t=r.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):b(n);for(var o=a.length;o--;)delete h[p][a[o]];return h()};u[v]=!0,t.exports=Object.create||function(t,r){var e;return null!==t?(y[p]=o(t),e=new y,y[p]=null,e[v]=t):e=h(),void 0===r?e:i.f(e,r)}},6801:(t,r,e)=>{var n=e(3724),o=e(8686),i=e(4913),a=e(8551),u=e(5397),c=e(1072);r.f=n&&!o?Object.defineProperties:function(t,r){a(t);for(var e,n=u(r),o=c(r),s=o.length,f=0;s>f;)i.f(t,e=o[f++],n[e]);return t}},4913:(t,r,e)=>{var n=e(3724),o=e(5917),i=e(8686),a=e(8551),u=e(6969),c=TypeError,s=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p="enumerable",l="configurable",v="writable";r.f=n?i?function(t,r,e){if(a(t),r=u(r),a(e),"function"==typeof t&&"prototype"===r&&"value"in e&&v in e&&!e[v]){var n=f(t,r);n&&n[v]&&(t[r]=e.value,e={configurable:l in e?e[l]:n[l],enumerable:p in e?e[p]:n[p],writable:!1})}return s(t,r,e)}:s:function(t,r,e){if(a(t),r=u(r),a(e),o)try{return s(t,r,e)}catch(t){}if("get"in e||"set"in e)throw new c("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},7347:(t,r,e)=>{var n=e(3724),o=e(9565),i=e(8773),a=e(6980),u=e(5397),c=e(6969),s=e(9297),f=e(5917),p=Object.getOwnPropertyDescriptor;r.f=n?p:function(t,r){if(t=u(t),r=c(r),f)try{return p(t,r)}catch(t){}if(s(t,r))return a(!o(i.f,t,r),t[r])}},298:(t,r,e)=>{var n=e(2195),o=e(5397),i=e(8480).f,a=e(7680),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"Window"===n(t)?function(t){try{return i(t)}catch(t){return a(u)}}(t):i(o(t))}},8480:(t,r,e)=>{var n=e(1828),o=e(8727).concat("length","prototype");r.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},3717:(t,r)=>{r.f=Object.getOwnPropertySymbols},2787:(t,r,e)=>{var n=e(9297),o=e(4901),i=e(8981),a=e(6119),u=e(2211),c=a("IE_PROTO"),s=Object,f=s.prototype;t.exports=u?s.getPrototypeOf:function(t){var r=i(t);if(n(r,c))return r[c];var e=r.constructor;return o(e)&&r instanceof e?e.prototype:r instanceof s?f:null}},1625:(t,r,e)=>{var n=e(9504);t.exports=n({}.isPrototypeOf)},1828:(t,r,e)=>{var n=e(9504),o=e(9297),i=e(5397),a=e(9617).indexOf,u=e(421),c=n([].push);t.exports=function(t,r){var e,n=i(t),s=0,f=[];for(e in n)!o(u,e)&&o(n,e)&&c(f,e);for(;r.length>s;)o(n,e=r[s++])&&(~a(f,e)||c(f,e));return f}},1072:(t,r,e)=>{var n=e(1828),o=e(8727);t.exports=Object.keys||function(t){return n(t,o)}},8773:(t,r)=>{var e={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!e.call({1:2},1);r.f=o?function(t){var r=n(this,t);return!!r&&r.enumerable}:e},2967:(t,r,e)=>{var n=e(6706),o=e(34),i=e(7750),a=e(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=n(Object.prototype,"__proto__","set"))(e,[]),r=e instanceof Array}catch(t){}return function(e,n){return i(e),a(n),o(e)?(r?t(e,n):e.__proto__=n,e):e}}():void 0)},3179:(t,r,e)=>{var n=e(2140),o=e(6955);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},4270:(t,r,e)=>{var n=e(9565),o=e(4901),i=e(34),a=TypeError;t.exports=function(t,r){var e,u;if("string"===r&&o(e=t.toString)&&!i(u=n(e,t)))return u;if(o(e=t.valueOf)&&!i(u=n(e,t)))return u;if("string"!==r&&o(e=t.toString)&&!i(u=n(e,t)))return u;throw new a("Can't convert object to primitive value")}},5031:(t,r,e)=>{var n=e(7751),o=e(9504),i=e(8480),a=e(3717),u=e(8551),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var r=i.f(u(t)),e=a.f;return e?c(r,e(t)):r}},9167:(t,r,e)=>{var n=e(4576);t.exports=n},7750:(t,r,e)=>{var n=e(4117),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},687:(t,r,e)=>{var n=e(4913).f,o=e(9297),i=e(8227)("toStringTag");t.exports=function(t,r,e){t&&!e&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:r})}},6119:(t,r,e)=>{var n=e(5745),o=e(3392),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},7629:(t,r,e)=>{var n=e(6395),o=e(4576),i=e(9433),a="__core-js_shared__",u=t.exports=o[a]||i(a,{});(u.versions||(u.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(t,r,e)=>{var n=e(7629);t.exports=function(t,r){return n[t]||(n[t]=r||{})}},8183:(t,r,e)=>{var n=e(9504),o=e(1291),i=e(655),a=e(7750),u=n("".charAt),c=n("".charCodeAt),s=n("".slice),f=function(t){return function(r,e){var n,f,p=i(a(r)),l=o(e),v=p.length;return l<0||l>=v?t?"":void 0:(n=c(p,l))<55296||n>56319||l+1===v||(f=c(p,l+1))<56320||f>57343?t?u(p,l):n:t?s(p,l,l+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},4495:(t,r,e)=>{var n=e(9519),o=e(9039),i=e(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8242:(t,r,e)=>{var n=e(9565),o=e(7751),i=e(8227),a=e(6840);t.exports=function(){var t=o("Symbol"),r=t&&t.prototype,e=r&&r.valueOf,u=i("toPrimitive");r&&!r[u]&&a(r,u,(function(t){return n(e,this)}),{arity:1})}},1296:(t,r,e)=>{var n=e(4495);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},5610:(t,r,e)=>{var n=e(1291),o=Math.max,i=Math.min;t.exports=function(t,r){var e=n(t);return e<0?o(e+r,0):i(e,r)}},5397:(t,r,e)=>{var n=e(7055),o=e(7750);t.exports=function(t){return n(o(t))}},1291:(t,r,e)=>{var n=e(741);t.exports=function(t){var r=+t;return r!=r||0===r?0:n(r)}},8014:(t,r,e)=>{var n=e(1291),o=Math.min;t.exports=function(t){var r=n(t);return r>0?o(r,9007199254740991):0}},8981:(t,r,e)=>{var n=e(7750),o=Object;t.exports=function(t){return o(n(t))}},2777:(t,r,e)=>{var n=e(9565),o=e(34),i=e(757),a=e(5966),u=e(4270),c=e(8227),s=TypeError,f=c("toPrimitive");t.exports=function(t,r){if(!o(t)||i(t))return t;var e,c=a(t,f);if(c){if(void 0===r&&(r="default"),e=n(c,t,r),!o(e)||i(e))return e;throw new s("Can't convert object to primitive value")}return void 0===r&&(r="number"),u(t,r)}},6969:(t,r,e)=>{var n=e(2777),o=e(757);t.exports=function(t){var r=n(t,"string");return o(r)?r:r+""}},2140:(t,r,e)=>{var n={};n[e(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},655:(t,r,e)=>{var n=e(6955),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},6823:t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},3392:(t,r,e)=>{var n=e(9504),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},7040:(t,r,e)=>{var n=e(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(t,r,e)=>{var n=e(3724),o=e(9039);t.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8622:(t,r,e)=>{var n=e(4576),o=e(4901),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},511:(t,r,e)=>{var n=e(9167),o=e(9297),i=e(1951),a=e(4913).f;t.exports=function(t){var r=n.Symbol||(n.Symbol={});o(r,t)||a(r,t,{value:i.f(t)})}},1951:(t,r,e)=>{var n=e(8227);r.f=n},8227:(t,r,e)=>{var n=e(4576),o=e(5745),i=e(9297),a=e(3392),u=e(4495),c=e(7040),s=n.Symbol,f=o("wks"),p=c?s.for||s:s&&s.withoutSetter||a;t.exports=function(t){return i(f,t)||(f[t]=u&&i(s,t)?s[t]:p("Symbol."+t)),f[t]}},8706:(t,r,e)=>{var n=e(6518),o=e(9039),i=e(4376),a=e(34),u=e(8981),c=e(6198),s=e(6837),f=e(4659),p=e(1469),l=e(597),v=e(8227),y=e(9519),g=v("isConcatSpreadable"),b=y>=51||!o((function(){var t=[];return t[g]=!1,t.concat()[0]!==t})),h=function(t){if(!a(t))return!1;var r=t[g];return void 0!==r?!!r:i(t)};n({target:"Array",proto:!0,arity:1,forced:!b||!l("concat")},{concat:function(t){var r,e,n,o,i,a=u(this),l=p(a,0),v=0;for(r=-1,n=arguments.length;r<n;r++)if(h(i=-1===r?a:arguments[r]))for(o=c(i),s(v+o),e=0;e<o;e++,v++)e in i&&f(l,v,i[e]);else s(v+1),f(l,v++,i);return l.length=v,l}})},3792:(t,r,e)=>{var n=e(5397),o=e(6469),i=e(6269),a=e(1181),u=e(4913).f,c=e(1088),s=e(2529),f=e(6395),p=e(3724),l="Array Iterator",v=a.set,y=a.getterFor(l);t.exports=c(Array,"Array",(function(t,r){v(this,{type:l,target:n(t),index:0,kind:r})}),(function(){var t=y(this),r=t.target,e=t.index++;if(!r||e>=r.length)return t.target=null,s(void 0,!0);switch(t.kind){case"keys":return s(e,!1);case"values":return s(r[e],!1)}return s([e,r[e]],!1)}),"values");var g=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&p&&"values"!==g.name)try{u(g,"name",{value:"values"})}catch(t){}},8957:(t,r,e)=>{var n=e(4901),o=e(34),i=e(4913),a=e(1625),u=e(8227),c=e(283),s=u("hasInstance"),f=Function.prototype;s in f||i.f(f,s,{value:c((function(t){if(!n(this)||!o(t))return!1;var r=this.prototype;return o(r)?a(r,t):t instanceof this}),s)})},3110:(t,r,e)=>{var n=e(6518),o=e(7751),i=e(8745),a=e(9565),u=e(9504),c=e(9039),s=e(4901),f=e(757),p=e(7680),l=e(6933),v=e(4495),y=String,g=o("JSON","stringify"),b=u(/./.exec),h=u("".charAt),d=u("".charCodeAt),m=u("".replace),x=u(1..toString),S=/[\uD800-\uDFFF]/g,O=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,j=!v||c((function(){var t=o("Symbol")("stringify detection");return"[null]"!==g([t])||"{}"!==g({a:t})||"{}"!==g(Object(t))})),P=c((function(){return'"\\udf06\\ud834"'!==g("\udf06\ud834")||'"\\udead"'!==g("\udead")})),A=function(t,r){var e=p(arguments),n=l(r);if(s(n)||void 0!==t&&!f(t))return e[1]=function(t,r){if(s(n)&&(r=a(n,this,y(t),r)),!f(r))return r},i(g,null,e)},T=function(t,r,e){var n=h(e,r-1),o=h(e,r+1);return b(O,t)&&!b(w,o)||b(w,t)&&!b(O,n)?"\\u"+x(d(t,0),16):t};g&&n({target:"JSON",stat:!0,arity:3,forced:j||P},{stringify:function(t,r,e){var n=p(arguments),o=i(j?A:g,null,n);return P&&"string"==typeof o?m(o,S,T):o}})},4731:(t,r,e)=>{var n=e(4576);e(687)(n.JSON,"JSON",!0)},479:(t,r,e)=>{e(687)(Math,"Math",!0)},9773:(t,r,e)=>{var n=e(6518),o=e(4495),i=e(9039),a=e(3717),u=e(8981);n({target:"Object",stat:!0,forced:!o||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(t){var r=a.f;return r?r(u(t)):[]}})},6099:(t,r,e)=>{var n=e(2140),o=e(6840),i=e(3179);n||o(Object.prototype,"toString",i,{unsafe:!0})},5472:(t,r,e)=>{var n=e(6518),o=e(4576),i=e(687);n({global:!0},{Reflect:{}}),i(o.Reflect,"Reflect",!0)},7764:(t,r,e)=>{var n=e(8183).charAt,o=e(655),i=e(1181),a=e(1088),u=e(2529),c="String Iterator",s=i.set,f=i.getterFor(c);a(String,"String",(function(t){s(this,{type:c,string:o(t),index:0})}),(function(){var t,r=f(this),e=r.string,o=r.index;return o>=e.length?u(void 0,!0):(t=n(e,o),r.index+=t.length,u(t,!1))}))},6412:(t,r,e)=>{e(511)("asyncIterator")},6761:(t,r,e)=>{var n=e(6518),o=e(4576),i=e(9565),a=e(9504),u=e(6395),c=e(3724),s=e(4495),f=e(9039),p=e(9297),l=e(1625),v=e(8551),y=e(5397),g=e(6969),b=e(655),h=e(6980),d=e(2360),m=e(1072),x=e(8480),S=e(298),O=e(3717),w=e(7347),j=e(4913),P=e(6801),A=e(8773),T=e(6840),E=e(2106),L=e(5745),F=e(6119),I=e(421),R=e(3392),C=e(8227),M=e(1951),k=e(511),_=e(8242),D=e(687),N=e(1181),G=e(9213).forEach,z=F("hidden"),B="Symbol",V="prototype",U=N.set,W=N.getterFor(B),$=Object[V],H=o.Symbol,J=H&&H[V],Y=o.RangeError,q=o.TypeError,X=o.QObject,K=w.f,Q=j.f,Z=S.f,tt=A.f,rt=a([].push),et=L("symbols"),nt=L("op-symbols"),ot=L("wks"),it=!X||!X[V]||!X[V].findChild,at=function(t,r,e){var n=K($,r);n&&delete $[r],Q(t,r,e),n&&t!==$&&Q($,r,n)},ut=c&&f((function(){return 7!==d(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a}))?at:Q,ct=function(t,r){var e=et[t]=d(J);return U(e,{type:B,tag:t,description:r}),c||(e.description=r),e},st=function(t,r,e){t===$&&st(nt,r,e),v(t);var n=g(r);return v(e),p(et,n)?(e.enumerable?(p(t,z)&&t[z][n]&&(t[z][n]=!1),e=d(e,{enumerable:h(0,!1)})):(p(t,z)||Q(t,z,h(1,d(null))),t[z][n]=!0),ut(t,n,e)):Q(t,n,e)},ft=function(t,r){v(t);var e=y(r),n=m(e).concat(yt(e));return G(n,(function(r){c&&!i(pt,e,r)||st(t,r,e[r])})),t},pt=function(t){var r=g(t),e=i(tt,this,r);return!(this===$&&p(et,r)&&!p(nt,r))&&(!(e||!p(this,r)||!p(et,r)||p(this,z)&&this[z][r])||e)},lt=function(t,r){var e=y(t),n=g(r);if(e!==$||!p(et,n)||p(nt,n)){var o=K(e,n);return!o||!p(et,n)||p(e,z)&&e[z][n]||(o.enumerable=!0),o}},vt=function(t){var r=Z(y(t)),e=[];return G(r,(function(t){p(et,t)||p(I,t)||rt(e,t)})),e},yt=function(t){var r=t===$,e=Z(r?nt:y(t)),n=[];return G(e,(function(t){!p(et,t)||r&&!p($,t)||rt(n,et[t])})),n};s||(T(J=(H=function(){if(l(J,this))throw new q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,r=R(t),e=function(t){var n=void 0===this?o:this;n===$&&i(e,nt,t),p(n,z)&&p(n[z],r)&&(n[z][r]=!1);var a=h(1,t);try{ut(n,r,a)}catch(t){if(!(t instanceof Y))throw t;at(n,r,a)}};return c&&it&&ut($,r,{configurable:!0,set:e}),ct(r,t)})[V],"toString",(function(){return W(this).tag})),T(H,"withoutSetter",(function(t){return ct(R(t),t)})),A.f=pt,j.f=st,P.f=ft,w.f=lt,x.f=S.f=vt,O.f=yt,M.f=function(t){return ct(C(t),t)},c&&(E(J,"description",{configurable:!0,get:function(){return W(this).description}}),u||T($,"propertyIsEnumerable",pt,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:H}),G(m(ot),(function(t){k(t)})),n({target:B,stat:!0,forced:!s},{useSetter:function(){it=!0},useSimple:function(){it=!1}}),n({target:"Object",stat:!0,forced:!s,sham:!c},{create:function(t,r){return void 0===r?d(t):ft(d(t),r)},defineProperty:st,defineProperties:ft,getOwnPropertyDescriptor:lt}),n({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:vt}),_(),D(H,B),I[z]=!0},9463:(t,r,e)=>{var n=e(6518),o=e(3724),i=e(4576),a=e(9504),u=e(9297),c=e(4901),s=e(1625),f=e(655),p=e(2106),l=e(7740),v=i.Symbol,y=v&&v.prototype;if(o&&c(v)&&(!("description"in y)||void 0!==v().description)){var g={},b=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:f(arguments[0]),r=s(y,this)?new v(t):void 0===t?v():v(t);return""===t&&(g[r]=!0),r};l(b,v),b.prototype=y,y.constructor=b;var h="Symbol(description detection)"===String(v("description detection")),d=a(y.valueOf),m=a(y.toString),x=/^Symbol\((.*)\)[^)]+$/,S=a("".replace),O=a("".slice);p(y,"description",{configurable:!0,get:function(){var t=d(this);if(u(g,t))return"";var r=m(t),e=h?O(r,7,-1):S(r,x,"$1");return""===e?void 0:e}}),n({global:!0,constructor:!0,forced:!0},{Symbol:b})}},1510:(t,r,e)=>{var n=e(6518),o=e(7751),i=e(9297),a=e(655),u=e(5745),c=e(1296),s=u("string-to-symbol-registry"),f=u("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{for:function(t){var r=a(t);if(i(s,r))return s[r];var e=o("Symbol")(r);return s[r]=e,f[e]=r,e}})},193:(t,r,e)=>{e(511)("hasInstance")},2168:(t,r,e)=>{e(511)("isConcatSpreadable")},2259:(t,r,e)=>{e(511)("iterator")},2675:(t,r,e)=>{e(6761),e(1510),e(7812),e(3110),e(9773)},7812:(t,r,e)=>{var n=e(6518),o=e(9297),i=e(757),a=e(6823),u=e(5745),c=e(1296),s=u("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!i(t))throw new TypeError(a(t)+" is not a symbol");if(o(s,t))return s[t]}})},3142:(t,r,e)=>{e(511)("matchAll")},6964:(t,r,e)=>{e(511)("match")},3237:(t,r,e)=>{e(511)("replace")},1833:(t,r,e)=>{e(511)("search")},7947:(t,r,e)=>{e(511)("species")},1073:(t,r,e)=>{e(511)("split")},5700:(t,r,e)=>{var n=e(511),o=e(8242);n("toPrimitive"),o()},8125:(t,r,e)=>{var n=e(7751),o=e(511),i=e(687);o("toStringTag"),i(n("Symbol"),"Symbol")},326:(t,r,e)=>{e(511)("unscopables")},2953:(t,r,e)=>{var n=e(4576),o=e(7400),i=e(9296),a=e(3792),u=e(6699),c=e(687),s=e(8227)("iterator"),f=a.values,p=function(t,r){if(t){if(t[s]!==f)try{u(t,s,f)}catch(r){t[s]=f}if(c(t,r,!0),o[r])for(var e in a)if(t[e]!==a[e])try{u(t,e,a[e])}catch(r){t[e]=a[e]}}};for(var l in o)p(n[l]&&n[l].prototype,l);p(i,"DOMTokenList")},6394:(t,r,e)=>{var n=e(541);t.exports=n},884:(t,r,e)=>{var n=e(9281);e(2953),t.exports=n},6848:(t,r,e)=>{var n=e(2151);e(2953),t.exports=n}},r={};function e(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return t[n].call(i.exports,i,i.exports,e),i.exports}e(884),e(6848),e(6394)})(); |
@@ -21,12 +21,12 @@ 'use strict'; | ||
*/ | ||
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | ||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } | ||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } | ||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } | ||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } | ||
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } | ||
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } | ||
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | ||
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | ||
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } | ||
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } | ||
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } | ||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } | ||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } | ||
var $as = require('futoin-asyncsteps'); | ||
@@ -38,7 +38,12 @@ var SYM_EVENT_EMITTER = Symbol('FutoIn Event Emitter'); | ||
/** | ||
* @callback Handler | ||
* @param {...any} args - arbitrary arguments | ||
*/ | ||
/** | ||
* Asynchronous Event Emitter. | ||
* | ||
* @note Please avoid inheriting it, use EventEmitter.attach() instead! | ||
* Please avoid inheriting it, use EventEmitter.attach() instead! | ||
*/ | ||
var EventEmitter = /*#__PURE__*/function (_Symbol$hasInstance) { | ||
var EventEmitter = /*#__PURE__*/function () { | ||
function EventEmitter(allowed_events, max_listeners) { | ||
@@ -66,5 +71,5 @@ _classCallCheck(this, EventEmitter); | ||
* @param {string} evt - preconfigured event name | ||
* @param {callable} handler - async event handler | ||
* @param {Handler} handler - async event handler | ||
*/ | ||
_createClass(EventEmitter, [{ | ||
return _createClass(EventEmitter, [{ | ||
key: "on", | ||
@@ -75,7 +80,6 @@ value: function on(evt, handler) { | ||
if (hlist.length === this._max) { | ||
// eslint-disable-next-line no-console | ||
console.warn("Hitting max handler limit for: ".concat(evt)); | ||
} | ||
hlist.push(handler); | ||
} catch (e) { | ||
} catch (_unused) { | ||
throw new Error("Unknown event: ".concat(evt)); | ||
@@ -88,3 +92,3 @@ } | ||
* @param {string} evt - preconfigured event name | ||
* @param {callable} handler - async event handler | ||
* @param {Handler} handler - async event handler | ||
*/ | ||
@@ -97,7 +101,6 @@ }, { | ||
if (hlist.length === this._max) { | ||
// eslint-disable-next-line no-console | ||
console.warn("Hitting max once handler limit for: ".concat(evt)); | ||
} | ||
hlist.push(handler); | ||
} catch (e) { | ||
} catch (_unused2) { | ||
throw new Error("Unknown event: ".concat(evt)); | ||
@@ -110,3 +113,3 @@ } | ||
* @param {string} evt - preconfigured event name | ||
* @param {callable} handler - async event handler | ||
* @param {Handler} handler - async event handler | ||
*/ | ||
@@ -125,3 +128,3 @@ }, { | ||
}); | ||
} catch (e) { | ||
} catch (_unused3) { | ||
throw new Error("Unknown event: ".concat(evt)); | ||
@@ -134,2 +137,3 @@ } | ||
* @param {string} evt - event name | ||
* @param {...any} args - arguments to pass to the event handler | ||
*/ | ||
@@ -200,3 +204,3 @@ }, { | ||
}, { | ||
key: _Symbol$hasInstance, | ||
key: Symbol.hasInstance, | ||
value: function value(instance) { | ||
@@ -209,4 +213,4 @@ return instance[SYM_EVENT_EMITTER] !== undefined || instance.constructor === EventEmitter; | ||
* @param {object} instance - target object | ||
* @param {array} allowed_events - list of allowed event names | ||
* @param {integer} max_listeners=8 - maximum allowed handlers per event name | ||
* @param {Array} allowed_events - list of allowed event names | ||
* @param {number} [max_listeners] - maximum allowed handlers per event name | ||
*/ | ||
@@ -216,3 +220,2 @@ }, { | ||
value: function attach(instance, allowed_events) { | ||
var _Object$definePropert; | ||
var max_listeners = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 8; | ||
@@ -242,3 +245,3 @@ var old_ee = instance[SYM_EVENT_EMITTER]; | ||
var ee = new EventEmitter(allowed_events, max_listeners); | ||
Object.defineProperties(instance, (_Object$definePropert = {}, _defineProperty(_Object$definePropert, SYM_EVENT_EMITTER, { | ||
Object.defineProperties(instance, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, SYM_EVENT_EMITTER, { | ||
configurable: false, | ||
@@ -248,3 +251,3 @@ enumerable: false, | ||
value: ee | ||
}), _defineProperty(_Object$definePropert, "on", { | ||
}), "on", { | ||
configurable: false, | ||
@@ -256,3 +259,3 @@ enumerable: false, | ||
} | ||
}), _defineProperty(_Object$definePropert, "off", { | ||
}), "off", { | ||
configurable: false, | ||
@@ -264,3 +267,3 @@ enumerable: false, | ||
} | ||
}), _defineProperty(_Object$definePropert, "once", { | ||
}), "once", { | ||
configurable: false, | ||
@@ -272,3 +275,3 @@ enumerable: false, | ||
} | ||
}), _defineProperty(_Object$definePropert, "emit", { | ||
}), "emit", { | ||
configurable: false, | ||
@@ -283,3 +286,3 @@ enumerable: false, | ||
} | ||
}), _Object$definePropert)); | ||
})); | ||
} | ||
@@ -290,3 +293,3 @@ | ||
* @param {object} instance - target object | ||
* @param {integer} max_listeners - maximum allowed handlers per event name | ||
* @param {number} max_listeners - maximum allowed handlers per event name | ||
*/ | ||
@@ -299,5 +302,4 @@ }, { | ||
}]); | ||
return EventEmitter; | ||
}(Symbol.hasInstance); | ||
}(); | ||
module.exports = EventEmitter; | ||
//# sourceMappingURL=EventEmitter.js.map |
@@ -31,5 +31,5 @@ 'use strict'; | ||
* Reference to EventEmitter class | ||
*/ | ||
*/ | ||
$asyncevent.EventEmitter = EventEmitter; | ||
module.exports = $asyncevent; | ||
//# sourceMappingURL=asyncevent.js.map |
@@ -24,2 +24,5 @@ "use strict"; | ||
/** | ||
* @param {Window} window Global ref | ||
*/ | ||
(function (window) { | ||
@@ -26,0 +29,0 @@ 'use strict'; |
'use strict'; | ||
// ensure it works with frozen one | ||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } | ||
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } | ||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | ||
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } | ||
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } | ||
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } | ||
Object.freeze(Object.prototype); | ||
@@ -8,5 +14,22 @@ | ||
var $asyncevent = typeof window !== 'undefined' ? require('futoin-asyncevent') : module.require('../lib/asyncevent'); | ||
var _require = require('chai'), | ||
expect = _require.expect; | ||
var SYM_EVENT_EMITTER = $asyncevent.EventEmitter.SYM_EVENT_EMITTER; | ||
var expect; | ||
before(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { | ||
var _yield$import; | ||
return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.next = 2; | ||
return Promise.resolve().then(function () { | ||
return _interopRequireWildcard(require('chai')); | ||
}); | ||
case 2: | ||
_yield$import = _context.sent; | ||
expect = _yield$import.expect; | ||
case 4: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
}, _callee); | ||
}))); | ||
describe('EventEmitter', function () { | ||
@@ -13,0 +36,0 @@ describe('.attach()', function () { |
@@ -28,5 +28,10 @@ 'use strict'; | ||
/** | ||
* @callback Handler | ||
* @param {...any} args - arbitrary arguments | ||
*/ | ||
/** | ||
* Asynchronous Event Emitter. | ||
* | ||
* @note Please avoid inheriting it, use EventEmitter.attach() instead! | ||
* Please avoid inheriting it, use EventEmitter.attach() instead! | ||
*/ | ||
@@ -47,3 +52,3 @@ class EventEmitter { | ||
* @param {string} evt - preconfigured event name | ||
* @param {callable} handler - async event handler | ||
* @param {Handler} handler - async event handler | ||
*/ | ||
@@ -55,3 +60,2 @@ on( evt, handler ) { | ||
if ( hlist.length === this._max ) { | ||
// eslint-disable-next-line no-console | ||
console.warn( `Hitting max handler limit for: ${evt}` ); | ||
@@ -61,3 +65,3 @@ } | ||
hlist.push( handler ); | ||
} catch ( e ) { | ||
} catch { | ||
throw new Error( `Unknown event: ${evt}` ); | ||
@@ -70,3 +74,3 @@ } | ||
* @param {string} evt - preconfigured event name | ||
* @param {callable} handler - async event handler | ||
* @param {Handler} handler - async event handler | ||
*/ | ||
@@ -78,3 +82,2 @@ once( evt, handler ) { | ||
if ( hlist.length === this._max ) { | ||
// eslint-disable-next-line no-console | ||
console.warn( `Hitting max once handler limit for: ${evt}` ); | ||
@@ -84,3 +87,3 @@ } | ||
hlist.push( handler ); | ||
} catch ( e ) { | ||
} catch { | ||
throw new Error( `Unknown event: ${evt}` ); | ||
@@ -93,3 +96,3 @@ } | ||
* @param {string} evt - preconfigured event name | ||
* @param {callable} handler - async event handler | ||
* @param {Handler} handler - async event handler | ||
*/ | ||
@@ -103,3 +106,3 @@ off( evt, handler ) { | ||
this[memb_once] = this[memb_once].filter( ( h ) => h !== handler ); | ||
} catch ( e ) { | ||
} catch { | ||
throw new Error( `Unknown event: ${evt}` ); | ||
@@ -112,2 +115,3 @@ } | ||
* @param {string} evt - event name | ||
* @param {...any} args - arguments to pass to the event handler | ||
*/ | ||
@@ -165,4 +169,4 @@ emit( evt, ...args ) { | ||
* @param {object} instance - target object | ||
* @param {array} allowed_events - list of allowed event names | ||
* @param {integer} max_listeners=8 - maximum allowed handlers per event name | ||
* @param {Array} allowed_events - list of allowed event names | ||
* @param {number} [max_listeners] - maximum allowed handlers per event name | ||
*/ | ||
@@ -222,3 +226,3 @@ static attach( instance, allowed_events, max_listeners=8 ) { | ||
}, | ||
} | ||
}, | ||
); | ||
@@ -230,3 +234,3 @@ } | ||
* @param {object} instance - target object | ||
* @param {integer} max_listeners - maximum allowed handlers per event name | ||
* @param {number} max_listeners - maximum allowed handlers per event name | ||
*/ | ||
@@ -233,0 +237,0 @@ static setMaxListeners( instance, max_listeners ) { |
@@ -32,5 +32,5 @@ 'use strict'; | ||
* Reference to EventEmitter class | ||
*/ | ||
*/ | ||
$asyncevent.EventEmitter = EventEmitter; | ||
module.exports = $asyncevent; |
@@ -22,2 +22,5 @@ /** | ||
/** | ||
* @param {Window} window Global ref | ||
*/ | ||
( function( window ) { | ||
@@ -24,0 +27,0 @@ 'use strict'; |
{ | ||
"name": "futoin-asyncevent", | ||
"version": "2.3.7", | ||
"version": "2.3.8", | ||
"description": "FutoIn AsyncEvent - FTN15 compliant event emitter", | ||
@@ -41,13 +41,15 @@ "main": "lib/asyncevent.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.21.3", | ||
"@babel/plugin-transform-object-assign": "^7.18.6", | ||
"@babel/preset-env": "^7.20.2", | ||
"babel-loader": "^9.1.2", | ||
"chai": "^4.3.7", | ||
"core-js": "^3.29.1", | ||
"eslint": "^8.36.0", | ||
"futoin-asyncsteps": "^2.5.4", | ||
"@babel/core": "^7.26.0", | ||
"@babel/plugin-transform-object-assign": "^7.25.9", | ||
"@babel/preset-env": "^7.26.0", | ||
"babel-loader": "^9.2.1", | ||
"chai": "^5.1.2", | ||
"core-js": "^3.39.0", | ||
"eslint": "^9.15.0", | ||
"eslint-plugin-jsdoc": "^50.6.0", | ||
"futoin-asyncsteps": "^2.5.5", | ||
"globals": "^15.12.0", | ||
"grunt": "^1.6.1", | ||
"grunt-babel": "^8.0.0", | ||
"grunt-eslint": "^24.0.1", | ||
"grunt-eslint": "^25.0.0", | ||
"grunt-jsdoc-to-markdown": "^6.0.0", | ||
@@ -57,9 +59,9 @@ "grunt-karma": "^4.0.2", | ||
"grunt-text-replace": "^0.4.0", | ||
"grunt-webpack": "^5.0.0", | ||
"karma": "^6.4.1", | ||
"karma-firefox-launcher": "^2.1.2", | ||
"grunt-webpack": "^7.0.0", | ||
"karma": "^6.4.4", | ||
"karma-firefox-launcher": "^2.1.3", | ||
"karma-mocha": "^2.0.1", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"mocha": "^10.2.0", | ||
"webpack": "^5.76.3" | ||
"mocha": "^10.8.2", | ||
"webpack": "^5.96.1" | ||
}, | ||
@@ -66,0 +68,0 @@ "peerDependencies": { |
@@ -160,2 +160,3 @@ | ||
<dd><p>Asynchronous Event Emitter.</p> | ||
<p>Please avoid inheriting it, use EventEmitter.attach() instead!</p> | ||
</dd> | ||
@@ -186,2 +187,9 @@ </dl> | ||
## Typedefs | ||
<dl> | ||
<dt><a href="#Handler">Handler</a> : <code>function</code></dt> | ||
<dd></dd> | ||
</dl> | ||
<a name="EventEmitter"></a> | ||
@@ -192,4 +200,5 @@ | ||
Please avoid inheriting it, use EventEmitter.attach() instead! | ||
**Kind**: global class | ||
**Note**: Please avoid inheriting it, use EventEmitter.attach() instead! | ||
@@ -201,5 +210,5 @@ * [EventEmitter](#EventEmitter) | ||
* [.off(evt, handler)](#EventEmitter+off) | ||
* [.emit(evt)](#EventEmitter+emit) | ||
* [.emit(evt, ...args)](#EventEmitter+emit) | ||
* _static_ | ||
* [.attach(instance, allowed_events, max_listeners)](#EventEmitter.attach) | ||
* [.attach(instance, allowed_events, [max_listeners])](#EventEmitter.attach) | ||
* [.setMaxListeners(instance, max_listeners)](#EventEmitter.setMaxListeners) | ||
@@ -217,3 +226,3 @@ | ||
| evt | <code>string</code> | preconfigured event name | | ||
| handler | <code>callable</code> | async event handler | | ||
| handler | [<code>Handler</code>](#Handler) | async event handler | | ||
@@ -230,3 +239,3 @@ <a name="EventEmitter+once"></a> | ||
| evt | <code>string</code> | preconfigured event name | | ||
| handler | <code>callable</code> | async event handler | | ||
| handler | [<code>Handler</code>](#Handler) | async event handler | | ||
@@ -243,7 +252,7 @@ <a name="EventEmitter+off"></a> | ||
| evt | <code>string</code> | preconfigured event name | | ||
| handler | <code>callable</code> | async event handler | | ||
| handler | [<code>Handler</code>](#Handler) | async event handler | | ||
<a name="EventEmitter+emit"></a> | ||
### eventEmitter.emit(evt) | ||
### eventEmitter.emit(evt, ...args) | ||
Emit async event. | ||
@@ -256,6 +265,7 @@ | ||
| evt | <code>string</code> | event name | | ||
| ...args | <code>any</code> | arguments to pass to the event handler | | ||
<a name="EventEmitter.attach"></a> | ||
### EventEmitter.attach(instance, allowed_events, max_listeners) | ||
### EventEmitter.attach(instance, allowed_events, [max_listeners]) | ||
Attach event emitter to any instance | ||
@@ -268,4 +278,4 @@ | ||
| instance | <code>object</code> | | target object | | ||
| allowed_events | <code>array</code> | | list of allowed event names | | ||
| max_listeners | <code>integer</code> | <code>8</code> | maximum allowed handlers per event name | | ||
| allowed_events | <code>Array</code> | | list of allowed event names | | ||
| [max_listeners] | <code>number</code> | <code>8</code> | maximum allowed handlers per event name | | ||
@@ -282,3 +292,3 @@ <a name="EventEmitter.setMaxListeners"></a> | ||
| instance | <code>object</code> | target object | | ||
| max_listeners | <code>integer</code> | maximum allowed handlers per event name | | ||
| max_listeners | <code>number</code> | maximum allowed handlers per event name | | ||
@@ -321,5 +331,5 @@ <a name="$asyncevent"></a> | ||
* [.off(evt, handler)](#EventEmitter+off) | ||
* [.emit(evt)](#EventEmitter+emit) | ||
* [.emit(evt, ...args)](#EventEmitter+emit) | ||
* _static_ | ||
* [.attach(instance, allowed_events, max_listeners)](#EventEmitter.attach) | ||
* [.attach(instance, allowed_events, [max_listeners])](#EventEmitter.attach) | ||
* [.setMaxListeners(instance, max_listeners)](#EventEmitter.setMaxListeners) | ||
@@ -337,3 +347,3 @@ | ||
| evt | <code>string</code> | preconfigured event name | | ||
| handler | <code>callable</code> | async event handler | | ||
| handler | [<code>Handler</code>](#Handler) | async event handler | | ||
@@ -350,3 +360,3 @@ <a name="EventEmitter+once"></a> | ||
| evt | <code>string</code> | preconfigured event name | | ||
| handler | <code>callable</code> | async event handler | | ||
| handler | [<code>Handler</code>](#Handler) | async event handler | | ||
@@ -363,7 +373,7 @@ <a name="EventEmitter+off"></a> | ||
| evt | <code>string</code> | preconfigured event name | | ||
| handler | <code>callable</code> | async event handler | | ||
| handler | [<code>Handler</code>](#Handler) | async event handler | | ||
<a name="EventEmitter+emit"></a> | ||
### eventEmitter.emit(evt) | ||
### eventEmitter.emit(evt, ...args) | ||
Emit async event. | ||
@@ -376,6 +386,7 @@ | ||
| evt | <code>string</code> | event name | | ||
| ...args | <code>any</code> | arguments to pass to the event handler | | ||
<a name="EventEmitter.attach"></a> | ||
### EventEmitter.attach(instance, allowed_events, max_listeners) | ||
### EventEmitter.attach(instance, allowed_events, [max_listeners]) | ||
Attach event emitter to any instance | ||
@@ -388,4 +399,4 @@ | ||
| instance | <code>object</code> | | target object | | ||
| allowed_events | <code>array</code> | | list of allowed event names | | ||
| max_listeners | <code>integer</code> | <code>8</code> | maximum allowed handlers per event name | | ||
| allowed_events | <code>Array</code> | | list of allowed event names | | ||
| [max_listeners] | <code>number</code> | <code>8</code> | maximum allowed handlers per event name | | ||
@@ -402,3 +413,3 @@ <a name="EventEmitter.setMaxListeners"></a> | ||
| instance | <code>object</code> | target object | | ||
| max_listeners | <code>integer</code> | maximum allowed handlers per event name | | ||
| max_listeners | <code>number</code> | maximum allowed handlers per event name | | ||
@@ -418,6 +429,15 @@ <a name="$asyncevent"></a> | ||
**Kind**: static property of [<code>$asyncevent</code>](#$asyncevent) | ||
<a name="Handler"></a> | ||
## Handler : <code>function</code> | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| ...args | <code>any</code> | arbitrary arguments | | ||
*documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown)*. | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
205794
1030
426
24