easy-web-worker 1.1.20 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,59 @@
1
- # easy-web-worker
1
+ # easy-web-worker 🌟
2
2
 
3
- This library extends the capabilities of the **Worker** by integrating a pattern of cancelable promises from the library **cancelable-promise-jq**. For simple workers it removes the necessity of having to configure webpack or whatever bundler you are using. But when more complex solutions are needed, the class **StaticEasyWebWorker** allows you to integrate the easy worker and cancelable promises capabilities into your static worker.
3
+ ![Image John Avatar](https://raw.githubusercontent.com/johnny-quesada-developer/global-hooks-example/main/public/avatar2.jpeg)
4
4
 
5
- [Live Example with text-diff](https://johnny-quesada-developer.github.io/easy-web-workers-example/)
5
+ Hello and Welcome to **easy-web-worker** with [cancelable-promise-jq](https://www.npmjs.com/package/cancelable-promise-jq) - Your new go-to solution for seamless web worker integration enhanced with **cancelable promises** in JavaScript! 🚀 Check out the running example on [CODEPEN](https://codepen.io/johnnynabetes/pen/wvOvygW?editors=0010)
6
+
7
+ Are you tired of the hassle involved in setting up and managing web workers? Look no further! And take a look!
8
+
9
+ ```ts
10
+ /**
11
+ * Creating a web worker never was easier:
12
+ *
13
+ * The callback parameter will be the body of the worker
14
+ */
15
+ const worker = new EasyWebWorker((easyWorker) => {
16
+ /**
17
+ * Inside the worker we have to define an action when onMessage
18
+ */
19
+ easyWorker.onMessage((message) => {
20
+ const { payload } = message; // The payload includes whatever parameters are sent from the main thread
21
+
22
+ // do something heavy...
23
+
24
+ message.reportProgress(50); // report progress
25
+
26
+ message.resolve();
27
+ //message.reject(); // or reject
28
+ });
29
+ });
30
+ ```
31
+
32
+ Then, for sending a message to the worker:
33
+
34
+ ```ts
35
+ await worker.send('Hello Worker!');
36
+ ```
37
+
38
+ And that's it! You now have a worker running heavy computation in a real separate thread, with real asynchronous programming in JavaScript.
39
+
40
+ **easy-web-worker** is designed to enhance the capabilities of the **Worker** class by integrating a pattern of cancelable promises from the **[cancelable-promise-jq](https://www.npmjs.com/package/cancelable-promise-jq)** library. For straightforward tasks, it simplifies the process by eliminating the need to configure webpack or other bundlers. And for more complex requirements, the **StaticEasyWebWorker** class allows the integration of easy worker and cancelable promises capabilities into your static workers.
41
+
42
+ ```ts
43
+ // main thread
44
+ const worker = new EasyWebWorker('worker.js');
45
+
46
+ // inside the worker
47
+ new StaticEasyWebWorker().onMessage((message) => {
48
+ // do something
49
+ });
50
+ ```
51
+
52
+ Start enhancing your applications with robust, cancelable promises and easy web worker integration today! 🌐
53
+
54
+ Experience it in action with a [Live Example featuring text-diff](https://johnny-quesada-developer.github.io/easy-web-workers-example/) 📘.
55
+
56
+ For a comprehensive understanding, watch our informative [introduction video](https://www.youtube.com/watch?v=CK-Uri9lDOE) 🎥. You can also dive deeper into the code and explore on [easy-web-workers-examples](https://github.com/johnny-quesada-developer/easy-web-workers-example) 🧩.
6
57
 
7
58
  ## Creating a simple Web Worker
8
59
 
@@ -1,6 +1,2 @@
1
1
  export declare const generatedId: () => string;
2
- /**
3
- * This is the template of the worker, should be and string to avoid compilation issues
4
- */
5
2
  export declare const getWorkerTemplate: () => string;
6
- export declare const simpleMinifier: (code: string) => string;
package/lib/bundle.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see bundle.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["easy-web-worker"]=t():e["easy-web-worker"]=t()}(this,(()=>{return e={30:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||a(e,t)||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.")}()}function a(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(){c=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,i=Object.create(a.prototype),c=new _(n||[]);return o(i,"_invoke",{value:P(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var h={};function d(){}function y(){}function v(){}var m={};l(m,i,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(C([])));b&&b!==t&&r.call(b,i)&&(m=b);var w=v.prototype=d.prototype=Object.create(m);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function a(o,i,c,s){var u=p(e[o],e,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){a("next",e,c,s)}),(function(e){a("throw",e,c,s)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return a("throw",e,c,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){a(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function P(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=p(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=p(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(j.prototype),l(j.prototype,s,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(w),l(w,u,"Generator"),l(w,i,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function s(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,a=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===n(a)?a:String(a)),o)}var a}var u=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function c(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EasyWebWorker=t.createBlobWorker=void 0;var l=r(213),f=r(726),p=r(367);t.createBlobWorker=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=(0,f.getWorkerTemplate)(),o=Array.isArray(e)?e:[e],a="".concat(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.length?'self.importScripts(["'.concat(e.join('","'),'"]);'):""}(t),"\n ").concat(n,"\n ").concat(o.map((function(e){return'\n \n var easyWorker = createEasyWebWorker("'.concat(r,'");\n \n (').concat(e,")(easyWorker, self);")})).join("\n\n"));return(window.URL||window.webkitURL).createObjectURL(new Blob([a],{type:"application/javascript"}))};var h=function(){function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.scripts,i=void 0===a?[]:a,s=n.name,h=n.onWorkerError,d=void 0===h?null:h,y=n.url,v=void 0===y?null:y;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.source=t,this.messagesQueue=new Map,this.workerUrl=null,this.scripts=[],this.send=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0];return r.sendToWorker({payload:o})},this.sendToWorker=function(e){var t,n=e.payload,o=e.method,a=new l.EasyWebWorkerMessage,i=a.messageId,c=a.decoupledPromise,s=c.cancel;c.promise.cancel=function(e){var t;c.cancel=s;var n={messageId:i,method:o,cancelation:{reason:e}};return r.worker?(null===(t=r.worker)||void 0===t||t.postMessage(n),c.promise):(s(e),(0,p.toCancelablePromise)(Promise.reject(e)))},r.addMessageToQueue(a);var u={messageId:i,method:o,execution:{payload:n}};return null===(t=r.worker)||void 0===t||t.postMessage(u),c.promise},this.override=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],a=t[1],i=t[2];return u(r,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cancelAll(a,i);case 2:return e.abrupt("return",this.send.apply(this,[o]));case 3:case"end":return e.stop()}}),e,this)})))},this.overrideAfterCurrent=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=t[0],i=t[1],s=t[2];return u(r,void 0,void 0,c().mark((function e(){var t,r,n,u;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.messagesQueue.size){e.next=7;break}return t=o(this.messagesQueue,1),r=t[0],n=o(r,2),u=n[1],this.RemoveMessageFromQueue(u.messageId),e.next=6,this.cancelAll(i,s);case 6:this.addMessageToQueue(u);case 7:return e.abrupt("return",this.send.apply(this,[a]));case 8:case"end":return e.stop()}}),e,this)})))},this.name=s||(0,f.generatedId)(),this.scripts=i,this.worker=this.initializeWorker(),this.onWorkerError=d,v&&(this.workerUrl=v)}var r,n;return r=e,n=[{key:"isExternalWorkerFile",get:function(){return"string"==typeof this.source}},{key:"RemoveMessageFromQueue",value:function(e){this.messagesQueue.delete(e)}},{key:"executeMessageCallback",value:function(e){var t,r,n=null!==(t=this.messagesQueue.get(e.data.messageId))&&void 0!==t?t:null;if(n){var o=e.data.progress;if(this.worker){var c=n.decoupledPromise;if(o){var s=o.percentage,u=o.payload;c.reportProgress(s,u)}else{this.RemoveMessageFromQueue(n.messageId);var l=e.data.worker_canceled;if(l){var f=l.reason;c.reject(f)}else{var p=e.data.rejected;if(p){var h=p.reason;c.reject(h)}else{var d=e.data.resolved.payload;c.resolve.apply(c,function(e){if(Array.isArray(e))return i(e)}(r=null!=d?d:[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||a(r)||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.")}())}}}}else this.RemoveMessageFromQueue(n.messageId)}}},{key:"getWorkerUrl",value:function(){return this.isExternalWorkerFile?this.source:(0,t.createBlobWorker)(this.source,this.scripts)}},{key:"initializeWorker",value:function(){var e,t=this,r=this.source instanceof Worker;r||(this.workerUrl=null!==(e=this.workerUrl)&&void 0!==e?e:this.getWorkerUrl());var n=r?this.source:new Worker(this.workerUrl,{name:this.name});return n.onmessage=function(e){t.executeMessageCallback(e)},n.onerror=function(e){if(!t.onWorkerError)throw e;t.onWorkerError(e)},n}},{key:"cancelAll",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,r=void 0!==t&&t,n=Array.from(this.messagesQueue.values()),o=100/n.length;if(r)return this.reboot(e);var a=n.map((function(t){var r=t.decoupledPromise.promise;return r.cancel(e).catch((function(e){return r.reportProgress(o,e),e}))}));return Promise.all(a)}},{key:"addMessageToQueue",value:function(e){this.messagesQueue.set(e.messageId,e)}},{key:"sendToMethod",value:function(e,t){return this.sendToWorker({method:e,payload:t})}},{key:"reboot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Worker was rebooted";this.worker.terminate(),this.worker=null;var t=this.cancelAll(e);return this.worker=this.initializeWorker(),t}},{key:"dispose",value:function(){return u(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cancelAll(null);case 2:URL.revokeObjectURL(this.workerUrl),this.worker.terminate(),this.worker=null;case 5:case"end":return e.stop()}}),e,this)})))}}],n&&s(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),e}();t.EasyWebWorker=h},726:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.simpleMinifier=t.getWorkerTemplate=t.generatedId=void 0,t.generatedId=function(){return"".concat((new Date).getTime()).concat(Math.random().toString(36).substr(2,9))},t.getWorkerTemplate=function(){return"/*this-code-was auto-generated*/\n const createEasyWebWorker = (targetOrigin) => {\n /* Keep track of the messages sent allowing us to cancel them */\n const workerMessages = new Map();\n \n /* This structure allows us to have multiple callbacks for the same worker */\n const workerCallbacks = new Map([\n [\n '',\n () => {\n throw \"you didn't defined a message-callback, please assign a callback by calling IEasyWorkerInstance.onMessage\";\n },\n ],\n ]);\n \n const createMessage = ({ messageId, payload, origin }) => {\n const cancelCallbacks = new Set();\n \n const postMessage = (data) => {\n const { progress } = data;\n \n if (!progress) {\n /* If it's not a progress message means that the message is resolved | rejected | canceled */\n workerMessages.delete(messageId);\n }\n \n self.postMessage({ messageId, ...data }, origin);\n };\n \n const resolve = (...result) => {\n postMessage({ resolved: { payload: result } });\n };\n \n const reject = (reason) => {\n postMessage({ rejected: { reason } });\n };\n \n const cancel = (reason) => {\n const callbacks = [...cancelCallbacks];\n \n callbacks.forEach((callback) => callback(reason));\n \n postMessage({ worker_canceled: { reason } });\n };\n \n const reportProgress = (percentage, payload) => {\n postMessage({ progress: { percentage, payload } });\n };\n \n /* Returns a function that can be used to unsubscribe from the cancelation */\n const onCancel = (callback) => {\n cancelCallbacks.add(callback);\n \n return () => cancelCallbacks.delete(callback);\n };\n \n return {\n payload,\n resolve,\n reject,\n cancel,\n onCancel,\n reportProgress,\n };\n };\n \n const importScripts = (...scripts) => {\n self.importScripts(...scripts);\n };\n \n const onMessage = (...args) => {\n const [param1, param2] = args;\n const hasCustomCallbackKey = typeof param1 === 'string';\n \n if (hasCustomCallbackKey) {\n const callbackKey = param1;\n const callback = param2;\n \n workerCallbacks.set(callbackKey, callback);\n \n return;\n }\n \n const callback = param1;\n workerCallbacks.set('', callback);\n };\n \n const close = () => {\n /* should cancel all the promises of the main thread */\n const messages = [...workerMessages.values()];\n \n messages.forEach((message) => message.reject(new Error('worker closed')));\n \n self.close();\n };\n \n self.onmessage = (event) => {\n const { data, origin } = event;\n const { messageId, cancelation } = data;\n \n if (cancelation) {\n const { reason } = cancelation;\n \n const message = workerMessages.get(messageId);\n \n message.cancel(reason);\n \n return;\n }\n \n const { method, execution } = data;\n const { payload } = execution;\n \n const message = createMessage({\n messageId,\n payload,\n origin: targetOrigin || origin || undefined,\n });\n \n workerMessages.set(messageId, message);\n \n const callback = workerCallbacks.get(method || '');\n \n callback(message, event);\n };\n \n return {\n importScripts,\n onMessage,\n close,\n };\n };"},t.simpleMinifier=function(e){for(var t="",r=!1,n=!1,o=0;o<e.length;o++){var a=e.charAt(o);r?"*"===a&&"/"===e.charAt(o+1)&&(r=!1,o++):n?(t+=a,'"'===a&&"\\"!==e.charAt(o-1)&&(n=!1)):"/"!==a||"*"!==e.charAt(o+1)?'"'!==a?"\n"!==a&&"\r"!==a&&(t+=a):(n=!0,t+=a):(r=!0,o++)}return t.replace(/\s+/g," ").trim()}},213:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,a=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===n(a)?a:String(a)),o)}var a}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.EasyWebWorkerMessage=void 0;var i=r(367),c=r(726),s=a((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messageId=(0,c.generatedId)(),this.decoupledPromise=(0,i.createDecoupledPromise)()}));t.EasyWebWorkerMessage=s},973:(e,t)=>{"use strict";function r(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):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.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.createStaticEasyWebWorker=t.StaticEasyWebWorker=void 0,t.StaticEasyWebWorker=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=new Map,o=new Map([["",function(){throw"you didn't defined a message-callback, please assign a callback by calling IEasyWorkerInstance.onMessage"}]]),a=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],a=t[1];if("string"==typeof n){var i=n,c=a;o.set(i,c)}else{var s=n;o.set("",s)}};self.onmessage=function(e){var a=e.data,i=e.origin,c=a.messageId,s=a.cancelation;if(s){var u=s.reason;n.get(c).cancel(u)}else{var l=e.data,f=l.method,p=function(e){var t=e.messageId,o=e.payload,a=e.origin,i=new Set,c=function(e){e.progress||n.delete(t),self.postMessage(Object.assign({messageId:t},e),a)};return{payload:o,resolve:function(){var e=Array.from(arguments);c({resolved:{payload:e}})},reject:function(e){c({rejected:{reason:e}})},cancel:function(e){r(i).forEach((function(t){return t(e)})),c({canceled:{reason:e}})},onCancel:function(e){return i.add(e),function(){return i.delete(e)}},reportProgress:function(e,t){c({progress:{percentage:e,payload:t}})}}}({messageId:c,payload:l.execution.payload,origin:t||i||void 0});o.get(f||"")(p,e)}},e&&a(e),this.importScripts=function(){var e;(e=self).importScripts.apply(e,arguments)},this.close=function(){r(n.values()).forEach((function(e){return e.reject(new Error("worker closed"))})),self.close()},this.onMessage=a},t.createStaticEasyWebWorker=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new t.StaticEasyWebWorker(e,r)}},991:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},o=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(30);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a.EasyWebWorker}}),o(r(30),t),o(r(973),t)},367:function(e){var t;t=()=>(()=>{"use strict";var e={399:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},o.apply(this,arguments)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return i(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)},a(e)}function i(e,t,r){return i=c()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&s(o,r.prototype),o},i.apply(null,arguments)}function c(){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(e){return!1}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CancelablePromise=void 0;var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(f,e);var t,a,i,l=(a=f,i=c(),function(){var e,t=u(a);if(i){var o=u(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return n(e)}(this,e)});function f(e){var t,r,a,i,c,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(i=l.call(this,(function(e,t){c=e,s=t}))).status="pending",i.cancelCallbacks=[],i.ownCancelCallbacks=[],i.onProgressCallbacks=[],i.subscribeToOwnCancelEvent=function(e){i.ownCancelCallbacks.push(e)},i.cancel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if("pending"===i.status)return i.status="canceled",i.ownCancelCallbacks.forEach((function(t){return t(e)})),i.cancelCallbacks.forEach((function(t){return t(e)})),i.reject(e),i.cancelCallbacks=[],i.ownCancelCallbacks=[],n(i)},i.onCancel=function(e){return i.cancelCallbacks.push(e),n(i)},i.onProgress=function(e){return i.onProgressCallbacks.push(e),n(i)},i.reportProgress=function(e,t){return i.onProgressCallbacks.forEach((function(r){return r(e,t)})),n(i)},i.createChildPromise=function(){var e,t,r=new f((function(r,n,o){e=r,t=n}));return r.onProgressCallbacks=i.onProgressCallbacks,r.onCancel((function(e){i.cancel(e)})),{promise:r,resolve:e,reject:t}},i.resolve=c,i.reject=s,e((function(e){i.status="resolved",i.resolve(e)}),(function(e){i.status="rejected",i.reject(e)}),{cancel:function(e){return i.cancel(e)},onCancel:function(e){return i.subscribeToOwnCancelEvent(e),n(i)},onProgress:function(e){return i.onProgress(e)},reportProgress:function(e,t){i.reportProgress(e,t)}}),i.then=function(e,r){var a=i.createChildPromise(),c=a.promise,s=a.resolve,l=a.reject;return o((t=n(i),u(f.prototype)),"then",t).call(t,e,r).then(s,l),c},i.catch=function(e){var t=i.createChildPromise(),a=t.promise,c=t.resolve,s=t.reject;return o((r=n(i),u(f.prototype)),"catch",r).call(r,e).then(c,s),a},i.finally=function(e){var t=i.createChildPromise(),r=t.promise,c=t.resolve,s=t.reject;return o((a=n(i),u(f.prototype)),"finally",a).call(a,e).then(c,s),r},i}return t=f,Object.defineProperty(t,"prototype",{writable:!1}),t}(a(Promise));t.CancelablePromise=l,l.prototype.constructor=Promise},716:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCancelablePromise=t.isPromise=t.groupAsCancelablePromise=t.createDecoupledPromise=t.allSettledCancelable=void 0;var o=r(335),a=r(399);function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,i=Object.create(a.prototype),c=new _(n||[]);return o(i,"_invoke",{value:P(e,r,c)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var h={};function d(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(C([])));b&&b!==t&&r.call(b,c)&&(m=b);var w=v.prototype=d.prototype=Object.create(m);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function a(o,i,c,s){var u=p(e[o],e,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){a("next",e,c,s)}),(function(e){a("throw",e,c,s)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return a("throw",e,c,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){a(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function P(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=p(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=p(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(j.prototype),l(j.prototype,s,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(w),l(w,u,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}t.createDecoupledPromise=function(){var e,t,r,n=new a.CancelablePromise((function(n,o,a){e=n,t=o,r=a}));return Object.assign(Object.assign({resolve:e,reject:t},r),{promise:n})};var s=function e(t){if(t instanceof a.CancelablePromise)return t;if("function"==typeof t)return e(t());if(!l(t))return new a.CancelablePromise((function(e){return e(t)}));var r,n,o=new a.CancelablePromise((function(e,o,a){r=e,n=o,t.then(r,n)}));return o.onCancel((function(e){n(e)})),o};t.toCancelablePromise=s;var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.length)return null;var r,n=t.maxConcurrent,o=void 0===n?8:n,i=t.executeInOrder,u=void 0!==i&&i,l=t.beforeEachCallback,f=void 0===l?null:l,p=t.afterEachCallback,h=void 0===p?null:p,d=t.onQueueEmptyCallback,y=void 0===d?null:d,v=function(e){if(Array.isArray(e))return c(e)}(r=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(r)||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.")}(),m=[];return new a.CancelablePromise((function(e,t,r){return function e(){if(v.length){var t=v.splice(0,o).map((function(e){var t="function"==typeof e?e():e;null==f||f();var n=s(t);return r.onCancel((function(){n.cancel()})),n.then((function(e){m.push(e),null==h||h(e)})),u?n.then((function(e){return e})):n}));return Promise.all(t).then((function(){return e()}))}}().then((function(){null==y||y(m),e(m)}))}))};t.groupAsCancelablePromise=u;var l=function(e){return Promise.resolve(e)===e};t.isPromise=l,t.allSettledCancelable=function(e){var t=[],r=e.map((function(e){var r=s(e);return t.push(r),(0,o.tryCatchPromise)((function(){return r})).then((function(e){return{error:e.error,result:e.result,promise:r}}))})),n=u(t);return new a.CancelablePromise((function(e,t,o){return a=void 0,c=i().mark((function t(){var a;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o.onCancel(n.cancel),t.next=3,Promise.all(r);case 3:a=t.sent,e(a);case 5:case"end":return t.stop()}}),t)})),new(a||(a=Promise))((function(e,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function n(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof a?o:new a((function(e){e(o)}))).then(r,n)}o((c=c.apply(void 0,[])).next())}));var a,c}))}},522:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(399);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=r(716);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},991:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(522);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=r(335);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},335:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(969);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},969:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(948);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=r(667);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},948:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tryCatchPromise=t.tryCatch=void 0;var n=r(522);t.tryCatch=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.defaultResult,n=void 0===r?null:r,o=t.exceptionHandlingType,a=void 0===o?"error":o;try{return{error:null,result:e()}}catch(e){return"ignore"!==a&&console[a](e),{error:e,result:n}}},t.tryCatchPromise=function(e,t){var r=t||{},o=r.defaultResult,a=void 0===o?null:o,i=r.exceptionHandlingType,c=void 0===i?"error":i,s=r.ignoreCancel,u=void 0===s||s,l=null,f=null,p=function(e){f=e,"ignore"!=c&&("canceled"===l.status&&u||console[c](f))};try{if(e instanceof n.CancelablePromise)return l=e,new Promise((function(e){l.then((function(e){return{error:null,result:e,promise:l}})).catch((function(e){return p(e),{error:e,result:a,promise:l}}))}));var h=e(),d=h instanceof n.CancelablePromise;return l=d?h:(0,n.toCancelablePromise)(h),new Promise((function(e){l.then((function(t){e({error:null,result:t,promise:l})})).catch((function(t){p(t),e({error:t,result:a,promise:l})}))}))}catch(e){return p(e),Promise.resolve({error:f,result:a,promise:l})}}},667:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})}},t={};return function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}(991)})(),e.exports=t()}},t={},function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}(991);var e,t}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["easy-web-worker"]=t():e["easy-web-worker"]=t()}(this,(()=>{return e={30:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||i(e,t)||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.")}()}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(){c=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof d?t:d,a=Object.create(i.prototype),c=new _(n||[]);return o(a,"_invoke",{value:P(e,r,c)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var h={};function d(){}function y(){}function v(){}var m={};l(m,a,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,a)&&(m=b);var w=v.prototype=d.prototype=Object.create(m);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function i(o,a,c,u){var s=p(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function P(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=p(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=p(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(j.prototype),l(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new j(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function u(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===n(i)?i:String(i)),o)}var i}var s=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function c(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EasyWebWorker=t.createBlobWorker=void 0;var l=r(213),f=r(726),p=r(367);t.createBlobWorker=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=(0,f.getWorkerTemplate)(),o=Array.isArray(e)?e:[e],i="".concat(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.length?'self.importScripts(["'.concat(e.join('","'),'"]);'):""}(t),"\n ").concat(n,"\n ").concat(o.map((function(e){return'\n \n var easyWorker = createEasyWebWorker("'.concat(r,'");\n \n (').concat(e,")(easyWorker, self);")})).join("\n\n"));return(window.URL||window.webkitURL).createObjectURL(new Blob([i],{type:"application/javascript"}))};var h=function(){function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.scripts,a=void 0===i?[]:i,u=n.name,h=n.onWorkerError,d=void 0===h?null:h,y=n.url,v=void 0===y?null:y;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.source=t,this.messagesQueue=new Map,this.workerUrl=null,this.scripts=[],this.send=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0];return r.sendToWorker({payload:o})},this.sendToWorker=function(e){var t,n=e.payload,o=e.method,i=new l.EasyWebWorkerMessage,a=i.messageId,c=i.decoupledPromise,u=c.cancel;c.promise.cancel=function(e){var t;c.cancel=u;var n={messageId:a,method:o,cancelation:{reason:e}};return r.worker?(null===(t=r.worker)||void 0===t||t.postMessage(n),c.promise):(u(e),(0,p.toCancelablePromise)(Promise.reject(e)))},r.addMessageToQueue(i);var s={messageId:a,method:o,execution:{payload:n}};return null===(t=r.worker)||void 0===t||t.postMessage(s),c.promise},this.override=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],i=t[1],a=t[2];return s(r,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cancelAll(i,a);case 2:return e.abrupt("return",this.send.apply(this,[o]));case 3:case"end":return e.stop()}}),e,this)})))},this.overrideAfterCurrent=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0],a=t[1],u=t[2];return s(r,void 0,void 0,c().mark((function e(){var t,r,n,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.messagesQueue.size){e.next=7;break}return t=o(this.messagesQueue,1),r=t[0],n=o(r,2),s=n[1],this.RemoveMessageFromQueue(s.messageId),e.next=6,this.cancelAll(a,u);case 6:this.addMessageToQueue(s);case 7:return e.abrupt("return",this.send.apply(this,[i]));case 8:case"end":return e.stop()}}),e,this)})))},this.name=u||(0,f.generatedId)(),this.scripts=a,this.worker=this.initializeWorker(),this.onWorkerError=d,v&&(this.workerUrl=v)}var r,n;return r=e,n=[{key:"isExternalWorkerFile",get:function(){return"string"==typeof this.source}},{key:"RemoveMessageFromQueue",value:function(e){this.messagesQueue.delete(e)}},{key:"executeMessageCallback",value:function(e){var t,r,n=null!==(t=this.messagesQueue.get(e.data.messageId))&&void 0!==t?t:null;if(n){var o=e.data.progress;if(this.worker){var c=n.decoupledPromise;if(o){var u=o.percentage,s=o.payload;c.reportProgress(u,s)}else{this.RemoveMessageFromQueue(n.messageId);var l=e.data.worker_canceled;if(l){var f=l.reason;c.reject(f)}else{var p=e.data.rejected;if(p){var h=p.reason;c.reject(h)}else{var d=e.data.resolved.payload;c.resolve.apply(c,function(e){if(Array.isArray(e))return a(e)}(r=null!=d?d:[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||i(r)||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.")}())}}}}else this.RemoveMessageFromQueue(n.messageId)}}},{key:"getWorkerUrl",value:function(){return this.isExternalWorkerFile?this.source:(0,t.createBlobWorker)(this.source,this.scripts)}},{key:"initializeWorker",value:function(){var e,t=this,r=this.source instanceof Worker;r||(this.workerUrl=null!==(e=this.workerUrl)&&void 0!==e?e:this.getWorkerUrl());var n=r?this.source:new Worker(this.workerUrl,{name:this.name});return n.onmessage=function(e){t.executeMessageCallback(e)},n.onerror=function(e){if(!t.onWorkerError)throw e;t.onWorkerError(e)},n}},{key:"cancelAll",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,r=void 0!==t&&t,n=Array.from(this.messagesQueue.values()),o=100/n.length;if(r)return this.reboot(e);var i=n.map((function(t){var r=t.decoupledPromise.promise;return r.cancel(e).catch((function(e){return r.reportProgress(o,e),e}))}));return Promise.all(i)}},{key:"addMessageToQueue",value:function(e){this.messagesQueue.set(e.messageId,e)}},{key:"sendToMethod",value:function(e,t){return this.sendToWorker({method:e,payload:t})}},{key:"reboot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Worker was rebooted";this.worker.terminate(),this.worker=null;var t=this.cancelAll(e);return this.worker=this.initializeWorker(),t}},{key:"dispose",value:function(){return s(this,void 0,void 0,c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.cancelAll(null);case 2:URL.revokeObjectURL(this.workerUrl),this.worker.terminate(),this.worker=null;case 5:case"end":return e.stop()}}),e,this)})))}}],n&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),e}();t.EasyWebWorker=h},726:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWorkerTemplate=t.generatedId=void 0,t.generatedId=function(){return"".concat((new Date).getTime()).concat(Math.random().toString(36).substr(2,9))},t.getWorkerTemplate=function(){return"const createEasyWebWorker=a=>{const b=new Map(),c=new Map([['',()=>{throw\"you didn't defined a message-callback, please assign a callback by calling IEasyWorkerInstance.onMessage\"}]]),d=({messageId:e,payload:f,origin:g})=>{const h=new Set(),i=j=>{const{progress:k}=j;k||b.delete(e),self.postMessage({messageId:e,...j},g)},l=(...m)=>{i({resolved:{payload:m}})},n=o=>{i({rejected:{reason:o}})},p=q=>{[...h].forEach(r=>r(q)),i({worker_canceled:{reason:q}})},s=(t,u)=>{i({progress:{percentage:t,payload:u}})},v=w=>(h.add(w),()=>h.delete(w));return{payload:f,resolve:l,reject:n,cancel:p,onCancel:v,reportProgress:s}},x=(...y)=>{self.importScripts(...y)},z=(...A)=>{const[B,C]=A,D=typeof B==='string';if(D){const E=B,F=C;c.set(E,F);return;}const G=B;c.set('',G)},H=()=>{[...b.values()].forEach(I=>I.reject(new Error('worker closed')));self.close();};self.onmessage=J=>{const{data:K,origin:L}=J,{messageId:M,cancelation:N}=K;if(N){const{reason:O}=N,P=b.get(M);P.cancel(O);return;}const{method:Q,execution:R}=K,{payload:S}=R,T=d({messageId:M,payload:S,origin:a||L||undefined});b.set(M,T);const U=c.get(Q||'');U(T,J)};return{importScripts:x,onMessage:z,close:H}};"}},213:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===n(i)?i:String(i)),o)}var i}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.EasyWebWorkerMessage=void 0;var a=r(367),c=r(726),u=i((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.messageId=(0,c.generatedId)(),this.decoupledPromise=(0,a.createDecoupledPromise)()}));t.EasyWebWorkerMessage=u},973:(e,t)=>{"use strict";function r(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):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.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.createStaticEasyWebWorker=t.StaticEasyWebWorker=void 0,t.StaticEasyWebWorker=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=new Map,o=new Map([["",function(){throw"you didn't defined a message-callback, please assign a callback by calling IEasyWorkerInstance.onMessage"}]]),i=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],i=t[1];if("string"==typeof n){var a=n,c=i;o.set(a,c)}else{var u=n;o.set("",u)}};self.onmessage=function(e){var i=e.data,a=e.origin,c=i.messageId,u=i.cancelation;if(u){var s=u.reason;n.get(c).cancel(s)}else{var l=e.data,f=l.method,p=function(e){var t=e.messageId,o=e.payload,i=e.origin,a=new Set,c=function(e){e.progress||n.delete(t),self.postMessage(Object.assign({messageId:t},e),i)};return{payload:o,resolve:function(){var e=Array.from(arguments);c({resolved:{payload:e}})},reject:function(e){c({rejected:{reason:e}})},cancel:function(e){r(a).forEach((function(t){return t(e)})),c({canceled:{reason:e}})},onCancel:function(e){return a.add(e),function(){return a.delete(e)}},reportProgress:function(e,t){c({progress:{percentage:e,payload:t}})}}}({messageId:c,payload:l.execution.payload,origin:t||a||void 0});o.get(f||"")(p,e)}},e&&i(e),this.importScripts=function(){var e;(e=self).importScripts.apply(e,arguments)},this.close=function(){r(n.values()).forEach((function(e){return e.reject(new Error("worker closed"))})),self.close()},this.onMessage=i},t.createStaticEasyWebWorker=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new t.StaticEasyWebWorker(e,r)}},991:(e,t,r)=>{"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},o=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(30);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i.EasyWebWorker}}),o(r(30),t),o(r(973),t)},367:function(e){var t;t=()=>(()=>{"use strict";var e={399:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},o.apply(this,arguments)}function i(e){var t="function"==typeof Map?new Map:void 0;return i=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return a(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)},i(e)}function a(e,t,r){return a=c()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o},a.apply(null,arguments)}function c(){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(e){return!1}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CancelablePromise=void 0;var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(f,e);var t,i,a,l=(i=f,a=c(),function(){var e,t=s(i);if(a){var o=s(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return n(e)}(this,e)});function f(e){var t,r,i,a,c,u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(a=l.call(this,(function(e,t){c=e,u=t}))).status="pending",a.cancelCallbacks=[],a.ownCancelCallbacks=[],a.onProgressCallbacks=[],a.subscribeToOwnCancelEvent=function(e){a.ownCancelCallbacks.push(e)},a.cancel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if("pending"===a.status)return a.status="canceled",a.ownCancelCallbacks.forEach((function(t){return t(e)})),a.cancelCallbacks.forEach((function(t){return t(e)})),a.reject(e),a.cancelCallbacks=[],a.ownCancelCallbacks=[],n(a)},a.onCancel=function(e){return a.cancelCallbacks.push(e),n(a)},a.onProgress=function(e){return a.onProgressCallbacks.push(e),n(a)},a.reportProgress=function(e,t){return a.onProgressCallbacks.forEach((function(r){return r(e,t)})),n(a)},a.createChildPromise=function(){var e,t,r=new f((function(r,n,o){e=r,t=n}));return r.onProgressCallbacks=a.onProgressCallbacks,r.onCancel((function(e){a.cancel(e)})),{promise:r,resolve:e,reject:t}},a.resolve=c,a.reject=u,e((function(e){a.status="resolved",a.resolve(e)}),(function(e){a.status="rejected",a.reject(e)}),{cancel:function(e){return a.cancel(e)},onCancel:function(e){return a.subscribeToOwnCancelEvent(e),n(a)},onProgress:function(e){return a.onProgress(e)},reportProgress:function(e,t){a.reportProgress(e,t)}}),a.then=function(e,r){var i=a.createChildPromise(),c=i.promise,u=i.resolve,l=i.reject;return o((t=n(a),s(f.prototype)),"then",t).call(t,e,r).then(u,l),c},a.catch=function(e){var t=a.createChildPromise(),i=t.promise,c=t.resolve,u=t.reject;return o((r=n(a),s(f.prototype)),"catch",r).call(r,e).then(c,u),i},a.finally=function(e){var t=a.createChildPromise(),r=t.promise,c=t.resolve,u=t.reject;return o((i=n(a),s(f.prototype)),"finally",i).call(i,e).then(c,u),r},a}return t=f,Object.defineProperty(t,"prototype",{writable:!1}),t}(i(Promise));t.CancelablePromise=l,l.prototype.constructor=Promise},716:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCancelablePromise=t.isPromise=t.groupAsCancelablePromise=t.createDecoupledPromise=t.allSettledCancelable=void 0;var o=r(335),i=r(399);function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof d?t:d,a=Object.create(i.prototype),c=new _(n||[]);return o(a,"_invoke",{value:P(e,r,c)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var h={};function d(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(S([])));b&&b!==t&&r.call(b,c)&&(m=b);var w=v.prototype=d.prototype=Object.create(m);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function i(o,a,c,u){var s=p(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,c,u)}),(function(e){i("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return i("throw",e,c,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function P(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=p(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function O(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=p(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return y.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(j.prototype),l(j.prototype,u,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new j(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(w),l(w,s,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}t.createDecoupledPromise=function(){var e,t,r,n=new i.CancelablePromise((function(n,o,i){e=n,t=o,r=i}));return Object.assign(Object.assign({resolve:e,reject:t},r),{promise:n})};var u=function e(t){if(t instanceof i.CancelablePromise)return t;if("function"==typeof t)return e(t());if(!l(t))return new i.CancelablePromise((function(e){return e(t)}));var r,n,o=new i.CancelablePromise((function(e,o,i){r=e,n=o,t.then(r,n)}));return o.onCancel((function(e){n(e)})),o};t.toCancelablePromise=u;var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.length)return null;var r,n=t.maxConcurrent,o=void 0===n?8:n,a=t.executeInOrder,s=void 0!==a&&a,l=t.beforeEachCallback,f=void 0===l?null:l,p=t.afterEachCallback,h=void 0===p?null:p,d=t.onQueueEmptyCallback,y=void 0===d?null:d,v=function(e){if(Array.isArray(e))return c(e)}(r=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(r)||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.")}(),m=[];return new i.CancelablePromise((function(e,t,r){return function e(){if(v.length){var t=v.splice(0,o).map((function(e){var t="function"==typeof e?e():e;null==f||f();var n=u(t);return r.onCancel((function(){n.cancel()})),n.then((function(e){m.push(e),null==h||h(e)})),s?n.then((function(e){return e})):n}));return Promise.all(t).then((function(){return e()}))}}().then((function(){null==y||y(m),e(m)}))}))};t.groupAsCancelablePromise=s;var l=function(e){return Promise.resolve(e)===e};t.isPromise=l,t.allSettledCancelable=function(e){var t=[],r=e.map((function(e){var r=u(e);return t.push(r),(0,o.tryCatchPromise)((function(){return r})).then((function(e){return{error:e.error,result:e.result,promise:r}}))})),n=s(t);return new i.CancelablePromise((function(e,t,o){return i=void 0,c=a().mark((function t(){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o.onCancel(n.cancel),t.next=3,Promise.all(r);case 3:i=t.sent,e(i);case 5:case"end":return t.stop()}}),t)})),new(i||(i=Promise))((function(e,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function n(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof i?o:new i((function(e){e(o)}))).then(r,n)}o((c=c.apply(void 0,[])).next())}));var i,c}))}},522:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(399);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=r(716);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},991:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(522);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=r(335);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},335:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(969);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}))},969:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(948);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var o=r(667);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},948:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tryCatchPromise=t.tryCatch=void 0;var n=r(522);t.tryCatch=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.defaultResult,n=void 0===r?null:r,o=t.exceptionHandlingType,i=void 0===o?"error":o;try{return{error:null,result:e()}}catch(e){return"ignore"!==i&&console[i](e),{error:e,result:n}}},t.tryCatchPromise=function(e,t){var r=t||{},o=r.defaultResult,i=void 0===o?null:o,a=r.exceptionHandlingType,c=void 0===a?"error":a,u=r.ignoreCancel,s=void 0===u||u,l=null,f=null,p=function(e){f=e,"ignore"!=c&&("canceled"===l.status&&s||console[c](f))};try{if(e instanceof n.CancelablePromise)return l=e,new Promise((function(e){l.then((function(e){return{error:null,result:e,promise:l}})).catch((function(e){return p(e),{error:e,result:i,promise:l}}))}));var h=e(),d=h instanceof n.CancelablePromise;return l=d?h:(0,n.toCancelablePromise)(h),new Promise((function(e){l.then((function(t){e({error:null,result:t,promise:l})})).catch((function(t){p(t),e({error:t,result:i,promise:l})}))}))}catch(e){return p(e),Promise.resolve({error:f,result:i,promise:l})}}},667:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})}},t={};return function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(991)})(),e.exports=t()}},t={},function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}(991);var e,t}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-web-worker",
3
- "version": "1.1.20",
3
+ "version": "2.0.1",
4
4
  "description": "This is a library to easily handle and create web-workers, if you are a web developer and never tried this... do not wait any longer! Workers are an amazing option to improve user experience and make your webpages even greater",
5
5
  "main": "lib/bundle.js",
6
6
  "types": "lib/index.d.ts",