!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=0)}([function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(l){o=!0,a=l}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}}(t,e)||function(t,e){if(t){if("string"===typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(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.")}()}r.r(e),r.d(e,"parseSerialMessages",(function(){return c}));var a=self;a.addEventListener("message",(function(t){var e=t.data,r=e.command,n=e.data;"cleanup"===r&&(i="",u=!0),n&&a.postMessage(c(n))}));var i="",u=!0,l="\r\n",f=new RegExp("(".concat(l,")"),"g"),c=function(t){var e=t.join("");if(u){var r=e.indexOf(l);if(!(r>-1))return{datasetNames:[],parsedLines:[]};e=e.substring(r+l.length),u=!1}var n=((i||"")+e).split(f).filter((function(t){return t.length>0}));i="",n[n.length-1]!==l&&(i=n[n.length-1],n.splice(-1));var a={},c=[];return n.filter((function(t){return t!==l})).forEach((function(t){var e={},r=[];t.indexOf(":")>0?t.split(",").forEach((function(t){var e=o(t.split(":"),2),n=e[0],a=e[1];n=n&&n.trim(),a=a&&a.trim(),n&&n.length>0&&a&&a.length>0&&r.push.apply(r,[n,a])})):t.split(/\s/).forEach((function(t,e){t.length&&r.push.apply(r,["value ".concat(e+1),t])}));for(var n=0;n<r.length-1;n+=2){var i=r[n],u=parseFloat(r[n+1]);0!==i.length&&(a[i]=!0,e[i]=u)}c.push(e)})),{parsedLines:c,datasetNames:Object.keys(a)}}}]);
//# sourceMappingURL=msgAggregatorWorker.d0a7c4b7.worker.js.map