@colabo-flow/s-go 0.2.7 → 0.2.9

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/dist/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import e from"querystring";import t from"tty";import r from"util";import n from"os";import o from"buffer";import i from"assert";import s from"stream";import a from"events";import u from"string_decoder/";import c from"net";import l from"tls";import f from"http";import h from"https";import d from"url";import p from"zlib";var g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},m={},v={},b=Object.prototype.hasOwnProperty;function y(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function w(e){try{return encodeURIComponent(e)}catch(e){return null}}v.stringify=function(e,t){t=t||"";var r,n,o=[];for(n in"string"!=typeof t&&(t="?"),e)if(b.call(e,n)){if((r=e[n])||null!=r&&!isNaN(r)||(r=""),n=w(n),r=w(r),null===n||null===r)continue;o.push(n+"="+r)}return o.length?t+o.join("&"):""},v.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,n={};t=r.exec(e);){var o=y(t[1]),i=y(t[2]);null===o||null===i||o in n||(n[o]=i)}return n};var E=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e},I=v,C=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,B=/[\n\r\t]/g,x=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,T=/:\d+$/,U=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,O=/^[a-zA-Z]:/;function k(e){return(e||"").toString().replace(C,"")}var S=[["#","hash"],["?","query"],function(e,t){return A(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],_={hash:1,query:1};function N(e){var t,r=("undefined"!=typeof window?window:void 0!==g?g:"undefined"!=typeof self?self:{}).location||{},n={},o=typeof(e=e||r);if("blob:"===e.protocol)n=new M(unescape(e.pathname),{});else if("string"===o)for(t in n=new M(e,{}),_)delete n[t];else if("object"===o){for(t in e)t in _||(n[t]=e[t]);void 0===n.slashes&&(n.slashes=x.test(e.href))}return n}function A(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function R(e,t){e=(e=k(e)).replace(B,""),t=t||{};var r,n=U.exec(e),o=n[1]?n[1].toLowerCase():"",i=!!n[2],s=!!n[3],a=0;return i?s?(r=n[2]+n[3]+n[4],a=n[2].length+n[3].length):(r=n[2]+n[4],a=n[2].length):s?(r=n[3]+n[4],a=n[3].length):r=n[4],"file:"===o?a>=2&&(r=r.slice(2)):A(o)?r=n[4]:o?i&&(r=r.slice(2)):a>=2&&A(t.protocol)&&(r=n[4]),{protocol:o,slashes:i||A(o),slashesCount:a,rest:r}}function M(e,t,r){if(e=(e=k(e)).replace(B,""),!(this instanceof M))return new M(e,t,r);var n,o,i,s,a,u,c=S.slice(),l=typeof t,f=this,h=0;for("object"!==l&&"string"!==l&&(r=t,t=null),r&&"function"!=typeof r&&(r=I.parse),n=!(o=R(e||"",t=N(t))).protocol&&!o.slashes,f.slashes=o.slashes||n&&t.slashes,f.protocol=o.protocol||t.protocol||"",e=o.rest,("file:"===o.protocol&&(2!==o.slashesCount||O.test(e))||!o.slashes&&(o.protocol||o.slashesCount<2||!A(f.protocol)))&&(c[3]=[/(.*)/,"pathname"]);h<c.length;h++)"function"!=typeof(s=c[h])?(i=s[0],u=s[1],i!=i?f[u]=e:"string"==typeof i?~(a="@"===i?e.lastIndexOf(i):e.indexOf(i))&&("number"==typeof s[2]?(f[u]=e.slice(0,a),e=e.slice(a+s[2])):(f[u]=e.slice(a),e=e.slice(0,a))):(a=i.exec(e))&&(f[u]=a[1],e=e.slice(0,a.index)),f[u]=f[u]||n&&s[3]&&t[u]||"",s[4]&&(f[u]=f[u].toLowerCase())):e=s(e,f);r&&(f.query=r(f.query)),n&&t.slashes&&"/"!==f.pathname.charAt(0)&&(""!==f.pathname||""!==t.pathname)&&(f.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],i=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(i=!0),r.splice(n,1),s--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(f.pathname,t.pathname)),"/"!==f.pathname.charAt(0)&&A(f.protocol)&&(f.pathname="/"+f.pathname),E(f.port,f.protocol)||(f.host=f.hostname,f.port=""),f.username=f.password="",f.auth&&(~(a=f.auth.indexOf(":"))?(f.username=f.auth.slice(0,a),f.username=encodeURIComponent(decodeURIComponent(f.username)),f.password=f.auth.slice(a+1),f.password=encodeURIComponent(decodeURIComponent(f.password))):f.username=encodeURIComponent(decodeURIComponent(f.auth)),f.auth=f.password?f.username+":"+f.password:f.username),f.origin="file:"!==f.protocol&&A(f.protocol)&&f.host?f.protocol+"//"+f.host:"null",f.href=f.toString()}M.prototype={set:function(e,t,r){var n=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||I.parse)(t)),n[e]=t;break;case"port":n[e]=t,E(t,n.protocol)?t&&(n.host=n.hostname+":"+t):(n.host=n.hostname,n[e]="");break;case"hostname":n[e]=t,n.port&&(t+=":"+n.port),n.host=t;break;case"host":n[e]=t,T.test(t)?(t=t.split(":"),n.port=t.pop(),n.hostname=t.join(":")):(n.hostname=t,n.port="");break;case"protocol":n.protocol=t.toLowerCase(),n.slashes=!r;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";n[e]=t.charAt(0)!==o?o+t:t}else n[e]=t;break;case"username":case"password":n[e]=encodeURIComponent(t);break;case"auth":var i=t.indexOf(":");~i?(n.username=t.slice(0,i),n.username=encodeURIComponent(decodeURIComponent(n.username)),n.password=t.slice(i+1),n.password=encodeURIComponent(decodeURIComponent(n.password))):n.username=encodeURIComponent(decodeURIComponent(t))}for(var s=0;s<S.length;s++){var a=S[s];a[4]&&(n[a[1]]=n[a[1]].toLowerCase())}return n.auth=n.password?n.username+":"+n.password:n.username,n.origin="file:"!==n.protocol&&A(n.protocol)&&n.host?n.protocol+"//"+n.host:"null",n.href=n.toString(),n},toString:function(e){e&&"function"==typeof e||(e=I.stringify);var t,r=this,n=r.host,o=r.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(r.protocol&&r.slashes||A(r.protocol)?"//":"");return r.username?(i+=r.username,r.password&&(i+=":"+r.password),i+="@"):r.password?(i+=":"+r.password,i+="@"):"file:"!==r.protocol&&A(r.protocol)&&!n&&"/"!==r.pathname&&(i+="@"),(":"===n[n.length-1]||T.test(r.hostname)&&!r.port)&&(n+=":"),i+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(i+=r.hash),i}},M.extractProtocol=R,M.location=N,M.trimLeft=k,M.qs=I;var L=M,F={},j={},P={},D={exports:{}};!function(e){var t=4294967296,r=1/t,n=9007199254740991;function o(e){return e<=n&&e>=-n}function i(e,t,r){if("number"!=typeof(e=+e)||e<t||e>r||Math.floor(e)!==e)throw new TypeError('"value" argument is out of bounds');return e}function s(e,t,r){if(t<0||t+r>e.length)throw new RangeError("Index out of range")}e.exports.isContiguousInt=o,e.exports.assertContiguousInt=function(e){if(!o(e))throw new TypeError("number cannot be represented as a contiguous integer")},["UInt","Int"].forEach((function(t){var r=t+"8";e.exports["read"+r]=Buffer.prototype["read"+r].call,e.exports["write"+r]=Buffer.prototype["write"+r].call,["16","32"].forEach((function(r){["LE","BE"].forEach((function(n){var o=t+r+n,i=Buffer.prototype["read"+o];e.exports["read"+o]=function(e,t){return i.call(e,t)};var s=Buffer.prototype["write"+o];e.exports["write"+o]=function(e,t,r){return s.call(e,t,r)}}))}))})),e.exports.readUInt24BE=function(e,t){return e.readUInt8(t)<<16|e.readUInt16BE(t+1)},e.exports.writeUInt24BE=function(e,t,r){t=i(t,0,16777215),s(e,r,3),e.writeUInt8(t>>>16,r),e.writeUInt16BE(65535&t,r+1)},e.exports.readUInt40BE=function(e,r){return(e.readUInt8(r)||0)*t+e.readUInt32BE(r+1)},e.exports.writeUInt40BE=function(e,t,n){t=i(t,0,0xffffffffff),s(e,n,5),e.writeUInt8(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+1)},e.exports.readUInt48BE=function(e,r){return e.readUInt16BE(r)*t+e.readUInt32BE(r+2)},e.exports.writeUInt48BE=function(e,t,n){t=i(t,0,0xffffffffffff),s(e,n,6),e.writeUInt16BE(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+2)},e.exports.readUInt56BE=function(e,r){return((e.readUInt8(r)||0)<<16|e.readUInt16BE(r+1))*t+e.readUInt32BE(r+3)},e.exports.writeUInt56BE=function(e,t,n){if(t=i(t,0,72057594037927940),s(e,n,7),t<72057594037927940){var o=Math.floor(t*r);e.writeUInt8(o>>>16,n),e.writeUInt16BE(65535&o,n+1),e.writeInt32BE(-1&t,n+3)}else e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255},e.exports.readUInt64BE=function(e,r){return e.readUInt32BE(r)*t+e.readUInt32BE(r+4)},e.exports.writeUInt64BE=function(e,t,n){t=i(t,0,0x10000000000000000),s(e,n,8),t<0x10000000000000000?(e.writeUInt32BE(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+4)):(e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255,e[n+7]=255)},e.exports.readUInt24LE=function(e,t){return e.readUInt8(t+2)<<16|e.readUInt16LE(t)},e.exports.writeUInt24LE=function(e,t,r){t=i(t,0,16777215),s(e,r,3),e.writeUInt16LE(65535&t,r),e.writeUInt8(t>>>16,r+2)},e.exports.readUInt40LE=function(e,r){return(e.readUInt8(r+4)||0)*t+e.readUInt32LE(r)},e.exports.writeUInt40LE=function(e,t,n){t=i(t,0,0xffffffffff),s(e,n,5),e.writeInt32LE(-1&t,n),e.writeUInt8(Math.floor(t*r),n+4)},e.exports.readUInt48LE=function(e,r){return e.readUInt16LE(r+4)*t+e.readUInt32LE(r)},e.exports.writeUInt48LE=function(e,t,n){t=i(t,0,0xffffffffffff),s(e,n,6),e.writeInt32LE(-1&t,n),e.writeUInt16LE(Math.floor(t*r),n+4)},e.exports.readUInt56LE=function(e,r){return((e.readUInt8(r+6)||0)<<16|e.readUInt16LE(r+4))*t+e.readUInt32LE(r)},e.exports.writeUInt56LE=function(e,t,n){if(t=i(t,0,72057594037927940),s(e,n,7),t<72057594037927940){e.writeInt32LE(-1&t,n);var o=Math.floor(t*r);e.writeUInt16LE(65535&o,n+4),e.writeUInt8(o>>>16,n+6)}else e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255},e.exports.readUInt64LE=function(e,r){return e.readUInt32LE(r+4)*t+e.readUInt32LE(r)},e.exports.writeUInt64LE=function(e,t,n){t=i(t,0,0x10000000000000000),s(e,n,8),t<0x10000000000000000?(e.writeInt32LE(-1&t,n),e.writeUInt32LE(Math.floor(t*r),n+4)):(e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255,e[n+7]=255)},e.exports.readInt24BE=function(e,t){return(e.readInt8(t)<<16)+e.readUInt16BE(t+1)},e.exports.writeInt24BE=function(e,t,r){t=i(t,-8388608,8388607),s(e,r,3),e.writeInt8(t>>16,r),e.writeUInt16BE(65535&t,r+1)},e.exports.readInt40BE=function(e,r){return(e.readInt8(r)||0)*t+e.readUInt32BE(r+1)},e.exports.writeInt40BE=function(e,t,n){t=i(t,-549755813888,549755813887),s(e,n,5),e.writeInt8(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+1)},e.exports.readInt48BE=function(e,r){return e.readInt16BE(r)*t+e.readUInt32BE(r+2)},e.exports.writeInt48BE=function(e,t,n){t=i(t,-0x800000000000,0x7fffffffffff),s(e,n,6),e.writeInt16BE(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+2)},e.exports.readInt56BE=function(e,r){return(((e.readInt8(r)||0)<<16)+e.readUInt16BE(r+1))*t+e.readUInt32BE(r+3)},e.exports.writeInt56BE=function(e,t,n){if(t=i(t,-0x800000000000000,0x80000000000000),s(e,n,7),t<0x80000000000000){var o=Math.floor(t*r);e.writeInt8(o>>16,n),e.writeUInt16BE(65535&o,n+1),e.writeInt32BE(-1&t,n+3)}else e[n]=127,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255},e.exports.readInt64BE=function(e,r){return e.readInt32BE(r)*t+e.readUInt32BE(r+4)},e.exports.writeInt64BE=function(e,t,n){t=i(t,-23611832414348226e5,0x8000000000000000),s(e,n,8),t<0x8000000000000000?(e.writeInt32BE(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+4)):(e[n]=127,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255,e[n+7]=255)},e.exports.readInt24LE=function(e,t){return(e.readInt8(t+2)<<16)+e.readUInt16LE(t)},e.exports.writeInt24LE=function(e,t,r){t=i(t,-8388608,8388607),s(e,r,3),e.writeUInt16LE(65535&t,r),e.writeInt8(t>>16,r+2)},e.exports.readInt40LE=function(e,r){return(e.readInt8(r+4)||0)*t+e.readUInt32LE(r)},e.exports.writeInt40LE=function(e,t,n){t=i(t,-549755813888,549755813887),s(e,n,5),e.writeInt32LE(-1&t,n),e.writeInt8(Math.floor(t*r),n+4)},e.exports.readInt48LE=function(e,r){return e.readInt16LE(r+4)*t+e.readUInt32LE(r)},e.exports.writeInt48LE=function(e,t,n){t=i(t,-0x800000000000,0x7fffffffffff),s(e,n,6),e.writeInt32LE(-1&t,n),e.writeInt16LE(Math.floor(t*r),n+4)},e.exports.readInt56LE=function(e,r){return(((e.readInt8(r+6)||0)<<16)+e.readUInt16LE(r+4))*t+e.readUInt32LE(r)},e.exports.writeInt56LE=function(e,t,n){if(t=i(t,-0x80000000000000,0x80000000000000),s(e,n,7),t<0x80000000000000){e.writeInt32LE(-1&t,n);var o=Math.floor(t*r);e.writeUInt16LE(65535&o,n+4),e.writeInt8(o>>16,n+6)}else e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=127},e.exports.readInt64LE=function(e,r){return e.readInt32LE(r+4)*t+e.readUInt32LE(r)},e.exports.writeInt64LE=function(e,t,n){t=i(t,-0x8000000000000000,0x8000000000000000),s(e,n,8),t<0x8000000000000000?(e.writeInt32LE(-1&t,n),e.writeInt32LE(Math.floor(t*r),n+4)):(e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255,e[n+7]=127)}}(D);var q=D.exports;function H(e,t,r){var n=r;for(var o in r+=4,t)if(void 0!==t[o]){var i=Buffer.byteLength(o);e.writeUInt8(i,r),r++,e.write(o,r,"utf8"),r+=i,r+=$(e,t[o],r)}var s=r-n;return e.writeUInt32BE(s-4,n),s}function $(e,t,r){var n=r,o=typeof t,i=t;function s(t){e.write(t,r),r++}switch(t&&"object"===o&&t.hasOwnProperty("!")&&(i=t.value,o=t["!"]),"number"==o&&(o=function(e){return e>=0x8000000000000000||Math.abs(e)<0x4000000000000&&Math.floor(e)!==e}(i)?"double":i<128&&i>=-128?"byte":i>=-32768&&i<32768?"short":i>=-2147483648&&i<2147483648?"int":"long"),o){case"string":var a=Buffer.byteLength(i,"utf8");s("S"),e.writeUInt32BE(a,r),r+=4,e.write(i,r,"utf8"),r+=a;break;case"object":null===i?s("V"):Array.isArray(i)?(s("A"),r+=function(e,t,r){var n=r;r+=4;for(var o=0,i=t.length;o<i;o++)r+=$(e,t[o],r);var s=r-n;return e.writeUInt32BE(s-4,n),s}(e,i,r)):Buffer.isBuffer(i)?(s("x"),e.writeUInt32BE(i.length,r),r+=4,i.copy(e,r),r+=i.length):(s("F"),r+=H(e,i,r));break;case"boolean":s("t"),e.writeUInt8(i?1:0,r),r++;break;case"double":case"float64":s("d"),e.writeDoubleBE(i,r),r+=8;break;case"byte":case"int8":s("b"),e.writeInt8(i,r),r++;break;case"short":case"int16":s("s"),e.writeInt16BE(i,r),r+=2;break;case"int":case"int32":s("I"),e.writeInt32BE(i,r),r+=4;break;case"long":case"int64":s("l"),q.writeInt64BE(e,i,r),r+=8;break;case"timestamp":s("T"),q.writeUInt64BE(e,i,r),r+=8;break;case"float":s("f"),e.writeFloatBE(i,r),r+=4;break;case"decimal":if(s("D"),!(i.hasOwnProperty("places")&&i.hasOwnProperty("digits")&&i.places>=0&&i.places<256))throw new TypeError("Decimal value must be {'places': 0..255, 'digits': uint32}, got "+JSON.stringify(i));e[r]=i.places,r++,e.writeUInt32BE(i.digits,r),r+=4;break;default:throw new TypeError("Unknown type to encode: "+o)}return r-n}P.encodeTable=H,P.decodeFields=function e(t){var r,n,o,i={},s=0,a=t.length;function u(){var n=String.fromCharCode(t[s]);switch(s++,n){case"b":o=t.readInt8(s),s++;break;case"S":r=t.readUInt32BE(s),s+=4,o=t.toString("utf8",s,s+r),s+=r;break;case"I":o=t.readInt32BE(s),s+=4;break;case"D":var i=t[s];s++;var a=t.readUInt32BE(s);s+=4,o={"!":"decimal",value:{places:i,digits:a}};break;case"T":o=q.readUInt64BE(t,s),s+=8,o={"!":"timestamp",value:o};break;case"F":r=t.readUInt32BE(s),s+=4,o=e(t.slice(s,s+r)),s+=r;break;case"A":r=t.readUInt32BE(s),function(e){var t=[];for(;s<e;)u(),t.push(o);o=t}((s+=4)+r);break;case"d":o=t.readDoubleBE(s),s+=8;break;case"f":o=t.readFloatBE(s),s+=4;break;case"l":o=q.readInt64BE(t,s),s+=8;break;case"s":o=t.readInt16BE(s),s+=2;break;case"t":o=0!=t[s],s++;break;case"V":o=null;break;case"x":r=t.readUInt32BE(s),s+=4,o=t.slice(s,s+r),s+=r;break;default:throw new TypeError('Unexpected type tag "'+n+'"')}}for(;s<a;)r=t.readUInt8(s),s++,n=t.toString("utf8",s,s+r),s+=r,u(),i[n]=o;return i};var z=P,K=D.exports,G=z.encodeTable,V=z.decodeFields,Q=Buffer.alloc(65536);Object.freeze({}),j.constants={FRAME_METHOD:1,FRAME_HEADER:2,FRAME_BODY:3,FRAME_HEARTBEAT:8,FRAME_MIN_SIZE:4096,FRAME_END:206,REPLY_SUCCESS:200,CONTENT_TOO_LARGE:311,NO_ROUTE:312,NO_CONSUMERS:313,ACCESS_REFUSED:403,NOT_FOUND:404,RESOURCE_LOCKED:405,PRECONDITION_FAILED:406,CONNECTION_FORCED:320,INVALID_PATH:402,FRAME_ERROR:501,SYNTAX_ERROR:502,COMMAND_INVALID:503,CHANNEL_ERROR:504,UNEXPECTED_FRAME:505,RESOURCE_ERROR:506,NOT_ALLOWED:530,NOT_IMPLEMENTED:540,INTERNAL_ERROR:541},j.constant_strs={1:"FRAME-METHOD",2:"FRAME-HEADER",3:"FRAME-BODY",8:"FRAME-HEARTBEAT",200:"REPLY-SUCCESS",206:"FRAME-END",311:"CONTENT-TOO-LARGE",312:"NO-ROUTE",313:"NO-CONSUMERS",320:"CONNECTION-FORCED",402:"INVALID-PATH",403:"ACCESS-REFUSED",404:"NOT-FOUND",405:"RESOURCE-LOCKED",406:"PRECONDITION-FAILED",501:"FRAME-ERROR",502:"SYNTAX-ERROR",503:"COMMAND-INVALID",504:"CHANNEL-ERROR",505:"UNEXPECTED-FRAME",506:"RESOURCE-ERROR",530:"NOT-ALLOWED",540:"NOT-IMPLEMENTED",541:"INTERNAL-ERROR",4096:"FRAME-MIN-SIZE"},j.FRAME_OVERHEAD=8,j.decode=function(e,t){switch(e){case 655370:return s={versionMajor:void 0,versionMinor:void 0,serverProperties:void 0,mechanisms:void 0,locales:void 0},n=(r=t)[i=0],i++,s.versionMajor=n,n=r[i],i++,s.versionMinor=n,o=r.readUInt32BE(i),i+=4,n=V(r.slice(i,i+o)),i+=o,s.serverProperties=n,o=r.readUInt32BE(i),i+=4,n=r.slice(i,i+o),i+=o,s.mechanisms=n,o=r.readUInt32BE(i),i+=4,n=r.slice(i,i+o),i+=o,s.locales=n,s;case 655371:return function(e){var t,r,n=0,o={clientProperties:void 0,mechanism:void 0,response:void 0,locale:void 0};return r=e.readUInt32BE(n),n+=4,t=V(e.slice(n,n+r)),n+=r,o.clientProperties=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.mechanism=t,r=e.readUInt32BE(n),n+=4,t=e.slice(n,n+r),n+=r,o.response=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.locale=t,o}(t);case 655380:return function(e){var t,r,n=0,o={challenge:void 0};return r=e.readUInt32BE(n),n+=4,t=e.slice(n,n+r),n+=r,o.challenge=t,o}(t);case 655381:return function(e){var t,r,n=0,o={response:void 0};return r=e.readUInt32BE(n),n+=4,t=e.slice(n,n+r),n+=r,o.response=t,o}(t);case 655390:return function(e){var t,r=0,n={channelMax:void 0,frameMax:void 0,heartbeat:void 0};return t=e.readUInt16BE(r),r+=2,n.channelMax=t,t=e.readUInt32BE(r),r+=4,n.frameMax=t,t=e.readUInt16BE(r),r+=2,n.heartbeat=t,n}(t);case 655391:return function(e){var t,r=0,n={channelMax:void 0,frameMax:void 0,heartbeat:void 0};return t=e.readUInt16BE(r),r+=2,n.channelMax=t,t=e.readUInt32BE(r),r+=4,n.frameMax=t,t=e.readUInt16BE(r),r+=2,n.heartbeat=t,n}(t);case 655400:return function(e){var t,r,n=0,o={virtualHost:void 0,capabilities:void 0,insist:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.virtualHost=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.capabilities=t,t=!!(1&e[n]),o.insist=t,o}(t);case 655401:return function(e){var t,r,n=0,o={knownHosts:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.knownHosts=t,o}(t);case 655410:return function(e){var t,r,n=0,o={replyCode:void 0,replyText:void 0,classId:void 0,methodId:void 0};return t=e.readUInt16BE(n),n+=2,o.replyCode=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.replyText=t,t=e.readUInt16BE(n),n+=2,o.classId=t,t=e.readUInt16BE(n),n+=2,o.methodId=t,o}(t);case 655411:case 655421:case 1310761:case 2621451:case 2621461:case 2621471:case 2621491:case 3276821:case 3276851:case 3932171:case 3932271:case 5898250:case 5898251:case 5898260:case 5898261:case 5898270:case 5898271:case 5570571:return{};case 655420:return function(e){var t,r,n=0,o={reason:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.reason=t,o}(t);case 1310730:return function(e){var t,r,n=0,o={outOfBand:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.outOfBand=t,o}(t);case 1310731:return function(e){var t,r,n=0,o={channelId:void 0};return r=e.readUInt32BE(n),n+=4,t=e.slice(n,n+r),n+=r,o.channelId=t,o}(t);case 1310740:return function(e){var t,r={active:void 0};return t=!!(1&e[0]),r.active=t,r}(t);case 1310741:return function(e){var t,r={active:void 0};return t=!!(1&e[0]),r.active=t,r}(t);case 1310760:return function(e){var t,r,n=0,o={replyCode:void 0,replyText:void 0,classId:void 0,methodId:void 0};return t=e.readUInt16BE(n),n+=2,o.replyCode=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.replyText=t,t=e.readUInt16BE(n),n+=2,o.classId=t,t=e.readUInt16BE(n),n+=2,o.methodId=t,o}(t);case 1966090:return function(e){var t,r,n=0,o={realm:void 0,exclusive:void 0,passive:void 0,active:void 0,write:void 0,read:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.realm=t,t=!!(1&e[n]),o.exclusive=t,t=!!(2&e[n]),o.passive=t,t=!!(4&e[n]),o.active=t,t=!!(8&e[n]),o.write=t,t=!!(16&e[n]),o.read=t,o}(t);case 1966091:return function(e){var t,r=0,n={ticket:void 0};return t=e.readUInt16BE(r),r+=2,n.ticket=t,n}(t);case 2621450:return function(e){var t,r,n=0,o={ticket:void 0,exchange:void 0,type:void 0,passive:void 0,durable:void 0,autoDelete:void 0,internal:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.type=t,t=!!(1&e[n]),o.passive=t,t=!!(2&e[n]),o.durable=t,t=!!(4&e[n]),o.autoDelete=t,t=!!(8&e[n]),o.internal=t,t=!!(16&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=V(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 2621460:return function(e){var t,r,n=0,o={ticket:void 0,exchange:void 0,ifUnused:void 0,nowait:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,t=!!(1&e[n]),o.ifUnused=t,t=!!(2&e[n]),o.nowait=t,o}(t);case 2621470:return function(e){var t,r,n=0,o={ticket:void 0,destination:void 0,source:void 0,routingKey:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.destination=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.source=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=!!(1&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=V(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 2621480:return function(e){var t,r,n=0,o={ticket:void 0,destination:void 0,source:void 0,routingKey:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.destination=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.source=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=!!(1&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=V(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3276810:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,passive:void 0,durable:void 0,exclusive:void 0,autoDelete:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=!!(1&e[n]),o.passive=t,t=!!(2&e[n]),o.durable=t,t=!!(4&e[n]),o.exclusive=t,t=!!(8&e[n]),o.autoDelete=t,t=!!(16&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=V(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3276811:return function(e){var t,r,n=0,o={queue:void 0,messageCount:void 0,consumerCount:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=e.readUInt32BE(n),n+=4,o.messageCount=t,t=e.readUInt32BE(n),n+=4,o.consumerCount=t,o}(t);case 3276820:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,exchange:void 0,routingKey:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=!!(1&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=V(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3276830:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,nowait:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=!!(1&e[n]),o.nowait=t,o}(t);case 3276831:return function(e){var t,r=0,n={messageCount:void 0};return t=e.readUInt32BE(r),r+=4,n.messageCount=t,n}(t);case 3276840:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,ifUnused:void 0,ifEmpty:void 0,nowait:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=!!(1&e[n]),o.ifUnused=t,t=!!(2&e[n]),o.ifEmpty=t,t=!!(4&e[n]),o.nowait=t,o}(t);case 3276841:return function(e){var t,r=0,n={messageCount:void 0};return t=e.readUInt32BE(r),r+=4,n.messageCount=t,n}(t);case 3276850:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,exchange:void 0,routingKey:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,r=e.readUInt32BE(n),n+=4,t=V(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3932170:return function(e){var t,r=0,n={prefetchSize:void 0,prefetchCount:void 0,global:void 0};return t=e.readUInt32BE(r),r+=4,n.prefetchSize=t,t=e.readUInt16BE(r),r+=2,n.prefetchCount=t,t=!!(1&e[r]),n.global=t,n}(t);case 3932180:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,consumerTag:void 0,noLocal:void 0,noAck:void 0,exclusive:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,t=!!(1&e[n]),o.noLocal=t,t=!!(2&e[n]),o.noAck=t,t=!!(4&e[n]),o.exclusive=t,t=!!(8&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=V(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3932181:return function(e){var t,r,n=0,o={consumerTag:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,o}(t);case 3932190:return function(e){var t,r,n=0,o={consumerTag:void 0,nowait:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,t=!!(1&e[n]),o.nowait=t,o}(t);case 3932191:return function(e){var t,r,n=0,o={consumerTag:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,o}(t);case 3932200:return function(e){var t,r,n=0,o={ticket:void 0,exchange:void 0,routingKey:void 0,mandatory:void 0,immediate:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=!!(1&e[n]),o.mandatory=t,t=!!(2&e[n]),o.immediate=t,o}(t);case 3932210:return function(e){var t,r,n=0,o={replyCode:void 0,replyText:void 0,exchange:void 0,routingKey:void 0};return t=e.readUInt16BE(n),n+=2,o.replyCode=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.replyText=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,o}(t);case 3932220:return function(e){var t,r,n=0,o={consumerTag:void 0,deliveryTag:void 0,redelivered:void 0,exchange:void 0,routingKey:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,t=K.readUInt64BE(e,n),n+=8,o.deliveryTag=t,t=!!(1&e[n]),o.redelivered=t,n++,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,o}(t);case 3932230:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,noAck:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=!!(1&e[n]),o.noAck=t,o}(t);case 3932231:return function(e){var t,r,n=0,o={deliveryTag:void 0,redelivered:void 0,exchange:void 0,routingKey:void 0,messageCount:void 0};return t=K.readUInt64BE(e,n),n+=8,o.deliveryTag=t,t=!!(1&e[n]),o.redelivered=t,n++,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=e.readUInt32BE(n),n+=4,o.messageCount=t,o}(t);case 3932232:return function(e){var t,r,n=0,o={clusterId:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.clusterId=t,o}(t);case 3932240:return function(e){var t,r=0,n={deliveryTag:void 0,multiple:void 0};return t=K.readUInt64BE(e,r),r+=8,n.deliveryTag=t,t=!!(1&e[r]),n.multiple=t,n}(t);case 3932250:return function(e){var t,r=0,n={deliveryTag:void 0,requeue:void 0};return t=K.readUInt64BE(e,r),r+=8,n.deliveryTag=t,t=!!(1&e[r]),n.requeue=t,n}(t);case 3932260:return function(e){var t,r={requeue:void 0};return t=!!(1&e[0]),r.requeue=t,r}(t);case 3932270:return function(e){var t,r={requeue:void 0};return t=!!(1&e[0]),r.requeue=t,r}(t);case 3932280:return function(e){var t,r=0,n={deliveryTag:void 0,multiple:void 0,requeue:void 0};return t=K.readUInt64BE(e,r),r+=8,n.deliveryTag=t,t=!!(1&e[r]),n.multiple=t,t=!!(2&e[r]),n.requeue=t,n}(t);case 5570570:return function(e){var t,r={nowait:void 0};return t=!!(1&e[0]),r.nowait=t,r}(t);case 60:return function(e){var t,r,n,o=2;if(0===(t=e.readUInt16BE(0)))return{};var i={contentType:void 0,contentEncoding:void 0,headers:void 0,deliveryMode:void 0,priority:void 0,correlationId:void 0,replyTo:void 0,expiration:void 0,messageId:void 0,timestamp:void 0,type:void 0,userId:void 0,appId:void 0,clusterId:void 0};return 32768&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.contentType=r),16384&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.contentEncoding=r),8192&t&&(n=e.readUInt32BE(o),o+=4,r=V(e.slice(o,o+n)),o+=n,i.headers=r),4096&t&&(r=e[o],o++,i.deliveryMode=r),2048&t&&(r=e[o],o++,i.priority=r),1024&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.correlationId=r),512&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.replyTo=r),256&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.expiration=r),128&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.messageId=r),64&t&&(r=K.readUInt64BE(e,o),o+=8,i.timestamp=r),32&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.type=r),16&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.userId=r),8&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.appId=r),4&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.clusterId=r),i}(t);default:throw new Error("Unknown class/method ID")}
1
+ import e from"querystring";import t from"tty";import r from"util";import n from"os";import o from"buffer";import i from"assert";import s from"stream";import a from"events";import u from"string_decoder/";import c from"net";import l from"tls";import f from"http";import h from"https";import d from"url";import p from"zlib";var g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},m={},b={},v=Object.prototype.hasOwnProperty;function y(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function w(e){try{return encodeURIComponent(e)}catch(e){return null}}b.stringify=function(e,t){t=t||"";var r,n,o=[];for(n in"string"!=typeof t&&(t="?"),e)if(v.call(e,n)){if((r=e[n])||null!=r&&!isNaN(r)||(r=""),n=w(n),r=w(r),null===n||null===r)continue;o.push(n+"="+r)}return o.length?t+o.join("&"):""},b.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,n={};t=r.exec(e);){var o=y(t[1]),i=y(t[2]);null===o||null===i||o in n||(n[o]=i)}return n};var E=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e},I=b,C=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,B=/[\n\r\t]/g,x=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,T=/:\d+$/,U=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,k=/^[a-zA-Z]:/;function O(e){return(e||"").toString().replace(C,"")}var S=[["#","hash"],["?","query"],function(e,t){return A(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],_={hash:1,query:1};function N(e){var t,r=("undefined"!=typeof window?window:void 0!==g?g:"undefined"!=typeof self?self:{}).location||{},n={},o=typeof(e=e||r);if("blob:"===e.protocol)n=new L(unescape(e.pathname),{});else if("string"===o)for(t in n=new L(e,{}),_)delete n[t];else if("object"===o){for(t in e)t in _||(n[t]=e[t]);void 0===n.slashes&&(n.slashes=x.test(e.href))}return n}function A(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function R(e,t){e=(e=O(e)).replace(B,""),t=t||{};var r,n=U.exec(e),o=n[1]?n[1].toLowerCase():"",i=!!n[2],s=!!n[3],a=0;return i?s?(r=n[2]+n[3]+n[4],a=n[2].length+n[3].length):(r=n[2]+n[4],a=n[2].length):s?(r=n[3]+n[4],a=n[3].length):r=n[4],"file:"===o?a>=2&&(r=r.slice(2)):A(o)?r=n[4]:o?i&&(r=r.slice(2)):a>=2&&A(t.protocol)&&(r=n[4]),{protocol:o,slashes:i||A(o),slashesCount:a,rest:r}}function L(e,t,r){if(e=(e=O(e)).replace(B,""),!(this instanceof L))return new L(e,t,r);var n,o,i,s,a,u,c=S.slice(),l=typeof t,f=this,h=0;for("object"!==l&&"string"!==l&&(r=t,t=null),r&&"function"!=typeof r&&(r=I.parse),n=!(o=R(e||"",t=N(t))).protocol&&!o.slashes,f.slashes=o.slashes||n&&t.slashes,f.protocol=o.protocol||t.protocol||"",e=o.rest,("file:"===o.protocol&&(2!==o.slashesCount||k.test(e))||!o.slashes&&(o.protocol||o.slashesCount<2||!A(f.protocol)))&&(c[3]=[/(.*)/,"pathname"]);h<c.length;h++)"function"!=typeof(s=c[h])?(i=s[0],u=s[1],i!=i?f[u]=e:"string"==typeof i?~(a="@"===i?e.lastIndexOf(i):e.indexOf(i))&&("number"==typeof s[2]?(f[u]=e.slice(0,a),e=e.slice(a+s[2])):(f[u]=e.slice(a),e=e.slice(0,a))):(a=i.exec(e))&&(f[u]=a[1],e=e.slice(0,a.index)),f[u]=f[u]||n&&s[3]&&t[u]||"",s[4]&&(f[u]=f[u].toLowerCase())):e=s(e,f);r&&(f.query=r(f.query)),n&&t.slashes&&"/"!==f.pathname.charAt(0)&&(""!==f.pathname||""!==t.pathname)&&(f.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],i=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(i=!0),r.splice(n,1),s--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(f.pathname,t.pathname)),"/"!==f.pathname.charAt(0)&&A(f.protocol)&&(f.pathname="/"+f.pathname),E(f.port,f.protocol)||(f.host=f.hostname,f.port=""),f.username=f.password="",f.auth&&(~(a=f.auth.indexOf(":"))?(f.username=f.auth.slice(0,a),f.username=encodeURIComponent(decodeURIComponent(f.username)),f.password=f.auth.slice(a+1),f.password=encodeURIComponent(decodeURIComponent(f.password))):f.username=encodeURIComponent(decodeURIComponent(f.auth)),f.auth=f.password?f.username+":"+f.password:f.username),f.origin="file:"!==f.protocol&&A(f.protocol)&&f.host?f.protocol+"//"+f.host:"null",f.href=f.toString()}L.prototype={set:function(e,t,r){var n=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||I.parse)(t)),n[e]=t;break;case"port":n[e]=t,E(t,n.protocol)?t&&(n.host=n.hostname+":"+t):(n.host=n.hostname,n[e]="");break;case"hostname":n[e]=t,n.port&&(t+=":"+n.port),n.host=t;break;case"host":n[e]=t,T.test(t)?(t=t.split(":"),n.port=t.pop(),n.hostname=t.join(":")):(n.hostname=t,n.port="");break;case"protocol":n.protocol=t.toLowerCase(),n.slashes=!r;break;case"pathname":case"hash":if(t){var o="pathname"===e?"/":"#";n[e]=t.charAt(0)!==o?o+t:t}else n[e]=t;break;case"username":case"password":n[e]=encodeURIComponent(t);break;case"auth":var i=t.indexOf(":");~i?(n.username=t.slice(0,i),n.username=encodeURIComponent(decodeURIComponent(n.username)),n.password=t.slice(i+1),n.password=encodeURIComponent(decodeURIComponent(n.password))):n.username=encodeURIComponent(decodeURIComponent(t))}for(var s=0;s<S.length;s++){var a=S[s];a[4]&&(n[a[1]]=n[a[1]].toLowerCase())}return n.auth=n.password?n.username+":"+n.password:n.username,n.origin="file:"!==n.protocol&&A(n.protocol)&&n.host?n.protocol+"//"+n.host:"null",n.href=n.toString(),n},toString:function(e){e&&"function"==typeof e||(e=I.stringify);var t,r=this,n=r.host,o=r.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var i=o+(r.protocol&&r.slashes||A(r.protocol)?"//":"");return r.username?(i+=r.username,r.password&&(i+=":"+r.password),i+="@"):r.password?(i+=":"+r.password,i+="@"):"file:"!==r.protocol&&A(r.protocol)&&!n&&"/"!==r.pathname&&(i+="@"),(":"===n[n.length-1]||T.test(r.hostname)&&!r.port)&&(n+=":"),i+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(i+=r.hash),i}},L.extractProtocol=R,L.location=N,L.trimLeft=O,L.qs=I;var M=L,F={},j={},P={},D={exports:{}};!function(e){var t=4294967296,r=1/t,n=9007199254740991;function o(e){return e<=n&&e>=-n}function i(e,t,r){if("number"!=typeof(e=+e)||e<t||e>r||Math.floor(e)!==e)throw new TypeError('"value" argument is out of bounds');return e}function s(e,t,r){if(t<0||t+r>e.length)throw new RangeError("Index out of range")}e.exports.isContiguousInt=o,e.exports.assertContiguousInt=function(e){if(!o(e))throw new TypeError("number cannot be represented as a contiguous integer")},["UInt","Int"].forEach((function(t){var r=t+"8";e.exports["read"+r]=Buffer.prototype["read"+r].call,e.exports["write"+r]=Buffer.prototype["write"+r].call,["16","32"].forEach((function(r){["LE","BE"].forEach((function(n){var o=t+r+n,i=Buffer.prototype["read"+o];e.exports["read"+o]=function(e,t){return i.call(e,t)};var s=Buffer.prototype["write"+o];e.exports["write"+o]=function(e,t,r){return s.call(e,t,r)}}))}))})),e.exports.readUInt24BE=function(e,t){return e.readUInt8(t)<<16|e.readUInt16BE(t+1)},e.exports.writeUInt24BE=function(e,t,r){t=i(t,0,16777215),s(e,r,3),e.writeUInt8(t>>>16,r),e.writeUInt16BE(65535&t,r+1)},e.exports.readUInt40BE=function(e,r){return(e.readUInt8(r)||0)*t+e.readUInt32BE(r+1)},e.exports.writeUInt40BE=function(e,t,n){t=i(t,0,0xffffffffff),s(e,n,5),e.writeUInt8(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+1)},e.exports.readUInt48BE=function(e,r){return e.readUInt16BE(r)*t+e.readUInt32BE(r+2)},e.exports.writeUInt48BE=function(e,t,n){t=i(t,0,0xffffffffffff),s(e,n,6),e.writeUInt16BE(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+2)},e.exports.readUInt56BE=function(e,r){return((e.readUInt8(r)||0)<<16|e.readUInt16BE(r+1))*t+e.readUInt32BE(r+3)},e.exports.writeUInt56BE=function(e,t,n){if(t=i(t,0,72057594037927940),s(e,n,7),t<72057594037927940){var o=Math.floor(t*r);e.writeUInt8(o>>>16,n),e.writeUInt16BE(65535&o,n+1),e.writeInt32BE(-1&t,n+3)}else e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255},e.exports.readUInt64BE=function(e,r){return e.readUInt32BE(r)*t+e.readUInt32BE(r+4)},e.exports.writeUInt64BE=function(e,t,n){t=i(t,0,0x10000000000000000),s(e,n,8),t<0x10000000000000000?(e.writeUInt32BE(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+4)):(e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255,e[n+7]=255)},e.exports.readUInt24LE=function(e,t){return e.readUInt8(t+2)<<16|e.readUInt16LE(t)},e.exports.writeUInt24LE=function(e,t,r){t=i(t,0,16777215),s(e,r,3),e.writeUInt16LE(65535&t,r),e.writeUInt8(t>>>16,r+2)},e.exports.readUInt40LE=function(e,r){return(e.readUInt8(r+4)||0)*t+e.readUInt32LE(r)},e.exports.writeUInt40LE=function(e,t,n){t=i(t,0,0xffffffffff),s(e,n,5),e.writeInt32LE(-1&t,n),e.writeUInt8(Math.floor(t*r),n+4)},e.exports.readUInt48LE=function(e,r){return e.readUInt16LE(r+4)*t+e.readUInt32LE(r)},e.exports.writeUInt48LE=function(e,t,n){t=i(t,0,0xffffffffffff),s(e,n,6),e.writeInt32LE(-1&t,n),e.writeUInt16LE(Math.floor(t*r),n+4)},e.exports.readUInt56LE=function(e,r){return((e.readUInt8(r+6)||0)<<16|e.readUInt16LE(r+4))*t+e.readUInt32LE(r)},e.exports.writeUInt56LE=function(e,t,n){if(t=i(t,0,72057594037927940),s(e,n,7),t<72057594037927940){e.writeInt32LE(-1&t,n);var o=Math.floor(t*r);e.writeUInt16LE(65535&o,n+4),e.writeUInt8(o>>>16,n+6)}else e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255},e.exports.readUInt64LE=function(e,r){return e.readUInt32LE(r+4)*t+e.readUInt32LE(r)},e.exports.writeUInt64LE=function(e,t,n){t=i(t,0,0x10000000000000000),s(e,n,8),t<0x10000000000000000?(e.writeInt32LE(-1&t,n),e.writeUInt32LE(Math.floor(t*r),n+4)):(e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255,e[n+7]=255)},e.exports.readInt24BE=function(e,t){return(e.readInt8(t)<<16)+e.readUInt16BE(t+1)},e.exports.writeInt24BE=function(e,t,r){t=i(t,-8388608,8388607),s(e,r,3),e.writeInt8(t>>16,r),e.writeUInt16BE(65535&t,r+1)},e.exports.readInt40BE=function(e,r){return(e.readInt8(r)||0)*t+e.readUInt32BE(r+1)},e.exports.writeInt40BE=function(e,t,n){t=i(t,-549755813888,549755813887),s(e,n,5),e.writeInt8(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+1)},e.exports.readInt48BE=function(e,r){return e.readInt16BE(r)*t+e.readUInt32BE(r+2)},e.exports.writeInt48BE=function(e,t,n){t=i(t,-0x800000000000,0x7fffffffffff),s(e,n,6),e.writeInt16BE(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+2)},e.exports.readInt56BE=function(e,r){return(((e.readInt8(r)||0)<<16)+e.readUInt16BE(r+1))*t+e.readUInt32BE(r+3)},e.exports.writeInt56BE=function(e,t,n){if(t=i(t,-0x800000000000000,0x80000000000000),s(e,n,7),t<0x80000000000000){var o=Math.floor(t*r);e.writeInt8(o>>16,n),e.writeUInt16BE(65535&o,n+1),e.writeInt32BE(-1&t,n+3)}else e[n]=127,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255},e.exports.readInt64BE=function(e,r){return e.readInt32BE(r)*t+e.readUInt32BE(r+4)},e.exports.writeInt64BE=function(e,t,n){t=i(t,-23611832414348226e5,0x8000000000000000),s(e,n,8),t<0x8000000000000000?(e.writeInt32BE(Math.floor(t*r),n),e.writeInt32BE(-1&t,n+4)):(e[n]=127,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255,e[n+7]=255)},e.exports.readInt24LE=function(e,t){return(e.readInt8(t+2)<<16)+e.readUInt16LE(t)},e.exports.writeInt24LE=function(e,t,r){t=i(t,-8388608,8388607),s(e,r,3),e.writeUInt16LE(65535&t,r),e.writeInt8(t>>16,r+2)},e.exports.readInt40LE=function(e,r){return(e.readInt8(r+4)||0)*t+e.readUInt32LE(r)},e.exports.writeInt40LE=function(e,t,n){t=i(t,-549755813888,549755813887),s(e,n,5),e.writeInt32LE(-1&t,n),e.writeInt8(Math.floor(t*r),n+4)},e.exports.readInt48LE=function(e,r){return e.readInt16LE(r+4)*t+e.readUInt32LE(r)},e.exports.writeInt48LE=function(e,t,n){t=i(t,-0x800000000000,0x7fffffffffff),s(e,n,6),e.writeInt32LE(-1&t,n),e.writeInt16LE(Math.floor(t*r),n+4)},e.exports.readInt56LE=function(e,r){return(((e.readInt8(r+6)||0)<<16)+e.readUInt16LE(r+4))*t+e.readUInt32LE(r)},e.exports.writeInt56LE=function(e,t,n){if(t=i(t,-0x80000000000000,0x80000000000000),s(e,n,7),t<0x80000000000000){e.writeInt32LE(-1&t,n);var o=Math.floor(t*r);e.writeUInt16LE(65535&o,n+4),e.writeInt8(o>>16,n+6)}else e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=127},e.exports.readInt64LE=function(e,r){return e.readInt32LE(r+4)*t+e.readUInt32LE(r)},e.exports.writeInt64LE=function(e,t,n){t=i(t,-0x8000000000000000,0x8000000000000000),s(e,n,8),t<0x8000000000000000?(e.writeInt32LE(-1&t,n),e.writeInt32LE(Math.floor(t*r),n+4)):(e[n]=255,e[n+1]=255,e[n+2]=255,e[n+3]=255,e[n+4]=255,e[n+5]=255,e[n+6]=255,e[n+7]=127)}}(D);var q=D.exports;function H(e,t,r){var n=r;for(var o in r+=4,t)if(void 0!==t[o]){var i=Buffer.byteLength(o);e.writeUInt8(i,r),r++,e.write(o,r,"utf8"),r+=i,r+=$(e,t[o],r)}var s=r-n;return e.writeUInt32BE(s-4,n),s}function $(e,t,r){var n=r,o=typeof t,i=t;function s(t){e.write(t,r),r++}switch(t&&"object"===o&&t.hasOwnProperty("!")&&(i=t.value,o=t["!"]),"number"==o&&(o=function(e){return e>=0x8000000000000000||Math.abs(e)<0x4000000000000&&Math.floor(e)!==e}(i)?"double":i<128&&i>=-128?"byte":i>=-32768&&i<32768?"short":i>=-2147483648&&i<2147483648?"int":"long"),o){case"string":var a=Buffer.byteLength(i,"utf8");s("S"),e.writeUInt32BE(a,r),r+=4,e.write(i,r,"utf8"),r+=a;break;case"object":null===i?s("V"):Array.isArray(i)?(s("A"),r+=function(e,t,r){var n=r;r+=4;for(var o=0,i=t.length;o<i;o++)r+=$(e,t[o],r);var s=r-n;return e.writeUInt32BE(s-4,n),s}(e,i,r)):Buffer.isBuffer(i)?(s("x"),e.writeUInt32BE(i.length,r),r+=4,i.copy(e,r),r+=i.length):(s("F"),r+=H(e,i,r));break;case"boolean":s("t"),e.writeUInt8(i?1:0,r),r++;break;case"double":case"float64":s("d"),e.writeDoubleBE(i,r),r+=8;break;case"byte":case"int8":s("b"),e.writeInt8(i,r),r++;break;case"short":case"int16":s("s"),e.writeInt16BE(i,r),r+=2;break;case"int":case"int32":s("I"),e.writeInt32BE(i,r),r+=4;break;case"long":case"int64":s("l"),q.writeInt64BE(e,i,r),r+=8;break;case"timestamp":s("T"),q.writeUInt64BE(e,i,r),r+=8;break;case"float":s("f"),e.writeFloatBE(i,r),r+=4;break;case"decimal":if(s("D"),!(i.hasOwnProperty("places")&&i.hasOwnProperty("digits")&&i.places>=0&&i.places<256))throw new TypeError("Decimal value must be {'places': 0..255, 'digits': uint32}, got "+JSON.stringify(i));e[r]=i.places,r++,e.writeUInt32BE(i.digits,r),r+=4;break;default:throw new TypeError("Unknown type to encode: "+o)}return r-n}P.encodeTable=H,P.decodeFields=function e(t){var r,n,o,i={},s=0,a=t.length;function u(){var n=String.fromCharCode(t[s]);switch(s++,n){case"b":o=t.readInt8(s),s++;break;case"S":r=t.readUInt32BE(s),s+=4,o=t.toString("utf8",s,s+r),s+=r;break;case"I":o=t.readInt32BE(s),s+=4;break;case"D":var i=t[s];s++;var a=t.readUInt32BE(s);s+=4,o={"!":"decimal",value:{places:i,digits:a}};break;case"T":o=q.readUInt64BE(t,s),s+=8,o={"!":"timestamp",value:o};break;case"F":r=t.readUInt32BE(s),s+=4,o=e(t.slice(s,s+r)),s+=r;break;case"A":r=t.readUInt32BE(s),function(e){var t=[];for(;s<e;)u(),t.push(o);o=t}((s+=4)+r);break;case"d":o=t.readDoubleBE(s),s+=8;break;case"f":o=t.readFloatBE(s),s+=4;break;case"l":o=q.readInt64BE(t,s),s+=8;break;case"s":o=t.readInt16BE(s),s+=2;break;case"t":o=0!=t[s],s++;break;case"V":o=null;break;case"x":r=t.readUInt32BE(s),s+=4,o=t.slice(s,s+r),s+=r;break;default:throw new TypeError('Unexpected type tag "'+n+'"')}}for(;s<a;)r=t.readUInt8(s),s++,n=t.toString("utf8",s,s+r),s+=r,u(),i[n]=o;return i};var z=P,K=D.exports,V=z.encodeTable,G=z.decodeFields,Q=Buffer.alloc(65536);Object.freeze({}),j.constants={FRAME_METHOD:1,FRAME_HEADER:2,FRAME_BODY:3,FRAME_HEARTBEAT:8,FRAME_MIN_SIZE:4096,FRAME_END:206,REPLY_SUCCESS:200,CONTENT_TOO_LARGE:311,NO_ROUTE:312,NO_CONSUMERS:313,ACCESS_REFUSED:403,NOT_FOUND:404,RESOURCE_LOCKED:405,PRECONDITION_FAILED:406,CONNECTION_FORCED:320,INVALID_PATH:402,FRAME_ERROR:501,SYNTAX_ERROR:502,COMMAND_INVALID:503,CHANNEL_ERROR:504,UNEXPECTED_FRAME:505,RESOURCE_ERROR:506,NOT_ALLOWED:530,NOT_IMPLEMENTED:540,INTERNAL_ERROR:541},j.constant_strs={1:"FRAME-METHOD",2:"FRAME-HEADER",3:"FRAME-BODY",8:"FRAME-HEARTBEAT",200:"REPLY-SUCCESS",206:"FRAME-END",311:"CONTENT-TOO-LARGE",312:"NO-ROUTE",313:"NO-CONSUMERS",320:"CONNECTION-FORCED",402:"INVALID-PATH",403:"ACCESS-REFUSED",404:"NOT-FOUND",405:"RESOURCE-LOCKED",406:"PRECONDITION-FAILED",501:"FRAME-ERROR",502:"SYNTAX-ERROR",503:"COMMAND-INVALID",504:"CHANNEL-ERROR",505:"UNEXPECTED-FRAME",506:"RESOURCE-ERROR",530:"NOT-ALLOWED",540:"NOT-IMPLEMENTED",541:"INTERNAL-ERROR",4096:"FRAME-MIN-SIZE"},j.FRAME_OVERHEAD=8,j.decode=function(e,t){switch(e){case 655370:return s={versionMajor:void 0,versionMinor:void 0,serverProperties:void 0,mechanisms:void 0,locales:void 0},n=(r=t)[i=0],i++,s.versionMajor=n,n=r[i],i++,s.versionMinor=n,o=r.readUInt32BE(i),i+=4,n=G(r.slice(i,i+o)),i+=o,s.serverProperties=n,o=r.readUInt32BE(i),i+=4,n=r.slice(i,i+o),i+=o,s.mechanisms=n,o=r.readUInt32BE(i),i+=4,n=r.slice(i,i+o),i+=o,s.locales=n,s;case 655371:return function(e){var t,r,n=0,o={clientProperties:void 0,mechanism:void 0,response:void 0,locale:void 0};return r=e.readUInt32BE(n),n+=4,t=G(e.slice(n,n+r)),n+=r,o.clientProperties=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.mechanism=t,r=e.readUInt32BE(n),n+=4,t=e.slice(n,n+r),n+=r,o.response=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.locale=t,o}(t);case 655380:return function(e){var t,r,n=0,o={challenge:void 0};return r=e.readUInt32BE(n),n+=4,t=e.slice(n,n+r),n+=r,o.challenge=t,o}(t);case 655381:return function(e){var t,r,n=0,o={response:void 0};return r=e.readUInt32BE(n),n+=4,t=e.slice(n,n+r),n+=r,o.response=t,o}(t);case 655390:return function(e){var t,r=0,n={channelMax:void 0,frameMax:void 0,heartbeat:void 0};return t=e.readUInt16BE(r),r+=2,n.channelMax=t,t=e.readUInt32BE(r),r+=4,n.frameMax=t,t=e.readUInt16BE(r),r+=2,n.heartbeat=t,n}(t);case 655391:return function(e){var t,r=0,n={channelMax:void 0,frameMax:void 0,heartbeat:void 0};return t=e.readUInt16BE(r),r+=2,n.channelMax=t,t=e.readUInt32BE(r),r+=4,n.frameMax=t,t=e.readUInt16BE(r),r+=2,n.heartbeat=t,n}(t);case 655400:return function(e){var t,r,n=0,o={virtualHost:void 0,capabilities:void 0,insist:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.virtualHost=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.capabilities=t,t=!!(1&e[n]),o.insist=t,o}(t);case 655401:return function(e){var t,r,n=0,o={knownHosts:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.knownHosts=t,o}(t);case 655410:return function(e){var t,r,n=0,o={replyCode:void 0,replyText:void 0,classId:void 0,methodId:void 0};return t=e.readUInt16BE(n),n+=2,o.replyCode=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.replyText=t,t=e.readUInt16BE(n),n+=2,o.classId=t,t=e.readUInt16BE(n),n+=2,o.methodId=t,o}(t);case 655411:case 655421:case 1310761:case 2621451:case 2621461:case 2621471:case 2621491:case 3276821:case 3276851:case 3932171:case 3932271:case 5898250:case 5898251:case 5898260:case 5898261:case 5898270:case 5898271:case 5570571:return{};case 655420:return function(e){var t,r,n=0,o={reason:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.reason=t,o}(t);case 1310730:return function(e){var t,r,n=0,o={outOfBand:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.outOfBand=t,o}(t);case 1310731:return function(e){var t,r,n=0,o={channelId:void 0};return r=e.readUInt32BE(n),n+=4,t=e.slice(n,n+r),n+=r,o.channelId=t,o}(t);case 1310740:return function(e){var t,r={active:void 0};return t=!!(1&e[0]),r.active=t,r}(t);case 1310741:return function(e){var t,r={active:void 0};return t=!!(1&e[0]),r.active=t,r}(t);case 1310760:return function(e){var t,r,n=0,o={replyCode:void 0,replyText:void 0,classId:void 0,methodId:void 0};return t=e.readUInt16BE(n),n+=2,o.replyCode=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.replyText=t,t=e.readUInt16BE(n),n+=2,o.classId=t,t=e.readUInt16BE(n),n+=2,o.methodId=t,o}(t);case 1966090:return function(e){var t,r,n=0,o={realm:void 0,exclusive:void 0,passive:void 0,active:void 0,write:void 0,read:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.realm=t,t=!!(1&e[n]),o.exclusive=t,t=!!(2&e[n]),o.passive=t,t=!!(4&e[n]),o.active=t,t=!!(8&e[n]),o.write=t,t=!!(16&e[n]),o.read=t,o}(t);case 1966091:return function(e){var t,r=0,n={ticket:void 0};return t=e.readUInt16BE(r),r+=2,n.ticket=t,n}(t);case 2621450:return function(e){var t,r,n=0,o={ticket:void 0,exchange:void 0,type:void 0,passive:void 0,durable:void 0,autoDelete:void 0,internal:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.type=t,t=!!(1&e[n]),o.passive=t,t=!!(2&e[n]),o.durable=t,t=!!(4&e[n]),o.autoDelete=t,t=!!(8&e[n]),o.internal=t,t=!!(16&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=G(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 2621460:return function(e){var t,r,n=0,o={ticket:void 0,exchange:void 0,ifUnused:void 0,nowait:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,t=!!(1&e[n]),o.ifUnused=t,t=!!(2&e[n]),o.nowait=t,o}(t);case 2621470:return function(e){var t,r,n=0,o={ticket:void 0,destination:void 0,source:void 0,routingKey:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.destination=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.source=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=!!(1&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=G(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 2621480:return function(e){var t,r,n=0,o={ticket:void 0,destination:void 0,source:void 0,routingKey:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.destination=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.source=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=!!(1&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=G(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3276810:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,passive:void 0,durable:void 0,exclusive:void 0,autoDelete:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=!!(1&e[n]),o.passive=t,t=!!(2&e[n]),o.durable=t,t=!!(4&e[n]),o.exclusive=t,t=!!(8&e[n]),o.autoDelete=t,t=!!(16&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=G(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3276811:return function(e){var t,r,n=0,o={queue:void 0,messageCount:void 0,consumerCount:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=e.readUInt32BE(n),n+=4,o.messageCount=t,t=e.readUInt32BE(n),n+=4,o.consumerCount=t,o}(t);case 3276820:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,exchange:void 0,routingKey:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=!!(1&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=G(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3276830:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,nowait:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=!!(1&e[n]),o.nowait=t,o}(t);case 3276831:return function(e){var t,r=0,n={messageCount:void 0};return t=e.readUInt32BE(r),r+=4,n.messageCount=t,n}(t);case 3276840:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,ifUnused:void 0,ifEmpty:void 0,nowait:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=!!(1&e[n]),o.ifUnused=t,t=!!(2&e[n]),o.ifEmpty=t,t=!!(4&e[n]),o.nowait=t,o}(t);case 3276841:return function(e){var t,r=0,n={messageCount:void 0};return t=e.readUInt32BE(r),r+=4,n.messageCount=t,n}(t);case 3276850:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,exchange:void 0,routingKey:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,r=e.readUInt32BE(n),n+=4,t=G(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3932170:return function(e){var t,r=0,n={prefetchSize:void 0,prefetchCount:void 0,global:void 0};return t=e.readUInt32BE(r),r+=4,n.prefetchSize=t,t=e.readUInt16BE(r),r+=2,n.prefetchCount=t,t=!!(1&e[r]),n.global=t,n}(t);case 3932180:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,consumerTag:void 0,noLocal:void 0,noAck:void 0,exclusive:void 0,nowait:void 0,arguments:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,t=!!(1&e[n]),o.noLocal=t,t=!!(2&e[n]),o.noAck=t,t=!!(4&e[n]),o.exclusive=t,t=!!(8&e[n]),o.nowait=t,n++,r=e.readUInt32BE(n),n+=4,t=G(e.slice(n,n+r)),n+=r,o.arguments=t,o}(t);case 3932181:return function(e){var t,r,n=0,o={consumerTag:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,o}(t);case 3932190:return function(e){var t,r,n=0,o={consumerTag:void 0,nowait:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,t=!!(1&e[n]),o.nowait=t,o}(t);case 3932191:return function(e){var t,r,n=0,o={consumerTag:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,o}(t);case 3932200:return function(e){var t,r,n=0,o={ticket:void 0,exchange:void 0,routingKey:void 0,mandatory:void 0,immediate:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=!!(1&e[n]),o.mandatory=t,t=!!(2&e[n]),o.immediate=t,o}(t);case 3932210:return function(e){var t,r,n=0,o={replyCode:void 0,replyText:void 0,exchange:void 0,routingKey:void 0};return t=e.readUInt16BE(n),n+=2,o.replyCode=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.replyText=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,o}(t);case 3932220:return function(e){var t,r,n=0,o={consumerTag:void 0,deliveryTag:void 0,redelivered:void 0,exchange:void 0,routingKey:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.consumerTag=t,t=K.readUInt64BE(e,n),n+=8,o.deliveryTag=t,t=!!(1&e[n]),o.redelivered=t,n++,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,o}(t);case 3932230:return function(e){var t,r,n=0,o={ticket:void 0,queue:void 0,noAck:void 0};return t=e.readUInt16BE(n),n+=2,o.ticket=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.queue=t,t=!!(1&e[n]),o.noAck=t,o}(t);case 3932231:return function(e){var t,r,n=0,o={deliveryTag:void 0,redelivered:void 0,exchange:void 0,routingKey:void 0,messageCount:void 0};return t=K.readUInt64BE(e,n),n+=8,o.deliveryTag=t,t=!!(1&e[n]),o.redelivered=t,n++,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.exchange=t,r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.routingKey=t,t=e.readUInt32BE(n),n+=4,o.messageCount=t,o}(t);case 3932232:return function(e){var t,r,n=0,o={clusterId:void 0};return r=e.readUInt8(n),n++,t=e.toString("utf8",n,n+r),n+=r,o.clusterId=t,o}(t);case 3932240:return function(e){var t,r=0,n={deliveryTag:void 0,multiple:void 0};return t=K.readUInt64BE(e,r),r+=8,n.deliveryTag=t,t=!!(1&e[r]),n.multiple=t,n}(t);case 3932250:return function(e){var t,r=0,n={deliveryTag:void 0,requeue:void 0};return t=K.readUInt64BE(e,r),r+=8,n.deliveryTag=t,t=!!(1&e[r]),n.requeue=t,n}(t);case 3932260:return function(e){var t,r={requeue:void 0};return t=!!(1&e[0]),r.requeue=t,r}(t);case 3932270:return function(e){var t,r={requeue:void 0};return t=!!(1&e[0]),r.requeue=t,r}(t);case 3932280:return function(e){var t,r=0,n={deliveryTag:void 0,multiple:void 0,requeue:void 0};return t=K.readUInt64BE(e,r),r+=8,n.deliveryTag=t,t=!!(1&e[r]),n.multiple=t,t=!!(2&e[r]),n.requeue=t,n}(t);case 5570570:return function(e){var t,r={nowait:void 0};return t=!!(1&e[0]),r.nowait=t,r}(t);case 60:return function(e){var t,r,n,o=2;if(0===(t=e.readUInt16BE(0)))return{};var i={contentType:void 0,contentEncoding:void 0,headers:void 0,deliveryMode:void 0,priority:void 0,correlationId:void 0,replyTo:void 0,expiration:void 0,messageId:void 0,timestamp:void 0,type:void 0,userId:void 0,appId:void 0,clusterId:void 0};return 32768&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.contentType=r),16384&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.contentEncoding=r),8192&t&&(n=e.readUInt32BE(o),o+=4,r=G(e.slice(o,o+n)),o+=n,i.headers=r),4096&t&&(r=e[o],o++,i.deliveryMode=r),2048&t&&(r=e[o],o++,i.priority=r),1024&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.correlationId=r),512&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.replyTo=r),256&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.expiration=r),128&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.messageId=r),64&t&&(r=K.readUInt64BE(e,o),o+=8,i.timestamp=r),32&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.type=r),16&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.userId=r),8&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.appId=r),4&t&&(n=e.readUInt8(o),o++,r=e.toString("utf8",o,o+n),o+=n,i.clusterId=r),i}(t);default:throw new Error("Unknown class/method ID")}
2
2
  /** @preserve This file is generated by the script
3
3
  * ../bin/generate-defs.js, which is not in general included in a
4
4
  * distribution, but is available in the source repository e.g. at
5
5
  * https://github.com/squaremo/amqp.node/
6
6
  */
7
- var r,n,o,i,s},j.encodeMethod=function(e,t,r){switch(e){case 655370:return function(e,t){var r,n=0,o=null,i=0,s=0;if(void 0===(o=t.serverProperties))throw new Error("Missing value for mandatory field 'serverProperties'");if("object"!=typeof o)throw new TypeError("Field 'serverProperties' is the wrong type; must be an object");r=G(Q,o,s);var a=Q.slice(s,s+r);if(s+=r,i+=a.length,void 0===(o=t.mechanisms))o=Buffer.from("PLAIN");else if(!Buffer.isBuffer(o))throw new TypeError("Field 'mechanisms' is the wrong type; must be a Buffer");if(i+=o.length,void 0===(o=t.locales))o=Buffer.from("en_US");else if(!Buffer.isBuffer(o))throw new TypeError("Field 'locales' is the wrong type; must be a Buffer");i+=o.length;var u=Buffer.alloc(22+i);if(u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(655370,7),n=11,void 0===(o=t.versionMajor))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'versionMajor' is the wrong type; must be a number (but not NaN)");if(u.writeUInt8(o,n),n++,void 0===(o=t.versionMinor))o=9;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'versionMinor' is the wrong type; must be a number (but not NaN)");return u.writeUInt8(o,n),n++,n+=a.copy(u,n),void 0===(o=t.mechanisms)&&(o=Buffer.from("PLAIN")),r=o.length,u.writeUInt32BE(r,n),n+=4,o.copy(u,n),n+=r,void 0===(o=t.locales)&&(o=Buffer.from("en_US")),r=o.length,u.writeUInt32BE(r,n),n+=4,o.copy(u,n),u[n+=r]=206,u.writeUInt32BE(n-7,3),u}(t,r);case 655371:return function(e,t){var r,n=0,o=null,i=0,s=0;if(void 0===(o=t.clientProperties))throw new Error("Missing value for mandatory field 'clientProperties'");if("object"!=typeof o)throw new TypeError("Field 'clientProperties' is the wrong type; must be an object");r=G(Q,o,s);var a=Q.slice(s,s+r);if(s+=r,i+=a.length,void 0===(o=t.mechanism))o="PLAIN";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'mechanism' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(i+=u,void 0===(o=t.response))throw new Error("Missing value for mandatory field 'response'");if(!Buffer.isBuffer(o))throw new TypeError("Field 'response' is the wrong type; must be a Buffer");if(i+=o.length,void 0===(o=t.locale))o="en_US";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'locale' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");i+=c;var l=Buffer.alloc(18+i);return l[0]=1,l.writeUInt16BE(e,1),l.writeUInt32BE(655371,7),n=11,n+=a.copy(l,n),void 0===(o=t.mechanism)&&(o="PLAIN"),l[n]=u,n++,l.write(o,n,"utf8"),n+=u,void 0===(o=t.response)&&(o=Buffer.from(void 0)),r=o.length,l.writeUInt32BE(r,n),n+=4,o.copy(l,n),n+=r,void 0===(o=t.locale)&&(o="en_US"),l[n]=c,n++,l.write(o,n,"utf8"),l[n+=c]=206,l.writeUInt32BE(n-7,3),l}(t,r);case 655380:return function(e,t){var r,n=0,o=null,i=0;if(void 0===(o=t.challenge))throw new Error("Missing value for mandatory field 'challenge'");if(!Buffer.isBuffer(o))throw new TypeError("Field 'challenge' is the wrong type; must be a Buffer");i+=o.length;var s=Buffer.alloc(16+i);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655380,7),n=11,void 0===(o=t.challenge)&&(o=Buffer.from(void 0)),r=o.length,s.writeUInt32BE(r,n),n+=4,o.copy(s,n),s[n+=r]=206,s.writeUInt32BE(n-7,3),s}(t,r);case 655381:return function(e,t){var r,n=0,o=null,i=0;if(void 0===(o=t.response))throw new Error("Missing value for mandatory field 'response'");if(!Buffer.isBuffer(o))throw new TypeError("Field 'response' is the wrong type; must be a Buffer");i+=o.length;var s=Buffer.alloc(16+i);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655381,7),n=11,void 0===(o=t.response)&&(o=Buffer.from(void 0)),r=o.length,s.writeUInt32BE(r,n),n+=4,o.copy(s,n),s[n+=r]=206,s.writeUInt32BE(n-7,3),s}(t,r);case 655390:return function(e,t){var r=0,n=null,o=Buffer.alloc(20);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(655390,7),r=11,void 0===(n=t.channelMax))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'channelMax' is the wrong type; must be a number (but not NaN)");if(o.writeUInt16BE(n,r),r+=2,void 0===(n=t.frameMax))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'frameMax' is the wrong type; must be a number (but not NaN)");if(o.writeUInt32BE(n,r),r+=4,void 0===(n=t.heartbeat))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'heartbeat' is the wrong type; must be a number (but not NaN)");return o.writeUInt16BE(n,r),o[r+=2]=206,o.writeUInt32BE(r-7,3),o}(t,r);case 655391:return function(e,t){var r=0,n=null,o=Buffer.alloc(20);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(655391,7),r=11,void 0===(n=t.channelMax))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'channelMax' is the wrong type; must be a number (but not NaN)");if(o.writeUInt16BE(n,r),r+=2,void 0===(n=t.frameMax))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'frameMax' is the wrong type; must be a number (but not NaN)");if(o.writeUInt32BE(n,r),r+=4,void 0===(n=t.heartbeat))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'heartbeat' is the wrong type; must be a number (but not NaN)");return o.writeUInt16BE(n,r),o[r+=2]=206,o.writeUInt32BE(r-7,3),o}(t,r);case 655400:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.virtualHost))n="/";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'virtualHost' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(i+=s,void 0===(n=t.capabilities))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'capabilities' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");i+=a;var u=Buffer.alloc(15+i);return u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(655400,7),r=11,void 0===(n=t.virtualHost)&&(n="/"),u[r]=s,r++,u.write(n,r,"utf8"),r+=s,void 0===(n=t.capabilities)&&(n=""),u[r]=a,r++,u.write(n,r,"utf8"),r+=a,void 0===(n=t.insist)&&(n=!1),n&&(o+=1),u[r]=o,u[++r]=206,u.writeUInt32BE(r-7,3),u}(t,r);case 655401:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.knownHosts))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'knownHosts' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655401,7),r=11,void 0===(n=t.knownHosts)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 655410:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.replyText))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'replyText' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(19+o);if(s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655410,7),r=11,void 0===(n=t.replyCode))throw new Error("Missing value for mandatory field 'replyCode'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'replyCode' is the wrong type; must be a number (but not NaN)");if(s.writeUInt16BE(n,r),r+=2,void 0===(n=t.replyText)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),r+=i,void 0===(n=t.classId))throw new Error("Missing value for mandatory field 'classId'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'classId' is the wrong type; must be a number (but not NaN)");if(s.writeUInt16BE(n,r),r+=2,void 0===(n=t.methodId))throw new Error("Missing value for mandatory field 'methodId'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'methodId' is the wrong type; must be a number (but not NaN)");return s.writeUInt16BE(n,r),s[r+=2]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 655411:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(655411,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 655420:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.reason))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'reason' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655420,7),r=11,void 0===(n=t.reason)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 655421:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(655421,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 1310730:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.outOfBand))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'outOfBand' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(1310730,7),r=11,void 0===(n=t.outOfBand)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 1310731:return function(e,t){var r,n=0,o=null,i=0;if(void 0===(o=t.channelId))o=Buffer.from("");else if(!Buffer.isBuffer(o))throw new TypeError("Field 'channelId' is the wrong type; must be a Buffer");i+=o.length;var s=Buffer.alloc(16+i);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(1310731,7),n=11,void 0===(o=t.channelId)&&(o=Buffer.from("")),r=o.length,s.writeUInt32BE(r,n),n+=4,o.copy(s,n),s[n+=r]=206,s.writeUInt32BE(n-7,3),s}(t,r);case 1310740:return function(e,t){var r,n=0,o=0,i=Buffer.alloc(13);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(1310740,7),n=11,void 0===(r=t.active))throw new Error("Missing value for mandatory field 'active'");return r&&(o+=1),i[n]=o,i[++n]=206,i.writeUInt32BE(n-7,3),i}(t,r);case 1310741:return function(e,t){var r,n=0,o=0,i=Buffer.alloc(13);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(1310741,7),n=11,void 0===(r=t.active))throw new Error("Missing value for mandatory field 'active'");return r&&(o+=1),i[n]=o,i[++n]=206,i.writeUInt32BE(n-7,3),i}(t,r);case 1310760:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.replyText))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'replyText' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(19+o);if(s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(1310760,7),r=11,void 0===(n=t.replyCode))throw new Error("Missing value for mandatory field 'replyCode'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'replyCode' is the wrong type; must be a number (but not NaN)");if(s.writeUInt16BE(n,r),r+=2,void 0===(n=t.replyText)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),r+=i,void 0===(n=t.classId))throw new Error("Missing value for mandatory field 'classId'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'classId' is the wrong type; must be a number (but not NaN)");if(s.writeUInt16BE(n,r),r+=2,void 0===(n=t.methodId))throw new Error("Missing value for mandatory field 'methodId'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'methodId' is the wrong type; must be a number (but not NaN)");return s.writeUInt16BE(n,r),s[r+=2]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 1310761:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(1310761,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 1966090:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.realm))n="/data";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'realm' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(14+i);return a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(1966090,7),r=11,void 0===(n=t.realm)&&(n="/data"),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.exclusive)&&(n=!1),n&&(o+=1),void 0===(n=t.passive)&&(n=!0),n&&(o+=2),void 0===(n=t.active)&&(n=!0),n&&(o+=4),void 0===(n=t.write)&&(n=!0),n&&(o+=8),void 0===(n=t.read)&&(n=!0),n&&(o+=16),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 1966091:return function(e,t){var r=0,n=null,o=Buffer.alloc(14);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(1966091,7),r=11,void 0===(n=t.ticket))n=1;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return o.writeUInt16BE(n,r),o[r+=2]=206,o.writeUInt32BE(r-7,3),o}(t,r);case 2621450:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.type))o="direct";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'type' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=G(Q,o,a);var l=Q.slice(a,a+r);a+=r,s+=l.length;var f=Buffer.alloc(17+s);if(f[0]=1,f.writeUInt16BE(e,1),f.writeUInt32BE(2621450,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return f.writeUInt16BE(o,n),n+=2,void 0===(o=t.exchange)&&(o=void 0),f[n]=u,n++,f.write(o,n,"utf8"),n+=u,void 0===(o=t.type)&&(o="direct"),f[n]=c,n++,f.write(o,n,"utf8"),n+=c,void 0===(o=t.passive)&&(o=!1),o&&(i+=1),void 0===(o=t.durable)&&(o=!1),o&&(i+=2),void 0===(o=t.autoDelete)&&(o=!1),o&&(i+=4),void 0===(o=t.internal)&&(o=!1),o&&(i+=8),void 0===(o=t.nowait)&&(o=!1),o&&(i+=16),f[n]=i,n++,i=0,f[n+=l.copy(f,n)]=206,f.writeUInt32BE(n-7,3),f}(t,r);case 2621451:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(2621451,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 2621460:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(16+i);if(a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(2621460,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return a.writeUInt16BE(n,r),r+=2,void 0===(n=t.exchange)&&(n=void 0),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.ifUnused)&&(n=!1),n&&(o+=1),void 0===(n=t.nowait)&&(n=!1),n&&(o+=2),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 2621461:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(2621461,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 2621470:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.destination))throw new Error("Missing value for mandatory field 'destination'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'destination' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.source))throw new Error("Missing value for mandatory field 'source'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'source' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.routingKey))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var l=Buffer.byteLength(o,"utf8");if(s+=l,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=G(Q,o,a);var f=Q.slice(a,a+r);a+=r,s+=f.length;var h=Buffer.alloc(18+s);if(h[0]=1,h.writeUInt16BE(e,1),h.writeUInt32BE(2621470,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return h.writeUInt16BE(o,n),n+=2,void 0===(o=t.destination)&&(o=void 0),h[n]=u,n++,h.write(o,n,"utf8"),n+=u,void 0===(o=t.source)&&(o=void 0),h[n]=c,n++,h.write(o,n,"utf8"),n+=c,void 0===(o=t.routingKey)&&(o=""),h[n]=l,n++,h.write(o,n,"utf8"),n+=l,void 0===(o=t.nowait)&&(o=!1),o&&(i+=1),h[n]=i,n++,i=0,h[n+=f.copy(h,n)]=206,h.writeUInt32BE(n-7,3),h}(t,r);case 2621471:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(2621471,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 2621480:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.destination))throw new Error("Missing value for mandatory field 'destination'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'destination' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.source))throw new Error("Missing value for mandatory field 'source'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'source' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.routingKey))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var l=Buffer.byteLength(o,"utf8");if(s+=l,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=G(Q,o,a);var f=Q.slice(a,a+r);a+=r,s+=f.length;var h=Buffer.alloc(18+s);if(h[0]=1,h.writeUInt16BE(e,1),h.writeUInt32BE(2621480,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return h.writeUInt16BE(o,n),n+=2,void 0===(o=t.destination)&&(o=void 0),h[n]=u,n++,h.write(o,n,"utf8"),n+=u,void 0===(o=t.source)&&(o=void 0),h[n]=c,n++,h.write(o,n,"utf8"),n+=c,void 0===(o=t.routingKey)&&(o=""),h[n]=l,n++,h.write(o,n,"utf8"),n+=l,void 0===(o=t.nowait)&&(o=!1),o&&(i+=1),h[n]=i,n++,i=0,h[n+=f.copy(h,n)]=206,h.writeUInt32BE(n-7,3),h}(t,r);case 2621491:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(2621491,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3276810:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.queue))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=G(Q,o,a);var c=Q.slice(a,a+r);a+=r,s+=c.length;var l=Buffer.alloc(16+s);if(l[0]=1,l.writeUInt16BE(e,1),l.writeUInt32BE(3276810,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return l.writeUInt16BE(o,n),n+=2,void 0===(o=t.queue)&&(o=""),l[n]=u,n++,l.write(o,n,"utf8"),n+=u,void 0===(o=t.passive)&&(o=!1),o&&(i+=1),void 0===(o=t.durable)&&(o=!1),o&&(i+=2),void 0===(o=t.exclusive)&&(o=!1),o&&(i+=4),void 0===(o=t.autoDelete)&&(o=!1),o&&(i+=8),void 0===(o=t.nowait)&&(o=!1),o&&(i+=16),l[n]=i,n++,i=0,l[n+=c.copy(l,n)]=206,l.writeUInt32BE(n-7,3),l}(t,r);case 3276811:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.queue))throw new Error("Missing value for mandatory field 'queue'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(21+o);if(s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(3276811,7),r=11,void 0===(n=t.queue)&&(n=void 0),s[r]=i,r++,s.write(n,r,"utf8"),r+=i,void 0===(n=t.messageCount))throw new Error("Missing value for mandatory field 'messageCount'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'messageCount' is the wrong type; must be a number (but not NaN)");if(s.writeUInt32BE(n,r),r+=4,void 0===(n=t.consumerCount))throw new Error("Missing value for mandatory field 'consumerCount'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'consumerCount' is the wrong type; must be a number (but not NaN)");return s.writeUInt32BE(n,r),s[r+=4]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 3276820:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.queue))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.routingKey))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var l=Buffer.byteLength(o,"utf8");if(s+=l,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=G(Q,o,a);var f=Q.slice(a,a+r);a+=r,s+=f.length;var h=Buffer.alloc(18+s);if(h[0]=1,h.writeUInt16BE(e,1),h.writeUInt32BE(3276820,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return h.writeUInt16BE(o,n),n+=2,void 0===(o=t.queue)&&(o=""),h[n]=u,n++,h.write(o,n,"utf8"),n+=u,void 0===(o=t.exchange)&&(o=void 0),h[n]=c,n++,h.write(o,n,"utf8"),n+=c,void 0===(o=t.routingKey)&&(o=""),h[n]=l,n++,h.write(o,n,"utf8"),n+=l,void 0===(o=t.nowait)&&(o=!1),o&&(i+=1),h[n]=i,n++,i=0,h[n+=f.copy(h,n)]=206,h.writeUInt32BE(n-7,3),h}(t,r);case 3276821:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(3276821,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3276830:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.queue))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(16+i);if(a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(3276830,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return a.writeUInt16BE(n,r),r+=2,void 0===(n=t.queue)&&(n=""),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.nowait)&&(n=!1),n&&(o+=1),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 3276831:return function(e,t){var r,n=0,o=Buffer.alloc(16);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(3276831,7),n=11,void 0===(r=t.messageCount))throw new Error("Missing value for mandatory field 'messageCount'");if("number"!=typeof r||isNaN(r))throw new TypeError("Field 'messageCount' is the wrong type; must be a number (but not NaN)");return o.writeUInt32BE(r,n),o[n+=4]=206,o.writeUInt32BE(n-7,3),o}(t,r);case 3276840:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.queue))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(16+i);if(a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(3276840,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return a.writeUInt16BE(n,r),r+=2,void 0===(n=t.queue)&&(n=""),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.ifUnused)&&(n=!1),n&&(o+=1),void 0===(n=t.ifEmpty)&&(n=!1),n&&(o+=2),void 0===(n=t.nowait)&&(n=!1),n&&(o+=4),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 3276841:return function(e,t){var r,n=0,o=Buffer.alloc(16);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(3276841,7),n=11,void 0===(r=t.messageCount))throw new Error("Missing value for mandatory field 'messageCount'");if("number"!=typeof r||isNaN(r))throw new TypeError("Field 'messageCount' is the wrong type; must be a number (but not NaN)");return o.writeUInt32BE(r,n),o[n+=4]=206,o.writeUInt32BE(n-7,3),o}(t,r);case 3276850:return function(e,t){var r,n=0,o=null,i=0,s=0;if(void 0===(o=t.queue))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(o,"utf8");if(i+=a,void 0===(o=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(i+=u,void 0===(o=t.routingKey))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(i+=c,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=G(Q,o,s);var l=Q.slice(s,s+r);s+=r,i+=l.length;var f=Buffer.alloc(17+i);if(f[0]=1,f.writeUInt16BE(e,1),f.writeUInt32BE(3276850,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return f.writeUInt16BE(o,n),n+=2,void 0===(o=t.queue)&&(o=""),f[n]=a,n++,f.write(o,n,"utf8"),n+=a,void 0===(o=t.exchange)&&(o=void 0),f[n]=u,n++,f.write(o,n,"utf8"),n+=u,void 0===(o=t.routingKey)&&(o=""),f[n]=c,n++,f.write(o,n,"utf8"),n+=c,f[n+=l.copy(f,n)]=206,f.writeUInt32BE(n-7,3),f}(t,r);case 3276851:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(3276851,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3932170:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(19);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932170,7),r=11,void 0===(n=t.prefetchSize))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'prefetchSize' is the wrong type; must be a number (but not NaN)");if(i.writeUInt32BE(n,r),r+=4,void 0===(n=t.prefetchCount))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'prefetchCount' is the wrong type; must be a number (but not NaN)");return i.writeUInt16BE(n,r),r+=2,void 0===(n=t.global)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932171:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(3932171,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3932180:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.queue))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.consumerTag))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=G(Q,o,a);var l=Q.slice(a,a+r);a+=r,s+=l.length;var f=Buffer.alloc(17+s);if(f[0]=1,f.writeUInt16BE(e,1),f.writeUInt32BE(3932180,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return f.writeUInt16BE(o,n),n+=2,void 0===(o=t.queue)&&(o=""),f[n]=u,n++,f.write(o,n,"utf8"),n+=u,void 0===(o=t.consumerTag)&&(o=""),f[n]=c,n++,f.write(o,n,"utf8"),n+=c,void 0===(o=t.noLocal)&&(o=!1),o&&(i+=1),void 0===(o=t.noAck)&&(o=!1),o&&(i+=2),void 0===(o=t.exclusive)&&(o=!1),o&&(i+=4),void 0===(o=t.nowait)&&(o=!1),o&&(i+=8),f[n]=i,n++,i=0,f[n+=l.copy(f,n)]=206,f.writeUInt32BE(n-7,3),f}(t,r);case 3932181:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.consumerTag))throw new Error("Missing value for mandatory field 'consumerTag'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(3932181,7),r=11,void 0===(n=t.consumerTag)&&(n=void 0),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 3932190:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.consumerTag))throw new Error("Missing value for mandatory field 'consumerTag'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(14+i);return a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(3932190,7),r=11,void 0===(n=t.consumerTag)&&(n=void 0),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.nowait)&&(n=!1),n&&(o+=1),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 3932191:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.consumerTag))throw new Error("Missing value for mandatory field 'consumerTag'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(3932191,7),r=11,void 0===(n=t.consumerTag)&&(n=void 0),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 3932200:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.exchange))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(i+=s,void 0===(n=t.routingKey))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");i+=a;var u=Buffer.alloc(17+i);if(u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(3932200,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return u.writeUInt16BE(n,r),r+=2,void 0===(n=t.exchange)&&(n=""),u[r]=s,r++,u.write(n,r,"utf8"),r+=s,void 0===(n=t.routingKey)&&(n=""),u[r]=a,r++,u.write(n,r,"utf8"),r+=a,void 0===(n=t.mandatory)&&(n=!1),n&&(o+=1),void 0===(n=t.immediate)&&(n=!1),n&&(o+=2),u[r]=o,u[++r]=206,u.writeUInt32BE(r-7,3),u}(t,r);case 3932210:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.replyText))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'replyText' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");if(o+=i,void 0===(n=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(o+=s,void 0===(n=t.routingKey))throw new Error("Missing value for mandatory field 'routingKey'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");o+=a;var u=Buffer.alloc(17+o);if(u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(3932210,7),r=11,void 0===(n=t.replyCode))throw new Error("Missing value for mandatory field 'replyCode'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'replyCode' is the wrong type; must be a number (but not NaN)");return u.writeUInt16BE(n,r),r+=2,void 0===(n=t.replyText)&&(n=""),u[r]=i,r++,u.write(n,r,"utf8"),r+=i,void 0===(n=t.exchange)&&(n=void 0),u[r]=s,r++,u.write(n,r,"utf8"),r+=s,void 0===(n=t.routingKey)&&(n=void 0),u[r]=a,r++,u.write(n,r,"utf8"),u[r+=a]=206,u.writeUInt32BE(r-7,3),u}(t,r);case 3932220:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.consumerTag))throw new Error("Missing value for mandatory field 'consumerTag'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(i+=s,void 0===(n=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");if(i+=a,void 0===(n=t.routingKey))throw new Error("Missing value for mandatory field 'routingKey'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(n,"utf8");i+=u;var c=Buffer.alloc(24+i);if(c[0]=1,c.writeUInt16BE(e,1),c.writeUInt32BE(3932220,7),r=11,void 0===(n=t.consumerTag)&&(n=void 0),c[r]=s,r++,c.write(n,r,"utf8"),r+=s,void 0===(n=t.deliveryTag))throw new Error("Missing value for mandatory field 'deliveryTag'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");return K.writeUInt64BE(c,n,r),r+=8,void 0===(n=t.redelivered)&&(n=!1),n&&(o+=1),c[r]=o,r++,o=0,void 0===(n=t.exchange)&&(n=void 0),c[r]=a,r++,c.write(n,r,"utf8"),r+=a,void 0===(n=t.routingKey)&&(n=void 0),c[r]=u,r++,c.write(n,r,"utf8"),c[r+=u]=206,c.writeUInt32BE(r-7,3),c}(t,r);case 3932230:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.queue))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(16+i);if(a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(3932230,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return a.writeUInt16BE(n,r),r+=2,void 0===(n=t.queue)&&(n=""),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.noAck)&&(n=!1),n&&(o+=1),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 3932231:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(i+=s,void 0===(n=t.routingKey))throw new Error("Missing value for mandatory field 'routingKey'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");i+=a;var u=Buffer.alloc(27+i);if(u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(3932231,7),r=11,void 0===(n=t.deliveryTag))throw new Error("Missing value for mandatory field 'deliveryTag'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");if(K.writeUInt64BE(u,n,r),r+=8,void 0===(n=t.redelivered)&&(n=!1),n&&(o+=1),u[r]=o,r++,o=0,void 0===(n=t.exchange)&&(n=void 0),u[r]=s,r++,u.write(n,r,"utf8"),r+=s,void 0===(n=t.routingKey)&&(n=void 0),u[r]=a,r++,u.write(n,r,"utf8"),r+=a,void 0===(n=t.messageCount))throw new Error("Missing value for mandatory field 'messageCount'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'messageCount' is the wrong type; must be a number (but not NaN)");return u.writeUInt32BE(n,r),u[r+=4]=206,u.writeUInt32BE(r-7,3),u}(t,r);case 3932232:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.clusterId))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'clusterId' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(3932232,7),r=11,void 0===(n=t.clusterId)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 3932240:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(21);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932240,7),r=11,void 0===(n=t.deliveryTag))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");return K.writeUInt64BE(i,n,r),r+=8,void 0===(n=t.multiple)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932250:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(21);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932250,7),r=11,void 0===(n=t.deliveryTag))throw new Error("Missing value for mandatory field 'deliveryTag'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");return K.writeUInt64BE(i,n,r),r+=8,void 0===(n=t.requeue)&&(n=!0),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932260:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(13);return i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932260,7),r=11,void 0===(n=t.requeue)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932270:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(13);return i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932270,7),r=11,void 0===(n=t.requeue)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932271:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(3932271,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3932280:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(21);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932280,7),r=11,void 0===(n=t.deliveryTag))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");return K.writeUInt64BE(i,n,r),r+=8,void 0===(n=t.multiple)&&(n=!1),n&&(o+=1),void 0===(n=t.requeue)&&(n=!0),n&&(o+=2),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 5898250:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898250,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898251:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898251,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898260:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898260,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898261:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898261,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898270:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898270,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898271:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898271,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5570570:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(13);return i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(5570570,7),r=11,void 0===(n=t.nowait)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 5570571:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5570571,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);default:throw new Error("Unknown class/method ID")}},j.encodeProperties=function(e,t,r,n){if(60===e)return function(e,t,r){var n,o,i=0,s=0,a=0,u=0;if(null!=(n=r.contentType)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'contentType' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(n,"utf8");u+=1,u+=c}if(null!=(n=r.contentEncoding)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'contentEncoding' is the wrong type; must be a string (up to 255 chars)");var l=Buffer.byteLength(n,"utf8");u+=1,u+=l}if(null!=(n=r.headers)){if("object"!=typeof n)throw new TypeError("Field 'headers' is the wrong type; must be an object");o=G(Q,n,a);var f=Q.slice(a,a+o);a+=o,u+=f.length}if(null!=(n=r.deliveryMode)){if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryMode' is the wrong type; must be a number (but not NaN)");u+=1}if(null!=(n=r.priority)){if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'priority' is the wrong type; must be a number (but not NaN)");u+=1}if(null!=(n=r.correlationId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'correlationId' is the wrong type; must be a string (up to 255 chars)");var h=Buffer.byteLength(n,"utf8");u+=1,u+=h}if(null!=(n=r.replyTo)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'replyTo' is the wrong type; must be a string (up to 255 chars)");var d=Buffer.byteLength(n,"utf8");u+=1,u+=d}if(null!=(n=r.expiration)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'expiration' is the wrong type; must be a string (up to 255 chars)");var p=Buffer.byteLength(n,"utf8");u+=1,u+=p}if(null!=(n=r.messageId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'messageId' is the wrong type; must be a string (up to 255 chars)");var g=Buffer.byteLength(n,"utf8");u+=1,u+=g}if(null!=(n=r.timestamp)){if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'timestamp' is the wrong type; must be a number (but not NaN)");u+=8}if(null!=(n=r.type)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'type' is the wrong type; must be a string (up to 255 chars)");var m=Buffer.byteLength(n,"utf8");u+=1,u+=m}if(null!=(n=r.userId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'userId' is the wrong type; must be a string (up to 255 chars)");var v=Buffer.byteLength(n,"utf8");u+=1,u+=v}if(null!=(n=r.appId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'appId' is the wrong type; must be a string (up to 255 chars)");var b=Buffer.byteLength(n,"utf8");u+=1,u+=b}if(null!=(n=r.clusterId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'clusterId' is the wrong type; must be a string (up to 255 chars)");var y=Buffer.byteLength(n,"utf8");u+=1,u+=y}var w=Buffer.alloc(22+u);return w[0]=2,w.writeUInt16BE(e,1),w.writeUInt32BE(3932160,7),K.writeUInt64BE(w,t,11),s=0,i=21,null!=(n=r.contentType)&&(s+=32768,w[i]=c,i++,w.write(n,i,"utf8"),i+=c),null!=(n=r.contentEncoding)&&(s+=16384,w[i]=l,i++,w.write(n,i,"utf8"),i+=l),null!=(n=r.headers)&&(s+=8192,i+=f.copy(w,i)),null!=(n=r.deliveryMode)&&(s+=4096,w.writeUInt8(n,i),i++),null!=(n=r.priority)&&(s+=2048,w.writeUInt8(n,i),i++),null!=(n=r.correlationId)&&(s+=1024,w[i]=h,i++,w.write(n,i,"utf8"),i+=h),null!=(n=r.replyTo)&&(s+=512,w[i]=d,i++,w.write(n,i,"utf8"),i+=d),null!=(n=r.expiration)&&(s+=256,w[i]=p,i++,w.write(n,i,"utf8"),i+=p),null!=(n=r.messageId)&&(s+=128,w[i]=g,i++,w.write(n,i,"utf8"),i+=g),null!=(n=r.timestamp)&&(s+=64,K.writeUInt64BE(w,n,i),i+=8),null!=(n=r.type)&&(s+=32,w[i]=m,i++,w.write(n,i,"utf8"),i+=m),null!=(n=r.userId)&&(s+=16,w[i]=v,i++,w.write(n,i,"utf8"),i+=v),null!=(n=r.appId)&&(s+=8,w[i]=b,i++,w.write(n,i,"utf8"),i+=b),null!=(n=r.clusterId)&&(s+=4,w[i]=y,i++,w.write(n,i,"utf8"),i+=y),w[i]=206,w.writeUInt32BE(i-7,3),w.writeUInt16BE(s,19),w.slice(0,i+1)}(t,r,n);throw new Error("Unknown class/properties ID")},j.info=function(e){switch(e){case 655370:return W;case 655371:return Y;case 655380:return J;case 655381:return X;case 655390:return Z;case 655391:return ee;case 655400:return te;case 655401:return re;case 655410:return ne;case 655411:return oe;case 655420:return ie;case 655421:return se;case 1310730:return ae;case 1310731:return ue;case 1310740:return ce;case 1310741:return le;case 1310760:return fe;case 1310761:return he;case 1966090:return de;case 1966091:return pe;case 2621450:return ge;case 2621451:return me;case 2621460:return ve;case 2621461:return be;case 2621470:return ye;case 2621471:return we;case 2621480:return Ee;case 2621491:return Ie;case 3276810:return Ce;case 3276811:return Be;case 3276820:return xe;case 3276821:return Te;case 3276830:return Ue;case 3276831:return Oe;case 3276840:return ke;case 3276841:return Se;case 3276850:return _e;case 3276851:return Ne;case 3932170:return Ae;case 3932171:return Re;case 3932180:return Me;case 3932181:return Le;case 3932190:return Fe;case 3932191:return je;case 3932200:return Pe;case 3932210:return De;case 3932220:return qe;case 3932230:return He;case 3932231:return $e;case 3932232:return ze;case 3932240:return Ke;case 3932250:return Ge;case 3932260:return Ve;case 3932270:return Qe;case 3932271:return We;case 3932280:return Ye;case 5898250:return Je;case 5898251:return Xe;case 5898260:return Ze;case 5898261:return et;case 5898270:return tt;case 5898271:return rt;case 5570570:return nt;case 5570571:return ot;case 60:return it;default:throw new Error("Unknown class/method ID")}},j.ConnectionStart=655370;var W=j.methodInfoConnectionStart={id:655370,classId:10,methodId:10,name:"ConnectionStart",args:[{type:"octet",name:"versionMajor",default:0},{type:"octet",name:"versionMinor",default:9},{type:"table",name:"serverProperties"},{type:"longstr",name:"mechanisms",default:"PLAIN"},{type:"longstr",name:"locales",default:"en_US"}]};j.ConnectionStartOk=655371;var Y=j.methodInfoConnectionStartOk={id:655371,classId:10,methodId:11,name:"ConnectionStartOk",args:[{type:"table",name:"clientProperties"},{type:"shortstr",name:"mechanism",default:"PLAIN"},{type:"longstr",name:"response"},{type:"shortstr",name:"locale",default:"en_US"}]};j.ConnectionSecure=655380;var J=j.methodInfoConnectionSecure={id:655380,classId:10,methodId:20,name:"ConnectionSecure",args:[{type:"longstr",name:"challenge"}]};j.ConnectionSecureOk=655381;var X=j.methodInfoConnectionSecureOk={id:655381,classId:10,methodId:21,name:"ConnectionSecureOk",args:[{type:"longstr",name:"response"}]};j.ConnectionTune=655390;var Z=j.methodInfoConnectionTune={id:655390,classId:10,methodId:30,name:"ConnectionTune",args:[{type:"short",name:"channelMax",default:0},{type:"long",name:"frameMax",default:0},{type:"short",name:"heartbeat",default:0}]};j.ConnectionTuneOk=655391;var ee=j.methodInfoConnectionTuneOk={id:655391,classId:10,methodId:31,name:"ConnectionTuneOk",args:[{type:"short",name:"channelMax",default:0},{type:"long",name:"frameMax",default:0},{type:"short",name:"heartbeat",default:0}]};j.ConnectionOpen=655400;var te=j.methodInfoConnectionOpen={id:655400,classId:10,methodId:40,name:"ConnectionOpen",args:[{type:"shortstr",name:"virtualHost",default:"/"},{type:"shortstr",name:"capabilities",default:""},{type:"bit",name:"insist",default:!1}]};j.ConnectionOpenOk=655401;var re=j.methodInfoConnectionOpenOk={id:655401,classId:10,methodId:41,name:"ConnectionOpenOk",args:[{type:"shortstr",name:"knownHosts",default:""}]};j.ConnectionClose=655410;var ne=j.methodInfoConnectionClose={id:655410,classId:10,methodId:50,name:"ConnectionClose",args:[{type:"short",name:"replyCode"},{type:"shortstr",name:"replyText",default:""},{type:"short",name:"classId"},{type:"short",name:"methodId"}]};j.ConnectionCloseOk=655411;var oe=j.methodInfoConnectionCloseOk={id:655411,classId:10,methodId:51,name:"ConnectionCloseOk",args:[]};j.ConnectionBlocked=655420;var ie=j.methodInfoConnectionBlocked={id:655420,classId:10,methodId:60,name:"ConnectionBlocked",args:[{type:"shortstr",name:"reason",default:""}]};j.ConnectionUnblocked=655421;var se=j.methodInfoConnectionUnblocked={id:655421,classId:10,methodId:61,name:"ConnectionUnblocked",args:[]};j.ChannelOpen=1310730;var ae=j.methodInfoChannelOpen={id:1310730,classId:20,methodId:10,name:"ChannelOpen",args:[{type:"shortstr",name:"outOfBand",default:""}]};j.ChannelOpenOk=1310731;var ue=j.methodInfoChannelOpenOk={id:1310731,classId:20,methodId:11,name:"ChannelOpenOk",args:[{type:"longstr",name:"channelId",default:""}]};j.ChannelFlow=1310740;var ce=j.methodInfoChannelFlow={id:1310740,classId:20,methodId:20,name:"ChannelFlow",args:[{type:"bit",name:"active"}]};j.ChannelFlowOk=1310741;var le=j.methodInfoChannelFlowOk={id:1310741,classId:20,methodId:21,name:"ChannelFlowOk",args:[{type:"bit",name:"active"}]};j.ChannelClose=1310760;var fe=j.methodInfoChannelClose={id:1310760,classId:20,methodId:40,name:"ChannelClose",args:[{type:"short",name:"replyCode"},{type:"shortstr",name:"replyText",default:""},{type:"short",name:"classId"},{type:"short",name:"methodId"}]};j.ChannelCloseOk=1310761;var he=j.methodInfoChannelCloseOk={id:1310761,classId:20,methodId:41,name:"ChannelCloseOk",args:[]};j.AccessRequest=1966090;var de=j.methodInfoAccessRequest={id:1966090,classId:30,methodId:10,name:"AccessRequest",args:[{type:"shortstr",name:"realm",default:"/data"},{type:"bit",name:"exclusive",default:!1},{type:"bit",name:"passive",default:!0},{type:"bit",name:"active",default:!0},{type:"bit",name:"write",default:!0},{type:"bit",name:"read",default:!0}]};j.AccessRequestOk=1966091;var pe=j.methodInfoAccessRequestOk={id:1966091,classId:30,methodId:11,name:"AccessRequestOk",args:[{type:"short",name:"ticket",default:1}]};j.ExchangeDeclare=2621450;var ge=j.methodInfoExchangeDeclare={id:2621450,classId:40,methodId:10,name:"ExchangeDeclare",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"type",default:"direct"},{type:"bit",name:"passive",default:!1},{type:"bit",name:"durable",default:!1},{type:"bit",name:"autoDelete",default:!1},{type:"bit",name:"internal",default:!1},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.ExchangeDeclareOk=2621451;var me=j.methodInfoExchangeDeclareOk={id:2621451,classId:40,methodId:11,name:"ExchangeDeclareOk",args:[]};j.ExchangeDelete=2621460;var ve=j.methodInfoExchangeDelete={id:2621460,classId:40,methodId:20,name:"ExchangeDelete",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"exchange"},{type:"bit",name:"ifUnused",default:!1},{type:"bit",name:"nowait",default:!1}]};j.ExchangeDeleteOk=2621461;var be=j.methodInfoExchangeDeleteOk={id:2621461,classId:40,methodId:21,name:"ExchangeDeleteOk",args:[]};j.ExchangeBind=2621470;var ye=j.methodInfoExchangeBind={id:2621470,classId:40,methodId:30,name:"ExchangeBind",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"destination"},{type:"shortstr",name:"source"},{type:"shortstr",name:"routingKey",default:""},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.ExchangeBindOk=2621471;var we=j.methodInfoExchangeBindOk={id:2621471,classId:40,methodId:31,name:"ExchangeBindOk",args:[]};j.ExchangeUnbind=2621480;var Ee=j.methodInfoExchangeUnbind={id:2621480,classId:40,methodId:40,name:"ExchangeUnbind",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"destination"},{type:"shortstr",name:"source"},{type:"shortstr",name:"routingKey",default:""},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.ExchangeUnbindOk=2621491;var Ie=j.methodInfoExchangeUnbindOk={id:2621491,classId:40,methodId:51,name:"ExchangeUnbindOk",args:[]};j.QueueDeclare=3276810;var Ce=j.methodInfoQueueDeclare={id:3276810,classId:50,methodId:10,name:"QueueDeclare",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"bit",name:"passive",default:!1},{type:"bit",name:"durable",default:!1},{type:"bit",name:"exclusive",default:!1},{type:"bit",name:"autoDelete",default:!1},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.QueueDeclareOk=3276811;var Be=j.methodInfoQueueDeclareOk={id:3276811,classId:50,methodId:11,name:"QueueDeclareOk",args:[{type:"shortstr",name:"queue"},{type:"long",name:"messageCount"},{type:"long",name:"consumerCount"}]};j.QueueBind=3276820;var xe=j.methodInfoQueueBind={id:3276820,classId:50,methodId:20,name:"QueueBind",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey",default:""},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.QueueBindOk=3276821;var Te=j.methodInfoQueueBindOk={id:3276821,classId:50,methodId:21,name:"QueueBindOk",args:[]};j.QueuePurge=3276830;var Ue=j.methodInfoQueuePurge={id:3276830,classId:50,methodId:30,name:"QueuePurge",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"bit",name:"nowait",default:!1}]};j.QueuePurgeOk=3276831;var Oe=j.methodInfoQueuePurgeOk={id:3276831,classId:50,methodId:31,name:"QueuePurgeOk",args:[{type:"long",name:"messageCount"}]};j.QueueDelete=3276840;var ke=j.methodInfoQueueDelete={id:3276840,classId:50,methodId:40,name:"QueueDelete",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"bit",name:"ifUnused",default:!1},{type:"bit",name:"ifEmpty",default:!1},{type:"bit",name:"nowait",default:!1}]};j.QueueDeleteOk=3276841;var Se=j.methodInfoQueueDeleteOk={id:3276841,classId:50,methodId:41,name:"QueueDeleteOk",args:[{type:"long",name:"messageCount"}]};j.QueueUnbind=3276850;var _e=j.methodInfoQueueUnbind={id:3276850,classId:50,methodId:50,name:"QueueUnbind",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey",default:""},{type:"table",name:"arguments",default:{}}]};j.QueueUnbindOk=3276851;var Ne=j.methodInfoQueueUnbindOk={id:3276851,classId:50,methodId:51,name:"QueueUnbindOk",args:[]};j.BasicQos=3932170;var Ae=j.methodInfoBasicQos={id:3932170,classId:60,methodId:10,name:"BasicQos",args:[{type:"long",name:"prefetchSize",default:0},{type:"short",name:"prefetchCount",default:0},{type:"bit",name:"global",default:!1}]};j.BasicQosOk=3932171;var Re=j.methodInfoBasicQosOk={id:3932171,classId:60,methodId:11,name:"BasicQosOk",args:[]};j.BasicConsume=3932180;var Me=j.methodInfoBasicConsume={id:3932180,classId:60,methodId:20,name:"BasicConsume",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"shortstr",name:"consumerTag",default:""},{type:"bit",name:"noLocal",default:!1},{type:"bit",name:"noAck",default:!1},{type:"bit",name:"exclusive",default:!1},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.BasicConsumeOk=3932181;var Le=j.methodInfoBasicConsumeOk={id:3932181,classId:60,methodId:21,name:"BasicConsumeOk",args:[{type:"shortstr",name:"consumerTag"}]};j.BasicCancel=3932190;var Fe=j.methodInfoBasicCancel={id:3932190,classId:60,methodId:30,name:"BasicCancel",args:[{type:"shortstr",name:"consumerTag"},{type:"bit",name:"nowait",default:!1}]};j.BasicCancelOk=3932191;var je=j.methodInfoBasicCancelOk={id:3932191,classId:60,methodId:31,name:"BasicCancelOk",args:[{type:"shortstr",name:"consumerTag"}]};j.BasicPublish=3932200;var Pe=j.methodInfoBasicPublish={id:3932200,classId:60,methodId:40,name:"BasicPublish",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"exchange",default:""},{type:"shortstr",name:"routingKey",default:""},{type:"bit",name:"mandatory",default:!1},{type:"bit",name:"immediate",default:!1}]};j.BasicReturn=3932210;var De=j.methodInfoBasicReturn={id:3932210,classId:60,methodId:50,name:"BasicReturn",args:[{type:"short",name:"replyCode"},{type:"shortstr",name:"replyText",default:""},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey"}]};j.BasicDeliver=3932220;var qe=j.methodInfoBasicDeliver={id:3932220,classId:60,methodId:60,name:"BasicDeliver",args:[{type:"shortstr",name:"consumerTag"},{type:"longlong",name:"deliveryTag"},{type:"bit",name:"redelivered",default:!1},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey"}]};j.BasicGet=3932230;var He=j.methodInfoBasicGet={id:3932230,classId:60,methodId:70,name:"BasicGet",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"bit",name:"noAck",default:!1}]};j.BasicGetOk=3932231;var $e=j.methodInfoBasicGetOk={id:3932231,classId:60,methodId:71,name:"BasicGetOk",args:[{type:"longlong",name:"deliveryTag"},{type:"bit",name:"redelivered",default:!1},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey"},{type:"long",name:"messageCount"}]};j.BasicGetEmpty=3932232;var ze=j.methodInfoBasicGetEmpty={id:3932232,classId:60,methodId:72,name:"BasicGetEmpty",args:[{type:"shortstr",name:"clusterId",default:""}]};j.BasicAck=3932240;var Ke=j.methodInfoBasicAck={id:3932240,classId:60,methodId:80,name:"BasicAck",args:[{type:"longlong",name:"deliveryTag",default:0},{type:"bit",name:"multiple",default:!1}]};j.BasicReject=3932250;var Ge=j.methodInfoBasicReject={id:3932250,classId:60,methodId:90,name:"BasicReject",args:[{type:"longlong",name:"deliveryTag"},{type:"bit",name:"requeue",default:!0}]};j.BasicRecoverAsync=3932260;var Ve=j.methodInfoBasicRecoverAsync={id:3932260,classId:60,methodId:100,name:"BasicRecoverAsync",args:[{type:"bit",name:"requeue",default:!1}]};j.BasicRecover=3932270;var Qe=j.methodInfoBasicRecover={id:3932270,classId:60,methodId:110,name:"BasicRecover",args:[{type:"bit",name:"requeue",default:!1}]};j.BasicRecoverOk=3932271;var We=j.methodInfoBasicRecoverOk={id:3932271,classId:60,methodId:111,name:"BasicRecoverOk",args:[]};j.BasicNack=3932280;var Ye=j.methodInfoBasicNack={id:3932280,classId:60,methodId:120,name:"BasicNack",args:[{type:"longlong",name:"deliveryTag",default:0},{type:"bit",name:"multiple",default:!1},{type:"bit",name:"requeue",default:!0}]};j.TxSelect=5898250;var Je=j.methodInfoTxSelect={id:5898250,classId:90,methodId:10,name:"TxSelect",args:[]};j.TxSelectOk=5898251;var Xe=j.methodInfoTxSelectOk={id:5898251,classId:90,methodId:11,name:"TxSelectOk",args:[]};j.TxCommit=5898260;var Ze=j.methodInfoTxCommit={id:5898260,classId:90,methodId:20,name:"TxCommit",args:[]};j.TxCommitOk=5898261;var et=j.methodInfoTxCommitOk={id:5898261,classId:90,methodId:21,name:"TxCommitOk",args:[]};j.TxRollback=5898270;var tt=j.methodInfoTxRollback={id:5898270,classId:90,methodId:30,name:"TxRollback",args:[]};j.TxRollbackOk=5898271;var rt=j.methodInfoTxRollbackOk={id:5898271,classId:90,methodId:31,name:"TxRollbackOk",args:[]};j.ConfirmSelect=5570570;var nt=j.methodInfoConfirmSelect={id:5570570,classId:85,methodId:10,name:"ConfirmSelect",args:[{type:"bit",name:"nowait",default:!1}]};j.ConfirmSelectOk=5570571;var ot=j.methodInfoConfirmSelectOk={id:5570571,classId:85,methodId:11,name:"ConfirmSelectOk",args:[]};j.BasicProperties=60;var it=j.propertiesInfoBasicProperties={id:60,name:"BasicProperties",args:[{type:"shortstr",name:"contentType"},{type:"shortstr",name:"contentEncoding"},{type:"table",name:"headers"},{type:"octet",name:"deliveryMode"},{type:"octet",name:"priority"},{type:"shortstr",name:"correlationId"},{type:"shortstr",name:"replyTo"},{type:"shortstr",name:"expiration"},{type:"shortstr",name:"messageId"},{type:"timestamp",name:"timestamp"},{type:"shortstr",name:"type"},{type:"shortstr",name:"userId"},{type:"shortstr",name:"appId"},{type:"shortstr",name:"clusterId"}]},st={},at={},ut={},ct={};function lt(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[e[r]]=1);return t}function ft(e,t,r){var n=lt(r),o={name:e};return o.type=dt(n),pt(o,o.type,n),o.size=gt(o,o.type,t,o.unit),o}ct.variable=ft,ct.rest=function(){return ft("_",!0,["binary"])},ct.value=function(e,t,r){var n=lt(r),o={value:e};return o.type=dt(n),pt(o,o.type,n),o.size=gt(o,o.type,t,o.unit),o},ct.string=function(e){return{value:e,type:"string"}};var ht={integer:1,binary:1,float:1};function dt(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&ht[t])return t;return"integer"}function pt(e,t,r){switch(t){case"integer":e.signed=function(e){return e.signed}(r);case"float":e.bigendian=function(e){return!e.little}(r);default:e.unit=function(e,t){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))if("unit:"==r.substr(0,5))return parseInt(r.substr(5))}switch(t){case"binary":return 8;case"integer":case"float":return 1}}(r,e.type)}return e}function gt(e,t,r,n){if(void 0!==r&&""!==r)return r;switch(t){case"integer":return 8;case"float":return 64;case"binary":return!0}}var mt=function(){function e(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var t={parse:function(t,r){var n={start:function(){var e,t,r,n,i,s;if(i=o,s=o,null!==(e=E()))if(null!==(t=c())){for(r=[],n=u();null!==n;)r.push(n),n=u();null!==r?e=[e,t,r]:(e=null,o=s)}else e=null,o=s;else e=null,o=s;null!==e&&(a=e[1],(l=e[2]).unshift(a),e=l);var a,l;null===e&&(o=i);return e},segmentTail:u,segment:c,string:l,chars:f,char:h,hexDigit:d,identifier:p,number:g,size:m,specifierList:v,specifierTail:b,specifier:y,unit:w,ws:E};if(void 0!==r){if(void 0===n[r])throw new Error("Invalid rule name: "+e(r)+".")}else r="start";var o=0,i=0,s=[];function a(e){o<i||(o>i&&(i=o,s=[]),s.push(e))}function u(){var e,r,n,i,s,u;return s=o,u=o,null!==(e=E())?(44===t.charCodeAt(o)?(r=",",o++):(r=null,a('","')),null!==r&&null!==(n=E())&&null!==(i=c())?e=[e,r,n,i]:(e=null,o=u)):(e=null,o=u),null!==e&&(e=e[3]),null===e&&(o=s),e}function c(){var e,t,r,n,i;return n=o,null!==(e=l())&&(e={string:e}),null===e&&(o=n),null===e&&(n=o,i=o,null!==(e=p())&&null!==(t=null!==(t=m())?t:"")&&null!==(r=null!==(r=v())?r:"")?e=[e,t,r]:(e=null,o=i),null!==e&&(e=function(e,t,r,n){return{name:t,size:r,specifiers:n}}(0,e[0],e[1],e[2])),null===e&&(o=n),null===e&&(n=o,i=o,null!==(e=g())&&null!==(t=null!==(t=m())?t:"")&&null!==(r=null!==(r=v())?r:"")?e=[e,t,r]:(e=null,o=i),null!==e&&(e=function(e,t,r,n){return{value:t,size:r,specifiers:n}}(0,e[0],e[1],e[2])),null===e&&(o=n))),e}function l(){var e,r,n,i,s;return i=o,s=o,34===t.charCodeAt(o)?(e='"',o++):(e=null,a('"\\""')),null!==e?(34===t.charCodeAt(o)?(r='"',o++):(r=null,a('"\\""')),null!==r?e=[e,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e=""),null===e&&(o=i),null===e&&(i=o,s=o,34===t.charCodeAt(o)?(e='"',o++):(e=null,a('"\\""')),null!==e&&null!==(r=f())?(34===t.charCodeAt(o)?(n='"',o++):(n=null,a('"\\""')),null!==n?e=[e,r,n]:(e=null,o=s)):(e=null,o=s),null!==e&&(e=e[1]),null===e&&(o=i)),e}function f(){var e,t,r;if(r=o,null!==(t=h()))for(e=[];null!==t;)e.push(t),t=h();else e=null;return null!==e&&(e=e.join("")),null===e&&(o=r),e}function h(){var e,r,n,i,s,u,c,l,f,h,p;return/^[^"\\\0-\x1F]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,a('[^"\\\\\\0-\\x1F]')),null===e&&(u=o,'\\"'===t.substr(o,2)?(e='\\"',o+=2):(e=null,a('"\\\\\\""')),null!==e&&(e='"'),null===e&&(o=u),null===e&&(u=o,"\\\\"===t.substr(o,2)?(e="\\\\",o+=2):(e=null,a('"\\\\\\\\"')),null!==e&&(e="\\"),null===e&&(o=u),null===e&&(u=o,"\\/"===t.substr(o,2)?(e="\\/",o+=2):(e=null,a('"\\\\/"')),null!==e&&(e="/"),null===e&&(o=u),null===e&&(u=o,"\\b"===t.substr(o,2)?(e="\\b",o+=2):(e=null,a('"\\\\b"')),null!==e&&(e="\b"),null===e&&(o=u),null===e&&(u=o,"\\f"===t.substr(o,2)?(e="\\f",o+=2):(e=null,a('"\\\\f"')),null!==e&&(e="\f"),null===e&&(o=u),null===e&&(u=o,"\\n"===t.substr(o,2)?(e="\\n",o+=2):(e=null,a('"\\\\n"')),null!==e&&(e="\n"),null===e&&(o=u),null===e&&(u=o,"\\r"===t.substr(o,2)?(e="\\r",o+=2):(e=null,a('"\\\\r"')),null!==e&&(e="\r"),null===e&&(o=u),null===e&&(u=o,"\\t"===t.substr(o,2)?(e="\\t",o+=2):(e=null,a('"\\\\t"')),null!==e&&(e="\t"),null===e&&(o=u),null===e&&(u=o,c=o,"\\u"===t.substr(o,2)?(e="\\u",o+=2):(e=null,a('"\\\\u"')),null!==e&&null!==(r=d())&&null!==(n=d())&&null!==(i=d())&&null!==(s=d())?e=[e,r,n,i,s]:(e=null,o=c),null!==e&&(l=e[1],f=e[2],h=e[3],p=e[4],e=String.fromCharCode(parseInt("0x"+l+f+h+p))),null===e&&(o=u)))))))))),e}function d(){var e;return/^[0-9a-fA-F]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,a("[0-9a-fA-F]")),e}function p(){var e,r,n,i,s,u,c;if(i=o,s=o,/^[_a-zA-Z]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,a("[_a-zA-Z]")),null!==e){for(r=[],/^[_a-zA-Z0-9]/.test(t.charAt(o))?(n=t.charAt(o),o++):(n=null,a("[_a-zA-Z0-9]"));null!==n;)r.push(n),/^[_a-zA-Z0-9]/.test(t.charAt(o))?(n=t.charAt(o),o++):(n=null,a("[_a-zA-Z0-9]"));null!==r?e=[e,r]:(e=null,o=s)}else e=null,o=s;return null!==e&&(u=e[0],c=e[1],e=u+c.join("")),null===e&&(o=i),e}function g(){var e,r,n,i,s,u,c;if(i=o,48===t.charCodeAt(o)?(e="0",o++):(e=null,a('"0"')),null!==e&&(e=0),null===e&&(o=i),null===e){if(i=o,s=o,/^[1-9]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,a("[1-9]")),null!==e){for(r=[],/^[0-9]/.test(t.charAt(o))?(n=t.charAt(o),o++):(n=null,a("[0-9]"));null!==n;)r.push(n),/^[0-9]/.test(t.charAt(o))?(n=t.charAt(o),o++):(n=null,a("[0-9]"));null!==r?e=[e,r]:(e=null,o=s)}else e=null,o=s;null!==e&&(u=e[0],c=e[1],e=parseInt(u+c.join(""))),null===e&&(o=i)}return e}function m(){var e,r,n,i;return n=o,i=o,58===t.charCodeAt(o)?(e=":",o++):(e=null,a('":"')),null!==e&&null!==(r=g())?e=[e,r]:(e=null,o=i),null!==e&&(e=e[1]),null===e&&(o=n),null===e&&(n=o,i=o,58===t.charCodeAt(o)?(e=":",o++):(e=null,a('":"')),null!==e&&null!==(r=p())?e=[e,r]:(e=null,o=i),null!==e&&(e=e[1]),null===e&&(o=n)),e}function v(){var e,r,n,i,s,u,c,l;if(s=o,u=o,47===t.charCodeAt(o)?(e="/",o++):(e=null,a('"/"')),null!==e)if(null!==(r=y())){for(n=[],i=b();null!==i;)n.push(i),i=b();null!==n?e=[e,r,n]:(e=null,o=u)}else e=null,o=u;else e=null,o=u;return null!==e&&(c=e[1],(l=e[2]).unshift(c),e=l),null===e&&(o=s),e}function b(){var e,r,n,i;return n=o,i=o,45===t.charCodeAt(o)?(e="-",o++):(e=null,a('"-"')),null!==e&&null!==(r=y())?e=[e,r]:(e=null,o=i),null!==e&&(e=e[1]),null===e&&(o=n),e}function y(){var e;return"little"===t.substr(o,6)?(e="little",o+=6):(e=null,a('"little"')),null===e&&("big"===t.substr(o,3)?(e="big",o+=3):(e=null,a('"big"')),null===e&&("signed"===t.substr(o,6)?(e="signed",o+=6):(e=null,a('"signed"')),null===e&&("unsigned"===t.substr(o,8)?(e="unsigned",o+=8):(e=null,a('"unsigned"')),null===e&&("integer"===t.substr(o,7)?(e="integer",o+=7):(e=null,a('"integer"')),null===e&&("binary"===t.substr(o,6)?(e="binary",o+=6):(e=null,a('"binary"')),null===e&&("float"===t.substr(o,5)?(e="float",o+=5):(e=null,a('"float"')),null===e&&(e=w()))))))),e}function w(){var e,r,n,i;return n=o,i=o,"unit:"===t.substr(o,5)?(e="unit:",o+=5):(e=null,a('"unit:"')),null!==e&&null!==(r=g())?e=[e,r]:(e=null,o=i),null!==e&&(e="unit:"+e[1]),null===e&&(o=n),e}function E(){var e,r;for(e=[],/^[ \t\n]/.test(t.charAt(o))?(r=t.charAt(o),o++):(r=null,a("[ \\t\\n]"));null!==r;)e.push(r),/^[ \t\n]/.test(t.charAt(o))?(r=t.charAt(o),o++):(r=null,a("[ \\t\\n]"));return e}var I=n[r]();if(null===I||o!==t.length){var C=Math.max(o,i),B=C<t.length?t.charAt(C):null,x=function(){for(var e=1,r=1,n=!1,s=0;s<Math.max(o,i);s++){var a=t.charAt(s);"\n"===a?(n||e++,r=1,n=!1):"\r"===a||"\u2028"===a||"\u2029"===a?(e++,r=1,n=!0):(r++,n=!1)}return{line:e,column:r}}();throw new this.SyntaxError(function(e){e.sort();for(var t=null,r=[],n=0;n<e.length;n++)e[n]!==t&&(r.push(e[n]),t=e[n]);return r}(s),B,C,x.line,x.column)}return I},toSource:function(){return this._source},SyntaxError:function(t,r,n,o,i){this.name="SyntaxError",this.expected=t,this.found=r,this.message=function(t,r){var n;switch(t.length){case 0:n="end of input";break;case 1:n=t[0];break;default:n=t.slice(0,t.length-1).join(", ")+" or "+t[t.length-1]}return"Expected "+n+" but "+(r?e(r):"end of input")+" found."}(t,r),this.offset=n,this.line=o,this.column=i}};return t.SyntaxError.prototype=Error.prototype,t}(),vt=ct,bt=mt;function yt(e){for(var t=bt.parse(e),r=0,n=t.length;r<n;r++){var o=t[r];if(null!=o.string)t[r]=vt.string(o.string);else if(null!=o.value)t[r]=vt.value(o.value,o.size,o.specifiers);else{if(null==o.name)throw"Unknown segment "+o;t[r]=vt.variable(o.name,o.size,o.specifiers)}}return t}ut.parse=function(){var e=[].join.call(arguments,",");return yt(e)};var wt,Et,It,Ct,Bt,xt={},Tt={exports:{}},Ut={exports:{}};function Ot(){if(Et)return wt;Et=1;var e=1e3,t=60*e,r=60*t,n=24*r,o=7*n,i=365.25*n;function s(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}return wt=function(a,u){u=u||{};var c=typeof a;if("string"===c&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*i;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*n;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(a);if("number"===c&&isFinite(a))return u.long?function(o){var i=Math.abs(o);if(i>=n)return s(o,i,n,"day");if(i>=r)return s(o,i,r,"hour");if(i>=t)return s(o,i,t,"minute");if(i>=e)return s(o,i,e,"second");return o+" ms"}(a):function(o){var i=Math.abs(o);if(i>=n)return Math.round(o/n)+"d";if(i>=r)return Math.round(o/r)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},wt}function kt(){if(Ct)return It;return Ct=1,It=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=Ot(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t},It}var St,_t,Nt,At,Rt,Mt,Lt={exports:{}};function Ft(){if(At)return Nt;At=1;const e=n,r=t,o=_t?St:(_t=1,St=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)}),{env:i}=process;let s;function a(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(t,r){if(0===s)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(t&&!r&&void 0===s)return 0;const n=s||0;if("dumb"===i.TERM)return n;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in i))||"codeship"===i.CI_NAME?1:n;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:n}return o("no-color")||o("no-colors")||o("color=false")||o("color=never")?s=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(s=1),"FORCE_COLOR"in i&&(s="true"===i.FORCE_COLOR?1:"false"===i.FORCE_COLOR?0:0===i.FORCE_COLOR.length?1:Math.min(parseInt(i.FORCE_COLOR,10),3)),Nt={supportsColor:function(e){return a(u(e,e&&e.isTTY))},stdout:a(u(!0,r.isatty(1))),stderr:a(u(!0,r.isatty(2)))}}function jt(){return Rt||(Rt=1,function(e,n){const o=t,i=r;n.init=function(e){e.inspectOpts={};const t=Object.keys(n.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=n.inspectOpts[t[r]]},n.log=function(...e){return process.stderr.write(i.format(...e)+"\n")},n.formatArgs=function(t){const{namespace:r,useColors:o}=this;if(o){const n=this.color,o="[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${r} `;t[0]=i+t[0].split("\n").join("\n"+i),t.push(o+"m+"+e.exports.humanize(this.diff)+"")}else t[0]=function(){if(n.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+t[0]},n.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},n.load=function(){return process.env.DEBUG},n.useColors=function(){return"colors"in n.inspectOpts?Boolean(n.inspectOpts.colors):o.isatty(process.stderr.fd)},n.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),n.colors=[6,2,3,4,5,1];try{const e=Ft();e&&(e.stderr||e).level>=2&&(n.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}n.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=kt()(n);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}}(Lt,Lt.exports)),Lt.exports}Mt=Tt,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Mt.exports=(Bt||(Bt=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=kt()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Ut,Ut.exports)),Ut.exports):Mt.exports=jt();var Pt=D.exports,Dt=Tt.exports("bitsyntax-Interpreter");function qt(e,t,r,n,o){switch(r){case 1:return o?e.readInt8(t):e.readUInt8(t);case 2:return n?o?e.readInt16BE(t):e.readUInt16BE(t):o?e.readInt16LE(t):e.readUInt16LE(t);case 4:return n?o?e.readInt32BE(t):e.readUInt32BE(t):o?e.readInt32LE(t):e.readUInt32LE(t);case 8:return n?(o?Pt.readInt64BE:Pt.readUInt64BE)(e,t):(o?Pt.readInt64LE:Pt.readUInt64LE)(e,t);default:throw"Integers must be 8-, 16-, 32- or 64-bit"}}function Ht(e,t,r,n){switch(r){case 4:return n?e.readFloatBE(t):e.readFloatLE(t);case 8:return n?e.readDoubleBE(t):e.readDoubleLE(t);default:throw"Floats must be 32- or 64-bit"}}function $t(e,t){var r=e.size;return"string"==typeof r?t[r]:r}xt.match=function(e,t,r){var n=0,o=function(e){function t(){}return t.prototype=e,new t}(r),i=8*t.length;function s(e){Dt("skip bits"),Dt(e);var t=$t(e,o);if(!0===t)return n%8==0&&(n=i,!0);var r=e.unit*t;if(n+r>i)return!1;n+=r}function a(e){Dt("get_integer"),Dt(e);var r=e.unit,s=$t(e,o)*r,a=n/8;return n+=s,!(s%8>0||n>i)&&qt(t,a,s/8,e.bigendian,e.signed)}function u(e){Dt("get_float"),Dt(e);var r=e.unit,s=$t(e,o)*r,a=n/8;return!((n+=s)>i)&&Ht(t,a,s/8,e.bigendian)}function c(e){Dt("get_binary"),Dt(e);var r=e.unit,s=$t(e,o),a=n/8;if(!0===s)return n=i,t.slice(a);var u=s*r;return!(u%8>0||n+u>i)&&(n+=u,t.slice(a,a+u/8))}function l(e){Dt("get_string"),Dt(e);var r=e.value.length,o=n/8;return!((n+=8*r)>i)&&t.slice(o,o+r).toString("utf8")}for(var f=e.length,h=0;h<f;h++){var d=e[h],p=!1;if("_"===d.name)p=s(d);else{switch(d.type){case"string":p=l(d);break;case"integer":p=a(d);break;case"float":p=u(d);break;case"binary":p=c(d)}if(!1===p)return!1;if(d.name)o[d.name]=p;else if(d.value!=p)return!1}}return n==i&&function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}(o)},xt.parse_int=qt,xt.parse_float=Ht;var zt={},Kt={exports:{}};!function(e,t){var r=o,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),i(n,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var o=n(e);return void 0!==t?"string"==typeof r?o.fill(t,r):o.fill(t):o.fill(0),o},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(Kt,Kt.exports);var Gt=D.exports,Vt=Kt.exports.Buffer;function Qt(e,t,r,n){for(var o=0,i=r.length;o<i;o++){var s=r[o];switch(s.type){case"string":t+=e.write(s.value,t,"utf8");break;case"binary":t+=Jt(s,e,t,n);break;case"integer":t+=Xt(s,e,t,n);break;case"float":t+=er(s,e,t,n)}}return t}function Wt(e,t){var r=function(e,t){for(var r=0,n=0,o=e.length;n<o;n++)r+=Yt(e[n],t);return r}(e,t),n=Vt.alloc(r);return Qt(n,0,e,t),n}function Yt(e,t){return"string"==typeof e.size?t[e.size]*e.unit/8:"string"===e.type?Vt.byteLength(e.value,"utf8"):"binary"===e.type&&!0===e.size?t[e.name].length:e.size*e.unit/8}function Jt(e,t,r,n){var o=n[e.name],i=Yt(e,n);return o.copy(t,r,0,i),i}function Xt(e,t,r,n){return Zt(t,e.name?n[e.name]:e.value,r,Yt(e,n),e.bigendian)}function Zt(e,t,r,n,o){switch(n){case 1:e.writeUInt8(t,r);break;case 2:o?e.writeUInt16BE(t,r):e.writeUInt16LE(t,r);break;case 4:o?e.writeUInt32BE(t,r):e.writeUInt32LE(t,r);break;case 8:o?Gt.writeUInt64BE(e,t,r):Gt.writeUInt64LE(e,t,r);break;default:throw new Error("integer size * unit must be 8, 16, 32 or 64")}return n}function er(e,t,r,n){return tr(t,e.name?n[e.name]:e.value,r,Yt(e,n),e.bigendian)}function tr(e,t,r,n,o){if(4===n)o?e.writeFloatBE(t,r):e.writeFloatLE(t,r);else{if(8!==n)throw new Error("float size * unit must be 32 or 64");o?e.writeDoubleBE(t,r):e.writeDoubleLE(t,r)}return n}var rr=ut.parse;zt.write=Qt,zt.build=Wt,zt.write_int=Zt,zt.write_float=tr,zt.builder=function(e){e=arguments.length>1?[].join.call(arguments,","):e;var t=rr(e);return function(e){return Wt(t,e)}};var nr={},or=r.format,ir=ut.parse,sr=xt,ar=sr.parse_int,ur=sr.parse_float,cr=zt,lr=cr.write_int,fr=cr.write_float,hr=Kt.exports.Buffer,dr=[];function pr(){dr=[]}function gr(){dr.push(or.apply(null,arguments))}function mr(){return dr.join("\n")}function vr(e){return"string"==typeof e.size?or("%s * %d",yr(e.size),e.unit):(e.size*e.unit).toString()}function br(e){if("_"===e.name)!function(e){if("string"==typeof e.size)gr("var skipbits = %s * %d;",yr(e.size),e.unit),gr("if (offset + skipbits > binsize) { return false; }"),gr("else { offset += skipbits; }");else if(!0===e.size)gr("if (offset % 8 === 0) { offset = binsize; }"),gr("else { return false; }");else{var t=e.unit*e.size;gr("if (offset + %d > binsize) { return false; }",t),gr("else { offset += %d; }",t)}}(e);else{switch(e.type){case"integer":case"float":!function(e){gr("bits = %s;\n",vr(e));var t="integer"===e.type?"parse_int":"parse_float",r=e.bigendian,n=e.signed;gr("byteoffset = offset / 8; offset += bits"),gr("if (offset > binsize) { return false; }"),gr("else { result = %s(bin, byteoffset, bits / 8, %s, %s); }",t,r,n)}(e);break;case"binary":!function(e){gr("byteoffset = offset / 8;"),!0===e.size?(gr("offset = binsize;"),gr("result = bin.slice(byteoffset);")):(gr("bits = %s;",vr(e)),gr("offset += bits;"),gr("if (offset > binsize) { return false; }"),gr("else { result = bin.slice(byteoffset,","byteoffset + bits / 8); }"))}(e);break;case"string":!function(e){gr("byteoffset = offset / 8;");var t=e.value.length;gr("offset += %d;",8*t),gr("if (offset > binsize) { return false; }"),gr("else { result = bin.toString(byteoffset,",or("byteoffset + %d); }",t))}(e)}if(gr("if (result === false) return false;"),e.name)gr("else if (%s !== undefined) {",yr(e.name)),gr("if (%s != result) return false;",yr(e.name)),gr("}"),gr("else %s = result;",yr(e.name));else gr("else if (result != %s) return false;",JSON.stringify(e.value))}}function yr(e){return"var_"+e}function wr(e){pr(),gr("return function(binary, env) {"),gr("'use strict';"),gr("var bin = binary, env = env || {};"),gr("var offset = 0, binsize = bin.length * 8;"),gr("var bits, result, byteoffset;");for(var t=function(e){for(var t={},r=0;r<e.length;r++){var n=e[r].name;n&&"_"!==n&&(t[n]=!0),"string"==typeof(n=e[r].size)&&(t[n]=!0)}return Object.keys(t)}(e),r=0;r<t.length;r++){gr("var %s = env['%s'];",yr(s=t[r]),s)}for(var n=e.length,o=0;o<n;o++){var i=e[o];gr("// "+JSON.stringify(i)),br(i)}gr("if (offset == binsize) {"),gr("return {");for(r=0;r<t.length;r++){var s;gr("%s: %s,",s=t[r],yr(s))}return gr("};"),gr("}"),gr("else return false;"),gr("}"),new Function("parse_int","parse_float",mr())(ar,ur)}function Er(e){switch(e.type){case"string":gr("offset += buf.write(%s, offset, 'utf8');",JSON.stringify(e.value));break;case"binary":gr("val = bindings['%s'];",e.name),!0===e.size?gr("size = val.length;"):"string"==typeof e.size?gr("size = (bindings['%s'] * %d) / 8;",e.size,e.unit):gr("size = %d;",e.size*e.unit/8),gr("val.copy(buf, offset, 0, size);"),gr("offset += size;");break;case"integer":case"float":!function(e){e.name?gr("val = bindings['%s'];",e.name):gr("val = %d",e.value);var t="integer"===e.type?"write_int":"write_float";"string"==typeof e.size?gr("size = (bindings['%s'] * %d) / 8;",e.size,e.unit):gr("size = %d;",e.size*e.unit/8);gr("%s(buf, val, offset, size, %s);",t,e.bigendian),gr("offset += size;")}(e)}}function Ir(e){return pr(),gr("return function(bindings) {"),gr("'use strict';"),function(e){for(var t=[],r=0,n=0;n<e.length;n++)"string"==typeof(i=e[n]).size||!0===i.size?t.push(i):"string"===i.type?r+=hr.byteLength(i.value):r+=i.size*i.unit/8;if(gr("var buffersize = %d;",r),t.length>0)for(var o=0;o<t.length;o++){var i;!0===(i=t[o]).size?gr("buffersize += bindings['%s'].length;",i.name):gr("buffersize += (bindings['%s'] * %d) / 8;",i.size,i.unit)}}(e),gr("var buf = Buffer.alloc(buffersize);"),gr("var offset = 0;"),function(e){gr("var val, size;");for(var t=e.length,r=0;r<t;r++){var n=e[r];gr("// %s",JSON.stringify(n)),Er(n)}}(e),gr("return buf;"),gr("}"),new Function("write_int","write_float","Buffer",mr())(lr,fr,hr)}nr.compile_pattern=wr,nr.compile=function(){var e=[].join.call(arguments,","),t=ir(e);return wr(t)},nr.compile_builder=function(){var e=[].join.call(arguments,","),t=ir(e);return Ir(t)},at.parse=ut.parse,at.match=xt.match,at.build=zt.build,at.write=zt.write,at.matcher=at.compile=nr.compile,at.builder=nr.compile_builder;var Cr=j,Br=Cr.constants,xr=Cr.decode,Tr=at;st.PROTOCOL_HEADER="AMQP"+String.fromCharCode(0,0,9,1);var Ur=Br.FRAME_METHOD,Or=Br.FRAME_HEARTBEAT,kr=Br.FRAME_HEADER,Sr=Br.FRAME_BODY,_r=Br.FRAME_END,Nr=Tr.builder(Sr,"channel:16, size:32, payload:size/binary",_r);st.makeBodyFrame=function(e,t){return Nr({channel:e,size:t.length,payload:t})};var Ar=Tr.matcher("type:8","channel:16","size:32","rest/binary");st.parseFrame=function(e,t){var r=Ar(e);if(r){var n=r.size,o=r.rest;if(n>t)throw new Error("Frame size exceeds frame max");if(o.length>n){if(o[n]!==_r)throw new Error("Invalid frame");return{type:r.type,channel:r.channel,size:n,payload:o.slice(0,n),rest:o.slice(n+1)}}}return!1};var Rr=Tr.matcher("class:16","_weight:16","size:64","flagsAndfields/binary"),Mr=Tr.matcher("id:32, args/binary"),Lr={channel:0};st.decodeFrame=function(e){var t=e.payload;switch(e.type){case Ur:var r=Mr(t),n=r.id,o=xr(n,r.args);return{id:n,channel:e.channel,fields:o};case kr:var i=Rr(t);n=i.class,o=xr(n,i.flagsAndfields);return{id:n,channel:e.channel,size:i.size,fields:o};case Sr:return{channel:e.channel,content:e.payload};case Or:return Lr;default:throw new Error("Unknown frame type "+e.type)}},st.HEARTBEAT_BUF=Buffer.from([Br.FRAME_HEARTBEAT,0,0,0,0,0,0,Br.FRAME_END]),st.HEARTBEAT=Lr;var Fr={},jr=i,Pr="function"==typeof setImmediate?setImmediate:process.nextTick;function Dr(e){this.newStreams=[],this.oldStreams=[],this.blocked=!1,this.scheduledRead=!1,this.out=e;var t=this;e.on("drain",(function(){t.blocked=!1,t._readIncoming()}))}Dr.prototype._readIncoming=function(){if(!this.blocked){var e=!0,t=this.out;r(this.newStreams),e?(jr.equal(0,this.newStreams.length),r(this.oldStreams)):(jr(this.newStreams.length>0,"Expect some new streams to remain"),Array.prototype.push.apply(this.oldStreams,this.newStreams),this.newStreams=[]),this.blocked=!e}function r(r){for(var n;e&&(n=r.shift());){var o=n.read();null!==o&&(e=t.write(o),r.push(n))}}},Dr.prototype._scheduleRead=function(){var e=this;e.scheduledRead||(Pr((function(){e.scheduledRead=!1,e._readIncoming()})),e.scheduledRead=!0)},Dr.prototype.pipeFrom=function(e){var t=this;function r(){t.newStreams.push(e),t._scheduleRead()}function n(){e.removeListener("readable",r),e.removeListener("error",n),e.removeListener("end",n),e.removeListener("unpipeFrom",o)}function o(e){e===t&&n()}e.on("unpipeFrom",o),e.on("end",n),e.on("error",n),e.on("readable",r)},Dr.prototype.unpipeFrom=function(e){e.emit("unpipeFrom",this)},Fr.Mux=Dr;var qr,Hr={exports:{}},$r={};function zr(){if(qr)return $r;function e(e){return Object.prototype.toString.call(e)}return qr=1,$r.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},$r.isBoolean=function(e){return"boolean"==typeof e},$r.isNull=function(e){return null===e},$r.isNullOrUndefined=function(e){return null==e},$r.isNumber=function(e){return"number"==typeof e},$r.isString=function(e){return"string"==typeof e},$r.isSymbol=function(e){return"symbol"==typeof e},$r.isUndefined=function(e){return void 0===e},$r.isRegExp=function(t){return"[object RegExp]"===e(t)},$r.isObject=function(e){return"object"==typeof e&&null!==e},$r.isDate=function(t){return"[object Date]"===e(t)},$r.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},$r.isFunction=function(e){return"function"==typeof e},$r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},$r.isBuffer=o.Buffer.isBuffer,$r}var Kr,Gr,Vr,Qr,Wr,Yr,Jr,Xr,Zr,en,tn,rn={exports:{}},nn={exports:{}};function on(){return Gr||(Gr=1,function(e){try{var t=require("util");if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=(Kr||(Kr=1,"function"==typeof Object.create?nn.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:nn.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}),nn.exports)}}(rn)),rn.exports}function sn(){if(Yr)return Wr;Yr=1,Wr=d;var e=Qr?Vr:(Qr=1,Vr=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}),t=o.Buffer;d.ReadableState=h;var n=a.EventEmitter;n.listenerCount||(n.listenerCount=function(e,t){return e.listeners(t).length});var i,c=s,l=zr();l.inherits=on();var f=r;function h(e,t){var r=un(),n=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=n||0===n?n:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,t instanceof r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(i||(i=u.StringDecoder),this.decoder=new i(e.encoding),this.encoding=e.encoding)}function d(e){if(un(),!(this instanceof d))return new d(e);this._readableState=new h(e,this),this.readable=!0,c.call(this)}function p(e,t,r,n,o){var i=function(e,t){var r=null;l.isBuffer(t)||l.isString(t)||l.isNullOrUndefined(t)||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(i)e.emit("error",i);else if(l.isNullOrUndefined(r))t.reading=!1,t.ended||function(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,v(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!o){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&o){s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||o||n||(r=t.decoder.write(r)),o||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,o?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&v(e)),function(e,t){t.readingMore||(t.readingMore=!0,process.nextTick((function(){!function(e,t){var r=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}(e,t)})))}(e,t);else o||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}f=f&&f.debuglog?f.debuglog("stream"):function(){},l.inherits(d,c),d.prototype.push=function(e,r){var n=this._readableState;return l.isString(e)&&!n.objectMode&&(r=r||n.defaultEncoding)!==n.encoding&&(e=new t(e,r),r=""),p(this,n,e,r,!1)},d.prototype.unshift=function(e){return p(this,this._readableState,e,"",!0)},d.prototype.setEncoding=function(e){return i||(i=u.StringDecoder),this._readableState.decoder=new i(e),this._readableState.encoding=e,this};var g=8388608;function m(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||l.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>=g)e=g;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function v(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?process.nextTick((function(){b(e)})):b(e))}function b(e){f("emit readable"),e.emit("readable"),y(e)}function y(e){var t=e._readableState;if(f("flow",t.flowing),t.flowing)do{var r=e.read()}while(null!==r&&t.flowing)}function w(e,r){var n,o=r.buffer,i=r.length,s=!!r.decoder,a=!!r.objectMode;if(0===o.length)return null;if(0===i)n=null;else if(a)n=o.shift();else if(!e||e>=i)n=s?o.join(""):t.concat(o,i),o.length=0;else{if(e<o[0].length)n=(f=o[0]).slice(0,e),o[0]=f.slice(e);else if(e===o[0].length)n=o.shift();else{n=s?"":new t(e);for(var u=0,c=0,l=o.length;c<l&&u<e;c++){var f=o[0],h=Math.min(e-u,f.length);s?n+=f.slice(0,h):f.copy(n,u,0,h),h<f.length?o[0]=f.slice(h):o.shift(),u+=h}}}return n}function E(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,process.nextTick((function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))})))}return d.prototype.read=function(e){f("read",e);var t=this._readableState,r=e;if((!l.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):v(this),null;if(0===(e=m(e,t))&&t.ended)return 0===t.length&&E(this),null;var n,o=t.needReadable;return f("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",o=!0),(t.ended||t.reading)&&f("reading or ended",o=!1),o&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),o&&!t.reading&&(e=m(r,t)),n=e>0?w(e,t):null,l.isNull(n)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&E(this),l.isNull(n)||this.emit("data",n),n},d.prototype._read=function(e){this.emit("error",new Error("not implemented"))},d.prototype.pipe=function(t,r){var o=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,r);var s=(!r||!1!==r.end)&&t!==process.stdout&&t!==process.stderr?u:l;function a(e){f("onunpipe"),e===o&&l()}function u(){f("onend"),t.end()}i.endEmitted?process.nextTick(s):o.once("end",s),t.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n.listenerCount(e,"data")&&(t.flowing=!0,y(e))}}(o);function l(){f("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",c),t.removeListener("error",d),t.removeListener("unpipe",a),o.removeListener("end",u),o.removeListener("end",l),o.removeListener("data",h),!i.awaitDrain||t._writableState&&!t._writableState.needDrain||c()}function h(e){f("ondata"),!1===t.write(e)&&(f("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++,o.pause())}function d(e){f("onerror",e),m(),t.removeListener("error",d),0===n.listenerCount(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",g),m()}function g(){f("onfinish"),t.removeListener("close",p),m()}function m(){f("unpipe"),o.unpipe(t)}return t.on("drain",c),o.on("data",h),t._events&&t._events.error?e(t._events.error)?t._events.error.unshift(d):t._events.error=[d,t._events.error]:t.on("error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",o),i.flowing||(f("pipe resume"),o.resume()),t},d.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this);return this}o=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},d.prototype.on=function(e,t){var r=c.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var n=this._readableState;if(!n.readableListening)if(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading)n.length&&v(this);else{var o=this;process.nextTick((function(){f("readable nexttick read 0"),o.read(0)}))}}return r},d.prototype.addListener=d.prototype.on,d.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,e.reading||(f("resume read 0"),this.read(0)),function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick((function(){!function(e,t){t.resumeScheduled=!1,e.emit("resume"),y(e),t.flowing&&!t.reading&&e.read(0)}(e,t)})))}(this,e)),this},d.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},d.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var o in e.on("end",(function(){if(f("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(o){(f("wrapped data"),t.decoder&&(o=t.decoder.write(o)),o&&(t.objectMode||o.length))&&(n.push(o)||(r=!0,e.pause()))})),e)l.isFunction(e[o])&&l.isUndefined(this[o])&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));return function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,n.emit.bind(n,t))})),n._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume())},n},d._fromList=w,Wr}function an(){if(Xr)return Jr;Xr=1,Jr=a;var e=o.Buffer;a.WritableState=i;var t=zr();t.inherits=on();var r=s;function n(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function i(e,t){var r=un(),n=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=n||0===n?n:o,this.objectMode=!!e.objectMode,t instanceof r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){r?process.nextTick((function(){t.pendingcb--,o(n)})):(t.pendingcb--,o(n));e._writableState.errorEmitted=!0,e.emit("error",n)}(e,r,n,t,o);else{var i=f(e,r);i||r.corked||r.bufferProcessing||!r.buffer.length||l(e,r),n?process.nextTick((function(){c(e,r,i,o)})):c(e,r,i,o)}}(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function a(e){var t=un();if(!(this instanceof a||this instanceof t))return new a(e);this._writableState=new i(e,this),this.writable=!0,r.call(this)}function u(e,t,r,n,o,i,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function c(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),d(e,t)}function l(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var r=[],n=0;n<t.buffer.length;n++)r.push(t.buffer[n].callback);t.pendingcb++,u(e,t,!0,t.length,t.buffer,"",(function(e){for(var n=0;n<r.length;n++)t.pendingcb--,r[n](e)})),t.buffer=[]}else{for(n=0;n<t.buffer.length;n++){var o=t.buffer[n],i=o.chunk,s=o.encoding,a=o.callback,c=t.objectMode?1:i.length;if(u(e,t,!1,c,i,s,a),t.writing){n++;break}}n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}t.bufferProcessing=!1}function f(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function h(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function d(e,t){var r=f(0,t);return r&&(0===t.pendingcb?(h(e,t),t.finished=!0,e.emit("finish")):h(e,t)),r}return t.inherits(a,r),a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},a.prototype.write=function(r,o,i){var s=this._writableState,a=!1;return t.isFunction(o)&&(i=o,o=null),t.isBuffer(r)?o="buffer":o||(o=s.defaultEncoding),t.isFunction(i)||(i=function(){}),s.ended?function(e,t,r){var n=new Error("write after end");e.emit("error",n),process.nextTick((function(){r(n)}))}(this,0,i):function(e,r,n,o){var i=!0;if(!(t.isBuffer(n)||t.isString(n)||t.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),process.nextTick((function(){o(s)})),i=!1}return i}(this,s,r,i)&&(s.pendingcb++,a=function(r,o,i,s,a){i=function(r,n,o){!r.objectMode&&!1!==r.decodeStrings&&t.isString(n)&&(n=new e(n,o));return n}(o,i,s),t.isBuffer(i)&&(s="buffer");var c=o.objectMode?1:i.length;o.length+=c;var l=o.length<o.highWaterMark;l||(o.needDrain=!0);o.writing||o.corked?o.buffer.push(new n(i,s,a)):u(r,o,!1,c,i,s,a);return l}(this,s,r,o,i)),a},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||l(this,e))},a.prototype._write=function(e,t,r){r(new Error("not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,r,n){var o=this._writableState;t.isFunction(e)?(n=e,e=null,r=null):t.isFunction(r)&&(n=r,r=null),t.isNullOrUndefined(e)||this.write(e,r),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||function(e,t,r){t.ending=!0,d(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0}(this,o,n)},Jr}function un(){if(en)return Zr;en=1,Zr=o;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},t=zr();t.inherits=on();var r=sn(),n=an();function o(e){if(!(this instanceof o))return new o(e);r.call(this,e),n.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}return t.inherits(o,r),function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(e(n.prototype),(function(e){o.prototype[e]||(o.prototype[e]=n.prototype[e])})),Zr}var cn={exports:{}};!function(e){var t=r.inherits,n=a.EventEmitter;function o(t,r,o){n.call(this),this.interval=t;var i=t*e.exports.UNITS_TO_MS,s=this.emit.bind(this,"beat"),a=this.emit.bind(this,"timeout");this.sendTimer=setInterval(this.runHeartbeat.bind(this,r,s),i/2);var u=0;this.recvTimer=setInterval(this.runHeartbeat.bind(this,(function(){return o()?(u=0,!0):++u<2}),a),i)}e.exports.UNITS_TO_MS=1e3,t(o,n),e.exports.Heart=o,o.prototype.clear=function(){clearInterval(this.sendTimer),clearInterval(this.recvTimer)},o.prototype.runHeartbeat=function(e,t){e()||t()}}(cn);var ln={},fn=j,hn=r.format;r.inherits;var dn=st.HEARTBEAT;ln.closeMessage=function(e){var t=e.fields.replyCode;return hn('%d (%s) with message "%s"',t,fn.constant_strs[t],e.fields.replyText)},ln.methodName=function(e){return fn.info(e).name},ln.inspect=function(e,t){if(e===dn)return"<Heartbeat>";if(e.id){var r=fn.info(e.id);return hn("<%s channel:%d%s>",r.name,e.channel,t?" "+JSON.stringify(e.fields,void 0,2):"")}return hn("<Content channel:%d size:%d>",e.channel,e.size)};var pn={};function gn(e){return Math.floor(e/32)}function mn(e){if(0===e)return 32;let t,r=31;return t=e<<16,0!=t&&(r-=16,e=t),t=e<<8,0!=t&&(r-=8,e=t),t=e<<4,0!=t&&(r-=4,e=t),t=e<<2,0!=t&&(r-=2,e=t),r-(e<<1>>>31)}pn.BitSet=class{constructor(e){if(e){const t=Math.ceil(e/32);this.words=new Array(t)}else this.words=[];this.wordsInUse=0}ensureSize(e){const t=this.words.length;t<e&&(this.words=this.words.concat(new Array(e-t)))}set(e){const t=gn(e);t>=this.wordsInUse&&(this.ensureSize(t+1),this.wordsInUse=t+1);const r=1<<e;this.words[t]|=r}clear(e){const t=gn(e);if(t>=this.wordsInUse)return;const r=~(1<<e);this.words[t]&=r}get(e){const t=gn(e);if(t>=this.wordsInUse)return!1;const r=1<<e;return!!(this.words[t]&r)}nextSetBit(e){let t=gn(e);if(t>=this.wordsInUse)return-1;let r=this.words[t]&4294967295<<e;for(;;){if(r)return 32*t+mn(r);if(t++,t===this.wordsInUse)return-1;r=this.words[t]}}nextClearBit(e){let t=gn(e);if(t>=this.wordsInUse)return e;let r=~this.words[t]&4294967295<<e;for(;;){if(r)return 32*t+mn(r);if(t++,t==this.wordsInUse)return 32*t;r=~this.words[t]}}};var vn,bn,yn,wn,En,In={exports:{}};function Cn(){if(bn)return vn;bn=1,vn=n;var e=un(),t=zr();function r(e,r){this.afterTransform=function(e,n){return function(e,r,n){var o=e._transformState;o.transforming=!1;var i=o.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));o.writechunk=null,o.writecb=null,t.isNullOrUndefined(n)||e.push(n);i&&i(r);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}(r,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function n(i){if(!(this instanceof n))return new n(i);e.call(this,i),this._transformState=new r(i,this);var s=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",(function(){t.isFunction(this._flush)?this._flush((function(e){o(s,e)})):o(s)}))}function o(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}return t.inherits=on(),t.inherits(n,e),n.prototype.push=function(t,r){return this._transformState.needTransform=!1,e.prototype.push.call(this,t,r)},n.prototype._transform=function(e,t,r){throw new Error("not implemented")},n.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},n.prototype._read=function(e){var r=this._transformState;t.isNull(r.writechunk)||!r.writecb||r.transforming?r.needTransform=!0:(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform))},vn}var Bn={};function xn(e,t){return e&&e.split("\n").slice(t).join("\n")}function Tn(e,t){var r=new Error;this.message=e,this.stack=this.toString()+"\n"+xn(r.stack,2),this.stackAtStateChange=t}(0,r.inherits)(Tn,Error),Tn.prototype.name="IllegalOperationError",Bn.IllegalOperationError=Tn,Bn.stackCapture=function(e){return"Stack capture: "+e+"\n"+xn((new Error).stack,2)};var Un=j,On=Un.constants,kn=st,Sn=kn.HEARTBEAT,_n=Fr.Mux,Nn=s.Duplex||(tn?Hr.exports:(tn=1,Hr.exports=un())),An=a.EventEmitter,Rn=cn.exports.Heart,Mn=ln.methodName,Ln=ln.closeMessage,Fn=ln.inspect,jn=pn.BitSet,Pn=r.inherits,Dn=r.format,qn=s.PassThrough||(En?In.exports:(En=1,In.exports=function(){if(wn)return yn;wn=1,yn=r;var e=Cn(),t=zr();function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t.inherits=on(),t.inherits(r,e),r.prototype._transform=function(e,t,r){r(null,e)},yn}())),Hn=Bn.IllegalOperationError,$n=Bn.stackCapture;function zn(e){An.call(this);var t=this.stream=function(e){if(e instanceof Nn)return e;var t=new Nn;return t.wrap(e),t._write=function(t,r,n){return e.write(t,r,n)},t}(e);this.muxer=new _n(t),this.rest=Buffer.alloc(0),this.frameMax=On.FRAME_MIN_SIZE,this.sentSinceLastCheck=!1,this.recvSinceLastCheck=!1,this.expectSocketClose=!1,this.freeChannels=new jn,this.channels=[{channel:{accept:Vn(this)},buffer:e}]}Pn(zn,An);var Kn=zn.prototype;function Gn(e){var t=this.channels[e.channel];if(t)return t.channel.accept(e);this.closeWithError(Dn("Frame on unknown channel %d",e.channel),On.CHANNEL_ERROR,new Error(Dn("Frame on unknown channel: %s",Fn(e,!1))))}function Vn(e){return function(t){if(t===Sn);else if(t.id===Un.ConnectionClose){e.sendMethod(0,Un.ConnectionCloseOk,{});var r=Dn("Connection closed: %s",Ln(t)),n=$n(r),o=new Error(r);o.code=t.fields.replyCode,ro(o)&&e.emit("error",o),e.toClosed(n,o)}else t.id===Un.ConnectionBlocked?e.emit("blocked",t.fields.reason):t.id===Un.ConnectionUnblocked?e.emit("unblocked"):e.closeWithError(Dn("Unexpected frame on channel 0"),On.UNEXPECTED_FRAME,new Error(Dn("Unexpected frame on channel 0: %s",Fn(t,!1))))}}function Qn(e,t){return function(){throw new Hn(e,t)}}function Wn(e,t,r){e.sendMethod=e.sendContent=e.sendMessage=Qn(t,r)}Kn.sendProtocolHeader=function(){this.sendBytes(kn.PROTOCOL_HEADER)},Kn.open=function(e,t){var r=this,n=t||function(){},o=Object.create(e);function i(e){r.step((function(t,r){null!==t?a(t):0!==r.channel?a(new Error(Dn("Frame on channel != 0 during handshake: %s",Fn(r,!1)))):e(r)}))}function s(e,t){i((function(r){r.id===e?t(r):a(new Error(Dn("Expected %s; got %s",Mn(e),Fn(r,!1))))}))}function a(e){n(e)}function u(e){r.sendMethod(0,e,o)}function c(e,t){return 0===e||0===t?Math.max(e,t):Math.min(e,t)}function l(t){switch(t.id){case Un.ConnectionSecure:a(new Error("Wasn't expecting to have to go through secure"));break;case Un.ConnectionClose:a(new Error(Dn("Handshake terminated by server: %s",Ln(t))));break;case Un.ConnectionTune:var r=t.fields;o.frameMax=c(r.frameMax,e.frameMax),o.channelMax=c(r.channelMax,e.channelMax),o.heartbeat=c(r.heartbeat,e.heartbeat);try{u(Un.ConnectionTuneOk),u(Un.ConnectionOpen)}catch(e){return void a(e)}s(Un.ConnectionOpenOk,f);break;default:a(new Error(Dn("Expected connection.secure, connection.close, or connection.tune during handshake; got %s",Fn(t,!1))))}}function f(e){var t;r.channelMax=o.channelMax||65535,r.frameMax=o.frameMax||4294967295,r.heartbeat=o.heartbeat,r.heartbeater=r.startHeartbeater(),r.accept=Gn,t=e,r.stream.removeListener("end",h),r.stream.removeListener("error",h),r.stream.on("error",r.onSocketError.bind(r)),r.stream.on("end",r.onSocketError.bind(r,new Error("Unexpected close"))),r.on("frameError",r.onSocketError.bind(r)),r.acceptLoop(),n(null,t)}function h(e){a(e||new Error("Socket closed abruptly during opening handshake"))}this.stream.on("end",h),this.stream.on("error",h),this.sendProtocolHeader(),s(Un.ConnectionStart,(function(t){if(t.fields.mechanisms.toString().split(" ").indexOf(e.mechanism)<0)a(new Error(Dn("SASL mechanism %s is not provided by the server",e.mechanism)));else{r.serverProperties=t.fields.serverProperties;try{u(Un.ConnectionStartOk)}catch(e){return void a(e)}i(l)}}))},Kn.close=function(e){var t=e&&function(){e(null)};this.closeBecause("Cheers, thanks",On.REPLY_SUCCESS,t)},Kn.closeBecause=function(e,t,r){this.sendMethod(0,Un.ConnectionClose,{replyText:e,replyCode:t,methodId:0,classId:0});var n=$n("closeBecause called: "+e);this.toClosing(n,r)},Kn.closeWithError=function(e,t,r){this.emit("error",r),this.closeBecause(e,t)},Kn.onSocketError=function(e){if(!this.expectSocketClose){this.expectSocketClose=!0,this.emit("error",e);var t=$n("Socket error");this.toClosed(t,e)}},Kn.toClosing=function(e,t){var r=this.sendMethod.bind(this);this.accept=function(e){if(e.id===Un.ConnectionCloseOk){t&&t();var n=$n("ConnectionCloseOk received");this.toClosed(n,void 0)}else e.id===Un.ConnectionClose&&r(0,Un.ConnectionCloseOk,{})},Wn(this,"Connection closing",e)},Kn._closeChannels=function(e){for(var t=1;t<this.channels.length;t++){var r=this.channels[t];null!==r&&r.channel.toClosed(e)}},Kn.toClosed=function(e,t){this._closeChannels(e);var r=Dn("Connection closed (%s)",t?t.toString():"by client");Wn(this,r,e),this.accept=Qn(r,e),this.close=function(t){t&&t(new Hn(r,e))},this.heartbeater&&this.heartbeater.clear(),this.expectSocketClose=!0,this.stream.end(),this.emit("close",t)},Kn.startHeartbeater=function(){if(0===this.heartbeat)return null;var e=this,t=new Rn(this.heartbeat,this.checkSend.bind(this),this.checkRecv.bind(this));return t.on("timeout",(function(){var t=new Error("Heartbeat timeout");e.emit("error",t);var r=$n("Heartbeat timeout");e.toClosed(r,t)})),t.on("beat",(function(){e.sendHeartbeat()})),t},Kn.freshChannel=function(e,t){var r=this.freeChannels.nextClearBit(1);if(r<0||r>this.channelMax)throw new Error("No channels left to allocate");this.freeChannels.set(r);var n=t&&t.highWaterMark||1024,o=new qn({objectMode:!0,highWaterMark:n});return this.channels[r]={channel:e,buffer:o},o.on("drain",(function(){e.onBufferDrain()})),this.muxer.pipeFrom(o),r},Kn.releaseChannel=function(e){this.freeChannels.clear(e),this.channels[e].buffer.end(),this.channels[e]=null},Kn.acceptLoop=function(){var e=this;function t(){try{for(var t;t=e.recvFrame();)e.accept(t)}catch(t){e.emit("frameError",t)}}e.stream.on("readable",t),t()},Kn.step=function(e){var t=this;!function r(){var n;try{n=t.recvFrame()}catch(t){return void e(t,null)}n?e(null,n):t.stream.once("readable",r)}()},Kn.checkSend=function(){var e=this.sentSinceLastCheck;return this.sentSinceLastCheck=!1,e},Kn.checkRecv=function(){var e=this.recvSinceLastCheck;return this.recvSinceLastCheck=!1,e},Kn.sendBytes=function(e){this.sentSinceLastCheck=!0,this.stream.write(e)},Kn.sendHeartbeat=function(){return this.sendBytes(kn.HEARTBEAT_BUF)};var Yn=Un.encodeMethod,Jn=Un.encodeProperties;Kn.sendMethod=function(e,t,r){var n=Yn(t,e,r);return this.sentSinceLastCheck=!0,this.channels[e].buffer.write(n)},Kn.sendMessage=function(e,t,r,n,o,i){if(!Buffer.isBuffer(i))throw new TypeError("content is not a buffer");var s=Yn(t,e,r),a=Jn(n,e,i.length,o),u=this.channels[e].buffer;this.sentSinceLastCheck=!0;var c=s.length+a.length,l=i.length>0?i.length+Xn:0,f=c+l;if(f<2048){var h=Buffer.allocUnsafe(f),d=s.copy(h,0);return d+=a.copy(h,d),l>0&&Zn(e,i).copy(h,d),u.write(h)}if(c<2048){var p=Buffer.allocUnsafe(c);d=s.copy(p,0);a.copy(p,d),u.write(p)}else u.write(s),u.write(a);return this.sendContent(e,i)};var Xn=Un.FRAME_OVERHEAD,Zn=kn.makeBodyFrame;Kn.sendContent=function(e,t){if(!Buffer.isBuffer(t))throw new TypeError(Dn("Expected buffer; got %s",t));for(var r=!0,n=this.channels[e].buffer,o=this.frameMax-Xn,i=0;i<t.length;i+=o){var s=i+o,a=s>t.length?t.slice(i):t.slice(i,s),u=Zn(e,a);r=n.write(u)}return this.sentSinceLastCheck=!0,r};var eo=kn.parseFrame,to=kn.decodeFrame;function ro(e){switch(e&&e.code){case Un.constants.CONNECTION_FORCED:case Un.constants.REPLY_SUCCESS:return!1;default:return!0}}Kn.recvFrame=function(){var e=eo(this.rest,this.frameMax);if(e)return this.rest=e.rest,to(e);var t=this.stream.read();return null!==t&&(this.recvSinceLastCheck=!0,this.rest=Buffer.concat([this.rest,t]),this.recvFrame())},F.Connection=zn,F.isFatalError=ro;var no={},oo=P;no.plain=function(e,t){return{mechanism:"PLAIN",response:function(){return Buffer.from(["",e,t].join(String.fromCharCode(0)))},username:e,password:t}},no.amqplain=function(e,t){return{mechanism:"AMQPLAIN",response:function(){const r=Buffer.alloc(16384),n=oo.encodeTable(r,{LOGIN:e,PASSWORD:t},0);return r.slice(4,n)},username:e,password:t}},no.external=function(){return{mechanism:"EXTERNAL",response:function(){return Buffer.from("")}}};var io="0.10.3",so=L,ao=e,uo=F.Connection,co=r.format,lo=no;function fo(e,t){for(var r=Object.keys(e),n=r.length;n--;){var o=r[n];t[o]=e[o]}return t}var ho={product:"amqplib",version:io,platform:co("Node.JS %s",process.version),information:"http://squaremo.github.io/amqp.node",capabilities:{publisher_confirms:!0,exchange_exchange_bindings:!0,"basic.nack":!0,consumer_cancel_notify:!0,"connection.blocked":!0,authentication_failure_close:!0}};function po(e,t,r,n){e=e?ao.unescape(e):"/";t=t||{};function o(e,t){return void 0===e?t:parseInt(e)}return{clientProperties:fo(n,Object.create(ho)),mechanism:r.mechanism,response:r.response(),locale:t.locale||"en_US",channelMax:o(t.channelMax,0),frameMax:o(t.frameMax,4096),heartbeat:o(t.heartbeat,0),virtualHost:e,capabilities:"",insist:0}}function go(e){var t="guest",r="guest";return""==e.username&&""==e.password||(t=e.username?unescape(e.username):"",r=e.password?unescape(e.password):""),lo.plain(t,r)}m.connect=function(e,t,r){var n=fo(t||{},{});e=e||"amqp://localhost";var o,i,s=!!n.noDelay,a=n.timeout,u=!!n.keepAlive,f=n.keepAliveDelay||0,h=n.clientProperties||{};if("object"==typeof e){var d,p;o=(e.protocol||"amqp")+":",n.host=e.hostname,n.servername=n.servername||e.hostname,n.port=e.port||("amqp:"===o?5672:5671),null==e.username&&null==e.password?(d="guest",p="guest"):(d=e.username||"",p=e.password||"");var g={locale:e.locale,channelMax:e.channelMax,frameMax:e.frameMax,heartbeat:e.heartbeat};i=po(e.vhost,g,n.credentials||lo.plain(d,p),h)}else{var m=so(e,!0);o=m.protocol,n.host=m.hostname,n.servername=n.servername||m.hostname,n.port=parseInt(m.port)||("amqp:"===o?5672:5671);var v=m.pathname?m.pathname.substr(1):null;i=po(v,m.query,n.credentials||go(m),h)}var b,y=!1;function w(){y=!0,b.setNoDelay(s),u&&b.setKeepAlive(u,f);var e=new uo(b);e.open(i,(function(t,n){a&&b.setTimeout(0),null===t?r(null,e):(b.end(),b.destroy(),r(t))}))}if("amqp:"===o)b=c.connect(n,w);else{if("amqps:"!==o)throw new Error("Expected amqp: or amqps: as the protocol; got "+o);b=l.connect(n,w)}a&&b.setTimeout(a,(function(){b.end(),b.destroy(),r(new Error("connect ETIMEDOUT"))})),b.once("error",(function(e){y||r(e)}))},m.credentialsFromUrl=go;var mo={},vo={},bo=j,yo=ln.closeMessage,wo=ln.inspect,Eo=ln.methodName,Io=i,Co=r.inherits,Bo=a.EventEmitter,xo=r.format,To=Bn.IllegalOperationError,Uo=Bn.stackCapture;function Oo(e){Bo.call(this),this.connection=e,this.reply=null,this.pending=[],this.lwm=1,this.unconfirmed=[],this.on("ack",this.handleConfirm.bind(this,(function(e){e&&e(null)}))),this.on("nack",this.handleConfirm.bind(this,(function(e){e&&e(new Error("message nacked"))}))),this.on("close",(function(){for(var e;e=this.unconfirmed.shift();)e&&e(new Error("channel closed"))})),this.handleMessage=No}Co(Oo,Bo),vo.Channel=Oo,vo.acceptMessage=Ao;var ko=Oo.prototype;function So(e,t){return function(){throw new To(e,t)}}function _o(e,t,r){e.sendImmediately=e.sendOrEnqueue=e.sendMessage=So(t,r)}function No(e){var t;if(e.id===bo.BasicDeliver)t="delivery";else{if(e.id!==bo.BasicReturn)throw xo("Expected BasicDeliver or BasicReturn; got %s",wo(e));t="return"}var r=this,n=e.fields;return Ao((function(e){e.fields=n,r.emit(t,e)}))}function Ao(e){var t=0,r=0,n=null,o={fields:null,properties:null,content:null};return function(n){if(n.id===bo.BasicProperties)return o.properties=n.fields,0===(t=r=n.size)?(o.content=Buffer.alloc(0),e(o),No):i;throw"Expected headers frame after delivery"};function i(s){if(s.content){var a=s.content.length;if(0===(r-=a))return null!==n?(n.push(s.content),o.content=Buffer.concat(n)):o.content=s.content,e(o),No;if(r<0)throw xo("Too much content sent! Expected %d bytes",t);return null!==n?n.push(s.content):n=[s.content],i}throw"Expected content frame after headers"}}function Ro(e){Oo.call(this,e),this.consumers=new Map}function Mo(e,t,r){null!=r&&(e[t]=r)}ko.allocate=function(){return this.ch=this.connection.freshChannel(this),this},ko.sendImmediately=function(e,t){return this.connection.sendMethod(this.ch,e,t)},ko.sendOrEnqueue=function(e,t,r){this.reply?this.pending.push({method:e,fields:t,reply:r}):(Io(0===this.pending.length),this.reply=r,this.sendImmediately(e,t))},ko.sendMessage=function(e,t,r){return this.connection.sendMessage(this.ch,bo.BasicPublish,e,bo.BasicProperties,t,r)},ko._rpc=function(e,t,r,n){var o=this;this.sendOrEnqueue(e,t,(function(t,i){if(null===t){if(i.id===r)return n(null,i);var s=Eo(r),a=new Error(xo("Expected %s; got %s",s,wo(i,!1)));return o.closeWithError(i.id,xo("Expected %s; got %s",s,Eo(i.id)),bo.constants.UNEXPECTED_FRAME,a),n(a)}if(t instanceof Error)return n(t);var u=(t.fields.classId<<16)+t.fields.methodId,c=(a=e===u?xo("Operation failed: %s; %s",Eo(e),yo(t)):xo("Channel closed by server: %s",yo(t)),new Error(a));return c.code=t.fields.replyCode,c.classId=t.fields.classId,c.methodId=t.fields.methodId,n(c)}))},ko.toClosed=function(e){this._rejectPending(),_o(this,"Channel closed",e),this.accept=So("Channel closed",e),this.connection.releaseChannel(this.ch),this.emit("close")},ko.toClosing=function(e,t){var r=this.sendImmediately.bind(this);_o(this,"Channel closing",e),this.accept=function(e){if(e.id===bo.ChannelCloseOk){t&&t();var n=Uo("ChannelCloseOk frame received");this.toClosed(n)}else e.id===bo.ChannelClose&&r(bo.ChannelCloseOk,{})}},ko._rejectPending=function(){function e(e){e(new Error("Channel ended, no reply will be forthcoming"))}var t;for(null!==this.reply&&e(this.reply),this.reply=null;t=this.pending.shift();)e(t.reply);this.pending=null},ko.closeBecause=function(e,t,r){this.sendImmediately(bo.ChannelClose,{replyText:e,replyCode:t,methodId:0,classId:0});var n=Uo("closeBecause called: "+e);this.toClosing(n,r)},ko.closeWithError=function(e,t,r,n){var o=this;this.closeBecause(t,r,(function(){n.code=r,e&&(n.classId=bo.info(e).classId,n.methodId=bo.info(e).methodId),o.emit("error",n)}))},ko.acceptMessageFrame=function(e){try{this.handleMessage=this.handleMessage(e)}catch(t){"string"==typeof t?this.closeWithError(e.id,t,bo.constants.UNEXPECTED_FRAME,new Error(t)):t instanceof Error?this.closeWithError(e.id,"Error while processing message",bo.constants.INTERNAL_ERROR,t):this.closeWithError(e.id,"Internal error while processing message",bo.constants.INTERNAL_ERROR,new Error(t.toString()))}},ko.handleConfirm=function(e,t){var r=t.deliveryTag;if(t.multiple){var n=this.unconfirmed.splice(0,r-this.lwm+1);this.lwm=r+1,n.forEach(e)}else{var o;if(r===this.lwm)for(o=this.unconfirmed.shift(),this.lwm++;null===this.unconfirmed[0];)this.unconfirmed.shift(),this.lwm++;else o=this.unconfirmed[r-this.lwm],this.unconfirmed[r-this.lwm]=null;e(o)}},ko.pushConfirmCallback=function(e){this.unconfirmed.push(e||!1)},ko.accept=function(e){switch(e.id){case void 0:case bo.BasicDeliver:case bo.BasicReturn:case bo.BasicProperties:return this.acceptMessageFrame(e);case bo.BasicAck:return this.emit("ack",e.fields);case bo.BasicNack:return this.emit("nack",e.fields);case bo.BasicCancel:return this.emit("cancel",e.fields);case bo.ChannelClose:if(this.reply){var t=this.reply;this.reply=null,t(e)}var r="Channel closed by server: "+yo(e);this.sendImmediately(bo.ChannelCloseOk,{});var n=new Error(r);n.code=e.fields.replyCode,n.classId=e.fields.classId,n.methodId=e.fields.methodId,this.emit("error",n);var o=Uo(r);return void this.toClosed(o);case bo.BasicFlow:return this.closeWithError(e.id,"Flow not implemented",bo.constants.NOT_IMPLEMENTED,new Error("Flow not implemented"));default:t=this.reply;if(this.reply=null,this.pending.length>0){var i=this.pending.shift();this.reply=i.reply,this.sendImmediately(i.method,i.fields)}return t(null,e)}},ko.onBufferDrain=function(){this.emit("drain")},Co(Ro,Oo),vo.BaseChannel=Ro,Ro.prototype.registerConsumer=function(e,t){this.consumers.set(e,t)},Ro.prototype.unregisterConsumer=function(e){this.consumers.delete(e)},Ro.prototype.dispatchMessage=function(e,t){var r=e.consumerTag,n=this.consumers.get(r);if(n)return n(t);throw new Error("Unknown consumer: "+r)},Ro.prototype.handleDelivery=function(e){return this.dispatchMessage(e.fields,e)},Ro.prototype.handleCancel=function(e){var t=this.dispatchMessage(e,null);return this.unregisterConsumer(e.consumerTag),t};var Lo=Object.freeze({}),Fo={assertQueue:function(e,t){e=e||"",t=t||Lo;var r=Object.create(t.arguments||null);return Mo(r,"x-expires",t.expires),Mo(r,"x-message-ttl",t.messageTtl),Mo(r,"x-dead-letter-exchange",t.deadLetterExchange),Mo(r,"x-dead-letter-routing-key",t.deadLetterRoutingKey),Mo(r,"x-max-length",t.maxLength),Mo(r,"x-max-priority",t.maxPriority),Mo(r,"x-overflow",t.overflow),Mo(r,"x-queue-mode",t.queueMode),{queue:e,exclusive:!!t.exclusive,durable:void 0===t.durable||t.durable,autoDelete:!!t.autoDelete,arguments:r,passive:!1,ticket:0,nowait:!1}},checkQueue:function(e){return{queue:e,passive:!0,nowait:!1,durable:!0,autoDelete:!1,exclusive:!1,ticket:0}},deleteQueue:function(e,t){return{queue:e,ifUnused:!!(t=t||Lo).ifUnused,ifEmpty:!!t.ifEmpty,ticket:0,nowait:!1}},purgeQueue:function(e){return{queue:e,ticket:0,nowait:!1}},bindQueue:function(e,t,r,n){return{queue:e,exchange:t,routingKey:r,arguments:n,ticket:0,nowait:!1}},unbindQueue:function(e,t,r,n){return{queue:e,exchange:t,routingKey:r,arguments:n,ticket:0,nowait:!1}},assertExchange:function(e,t,r){r=r||Lo;var n=Object.create(r.arguments||null);return Mo(n,"alternate-exchange",r.alternateExchange),{exchange:e,ticket:0,type:t,passive:!1,durable:void 0===r.durable||r.durable,autoDelete:!!r.autoDelete,internal:!!r.internal,nowait:!1,arguments:n}},checkExchange:function(e){return{exchange:e,passive:!0,nowait:!1,durable:!0,internal:!1,type:"",autoDelete:!1,ticket:0}},deleteExchange:function(e,t){return{exchange:e,ifUnused:!!(t=t||Lo).ifUnused,ticket:0,nowait:!1}},bindExchange:function(e,t,r,n){return{source:t,destination:e,routingKey:r,arguments:n,ticket:0,nowait:!1}},unbindExchange:function(e,t,r,n){return{source:t,destination:e,routingKey:r,arguments:n,ticket:0,nowait:!1}},publish:function(e,t,r){function n(e){return void 0===e?void 0:Array.isArray(e)?e.map(String):[String(e)]}r=r||Lo;var o,i=Object.create(r.headers||null);Mo(i,"CC",n(r.CC)),Mo(i,"BCC",n(r.BCC)),void 0!==r.persistent?o=r.persistent?2:1:"number"==typeof r.deliveryMode?o=r.deliveryMode:r.deliveryMode&&(o=2);var s=r.expiration;return void 0!==s&&(s=s.toString()),{exchange:e,routingKey:t,mandatory:!!r.mandatory,immediate:!1,ticket:void 0,contentType:r.contentType,contentEncoding:r.contentEncoding,headers:i,deliveryMode:o,priority:r.priority,correlationId:r.correlationId,replyTo:r.replyTo,expiration:s,messageId:r.messageId,timestamp:r.timestamp,type:r.type,userId:r.userId,appId:r.appId,clusterId:void 0}},consume:function(e,t){t=t||Lo;var r=Object.create(t.arguments||null);return Mo(r,"x-priority",t.priority),{ticket:0,queue:e,consumerTag:t.consumerTag||"",noLocal:!!t.noLocal,noAck:!!t.noAck,exclusive:!!t.exclusive,nowait:!1,arguments:r}},cancel:function(e){return{consumerTag:e,nowait:!1}},get:function(e,t){return{ticket:0,queue:e,noAck:!!(t=t||Lo).noAck}},ack:function(e,t){return{deliveryTag:e,multiple:!!t}},nack:function(e,t,r){return{deliveryTag:e,multiple:!!t,requeue:void 0===r||r}},reject:function(e,t){return{deliveryTag:e,requeue:void 0===t||t}},prefetch:function(e,t){return{prefetchCount:e||0,prefetchSize:0,global:!!t}},recover:function(){return{requeue:!0}}},jo=Object.freeze(Fo);const Po=a,Do=r.promisify,qo=j,{BaseChannel:Ho}=vo,{acceptMessage:$o}=vo,zo=jo,{inspect:Ko}=ln;class Go extends Ho{constructor(e){super(e),this.on("delivery",this.handleDelivery.bind(this)),this.on("cancel",this.handleCancel.bind(this))}async rpc(e,t,r){return(await Do((n=>this._rpc(e,t,r,n)))()).fields}async open(){return(await this.allocate.bind(this)()).rpc(qo.ChannelOpen,{outOfBand:""},qo.ChannelOpenOk)}close(){return Do((e=>this.closeBecause("Goodbye",qo.constants.REPLY_SUCCESS,e)))()}assertQueue(e,t){return this.rpc(qo.QueueDeclare,zo.assertQueue(e,t),qo.QueueDeclareOk)}checkQueue(e){return this.rpc(qo.QueueDeclare,zo.checkQueue(e),qo.QueueDeclareOk)}deleteQueue(e,t){return this.rpc(qo.QueueDelete,zo.deleteQueue(e,t),qo.QueueDeleteOk)}purgeQueue(e){return this.rpc(qo.QueuePurge,zo.purgeQueue(e),qo.QueuePurgeOk)}bindQueue(e,t,r,n){return this.rpc(qo.QueueBind,zo.bindQueue(e,t,r,n),qo.QueueBindOk)}unbindQueue(e,t,r,n){return this.rpc(qo.QueueUnbind,zo.unbindQueue(e,t,r,n),qo.QueueUnbindOk)}assertExchange(e,t,r){return this.rpc(qo.ExchangeDeclare,zo.assertExchange(e,t,r),qo.ExchangeDeclareOk).then((t=>({exchange:e})))}checkExchange(e){return this.rpc(qo.ExchangeDeclare,zo.checkExchange(e),qo.ExchangeDeclareOk)}deleteExchange(e,t){return this.rpc(qo.ExchangeDelete,zo.deleteExchange(e,t),qo.ExchangeDeleteOk)}bindExchange(e,t,r,n){return this.rpc(qo.ExchangeBind,zo.bindExchange(e,t,r,n),qo.ExchangeBindOk)}unbindExchange(e,t,r,n){return this.rpc(qo.ExchangeUnbind,zo.unbindExchange(e,t,r,n),qo.ExchangeUnbindOk)}publish(e,t,r,n){const o=zo.publish(e,t,n);return this.sendMessage(o,o,r)}sendToQueue(e,t,r){return this.publish("",e,t,r)}consume(e,t,r){const n=zo.consume(e,r);return new Promise(((e,r)=>{this._rpc(qo.BasicConsume,n,qo.BasicConsumeOk,((n,o)=>{if(n)return r(n);this.registerConsumer(o.fields.consumerTag,t),e(o.fields)}))}))}async cancel(e){await Do((t=>{this._rpc(qo.BasicCancel,zo.cancel(e),qo.BasicCancelOk,t)}))().then((t=>(this.unregisterConsumer(e),t.fields)))}get(e,t){const r=zo.get(e,t);return new Promise(((e,t)=>{this.sendOrEnqueue(qo.BasicGet,r,((r,n)=>{if(r)return t(r);if(n.id===qo.BasicGetEmpty)return e(!1);if(n.id===qo.BasicGetOk){const t=n.fields;this.handleMessage=$o((r=>{r.fields=t,e(r)}))}else t(new Error(`Unexpected response to BasicGet: ${Ko(n)}`))}))}))}ack(e,t){this.sendImmediately(qo.BasicAck,zo.ack(e.fields.deliveryTag,t))}ackAll(){this.sendImmediately(qo.BasicAck,zo.ack(0,!0))}nack(e,t,r){this.sendImmediately(qo.BasicNack,zo.nack(e.fields.deliveryTag,t,r))}nackAll(e){this.sendImmediately(qo.BasicNack,zo.nack(0,!0,e))}reject(e,t){this.sendImmediately(qo.BasicReject,zo.reject(e.fields.deliveryTag,t))}recover(){return this.rpc(qo.BasicRecover,zo.recover(),qo.BasicRecoverOk)}qos(e,t){return this.rpc(qo.BasicQos,zo.prefetch(e,t),qo.BasicQosOk)}}Go.prototype.prefetch=Go.prototype.qos;class Vo extends Go{publish(e,t,r,n,o){return this.pushConfirmCallback(o),Go.prototype.publish.call(this,e,t,r,n)}sendToQueue(e,t,r,n){return this.publish("",e,t,r,n)}waitForConfirms(){const e=[],t=this.unconfirmed;if(t.forEach(((r,n)=>{if(null!==r){const o=new Promise(((e,o)=>{t[n]=t=>{r&&r(t),null===t?e():o(t)}}));e.push(o)}})),!this.pending)for(var r;r=this.unconfirmed.shift();)r&&r(new Error("channel closed"));return Promise.all(e)}}mo.ConfirmChannel=Vo,mo.Channel=Go,mo.ChannelModel=class extends Po{constructor(e){super(),this.connection=e,["error","close","blocked","unblocked"].forEach((t=>{e.on(t,this.emit.bind(this,t))}))}close(){return Do(this.connection.close.bind(this.connection))()}async createChannel(){const e=new Go(this.connection);return await e.open(),e}async createConfirmChannel(){const e=new Vo(this.connection);return await e.open(),await e.rpc(qo.ConfirmSelect,{nowait:!1},qo.ConfirmSelectOk),e}};var Qo=m.connect,Wo=mo.ChannelModel,Yo=r.promisify;var Jo=function(e,t){return Yo((function(r){return Qo(e,t,r)}))().then((function(e){return new Wo(e)}))},Xo={exports:{}},Zo=/[|\\{}()[\]^$+*?.]/g,ei=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(Zo,"\\$&")},ti={exports:{}},ri={exports:{}},ni={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},oi={};for(var ii in ni)ni.hasOwnProperty(ii)&&(oi[ni[ii]]=ii);var si=ri.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var ai in si)if(si.hasOwnProperty(ai)){if(!("channels"in si[ai]))throw new Error("missing channels property: "+ai);if(!("labels"in si[ai]))throw new Error("missing channel labels property: "+ai);if(si[ai].labels.length!==si[ai].channels)throw new Error("channel and label counts mismatch: "+ai);var ui=si[ai].channels,ci=si[ai].labels;delete si[ai].channels,delete si[ai].labels,Object.defineProperty(si[ai],"channels",{value:ui}),Object.defineProperty(si[ai],"labels",{value:ci})}function li(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}si.rgb.hsl=function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.min(n,o,i),a=Math.max(n,o,i),u=a-s;return a===s?t=0:n===a?t=(o-i)/u:o===a?t=2+(i-n)/u:i===a&&(t=4+(n-o)/u),(t=Math.min(60*t,360))<0&&(t+=360),r=(s+a)/2,[t,100*(a===s?0:r<=.5?u/(a+s):u/(2-a-s)),100*r]},si.rgb.hsv=function(e){var t,r,n,o,i,s=e[0]/255,a=e[1]/255,u=e[2]/255,c=Math.max(s,a,u),l=c-Math.min(s,a,u),f=function(e){return(c-e)/6/l+.5};return 0===l?o=i=0:(i=l/c,t=f(s),r=f(a),n=f(u),s===c?o=n-r:a===c?o=1/3+t-n:u===c&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},si.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2];return[si.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(r,n))),100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},si.rgb.cmyk=function(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-o)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},si.rgb.keyword=function(e){var t=oi[e];if(t)return t;var r,n=1/0;for(var o in ni)if(ni.hasOwnProperty(o)){var i=li(e,ni[o]);i<n&&(n=i,r=o)}return r},si.keyword.rgb=function(e){return ni[e]},si.rgb.xyz=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},si.rgb.lab=function(e){var t=si.rgb.xyz(e),r=t[0],n=t[1],o=t[2];return n/=100,o/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},si.hsl.rgb=function(e){var t,r,n,o,i,s=e[0]/360,a=e[1]/100,u=e[2]/100;if(0===a)return[i=255*u,i,i];t=2*u-(r=u<.5?u*(1+a):u+a-u*a),o=[0,0,0];for(var c=0;c<3;c++)(n=s+1/3*-(c-1))<0&&n++,n>1&&n--,i=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,o[c]=255*i;return o},si.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,o=r,i=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,o*=i<=1?i:2-i,[t,100*(0===n?2*o/(i+o):2*r/(n+r)),100*((n+r)/2)]},si.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),u=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,u,s];case 1:return[a,n,s];case 2:return[s,n,u];case 3:return[s,a,n];case 4:return[u,s,n];case 5:return[n,s,a]}},si.hsv.hsl=function(e){var t,r,n,o=e[0],i=e[1]/100,s=e[2]/100,a=Math.max(s,.01);return n=(2-i)*s,r=i*a,[o,100*(r=(r/=(t=(2-i)*a)<=1?t:2-t)||0),100*(n/=2)]},si.hwb.rgb=function(e){var t,r,n,o,i,s,a,u=e[0]/360,c=e[1]/100,l=e[2]/100,f=c+l;switch(f>1&&(c/=f,l/=f),n=6*u-(t=Math.floor(6*u)),0!=(1&t)&&(n=1-n),o=c+n*((r=1-l)-c),t){default:case 6:case 0:i=r,s=o,a=c;break;case 1:i=o,s=r,a=c;break;case 2:i=c,s=r,a=o;break;case 3:i=c,s=o,a=r;break;case 4:i=o,s=c,a=r;break;case 5:i=r,s=c,a=o}return[255*i,255*s,255*a]},si.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},si.xyz.rgb=function(e){var t,r,n,o=e[0]/100,i=e[1]/100,s=e[2]/100;return r=-.9689*o+1.8758*i+.0415*s,n=.0557*o+-.204*i+1.057*s,t=(t=3.2406*o+-1.5372*i+-.4986*s)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},si.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},si.lab.xyz=function(e){var t,r,n,o=e[0];t=e[1]/500+(r=(o+16)/116),n=r-e[2]/200;var i=Math.pow(r,3),s=Math.pow(t,3),a=Math.pow(n,3);return r=i>.008856?i:(r-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,[t*=95.047,r*=100,n*=108.883]},si.lab.lch=function(e){var t,r=e[0],n=e[1],o=e[2];return(t=360*Math.atan2(o,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+o*o),t]},si.lch.lab=function(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]},si.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],o=1 in arguments?arguments[1]:si.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var i=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return 2===o&&(i+=60),i},si.hsv.ansi16=function(e){return si.rgb.ansi16(si.hsv.rgb(e),e[2])},si.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},si.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},si.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var r;return e-=16,[Math.floor(e/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255]},si.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},si.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];3===t[0].length&&(r=r.split("").map((function(e){return e+e})).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},si.rgb.hcg=function(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255,i=Math.max(Math.max(r,n),o),s=Math.min(Math.min(r,n),o),a=i-s;return t=a<=0?0:i===r?(n-o)/a%6:i===n?2+(o-r)/a:4+(r-n)/a+4,t/=6,[360*(t%=1),100*a,100*(a<1?s/(1-a):0)]},si.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=1,o=0;return(n=r<.5?2*t*r:2*t*(1-r))<1&&(o=(r-.5*n)/(1-n)),[e[0],100*n,100*o]},si.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},si.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];var o,i=[0,0,0],s=t%1*6,a=s%1,u=1-a;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=u,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=u,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=u}return o=(1-r)*n,[255*(r*i[0]+o),255*(r*i[1]+o),255*(r*i[2]+o)]},si.hcg.hsv=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},si.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},si.hcg.hwb=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},si.hwb.hcg=function(e){var t=e[1]/100,r=1-e[2]/100,n=r-t,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},si.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},si.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},si.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},si.gray.hsl=si.gray.hsv=function(e){return[0,0,e[0]]},si.gray.hwb=function(e){return[0,100,e[0]]},si.gray.cmyk=function(e){return[0,0,0,e[0]]},si.gray.lab=function(e){return[e[0],0,0]},si.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},si.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var fi=ri.exports;function hi(e){var t=function(){for(var e={},t=Object.keys(fi),r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;)for(var n=r.pop(),o=Object.keys(fi[n]),i=o.length,s=0;s<i;s++){var a=o[s],u=t[a];-1===u.distance&&(u.distance=t[n].distance+1,u.parent=n,r.unshift(a))}return t}function di(e,t){return function(r){return t(e(r))}}function pi(e,t){for(var r=[t[e].parent,e],n=fi[t[e].parent][e],o=t[e].parent;t[o].parent;)r.unshift(t[o].parent),n=di(fi[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}var gi=ri.exports,mi=function(e){for(var t=hi(e),r={},n=Object.keys(t),o=n.length,i=0;i<o;i++){var s=n[i];null!==t[s].parent&&(r[s]=pi(s,t))}return r},vi={};Object.keys(gi).forEach((function(e){vi[e]={},Object.defineProperty(vi[e],"channels",{value:gi[e].channels}),Object.defineProperty(vi[e],"labels",{value:gi[e].labels});var t=mi(e);Object.keys(t).forEach((function(r){var n=t[r];vi[e][r]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var r=e(t);if("object"==typeof r)for(var n=r.length,o=0;o<n;o++)r[o]=Math.round(r[o]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(n),vi[e][r].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))}));var bi=vi;!function(e){const t=bi,r=(e,r)=>function(){const n=e.apply(t,arguments);return`[${n+r}m`},n=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};5;${n}m`},o=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};2;${n[0]};${n[1]};${n[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.grey=i.color.gray;for(const t of Object.keys(i)){const r=i[t];for(const t of Object.keys(r)){const n=r[t];i[t]={open:`[${n[0]}m`,close:`[${n[1]}m`},r[t]=i[t],e.set(n[0],n[1])}Object.defineProperty(i,t,{value:r,enumerable:!1}),Object.defineProperty(i,"codes",{value:e,enumerable:!1})}const s=e=>e,a=(e,t,r)=>[e,t,r];i.color.close="",i.bgColor.close="",i.color.ansi={ansi:r(s,0)},i.color.ansi256={ansi256:n(s,0)},i.color.ansi16m={rgb:o(a,0)},i.bgColor.ansi={ansi:r(s,10)},i.bgColor.ansi256={ansi256:n(s,10)},i.bgColor.ansi16m={rgb:o(a,10)};for(let e of Object.keys(t)){if("object"!=typeof t[e])continue;const s=t[e];"ansi16"===e&&(e="ansi"),"ansi16"in s&&(i.color.ansi[e]=r(s.ansi16,0),i.bgColor.ansi[e]=r(s.ansi16,10)),"ansi256"in s&&(i.color.ansi256[e]=n(s.ansi256,0),i.bgColor.ansi256[e]=n(s.ansi256,10)),"rgb"in s&&(i.color.ansi16m[e]=o(s.rgb,0),i.bgColor.ansi16m[e]=o(s.rgb,10))}return i}})}(ti);const yi=n,wi=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)},Ei=process.env;let Ii;function Ci(e){const t=function(e){if(!1===Ii)return 0;if(wi("color=16m")||wi("color=full")||wi("color=truecolor"))return 3;if(wi("color=256"))return 2;if(e&&!e.isTTY&&!0!==Ii)return 0;const t=Ii?1:0;if("win32"===process.platform){const e=yi.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Ei)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in Ei))||"codeship"===Ei.CI_NAME?1:t;if("TEAMCITY_VERSION"in Ei)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ei.TEAMCITY_VERSION)?1:0;if("truecolor"===Ei.COLORTERM)return 3;if("TERM_PROGRAM"in Ei){const e=parseInt((Ei.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ei.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ei.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ei.TERM)||"COLORTERM"in Ei?1:(Ei.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}wi("no-color")||wi("no-colors")||wi("color=false")?Ii=!1:(wi("color")||wi("colors")||wi("color=true")||wi("color=always"))&&(Ii=!0),"FORCE_COLOR"in Ei&&(Ii=0===Ei.FORCE_COLOR.length||0!==parseInt(Ei.FORCE_COLOR,10));var Bi={supportsColor:Ci,stdout:Ci(process.stdout),stderr:Ci(process.stderr)};const xi=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Ti=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Ui=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Oi=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,ki=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function Si(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):ki.get(e)||e}function _i(e,t){const r=[],n=t.trim().split(/\s*,\s*/g);let o;for(const t of n)if(isNaN(t)){if(!(o=t.match(Ui)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(o[2].replace(Oi,((e,t,r)=>t?Si(t):r)))}else r.push(Number(t));return r}function Ni(e){Ti.lastIndex=0;const t=[];let r;for(;null!==(r=Ti.exec(e));){const e=r[1];if(r[2]){const n=_i(e,r[2]);t.push([e].concat(n))}else t.push([e])}return t}function Ai(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const e of Object.keys(r))if(Array.isArray(r[e])){if(!(e in n))throw new Error(`Unknown Chalk style: ${e}`);n=r[e].length>0?n[e].apply(n,r[e]):n[e]}return n}var Ri=(e,t)=>{const r=[],n=[];let o=[];if(t.replace(xi,((t,i,s,a,u,c)=>{if(i)o.push(Si(i));else if(a){const t=o.join("");o=[],n.push(0===r.length?t:Ai(e,r)(t)),r.push({inverse:s,styles:Ni(a)})}else if(u){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");n.push(Ai(e,r)(o.join(""))),o=[],r.pop()}else o.push(c)})),n.push(o.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")};!function(e){const t=ei,r=ti.exports,n=Bi.stdout,o=Ri,i="win32"===process.platform&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),s=["ansi","ansi","ansi256","ansi16m"],a=new Set(["gray"]),u=Object.create(null);function c(e,t){t=t||{};const r=n?n.level:0;e.level=void 0===t.level?r:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function l(e){if(!this||!(this instanceof l)||this.template){const t={};return c(t,e),t.template=function(){const e=[].slice.call(arguments);return p.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,l.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=l,t.template}c(this,e)}i&&(r.blue.open="");for(const e of Object.keys(r))r[e].closeRe=new RegExp(t(r[e].close),"g"),u[e]={get(){const t=r[e];return h.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};u.visible={get(){return h.call(this,this._styles||[],!0,"visible")}},r.color.closeRe=new RegExp(t(r.color.close),"g");for(const e of Object.keys(r.color.ansi))a.has(e)||(u[e]={get(){const t=this.level;return function(){const n=r.color[s[t]][e].apply(null,arguments),o={open:n,close:r.color.close,closeRe:r.color.closeRe};return h.call(this,this._styles?this._styles.concat(o):[o],this._empty,e)}}});r.bgColor.closeRe=new RegExp(t(r.bgColor.close),"g");for(const e of Object.keys(r.bgColor.ansi)){if(a.has(e))continue;u["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const n=r.bgColor[s[t]][e].apply(null,arguments),o={open:n,close:r.bgColor.close,closeRe:r.bgColor.closeRe};return h.call(this,this._styles?this._styles.concat(o):[o],this._empty,e)}}}}const f=Object.defineProperties((()=>{}),u);function h(e,t,r){const n=function(){return d.apply(n,arguments)};n._styles=e,n._empty=t;const o=this;return Object.defineProperty(n,"level",{enumerable:!0,get:()=>o.level,set(e){o.level=e}}),Object.defineProperty(n,"enabled",{enumerable:!0,get:()=>o.enabled,set(e){o.enabled=e}}),n.hasGrey=this.hasGrey||"gray"===r||"grey"===r,n.__proto__=f,n}function d(){const e=arguments,t=e.length;let n=String(arguments[0]);if(0===t)return"";if(t>1)for(let r=1;r<t;r++)n+=" "+e[r];if(!this.enabled||this.level<=0||!n)return this._empty?"":n;const o=r.dim.open;i&&this.hasGrey&&(r.dim.open="");for(const e of this._styles.slice().reverse())n=e.open+n.replace(e.closeRe,e.open)+e.close,n=n.replace(/\r?\n/g,`${e.close}$&${e.open}`);return r.dim.open=o,n}function p(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");const r=[].slice.call(arguments,2),n=[t.raw[0]];for(let e=1;e<t.length;e++)n.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(t.raw[e]));return o(e,n.join(""))}Object.defineProperties(l.prototype,u),e.exports=l(),e.exports.supportsColor=n,e.exports.default=e.exports}(Xo);var Mi=Xo.exports;let Li;const Fi=new Uint8Array(16);function ji(){if(!Li&&(Li="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Li))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Li(Fi)}const Pi=[];for(let e=0;e<256;++e)Pi.push((e+256).toString(16).slice(1));let Di,qi,Hi=0,$i=0;function zi(e,t,r){let n=t&&r||0;const o=t||new Array(16);let i=(e=e||{}).node||Di,s=void 0!==e.clockseq?e.clockseq:qi;if(null==i||null==s){const t=e.random||(e.rng||ji)();null==i&&(i=Di=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==s&&(s=qi=16383&(t[6]<<8|t[7]))}let a=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:$i+1;const c=a-Hi+(u-$i)/1e4;if(c<0&&void 0===e.clockseq&&(s=s+1&16383),(c<0||a>Hi)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Hi=a,$i=u,qi=s,a+=122192928e5;const l=(1e4*(268435455&a)+u)%4294967296;o[n++]=l>>>24&255,o[n++]=l>>>16&255,o[n++]=l>>>8&255,o[n++]=255&l;const f=a/4294967296*1e4&268435455;o[n++]=f>>>8&255,o[n++]=255&f,o[n++]=f>>>24&15|16,o[n++]=f>>>16&255,o[n++]=s>>>8|128,o[n++]=255&s;for(let e=0;e<6;++e)o[n+e]=i[e];return t||function(e,t=0){return(Pi[e[t+0]]+Pi[e[t+1]]+Pi[e[t+2]]+Pi[e[t+3]]+"-"+Pi[e[t+4]]+Pi[e[t+5]]+"-"+Pi[e[t+6]]+Pi[e[t+7]]+"-"+Pi[e[t+8]]+Pi[e[t+9]]+"-"+Pi[e[t+10]]+Pi[e[t+11]]+Pi[e[t+12]]+Pi[e[t+13]]+Pi[e[t+14]]+Pi[e[t+15]]).toLowerCase()}(o)}var Ki,Gi,Vi;!function(e){e.TASK_EXECUTE_REQUEST="TASK_EXECUTE_REQUEST",e.TASK_EXECUTE_PROGRESS="TASK_EXECUTE_PROGRESS",e.TASK_EXECUTE_RESPONSE="TASK_EXECUTE_RESPONSE",e.TASK_INSTANCES_REPORT__REQUEST="TASK_INSTANCES_REPORT__REQUEST",e.TASK_INSTANCES_REPORT__RESPONSE="TASK_INSTANCES_REPORT__RESPONSE",e.HEARTBEAT="HEARTBEAT"}(Ki||(Ki={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.PYTHON="PYTHON",e.NATIVE="NATIVE"}(Gi||(Gi={})),function(e){e.INITIALIZED="INITIALIZED"}(Vi||(Vi={}));const Qi=(e,t)=>({id:`ColaboFlow-msg:${zi()}`,requestId:`ColaboFlow-request:${zi()}`,sender:e,proxies:[],msgReplyChainIds:[],type:t}),Wi=async e=>{process.title=`ColaboFlow.Go.Client-${e.clientName}`,e.appNameText=`[${Mi.red.bold("Colabo")}${Mi.blue.bold("Flow")}${Mi.green.bold(".Go")}-${Mi.green.yellow(e.clientName)}]`,console.log(`${e.appNameText} Connecting to the ColaboFlow service: ${Mi.greenBright(e.amqpUrl)}`);try{e.connection=await Jo(e.amqpUrl)}catch(t){return void console.error(`${e.appNameText} Error connecting to the "${Mi.greenBright(e.amqpUrl)}" ColaboFlow service: ${t}`)}try{e.channel=await e.connection.createChannel()}catch(t){return void console.error(`${e.appNameText} Error creating the channel`)}},Yi=async(e,t,r)=>{const n=new Promise((async(n,o)=>{const i=`client-task_execute_response-${zi()}`,s={...Qi(e.clientName,Ki.TASK_EXECUTE_REQUEST),replyTo:i,extension:{taskId:t,taskInput:r},msg:"run a ffmepg test task"};console.log(`${e.appNameText} Sending task request [queue: "${Mi.blueBright(e.queueServiceOrchestrator)}"]: ${JSON.stringify(s)}`),await e.channel.sendToQueue(e.queueServiceOrchestrator,Buffer.from(JSON.stringify(s))),await e.channel.assertQueue(i,{exclusive:!0}),e.channel.consume(i,(function(e){let t;try{t=JSON.parse(e.content)}catch(t){return void console.error(`Error parsing the message: ${e.content}`)}const r=t.extension;n(r.taskOutput)}),{noAck:!0})}));return n},Ji=async e=>{const t=new Promise(((t,r)=>{setTimeout((async()=>{console.log(`${e.appNameText} Closing the ${Mi.bold.italic("channel")} to the ColaboFlow service...`),await e.channel.close(),console.log(`${e.appNameText} Closing the ${Mi.bold.italic("connection")} to the ColaboFlow service...`),await e.connection.close(),t(!0)}),500)}));return t};process.env.AMQP_URL,process.env.ORCHESTRATOR_QUEUE,process.env.HOST_HEARTBEAT_QUEUE,process.env.HOST_NODE_QUEUE,process.env.HOST_PYTHON_QUEUE;var Xi,Zi=new Uint8Array(16);function es(){if(!Xi&&!(Xi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xi(Zi)}var ts=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function rs(e){return"string"==typeof e&&ts.test(e)}for(var ns,os,is=[],ss=0;ss<256;++ss)is.push((ss+256).toString(16).substr(1));var as,us,cs,ls,fs,hs,ds,ps,gs,ms,vs,bs,ys,ws,Es,Is,Cs,Bs,xs,Ts=0,Us=0;function Os(e,t,r){var n=t&&r||0,o=t||new Array(16),i=(e=e||{}).node||ns,s=void 0!==e.clockseq?e.clockseq:os;if(null==i||null==s){var a=e.random||(e.rng||es)();null==i&&(i=ns=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=os=16383&(a[6]<<8|a[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:Us+1,l=u-Ts+(c-Us)/1e4;if(l<0&&void 0===e.clockseq&&(s=s+1&16383),(l<0||u>Ts)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Ts=u,Us=c,os=s;var f=(1e4*(268435455&(u+=122192928e5))+c)%4294967296;o[n++]=f>>>24&255,o[n++]=f>>>16&255,o[n++]=f>>>8&255,o[n++]=255&f;var h=u/4294967296*1e4&268435455;o[n++]=h>>>8&255,o[n++]=255&h,o[n++]=h>>>24&15|16,o[n++]=h>>>16&255,o[n++]=s>>>8|128,o[n++]=255&s;for(var d=0;d<6;++d)o[n+d]=i[d];return t||function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(is[e[t+0]]+is[e[t+1]]+is[e[t+2]]+is[e[t+3]]+"-"+is[e[t+4]]+is[e[t+5]]+"-"+is[e[t+6]]+is[e[t+7]]+"-"+is[e[t+8]]+is[e[t+9]]+"-"+is[e[t+10]]+is[e[t+11]]+is[e[t+12]]+is[e[t+13]]+is[e[t+14]]+is[e[t+15]]).toLowerCase();if(!rs(r))throw TypeError("Stringified UUID is invalid");return r}(o)}!function(e){e.UNKNOWN="UNKNOWN",e.LOCAL="LOCAL",e.STORE="STORE",e.LOCAL_TIER="LOCAL_TIER",e.REMOTE_TIER="REMOTE_TIER",e.INTERACTIVE="INTERACTIVE"}(as||(as={})),function(e){e.ISOMORPHIC="ISOMORPHIC",e.FRONTEND="FRONTEND",e.BACKEND="BACKEND"}(us||(us={})),function(e){e.WAITING="WAITING",e.RUNNING="RUNNING",e.FINISHED="FINISHED",e.FAILED_SYSTEM="FAILED.SYSTEM",e.FAILED_ENGINE="FAILED.ENGINE",e.FAILED_FLOW="FAILED.FLOW",e.FAILED_TASK="FAILED.TASK",e.FAILED_USER="FAILED.USER"}(cs||(cs={})),function(e){e.WAITING="WAITING",e.PASSED_THROUGH="PASSED_THROUGH",e.CONDITION_NOT_FULFILLED="CONDITION_NOT_FULFILLED"}(ls||(ls={})),function(e){e.WAITING="WAITING",e.PASSED_THROUGH="PASSED_THROUGH",e.CONDITION_NOT_FULFILLED="CONDITION_NOT_FULFILLED"}(fs||(fs={})),function(e){e.WAITING="WAITING",e.PASSED_THROUGH="PASSED_THROUGH",e.CONDITION_NOT_FULFILLED="CONDITION_NOT_FULFILLED"}(hs||(hs={})),function(e){e.JUST_ENTERED="JUST_ENTERED",e.INITIATED="INITIATED",e.RUNNING="RUNNING",e.FINISHED="FINISHED",e.RESULTS_STORING="RESULTS_STORING",e.RESULTS_STORED="RESULTS_STORED",e.LEAVING="LEAVING",e.LEFT="LEFT"}(ds||(ds={})),function(e){e.TICK="tick",e.MICRO_TICK="microTick",e.BREAKPOINT="breakpoint"}(ps||(ps={})),function(e){e.FULL="FULL",e.CONDENSED="CONDENSED",e.NO="NO"}(gs||(gs={})),function(e){e.TASK="TASK",e.EVENT="EVENT",e.GATEWAY="GATEWAY"}(ms||(ms={})),function(e){e.EVENT_START="event.start",e.EVENT_END="event.end"}(vs||(vs={})),function(e){e.IN="IN",e.OUT="OUT",e.INOUT="INOUT"}(bs||(bs={})),function(e){e.DEFAULT="colabo.flow:default",e.EVENT_START="colabo.flow:event.start",e.EVENT_END="colabo.flow:event.end"}(ys||(ys={})),function(e){e.REGULAR="TASK.REGULAR",e.LOOP="TASK.LOOP",e.MULTIPLE_PARALLEL="TASK.MULTIPLE_PARALLEL",e.MULTIPLE_SEQUENTIAL="TASK.MULTIPLE_SEQUENTIAL",e.COMPENSATION="TASK.COMPENSATION",e.COMPENSATION_LOOP="TASK.COMPENSATION_LOOP",e.SUBPROCESS="TASK.SUBPROCESS",e.SUBPROCESS_LOOP="TASK.SUBPROCESS_LOOP",e.SUBPROCESS_MULTIPLE_PARALLEL="TASK.SUBPROCESS_MULTIPLE_PARALLEL",e.SUBPROCESS_MULTIPLE_SEQUENTIAL="TASK.SUBPROCESS_MULTIPLE_SEQUENTIAL",e.SUBPROCESS_COMPENSATION="TASK.SUBPROCESS_COMPENSATION",e.SUBPROCESS_ADHOC="TASK.SUBPROCESS_ADHOC",e.SUBPROCESS_EVENT="TASK.SUBPROCESS_EVENT",e.TRANSACTION="TASK.TRANSACTION",e.CALL_ACTIVITY="TASK.CALL_ACTIVITY",e.BUSINESS_RULE="TASK.BUSINESS_RULE",e.MANUAL="TASK.MANUAL",e.RECEIVE="TASK.RECEIVE",e.SCRIPT="TASK.SCRIPT",e.SEND="TASK.SEND",e.SERVICE="TASK.SERVICE",e.USER="TASK.USER"}(ws||(ws={})),function(e){e.START="EVENT.START",e.INTERMEDIATE="EVENT.INTERMEDIATE",e.END="EVENT.END"}(Es||(Es={})),function(e){e.EXCLUSIVE="GATEWAY.EXCLUSIVE",e.EVENT_BASED="GATEWAY.EVENT_BASED",e.PARALLEL="GATEWAY.PARALLEL",e.PARALLEL_EVENT_BASED="GATEWAY.PARALLEL_EVENT_BASED ",e.INCLUSIVE="GATEWAY.INCLUSIVE",e.COMPLEX="GATEWAY.COMPLEX"}(Is||(Is={})),function(e){e.NOT_EXECUTED="NOT_EXECUTED",e.EXECUTED="EXECUTED",e.PAUSED="PAUSED",e.INTERRUPTED="INTERRUPTED",e.FAILED="FAILED",e.EXECUTOR_NOT_FOUND="EXECUTOR_NOT_FOUND"}(Cs||(Cs={})),function(e){e.UNKNOWN="UNKNOWN",e.RUNNING="RUNNING",e.EXECUTED="EXECUTED",e.PAUSED="PAUSED",e.INTERRUPTED="INTERRUPTED",e.FAILED="FAILED",e.EXECUTOR_NOT_FOUND="EXECUTOR_NOT_FOUND"}(Bs||(Bs={})),function(e){e.BACKEND="backend",e.FRONTEND_VANILLA="frontend_vanilla",e.FRONTEND_ANGULAR="frontend_angular"}(xs||(xs={})),xs.BACKEND;var ks=function(e,t){return ks=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},ks(e,t)};function Ss(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ks(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function _s(e){return"function"==typeof e}console.log("[NgLess::Injectable] declaring ... "),console.log("[NgLess::Injectable] declared ");var Ns=!1,As={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,Ns=e},get useDeprecatedSynchronousErrorHandling(){return Ns}};function Rs(e){setTimeout((function(){throw e}),0)}var Ms={closed:!0,next:function(e){},error:function(e){if(As.useDeprecatedSynchronousErrorHandling)throw e;Rs(e)},complete:function(){}},Ls=Array.isArray||function(e){return e&&"number"==typeof e.length};function Fs(e){return null!==e&&"object"==typeof e}var js=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),Ps=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r=this,n=r._parentOrParents,o=r._ctorUnsubscribe,i=r._unsubscribe,s=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(null!==n)for(var a=0;a<n.length;++a)n[a].remove(this);if(_s(i)){o&&(this._unsubscribe=void 0);try{i.call(this)}catch(e){t=e instanceof js?Ds(e.errors):[e]}}if(Ls(s)){a=-1;for(var u=s.length;++a<u;){var c=s[a];if(Fs(c))try{c.unsubscribe()}catch(e){t=t||[],e instanceof js?t=t.concat(Ds(e.errors)):t.push(e)}}}if(t)throw new js(t)}},e.prototype.add=function(t){var r=t;if(!t)return e.EMPTY;switch(typeof t){case"function":r=new e(t);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof e)){var n=r;(r=new e)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof e){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function Ds(e){return e.reduce((function(e,t){return e.concat(t instanceof js?t.errors:t)}),[])}var qs="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),Hs=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=Ms;break;case 1:if(!r){i.destination=Ms;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new $s(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new $s(i,r,n,o)}return i}return Ss(t,e),t.prototype[qs]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(Ps),$s=function(e){function t(t,r,n,o){var i,s=e.call(this)||this;s._parentSubscriber=t;var a=s;return _s(r)?i=r:r&&(i=r.next,n=r.error,o=r.complete,r!==Ms&&(_s((a=Object.create(r)).unsubscribe)&&s.add(a.unsubscribe.bind(a)),a.unsubscribe=s.unsubscribe.bind(s))),s._context=a,s._next=i,s._error=n,s._complete=o,s}return Ss(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;As.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=As.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):Rs(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;Rs(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};As.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),As.useDeprecatedSynchronousErrorHandling)throw e;Rs(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!As.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(t){return As.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(Rs(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(Hs);function zs(e){for(;e;){var t=e,r=t.closed,n=t.destination,o=t.isStopped;if(r||o)return!1;e=n&&n instanceof Hs?n:null}return!0}var Ks="function"==typeof Symbol&&Symbol.observable||"@@observable";function Gs(e){return e}function Vs(e){return 0===e.length?Gs:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Qs=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,o=function(e,t,r){if(e){if(e instanceof Hs)return e;if(e[qs])return e[qs]()}return e||t||r?new Hs(e,t,r):new Hs(Ms)}(e,t,r);if(n?o.add(n.call(o,this.source)):o.add(this.source||As.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),As.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){As.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),zs(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=Ws(t))((function(t,n){var o;o=r.subscribe((function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}}),n,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[Ks]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:Vs(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Ws(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function Ws(e){if(e||(e=As.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var Ys=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Js=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return Ss(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(Ps),Xs=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return Ss(t,e),t}(Hs),Zs=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Ss(t,e),t.prototype[qs]=function(){return new Xs(this)},t.prototype.lift=function(e){var t=new ea(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new Ys;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new Ys;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new Ys;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new Ys;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new Ys;return this.hasError?(e.error(this.thrownError),Ps.EMPTY):this.isStopped?(e.complete(),Ps.EMPTY):(this.observers.push(e),new Js(this,e))},t.prototype.asObservable=function(){var e=new Qs;return e.source=this,e},t.create=function(e,t){return new ea(e,t)},t}(Qs),ea=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return Ss(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):Ps.EMPTY},t}(Zs),ta=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new ra(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o},e}(),ra=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return Ss(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var r=this.connection,n=e._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},t}(Hs),na=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return Ss(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new Ps).add(this.source.subscribe(new oa(this.getSubject(),this))),e.closed&&(this._connection=null,e=Ps.EMPTY)),e},t.prototype.refCount=function(){return(e=this).lift(new ta(e));var e},t}(Qs),oa=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return Ss(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(Xs),ia=function(e){function t(t,r,n){var o=e.call(this)||this;return o.key=t,o.groupSubject=r,o.refCountSubscription=n,o}return Ss(t,e),t.prototype._subscribe=function(e){var t=new Ps,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new sa(r)),t.add(n.subscribe(e)),t},t}(Qs),sa=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return Ss(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(Ps),aa=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return Ss(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ys;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Zs),ua=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return Ss(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||new Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,r){return e.call(this)||this}return Ss(t,e),t.prototype.schedule=function(e,t){return this},t}(Ps)),ca=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return Ss(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(ua),la=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}(),fa=function(e){function t(r,n){void 0===n&&(n=la.now);var o=e.call(this,r,(function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return Ss(t,e),t.prototype.schedule=function(r,n,o){return void 0===n&&(n=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(la),ha=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ss(t,e),t}(fa))(ca),da=ha,pa=new Qs((function(e){return e.complete()}));function ga(e){return e?function(e){return new Qs((function(t){return e.schedule((function(){return t.complete()}))}))}(e):pa}function ma(e){return e&&"function"==typeof e.schedule}var va,ba=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}};function ya(e,t){return new Qs((function(r){var n=new Ps,o=0;return n.add(t.schedule((function(){o!==e.length?(r.next(e[o++]),r.closed||n.add(this.schedule())):r.complete()}))),n}))}function wa(e,t){return t?ya(e,t):new Qs(ba(e))}function Ea(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return ma(r)?(e.pop(),ya(e,r)):wa(e)}function Ia(e,t){return new Qs(t?function(r){return t.schedule(Ca,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}function Ca(e){var t=e.error;e.subscriber.error(t)}va||(va={});var Ba=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return Ea(this.value);case"E":return Ia(this.error);case"C":return ga()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}(),xa=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return Ss(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new Ta(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(Ba.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(Ba.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(Ba.createComplete()),this.unsubscribe()},t}(Hs),Ta=function(e,t){this.notification=e,this.destination=t},Ua=function(e){function t(t,r,n){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var o=e.call(this)||this;return o.scheduler=n,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return Ss(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new Oa(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new Ys;if(this.isStopped||this.hasError?t=Ps.EMPTY:(this.observers.push(e),t=new Js(this,e)),o&&e.add(e=new xa(e,o)),r)for(var s=0;s<i&&!e.closed;s++)e.next(n[s]);else for(s=0;s<i&&!e.closed;s++)e.next(n[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||da).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(Zs),Oa=function(e,t){this.time=e,this.value=t},ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return Ss(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),Ps.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),Ps.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(Zs),Sa=1,_a=Promise.resolve(),Na={};function Aa(e){return e in Na&&(delete Na[e],!0)}var Ra=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return Ss(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=function(e){var t=Sa++;return Na[t]=!0,_a.then((function(){return Aa(t)&&e()})),t}(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(function(e){Aa(e)}(r),t.scheduled=void 0)},t}(ua),Ma=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ss(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(fa))(Ra),La=Ma,Fa=new fa(ua),ja=Fa,Pa=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return Ss(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(cancelAnimationFrame(r),t.scheduled=void 0)},t}(ua),Da=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ss(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(fa))(Pa),qa=Da,Ha=function(e){function t(t,r){void 0===t&&(t=$a),void 0===r&&(r=Number.POSITIVE_INFINITY);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return Ss(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(fa),$a=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var o=e.call(this,t,r)||this;return o.scheduler=t,o.work=r,o.index=n,o.active=!0,o.index=t.index=n,o}return Ss(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var o=new t(this.scheduler,this.work);return this.add(o),o.schedule(r,n)},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var o=e.actions;return o.push(this),o.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,r){},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(ua);function za(){}var Ka=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),Ga=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}(),Va=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}();function Qa(e,t){return function(r){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new Wa(e,t))}}var Wa=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Ya(e,this.project,this.thisArg))},e}(),Ya=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return Ss(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(Hs);function Ja(e){var t=this,r=e.args,n=e.subscriber,o=e.params,i=o.callbackFunc,s=o.context,a=o.scheduler,u=o.subject;if(!u){u=o.subject=new ka;try{i.apply(s,r.concat([function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.length<=1?e[0]:e;t.add(a.schedule(Xa,0,{value:n,subject:u}))}]))}catch(e){u.error(e)}}this.add(u.subscribe(n))}function Xa(e){var t=e.value,r=e.subject;r.next(t),r.complete()}function Za(e){var t=this,r=e.params,n=e.subscriber,o=e.context,i=r.callbackFunc,s=r.args,a=r.scheduler,u=r.subject;if(!u){u=r.subject=new ka;try{i.apply(o,s.concat([function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.shift();if(n)t.add(a.schedule(tu,0,{err:n,subject:u}));else{var o=e.length<=1?e[0]:e;t.add(a.schedule(eu,0,{value:o,subject:u}))}}]))}catch(e){this.add(a.schedule(tu,0,{err:e,subject:u}))}}this.add(u.subscribe(n))}function eu(e){var t=e.value,r=e.subject;r.next(t),r.complete()}function tu(e){var t=e.err;e.subject.error(t)}var ru=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ss(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(Hs),nu=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o.index=0,o}return Ss(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(Hs),ou="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",iu=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function su(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var au=function(e){if(e&&"function"==typeof e[Ks])return n=e,function(e){var t=n[Ks]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(iu(e))return ba(e);if(su(e))return r=e,function(e){return r.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,Rs),e};if(e&&"function"==typeof e[ou])return t=e,function(e){for(var r=t[ou]();;){var n=void 0;try{n=r.next()}catch(t){return e.error(t),e}if(n.done){e.complete();break}if(e.next(n.value),e.closed)break}return"function"==typeof r.return&&e.add((function(){r.return&&r.return()})),e};var t,r,n,o=Fs(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function uu(e,t,r,n,o){if(void 0===o&&(o=new nu(e,r,n)),!o.closed)return t instanceof Qs?t.subscribe(o):au(t)(o)}var cu={},lu=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new fu(e,this.resultSelector))},e}(),fu=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return Ss(t,e),t.prototype._next=function(e){this.values.push(cu),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(uu(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===cu?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(ru);function hu(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[Ks]}(e))return function(e,t){return new Qs((function(r){var n=new Ps;return n.add(t.schedule((function(){var o=e[Ks]();n.add(o.subscribe({next:function(e){n.add(t.schedule((function(){return r.next(e)})))},error:function(e){n.add(t.schedule((function(){return r.error(e)})))},complete:function(){n.add(t.schedule((function(){return r.complete()})))}}))}))),n}))}(e,t);if(su(e))return function(e,t){return new Qs((function(r){var n=new Ps;return n.add(t.schedule((function(){return e.then((function(e){n.add(t.schedule((function(){r.next(e),n.add(t.schedule((function(){return r.complete()})))})))}),(function(e){n.add(t.schedule((function(){return r.error(e)})))}))}))),n}))}(e,t);if(iu(e))return ya(e,t);if(function(e){return e&&"function"==typeof e[ou]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new Qs((function(r){var n,o=new Ps;return o.add((function(){n&&"function"==typeof n.return&&n.return()})),o.add(t.schedule((function(){n=e[ou](),o.add(t.schedule((function(){if(!r.closed){var e,t;try{var o=n.next();e=o.value,t=o.done}catch(e){return void r.error(e)}t?r.complete():(r.next(e),this.schedule())}})))}))),o}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}function du(e,t){return t?hu(e,t):e instanceof Qs?e:new Qs(au(e))}var pu=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return Ss(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(Hs),gu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ss(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(Hs);function mu(e,t){if(!t.closed){if(e instanceof Qs)return e.subscribe(t);var r;try{r=au(e)(t)}catch(e){t.error(e)}return r}}function vu(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?function(n){return n.pipe(vu((function(r,n){return du(e(r,n)).pipe(Qa((function(e,o){return t(r,e,n,o)})))}),r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new bu(e,r))})}var bu=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new yu(e,this.project,this.concurrent))},e}(),yu=function(e){function t(t,r,n){void 0===n&&(n=Number.POSITIVE_INFINITY);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return Ss(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new pu(this),r=this.destination;r.add(t);var n=mu(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(gu);function wu(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),vu(Gs,e)}function Eu(){return wu(1)}function Iu(e){return new Qs((function(t){var r;try{r=e()}catch(e){return void t.error(e)}return(r?du(r):ga()).subscribe(t)}))}function Cu(e,t){return new Qs((function(r){var n=e.length;if(0!==n)for(var o=new Array(n),i=0,s=0,a=function(a){var u=du(e[a]),c=!1;r.add(u.subscribe({next:function(e){c||(c=!0,s++),o[a]=e},error:function(e){return r.error(e)},complete:function(){++i!==n&&c||(s===n&&r.next(t?t.reduce((function(e,t,r){return e[t]=o[r],e}),{}):o),r.complete())}}))},u=0;u<n;u++)a(u);else r.complete()}))}function Bu(e,t,r,n,o){var i;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var s=e;e.addEventListener(t,r,o),i=function(){return s.removeEventListener(t,r,o)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var a=e;e.on(t,r),i=function(){return a.off(t,r)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var u=e;e.addListener(t,r),i=function(){return u.removeListener(t,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var c=0,l=e.length;c<l;c++)Bu(e[c],t,r,n,o)}n.add(i)}function xu(e){var t=e.subscriber,r=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(e){return void t.error(e)}else e.needIterate=!0;if(r){var n=void 0;try{n=r(e.state)}catch(e){return void t.error(e)}if(!n)return void t.complete();if(t.closed)return}var o;try{o=e.resultSelector(e.state)}catch(e){return void t.error(e)}if(!t.closed&&(t.next(o),!t.closed))return this.schedule(e)}}function Tu(e){return!Ls(e)&&e-parseFloat(e)+1>=0}function Uu(e){var t=e.subscriber,r=e.counter,n=e.period;t.next(r),this.schedule({subscriber:t,counter:r+1,period:n},n)}var Ou=new Qs(za);function ku(e){var t=e.keys,r=e.index,n=e.subscriber,o=e.subscription,i=e.obj;if(!n.closed)if(r<t.length){var s=t[r];n.next([s,i[s]]),o.add(this.schedule({keys:t,index:r+1,subscriber:n,subscription:o,obj:i}))}else n.complete()}function Su(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function _u(e,t){return function(r){return r.lift(new Nu(e,t))}}var Nu=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Au(e,this.predicate,this.thisArg))},e}(),Au=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return Ss(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(Hs),Ru=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new Mu(e))},e}(),Mu=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return Ss(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=uu(this,e[r],void 0,r);this.subscriptions&&this.subscriptions.push(n),this.add(n)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(ru);function Lu(e){var t=e.start,r=e.index,n=e.count,o=e.subscriber;r>=n?o.complete():(o.next(t),o.closed||(e.index=r+1,e.start=t+1,this.schedule(e)))}function Fu(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}var ju=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new Pu(e,this.resultSelector))},e}(),Pu=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.resultSelector=r,o.iterators=[],o.active=0,o.resultSelector="function"==typeof r?r:void 0,o}return Ss(t,e),t.prototype._next=function(e){var t=this.iterators;Ls(e)?t.push(new qu(e)):"function"==typeof e[ou]?t.push(new Du(e[ou]())):t.push(new Hu(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0!==t){this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}}else this.destination.complete()},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++)if("function"==typeof(s=e[n]).hasValue&&!s.hasValue())return;var o=!1,i=[];for(n=0;n<t;n++){var s,a=(s=e[n]).next();if(s.hasCompleted()&&(o=!0),a.done)return void r.complete();i.push(a.value)}this.resultSelector?this._tryresultSelector(i):r.next(i),o&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(Hs),Du=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return Boolean(e&&e.done)},e}(),qu=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[ou]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),Hu=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return Ss(t,e),t.prototype[ou]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return mu(this.observable,new pu(this))},t}(gu),$u=Object.freeze({__proto__:null,Observable:Qs,ConnectableObservable:na,GroupedObservable:ia,observable:Ks,Subject:Zs,BehaviorSubject:aa,ReplaySubject:Ua,AsyncSubject:ka,asap:La,asapScheduler:Ma,async:ja,asyncScheduler:Fa,queue:da,queueScheduler:ha,animationFrame:qa,animationFrameScheduler:Da,VirtualTimeScheduler:Ha,VirtualAction:$a,Scheduler:la,Subscription:Ps,Subscriber:Hs,Notification:Ba,get NotificationKind(){return va},pipe:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vs(e)},noop:za,identity:Gs,isObservable:function(e){return!!e&&(e instanceof Qs||"function"==typeof e.lift&&"function"==typeof e.subscribe)},ArgumentOutOfRangeError:Ka,EmptyError:Ga,ObjectUnsubscribedError:Ys,UnsubscriptionError:js,TimeoutError:Va,bindCallback:function e(t,r,n){if(r){if(!ma(r))return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return e(t,n).apply(void 0,o).pipe(Qa((function(e){return Ls(e)?r.apply(void 0,e):r(e)})))};n=r}return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o,i=this,s={context:i,subject:o,callbackFunc:t,scheduler:n};return new Qs((function(r){if(n){var a={args:e,subscriber:r,params:s};return n.schedule(Ja,0,a)}if(!o){o=new ka;try{t.apply(i,e.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o.next(e.length<=1?e[0]:e),o.complete()}]))}catch(e){zs(o)?o.error(e):console.warn(e)}}return o.subscribe(r)}))}},bindNodeCallback:function e(t,r,n){if(r){if(!ma(r))return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return e(t,n).apply(void 0,o).pipe(Qa((function(e){return Ls(e)?r.apply(void 0,e):r(e)})))};n=r}return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new Qs((function(r){var i=o.context,s=o.subject;if(n)return n.schedule(Za,0,{params:o,subscriber:r,context:i});if(!s){s=o.subject=new ka;try{t.apply(i,e.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.shift();r?s.error(r):(s.next(e.length<=1?e[0]:e),s.complete())}]))}catch(e){zs(s)?s.error(e):console.warn(e)}}return s.subscribe(r)}))}},combineLatest:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return ma(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&Ls(e[0])&&(e=e[0]),wa(e,n).lift(new lu(r))},concat:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Eu()(Ea.apply(void 0,e))},defer:Iu,empty:ga,forkJoin:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var r=e[0];if(Ls(r))return Cu(r,null);if(Fs(r)&&Object.getPrototypeOf(r)===Object.prototype){var n=Object.keys(r);return Cu(n.map((function(e){return r[e]})),n)}}if("function"==typeof e[e.length-1]){var o=e.pop();return Cu(e=1===e.length&&Ls(e[0])?e[0]:e,null).pipe(Qa((function(e){return o.apply(void 0,e)})))}return Cu(e,null)},from:du,fromEvent:function e(t,r,n,o){return _s(n)&&(o=n,n=void 0),o?e(t,r,n).pipe(Qa((function(e){return Ls(e)?o.apply(void 0,e):o(e)}))):new Qs((function(e){Bu(t,r,(function(t){arguments.length>1?e.next(Array.prototype.slice.call(arguments)):e.next(t)}),e,n)}))},fromEventPattern:function e(t,r,n){return n?e(t,r).pipe(Qa((function(e){return Ls(e)?n.apply(void 0,e):n(e)}))):new Qs((function(e){var n,o=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)};try{n=t(o)}catch(t){return void e.error(t)}if(_s(r))return function(){return r(o,n)}}))},generate:function(e,t,r,n,o){var i,s;if(1==arguments.length){var a=e;s=a.initialState,t=a.condition,r=a.iterate,i=a.resultSelector||Gs,o=a.scheduler}else void 0===n||ma(n)?(s=e,i=Gs,o=n):(s=e,i=n);return new Qs((function(e){var n=s;if(o)return o.schedule(xu,0,{subscriber:e,iterate:r,condition:t,resultSelector:i,state:n});for(;;){if(t){var a=void 0;try{a=t(n)}catch(t){return void e.error(t)}if(!a){e.complete();break}}var u=void 0;try{u=i(n)}catch(t){return void e.error(t)}if(e.next(u),e.closed)break;try{n=r(n)}catch(t){return void e.error(t)}}}))},iif:function(e,t,r){return void 0===t&&(t=pa),void 0===r&&(r=pa),Iu((function(){return e()?t:r}))},interval:function(e,t){return void 0===e&&(e=0),void 0===t&&(t=ja),(!Tu(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=ja),new Qs((function(r){return r.add(t.schedule(Uu,e,{subscriber:r,counter:0,period:e})),r}))},merge:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Number.POSITIVE_INFINITY,n=null,o=e[e.length-1];return ma(o)?(n=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof o&&(r=e.pop()),null===n&&1===e.length&&e[0]instanceof Qs?e[0]:wu(r)(wa(e,n))},never:function(){return Ou},of:Ea,onErrorResumeNext:function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(0===t.length)return pa;var n=t[0],o=t.slice(1);return 1===t.length&&Ls(n)?e.apply(void 0,n):new Qs((function(t){var r=function(){return t.add(e.apply(void 0,o).subscribe(t))};return du(n).subscribe({next:function(e){t.next(e)},error:r,complete:r})}))},pairs:function(e,t){return new Qs(t?function(r){var n=Object.keys(e),o=new Ps;return o.add(t.schedule(ku,0,{keys:n,index:0,subscriber:r,subscription:o,obj:e})),o}:function(t){for(var r=Object.keys(e),n=0;n<r.length&&!t.closed;n++){var o=r[n];e.hasOwnProperty(o)&&t.next([o,e[o]])}t.complete()})},partition:function(e,t,r){return[_u(t,r)(new Qs(au(e))),_u(Su(t,r))(new Qs(au(e)))]},race:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!Ls(e[0]))return e[0];e=e[0]}return wa(e,void 0).lift(new Ru)},range:function(e,t,r){return void 0===e&&(e=0),new Qs((function(n){void 0===t&&(t=e,e=0);var o=0,i=e;if(r)return r.schedule(Lu,0,{index:o,count:t,start:e,subscriber:n});for(;;){if(o++>=t){n.complete();break}if(n.next(i++),n.closed)break}}))},throwError:Ia,timer:function(e,t,r){void 0===e&&(e=0);var n=-1;return Tu(t)?n=Number(t)<1?1:Number(t):ma(t)&&(r=t),ma(r)||(r=ja),new Qs((function(t){var o=Tu(e)?e:+e-r.now();return r.schedule(Fu,o,{index:0,period:n,subscriber:t})}))},using:function(e,t){return new Qs((function(r){var n,o;try{n=e()}catch(e){return void r.error(e)}try{o=t(n)}catch(e){return void r.error(e)}var i=(o?du(o):pa).subscribe(r);return function(){i.unsubscribe(),n&&n.unsubscribe()}}))},zip:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),wa(e,void 0).lift(new ju(r))},scheduled:hu,EMPTY:pa,NEVER:Ou,config:As});let zu=class{addNotification(e){}};zu=function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}([(console.log("[NgLess::Injectable] factory created"),function(e){console.log("[NgLess::Injectable::factory] class decorated: ",e.name)})],zu),function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=za,i._tapError=za,i._tapComplete=za,i._tapError=n||za,i._tapComplete=o||za,_s(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||za,i._tapError=r.error||za,i._tapComplete=r.complete||za),i}Ss(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}(Hs);var Ku="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Gu={},Vu={exports:{}},Qu={exports:{}},Wu=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},Yu=Wu,Ju=Object.prototype.toString;function Xu(e){return"[object Array]"===Ju.call(e)}function Zu(e){return void 0===e}function ec(e){return null!==e&&"object"==typeof e}function tc(e){return"[object Function]"===Ju.call(e)}function rc(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),Xu(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var nc={isArray:Xu,isArrayBuffer:function(e){return"[object ArrayBuffer]"===Ju.call(e)},isBuffer:function(e){return null!==e&&!Zu(e)&&null!==e.constructor&&!Zu(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:ec,isUndefined:Zu,isDate:function(e){return"[object Date]"===Ju.call(e)},isFile:function(e){return"[object File]"===Ju.call(e)},isBlob:function(e){return"[object Blob]"===Ju.call(e)},isFunction:tc,isStream:function(e){return ec(e)&&tc(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:rc,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)rc(arguments[n],r);return t},deepMerge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]="object"==typeof r?e({},r):r}for(var n=0,o=arguments.length;n<o;n++)rc(arguments[n],r);return t},extend:function(e,t,r){return rc(t,(function(t,n){e[n]=r&&"function"==typeof t?Yu(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},oc=nc;function ic(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var sc=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(oc.isURLSearchParams(t))n=t.toString();else{var o=[];oc.forEach(t,(function(e,t){null!=e&&(oc.isArray(e)?t+="[]":e=[e],oc.forEach(e,(function(e){oc.isDate(e)?e=e.toISOString():oc.isObject(e)&&(e=JSON.stringify(e)),o.push(ic(t)+"="+ic(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},ac=nc;function uc(){this.handlers=[]}uc.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},uc.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},uc.prototype.forEach=function(e){ac.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var cc,lc,fc=uc,hc=nc;function dc(){return lc?cc:(lc=1,cc=function(e){return!(!e||!e.__CANCEL__)})}var pc,gc,mc,vc,bc,yc,wc,Ec,Ic,Cc,Bc,xc,Tc,Uc,Oc,kc,Sc,_c,Nc,Ac,Rc=nc;function Mc(){return gc||(gc=1,pc=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}),pc}function Lc(){if(vc)return mc;vc=1;var e=Mc();return mc=function(t,r,n,o,i){var s=new Error(t);return e(s,r,n,o,i)},mc}function Fc(){if(yc)return bc;yc=1;var e=Lc();return bc=function(t,r,n){var o=n.config.validateStatus;!o||o(n.status)?t(n):r(e("Request failed with status code "+n.status,n.config,null,n.request,n))}}function jc(){if(xc)return Bc;xc=1;var e=Ec?wc:(Ec=1,wc=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}),t=Cc?Ic:(Cc=1,Ic=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e});return Bc=function(r,n){return r&&!e(n)?t(r,n):n}}var Pc,Dc,qc,Hc,$c={exports:{}},zc={exports:{}},Kc={exports:{}},Gc={exports:{}};function Vc(){return qc||(qc=1,function(e,t){function r(e){var r;function o(){if(o.enabled){var e=o,n=+new Date,i=n-(r||n);e.diff=i,e.prev=r,e.curr=n,r=n;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;u++;var o=t.formatters[n];if("function"==typeof o){var i=s[u];r=o.call(e,i),s.splice(u,1),u--}return r})),t.formatArgs.call(e,s);var c=o.log||t.log||console.log.bind(console);c.apply(e,s)}}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),o.destroy=n,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function n(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=Gc.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var r;t.save(e),t.names=[],t.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(r=0;r<t.instances.length;r++){var i=t.instances[r];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=function(){if(Dc)return Pc;Dc=1;var e=1e3,t=60*e,r=60*t,n=24*r;function o(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}return Pc=function(i,s){s=s||{};var a=typeof i;if("string"===a&&i.length>0)return function(o){if(!((o=String(o)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*n;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*t;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(i);if("number"===a&&!1===isNaN(i))return s.long?function(i){return o(i,n,"day")||o(i,r,"hour")||o(i,t,"minute")||o(i,e,"second")||i+" ms"}(i):function(o){return o>=n?Math.round(o/n)+"d":o>=r?Math.round(o/r)+"h":o>=t?Math.round(o/t)+"m":o>=e?Math.round(o/e)+"s":o+"ms"}(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))}}(),t.instances=[],t.names=[],t.skips=[],t.formatters={}}(0,Gc.exports)),Gc.exports}var Qc={exports:{}};const Wc=n,Yc=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)},Jc=process.env;let Xc;function Zc(e){const t=function(e){if(!1===Xc)return 0;if(Yc("color=16m")||Yc("color=full")||Yc("color=truecolor"))return 3;if(Yc("color=256"))return 2;if(e&&!e.isTTY&&!0!==Xc)return 0;const t=Xc?1:0;if("win32"===process.platform){const e=Wc.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Jc)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in Jc))||"codeship"===Jc.CI_NAME?1:t;if("TEAMCITY_VERSION"in Jc)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Jc.TEAMCITY_VERSION)?1:0;if("truecolor"===Jc.COLORTERM)return 3;if("TERM_PROGRAM"in Jc){const e=parseInt((Jc.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Jc.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Jc.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Jc.TERM)||"COLORTERM"in Jc?1:(Jc.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}Yc("no-color")||Yc("no-colors")||Yc("color=false")?Xc=!1:(Yc("color")||Yc("colors")||Yc("color=true")||Yc("color=always"))&&(Xc=!0),"FORCE_COLOR"in Jc&&(Xc=0===Jc.FORCE_COLOR.length||0!==parseInt(Jc.FORCE_COLOR,10));var el,tl,rl,nl={supportsColor:Zc,stdout:Zc(process.stdout),stderr:Zc(process.stderr)};function ol(){if(rl)return $c.exports;rl=1;var e=d,n=f,o=h,a=i,u=s.Writable,c=function(){return tl||(tl=1,e=zc,"undefined"==typeof process||"renderer"===process.type?e.exports=(Hc||(Hc=1,function(e,t){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=Kc.exports=Vc()).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())}(0,Kc.exports)),Kc.exports):e.exports=(el||(el=1,function(e,n){var o=t,i=r;(n=Qc.exports=Vc()).init=function(e){e.inspectOpts={};for(var t=Object.keys(n.inspectOpts),r=0;r<t.length;r++)e.inspectOpts[t[r]]=n.inspectOpts[t[r]]},n.log=function(){return process.stderr.write(i.format.apply(i,arguments)+"\n")},n.formatArgs=function(e){var t=this.namespace;if(this.useColors){var r=this.color,o="[3"+(r<8?r:"8;5;"+r),i=" "+o+";1m"+t+" ";e[0]=i+e[0].split("\n").join("\n"+i),e.push(o+"m+"+n.humanize(this.diff)+"")}else e[0]=(n.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+t+" "+e[0]},n.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},n.load=s,n.useColors=function(){return"colors"in n.inspectOpts?Boolean(n.inspectOpts.colors):o.isatty(process.stderr.fd)},n.colors=[6,2,3,4,5,1];try{nl&&nl.level>=2&&(n.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}function s(){return process.env.DEBUG}n.inspectOpts=Object.keys(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),n.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},n.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)},n.enable(s())}(0,Qc.exports)),Qc.exports)),zc.exports;var e}()("follow-redirects"),l={GET:!0,HEAD:!0,OPTIONS:!0,TRACE:!0},p=Object.create(null);function g(e,t){u.call(this),e.headers=e.headers||{},this._options=e,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e.host&&(e.hostname||(e.hostname=e.host),delete e.host),t&&this.on("response",t);var r=this;if(this._onNativeResponse=function(e){r._processResponse(e)},!e.pathname&&e.path){var n=e.path.indexOf("?");n<0?e.pathname=e.path:(e.pathname=e.path.substring(0,n),e.search=e.path.substring(n))}this._performRequest()}function m(t){var r={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach((function(o){var i=o+":",s=n[i]=t[o],u=r[o]=Object.create(s);u.request=function(t,o){return"string"==typeof t?(t=e.parse(t)).maxRedirects=r.maxRedirects:t=Object.assign({protocol:i,maxRedirects:r.maxRedirects,maxBodyLength:r.maxBodyLength},t),t.nativeProtocols=n,a.equal(t.protocol,i,"protocol mismatch"),c("options",t),new g(t,o)},u.get=function(e,t){var r=u.request(e,t);return r.end(),r}})),r}return["abort","aborted","error","socket","timeout"].forEach((function(e){p[e]=function(t){this._redirectable.emit(e,t)}})),g.prototype=Object.create(u.prototype),g.prototype.write=function(e,t,r){if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new Error("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new Error("Request body larger than maxBodyLength limit")),this.abort()):r&&r()},g.prototype.end=function(e,t,r){"function"==typeof e?(r=e,e=t=null):"function"==typeof t&&(r=t,t=null);var n=this._currentRequest;this.write(e||"",t,(function(){n.end(null,null,r)}))},g.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},g.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive","setTimeout"].forEach((function(e){g.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(g.prototype,e,{get:function(){return this._currentRequest[e]}})})),g.prototype._performRequest=function(){var t=this._options.protocol,r=this._options.nativeProtocols[t];if(r){if(this._options.agents){var n=t.substr(0,t.length-1);this._options.agent=this._options.agents[n]}var o=this._currentRequest=r.request(this._options,this._onNativeResponse);for(var i in this._currentUrl=e.format(this._options),o._redirectable=this,p)i&&o.on(i,p[i]);if(this._isRedirect){var s=0,a=this._requestBodyBuffers;!function e(){if(s<a.length){var t=a[s++];o.write(t.data,t.encoding,e)}else o.end()}()}}else this.emit("error",new Error("Unsupported protocol "+t))},g.prototype._processResponse=function(t){this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:t.statusCode});var r=t.headers.location;if(r&&!1!==this._options.followRedirects&&t.statusCode>=300&&t.statusCode<400){if(++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Error("Max redirects exceeded."));var n,o=this._options.headers;if(307!==t.statusCode&&!(this._options.method in l))for(n in this._options.method="GET",this._requestBodyBuffers=[],o)/^content-/i.test(n)&&delete o[n];if(!this._isRedirect)for(n in o)/^host$/i.test(n)&&delete o[n];var i=e.resolve(this._currentUrl,r);c("redirecting to",i),Object.assign(this._options,e.parse(i)),this._isRedirect=!0,this._performRequest(),t.destroy()}else t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[]},$c.exports=m({http:n,https:o}),$c.exports.wrap=m,$c.exports}var il,sl,al={name:"axios",version:"0.19.2",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test && bundlesize",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://github.com/axios/axios",devDependencies:{bundlesize:"^0.17.0",coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^5.2.0",sinon:"^4.5.0",typescript:"^2.8.1","url-search-params":"^0.10.0",webpack:"^1.13.1","webpack-dev-server":"^1.14.1"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},typings:"./index.d.ts",dependencies:{"follow-redirects":"1.5.10"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]},ul=nc,cl=function(e,t){Rc.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},ll={"Content-Type":"application/x-www-form-urlencoded"};function fl(e,t){!ul.isUndefined(e)&&ul.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var hl,dl={adapter:("undefined"!=typeof XMLHttpRequest?hl=function(){if(Ac)return Nc;Ac=1;var e=nc,t=Fc(),r=sc,n=jc(),o=function(){if(Uc)return Tc;Uc=1;var e=nc,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Tc=function(r){var n,o,i,s={};return r?(e.forEach(r.split("\n"),(function(r){if(i=r.indexOf(":"),n=e.trim(r.substr(0,i)).toLowerCase(),o=e.trim(r.substr(i+1)),n){if(s[n]&&t.indexOf(n)>=0)return;s[n]="set-cookie"===n?(s[n]?s[n]:[]).concat([o]):s[n]?s[n]+", "+o:o}})),s):s},Tc}(),i=function(){if(kc)return Oc;kc=1;var e=nc;return Oc=e.isStandardBrowserEnv()?function(){var t,r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var t=e;return r&&(n.setAttribute("href",t),t=n.href),n.setAttribute("href",t),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(r){var n=e.isString(r)?o(r):r;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}}(),s=Lc();return Nc=function(a){return new Promise((function(u,c){var l=a.data,f=a.headers;e.isFormData(l)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(a.auth){var d=a.auth.username||"",p=a.auth.password||"";f.Authorization="Basic "+btoa(d+":"+p)}var g=n(a.baseURL,a.url);if(h.open(a.method.toUpperCase(),r(g,a.params,a.paramsSerializer),!0),h.timeout=a.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in h?o(h.getAllResponseHeaders()):null,r={data:a.responseType&&"text"!==a.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:e,config:a,request:h};t(u,c,r),h=null}},h.onabort=function(){h&&(c(s("Request aborted",a,"ECONNABORTED",h)),h=null)},h.onerror=function(){c(s("Network Error",a,null,h)),h=null},h.ontimeout=function(){var e="timeout of "+a.timeout+"ms exceeded";a.timeoutErrorMessage&&(e=a.timeoutErrorMessage),c(s(e,a,"ECONNABORTED",h)),h=null},e.isStandardBrowserEnv()){var m=function(){if(_c)return Sc;_c=1;var e=nc;return Sc=e.isStandardBrowserEnv()?{write:function(t,r,n,o,i,s){var a=[];a.push(t+"="+encodeURIComponent(r)),e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),e.isString(o)&&a.push("path="+o),e.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Sc}(),v=(a.withCredentials||i(g))&&a.xsrfCookieName?m.read(a.xsrfCookieName):void 0;v&&(f[a.xsrfHeaderName]=v)}if("setRequestHeader"in h&&e.forEach(f,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),e.isUndefined(a.withCredentials)||(h.withCredentials=!!a.withCredentials),a.responseType)try{h.responseType=a.responseType}catch(e){if("json"!==a.responseType)throw e}"function"==typeof a.onDownloadProgress&&h.addEventListener("progress",a.onDownloadProgress),"function"==typeof a.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",a.onUploadProgress),a.cancelToken&&a.cancelToken.promise.then((function(e){h&&(h.abort(),c(e),h=null)})),void 0===l&&(l=null),h.send(l)}))},Nc}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(hl=function(){if(sl)return il;sl=1;var e=nc,t=Fc(),r=jc(),n=sc,o=f,i=h,s=ol().http,a=ol().https,u=d,c=p,l=al,g=Lc(),m=Mc(),v=/https:?/;return il=function(f){return new Promise((function(h,d){var p=function(e){h(e)},b=function(e){d(e)},y=f.data,w=f.headers;if(w["User-Agent"]||w["user-agent"]||(w["User-Agent"]="axios/"+l.version),y&&!e.isStream(y)){if(Buffer.isBuffer(y));else if(e.isArrayBuffer(y))y=Buffer.from(new Uint8Array(y));else{if(!e.isString(y))return b(g("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",f));y=Buffer.from(y,"utf-8")}w["Content-Length"]=y.length}var E=void 0;f.auth&&(E=(f.auth.username||"")+":"+(f.auth.password||""));var I=r(f.baseURL,f.url),C=u.parse(I),B=C.protocol||"http:";if(!E&&C.auth){var x=C.auth.split(":");E=(x[0]||"")+":"+(x[1]||"")}E&&delete w.Authorization;var T=v.test(B),U=T?f.httpsAgent:f.httpAgent,O={path:n(C.path,f.params,f.paramsSerializer).replace(/^\?/,""),method:f.method.toUpperCase(),headers:w,agent:U,agents:{http:f.httpAgent,https:f.httpsAgent},auth:E};f.socketPath?O.socketPath=f.socketPath:(O.hostname=C.hostname,O.port=C.port);var k,S=f.proxy;if(!S&&!1!==S){var _=B.slice(0,-1)+"_proxy",N=process.env[_]||process.env[_.toUpperCase()];if(N){var A=u.parse(N),R=process.env.no_proxy||process.env.NO_PROXY,M=!0;if(R&&(M=!R.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||"."===e[0]&&C.hostname.substr(C.hostname.length-e.length)===e||C.hostname===e)}))),M&&(S={host:A.hostname,port:A.port},A.auth)){var L=A.auth.split(":");S.auth={username:L[0],password:L[1]}}}}if(S&&(O.hostname=S.host,O.host=S.host,O.headers.host=C.hostname+(C.port?":"+C.port:""),O.port=S.port,O.path=B+"//"+C.hostname+(C.port?":"+C.port:"")+O.path,S.auth)){var F=Buffer.from(S.auth.username+":"+S.auth.password,"utf8").toString("base64");O.headers["Proxy-Authorization"]="Basic "+F}var j=T&&(!S||v.test(S.protocol));f.transport?k=f.transport:0===f.maxRedirects?k=j?i:o:(f.maxRedirects&&(O.maxRedirects=f.maxRedirects),k=j?a:s),f.maxContentLength&&f.maxContentLength>-1&&(O.maxBodyLength=f.maxContentLength);var P=k.request(O,(function(e){if(!P.aborted){var r=e;switch(e.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=204===e.statusCode?r:r.pipe(c.createUnzip()),delete e.headers["content-encoding"]}var n=e.req||P,o={status:e.statusCode,statusText:e.statusMessage,headers:e.headers,config:f,request:n};if("stream"===f.responseType)o.data=r,t(p,b,o);else{var i=[];r.on("data",(function(e){i.push(e),f.maxContentLength>-1&&Buffer.concat(i).length>f.maxContentLength&&(r.destroy(),b(g("maxContentLength size of "+f.maxContentLength+" exceeded",f,null,n)))})),r.on("error",(function(e){P.aborted||b(m(e,f,null,n))})),r.on("end",(function(){var e=Buffer.concat(i);"arraybuffer"!==f.responseType&&(e=e.toString(f.responseEncoding)),o.data=e,t(p,b,o)}))}}}));P.on("error",(function(e){P.aborted||b(m(e,f,null,P))})),f.timeout&&P.setTimeout(f.timeout,(function(){P.abort(),b(g("timeout of "+f.timeout+"ms exceeded",f,"ECONNABORTED",P))})),f.cancelToken&&f.cancelToken.promise.then((function(e){P.aborted||(P.abort(),b(e))})),e.isStream(y)?y.on("error",(function(e){b(m(e,f,null,P))})).pipe(P):P.end(y)}))},il}()),hl),transformRequest:[function(e,t){return cl(t,"Accept"),cl(t,"Content-Type"),ul.isFormData(e)||ul.isArrayBuffer(e)||ul.isBuffer(e)||ul.isStream(e)||ul.isFile(e)||ul.isBlob(e)?e:ul.isArrayBufferView(e)?e.buffer:ul.isURLSearchParams(e)?(fl(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ul.isObject(e)?(fl(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ul.forEach(["delete","get","head"],(function(e){dl.headers[e]={}})),ul.forEach(["post","put","patch"],(function(e){dl.headers[e]=ul.merge(ll)}));var pl=dl,gl=nc,ml=function(e,t,r){return hc.forEach(r,(function(r){e=r(e,t)})),e},vl=dc(),bl=pl;function yl(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var wl,El,Il,Cl,Bl,xl,Tl=nc,Ul=function(e,t){t=t||{};var r={},n=["url","method","params","data"],o=["headers","auth","proxy"],i=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];Tl.forEach(n,(function(e){void 0!==t[e]&&(r[e]=t[e])})),Tl.forEach(o,(function(n){Tl.isObject(t[n])?r[n]=Tl.deepMerge(e[n],t[n]):void 0!==t[n]?r[n]=t[n]:Tl.isObject(e[n])?r[n]=Tl.deepMerge(e[n]):void 0!==e[n]&&(r[n]=e[n])})),Tl.forEach(i,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}));var s=n.concat(o).concat(i),a=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return Tl.forEach(a,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r},Ol=nc,kl=sc,Sl=fc,_l=function(e){return yl(e),e.headers=e.headers||{},e.data=ml(e.data,e.headers,e.transformRequest),e.headers=gl.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),gl.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||bl.adapter)(e).then((function(t){return yl(e),t.data=ml(t.data,t.headers,e.transformResponse),t}),(function(t){return vl(t)||(yl(e),t&&t.response&&(t.response.data=ml(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Nl=Ul;function Al(e){this.defaults=e,this.interceptors={request:new Sl,response:new Sl}}function Rl(){if(El)return wl;function e(e){this.message=e}return El=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,wl=e}Al.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Nl(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[_l,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},Al.prototype.getUri=function(e){return e=Nl(this.defaults,e),kl(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},Ol.forEach(["delete","get","head","options"],(function(e){Al.prototype[e]=function(t,r){return this.request(Ol.merge(r||{},{method:e,url:t}))}})),Ol.forEach(["post","put","patch"],(function(e){Al.prototype[e]=function(t,r,n){return this.request(Ol.merge(n||{},{method:e,url:t,data:r}))}}));var Ml=nc,Ll=Wu,Fl=Al,jl=Ul;function Pl(e){var t=new Fl(e),r=Ll(Fl.prototype.request,t);return Ml.extend(r,Fl.prototype,t),Ml.extend(r,t),r}var Dl=Pl(pl);Dl.Axios=Fl,Dl.create=function(e){return Pl(jl(Dl.defaults,e))},Dl.Cancel=Rl(),Dl.CancelToken=function(){if(Cl)return Il;Cl=1;var e=Rl();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(e){r=e}));var n=this;t((function(t){n.reason||(n.reason=new e(t),r(n.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},Il=t}(),Dl.isCancel=dc(),Dl.all=function(e){return Promise.all(e)},Dl.spread=xl?Bl:(xl=1,Bl=function(e){return function(t){return e.apply(null,t)}}),Qu.exports=Dl,Qu.exports.default=Dl,Vu.exports=Qu.exports;var ql={},Hl=function(e){var t=e.default;if("function"==typeof t){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}($u),$l=Ku&&Ku.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(ql,"__esModule",{value:!0});var zl=Hl,Kl=Vu.exports;ql.createObservable=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n,o=t[t.length-1];o=o?$l({},o):{},t[t.length-1]=o;var i=!!o.cancelToken;i&&console.warn("No need to use cancel token, just unsubscribe the subscription would cancel the http request automatically");var s=new zl.Observable((function(r){i||(n=Kl.default.CancelToken.source(),o.cancelToken=n.token),e.apply(void 0,t).then((function(e){r.next(e),r.complete()})).catch((function(e){return r.error(e)}))})),a=s.subscribe.bind(s);return s.subscribe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.apply(void 0,e),o=r.unsubscribe.bind(r);return r.unsubscribe=function(){n&&n.cancel(),o()},r},s},Object.defineProperty(Gu,"__esModule",{value:!0});var Gl=Vu.exports,Vl=ql,Ql=function(){function e(e){this.axiosInstance=e}return Object.defineProperty(e.prototype,"defaults",{get:function(){return this.axiosInstance.defaults},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interceptors",{get:function(){return this.axiosInstance.interceptors},enumerable:!0,configurable:!0}),e.request=function(e){return Vl.createObservable(Gl.default.request,e)},e.get=function(e,t){return Vl.createObservable(Gl.default.get,e,t)},e.post=function(e,t,r){return Vl.createObservable(Gl.default.post,e,t,r)},e.put=function(e,t,r){return Vl.createObservable(Gl.default.put,e,t,r)},e.patch=function(e,t,r){return Vl.createObservable(Gl.default.patch,e,t,r)},e.delete=function(e,t){return Vl.createObservable(Gl.default.delete,e,t)},e.head=function(e,t){return Vl.createObservable(Gl.default.head,e,t)},e.create=function(t){return new e(Gl.default.create(t))},e.prototype.request=function(e){return Vl.createObservable(this.axiosInstance.request,e)},e.prototype.get=function(e,t){return Vl.createObservable(this.axiosInstance.get,e,t)},e.prototype.head=function(e,t){return Vl.createObservable(this.axiosInstance.head,e,t)},e.prototype.post=function(e,t,r){return Vl.createObservable(this.axiosInstance.post,e,t,r)},e.prototype.put=function(e,t,r){return Vl.createObservable(this.axiosInstance.put,e,t,r)},e.prototype.patch=function(e,t,r){return Vl.createObservable(this.axiosInstance.patch,e,t,r)},e.prototype.delete=function(e,t){return Vl.createObservable(this.axiosInstance.delete,e,t)},e.defaults=Gl.default.defaults,e.interceptors=Gl.default.interceptors,e}();Gu.Axios=Ql,(Gu.default=Ql).interceptors.response.use((function(e){let t=e.data,r=t.indexOf("\r");const n=t.indexOf("\n");return(r<0||r+1==n)&&(r=n),t=t.substring(r+1),e.data=JSON.parse(t),e}),(function(e){return Promise.reject(e)}));var Wl={exports:{}},Yl=/[|\\{}()[\]^$+*?.]/g,Jl=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(Yl,"\\$&")},Xl={exports:{}},Zl={exports:{}},ef={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},tf={};for(var rf in ef)ef.hasOwnProperty(rf)&&(tf[ef[rf]]=rf);var nf=Zl.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var of in nf)if(nf.hasOwnProperty(of)){if(!("channels"in nf[of]))throw new Error("missing channels property: "+of);if(!("labels"in nf[of]))throw new Error("missing channel labels property: "+of);if(nf[of].labels.length!==nf[of].channels)throw new Error("channel and label counts mismatch: "+of);var sf=nf[of].channels,af=nf[of].labels;delete nf[of].channels,delete nf[of].labels,Object.defineProperty(nf[of],"channels",{value:sf}),Object.defineProperty(nf[of],"labels",{value:af})}nf.rgb.hsl=function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.min(n,o,i),a=Math.max(n,o,i),u=a-s;return a===s?t=0:n===a?t=(o-i)/u:o===a?t=2+(i-n)/u:i===a&&(t=4+(n-o)/u),(t=Math.min(60*t,360))<0&&(t+=360),r=(s+a)/2,[t,100*(a===s?0:r<=.5?u/(a+s):u/(2-a-s)),100*r]},nf.rgb.hsv=function(e){var t,r,n,o,i,s=e[0]/255,a=e[1]/255,u=e[2]/255,c=Math.max(s,a,u),l=c-Math.min(s,a,u),f=function(e){return(c-e)/6/l+.5};return 0===l?o=i=0:(i=l/c,t=f(s),r=f(a),n=f(u),s===c?o=n-r:a===c?o=1/3+t-n:u===c&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},nf.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2];return[nf.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(r,n))*100,100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},nf.rgb.cmyk=function(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-o)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},nf.rgb.keyword=function(e){var t=tf[e];if(t)return t;var r,n,o,i=1/0;for(var s in ef)if(ef.hasOwnProperty(s)){var a=(n=e,o=ef[s],Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2)+Math.pow(n[2]-o[2],2));a<i&&(i=a,r=s)}return r},nf.keyword.rgb=function(e){return ef[e]},nf.rgb.xyz=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},nf.rgb.lab=function(e){var t=nf.rgb.xyz(e),r=t[0],n=t[1],o=t[2];return n/=100,o/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},nf.hsl.rgb=function(e){var t,r,n,o,i,s=e[0]/360,a=e[1]/100,u=e[2]/100;if(0===a)return[i=255*u,i,i];t=2*u-(r=u<.5?u*(1+a):u+a-u*a),o=[0,0,0];for(var c=0;c<3;c++)(n=s+1/3*-(c-1))<0&&n++,n>1&&n--,i=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,o[c]=255*i;return o},nf.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,o=r,i=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,o*=i<=1?i:2-i,[t,100*(0===n?2*o/(i+o):2*r/(n+r)),(n+r)/2*100]},nf.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),u=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,u,s];case 1:return[a,n,s];case 2:return[s,n,u];case 3:return[s,a,n];case 4:return[u,s,n];case 5:return[n,s,a]}},nf.hsv.hsl=function(e){var t,r,n,o=e[0],i=e[1]/100,s=e[2]/100,a=Math.max(s,.01);return n=(2-i)*s,r=i*a,[o,100*(r=(r/=(t=(2-i)*a)<=1?t:2-t)||0),100*(n/=2)]},nf.hwb.rgb=function(e){var t,r,n,o,i,s,a,u=e[0]/360,c=e[1]/100,l=e[2]/100,f=c+l;switch(f>1&&(c/=f,l/=f),n=6*u-(t=Math.floor(6*u)),0!=(1&t)&&(n=1-n),o=c+n*((r=1-l)-c),t){default:case 6:case 0:i=r,s=o,a=c;break;case 1:i=o,s=r,a=c;break;case 2:i=c,s=r,a=o;break;case 3:i=c,s=o,a=r;break;case 4:i=o,s=c,a=r;break;case 5:i=r,s=c,a=o}return[255*i,255*s,255*a]},nf.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},nf.xyz.rgb=function(e){var t,r,n,o=e[0]/100,i=e[1]/100,s=e[2]/100;return r=-.9689*o+1.8758*i+.0415*s,n=.0557*o+-.204*i+1.057*s,t=(t=3.2406*o+-1.5372*i+-.4986*s)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},nf.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},nf.lab.xyz=function(e){var t,r,n,o=e[0];t=e[1]/500+(r=(o+16)/116),n=r-e[2]/200;var i=Math.pow(r,3),s=Math.pow(t,3),a=Math.pow(n,3);return r=i>.008856?i:(r-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,[t*=95.047,r*=100,n*=108.883]},nf.lab.lch=function(e){var t,r=e[0],n=e[1],o=e[2];return(t=360*Math.atan2(o,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+o*o),t]},nf.lch.lab=function(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]},nf.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],o=1 in arguments?arguments[1]:nf.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var i=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return 2===o&&(i+=60),i},nf.hsv.ansi16=function(e){return nf.rgb.ansi16(nf.hsv.rgb(e),e[2])},nf.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},nf.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},nf.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var r;return e-=16,[Math.floor(e/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255]},nf.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},nf.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];3===t[0].length&&(r=r.split("").map((function(e){return e+e})).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},nf.rgb.hcg=function(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255,i=Math.max(Math.max(r,n),o),s=Math.min(Math.min(r,n),o),a=i-s;return t=a<=0?0:i===r?(n-o)/a%6:i===n?2+(o-r)/a:4+(r-n)/a+4,t/=6,[360*(t%=1),100*a,100*(a<1?s/(1-a):0)]},nf.hsl.hcg=function(e){var t,r=e[1]/100,n=e[2]/100,o=0;return(t=n<.5?2*r*n:2*r*(1-n))<1&&(o=(n-.5*t)/(1-t)),[e[0],100*t,100*o]},nf.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},nf.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];var o,i=[0,0,0],s=t%1*6,a=s%1,u=1-a;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=u,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=u,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=u}return o=(1-r)*n,[255*(r*i[0]+o),255*(r*i[1]+o),255*(r*i[2]+o)]},nf.hcg.hsv=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},nf.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},nf.hcg.hwb=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},nf.hwb.hcg=function(e){var t=e[1]/100,r=1-e[2]/100,n=r-t,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},nf.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},nf.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},nf.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},nf.gray.hsl=nf.gray.hsv=function(e){return[0,0,e[0]]},nf.gray.hwb=function(e){return[0,100,e[0]]},nf.gray.cmyk=function(e){return[0,0,0,e[0]]},nf.gray.lab=function(e){return[e[0],0,0]},nf.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},nf.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var uf=Zl.exports;function cf(e,t){return function(r){return t(e(r))}}function lf(e,t){for(var r=[t[e].parent,e],n=uf[t[e].parent][e],o=t[e].parent;t[o].parent;)r.unshift(t[o].parent),n=cf(uf[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}var ff=Zl.exports,hf={};Object.keys(ff).forEach((function(e){hf[e]={},Object.defineProperty(hf[e],"channels",{value:ff[e].channels}),Object.defineProperty(hf[e],"labels",{value:ff[e].labels});var t=function(e){for(var t=function(e){var t=function(){for(var e={},t=Object.keys(uf),r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;)for(var n=r.pop(),o=Object.keys(uf[n]),i=o.length,s=0;s<i;s++){var a=o[s],u=t[a];-1===u.distance&&(u.distance=t[n].distance+1,u.parent=n,r.unshift(a))}return t}(e),r={},n=Object.keys(t),o=n.length,i=0;i<o;i++){var s=n[i];null!==t[s].parent&&(r[s]=lf(s,t))}return r}(e);Object.keys(t).forEach((function(r){var n=t[r];hf[e][r]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var r=e(t);if("object"==typeof r)for(var n=r.length,o=0;o<n;o++)r[o]=Math.round(r[o]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(n),hf[e][r].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))}));var df=hf;!function(e){const t=df,r=(e,r)=>function(){const n=e.apply(t,arguments);return`[${n+r}m`},n=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};5;${n}m`},o=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};2;${n[0]};${n[1]};${n[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.grey=i.color.gray;for(const t of Object.keys(i)){const r=i[t];for(const t of Object.keys(r)){const n=r[t];i[t]={open:`[${n[0]}m`,close:`[${n[1]}m`},r[t]=i[t],e.set(n[0],n[1])}Object.defineProperty(i,t,{value:r,enumerable:!1}),Object.defineProperty(i,"codes",{value:e,enumerable:!1})}const s=e=>e,a=(e,t,r)=>[e,t,r];i.color.close="",i.bgColor.close="",i.color.ansi={ansi:r(s,0)},i.color.ansi256={ansi256:n(s,0)},i.color.ansi16m={rgb:o(a,0)},i.bgColor.ansi={ansi:r(s,10)},i.bgColor.ansi256={ansi256:n(s,10)},i.bgColor.ansi16m={rgb:o(a,10)};for(let e of Object.keys(t)){if("object"!=typeof t[e])continue;const s=t[e];"ansi16"===e&&(e="ansi"),"ansi16"in s&&(i.color.ansi[e]=r(s.ansi16,0),i.bgColor.ansi[e]=r(s.ansi16,10)),"ansi256"in s&&(i.color.ansi256[e]=n(s.ansi256,0),i.bgColor.ansi256[e]=n(s.ansi256,10)),"rgb"in s&&(i.color.ansi16m[e]=o(s.rgb,0),i.bgColor.ansi16m[e]=o(s.rgb,10))}return i}})}(Xl);const pf=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,gf=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,mf=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,vf=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,bf=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function yf(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):bf.get(e)||e}function wf(e,t){const r=[],n=t.trim().split(/\s*,\s*/g);let o;for(const t of n)if(isNaN(t)){if(!(o=t.match(mf)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(o[2].replace(vf,((e,t,r)=>t?yf(t):r)))}else r.push(Number(t));return r}function Ef(e){gf.lastIndex=0;const t=[];let r;for(;null!==(r=gf.exec(e));){const e=r[1];if(r[2]){const n=wf(e,r[2]);t.push([e].concat(n))}else t.push([e])}return t}function If(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const e of Object.keys(r))if(Array.isArray(r[e])){if(!(e in n))throw new Error(`Unknown Chalk style: ${e}`);n=r[e].length>0?n[e].apply(n,r[e]):n[e]}return n}var Cf,Bf,xf,Tf=(e,t)=>{const r=[],n=[];let o=[];if(t.replace(pf,((t,i,s,a,u,c)=>{if(i)o.push(yf(i));else if(a){const t=o.join("");o=[],n.push(0===r.length?t:If(e,r)(t)),r.push({inverse:s,styles:Ef(a)})}else if(u){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");n.push(If(e,r)(o.join(""))),o=[],r.pop()}else o.push(c)})),n.push(o.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")};!function(e){const t=Jl,r=Xl.exports,n=nl.stdout,o=Tf,i="win32"===process.platform&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),s=["ansi","ansi","ansi256","ansi16m"],a=new Set(["gray"]),u=Object.create(null);function c(e,t){t=t||{};const r=n?n.level:0;e.level=void 0===t.level?r:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function l(e){if(!this||!(this instanceof l)||this.template){const t={};return c(t,e),t.template=function(){const e=[].slice.call(arguments);return p.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,l.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=l,t.template}c(this,e)}i&&(r.blue.open="");for(const e of Object.keys(r))r[e].closeRe=new RegExp(t(r[e].close),"g"),u[e]={get(){const t=r[e];return h.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};u.visible={get(){return h.call(this,this._styles||[],!0,"visible")}},r.color.closeRe=new RegExp(t(r.color.close),"g");for(const e of Object.keys(r.color.ansi))a.has(e)||(u[e]={get(){const t=this.level;return function(){const n=r.color[s[t]][e].apply(null,arguments),o={open:n,close:r.color.close,closeRe:r.color.closeRe};return h.call(this,this._styles?this._styles.concat(o):[o],this._empty,e)}}});r.bgColor.closeRe=new RegExp(t(r.bgColor.close),"g");for(const e of Object.keys(r.bgColor.ansi))a.has(e)||(u["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const n=r.bgColor[s[t]][e].apply(null,arguments),o={open:n,close:r.bgColor.close,closeRe:r.bgColor.closeRe};return h.call(this,this._styles?this._styles.concat(o):[o],this._empty,e)}}});const f=Object.defineProperties((()=>{}),u);function h(e,t,r){const n=function(){return d.apply(n,arguments)};n._styles=e,n._empty=t;const o=this;return Object.defineProperty(n,"level",{enumerable:!0,get:()=>o.level,set(e){o.level=e}}),Object.defineProperty(n,"enabled",{enumerable:!0,get:()=>o.enabled,set(e){o.enabled=e}}),n.hasGrey=this.hasGrey||"gray"===r||"grey"===r,n.__proto__=f,n}function d(){const e=arguments,t=e.length;let n=String(arguments[0]);if(0===t)return"";if(t>1)for(let r=1;r<t;r++)n+=" "+e[r];if(!this.enabled||this.level<=0||!n)return this._empty?"":n;const o=r.dim.open;i&&this.hasGrey&&(r.dim.open="");for(const e of this._styles.slice().reverse())n=e.open+n.replace(e.closeRe,e.open)+e.close,n=n.replace(/\r?\n/g,`${e.close}$&${e.open}`);return r.dim.open=o,n}function p(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");const r=[].slice.call(arguments,2),n=[t.raw[0]];for(let e=1;e<t.length;e++)n.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(t.raw[e]));return o(e,n.join(""))}Object.defineProperties(l.prototype,u),e.exports=l(),e.exports.supportsColor=n,e.exports.default=e.exports}(Wl),function(e){e.MOVE="MOVE",e.DELETE="DELETE",e.ADD="ADD",e.CODE="CODE",e.DUPLICATE="DUPLICATE"}(Cf||(Cf={})),function(e){e.SOURCE="SOURCE",e.DESTINATION="DESTINATION"}(Bf||(Bf={})),function(e){e.ALL_PATHS_AT_ITERABLE_PART="ALL_PATHS_AT_ITERABLE_PART",e.ALL_PATHS_AT_NON_ITERABLE_PART="ALL_PATHS_AT_NON_ITERABLE_PART",e.NOT_ALL_PATHS_AT_ITERABLE_PART="NOT_ALL_PATHS_AT_ITERABLE_PART"}(xf||(xf={}));var Uf,Of,kf,Sf;ds.JUST_ENTERED,ds.INITIATED,ds.RUNNING,function(e){e.WAITING_TO_START="POSSIBLE_TO_STOP",e.POSSIBLE_TO_STOP="POSSIBLE_TO_STOP",e.UNFINISHED="UNFINISHED",e.FINISHED="FINISHED"}(Uf||(Uf={})),function(e){e.SEQUENTIAL="SEQUENTIAL",e.PARALLEL="PARALLEL"}(Of||(Of={})),function(e){e.NATIVE="NATIVE",e.USER="USER",e.DATATALKS="DATATALKS"}(kf||(kf={})),function(e){e.ADD="ADD",e.REMOVE="REMOVE"}(Sf||(Sf={})),console.log("Loading the `@colabo-flow/i-core` barrel");const _f=Gi.JAVASCRIPT,Nf=e=>{process.title=`ColaboFlow.Go-${e.hostname}`,e.appNameText=`[${Mi.red.bold("Colabo")}${Mi.blue.bold("Flow")}${Mi.green.bold(".Go")}-${Mi.green.yellow(e.hostname)}]`},Af=(e,t)=>{console.log(`${e.appNameText} Registering task executor, executor.id "${Mi.greenBright(t.id)}"`),e.taskExecutorsAvailable[t.id]=t},Rf=(e,t)=>{e.tasksAvailable[t.id]=t,console.log(`${e.appNameText} Registered task with task.id "${Mi.greenBright(t.id)}"`)};let Mf=0;const Lf=async(e,t)=>{if(!e.chHostHeartbeat)return void console.error(`${e.appNameText} [sendHeartbeatToHost] Error: channel host.chHostHeartbeat is not existing`);const r=t.extension,n=r.taskId,o=r.taskInput,i=t.replyTo??e.queueHostHeartbeat,s=e.tasksAvailable[n];s||console.error(`${e.appNameText} [processColaboFlowMsg_TaskExecute] task is missing for the id: ${n}`),console.log(`${e.appNameText} [processColaboFlowMsg_TaskExecute] Executing id: ${Mi.blueBright(n)}, task.description: ${s.description}`);const a=`taskId:lang-${_f}:host-${e.hostname}:${zi()}`,u=(e=>({id:`${e.id}:${Os()}`,originId:e.id,placeType:ms.TASK,status:cs.WAITING,tokenStatus:ds.JUST_ENTERED,initiatedTokenIdsPerPorts:{},executionInputReferences:{},executionOutputReferences:{},currentTokenIds:[]}))(s);if(u.id=a,e.taskInstances[n]=u,e.runningTaskInstancesInfos[n]={id:a,taskInstance:u},void 0===s.executorRef?.id)return void console.error(`Executor ID is not provided for the task: ${n}`);const c=((e,t)=>e.taskExecutorsAvailable[t])(e,s.executorRef?.id),l={...Qi(e.hostname,Ki.TASK_EXECUTE_PROGRESS),requestId:t.requestId,msgReplyChainIds:[t.id],extension:{taskInstanceId:a,status:Vi.INITIALIZED,progress:0},msg:`Returning task execution for the taskId: '${n}' over queue: '${i}'}`};console.log(`${e.appNameText} Sending PROGRESS to the task execution requester (service) [queue: "${Mi.blueBright(i)}"]: ${JSON.stringify(l)}`),e.chHostHeartbeat.sendToQueue(i,Buffer.from(JSON.stringify(l)));const f=await(c.reference?.method(o));console.log(`${e.appNameText} [processColaboFlowMsg_TaskExecute] task executed. Result is: ${Mi.blueBright(JSON.stringify(f,null,4))}`);const h={...Qi(e.hostname,Ki.TASK_EXECUTE_RESPONSE),requestId:t.requestId,msgReplyChainIds:[t.id],extension:{taskOutput:f},msg:`Returning task execution for the taskId: '${n}' over queue: '${i}'}`};console.log(`${e.appNameText} Sending RESPONSE to the task execution requester (service) [queue: "${Mi.blueBright(i)}"]: ${JSON.stringify(h)}`),e.chHostHeartbeat.sendToQueue(i,Buffer.from(JSON.stringify(h)))},Ff=async e=>{process.title=`ColaboFlow.Go-${e.hostname}`,Mi.red.bold("Colabo"),Mi.blue.bold("Flow"),Mi.green.bold(".Go"),Mi.green.yellow(e.hostname);const t=await(async e=>{let t;console.log(`${e.appNameText} Connecting to the server: ${Mi.greenBright(e.amqpUrl)}`);try{return t=await Jo(e.amqpUrl),t}catch(t){throw console.error(`Error connecting to the "${Mi.greenBright(e.amqpUrl)}" server: ${t}`),t}})(e),r=await(async(e,t)=>{let r;console.log(`${e.appNameText} Opening the ${Mi.bold.italic("node host")} channel as a listener (consumer): ${Mi.greenBright(e.queueHost)}`);try{return r=await t.createChannel(),r}catch(t){throw console.error(`${e.appNameText} Error creating the "${Mi.greenBright(e.queueHost)}" queue: ${t}`),t}})(e,t);await(async(e,t)=>{console.log(`${e.appNameText} Opening the ${Mi.bold.italic("service heartbeat")} channel as a produced (emitter): ${Mi.greenBright(e.queueHostHeartbeat)}`);try{return e.chHostHeartbeat=await t.createChannel(),e.chHostHeartbeat}catch(t){throw console.error(`${e.appNameText} Error creating the "${Mi.greenBright(e.queueHostHeartbeat)}" queue: ${t}`),t}})(e,t),console.log(`${e.appNameText} Hosting tasks: "${Mi.greenBright(Object.keys(e.tasksAvailable).toString())}"`),setInterval((()=>{(async e=>{if(!e.chHostHeartbeat)return void console.error(`${e.appNameText} [sendHeartbeatToHost] Error: channel host.chHostHeartbeat is not existing`);const t={...Qi(e.hostname,Ki.HEARTBEAT),extension:{id:Mf++,queueHost:e.queueHost,language:Gi.JAVASCRIPT,taskIds:Object.keys(e.taskExecutorsAvailable)},msg:`node host with tasks: ${JSON.stringify(Object.keys(e.taskExecutorsAvailable))}`};e.chHostHeartbeat.sendToQueue(e.queueHostHeartbeat,Buffer.from(JSON.stringify(t)))})(e)}),3e3),console.log(`${e.appNameText} Listening on the queue: "${Mi.blueBright(e.queueHost)}"`),await r.assertQueue(e.queueHost,{exclusive:!0}),console.log(`${e.appNameText} [*] Waiting for messages in %s. To exit press "${Mi.blueBright("CTRL+C")}"`),r.consume(e.queueHost,(t=>{if(null!==t){let n;try{n=JSON.parse(t.content.toString()),console.log(`${e.appNameText} Received: "${Mi.blueBright(JSON.stringify(n))}"`),console.log(`${e.appNameText} msgObj.sender: "${Mi.blueBright(n.sender)}", msgObj.type: "${Mi.blueBright(n.type)}, msgObj.msg: "${Mi.blueBright(n.msg)}"`)}catch(e){return void console.error(`Error parsing the message: ${t.content}`)}switch(n.type){case Ki.TASK_EXECUTE_REQUEST:Lf(e,n);break;case Ki.TASK_INSTANCES_REPORT__REQUEST:((e,t)=>{if(!e.chHostHeartbeat)return void console.error(`${e.appNameText} [sendHeartbeatToHost] Error: channel host.chHostHeartbeat is not existing`);const r=t.extension,n=r.reportFinalizedTaskInstances,o=r.reportRunningTaskInstances;console.log(`${e.appNameText} [processColaboFlowMsg_TaskInstancesReport] Sending task instances report to the requester: ${Mi.blueBright(t.sender)}`);const i={};o&&Object.assign(i,e.runningTaskInstancesInfos),n&&Object.assign(i,e.finalizedTaskInstancesInfos);const s={...Qi(e.hostname,Ki.TASK_INSTANCES_REPORT__RESPONSE),requestId:t.requestId,msgReplyChainIds:[t.id],extension:{tasksInstanceInfos:i},msg:`node host with tasks: ${JSON.stringify(Object.keys(e.taskExecutorsAvailable))}`},a=t.replyTo??e.queueHostHeartbeat;console.log(`${e.appNameText} Sending response to the task instances report [queue: "${Mi.blueBright(a)}"]: ${JSON.stringify(s)}`),e.chHostHeartbeat.sendToQueue(a,Buffer.from(JSON.stringify(s)))})(e,n)}r.ack(t)}else console.log("${host.appNameText} Consumer cancelled by server")}))};console.log(`clientRun: ${Wi}`);export{Ki as EColaboFlowGoMsgType,Gi as EProgrammingLanguageSupported,Vi as ETaskExecute_Progress_Status,Ji as clientClose,Yi as clientExecuteTask,Wi as clientRun,Rf as hostRegisterTask,Af as hostRegisterTaskExecutor,Ff as hostRun,Nf as hostSetTitles};
7
+ var r,n,o,i,s},j.encodeMethod=function(e,t,r){switch(e){case 655370:return function(e,t){var r,n=0,o=null,i=0,s=0;if(void 0===(o=t.serverProperties))throw new Error("Missing value for mandatory field 'serverProperties'");if("object"!=typeof o)throw new TypeError("Field 'serverProperties' is the wrong type; must be an object");r=V(Q,o,s);var a=Q.slice(s,s+r);if(s+=r,i+=a.length,void 0===(o=t.mechanisms))o=Buffer.from("PLAIN");else if(!Buffer.isBuffer(o))throw new TypeError("Field 'mechanisms' is the wrong type; must be a Buffer");if(i+=o.length,void 0===(o=t.locales))o=Buffer.from("en_US");else if(!Buffer.isBuffer(o))throw new TypeError("Field 'locales' is the wrong type; must be a Buffer");i+=o.length;var u=Buffer.alloc(22+i);if(u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(655370,7),n=11,void 0===(o=t.versionMajor))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'versionMajor' is the wrong type; must be a number (but not NaN)");if(u.writeUInt8(o,n),n++,void 0===(o=t.versionMinor))o=9;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'versionMinor' is the wrong type; must be a number (but not NaN)");return u.writeUInt8(o,n),n++,n+=a.copy(u,n),void 0===(o=t.mechanisms)&&(o=Buffer.from("PLAIN")),r=o.length,u.writeUInt32BE(r,n),n+=4,o.copy(u,n),n+=r,void 0===(o=t.locales)&&(o=Buffer.from("en_US")),r=o.length,u.writeUInt32BE(r,n),n+=4,o.copy(u,n),u[n+=r]=206,u.writeUInt32BE(n-7,3),u}(t,r);case 655371:return function(e,t){var r,n=0,o=null,i=0,s=0;if(void 0===(o=t.clientProperties))throw new Error("Missing value for mandatory field 'clientProperties'");if("object"!=typeof o)throw new TypeError("Field 'clientProperties' is the wrong type; must be an object");r=V(Q,o,s);var a=Q.slice(s,s+r);if(s+=r,i+=a.length,void 0===(o=t.mechanism))o="PLAIN";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'mechanism' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(i+=u,void 0===(o=t.response))throw new Error("Missing value for mandatory field 'response'");if(!Buffer.isBuffer(o))throw new TypeError("Field 'response' is the wrong type; must be a Buffer");if(i+=o.length,void 0===(o=t.locale))o="en_US";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'locale' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");i+=c;var l=Buffer.alloc(18+i);return l[0]=1,l.writeUInt16BE(e,1),l.writeUInt32BE(655371,7),n=11,n+=a.copy(l,n),void 0===(o=t.mechanism)&&(o="PLAIN"),l[n]=u,n++,l.write(o,n,"utf8"),n+=u,void 0===(o=t.response)&&(o=Buffer.from(void 0)),r=o.length,l.writeUInt32BE(r,n),n+=4,o.copy(l,n),n+=r,void 0===(o=t.locale)&&(o="en_US"),l[n]=c,n++,l.write(o,n,"utf8"),l[n+=c]=206,l.writeUInt32BE(n-7,3),l}(t,r);case 655380:return function(e,t){var r,n=0,o=null,i=0;if(void 0===(o=t.challenge))throw new Error("Missing value for mandatory field 'challenge'");if(!Buffer.isBuffer(o))throw new TypeError("Field 'challenge' is the wrong type; must be a Buffer");i+=o.length;var s=Buffer.alloc(16+i);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655380,7),n=11,void 0===(o=t.challenge)&&(o=Buffer.from(void 0)),r=o.length,s.writeUInt32BE(r,n),n+=4,o.copy(s,n),s[n+=r]=206,s.writeUInt32BE(n-7,3),s}(t,r);case 655381:return function(e,t){var r,n=0,o=null,i=0;if(void 0===(o=t.response))throw new Error("Missing value for mandatory field 'response'");if(!Buffer.isBuffer(o))throw new TypeError("Field 'response' is the wrong type; must be a Buffer");i+=o.length;var s=Buffer.alloc(16+i);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655381,7),n=11,void 0===(o=t.response)&&(o=Buffer.from(void 0)),r=o.length,s.writeUInt32BE(r,n),n+=4,o.copy(s,n),s[n+=r]=206,s.writeUInt32BE(n-7,3),s}(t,r);case 655390:return function(e,t){var r=0,n=null,o=Buffer.alloc(20);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(655390,7),r=11,void 0===(n=t.channelMax))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'channelMax' is the wrong type; must be a number (but not NaN)");if(o.writeUInt16BE(n,r),r+=2,void 0===(n=t.frameMax))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'frameMax' is the wrong type; must be a number (but not NaN)");if(o.writeUInt32BE(n,r),r+=4,void 0===(n=t.heartbeat))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'heartbeat' is the wrong type; must be a number (but not NaN)");return o.writeUInt16BE(n,r),o[r+=2]=206,o.writeUInt32BE(r-7,3),o}(t,r);case 655391:return function(e,t){var r=0,n=null,o=Buffer.alloc(20);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(655391,7),r=11,void 0===(n=t.channelMax))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'channelMax' is the wrong type; must be a number (but not NaN)");if(o.writeUInt16BE(n,r),r+=2,void 0===(n=t.frameMax))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'frameMax' is the wrong type; must be a number (but not NaN)");if(o.writeUInt32BE(n,r),r+=4,void 0===(n=t.heartbeat))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'heartbeat' is the wrong type; must be a number (but not NaN)");return o.writeUInt16BE(n,r),o[r+=2]=206,o.writeUInt32BE(r-7,3),o}(t,r);case 655400:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.virtualHost))n="/";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'virtualHost' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(i+=s,void 0===(n=t.capabilities))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'capabilities' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");i+=a;var u=Buffer.alloc(15+i);return u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(655400,7),r=11,void 0===(n=t.virtualHost)&&(n="/"),u[r]=s,r++,u.write(n,r,"utf8"),r+=s,void 0===(n=t.capabilities)&&(n=""),u[r]=a,r++,u.write(n,r,"utf8"),r+=a,void 0===(n=t.insist)&&(n=!1),n&&(o+=1),u[r]=o,u[++r]=206,u.writeUInt32BE(r-7,3),u}(t,r);case 655401:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.knownHosts))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'knownHosts' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655401,7),r=11,void 0===(n=t.knownHosts)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 655410:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.replyText))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'replyText' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(19+o);if(s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655410,7),r=11,void 0===(n=t.replyCode))throw new Error("Missing value for mandatory field 'replyCode'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'replyCode' is the wrong type; must be a number (but not NaN)");if(s.writeUInt16BE(n,r),r+=2,void 0===(n=t.replyText)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),r+=i,void 0===(n=t.classId))throw new Error("Missing value for mandatory field 'classId'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'classId' is the wrong type; must be a number (but not NaN)");if(s.writeUInt16BE(n,r),r+=2,void 0===(n=t.methodId))throw new Error("Missing value for mandatory field 'methodId'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'methodId' is the wrong type; must be a number (but not NaN)");return s.writeUInt16BE(n,r),s[r+=2]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 655411:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(655411,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 655420:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.reason))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'reason' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(655420,7),r=11,void 0===(n=t.reason)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 655421:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(655421,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 1310730:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.outOfBand))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'outOfBand' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(1310730,7),r=11,void 0===(n=t.outOfBand)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 1310731:return function(e,t){var r,n=0,o=null,i=0;if(void 0===(o=t.channelId))o=Buffer.from("");else if(!Buffer.isBuffer(o))throw new TypeError("Field 'channelId' is the wrong type; must be a Buffer");i+=o.length;var s=Buffer.alloc(16+i);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(1310731,7),n=11,void 0===(o=t.channelId)&&(o=Buffer.from("")),r=o.length,s.writeUInt32BE(r,n),n+=4,o.copy(s,n),s[n+=r]=206,s.writeUInt32BE(n-7,3),s}(t,r);case 1310740:return function(e,t){var r,n=0,o=0,i=Buffer.alloc(13);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(1310740,7),n=11,void 0===(r=t.active))throw new Error("Missing value for mandatory field 'active'");return r&&(o+=1),i[n]=o,i[++n]=206,i.writeUInt32BE(n-7,3),i}(t,r);case 1310741:return function(e,t){var r,n=0,o=0,i=Buffer.alloc(13);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(1310741,7),n=11,void 0===(r=t.active))throw new Error("Missing value for mandatory field 'active'");return r&&(o+=1),i[n]=o,i[++n]=206,i.writeUInt32BE(n-7,3),i}(t,r);case 1310760:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.replyText))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'replyText' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(19+o);if(s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(1310760,7),r=11,void 0===(n=t.replyCode))throw new Error("Missing value for mandatory field 'replyCode'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'replyCode' is the wrong type; must be a number (but not NaN)");if(s.writeUInt16BE(n,r),r+=2,void 0===(n=t.replyText)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),r+=i,void 0===(n=t.classId))throw new Error("Missing value for mandatory field 'classId'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'classId' is the wrong type; must be a number (but not NaN)");if(s.writeUInt16BE(n,r),r+=2,void 0===(n=t.methodId))throw new Error("Missing value for mandatory field 'methodId'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'methodId' is the wrong type; must be a number (but not NaN)");return s.writeUInt16BE(n,r),s[r+=2]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 1310761:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(1310761,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 1966090:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.realm))n="/data";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'realm' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(14+i);return a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(1966090,7),r=11,void 0===(n=t.realm)&&(n="/data"),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.exclusive)&&(n=!1),n&&(o+=1),void 0===(n=t.passive)&&(n=!0),n&&(o+=2),void 0===(n=t.active)&&(n=!0),n&&(o+=4),void 0===(n=t.write)&&(n=!0),n&&(o+=8),void 0===(n=t.read)&&(n=!0),n&&(o+=16),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 1966091:return function(e,t){var r=0,n=null,o=Buffer.alloc(14);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(1966091,7),r=11,void 0===(n=t.ticket))n=1;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return o.writeUInt16BE(n,r),o[r+=2]=206,o.writeUInt32BE(r-7,3),o}(t,r);case 2621450:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.type))o="direct";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'type' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=V(Q,o,a);var l=Q.slice(a,a+r);a+=r,s+=l.length;var f=Buffer.alloc(17+s);if(f[0]=1,f.writeUInt16BE(e,1),f.writeUInt32BE(2621450,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return f.writeUInt16BE(o,n),n+=2,void 0===(o=t.exchange)&&(o=void 0),f[n]=u,n++,f.write(o,n,"utf8"),n+=u,void 0===(o=t.type)&&(o="direct"),f[n]=c,n++,f.write(o,n,"utf8"),n+=c,void 0===(o=t.passive)&&(o=!1),o&&(i+=1),void 0===(o=t.durable)&&(o=!1),o&&(i+=2),void 0===(o=t.autoDelete)&&(o=!1),o&&(i+=4),void 0===(o=t.internal)&&(o=!1),o&&(i+=8),void 0===(o=t.nowait)&&(o=!1),o&&(i+=16),f[n]=i,n++,i=0,f[n+=l.copy(f,n)]=206,f.writeUInt32BE(n-7,3),f}(t,r);case 2621451:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(2621451,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 2621460:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(16+i);if(a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(2621460,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return a.writeUInt16BE(n,r),r+=2,void 0===(n=t.exchange)&&(n=void 0),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.ifUnused)&&(n=!1),n&&(o+=1),void 0===(n=t.nowait)&&(n=!1),n&&(o+=2),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 2621461:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(2621461,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 2621470:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.destination))throw new Error("Missing value for mandatory field 'destination'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'destination' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.source))throw new Error("Missing value for mandatory field 'source'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'source' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.routingKey))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var l=Buffer.byteLength(o,"utf8");if(s+=l,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=V(Q,o,a);var f=Q.slice(a,a+r);a+=r,s+=f.length;var h=Buffer.alloc(18+s);if(h[0]=1,h.writeUInt16BE(e,1),h.writeUInt32BE(2621470,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return h.writeUInt16BE(o,n),n+=2,void 0===(o=t.destination)&&(o=void 0),h[n]=u,n++,h.write(o,n,"utf8"),n+=u,void 0===(o=t.source)&&(o=void 0),h[n]=c,n++,h.write(o,n,"utf8"),n+=c,void 0===(o=t.routingKey)&&(o=""),h[n]=l,n++,h.write(o,n,"utf8"),n+=l,void 0===(o=t.nowait)&&(o=!1),o&&(i+=1),h[n]=i,n++,i=0,h[n+=f.copy(h,n)]=206,h.writeUInt32BE(n-7,3),h}(t,r);case 2621471:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(2621471,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 2621480:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.destination))throw new Error("Missing value for mandatory field 'destination'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'destination' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.source))throw new Error("Missing value for mandatory field 'source'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'source' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.routingKey))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var l=Buffer.byteLength(o,"utf8");if(s+=l,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=V(Q,o,a);var f=Q.slice(a,a+r);a+=r,s+=f.length;var h=Buffer.alloc(18+s);if(h[0]=1,h.writeUInt16BE(e,1),h.writeUInt32BE(2621480,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return h.writeUInt16BE(o,n),n+=2,void 0===(o=t.destination)&&(o=void 0),h[n]=u,n++,h.write(o,n,"utf8"),n+=u,void 0===(o=t.source)&&(o=void 0),h[n]=c,n++,h.write(o,n,"utf8"),n+=c,void 0===(o=t.routingKey)&&(o=""),h[n]=l,n++,h.write(o,n,"utf8"),n+=l,void 0===(o=t.nowait)&&(o=!1),o&&(i+=1),h[n]=i,n++,i=0,h[n+=f.copy(h,n)]=206,h.writeUInt32BE(n-7,3),h}(t,r);case 2621491:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(2621491,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3276810:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.queue))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=V(Q,o,a);var c=Q.slice(a,a+r);a+=r,s+=c.length;var l=Buffer.alloc(16+s);if(l[0]=1,l.writeUInt16BE(e,1),l.writeUInt32BE(3276810,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return l.writeUInt16BE(o,n),n+=2,void 0===(o=t.queue)&&(o=""),l[n]=u,n++,l.write(o,n,"utf8"),n+=u,void 0===(o=t.passive)&&(o=!1),o&&(i+=1),void 0===(o=t.durable)&&(o=!1),o&&(i+=2),void 0===(o=t.exclusive)&&(o=!1),o&&(i+=4),void 0===(o=t.autoDelete)&&(o=!1),o&&(i+=8),void 0===(o=t.nowait)&&(o=!1),o&&(i+=16),l[n]=i,n++,i=0,l[n+=c.copy(l,n)]=206,l.writeUInt32BE(n-7,3),l}(t,r);case 3276811:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.queue))throw new Error("Missing value for mandatory field 'queue'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(21+o);if(s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(3276811,7),r=11,void 0===(n=t.queue)&&(n=void 0),s[r]=i,r++,s.write(n,r,"utf8"),r+=i,void 0===(n=t.messageCount))throw new Error("Missing value for mandatory field 'messageCount'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'messageCount' is the wrong type; must be a number (but not NaN)");if(s.writeUInt32BE(n,r),r+=4,void 0===(n=t.consumerCount))throw new Error("Missing value for mandatory field 'consumerCount'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'consumerCount' is the wrong type; must be a number (but not NaN)");return s.writeUInt32BE(n,r),s[r+=4]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 3276820:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.queue))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.routingKey))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var l=Buffer.byteLength(o,"utf8");if(s+=l,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=V(Q,o,a);var f=Q.slice(a,a+r);a+=r,s+=f.length;var h=Buffer.alloc(18+s);if(h[0]=1,h.writeUInt16BE(e,1),h.writeUInt32BE(3276820,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return h.writeUInt16BE(o,n),n+=2,void 0===(o=t.queue)&&(o=""),h[n]=u,n++,h.write(o,n,"utf8"),n+=u,void 0===(o=t.exchange)&&(o=void 0),h[n]=c,n++,h.write(o,n,"utf8"),n+=c,void 0===(o=t.routingKey)&&(o=""),h[n]=l,n++,h.write(o,n,"utf8"),n+=l,void 0===(o=t.nowait)&&(o=!1),o&&(i+=1),h[n]=i,n++,i=0,h[n+=f.copy(h,n)]=206,h.writeUInt32BE(n-7,3),h}(t,r);case 3276821:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(3276821,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3276830:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.queue))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(16+i);if(a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(3276830,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return a.writeUInt16BE(n,r),r+=2,void 0===(n=t.queue)&&(n=""),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.nowait)&&(n=!1),n&&(o+=1),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 3276831:return function(e,t){var r,n=0,o=Buffer.alloc(16);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(3276831,7),n=11,void 0===(r=t.messageCount))throw new Error("Missing value for mandatory field 'messageCount'");if("number"!=typeof r||isNaN(r))throw new TypeError("Field 'messageCount' is the wrong type; must be a number (but not NaN)");return o.writeUInt32BE(r,n),o[n+=4]=206,o.writeUInt32BE(n-7,3),o}(t,r);case 3276840:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.queue))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(16+i);if(a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(3276840,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return a.writeUInt16BE(n,r),r+=2,void 0===(n=t.queue)&&(n=""),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.ifUnused)&&(n=!1),n&&(o+=1),void 0===(n=t.ifEmpty)&&(n=!1),n&&(o+=2),void 0===(n=t.nowait)&&(n=!1),n&&(o+=4),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 3276841:return function(e,t){var r,n=0,o=Buffer.alloc(16);if(o[0]=1,o.writeUInt16BE(e,1),o.writeUInt32BE(3276841,7),n=11,void 0===(r=t.messageCount))throw new Error("Missing value for mandatory field 'messageCount'");if("number"!=typeof r||isNaN(r))throw new TypeError("Field 'messageCount' is the wrong type; must be a number (but not NaN)");return o.writeUInt32BE(r,n),o[n+=4]=206,o.writeUInt32BE(n-7,3),o}(t,r);case 3276850:return function(e,t){var r,n=0,o=null,i=0,s=0;if(void 0===(o=t.queue))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(o,"utf8");if(i+=a,void 0===(o=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(i+=u,void 0===(o=t.routingKey))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(i+=c,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=V(Q,o,s);var l=Q.slice(s,s+r);s+=r,i+=l.length;var f=Buffer.alloc(17+i);if(f[0]=1,f.writeUInt16BE(e,1),f.writeUInt32BE(3276850,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return f.writeUInt16BE(o,n),n+=2,void 0===(o=t.queue)&&(o=""),f[n]=a,n++,f.write(o,n,"utf8"),n+=a,void 0===(o=t.exchange)&&(o=void 0),f[n]=u,n++,f.write(o,n,"utf8"),n+=u,void 0===(o=t.routingKey)&&(o=""),f[n]=c,n++,f.write(o,n,"utf8"),n+=c,f[n+=l.copy(f,n)]=206,f.writeUInt32BE(n-7,3),f}(t,r);case 3276851:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(3276851,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3932170:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(19);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932170,7),r=11,void 0===(n=t.prefetchSize))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'prefetchSize' is the wrong type; must be a number (but not NaN)");if(i.writeUInt32BE(n,r),r+=4,void 0===(n=t.prefetchCount))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'prefetchCount' is the wrong type; must be a number (but not NaN)");return i.writeUInt16BE(n,r),r+=2,void 0===(n=t.global)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932171:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(3932171,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3932180:return function(e,t){var r,n=0,o=null,i=0,s=0,a=0;if(void 0===(o=t.queue))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(o,"utf8");if(s+=u,void 0===(o=t.consumerTag))o="";else if(!("string"==typeof o&&Buffer.byteLength(o)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(o,"utf8");if(s+=c,void 0===(o=t.arguments))o={};else if("object"!=typeof o)throw new TypeError("Field 'arguments' is the wrong type; must be an object");r=V(Q,o,a);var l=Q.slice(a,a+r);a+=r,s+=l.length;var f=Buffer.alloc(17+s);if(f[0]=1,f.writeUInt16BE(e,1),f.writeUInt32BE(3932180,7),n=11,void 0===(o=t.ticket))o=0;else if("number"!=typeof o||isNaN(o))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return f.writeUInt16BE(o,n),n+=2,void 0===(o=t.queue)&&(o=""),f[n]=u,n++,f.write(o,n,"utf8"),n+=u,void 0===(o=t.consumerTag)&&(o=""),f[n]=c,n++,f.write(o,n,"utf8"),n+=c,void 0===(o=t.noLocal)&&(o=!1),o&&(i+=1),void 0===(o=t.noAck)&&(o=!1),o&&(i+=2),void 0===(o=t.exclusive)&&(o=!1),o&&(i+=4),void 0===(o=t.nowait)&&(o=!1),o&&(i+=8),f[n]=i,n++,i=0,f[n+=l.copy(f,n)]=206,f.writeUInt32BE(n-7,3),f}(t,r);case 3932181:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.consumerTag))throw new Error("Missing value for mandatory field 'consumerTag'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(3932181,7),r=11,void 0===(n=t.consumerTag)&&(n=void 0),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 3932190:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.consumerTag))throw new Error("Missing value for mandatory field 'consumerTag'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(14+i);return a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(3932190,7),r=11,void 0===(n=t.consumerTag)&&(n=void 0),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.nowait)&&(n=!1),n&&(o+=1),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 3932191:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.consumerTag))throw new Error("Missing value for mandatory field 'consumerTag'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(3932191,7),r=11,void 0===(n=t.consumerTag)&&(n=void 0),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 3932200:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.exchange))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(i+=s,void 0===(n=t.routingKey))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");i+=a;var u=Buffer.alloc(17+i);if(u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(3932200,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return u.writeUInt16BE(n,r),r+=2,void 0===(n=t.exchange)&&(n=""),u[r]=s,r++,u.write(n,r,"utf8"),r+=s,void 0===(n=t.routingKey)&&(n=""),u[r]=a,r++,u.write(n,r,"utf8"),r+=a,void 0===(n=t.mandatory)&&(n=!1),n&&(o+=1),void 0===(n=t.immediate)&&(n=!1),n&&(o+=2),u[r]=o,u[++r]=206,u.writeUInt32BE(r-7,3),u}(t,r);case 3932210:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.replyText))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'replyText' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");if(o+=i,void 0===(n=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(o+=s,void 0===(n=t.routingKey))throw new Error("Missing value for mandatory field 'routingKey'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");o+=a;var u=Buffer.alloc(17+o);if(u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(3932210,7),r=11,void 0===(n=t.replyCode))throw new Error("Missing value for mandatory field 'replyCode'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'replyCode' is the wrong type; must be a number (but not NaN)");return u.writeUInt16BE(n,r),r+=2,void 0===(n=t.replyText)&&(n=""),u[r]=i,r++,u.write(n,r,"utf8"),r+=i,void 0===(n=t.exchange)&&(n=void 0),u[r]=s,r++,u.write(n,r,"utf8"),r+=s,void 0===(n=t.routingKey)&&(n=void 0),u[r]=a,r++,u.write(n,r,"utf8"),u[r+=a]=206,u.writeUInt32BE(r-7,3),u}(t,r);case 3932220:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.consumerTag))throw new Error("Missing value for mandatory field 'consumerTag'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'consumerTag' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(i+=s,void 0===(n=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");if(i+=a,void 0===(n=t.routingKey))throw new Error("Missing value for mandatory field 'routingKey'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var u=Buffer.byteLength(n,"utf8");i+=u;var c=Buffer.alloc(24+i);if(c[0]=1,c.writeUInt16BE(e,1),c.writeUInt32BE(3932220,7),r=11,void 0===(n=t.consumerTag)&&(n=void 0),c[r]=s,r++,c.write(n,r,"utf8"),r+=s,void 0===(n=t.deliveryTag))throw new Error("Missing value for mandatory field 'deliveryTag'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");return K.writeUInt64BE(c,n,r),r+=8,void 0===(n=t.redelivered)&&(n=!1),n&&(o+=1),c[r]=o,r++,o=0,void 0===(n=t.exchange)&&(n=void 0),c[r]=a,r++,c.write(n,r,"utf8"),r+=a,void 0===(n=t.routingKey)&&(n=void 0),c[r]=u,r++,c.write(n,r,"utf8"),c[r+=u]=206,c.writeUInt32BE(r-7,3),c}(t,r);case 3932230:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.queue))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'queue' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");i+=s;var a=Buffer.alloc(16+i);if(a[0]=1,a.writeUInt16BE(e,1),a.writeUInt32BE(3932230,7),r=11,void 0===(n=t.ticket))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'ticket' is the wrong type; must be a number (but not NaN)");return a.writeUInt16BE(n,r),r+=2,void 0===(n=t.queue)&&(n=""),a[r]=s,r++,a.write(n,r,"utf8"),r+=s,void 0===(n=t.noAck)&&(n=!1),n&&(o+=1),a[r]=o,a[++r]=206,a.writeUInt32BE(r-7,3),a}(t,r);case 3932231:return function(e,t){var r=0,n=null,o=0,i=0;if(void 0===(n=t.exchange))throw new Error("Missing value for mandatory field 'exchange'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'exchange' is the wrong type; must be a string (up to 255 chars)");var s=Buffer.byteLength(n,"utf8");if(i+=s,void 0===(n=t.routingKey))throw new Error("Missing value for mandatory field 'routingKey'");if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'routingKey' is the wrong type; must be a string (up to 255 chars)");var a=Buffer.byteLength(n,"utf8");i+=a;var u=Buffer.alloc(27+i);if(u[0]=1,u.writeUInt16BE(e,1),u.writeUInt32BE(3932231,7),r=11,void 0===(n=t.deliveryTag))throw new Error("Missing value for mandatory field 'deliveryTag'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");if(K.writeUInt64BE(u,n,r),r+=8,void 0===(n=t.redelivered)&&(n=!1),n&&(o+=1),u[r]=o,r++,o=0,void 0===(n=t.exchange)&&(n=void 0),u[r]=s,r++,u.write(n,r,"utf8"),r+=s,void 0===(n=t.routingKey)&&(n=void 0),u[r]=a,r++,u.write(n,r,"utf8"),r+=a,void 0===(n=t.messageCount))throw new Error("Missing value for mandatory field 'messageCount'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'messageCount' is the wrong type; must be a number (but not NaN)");return u.writeUInt32BE(n,r),u[r+=4]=206,u.writeUInt32BE(r-7,3),u}(t,r);case 3932232:return function(e,t){var r=0,n=null,o=0;if(void 0===(n=t.clusterId))n="";else if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'clusterId' is the wrong type; must be a string (up to 255 chars)");var i=Buffer.byteLength(n,"utf8");o+=i;var s=Buffer.alloc(13+o);return s[0]=1,s.writeUInt16BE(e,1),s.writeUInt32BE(3932232,7),r=11,void 0===(n=t.clusterId)&&(n=""),s[r]=i,r++,s.write(n,r,"utf8"),s[r+=i]=206,s.writeUInt32BE(r-7,3),s}(t,r);case 3932240:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(21);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932240,7),r=11,void 0===(n=t.deliveryTag))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");return K.writeUInt64BE(i,n,r),r+=8,void 0===(n=t.multiple)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932250:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(21);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932250,7),r=11,void 0===(n=t.deliveryTag))throw new Error("Missing value for mandatory field 'deliveryTag'");if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");return K.writeUInt64BE(i,n,r),r+=8,void 0===(n=t.requeue)&&(n=!0),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932260:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(13);return i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932260,7),r=11,void 0===(n=t.requeue)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932270:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(13);return i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932270,7),r=11,void 0===(n=t.requeue)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 3932271:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(3932271,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 3932280:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(21);if(i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(3932280,7),r=11,void 0===(n=t.deliveryTag))n=0;else if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryTag' is the wrong type; must be a number (but not NaN)");return K.writeUInt64BE(i,n,r),r+=8,void 0===(n=t.multiple)&&(n=!1),n&&(o+=1),void 0===(n=t.requeue)&&(n=!0),n&&(o+=2),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 5898250:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898250,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898251:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898251,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898260:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898260,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898261:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898261,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898270:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898270,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5898271:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5898271,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);case 5570570:return function(e,t){var r=0,n=null,o=0,i=Buffer.alloc(13);return i[0]=1,i.writeUInt16BE(e,1),i.writeUInt32BE(5570570,7),r=11,void 0===(n=t.nowait)&&(n=!1),n&&(o+=1),i[r]=o,i[++r]=206,i.writeUInt32BE(r-7,3),i}(t,r);case 5570571:return function(e,t){var r=Buffer.alloc(12);return r[0]=1,r.writeUInt16BE(e,1),r.writeUInt32BE(5570571,7),r[11]=206,r.writeUInt32BE(4,3),r}(t);default:throw new Error("Unknown class/method ID")}},j.encodeProperties=function(e,t,r,n){if(60===e)return function(e,t,r){var n,o,i=0,s=0,a=0,u=0;if(null!=(n=r.contentType)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'contentType' is the wrong type; must be a string (up to 255 chars)");var c=Buffer.byteLength(n,"utf8");u+=1,u+=c}if(null!=(n=r.contentEncoding)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'contentEncoding' is the wrong type; must be a string (up to 255 chars)");var l=Buffer.byteLength(n,"utf8");u+=1,u+=l}if(null!=(n=r.headers)){if("object"!=typeof n)throw new TypeError("Field 'headers' is the wrong type; must be an object");o=V(Q,n,a);var f=Q.slice(a,a+o);a+=o,u+=f.length}if(null!=(n=r.deliveryMode)){if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'deliveryMode' is the wrong type; must be a number (but not NaN)");u+=1}if(null!=(n=r.priority)){if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'priority' is the wrong type; must be a number (but not NaN)");u+=1}if(null!=(n=r.correlationId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'correlationId' is the wrong type; must be a string (up to 255 chars)");var h=Buffer.byteLength(n,"utf8");u+=1,u+=h}if(null!=(n=r.replyTo)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'replyTo' is the wrong type; must be a string (up to 255 chars)");var d=Buffer.byteLength(n,"utf8");u+=1,u+=d}if(null!=(n=r.expiration)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'expiration' is the wrong type; must be a string (up to 255 chars)");var p=Buffer.byteLength(n,"utf8");u+=1,u+=p}if(null!=(n=r.messageId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'messageId' is the wrong type; must be a string (up to 255 chars)");var g=Buffer.byteLength(n,"utf8");u+=1,u+=g}if(null!=(n=r.timestamp)){if("number"!=typeof n||isNaN(n))throw new TypeError("Field 'timestamp' is the wrong type; must be a number (but not NaN)");u+=8}if(null!=(n=r.type)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'type' is the wrong type; must be a string (up to 255 chars)");var m=Buffer.byteLength(n,"utf8");u+=1,u+=m}if(null!=(n=r.userId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'userId' is the wrong type; must be a string (up to 255 chars)");var b=Buffer.byteLength(n,"utf8");u+=1,u+=b}if(null!=(n=r.appId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'appId' is the wrong type; must be a string (up to 255 chars)");var v=Buffer.byteLength(n,"utf8");u+=1,u+=v}if(null!=(n=r.clusterId)){if(!("string"==typeof n&&Buffer.byteLength(n)<256))throw new TypeError("Field 'clusterId' is the wrong type; must be a string (up to 255 chars)");var y=Buffer.byteLength(n,"utf8");u+=1,u+=y}var w=Buffer.alloc(22+u);return w[0]=2,w.writeUInt16BE(e,1),w.writeUInt32BE(3932160,7),K.writeUInt64BE(w,t,11),s=0,i=21,null!=(n=r.contentType)&&(s+=32768,w[i]=c,i++,w.write(n,i,"utf8"),i+=c),null!=(n=r.contentEncoding)&&(s+=16384,w[i]=l,i++,w.write(n,i,"utf8"),i+=l),null!=(n=r.headers)&&(s+=8192,i+=f.copy(w,i)),null!=(n=r.deliveryMode)&&(s+=4096,w.writeUInt8(n,i),i++),null!=(n=r.priority)&&(s+=2048,w.writeUInt8(n,i),i++),null!=(n=r.correlationId)&&(s+=1024,w[i]=h,i++,w.write(n,i,"utf8"),i+=h),null!=(n=r.replyTo)&&(s+=512,w[i]=d,i++,w.write(n,i,"utf8"),i+=d),null!=(n=r.expiration)&&(s+=256,w[i]=p,i++,w.write(n,i,"utf8"),i+=p),null!=(n=r.messageId)&&(s+=128,w[i]=g,i++,w.write(n,i,"utf8"),i+=g),null!=(n=r.timestamp)&&(s+=64,K.writeUInt64BE(w,n,i),i+=8),null!=(n=r.type)&&(s+=32,w[i]=m,i++,w.write(n,i,"utf8"),i+=m),null!=(n=r.userId)&&(s+=16,w[i]=b,i++,w.write(n,i,"utf8"),i+=b),null!=(n=r.appId)&&(s+=8,w[i]=v,i++,w.write(n,i,"utf8"),i+=v),null!=(n=r.clusterId)&&(s+=4,w[i]=y,i++,w.write(n,i,"utf8"),i+=y),w[i]=206,w.writeUInt32BE(i-7,3),w.writeUInt16BE(s,19),w.slice(0,i+1)}(t,r,n);throw new Error("Unknown class/properties ID")},j.info=function(e){switch(e){case 655370:return W;case 655371:return Y;case 655380:return J;case 655381:return X;case 655390:return Z;case 655391:return ee;case 655400:return te;case 655401:return re;case 655410:return ne;case 655411:return oe;case 655420:return ie;case 655421:return se;case 1310730:return ae;case 1310731:return ue;case 1310740:return ce;case 1310741:return le;case 1310760:return fe;case 1310761:return he;case 1966090:return de;case 1966091:return pe;case 2621450:return ge;case 2621451:return me;case 2621460:return be;case 2621461:return ve;case 2621470:return ye;case 2621471:return we;case 2621480:return Ee;case 2621491:return Ie;case 3276810:return Ce;case 3276811:return Be;case 3276820:return xe;case 3276821:return Te;case 3276830:return Ue;case 3276831:return ke;case 3276840:return Oe;case 3276841:return Se;case 3276850:return _e;case 3276851:return Ne;case 3932170:return Ae;case 3932171:return Re;case 3932180:return Le;case 3932181:return Me;case 3932190:return Fe;case 3932191:return je;case 3932200:return Pe;case 3932210:return De;case 3932220:return qe;case 3932230:return He;case 3932231:return $e;case 3932232:return ze;case 3932240:return Ke;case 3932250:return Ve;case 3932260:return Ge;case 3932270:return Qe;case 3932271:return We;case 3932280:return Ye;case 5898250:return Je;case 5898251:return Xe;case 5898260:return Ze;case 5898261:return et;case 5898270:return tt;case 5898271:return rt;case 5570570:return nt;case 5570571:return ot;case 60:return it;default:throw new Error("Unknown class/method ID")}},j.ConnectionStart=655370;var W=j.methodInfoConnectionStart={id:655370,classId:10,methodId:10,name:"ConnectionStart",args:[{type:"octet",name:"versionMajor",default:0},{type:"octet",name:"versionMinor",default:9},{type:"table",name:"serverProperties"},{type:"longstr",name:"mechanisms",default:"PLAIN"},{type:"longstr",name:"locales",default:"en_US"}]};j.ConnectionStartOk=655371;var Y=j.methodInfoConnectionStartOk={id:655371,classId:10,methodId:11,name:"ConnectionStartOk",args:[{type:"table",name:"clientProperties"},{type:"shortstr",name:"mechanism",default:"PLAIN"},{type:"longstr",name:"response"},{type:"shortstr",name:"locale",default:"en_US"}]};j.ConnectionSecure=655380;var J=j.methodInfoConnectionSecure={id:655380,classId:10,methodId:20,name:"ConnectionSecure",args:[{type:"longstr",name:"challenge"}]};j.ConnectionSecureOk=655381;var X=j.methodInfoConnectionSecureOk={id:655381,classId:10,methodId:21,name:"ConnectionSecureOk",args:[{type:"longstr",name:"response"}]};j.ConnectionTune=655390;var Z=j.methodInfoConnectionTune={id:655390,classId:10,methodId:30,name:"ConnectionTune",args:[{type:"short",name:"channelMax",default:0},{type:"long",name:"frameMax",default:0},{type:"short",name:"heartbeat",default:0}]};j.ConnectionTuneOk=655391;var ee=j.methodInfoConnectionTuneOk={id:655391,classId:10,methodId:31,name:"ConnectionTuneOk",args:[{type:"short",name:"channelMax",default:0},{type:"long",name:"frameMax",default:0},{type:"short",name:"heartbeat",default:0}]};j.ConnectionOpen=655400;var te=j.methodInfoConnectionOpen={id:655400,classId:10,methodId:40,name:"ConnectionOpen",args:[{type:"shortstr",name:"virtualHost",default:"/"},{type:"shortstr",name:"capabilities",default:""},{type:"bit",name:"insist",default:!1}]};j.ConnectionOpenOk=655401;var re=j.methodInfoConnectionOpenOk={id:655401,classId:10,methodId:41,name:"ConnectionOpenOk",args:[{type:"shortstr",name:"knownHosts",default:""}]};j.ConnectionClose=655410;var ne=j.methodInfoConnectionClose={id:655410,classId:10,methodId:50,name:"ConnectionClose",args:[{type:"short",name:"replyCode"},{type:"shortstr",name:"replyText",default:""},{type:"short",name:"classId"},{type:"short",name:"methodId"}]};j.ConnectionCloseOk=655411;var oe=j.methodInfoConnectionCloseOk={id:655411,classId:10,methodId:51,name:"ConnectionCloseOk",args:[]};j.ConnectionBlocked=655420;var ie=j.methodInfoConnectionBlocked={id:655420,classId:10,methodId:60,name:"ConnectionBlocked",args:[{type:"shortstr",name:"reason",default:""}]};j.ConnectionUnblocked=655421;var se=j.methodInfoConnectionUnblocked={id:655421,classId:10,methodId:61,name:"ConnectionUnblocked",args:[]};j.ChannelOpen=1310730;var ae=j.methodInfoChannelOpen={id:1310730,classId:20,methodId:10,name:"ChannelOpen",args:[{type:"shortstr",name:"outOfBand",default:""}]};j.ChannelOpenOk=1310731;var ue=j.methodInfoChannelOpenOk={id:1310731,classId:20,methodId:11,name:"ChannelOpenOk",args:[{type:"longstr",name:"channelId",default:""}]};j.ChannelFlow=1310740;var ce=j.methodInfoChannelFlow={id:1310740,classId:20,methodId:20,name:"ChannelFlow",args:[{type:"bit",name:"active"}]};j.ChannelFlowOk=1310741;var le=j.methodInfoChannelFlowOk={id:1310741,classId:20,methodId:21,name:"ChannelFlowOk",args:[{type:"bit",name:"active"}]};j.ChannelClose=1310760;var fe=j.methodInfoChannelClose={id:1310760,classId:20,methodId:40,name:"ChannelClose",args:[{type:"short",name:"replyCode"},{type:"shortstr",name:"replyText",default:""},{type:"short",name:"classId"},{type:"short",name:"methodId"}]};j.ChannelCloseOk=1310761;var he=j.methodInfoChannelCloseOk={id:1310761,classId:20,methodId:41,name:"ChannelCloseOk",args:[]};j.AccessRequest=1966090;var de=j.methodInfoAccessRequest={id:1966090,classId:30,methodId:10,name:"AccessRequest",args:[{type:"shortstr",name:"realm",default:"/data"},{type:"bit",name:"exclusive",default:!1},{type:"bit",name:"passive",default:!0},{type:"bit",name:"active",default:!0},{type:"bit",name:"write",default:!0},{type:"bit",name:"read",default:!0}]};j.AccessRequestOk=1966091;var pe=j.methodInfoAccessRequestOk={id:1966091,classId:30,methodId:11,name:"AccessRequestOk",args:[{type:"short",name:"ticket",default:1}]};j.ExchangeDeclare=2621450;var ge=j.methodInfoExchangeDeclare={id:2621450,classId:40,methodId:10,name:"ExchangeDeclare",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"type",default:"direct"},{type:"bit",name:"passive",default:!1},{type:"bit",name:"durable",default:!1},{type:"bit",name:"autoDelete",default:!1},{type:"bit",name:"internal",default:!1},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.ExchangeDeclareOk=2621451;var me=j.methodInfoExchangeDeclareOk={id:2621451,classId:40,methodId:11,name:"ExchangeDeclareOk",args:[]};j.ExchangeDelete=2621460;var be=j.methodInfoExchangeDelete={id:2621460,classId:40,methodId:20,name:"ExchangeDelete",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"exchange"},{type:"bit",name:"ifUnused",default:!1},{type:"bit",name:"nowait",default:!1}]};j.ExchangeDeleteOk=2621461;var ve=j.methodInfoExchangeDeleteOk={id:2621461,classId:40,methodId:21,name:"ExchangeDeleteOk",args:[]};j.ExchangeBind=2621470;var ye=j.methodInfoExchangeBind={id:2621470,classId:40,methodId:30,name:"ExchangeBind",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"destination"},{type:"shortstr",name:"source"},{type:"shortstr",name:"routingKey",default:""},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.ExchangeBindOk=2621471;var we=j.methodInfoExchangeBindOk={id:2621471,classId:40,methodId:31,name:"ExchangeBindOk",args:[]};j.ExchangeUnbind=2621480;var Ee=j.methodInfoExchangeUnbind={id:2621480,classId:40,methodId:40,name:"ExchangeUnbind",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"destination"},{type:"shortstr",name:"source"},{type:"shortstr",name:"routingKey",default:""},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.ExchangeUnbindOk=2621491;var Ie=j.methodInfoExchangeUnbindOk={id:2621491,classId:40,methodId:51,name:"ExchangeUnbindOk",args:[]};j.QueueDeclare=3276810;var Ce=j.methodInfoQueueDeclare={id:3276810,classId:50,methodId:10,name:"QueueDeclare",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"bit",name:"passive",default:!1},{type:"bit",name:"durable",default:!1},{type:"bit",name:"exclusive",default:!1},{type:"bit",name:"autoDelete",default:!1},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.QueueDeclareOk=3276811;var Be=j.methodInfoQueueDeclareOk={id:3276811,classId:50,methodId:11,name:"QueueDeclareOk",args:[{type:"shortstr",name:"queue"},{type:"long",name:"messageCount"},{type:"long",name:"consumerCount"}]};j.QueueBind=3276820;var xe=j.methodInfoQueueBind={id:3276820,classId:50,methodId:20,name:"QueueBind",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey",default:""},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.QueueBindOk=3276821;var Te=j.methodInfoQueueBindOk={id:3276821,classId:50,methodId:21,name:"QueueBindOk",args:[]};j.QueuePurge=3276830;var Ue=j.methodInfoQueuePurge={id:3276830,classId:50,methodId:30,name:"QueuePurge",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"bit",name:"nowait",default:!1}]};j.QueuePurgeOk=3276831;var ke=j.methodInfoQueuePurgeOk={id:3276831,classId:50,methodId:31,name:"QueuePurgeOk",args:[{type:"long",name:"messageCount"}]};j.QueueDelete=3276840;var Oe=j.methodInfoQueueDelete={id:3276840,classId:50,methodId:40,name:"QueueDelete",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"bit",name:"ifUnused",default:!1},{type:"bit",name:"ifEmpty",default:!1},{type:"bit",name:"nowait",default:!1}]};j.QueueDeleteOk=3276841;var Se=j.methodInfoQueueDeleteOk={id:3276841,classId:50,methodId:41,name:"QueueDeleteOk",args:[{type:"long",name:"messageCount"}]};j.QueueUnbind=3276850;var _e=j.methodInfoQueueUnbind={id:3276850,classId:50,methodId:50,name:"QueueUnbind",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey",default:""},{type:"table",name:"arguments",default:{}}]};j.QueueUnbindOk=3276851;var Ne=j.methodInfoQueueUnbindOk={id:3276851,classId:50,methodId:51,name:"QueueUnbindOk",args:[]};j.BasicQos=3932170;var Ae=j.methodInfoBasicQos={id:3932170,classId:60,methodId:10,name:"BasicQos",args:[{type:"long",name:"prefetchSize",default:0},{type:"short",name:"prefetchCount",default:0},{type:"bit",name:"global",default:!1}]};j.BasicQosOk=3932171;var Re=j.methodInfoBasicQosOk={id:3932171,classId:60,methodId:11,name:"BasicQosOk",args:[]};j.BasicConsume=3932180;var Le=j.methodInfoBasicConsume={id:3932180,classId:60,methodId:20,name:"BasicConsume",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"shortstr",name:"consumerTag",default:""},{type:"bit",name:"noLocal",default:!1},{type:"bit",name:"noAck",default:!1},{type:"bit",name:"exclusive",default:!1},{type:"bit",name:"nowait",default:!1},{type:"table",name:"arguments",default:{}}]};j.BasicConsumeOk=3932181;var Me=j.methodInfoBasicConsumeOk={id:3932181,classId:60,methodId:21,name:"BasicConsumeOk",args:[{type:"shortstr",name:"consumerTag"}]};j.BasicCancel=3932190;var Fe=j.methodInfoBasicCancel={id:3932190,classId:60,methodId:30,name:"BasicCancel",args:[{type:"shortstr",name:"consumerTag"},{type:"bit",name:"nowait",default:!1}]};j.BasicCancelOk=3932191;var je=j.methodInfoBasicCancelOk={id:3932191,classId:60,methodId:31,name:"BasicCancelOk",args:[{type:"shortstr",name:"consumerTag"}]};j.BasicPublish=3932200;var Pe=j.methodInfoBasicPublish={id:3932200,classId:60,methodId:40,name:"BasicPublish",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"exchange",default:""},{type:"shortstr",name:"routingKey",default:""},{type:"bit",name:"mandatory",default:!1},{type:"bit",name:"immediate",default:!1}]};j.BasicReturn=3932210;var De=j.methodInfoBasicReturn={id:3932210,classId:60,methodId:50,name:"BasicReturn",args:[{type:"short",name:"replyCode"},{type:"shortstr",name:"replyText",default:""},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey"}]};j.BasicDeliver=3932220;var qe=j.methodInfoBasicDeliver={id:3932220,classId:60,methodId:60,name:"BasicDeliver",args:[{type:"shortstr",name:"consumerTag"},{type:"longlong",name:"deliveryTag"},{type:"bit",name:"redelivered",default:!1},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey"}]};j.BasicGet=3932230;var He=j.methodInfoBasicGet={id:3932230,classId:60,methodId:70,name:"BasicGet",args:[{type:"short",name:"ticket",default:0},{type:"shortstr",name:"queue",default:""},{type:"bit",name:"noAck",default:!1}]};j.BasicGetOk=3932231;var $e=j.methodInfoBasicGetOk={id:3932231,classId:60,methodId:71,name:"BasicGetOk",args:[{type:"longlong",name:"deliveryTag"},{type:"bit",name:"redelivered",default:!1},{type:"shortstr",name:"exchange"},{type:"shortstr",name:"routingKey"},{type:"long",name:"messageCount"}]};j.BasicGetEmpty=3932232;var ze=j.methodInfoBasicGetEmpty={id:3932232,classId:60,methodId:72,name:"BasicGetEmpty",args:[{type:"shortstr",name:"clusterId",default:""}]};j.BasicAck=3932240;var Ke=j.methodInfoBasicAck={id:3932240,classId:60,methodId:80,name:"BasicAck",args:[{type:"longlong",name:"deliveryTag",default:0},{type:"bit",name:"multiple",default:!1}]};j.BasicReject=3932250;var Ve=j.methodInfoBasicReject={id:3932250,classId:60,methodId:90,name:"BasicReject",args:[{type:"longlong",name:"deliveryTag"},{type:"bit",name:"requeue",default:!0}]};j.BasicRecoverAsync=3932260;var Ge=j.methodInfoBasicRecoverAsync={id:3932260,classId:60,methodId:100,name:"BasicRecoverAsync",args:[{type:"bit",name:"requeue",default:!1}]};j.BasicRecover=3932270;var Qe=j.methodInfoBasicRecover={id:3932270,classId:60,methodId:110,name:"BasicRecover",args:[{type:"bit",name:"requeue",default:!1}]};j.BasicRecoverOk=3932271;var We=j.methodInfoBasicRecoverOk={id:3932271,classId:60,methodId:111,name:"BasicRecoverOk",args:[]};j.BasicNack=3932280;var Ye=j.methodInfoBasicNack={id:3932280,classId:60,methodId:120,name:"BasicNack",args:[{type:"longlong",name:"deliveryTag",default:0},{type:"bit",name:"multiple",default:!1},{type:"bit",name:"requeue",default:!0}]};j.TxSelect=5898250;var Je=j.methodInfoTxSelect={id:5898250,classId:90,methodId:10,name:"TxSelect",args:[]};j.TxSelectOk=5898251;var Xe=j.methodInfoTxSelectOk={id:5898251,classId:90,methodId:11,name:"TxSelectOk",args:[]};j.TxCommit=5898260;var Ze=j.methodInfoTxCommit={id:5898260,classId:90,methodId:20,name:"TxCommit",args:[]};j.TxCommitOk=5898261;var et=j.methodInfoTxCommitOk={id:5898261,classId:90,methodId:21,name:"TxCommitOk",args:[]};j.TxRollback=5898270;var tt=j.methodInfoTxRollback={id:5898270,classId:90,methodId:30,name:"TxRollback",args:[]};j.TxRollbackOk=5898271;var rt=j.methodInfoTxRollbackOk={id:5898271,classId:90,methodId:31,name:"TxRollbackOk",args:[]};j.ConfirmSelect=5570570;var nt=j.methodInfoConfirmSelect={id:5570570,classId:85,methodId:10,name:"ConfirmSelect",args:[{type:"bit",name:"nowait",default:!1}]};j.ConfirmSelectOk=5570571;var ot=j.methodInfoConfirmSelectOk={id:5570571,classId:85,methodId:11,name:"ConfirmSelectOk",args:[]};j.BasicProperties=60;var it=j.propertiesInfoBasicProperties={id:60,name:"BasicProperties",args:[{type:"shortstr",name:"contentType"},{type:"shortstr",name:"contentEncoding"},{type:"table",name:"headers"},{type:"octet",name:"deliveryMode"},{type:"octet",name:"priority"},{type:"shortstr",name:"correlationId"},{type:"shortstr",name:"replyTo"},{type:"shortstr",name:"expiration"},{type:"shortstr",name:"messageId"},{type:"timestamp",name:"timestamp"},{type:"shortstr",name:"type"},{type:"shortstr",name:"userId"},{type:"shortstr",name:"appId"},{type:"shortstr",name:"clusterId"}]},st={},at={},ut={},ct={};function lt(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[e[r]]=1);return t}function ft(e,t,r){var n=lt(r),o={name:e};return o.type=dt(n),pt(o,o.type,n),o.size=gt(o,o.type,t,o.unit),o}ct.variable=ft,ct.rest=function(){return ft("_",!0,["binary"])},ct.value=function(e,t,r){var n=lt(r),o={value:e};return o.type=dt(n),pt(o,o.type,n),o.size=gt(o,o.type,t,o.unit),o},ct.string=function(e){return{value:e,type:"string"}};var ht={integer:1,binary:1,float:1};function dt(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&ht[t])return t;return"integer"}function pt(e,t,r){switch(t){case"integer":e.signed=function(e){return e.signed}(r);case"float":e.bigendian=function(e){return!e.little}(r);default:e.unit=function(e,t){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))if("unit:"==r.substr(0,5))return parseInt(r.substr(5))}switch(t){case"binary":return 8;case"integer":case"float":return 1}}(r,e.type)}return e}function gt(e,t,r,n){if(void 0!==r&&""!==r)return r;switch(t){case"integer":return 8;case"float":return 64;case"binary":return!0}}var mt=function(){function e(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var t={parse:function(t,r){var n={start:function(){var e,t,r,n,i,s;if(i=o,s=o,null!==(e=E()))if(null!==(t=c())){for(r=[],n=u();null!==n;)r.push(n),n=u();null!==r?e=[e,t,r]:(e=null,o=s)}else e=null,o=s;else e=null,o=s;null!==e&&(a=e[1],(l=e[2]).unshift(a),e=l);var a,l;null===e&&(o=i);return e},segmentTail:u,segment:c,string:l,chars:f,char:h,hexDigit:d,identifier:p,number:g,size:m,specifierList:b,specifierTail:v,specifier:y,unit:w,ws:E};if(void 0!==r){if(void 0===n[r])throw new Error("Invalid rule name: "+e(r)+".")}else r="start";var o=0,i=0,s=[];function a(e){o<i||(o>i&&(i=o,s=[]),s.push(e))}function u(){var e,r,n,i,s,u;return s=o,u=o,null!==(e=E())?(44===t.charCodeAt(o)?(r=",",o++):(r=null,a('","')),null!==r&&null!==(n=E())&&null!==(i=c())?e=[e,r,n,i]:(e=null,o=u)):(e=null,o=u),null!==e&&(e=e[3]),null===e&&(o=s),e}function c(){var e,t,r,n,i;return n=o,null!==(e=l())&&(e={string:e}),null===e&&(o=n),null===e&&(n=o,i=o,null!==(e=p())&&null!==(t=null!==(t=m())?t:"")&&null!==(r=null!==(r=b())?r:"")?e=[e,t,r]:(e=null,o=i),null!==e&&(e=function(e,t,r,n){return{name:t,size:r,specifiers:n}}(0,e[0],e[1],e[2])),null===e&&(o=n),null===e&&(n=o,i=o,null!==(e=g())&&null!==(t=null!==(t=m())?t:"")&&null!==(r=null!==(r=b())?r:"")?e=[e,t,r]:(e=null,o=i),null!==e&&(e=function(e,t,r,n){return{value:t,size:r,specifiers:n}}(0,e[0],e[1],e[2])),null===e&&(o=n))),e}function l(){var e,r,n,i,s;return i=o,s=o,34===t.charCodeAt(o)?(e='"',o++):(e=null,a('"\\""')),null!==e?(34===t.charCodeAt(o)?(r='"',o++):(r=null,a('"\\""')),null!==r?e=[e,r]:(e=null,o=s)):(e=null,o=s),null!==e&&(e=""),null===e&&(o=i),null===e&&(i=o,s=o,34===t.charCodeAt(o)?(e='"',o++):(e=null,a('"\\""')),null!==e&&null!==(r=f())?(34===t.charCodeAt(o)?(n='"',o++):(n=null,a('"\\""')),null!==n?e=[e,r,n]:(e=null,o=s)):(e=null,o=s),null!==e&&(e=e[1]),null===e&&(o=i)),e}function f(){var e,t,r;if(r=o,null!==(t=h()))for(e=[];null!==t;)e.push(t),t=h();else e=null;return null!==e&&(e=e.join("")),null===e&&(o=r),e}function h(){var e,r,n,i,s,u,c,l,f,h,p;return/^[^"\\\0-\x1F]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,a('[^"\\\\\\0-\\x1F]')),null===e&&(u=o,'\\"'===t.substr(o,2)?(e='\\"',o+=2):(e=null,a('"\\\\\\""')),null!==e&&(e='"'),null===e&&(o=u),null===e&&(u=o,"\\\\"===t.substr(o,2)?(e="\\\\",o+=2):(e=null,a('"\\\\\\\\"')),null!==e&&(e="\\"),null===e&&(o=u),null===e&&(u=o,"\\/"===t.substr(o,2)?(e="\\/",o+=2):(e=null,a('"\\\\/"')),null!==e&&(e="/"),null===e&&(o=u),null===e&&(u=o,"\\b"===t.substr(o,2)?(e="\\b",o+=2):(e=null,a('"\\\\b"')),null!==e&&(e="\b"),null===e&&(o=u),null===e&&(u=o,"\\f"===t.substr(o,2)?(e="\\f",o+=2):(e=null,a('"\\\\f"')),null!==e&&(e="\f"),null===e&&(o=u),null===e&&(u=o,"\\n"===t.substr(o,2)?(e="\\n",o+=2):(e=null,a('"\\\\n"')),null!==e&&(e="\n"),null===e&&(o=u),null===e&&(u=o,"\\r"===t.substr(o,2)?(e="\\r",o+=2):(e=null,a('"\\\\r"')),null!==e&&(e="\r"),null===e&&(o=u),null===e&&(u=o,"\\t"===t.substr(o,2)?(e="\\t",o+=2):(e=null,a('"\\\\t"')),null!==e&&(e="\t"),null===e&&(o=u),null===e&&(u=o,c=o,"\\u"===t.substr(o,2)?(e="\\u",o+=2):(e=null,a('"\\\\u"')),null!==e&&null!==(r=d())&&null!==(n=d())&&null!==(i=d())&&null!==(s=d())?e=[e,r,n,i,s]:(e=null,o=c),null!==e&&(l=e[1],f=e[2],h=e[3],p=e[4],e=String.fromCharCode(parseInt("0x"+l+f+h+p))),null===e&&(o=u)))))))))),e}function d(){var e;return/^[0-9a-fA-F]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,a("[0-9a-fA-F]")),e}function p(){var e,r,n,i,s,u,c;if(i=o,s=o,/^[_a-zA-Z]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,a("[_a-zA-Z]")),null!==e){for(r=[],/^[_a-zA-Z0-9]/.test(t.charAt(o))?(n=t.charAt(o),o++):(n=null,a("[_a-zA-Z0-9]"));null!==n;)r.push(n),/^[_a-zA-Z0-9]/.test(t.charAt(o))?(n=t.charAt(o),o++):(n=null,a("[_a-zA-Z0-9]"));null!==r?e=[e,r]:(e=null,o=s)}else e=null,o=s;return null!==e&&(u=e[0],c=e[1],e=u+c.join("")),null===e&&(o=i),e}function g(){var e,r,n,i,s,u,c;if(i=o,48===t.charCodeAt(o)?(e="0",o++):(e=null,a('"0"')),null!==e&&(e=0),null===e&&(o=i),null===e){if(i=o,s=o,/^[1-9]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,a("[1-9]")),null!==e){for(r=[],/^[0-9]/.test(t.charAt(o))?(n=t.charAt(o),o++):(n=null,a("[0-9]"));null!==n;)r.push(n),/^[0-9]/.test(t.charAt(o))?(n=t.charAt(o),o++):(n=null,a("[0-9]"));null!==r?e=[e,r]:(e=null,o=s)}else e=null,o=s;null!==e&&(u=e[0],c=e[1],e=parseInt(u+c.join(""))),null===e&&(o=i)}return e}function m(){var e,r,n,i;return n=o,i=o,58===t.charCodeAt(o)?(e=":",o++):(e=null,a('":"')),null!==e&&null!==(r=g())?e=[e,r]:(e=null,o=i),null!==e&&(e=e[1]),null===e&&(o=n),null===e&&(n=o,i=o,58===t.charCodeAt(o)?(e=":",o++):(e=null,a('":"')),null!==e&&null!==(r=p())?e=[e,r]:(e=null,o=i),null!==e&&(e=e[1]),null===e&&(o=n)),e}function b(){var e,r,n,i,s,u,c,l;if(s=o,u=o,47===t.charCodeAt(o)?(e="/",o++):(e=null,a('"/"')),null!==e)if(null!==(r=y())){for(n=[],i=v();null!==i;)n.push(i),i=v();null!==n?e=[e,r,n]:(e=null,o=u)}else e=null,o=u;else e=null,o=u;return null!==e&&(c=e[1],(l=e[2]).unshift(c),e=l),null===e&&(o=s),e}function v(){var e,r,n,i;return n=o,i=o,45===t.charCodeAt(o)?(e="-",o++):(e=null,a('"-"')),null!==e&&null!==(r=y())?e=[e,r]:(e=null,o=i),null!==e&&(e=e[1]),null===e&&(o=n),e}function y(){var e;return"little"===t.substr(o,6)?(e="little",o+=6):(e=null,a('"little"')),null===e&&("big"===t.substr(o,3)?(e="big",o+=3):(e=null,a('"big"')),null===e&&("signed"===t.substr(o,6)?(e="signed",o+=6):(e=null,a('"signed"')),null===e&&("unsigned"===t.substr(o,8)?(e="unsigned",o+=8):(e=null,a('"unsigned"')),null===e&&("integer"===t.substr(o,7)?(e="integer",o+=7):(e=null,a('"integer"')),null===e&&("binary"===t.substr(o,6)?(e="binary",o+=6):(e=null,a('"binary"')),null===e&&("float"===t.substr(o,5)?(e="float",o+=5):(e=null,a('"float"')),null===e&&(e=w()))))))),e}function w(){var e,r,n,i;return n=o,i=o,"unit:"===t.substr(o,5)?(e="unit:",o+=5):(e=null,a('"unit:"')),null!==e&&null!==(r=g())?e=[e,r]:(e=null,o=i),null!==e&&(e="unit:"+e[1]),null===e&&(o=n),e}function E(){var e,r;for(e=[],/^[ \t\n]/.test(t.charAt(o))?(r=t.charAt(o),o++):(r=null,a("[ \\t\\n]"));null!==r;)e.push(r),/^[ \t\n]/.test(t.charAt(o))?(r=t.charAt(o),o++):(r=null,a("[ \\t\\n]"));return e}var I=n[r]();if(null===I||o!==t.length){var C=Math.max(o,i),B=C<t.length?t.charAt(C):null,x=function(){for(var e=1,r=1,n=!1,s=0;s<Math.max(o,i);s++){var a=t.charAt(s);"\n"===a?(n||e++,r=1,n=!1):"\r"===a||"\u2028"===a||"\u2029"===a?(e++,r=1,n=!0):(r++,n=!1)}return{line:e,column:r}}();throw new this.SyntaxError(function(e){e.sort();for(var t=null,r=[],n=0;n<e.length;n++)e[n]!==t&&(r.push(e[n]),t=e[n]);return r}(s),B,C,x.line,x.column)}return I},toSource:function(){return this._source},SyntaxError:function(t,r,n,o,i){this.name="SyntaxError",this.expected=t,this.found=r,this.message=function(t,r){var n;switch(t.length){case 0:n="end of input";break;case 1:n=t[0];break;default:n=t.slice(0,t.length-1).join(", ")+" or "+t[t.length-1]}return"Expected "+n+" but "+(r?e(r):"end of input")+" found."}(t,r),this.offset=n,this.line=o,this.column=i}};return t.SyntaxError.prototype=Error.prototype,t}(),bt=ct,vt=mt;function yt(e){for(var t=vt.parse(e),r=0,n=t.length;r<n;r++){var o=t[r];if(null!=o.string)t[r]=bt.string(o.string);else if(null!=o.value)t[r]=bt.value(o.value,o.size,o.specifiers);else{if(null==o.name)throw"Unknown segment "+o;t[r]=bt.variable(o.name,o.size,o.specifiers)}}return t}ut.parse=function(){var e=[].join.call(arguments,",");return yt(e)};var wt,Et,It,Ct,Bt,xt={},Tt={exports:{}},Ut={exports:{}};function kt(){if(Et)return wt;Et=1;var e=1e3,t=60*e,r=60*t,n=24*r,o=7*n,i=365.25*n;function s(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}return wt=function(a,u){u=u||{};var c=typeof a;if("string"===c&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*i;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*n;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(a);if("number"===c&&isFinite(a))return u.long?function(o){var i=Math.abs(o);if(i>=n)return s(o,i,n,"day");if(i>=r)return s(o,i,r,"hour");if(i>=t)return s(o,i,t,"minute");if(i>=e)return s(o,i,e,"second");return o+" ms"}(a):function(o){var i=Math.abs(o);if(i>=n)return Math.round(o/n)+"d";if(i>=r)return Math.round(o/r)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},wt}function Ot(){if(Ct)return It;return Ct=1,It=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=kt(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t},It}var St={exports:{}};const _t=n,Nt=t,At=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)},{env:Rt}=process;let Lt;function Mt(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Ft(e,t){if(0===Lt)return 0;if(At("color=16m")||At("color=full")||At("color=truecolor"))return 3;if(At("color=256"))return 2;if(e&&!t&&void 0===Lt)return 0;const r=Lt||0;if("dumb"===Rt.TERM)return r;if("win32"===process.platform){const e=_t.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Rt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in Rt))||"codeship"===Rt.CI_NAME?1:r;if("TEAMCITY_VERSION"in Rt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Rt.TEAMCITY_VERSION)?1:0;if("truecolor"===Rt.COLORTERM)return 3;if("TERM_PROGRAM"in Rt){const e=parseInt((Rt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Rt.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Rt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Rt.TERM)||"COLORTERM"in Rt?1:r}At("no-color")||At("no-colors")||At("color=false")||At("color=never")?Lt=0:(At("color")||At("colors")||At("color=true")||At("color=always"))&&(Lt=1),"FORCE_COLOR"in Rt&&(Lt="true"===Rt.FORCE_COLOR?1:"false"===Rt.FORCE_COLOR?0:0===Rt.FORCE_COLOR.length?1:Math.min(parseInt(Rt.FORCE_COLOR,10),3));var jt,Pt,Dt={supportsColor:function(e){return Mt(Ft(e,e&&e.isTTY))},stdout:Mt(Ft(!0,Nt.isatty(1))),stderr:Mt(Ft(!0,Nt.isatty(2)))};function qt(){return jt||(jt=1,function(e,n){const o=t,i=r;n.init=function(e){e.inspectOpts={};const t=Object.keys(n.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=n.inspectOpts[t[r]]},n.log=function(...e){return process.stderr.write(i.format(...e)+"\n")},n.formatArgs=function(t){const{namespace:r,useColors:o}=this;if(o){const n=this.color,o="[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${r} `;t[0]=i+t[0].split("\n").join("\n"+i),t.push(o+"m+"+e.exports.humanize(this.diff)+"")}else t[0]=function(){if(n.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+t[0]},n.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},n.load=function(){return process.env.DEBUG},n.useColors=function(){return"colors"in n.inspectOpts?Boolean(n.inspectOpts.colors):o.isatty(process.stderr.fd)},n.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),n.colors=[6,2,3,4,5,1];try{const e=Dt;e&&(e.stderr||e).level>=2&&(n.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}n.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=Ot()(n);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}}(St,St.exports)),St.exports}Pt=Tt,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Pt.exports=(Bt||(Bt=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=Ot()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Ut,Ut.exports)),Ut.exports):Pt.exports=qt();var Ht=D.exports,$t=Tt.exports("bitsyntax-Interpreter");function zt(e,t,r,n,o){switch(r){case 1:return o?e.readInt8(t):e.readUInt8(t);case 2:return n?o?e.readInt16BE(t):e.readUInt16BE(t):o?e.readInt16LE(t):e.readUInt16LE(t);case 4:return n?o?e.readInt32BE(t):e.readUInt32BE(t):o?e.readInt32LE(t):e.readUInt32LE(t);case 8:return n?(o?Ht.readInt64BE:Ht.readUInt64BE)(e,t):(o?Ht.readInt64LE:Ht.readUInt64LE)(e,t);default:throw"Integers must be 8-, 16-, 32- or 64-bit"}}function Kt(e,t,r,n){switch(r){case 4:return n?e.readFloatBE(t):e.readFloatLE(t);case 8:return n?e.readDoubleBE(t):e.readDoubleLE(t);default:throw"Floats must be 32- or 64-bit"}}function Vt(e,t){var r=e.size;return"string"==typeof r?t[r]:r}xt.match=function(e,t,r){var n=0,o=function(e){function t(){}return t.prototype=e,new t}(r),i=8*t.length;function s(e){$t("skip bits"),$t(e);var t=Vt(e,o);if(!0===t)return n%8==0&&(n=i,!0);var r=e.unit*t;if(n+r>i)return!1;n+=r}function a(e){$t("get_integer"),$t(e);var r=e.unit,s=Vt(e,o)*r,a=n/8;return n+=s,!(s%8>0||n>i)&&zt(t,a,s/8,e.bigendian,e.signed)}function u(e){$t("get_float"),$t(e);var r=e.unit,s=Vt(e,o)*r,a=n/8;return!((n+=s)>i)&&Kt(t,a,s/8,e.bigendian)}function c(e){$t("get_binary"),$t(e);var r=e.unit,s=Vt(e,o),a=n/8;if(!0===s)return n=i,t.slice(a);var u=s*r;return!(u%8>0||n+u>i)&&(n+=u,t.slice(a,a+u/8))}function l(e){$t("get_string"),$t(e);var r=e.value.length,o=n/8;return!((n+=8*r)>i)&&t.slice(o,o+r).toString("utf8")}for(var f=e.length,h=0;h<f;h++){var d=e[h],p=!1;if("_"===d.name)p=s(d);else{switch(d.type){case"string":p=l(d);break;case"integer":p=a(d);break;case"float":p=u(d);break;case"binary":p=c(d)}if(!1===p)return!1;if(d.name)o[d.name]=p;else if(d.value!=p)return!1}}return n==i&&function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}(o)},xt.parse_int=zt,xt.parse_float=Kt;var Gt={},Qt={exports:{}};!function(e,t){var r=o,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),i(n,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var o=n(e);return void 0!==t?"string"==typeof r?o.fill(t,r):o.fill(t):o.fill(0),o},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(Qt,Qt.exports);var Wt=D.exports,Yt=Qt.exports.Buffer;function Jt(e,t,r,n){for(var o=0,i=r.length;o<i;o++){var s=r[o];switch(s.type){case"string":t+=e.write(s.value,t,"utf8");break;case"binary":t+=er(s,e,t,n);break;case"integer":t+=tr(s,e,t,n);break;case"float":t+=nr(s,e,t,n)}}return t}function Xt(e,t){var r=function(e,t){for(var r=0,n=0,o=e.length;n<o;n++)r+=Zt(e[n],t);return r}(e,t),n=Yt.alloc(r);return Jt(n,0,e,t),n}function Zt(e,t){return"string"==typeof e.size?t[e.size]*e.unit/8:"string"===e.type?Yt.byteLength(e.value,"utf8"):"binary"===e.type&&!0===e.size?t[e.name].length:e.size*e.unit/8}function er(e,t,r,n){var o=n[e.name],i=Zt(e,n);return o.copy(t,r,0,i),i}function tr(e,t,r,n){return rr(t,e.name?n[e.name]:e.value,r,Zt(e,n),e.bigendian)}function rr(e,t,r,n,o){switch(n){case 1:e.writeUInt8(t,r);break;case 2:o?e.writeUInt16BE(t,r):e.writeUInt16LE(t,r);break;case 4:o?e.writeUInt32BE(t,r):e.writeUInt32LE(t,r);break;case 8:o?Wt.writeUInt64BE(e,t,r):Wt.writeUInt64LE(e,t,r);break;default:throw new Error("integer size * unit must be 8, 16, 32 or 64")}return n}function nr(e,t,r,n){return or(t,e.name?n[e.name]:e.value,r,Zt(e,n),e.bigendian)}function or(e,t,r,n,o){if(4===n)o?e.writeFloatBE(t,r):e.writeFloatLE(t,r);else{if(8!==n)throw new Error("float size * unit must be 32 or 64");o?e.writeDoubleBE(t,r):e.writeDoubleLE(t,r)}return n}var ir=ut.parse;Gt.write=Jt,Gt.build=Xt,Gt.write_int=rr,Gt.write_float=or,Gt.builder=function(e){e=arguments.length>1?[].join.call(arguments,","):e;var t=ir(e);return function(e){return Xt(t,e)}};var sr={},ar=r.format,ur=ut.parse,cr=xt,lr=cr.parse_int,fr=cr.parse_float,hr=Gt,dr=hr.write_int,pr=hr.write_float,gr=Qt.exports.Buffer,mr=[];function br(){mr=[]}function vr(){mr.push(ar.apply(null,arguments))}function yr(){return mr.join("\n")}function wr(e){return"string"==typeof e.size?ar("%s * %d",Ir(e.size),e.unit):(e.size*e.unit).toString()}function Er(e){if("_"===e.name)!function(e){if("string"==typeof e.size)vr("var skipbits = %s * %d;",Ir(e.size),e.unit),vr("if (offset + skipbits > binsize) { return false; }"),vr("else { offset += skipbits; }");else if(!0===e.size)vr("if (offset % 8 === 0) { offset = binsize; }"),vr("else { return false; }");else{var t=e.unit*e.size;vr("if (offset + %d > binsize) { return false; }",t),vr("else { offset += %d; }",t)}}(e);else{switch(e.type){case"integer":case"float":!function(e){vr("bits = %s;\n",wr(e));var t="integer"===e.type?"parse_int":"parse_float",r=e.bigendian,n=e.signed;vr("byteoffset = offset / 8; offset += bits"),vr("if (offset > binsize) { return false; }"),vr("else { result = %s(bin, byteoffset, bits / 8, %s, %s); }",t,r,n)}(e);break;case"binary":!function(e){vr("byteoffset = offset / 8;"),!0===e.size?(vr("offset = binsize;"),vr("result = bin.slice(byteoffset);")):(vr("bits = %s;",wr(e)),vr("offset += bits;"),vr("if (offset > binsize) { return false; }"),vr("else { result = bin.slice(byteoffset,","byteoffset + bits / 8); }"))}(e);break;case"string":!function(e){vr("byteoffset = offset / 8;");var t=e.value.length;vr("offset += %d;",8*t),vr("if (offset > binsize) { return false; }"),vr("else { result = bin.toString(byteoffset,",ar("byteoffset + %d); }",t))}(e)}if(vr("if (result === false) return false;"),e.name)vr("else if (%s !== undefined) {",Ir(e.name)),vr("if (%s != result) return false;",Ir(e.name)),vr("}"),vr("else %s = result;",Ir(e.name));else vr("else if (result != %s) return false;",JSON.stringify(e.value))}}function Ir(e){return"var_"+e}function Cr(e){br(),vr("return function(binary, env) {"),vr("'use strict';"),vr("var bin = binary, env = env || {};"),vr("var offset = 0, binsize = bin.length * 8;"),vr("var bits, result, byteoffset;");for(var t=function(e){for(var t={},r=0;r<e.length;r++){var n=e[r].name;n&&"_"!==n&&(t[n]=!0),"string"==typeof(n=e[r].size)&&(t[n]=!0)}return Object.keys(t)}(e),r=0;r<t.length;r++){vr("var %s = env['%s'];",Ir(s=t[r]),s)}for(var n=e.length,o=0;o<n;o++){var i=e[o];vr("// "+JSON.stringify(i)),Er(i)}vr("if (offset == binsize) {"),vr("return {");for(r=0;r<t.length;r++){var s;vr("%s: %s,",s=t[r],Ir(s))}return vr("};"),vr("}"),vr("else return false;"),vr("}"),new Function("parse_int","parse_float",yr())(lr,fr)}function Br(e){switch(e.type){case"string":vr("offset += buf.write(%s, offset, 'utf8');",JSON.stringify(e.value));break;case"binary":vr("val = bindings['%s'];",e.name),!0===e.size?vr("size = val.length;"):"string"==typeof e.size?vr("size = (bindings['%s'] * %d) / 8;",e.size,e.unit):vr("size = %d;",e.size*e.unit/8),vr("val.copy(buf, offset, 0, size);"),vr("offset += size;");break;case"integer":case"float":!function(e){e.name?vr("val = bindings['%s'];",e.name):vr("val = %d",e.value);var t="integer"===e.type?"write_int":"write_float";"string"==typeof e.size?vr("size = (bindings['%s'] * %d) / 8;",e.size,e.unit):vr("size = %d;",e.size*e.unit/8);vr("%s(buf, val, offset, size, %s);",t,e.bigendian),vr("offset += size;")}(e)}}function xr(e){return br(),vr("return function(bindings) {"),vr("'use strict';"),function(e){for(var t=[],r=0,n=0;n<e.length;n++)"string"==typeof(i=e[n]).size||!0===i.size?t.push(i):"string"===i.type?r+=gr.byteLength(i.value):r+=i.size*i.unit/8;if(vr("var buffersize = %d;",r),t.length>0)for(var o=0;o<t.length;o++){var i;!0===(i=t[o]).size?vr("buffersize += bindings['%s'].length;",i.name):vr("buffersize += (bindings['%s'] * %d) / 8;",i.size,i.unit)}}(e),vr("var buf = Buffer.alloc(buffersize);"),vr("var offset = 0;"),function(e){vr("var val, size;");for(var t=e.length,r=0;r<t;r++){var n=e[r];vr("// %s",JSON.stringify(n)),Br(n)}}(e),vr("return buf;"),vr("}"),new Function("write_int","write_float","Buffer",yr())(dr,pr,gr)}sr.compile_pattern=Cr,sr.compile=function(){var e=[].join.call(arguments,","),t=ur(e);return Cr(t)},sr.compile_builder=function(){var e=[].join.call(arguments,","),t=ur(e);return xr(t)},at.parse=ut.parse,at.match=xt.match,at.build=Gt.build,at.write=Gt.write,at.matcher=at.compile=sr.compile,at.builder=sr.compile_builder;var Tr=j,Ur=Tr.constants,kr=Tr.decode,Or=at;st.PROTOCOL_HEADER="AMQP"+String.fromCharCode(0,0,9,1);var Sr=Ur.FRAME_METHOD,_r=Ur.FRAME_HEARTBEAT,Nr=Ur.FRAME_HEADER,Ar=Ur.FRAME_BODY,Rr=Ur.FRAME_END,Lr=Or.builder(Ar,"channel:16, size:32, payload:size/binary",Rr);st.makeBodyFrame=function(e,t){return Lr({channel:e,size:t.length,payload:t})};var Mr=Or.matcher("type:8","channel:16","size:32","rest/binary");st.parseFrame=function(e,t){var r=Mr(e);if(r){var n=r.size,o=r.rest;if(n>t)throw new Error("Frame size exceeds frame max");if(o.length>n){if(o[n]!==Rr)throw new Error("Invalid frame");return{type:r.type,channel:r.channel,size:n,payload:o.slice(0,n),rest:o.slice(n+1)}}}return!1};var Fr=Or.matcher("class:16","_weight:16","size:64","flagsAndfields/binary"),jr=Or.matcher("id:32, args/binary"),Pr={channel:0};st.decodeFrame=function(e){var t=e.payload;switch(e.type){case Sr:var r=jr(t),n=r.id,o=kr(n,r.args);return{id:n,channel:e.channel,fields:o};case Nr:var i=Fr(t);n=i.class,o=kr(n,i.flagsAndfields);return{id:n,channel:e.channel,size:i.size,fields:o};case Ar:return{channel:e.channel,content:e.payload};case _r:return Pr;default:throw new Error("Unknown frame type "+e.type)}},st.HEARTBEAT_BUF=Buffer.from([Ur.FRAME_HEARTBEAT,0,0,0,0,0,0,Ur.FRAME_END]),st.HEARTBEAT=Pr;var Dr={},qr=i,Hr="function"==typeof setImmediate?setImmediate:process.nextTick;function $r(e){this.newStreams=[],this.oldStreams=[],this.blocked=!1,this.scheduledRead=!1,this.out=e;var t=this;e.on("drain",(function(){t.blocked=!1,t._readIncoming()}))}$r.prototype._readIncoming=function(){if(!this.blocked){var e=!0,t=this.out;r(this.newStreams),e?(qr.equal(0,this.newStreams.length),r(this.oldStreams)):(qr(this.newStreams.length>0,"Expect some new streams to remain"),Array.prototype.push.apply(this.oldStreams,this.newStreams),this.newStreams=[]),this.blocked=!e}function r(r){for(var n;e&&(n=r.shift());){var o=n.read();null!==o&&(e=t.write(o),r.push(n))}}},$r.prototype._scheduleRead=function(){var e=this;e.scheduledRead||(Hr((function(){e.scheduledRead=!1,e._readIncoming()})),e.scheduledRead=!0)},$r.prototype.pipeFrom=function(e){var t=this;function r(){t.newStreams.push(e),t._scheduleRead()}function n(){e.removeListener("readable",r),e.removeListener("error",n),e.removeListener("end",n),e.removeListener("unpipeFrom",o)}function o(e){e===t&&n()}e.on("unpipeFrom",o),e.on("end",n),e.on("error",n),e.on("readable",r)},$r.prototype.unpipeFrom=function(e){e.emit("unpipeFrom",this)},Dr.Mux=$r;var zr,Kr={exports:{}},Vr={};function Gr(){if(zr)return Vr;function e(e){return Object.prototype.toString.call(e)}return zr=1,Vr.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},Vr.isBoolean=function(e){return"boolean"==typeof e},Vr.isNull=function(e){return null===e},Vr.isNullOrUndefined=function(e){return null==e},Vr.isNumber=function(e){return"number"==typeof e},Vr.isString=function(e){return"string"==typeof e},Vr.isSymbol=function(e){return"symbol"==typeof e},Vr.isUndefined=function(e){return void 0===e},Vr.isRegExp=function(t){return"[object RegExp]"===e(t)},Vr.isObject=function(e){return"object"==typeof e&&null!==e},Vr.isDate=function(t){return"[object Date]"===e(t)},Vr.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},Vr.isFunction=function(e){return"function"==typeof e},Vr.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},Vr.isBuffer=o.Buffer.isBuffer,Vr}var Qr,Wr,Yr,Jr,Xr,Zr,en,tn,rn,nn,on,sn={exports:{}},an={exports:{}};function un(){return Wr||(Wr=1,function(e){try{var t=require("util");if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=(Qr||(Qr=1,"function"==typeof Object.create?an.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:an.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),an.exports)}}(sn)),sn.exports}function cn(){if(Zr)return Xr;Zr=1,Xr=d;var e=Jr?Yr:(Jr=1,Yr=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}),t=o.Buffer;d.ReadableState=h;var n=a.EventEmitter;n.listenerCount||(n.listenerCount=function(e,t){return e.listeners(t).length});var i,c=s,l=Gr();l.inherits=un();var f=r;function h(e,t){var r=fn(),n=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=n||0===n?n:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,t instanceof r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(i||(i=u.StringDecoder),this.decoder=new i(e.encoding),this.encoding=e.encoding)}function d(e){if(fn(),!(this instanceof d))return new d(e);this._readableState=new h(e,this),this.readable=!0,c.call(this)}function p(e,t,r,n,o){var i=function(e,t){var r=null;l.isBuffer(t)||l.isString(t)||l.isNullOrUndefined(t)||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(i)e.emit("error",i);else if(l.isNullOrUndefined(r))t.reading=!1,t.ended||function(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,b(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!o){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&o){s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||o||n||(r=t.decoder.write(r)),o||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,o?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&b(e)),function(e,t){t.readingMore||(t.readingMore=!0,process.nextTick((function(){!function(e,t){var r=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}(e,t)})))}(e,t);else o||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}f=f&&f.debuglog?f.debuglog("stream"):function(){},l.inherits(d,c),d.prototype.push=function(e,r){var n=this._readableState;return l.isString(e)&&!n.objectMode&&(r=r||n.defaultEncoding)!==n.encoding&&(e=new t(e,r),r=""),p(this,n,e,r,!1)},d.prototype.unshift=function(e){return p(this,this._readableState,e,"",!0)},d.prototype.setEncoding=function(e){return i||(i=u.StringDecoder),this._readableState.decoder=new i(e),this._readableState.encoding=e,this};var g=8388608;function m(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||l.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>=g)e=g;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function b(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?process.nextTick((function(){v(e)})):v(e))}function v(e){f("emit readable"),e.emit("readable"),y(e)}function y(e){var t=e._readableState;if(f("flow",t.flowing),t.flowing)do{var r=e.read()}while(null!==r&&t.flowing)}function w(e,r){var n,o=r.buffer,i=r.length,s=!!r.decoder,a=!!r.objectMode;if(0===o.length)return null;if(0===i)n=null;else if(a)n=o.shift();else if(!e||e>=i)n=s?o.join(""):t.concat(o,i),o.length=0;else{if(e<o[0].length)n=(f=o[0]).slice(0,e),o[0]=f.slice(e);else if(e===o[0].length)n=o.shift();else{n=s?"":new t(e);for(var u=0,c=0,l=o.length;c<l&&u<e;c++){var f=o[0],h=Math.min(e-u,f.length);s?n+=f.slice(0,h):f.copy(n,u,0,h),h<f.length?o[0]=f.slice(h):o.shift(),u+=h}}}return n}function E(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,process.nextTick((function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))})))}return d.prototype.read=function(e){f("read",e);var t=this._readableState,r=e;if((!l.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):b(this),null;if(0===(e=m(e,t))&&t.ended)return 0===t.length&&E(this),null;var n,o=t.needReadable;return f("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",o=!0),(t.ended||t.reading)&&f("reading or ended",o=!1),o&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),o&&!t.reading&&(e=m(r,t)),n=e>0?w(e,t):null,l.isNull(n)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&E(this),l.isNull(n)||this.emit("data",n),n},d.prototype._read=function(e){this.emit("error",new Error("not implemented"))},d.prototype.pipe=function(t,r){var o=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,r);var s=(!r||!1!==r.end)&&t!==process.stdout&&t!==process.stderr?u:l;function a(e){f("onunpipe"),e===o&&l()}function u(){f("onend"),t.end()}i.endEmitted?process.nextTick(s):o.once("end",s),t.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n.listenerCount(e,"data")&&(t.flowing=!0,y(e))}}(o);function l(){f("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",c),t.removeListener("error",d),t.removeListener("unpipe",a),o.removeListener("end",u),o.removeListener("end",l),o.removeListener("data",h),!i.awaitDrain||t._writableState&&!t._writableState.needDrain||c()}function h(e){f("ondata"),!1===t.write(e)&&(f("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++,o.pause())}function d(e){f("onerror",e),m(),t.removeListener("error",d),0===n.listenerCount(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",g),m()}function g(){f("onfinish"),t.removeListener("close",p),m()}function m(){f("unpipe"),o.unpipe(t)}return t.on("drain",c),o.on("data",h),t._events&&t._events.error?e(t._events.error)?t._events.error.unshift(d):t._events.error=[d,t._events.error]:t.on("error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",o),i.flowing||(f("pipe resume"),o.resume()),t},d.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this);return this}o=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},d.prototype.on=function(e,t){var r=c.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var n=this._readableState;if(!n.readableListening)if(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading)n.length&&b(this);else{var o=this;process.nextTick((function(){f("readable nexttick read 0"),o.read(0)}))}}return r},d.prototype.addListener=d.prototype.on,d.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,e.reading||(f("resume read 0"),this.read(0)),function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick((function(){!function(e,t){t.resumeScheduled=!1,e.emit("resume"),y(e),t.flowing&&!t.reading&&e.read(0)}(e,t)})))}(this,e)),this},d.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},d.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var o in e.on("end",(function(){if(f("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(o){(f("wrapped data"),t.decoder&&(o=t.decoder.write(o)),o&&(t.objectMode||o.length))&&(n.push(o)||(r=!0,e.pause()))})),e)l.isFunction(e[o])&&l.isUndefined(this[o])&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));return function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,n.emit.bind(n,t))})),n._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume())},n},d._fromList=w,Xr}function ln(){if(tn)return en;tn=1,en=a;var e=o.Buffer;a.WritableState=i;var t=Gr();t.inherits=un();var r=s;function n(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function i(e,t){var r=fn(),n=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=n||0===n?n:o,this.objectMode=!!e.objectMode,t instanceof r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){r?process.nextTick((function(){t.pendingcb--,o(n)})):(t.pendingcb--,o(n));e._writableState.errorEmitted=!0,e.emit("error",n)}(e,r,n,t,o);else{var i=f(e,r);i||r.corked||r.bufferProcessing||!r.buffer.length||l(e,r),n?process.nextTick((function(){c(e,r,i,o)})):c(e,r,i,o)}}(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function a(e){var t=fn();if(!(this instanceof a||this instanceof t))return new a(e);this._writableState=new i(e,this),this.writable=!0,r.call(this)}function u(e,t,r,n,o,i,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function c(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),d(e,t)}function l(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var r=[],n=0;n<t.buffer.length;n++)r.push(t.buffer[n].callback);t.pendingcb++,u(e,t,!0,t.length,t.buffer,"",(function(e){for(var n=0;n<r.length;n++)t.pendingcb--,r[n](e)})),t.buffer=[]}else{for(n=0;n<t.buffer.length;n++){var o=t.buffer[n],i=o.chunk,s=o.encoding,a=o.callback,c=t.objectMode?1:i.length;if(u(e,t,!1,c,i,s,a),t.writing){n++;break}}n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}t.bufferProcessing=!1}function f(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function h(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function d(e,t){var r=f(0,t);return r&&(0===t.pendingcb?(h(e,t),t.finished=!0,e.emit("finish")):h(e,t)),r}return t.inherits(a,r),a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},a.prototype.write=function(r,o,i){var s=this._writableState,a=!1;return t.isFunction(o)&&(i=o,o=null),t.isBuffer(r)?o="buffer":o||(o=s.defaultEncoding),t.isFunction(i)||(i=function(){}),s.ended?function(e,t,r){var n=new Error("write after end");e.emit("error",n),process.nextTick((function(){r(n)}))}(this,0,i):function(e,r,n,o){var i=!0;if(!(t.isBuffer(n)||t.isString(n)||t.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),process.nextTick((function(){o(s)})),i=!1}return i}(this,s,r,i)&&(s.pendingcb++,a=function(r,o,i,s,a){i=function(r,n,o){!r.objectMode&&!1!==r.decodeStrings&&t.isString(n)&&(n=new e(n,o));return n}(o,i,s),t.isBuffer(i)&&(s="buffer");var c=o.objectMode?1:i.length;o.length+=c;var l=o.length<o.highWaterMark;l||(o.needDrain=!0);o.writing||o.corked?o.buffer.push(new n(i,s,a)):u(r,o,!1,c,i,s,a);return l}(this,s,r,o,i)),a},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||l(this,e))},a.prototype._write=function(e,t,r){r(new Error("not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,r,n){var o=this._writableState;t.isFunction(e)?(n=e,e=null,r=null):t.isFunction(r)&&(n=r,r=null),t.isNullOrUndefined(e)||this.write(e,r),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||function(e,t,r){t.ending=!0,d(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0}(this,o,n)},en}function fn(){if(nn)return rn;nn=1,rn=o;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},t=Gr();t.inherits=un();var r=cn(),n=ln();function o(e){if(!(this instanceof o))return new o(e);r.call(this,e),n.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}return t.inherits(o,r),function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(e(n.prototype),(function(e){o.prototype[e]||(o.prototype[e]=n.prototype[e])})),rn}var hn={exports:{}};!function(e){var t=r.inherits,n=a.EventEmitter;function o(t,r,o){n.call(this),this.interval=t;var i=t*e.exports.UNITS_TO_MS,s=this.emit.bind(this,"beat"),a=this.emit.bind(this,"timeout");this.sendTimer=setInterval(this.runHeartbeat.bind(this,r,s),i/2);var u=0;this.recvTimer=setInterval(this.runHeartbeat.bind(this,(function(){return o()?(u=0,!0):++u<2}),a),i)}e.exports.UNITS_TO_MS=1e3,t(o,n),e.exports.Heart=o,o.prototype.clear=function(){clearInterval(this.sendTimer),clearInterval(this.recvTimer)},o.prototype.runHeartbeat=function(e,t){e()||t()}}(hn);var dn={},pn=j,gn=r.format;r.inherits;var mn=st.HEARTBEAT;dn.closeMessage=function(e){var t=e.fields.replyCode;return gn('%d (%s) with message "%s"',t,pn.constant_strs[t],e.fields.replyText)},dn.methodName=function(e){return pn.info(e).name},dn.inspect=function(e,t){if(e===mn)return"<Heartbeat>";if(e.id){var r=pn.info(e.id);return gn("<%s channel:%d%s>",r.name,e.channel,t?" "+JSON.stringify(e.fields,void 0,2):"")}return gn("<Content channel:%d size:%d>",e.channel,e.size)};var bn={};function vn(e){return Math.floor(e/32)}function yn(e){if(0===e)return 32;let t,r=31;return t=e<<16,0!=t&&(r-=16,e=t),t=e<<8,0!=t&&(r-=8,e=t),t=e<<4,0!=t&&(r-=4,e=t),t=e<<2,0!=t&&(r-=2,e=t),r-(e<<1>>>31)}bn.BitSet=class{constructor(e){if(e){const t=Math.ceil(e/32);this.words=new Array(t)}else this.words=[];this.wordsInUse=0}ensureSize(e){const t=this.words.length;t<e&&(this.words=this.words.concat(new Array(e-t)))}set(e){const t=vn(e);t>=this.wordsInUse&&(this.ensureSize(t+1),this.wordsInUse=t+1);const r=1<<e;this.words[t]|=r}clear(e){const t=vn(e);if(t>=this.wordsInUse)return;const r=~(1<<e);this.words[t]&=r}get(e){const t=vn(e);if(t>=this.wordsInUse)return!1;const r=1<<e;return!!(this.words[t]&r)}nextSetBit(e){let t=vn(e);if(t>=this.wordsInUse)return-1;let r=this.words[t]&4294967295<<e;for(;;){if(r)return 32*t+yn(r);if(t++,t===this.wordsInUse)return-1;r=this.words[t]}}nextClearBit(e){let t=vn(e);if(t>=this.wordsInUse)return e;let r=~this.words[t]&4294967295<<e;for(;;){if(r)return 32*t+yn(r);if(t++,t==this.wordsInUse)return 32*t;r=~this.words[t]}}};var wn,En,In,Cn,Bn,xn={exports:{}};function Tn(){if(En)return wn;En=1,wn=n;var e=fn(),t=Gr();function r(e,r){this.afterTransform=function(e,n){return function(e,r,n){var o=e._transformState;o.transforming=!1;var i=o.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));o.writechunk=null,o.writecb=null,t.isNullOrUndefined(n)||e.push(n);i&&i(r);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}(r,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function n(i){if(!(this instanceof n))return new n(i);e.call(this,i),this._transformState=new r(i,this);var s=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",(function(){t.isFunction(this._flush)?this._flush((function(e){o(s,e)})):o(s)}))}function o(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}return t.inherits=un(),t.inherits(n,e),n.prototype.push=function(t,r){return this._transformState.needTransform=!1,e.prototype.push.call(this,t,r)},n.prototype._transform=function(e,t,r){throw new Error("not implemented")},n.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},n.prototype._read=function(e){var r=this._transformState;t.isNull(r.writechunk)||!r.writecb||r.transforming?r.needTransform=!0:(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform))},wn}var Un={};function kn(e,t){return e&&e.split("\n").slice(t).join("\n")}function On(e,t){var r=new Error;this.message=e,this.stack=this.toString()+"\n"+kn(r.stack,2),this.stackAtStateChange=t}(0,r.inherits)(On,Error),On.prototype.name="IllegalOperationError",Un.IllegalOperationError=On,Un.stackCapture=function(e){return"Stack capture: "+e+"\n"+kn((new Error).stack,2)};var Sn=j,_n=Sn.constants,Nn=st,An=Nn.HEARTBEAT,Rn=Dr.Mux,Ln=s.Duplex||(on?Kr.exports:(on=1,Kr.exports=fn())),Mn=a.EventEmitter,Fn=hn.exports.Heart,jn=dn.methodName,Pn=dn.closeMessage,Dn=dn.inspect,qn=bn.BitSet,Hn=r.inherits,$n=r.format,zn=s.PassThrough||(Bn?xn.exports:(Bn=1,xn.exports=function(){if(Cn)return In;Cn=1,In=r;var e=Tn(),t=Gr();function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t.inherits=un(),t.inherits(r,e),r.prototype._transform=function(e,t,r){r(null,e)},In}())),Kn=Un.IllegalOperationError,Vn=Un.stackCapture;function Gn(e){Mn.call(this);var t=this.stream=function(e){if(e instanceof Ln)return e;var t=new Ln;return t.wrap(e),t._write=function(t,r,n){return e.write(t,r,n)},t}(e);this.muxer=new Rn(t),this.rest=Buffer.alloc(0),this.frameMax=_n.FRAME_MIN_SIZE,this.sentSinceLastCheck=!1,this.recvSinceLastCheck=!1,this.expectSocketClose=!1,this.freeChannels=new qn,this.channels=[{channel:{accept:Yn(this)},buffer:e}]}Hn(Gn,Mn);var Qn=Gn.prototype;function Wn(e){var t=this.channels[e.channel];if(t)return t.channel.accept(e);this.closeWithError($n("Frame on unknown channel %d",e.channel),_n.CHANNEL_ERROR,new Error($n("Frame on unknown channel: %s",Dn(e,!1))))}function Yn(e){return function(t){if(t===An);else if(t.id===Sn.ConnectionClose){e.sendMethod(0,Sn.ConnectionCloseOk,{});var r=$n("Connection closed: %s",Pn(t)),n=Vn(r),o=new Error(r);o.code=t.fields.replyCode,io(o)&&e.emit("error",o),e.toClosed(n,o)}else t.id===Sn.ConnectionBlocked?e.emit("blocked",t.fields.reason):t.id===Sn.ConnectionUnblocked?e.emit("unblocked"):e.closeWithError($n("Unexpected frame on channel 0"),_n.UNEXPECTED_FRAME,new Error($n("Unexpected frame on channel 0: %s",Dn(t,!1))))}}function Jn(e,t){return function(){throw new Kn(e,t)}}function Xn(e,t,r){e.sendMethod=e.sendContent=e.sendMessage=Jn(t,r)}Qn.sendProtocolHeader=function(){this.sendBytes(Nn.PROTOCOL_HEADER)},Qn.open=function(e,t){var r=this,n=t||function(){},o=Object.create(e);function i(e){r.step((function(t,r){null!==t?a(t):0!==r.channel?a(new Error($n("Frame on channel != 0 during handshake: %s",Dn(r,!1)))):e(r)}))}function s(e,t){i((function(r){r.id===e?t(r):a(new Error($n("Expected %s; got %s",jn(e),Dn(r,!1))))}))}function a(e){n(e)}function u(e){r.sendMethod(0,e,o)}function c(e,t){return 0===e||0===t?Math.max(e,t):Math.min(e,t)}function l(t){switch(t.id){case Sn.ConnectionSecure:a(new Error("Wasn't expecting to have to go through secure"));break;case Sn.ConnectionClose:a(new Error($n("Handshake terminated by server: %s",Pn(t))));break;case Sn.ConnectionTune:var r=t.fields;o.frameMax=c(r.frameMax,e.frameMax),o.channelMax=c(r.channelMax,e.channelMax),o.heartbeat=c(r.heartbeat,e.heartbeat);try{u(Sn.ConnectionTuneOk),u(Sn.ConnectionOpen)}catch(e){return void a(e)}s(Sn.ConnectionOpenOk,f);break;default:a(new Error($n("Expected connection.secure, connection.close, or connection.tune during handshake; got %s",Dn(t,!1))))}}function f(e){var t;r.channelMax=o.channelMax||65535,r.frameMax=o.frameMax||4294967295,r.heartbeat=o.heartbeat,r.heartbeater=r.startHeartbeater(),r.accept=Wn,t=e,r.stream.removeListener("end",h),r.stream.removeListener("error",h),r.stream.on("error",r.onSocketError.bind(r)),r.stream.on("end",r.onSocketError.bind(r,new Error("Unexpected close"))),r.on("frameError",r.onSocketError.bind(r)),r.acceptLoop(),n(null,t)}function h(e){a(e||new Error("Socket closed abruptly during opening handshake"))}this.stream.on("end",h),this.stream.on("error",h),this.sendProtocolHeader(),s(Sn.ConnectionStart,(function(t){if(t.fields.mechanisms.toString().split(" ").indexOf(e.mechanism)<0)a(new Error($n("SASL mechanism %s is not provided by the server",e.mechanism)));else{r.serverProperties=t.fields.serverProperties;try{u(Sn.ConnectionStartOk)}catch(e){return void a(e)}i(l)}}))},Qn.close=function(e){var t=e&&function(){e(null)};this.closeBecause("Cheers, thanks",_n.REPLY_SUCCESS,t)},Qn.closeBecause=function(e,t,r){this.sendMethod(0,Sn.ConnectionClose,{replyText:e,replyCode:t,methodId:0,classId:0});var n=Vn("closeBecause called: "+e);this.toClosing(n,r)},Qn.closeWithError=function(e,t,r){this.emit("error",r),this.closeBecause(e,t)},Qn.onSocketError=function(e){if(!this.expectSocketClose){this.expectSocketClose=!0,this.emit("error",e);var t=Vn("Socket error");this.toClosed(t,e)}},Qn.toClosing=function(e,t){var r=this.sendMethod.bind(this);this.accept=function(e){if(e.id===Sn.ConnectionCloseOk){t&&t();var n=Vn("ConnectionCloseOk received");this.toClosed(n,void 0)}else e.id===Sn.ConnectionClose&&r(0,Sn.ConnectionCloseOk,{})},Xn(this,"Connection closing",e)},Qn._closeChannels=function(e){for(var t=1;t<this.channels.length;t++){var r=this.channels[t];null!==r&&r.channel.toClosed(e)}},Qn.toClosed=function(e,t){this._closeChannels(e);var r=$n("Connection closed (%s)",t?t.toString():"by client");Xn(this,r,e),this.accept=Jn(r,e),this.close=function(t){t&&t(new Kn(r,e))},this.heartbeater&&this.heartbeater.clear(),this.expectSocketClose=!0,this.stream.end(),this.emit("close",t)},Qn.startHeartbeater=function(){if(0===this.heartbeat)return null;var e=this,t=new Fn(this.heartbeat,this.checkSend.bind(this),this.checkRecv.bind(this));return t.on("timeout",(function(){var t=new Error("Heartbeat timeout");e.emit("error",t);var r=Vn("Heartbeat timeout");e.toClosed(r,t)})),t.on("beat",(function(){e.sendHeartbeat()})),t},Qn.freshChannel=function(e,t){var r=this.freeChannels.nextClearBit(1);if(r<0||r>this.channelMax)throw new Error("No channels left to allocate");this.freeChannels.set(r);var n=t&&t.highWaterMark||1024,o=new zn({objectMode:!0,highWaterMark:n});return this.channels[r]={channel:e,buffer:o},o.on("drain",(function(){e.onBufferDrain()})),this.muxer.pipeFrom(o),r},Qn.releaseChannel=function(e){this.freeChannels.clear(e),this.channels[e].buffer.end(),this.channels[e]=null},Qn.acceptLoop=function(){var e=this;function t(){try{for(var t;t=e.recvFrame();)e.accept(t)}catch(t){e.emit("frameError",t)}}e.stream.on("readable",t),t()},Qn.step=function(e){var t=this;!function r(){var n;try{n=t.recvFrame()}catch(t){return void e(t,null)}n?e(null,n):t.stream.once("readable",r)}()},Qn.checkSend=function(){var e=this.sentSinceLastCheck;return this.sentSinceLastCheck=!1,e},Qn.checkRecv=function(){var e=this.recvSinceLastCheck;return this.recvSinceLastCheck=!1,e},Qn.sendBytes=function(e){this.sentSinceLastCheck=!0,this.stream.write(e)},Qn.sendHeartbeat=function(){return this.sendBytes(Nn.HEARTBEAT_BUF)};var Zn=Sn.encodeMethod,eo=Sn.encodeProperties;Qn.sendMethod=function(e,t,r){var n=Zn(t,e,r);return this.sentSinceLastCheck=!0,this.channels[e].buffer.write(n)},Qn.sendMessage=function(e,t,r,n,o,i){if(!Buffer.isBuffer(i))throw new TypeError("content is not a buffer");var s=Zn(t,e,r),a=eo(n,e,i.length,o),u=this.channels[e].buffer;this.sentSinceLastCheck=!0;var c=s.length+a.length,l=i.length>0?i.length+to:0,f=c+l;if(f<2048){var h=Buffer.allocUnsafe(f),d=s.copy(h,0);return d+=a.copy(h,d),l>0&&ro(e,i).copy(h,d),u.write(h)}if(c<2048){var p=Buffer.allocUnsafe(c);d=s.copy(p,0);a.copy(p,d),u.write(p)}else u.write(s),u.write(a);return this.sendContent(e,i)};var to=Sn.FRAME_OVERHEAD,ro=Nn.makeBodyFrame;Qn.sendContent=function(e,t){if(!Buffer.isBuffer(t))throw new TypeError($n("Expected buffer; got %s",t));for(var r=!0,n=this.channels[e].buffer,o=this.frameMax-to,i=0;i<t.length;i+=o){var s=i+o,a=s>t.length?t.slice(i):t.slice(i,s),u=ro(e,a);r=n.write(u)}return this.sentSinceLastCheck=!0,r};var no=Nn.parseFrame,oo=Nn.decodeFrame;function io(e){switch(e&&e.code){case Sn.constants.CONNECTION_FORCED:case Sn.constants.REPLY_SUCCESS:return!1;default:return!0}}Qn.recvFrame=function(){var e=no(this.rest,this.frameMax);if(e)return this.rest=e.rest,oo(e);var t=this.stream.read();return null!==t&&(this.recvSinceLastCheck=!0,this.rest=Buffer.concat([this.rest,t]),this.recvFrame())},F.Connection=Gn,F.isFatalError=io;var so={},ao=P;so.plain=function(e,t){return{mechanism:"PLAIN",response:function(){return Buffer.from(["",e,t].join(String.fromCharCode(0)))},username:e,password:t}},so.amqplain=function(e,t){return{mechanism:"AMQPLAIN",response:function(){const r=Buffer.alloc(16384),n=ao.encodeTable(r,{LOGIN:e,PASSWORD:t},0);return r.slice(4,n)},username:e,password:t}},so.external=function(){return{mechanism:"EXTERNAL",response:function(){return Buffer.from("")}}};var uo="0.10.3",co=M,lo=e,fo=F.Connection,ho=r.format,po=so;function go(e,t){for(var r=Object.keys(e),n=r.length;n--;){var o=r[n];t[o]=e[o]}return t}var mo={product:"amqplib",version:uo,platform:ho("Node.JS %s",process.version),information:"http://squaremo.github.io/amqp.node",capabilities:{publisher_confirms:!0,exchange_exchange_bindings:!0,"basic.nack":!0,consumer_cancel_notify:!0,"connection.blocked":!0,authentication_failure_close:!0}};function bo(e,t,r,n){e=e?lo.unescape(e):"/";t=t||{};function o(e,t){return void 0===e?t:parseInt(e)}return{clientProperties:go(n,Object.create(mo)),mechanism:r.mechanism,response:r.response(),locale:t.locale||"en_US",channelMax:o(t.channelMax,0),frameMax:o(t.frameMax,4096),heartbeat:o(t.heartbeat,0),virtualHost:e,capabilities:"",insist:0}}function vo(e){var t="guest",r="guest";return""==e.username&&""==e.password||(t=e.username?unescape(e.username):"",r=e.password?unescape(e.password):""),po.plain(t,r)}m.connect=function(e,t,r){var n=go(t||{},{});e=e||"amqp://localhost";var o,i,s=!!n.noDelay,a=n.timeout,u=!!n.keepAlive,f=n.keepAliveDelay||0,h=n.clientProperties||{};if("object"==typeof e){var d,p;o=(e.protocol||"amqp")+":",n.host=e.hostname,n.servername=n.servername||e.hostname,n.port=e.port||("amqp:"===o?5672:5671),null==e.username&&null==e.password?(d="guest",p="guest"):(d=e.username||"",p=e.password||"");var g={locale:e.locale,channelMax:e.channelMax,frameMax:e.frameMax,heartbeat:e.heartbeat};i=bo(e.vhost,g,n.credentials||po.plain(d,p),h)}else{var m=co(e,!0);o=m.protocol,n.host=m.hostname,n.servername=n.servername||m.hostname,n.port=parseInt(m.port)||("amqp:"===o?5672:5671);var b=m.pathname?m.pathname.substr(1):null;i=bo(b,m.query,n.credentials||vo(m),h)}var v,y=!1;function w(){y=!0,v.setNoDelay(s),u&&v.setKeepAlive(u,f);var e=new fo(v);e.open(i,(function(t,n){a&&v.setTimeout(0),null===t?r(null,e):(v.end(),v.destroy(),r(t))}))}if("amqp:"===o)v=c.connect(n,w);else{if("amqps:"!==o)throw new Error("Expected amqp: or amqps: as the protocol; got "+o);v=l.connect(n,w)}a&&v.setTimeout(a,(function(){v.end(),v.destroy(),r(new Error("connect ETIMEDOUT"))})),v.once("error",(function(e){y||r(e)}))},m.credentialsFromUrl=vo;var yo={},wo={},Eo=j,Io=dn.closeMessage,Co=dn.inspect,Bo=dn.methodName,xo=i,To=r.inherits,Uo=a.EventEmitter,ko=r.format,Oo=Un.IllegalOperationError,So=Un.stackCapture;function _o(e){Uo.call(this),this.connection=e,this.reply=null,this.pending=[],this.lwm=1,this.unconfirmed=[],this.on("ack",this.handleConfirm.bind(this,(function(e){e&&e(null)}))),this.on("nack",this.handleConfirm.bind(this,(function(e){e&&e(new Error("message nacked"))}))),this.on("close",(function(){for(var e;e=this.unconfirmed.shift();)e&&e(new Error("channel closed"))})),this.handleMessage=Lo}To(_o,Uo),wo.Channel=_o,wo.acceptMessage=Mo;var No=_o.prototype;function Ao(e,t){return function(){throw new Oo(e,t)}}function Ro(e,t,r){e.sendImmediately=e.sendOrEnqueue=e.sendMessage=Ao(t,r)}function Lo(e){var t;if(e.id===Eo.BasicDeliver)t="delivery";else{if(e.id!==Eo.BasicReturn)throw ko("Expected BasicDeliver or BasicReturn; got %s",Co(e));t="return"}var r=this,n=e.fields;return Mo((function(e){e.fields=n,r.emit(t,e)}))}function Mo(e){var t=0,r=0,n=null,o={fields:null,properties:null,content:null};return function(n){if(n.id===Eo.BasicProperties)return o.properties=n.fields,0===(t=r=n.size)?(o.content=Buffer.alloc(0),e(o),Lo):i;throw"Expected headers frame after delivery"};function i(s){if(s.content){var a=s.content.length;if(0===(r-=a))return null!==n?(n.push(s.content),o.content=Buffer.concat(n)):o.content=s.content,e(o),Lo;if(r<0)throw ko("Too much content sent! Expected %d bytes",t);return null!==n?n.push(s.content):n=[s.content],i}throw"Expected content frame after headers"}}function Fo(e){_o.call(this,e),this.consumers=new Map}function jo(e,t,r){null!=r&&(e[t]=r)}No.allocate=function(){return this.ch=this.connection.freshChannel(this),this},No.sendImmediately=function(e,t){return this.connection.sendMethod(this.ch,e,t)},No.sendOrEnqueue=function(e,t,r){this.reply?this.pending.push({method:e,fields:t,reply:r}):(xo(0===this.pending.length),this.reply=r,this.sendImmediately(e,t))},No.sendMessage=function(e,t,r){return this.connection.sendMessage(this.ch,Eo.BasicPublish,e,Eo.BasicProperties,t,r)},No._rpc=function(e,t,r,n){var o=this;this.sendOrEnqueue(e,t,(function(t,i){if(null===t){if(i.id===r)return n(null,i);var s=Bo(r),a=new Error(ko("Expected %s; got %s",s,Co(i,!1)));return o.closeWithError(i.id,ko("Expected %s; got %s",s,Bo(i.id)),Eo.constants.UNEXPECTED_FRAME,a),n(a)}if(t instanceof Error)return n(t);var u=(t.fields.classId<<16)+t.fields.methodId,c=(a=e===u?ko("Operation failed: %s; %s",Bo(e),Io(t)):ko("Channel closed by server: %s",Io(t)),new Error(a));return c.code=t.fields.replyCode,c.classId=t.fields.classId,c.methodId=t.fields.methodId,n(c)}))},No.toClosed=function(e){this._rejectPending(),Ro(this,"Channel closed",e),this.accept=Ao("Channel closed",e),this.connection.releaseChannel(this.ch),this.emit("close")},No.toClosing=function(e,t){var r=this.sendImmediately.bind(this);Ro(this,"Channel closing",e),this.accept=function(e){if(e.id===Eo.ChannelCloseOk){t&&t();var n=So("ChannelCloseOk frame received");this.toClosed(n)}else e.id===Eo.ChannelClose&&r(Eo.ChannelCloseOk,{})}},No._rejectPending=function(){function e(e){e(new Error("Channel ended, no reply will be forthcoming"))}var t;for(null!==this.reply&&e(this.reply),this.reply=null;t=this.pending.shift();)e(t.reply);this.pending=null},No.closeBecause=function(e,t,r){this.sendImmediately(Eo.ChannelClose,{replyText:e,replyCode:t,methodId:0,classId:0});var n=So("closeBecause called: "+e);this.toClosing(n,r)},No.closeWithError=function(e,t,r,n){var o=this;this.closeBecause(t,r,(function(){n.code=r,e&&(n.classId=Eo.info(e).classId,n.methodId=Eo.info(e).methodId),o.emit("error",n)}))},No.acceptMessageFrame=function(e){try{this.handleMessage=this.handleMessage(e)}catch(t){"string"==typeof t?this.closeWithError(e.id,t,Eo.constants.UNEXPECTED_FRAME,new Error(t)):t instanceof Error?this.closeWithError(e.id,"Error while processing message",Eo.constants.INTERNAL_ERROR,t):this.closeWithError(e.id,"Internal error while processing message",Eo.constants.INTERNAL_ERROR,new Error(t.toString()))}},No.handleConfirm=function(e,t){var r=t.deliveryTag;if(t.multiple){var n=this.unconfirmed.splice(0,r-this.lwm+1);this.lwm=r+1,n.forEach(e)}else{var o;if(r===this.lwm)for(o=this.unconfirmed.shift(),this.lwm++;null===this.unconfirmed[0];)this.unconfirmed.shift(),this.lwm++;else o=this.unconfirmed[r-this.lwm],this.unconfirmed[r-this.lwm]=null;e(o)}},No.pushConfirmCallback=function(e){this.unconfirmed.push(e||!1)},No.accept=function(e){switch(e.id){case void 0:case Eo.BasicDeliver:case Eo.BasicReturn:case Eo.BasicProperties:return this.acceptMessageFrame(e);case Eo.BasicAck:return this.emit("ack",e.fields);case Eo.BasicNack:return this.emit("nack",e.fields);case Eo.BasicCancel:return this.emit("cancel",e.fields);case Eo.ChannelClose:if(this.reply){var t=this.reply;this.reply=null,t(e)}var r="Channel closed by server: "+Io(e);this.sendImmediately(Eo.ChannelCloseOk,{});var n=new Error(r);n.code=e.fields.replyCode,n.classId=e.fields.classId,n.methodId=e.fields.methodId,this.emit("error",n);var o=So(r);return void this.toClosed(o);case Eo.BasicFlow:return this.closeWithError(e.id,"Flow not implemented",Eo.constants.NOT_IMPLEMENTED,new Error("Flow not implemented"));default:t=this.reply;if(this.reply=null,this.pending.length>0){var i=this.pending.shift();this.reply=i.reply,this.sendImmediately(i.method,i.fields)}return t(null,e)}},No.onBufferDrain=function(){this.emit("drain")},To(Fo,_o),wo.BaseChannel=Fo,Fo.prototype.registerConsumer=function(e,t){this.consumers.set(e,t)},Fo.prototype.unregisterConsumer=function(e){this.consumers.delete(e)},Fo.prototype.dispatchMessage=function(e,t){var r=e.consumerTag,n=this.consumers.get(r);if(n)return n(t);throw new Error("Unknown consumer: "+r)},Fo.prototype.handleDelivery=function(e){return this.dispatchMessage(e.fields,e)},Fo.prototype.handleCancel=function(e){var t=this.dispatchMessage(e,null);return this.unregisterConsumer(e.consumerTag),t};var Po=Object.freeze({}),Do={assertQueue:function(e,t){e=e||"",t=t||Po;var r=Object.create(t.arguments||null);return jo(r,"x-expires",t.expires),jo(r,"x-message-ttl",t.messageTtl),jo(r,"x-dead-letter-exchange",t.deadLetterExchange),jo(r,"x-dead-letter-routing-key",t.deadLetterRoutingKey),jo(r,"x-max-length",t.maxLength),jo(r,"x-max-priority",t.maxPriority),jo(r,"x-overflow",t.overflow),jo(r,"x-queue-mode",t.queueMode),{queue:e,exclusive:!!t.exclusive,durable:void 0===t.durable||t.durable,autoDelete:!!t.autoDelete,arguments:r,passive:!1,ticket:0,nowait:!1}},checkQueue:function(e){return{queue:e,passive:!0,nowait:!1,durable:!0,autoDelete:!1,exclusive:!1,ticket:0}},deleteQueue:function(e,t){return{queue:e,ifUnused:!!(t=t||Po).ifUnused,ifEmpty:!!t.ifEmpty,ticket:0,nowait:!1}},purgeQueue:function(e){return{queue:e,ticket:0,nowait:!1}},bindQueue:function(e,t,r,n){return{queue:e,exchange:t,routingKey:r,arguments:n,ticket:0,nowait:!1}},unbindQueue:function(e,t,r,n){return{queue:e,exchange:t,routingKey:r,arguments:n,ticket:0,nowait:!1}},assertExchange:function(e,t,r){r=r||Po;var n=Object.create(r.arguments||null);return jo(n,"alternate-exchange",r.alternateExchange),{exchange:e,ticket:0,type:t,passive:!1,durable:void 0===r.durable||r.durable,autoDelete:!!r.autoDelete,internal:!!r.internal,nowait:!1,arguments:n}},checkExchange:function(e){return{exchange:e,passive:!0,nowait:!1,durable:!0,internal:!1,type:"",autoDelete:!1,ticket:0}},deleteExchange:function(e,t){return{exchange:e,ifUnused:!!(t=t||Po).ifUnused,ticket:0,nowait:!1}},bindExchange:function(e,t,r,n){return{source:t,destination:e,routingKey:r,arguments:n,ticket:0,nowait:!1}},unbindExchange:function(e,t,r,n){return{source:t,destination:e,routingKey:r,arguments:n,ticket:0,nowait:!1}},publish:function(e,t,r){function n(e){return void 0===e?void 0:Array.isArray(e)?e.map(String):[String(e)]}r=r||Po;var o,i=Object.create(r.headers||null);jo(i,"CC",n(r.CC)),jo(i,"BCC",n(r.BCC)),void 0!==r.persistent?o=r.persistent?2:1:"number"==typeof r.deliveryMode?o=r.deliveryMode:r.deliveryMode&&(o=2);var s=r.expiration;return void 0!==s&&(s=s.toString()),{exchange:e,routingKey:t,mandatory:!!r.mandatory,immediate:!1,ticket:void 0,contentType:r.contentType,contentEncoding:r.contentEncoding,headers:i,deliveryMode:o,priority:r.priority,correlationId:r.correlationId,replyTo:r.replyTo,expiration:s,messageId:r.messageId,timestamp:r.timestamp,type:r.type,userId:r.userId,appId:r.appId,clusterId:void 0}},consume:function(e,t){t=t||Po;var r=Object.create(t.arguments||null);return jo(r,"x-priority",t.priority),{ticket:0,queue:e,consumerTag:t.consumerTag||"",noLocal:!!t.noLocal,noAck:!!t.noAck,exclusive:!!t.exclusive,nowait:!1,arguments:r}},cancel:function(e){return{consumerTag:e,nowait:!1}},get:function(e,t){return{ticket:0,queue:e,noAck:!!(t=t||Po).noAck}},ack:function(e,t){return{deliveryTag:e,multiple:!!t}},nack:function(e,t,r){return{deliveryTag:e,multiple:!!t,requeue:void 0===r||r}},reject:function(e,t){return{deliveryTag:e,requeue:void 0===t||t}},prefetch:function(e,t){return{prefetchCount:e||0,prefetchSize:0,global:!!t}},recover:function(){return{requeue:!0}}},qo=Object.freeze(Do);const Ho=a,$o=r.promisify,zo=j,{BaseChannel:Ko}=wo,{acceptMessage:Vo}=wo,Go=qo,{inspect:Qo}=dn;class Wo extends Ko{constructor(e){super(e),this.on("delivery",this.handleDelivery.bind(this)),this.on("cancel",this.handleCancel.bind(this))}async rpc(e,t,r){return(await $o((n=>this._rpc(e,t,r,n)))()).fields}async open(){return(await this.allocate.bind(this)()).rpc(zo.ChannelOpen,{outOfBand:""},zo.ChannelOpenOk)}close(){return $o((e=>this.closeBecause("Goodbye",zo.constants.REPLY_SUCCESS,e)))()}assertQueue(e,t){return this.rpc(zo.QueueDeclare,Go.assertQueue(e,t),zo.QueueDeclareOk)}checkQueue(e){return this.rpc(zo.QueueDeclare,Go.checkQueue(e),zo.QueueDeclareOk)}deleteQueue(e,t){return this.rpc(zo.QueueDelete,Go.deleteQueue(e,t),zo.QueueDeleteOk)}purgeQueue(e){return this.rpc(zo.QueuePurge,Go.purgeQueue(e),zo.QueuePurgeOk)}bindQueue(e,t,r,n){return this.rpc(zo.QueueBind,Go.bindQueue(e,t,r,n),zo.QueueBindOk)}unbindQueue(e,t,r,n){return this.rpc(zo.QueueUnbind,Go.unbindQueue(e,t,r,n),zo.QueueUnbindOk)}assertExchange(e,t,r){return this.rpc(zo.ExchangeDeclare,Go.assertExchange(e,t,r),zo.ExchangeDeclareOk).then((t=>({exchange:e})))}checkExchange(e){return this.rpc(zo.ExchangeDeclare,Go.checkExchange(e),zo.ExchangeDeclareOk)}deleteExchange(e,t){return this.rpc(zo.ExchangeDelete,Go.deleteExchange(e,t),zo.ExchangeDeleteOk)}bindExchange(e,t,r,n){return this.rpc(zo.ExchangeBind,Go.bindExchange(e,t,r,n),zo.ExchangeBindOk)}unbindExchange(e,t,r,n){return this.rpc(zo.ExchangeUnbind,Go.unbindExchange(e,t,r,n),zo.ExchangeUnbindOk)}publish(e,t,r,n){const o=Go.publish(e,t,n);return this.sendMessage(o,o,r)}sendToQueue(e,t,r){return this.publish("",e,t,r)}consume(e,t,r){const n=Go.consume(e,r);return new Promise(((e,r)=>{this._rpc(zo.BasicConsume,n,zo.BasicConsumeOk,((n,o)=>{if(n)return r(n);this.registerConsumer(o.fields.consumerTag,t),e(o.fields)}))}))}async cancel(e){await $o((t=>{this._rpc(zo.BasicCancel,Go.cancel(e),zo.BasicCancelOk,t)}))().then((t=>(this.unregisterConsumer(e),t.fields)))}get(e,t){const r=Go.get(e,t);return new Promise(((e,t)=>{this.sendOrEnqueue(zo.BasicGet,r,((r,n)=>{if(r)return t(r);if(n.id===zo.BasicGetEmpty)return e(!1);if(n.id===zo.BasicGetOk){const t=n.fields;this.handleMessage=Vo((r=>{r.fields=t,e(r)}))}else t(new Error(`Unexpected response to BasicGet: ${Qo(n)}`))}))}))}ack(e,t){this.sendImmediately(zo.BasicAck,Go.ack(e.fields.deliveryTag,t))}ackAll(){this.sendImmediately(zo.BasicAck,Go.ack(0,!0))}nack(e,t,r){this.sendImmediately(zo.BasicNack,Go.nack(e.fields.deliveryTag,t,r))}nackAll(e){this.sendImmediately(zo.BasicNack,Go.nack(0,!0,e))}reject(e,t){this.sendImmediately(zo.BasicReject,Go.reject(e.fields.deliveryTag,t))}recover(){return this.rpc(zo.BasicRecover,Go.recover(),zo.BasicRecoverOk)}qos(e,t){return this.rpc(zo.BasicQos,Go.prefetch(e,t),zo.BasicQosOk)}}Wo.prototype.prefetch=Wo.prototype.qos;class Yo extends Wo{publish(e,t,r,n,o){return this.pushConfirmCallback(o),Wo.prototype.publish.call(this,e,t,r,n)}sendToQueue(e,t,r,n){return this.publish("",e,t,r,n)}waitForConfirms(){const e=[],t=this.unconfirmed;if(t.forEach(((r,n)=>{if(null!==r){const o=new Promise(((e,o)=>{t[n]=t=>{r&&r(t),null===t?e():o(t)}}));e.push(o)}})),!this.pending)for(var r;r=this.unconfirmed.shift();)r&&r(new Error("channel closed"));return Promise.all(e)}}yo.ConfirmChannel=Yo,yo.Channel=Wo,yo.ChannelModel=class extends Ho{constructor(e){super(),this.connection=e,["error","close","blocked","unblocked"].forEach((t=>{e.on(t,this.emit.bind(this,t))}))}close(){return $o(this.connection.close.bind(this.connection))()}async createChannel(){const e=new Wo(this.connection);return await e.open(),e}async createConfirmChannel(){const e=new Yo(this.connection);return await e.open(),await e.rpc(zo.ConfirmSelect,{nowait:!1},zo.ConfirmSelectOk),e}};var Jo=m.connect,Xo=yo.ChannelModel,Zo=r.promisify;var ei,ti,ri,ni,oi,ii,si,ai,ui=function(e,t){return Zo((function(r){return Jo(e,t,r)}))().then((function(e){return new Xo(e)}))},ci={exports:{}};function li(){if(ni)return ri;ni=1;const e=ti?ei:(ti=1,ei={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const r of Object.keys(e))t[e[r]]=r;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};ri=r;for(const e of Object.keys(r)){if(!("channels"in r[e]))throw new Error("missing channels property: "+e);if(!("labels"in r[e]))throw new Error("missing channel labels property: "+e);if(r[e].labels.length!==r[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=r[e];delete r[e].channels,delete r[e].labels,Object.defineProperty(r[e],"channels",{value:t}),Object.defineProperty(r[e],"labels",{value:n})}function n(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return r.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),s=i-o;let a,u;i===o?a=0:t===i?a=(r-n)/s:r===i?a=2+(n-t)/s:n===i&&(a=4+(t-r)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(o+i)/2;return u=i===o?0:c<=.5?s/(i+o):s/(2-i-o),[a,100*u,100*c]},r.rgb.hsv=function(e){let t,r,n,o,i;const s=e[0]/255,a=e[1]/255,u=e[2]/255,c=Math.max(s,a,u),l=c-Math.min(s,a,u),f=function(e){return(c-e)/6/l+.5};return 0===l?(o=0,i=0):(i=l/c,t=f(s),r=f(a),n=f(u),s===c?o=n-r:a===c?o=1/3+t-n:u===c&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},r.rgb.hwb=function(e){const t=e[0],n=e[1];let o=e[2];const i=r.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(n,o));return o=1-1/255*Math.max(t,Math.max(n,o)),[i,100*s,100*o]},r.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n);return[100*((1-t-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*o]},r.rgb.keyword=function(r){const o=t[r];if(o)return o;let i,s=1/0;for(const t of Object.keys(e)){const o=n(r,e[t]);o<s&&(s=o,i=t)}return i},r.keyword.rgb=function(t){return e[t]},r.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},r.rgb.lab=function(e){const t=r.rgb.xyz(e);let n=t[0],o=t[1],i=t[2];n/=95.047,o/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(n-o),200*(o-i)]},r.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let o,i,s;if(0===r)return s=255*n,[s,s,s];o=n<.5?n*(1+r):n+r-n*r;const a=2*n-o,u=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(o-a)*i:2*i<1?o:3*i<2?a+(o-a)*(2/3-i)*6:a,u[e]=255*s;return u},r.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,o=r;const i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;return[t,100*(0===n?2*o/(i+o):2*r/(n+r)),100*((n+r)/2)]},r.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),u=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,u,s];case 1:return[a,n,s];case 2:return[s,n,u];case 3:return[s,a,n];case 4:return[u,s,n];case 5:return[n,s,a]}},r.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01);let i,s;s=(2-r)*n;const a=(2-r)*o;return i=r*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,100*i,100*s]},r.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const o=r+n;let i;o>1&&(r/=o,n/=o);const s=Math.floor(6*t),a=1-n;i=6*t-s,0!=(1&s)&&(i=1-i);const u=r+i*(a-r);let c,l,f;switch(s){default:case 6:case 0:c=a,l=u,f=r;break;case 1:c=u,l=a,f=r;break;case 2:c=r,l=a,f=u;break;case 3:c=r,l=u,f=a;break;case 4:c=u,l=r,f=a;break;case 5:c=a,l=r,f=u}return[255*c,255*l,255*f]},r.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},r.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let o,i,s;return o=3.2406*t+-1.5372*r+-.4986*n,i=-.9689*t+1.8758*r+.0415*n,s=.0557*t+-.204*r+1.057*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[255*o,255*i,255*s]},r.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},r.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const o=r**3,i=t**3,s=n**3;return r=o>.008856?o:(r-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},r.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let o;o=360*Math.atan2(n,r)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(r*r+n*n),o]},r.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},r.rgb.ansi16=function(e,t=null){const[n,o,i]=e;let s=null===t?r.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(n/255));return 2===s&&(a+=60),a},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},r.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},r.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},r.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},r.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),s=o-i;let a,u;return a=s<1?i/(1-s):0,u=s<=0?0:o===t?(r-n)/s%6:o===r?2+(n-t)/s:4+(t-r)/s,u/=6,u%=1,[360*u,100*s,100*a]},r.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],100*n,100*o]},r.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},r.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const o=[0,0,0],i=t%1*6,s=i%1,a=1-s;let u=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return u=(1-r)*n,[255*(r*o[0]+u),255*(r*o[1]+u),255*(r*o[2]+u)]},r.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},r.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},r.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},r.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=function(e){return[0,0,e[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},ri}function fi(){if(ii)return oi;ii=1;const e=li();function t(t){const r=function(){const t={},r=Object.keys(e);for(let e=r.length,n=0;n<e;n++)t[r[n]]={distance:-1,parent:null};return t}(),n=[t];for(r[t].distance=0;n.length;){const t=n.pop(),o=Object.keys(e[t]);for(let e=o.length,i=0;i<e;i++){const e=o[i],s=r[e];-1===s.distance&&(s.distance=r[t].distance+1,s.parent=t,n.unshift(e))}}return r}function r(e,t){return function(r){return t(e(r))}}function n(t,n){const o=[n[t].parent,t];let i=e[n[t].parent][t],s=n[t].parent;for(;n[s].parent;)o.unshift(n[s].parent),i=r(e[n[s].parent][s],i),s=n[s].parent;return i.conversion=o,i}return oi=function(e){const r=t(e),o={},i=Object.keys(r);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==r[e].parent&&(o[e]=n(e,r))}return o}}function hi(){if(ai)return si;ai=1;const e=li(),t=fi(),r={};return Object.keys(e).forEach((n=>{r[n]={},Object.defineProperty(r[n],"channels",{value:e[n].channels}),Object.defineProperty(r[n],"labels",{value:e[n].labels});const o=t(n);Object.keys(o).forEach((e=>{const t=o[e];r[n][e]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(t),r[n][e].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),si=r}!function(e){const t=(e,t)=>(...r)=>`[${e(...r)+t}m`,r=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`},n=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`},o=e=>e,i=(e,t,r)=>[e,t,r],s=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let a;const u=(e,t,r,n)=>{void 0===a&&(a=hi());const o=n?10:0,i={};for(const[n,s]of Object.entries(a)){const a="ansi16"===n?"ansi":n;n===t?i[a]=e(r,o):"object"==typeof s&&(i[a]=e(s[t],o))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,r]of Object.entries(a)){for(const[t,n]of Object.entries(r))a[t]={open:`[${n[0]}m`,close:`[${n[1]}m`},r[t]=a[t],e.set(n[0],n[1]);Object.defineProperty(a,t,{value:r,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="",a.bgColor.close="",s(a.color,"ansi",(()=>u(t,"ansi16",o,!1))),s(a.color,"ansi256",(()=>u(r,"ansi256",o,!1))),s(a.color,"ansi16m",(()=>u(n,"rgb",i,!1))),s(a.bgColor,"ansi",(()=>u(t,"ansi16",o,!0))),s(a.bgColor,"ansi256",(()=>u(r,"ansi256",o,!0))),s(a.bgColor,"ansi16m",(()=>u(n,"rgb",i,!0))),a}})}(ci);var di,pi,gi={stringReplaceAll:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return e;const o=t.length;let i=0,s="";do{s+=e.substr(i,n-i)+t+r,i=n+o,n=e.indexOf(t,i)}while(-1!==n);return s+=e.substr(i),s},stringEncaseCRLFWithFirstIndex:(e,t,r,n)=>{let o=0,i="";do{const s="\r"===e[n-1];i+=e.substr(o,(s?n-1:n)-o)+t+(s?"\r\n":"\n")+r,o=n+1,n=e.indexOf("\n",o)}while(-1!==n);return i+=e.substr(o),i}};const mi=ci.exports,{stdout:bi,stderr:vi}=Dt,{stringReplaceAll:yi,stringEncaseCRLFWithFirstIndex:wi}=gi,{isArray:Ei}=Array,Ii=["ansi","ansi","ansi256","ansi16m"],Ci=Object.create(null);class Bi{constructor(e){return xi(e)}}const xi=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=bi?bi.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>Ai(t.template,...e),Object.setPrototypeOf(t,Ti.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Bi,t.template};function Ti(e){return xi(e)}for(const[e,t]of Object.entries(mi))Ci[e]={get(){const r=Si(this,Oi(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};Ci.visible={get(){const e=Si(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const Ui=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of Ui)Ci[e]={get(){const{level:t}=this;return function(...r){const n=Oi(mi.color[Ii[t]][e](...r),mi.color.close,this._styler);return Si(this,n,this._isEmpty)}}};for(const e of Ui){Ci["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const n=Oi(mi.bgColor[Ii[t]][e](...r),mi.bgColor.close,this._styler);return Si(this,n,this._isEmpty)}}}}const ki=Object.defineProperties((()=>{}),{...Ci,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),Oi=(e,t,r)=>{let n,o;return void 0===r?(n=e,o=t):(n=r.openAll+e,o=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:o,parent:r}},Si=(e,t,r)=>{const n=(...e)=>Ei(e[0])&&Ei(e[0].raw)?_i(n,Ai(n,...e)):_i(n,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(n,ki),n._generator=e,n._styler=t,n._isEmpty=r,n},_i=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:n,closeAll:o}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=yi(t,r.close,r.open),r=r.parent;const i=t.indexOf("\n");return-1!==i&&(t=wi(t,o,n,i)),n+t+o};let Ni;const Ai=(e,...t)=>{const[r]=t;if(!Ei(r)||!Ei(r.raw))return t.join(" ");const n=t.slice(1),o=[r.raw[0]];for(let e=1;e<r.length;e++)o.push(String(n[e-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[e]));return void 0===Ni&&(Ni=function(){if(pi)return di;pi=1;const e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,t=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function i(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function s(e,t){const o=[],s=t.trim().split(/\s*,\s*/g);let a;for(const t of s){const s=Number(t);if(Number.isNaN(s)){if(!(a=t.match(r)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);o.push(a[2].replace(n,((e,t,r)=>t?i(t):r)))}else o.push(s)}return o}function a(e){t.lastIndex=0;const r=[];let n;for(;null!==(n=t.exec(e));){const e=n[1];if(n[2]){const t=s(e,n[2]);r.push([e].concat(t))}else r.push([e])}return r}function u(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in n))throw new Error(`Unknown Chalk style: ${e}`);n=t.length>0?n[e](...t):n[e]}return n}return di=(t,r)=>{const n=[],o=[];let s=[];if(r.replace(e,((e,r,c,l,f,h)=>{if(r)s.push(i(r));else if(l){const e=s.join("");s=[],o.push(0===n.length?e:u(t,n)(e)),n.push({inverse:c,styles:a(l)})}else if(f){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");o.push(u(t,n)(s.join(""))),s=[],n.pop()}else s.push(h)})),o.push(s.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return o.join("")},di}()),Ni(e,o.join(""))};Object.defineProperties(Ti.prototype,Ci);const Ri=Ti();Ri.supportsColor=bi,Ri.stderr=Ti({level:vi?vi.level:0}),Ri.stderr.supportsColor=vi;var Li=Ri;class Mi extends Error{}class Fi extends Error{}let ji,Pi=!1;"object"!=typeof global.crypto&&(global.crypto={}),"function"!=typeof global.crypto.getRandomValues&&(global.crypto.getRandomValues=function(e){if(!(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8ClampedArray))throw new Mi("Expected an integer array");if(e.byteLength>65536)throw new Fi("Can only request a maximum of 65536 bytes");return void 0===global.nativeCallSyncHook?function(e){Pi||(console.warn("Using an insecure random number generator, this should only happen when running in a debugger without support for crypto.getRandomValues"),Pi=!0);for(let t,r=0;r<e.length;r++)0==(3&r)&&(t=4294967296*Math.random()),e[r]=t>>>((3&r)<<3)&255;return e}(e):e});const Di=new Uint8Array(16);function qi(){if(!ji&&(ji="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ji))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ji(Di)}const Hi=[];for(let e=0;e<256;++e)Hi.push((e+256).toString(16).slice(1));let $i,zi,Ki=0,Vi=0;function Gi(e,t,r){let n=t&&r||0;const o=t||new Array(16);let i=(e=e||{}).node||$i,s=void 0!==e.clockseq?e.clockseq:zi;if(null==i||null==s){const t=e.random||(e.rng||qi)();null==i&&(i=$i=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==s&&(s=zi=16383&(t[6]<<8|t[7]))}let a=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:Vi+1;const c=a-Ki+(u-Vi)/1e4;if(c<0&&void 0===e.clockseq&&(s=s+1&16383),(c<0||a>Ki)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Ki=a,Vi=u,zi=s,a+=122192928e5;const l=(1e4*(268435455&a)+u)%4294967296;o[n++]=l>>>24&255,o[n++]=l>>>16&255,o[n++]=l>>>8&255,o[n++]=255&l;const f=a/4294967296*1e4&268435455;o[n++]=f>>>8&255,o[n++]=255&f,o[n++]=f>>>24&15|16,o[n++]=f>>>16&255,o[n++]=s>>>8|128,o[n++]=255&s;for(let e=0;e<6;++e)o[n+e]=i[e];return t||function(e,t=0){return(Hi[e[t+0]]+Hi[e[t+1]]+Hi[e[t+2]]+Hi[e[t+3]]+"-"+Hi[e[t+4]]+Hi[e[t+5]]+"-"+Hi[e[t+6]]+Hi[e[t+7]]+"-"+Hi[e[t+8]]+Hi[e[t+9]]+"-"+Hi[e[t+10]]+Hi[e[t+11]]+Hi[e[t+12]]+Hi[e[t+13]]+Hi[e[t+14]]+Hi[e[t+15]]).toLowerCase()}(o)}const Qi=(e,t)=>({id:`ColaboFlow-msg:${Gi()}`,requestId:`ColaboFlow-request:${Gi()}`,sender:e,proxies:[],msgReplyChainIds:[],type:t});var Wi,Yi,Ji;!function(e){e.TASK_EXECUTE_REQUEST="TASK_EXECUTE_REQUEST",e.TASK_EXECUTE_PROGRESS="TASK_EXECUTE_PROGRESS",e.TASK_EXECUTE_RESPONSE="TASK_EXECUTE_RESPONSE",e.TASK_INSTANCES_REPORT__REQUEST="TASK_INSTANCES_REPORT__REQUEST",e.TASK_INSTANCES_REPORT__RESPONSE="TASK_INSTANCES_REPORT__RESPONSE",e.HEARTBEAT="HEARTBEAT"}(Wi||(Wi={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.PYTHON="PYTHON",e.NATIVE="NATIVE"}(Yi||(Yi={})),function(e){e.INITIALIZED="INITIALIZED"}(Ji||(Ji={}));const Xi=async e=>{process.title=`ColaboFlow.Go.Client-${e.clientName}`,e.appNameText=`[${Li.red.bold("Colabo")}${Li.blue.bold("Flow")}${Li.green.bold(".Go")}-${Li.green.yellow(e.clientName)}]`,console.log(`${e.appNameText} Connecting to the ColaboFlow service: ${Li.greenBright(e.amqpUrl)}`);try{e.connection=await ui(e.amqpUrl)}catch(t){return void console.error(`${e.appNameText} Error connecting to the "${Li.greenBright(e.amqpUrl)}" ColaboFlow service: ${t}`)}try{e.channel=await e.connection.createChannel()}catch(t){return void console.error(`${e.appNameText} Error creating the channel`)}},Zi=async(e,t,r)=>{const n=new Promise((async(n,o)=>{const i=`client-task_execute_response-${Gi()}`,s={...Qi(e.clientName,Wi.TASK_EXECUTE_REQUEST),replyTo:i,extension:{taskId:t,taskInput:r},msg:"run a ffmepg test task"};console.log(`${e.appNameText} Sending task request [queue: "${Li.blueBright(e.queueServiceOrchestrator)}"]: ${JSON.stringify(s)}`),await e.channel.sendToQueue(e.queueServiceOrchestrator,Buffer.from(JSON.stringify(s))),await e.channel.assertQueue(i,{exclusive:!0}),e.channel.consume(i,(function(e){let t;try{t=JSON.parse(e.content)}catch(t){return void console.error(`Error parsing the message: ${e.content}`)}const r=t.extension;n(r.taskOutput)}),{noAck:!0})}));return n},es=async e=>{const t=new Promise(((t,r)=>{setTimeout((async()=>{console.log(`${e.appNameText} Closing the ${Li.bold.italic("channel")} to the ColaboFlow service...`),await e.channel.close(),console.log(`${e.appNameText} Closing the ${Li.bold.italic("connection")} to the ColaboFlow service...`),await e.connection.close(),t(!0)}),500)}));return t};process.env.AMQP_URL,process.env.ORCHESTRATOR_QUEUE,process.env.HOST_HEARTBEAT_QUEUE,process.env.HOST_NODE_QUEUE,process.env.HOST_PYTHON_QUEUE;var ts,rs=new Uint8Array(16);function ns(){if(!ts&&!(ts="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ts(rs)}var os=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function is(e){return"string"==typeof e&&os.test(e)}for(var ss,as,us=[],cs=0;cs<256;++cs)us.push((cs+256).toString(16).substr(1));var ls,fs,hs,ds,ps,gs,ms,bs,vs,ys,ws,Es,Is,Cs,Bs,xs,Ts,Us,ks,Os=0,Ss=0;function _s(e,t,r){var n=t&&r||0,o=t||new Array(16),i=(e=e||{}).node||ss,s=void 0!==e.clockseq?e.clockseq:as;if(null==i||null==s){var a=e.random||(e.rng||ns)();null==i&&(i=ss=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==s&&(s=as=16383&(a[6]<<8|a[7]))}var u=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:Ss+1,l=u-Os+(c-Ss)/1e4;if(l<0&&void 0===e.clockseq&&(s=s+1&16383),(l<0||u>Os)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Os=u,Ss=c,as=s;var f=(1e4*(268435455&(u+=122192928e5))+c)%4294967296;o[n++]=f>>>24&255,o[n++]=f>>>16&255,o[n++]=f>>>8&255,o[n++]=255&f;var h=u/4294967296*1e4&268435455;o[n++]=h>>>8&255,o[n++]=255&h,o[n++]=h>>>24&15|16,o[n++]=h>>>16&255,o[n++]=s>>>8|128,o[n++]=255&s;for(var d=0;d<6;++d)o[n+d]=i[d];return t||function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(us[e[t+0]]+us[e[t+1]]+us[e[t+2]]+us[e[t+3]]+"-"+us[e[t+4]]+us[e[t+5]]+"-"+us[e[t+6]]+us[e[t+7]]+"-"+us[e[t+8]]+us[e[t+9]]+"-"+us[e[t+10]]+us[e[t+11]]+us[e[t+12]]+us[e[t+13]]+us[e[t+14]]+us[e[t+15]]).toLowerCase();if(!is(r))throw TypeError("Stringified UUID is invalid");return r}(o)}!function(e){e.UNKNOWN="UNKNOWN",e.LOCAL="LOCAL",e.STORE="STORE",e.LOCAL_TIER="LOCAL_TIER",e.REMOTE_TIER="REMOTE_TIER",e.INTERACTIVE="INTERACTIVE"}(ls||(ls={})),function(e){e.ISOMORPHIC="ISOMORPHIC",e.FRONTEND="FRONTEND",e.BACKEND="BACKEND"}(fs||(fs={})),function(e){e.WAITING="WAITING",e.RUNNING="RUNNING",e.FINISHED="FINISHED",e.FAILED_SYSTEM="FAILED.SYSTEM",e.FAILED_ENGINE="FAILED.ENGINE",e.FAILED_FLOW="FAILED.FLOW",e.FAILED_TASK="FAILED.TASK",e.FAILED_USER="FAILED.USER"}(hs||(hs={})),function(e){e.WAITING="WAITING",e.PASSED_THROUGH="PASSED_THROUGH",e.CONDITION_NOT_FULFILLED="CONDITION_NOT_FULFILLED"}(ds||(ds={})),function(e){e.WAITING="WAITING",e.PASSED_THROUGH="PASSED_THROUGH",e.CONDITION_NOT_FULFILLED="CONDITION_NOT_FULFILLED"}(ps||(ps={})),function(e){e.WAITING="WAITING",e.PASSED_THROUGH="PASSED_THROUGH",e.CONDITION_NOT_FULFILLED="CONDITION_NOT_FULFILLED"}(gs||(gs={})),function(e){e.JUST_ENTERED="JUST_ENTERED",e.INITIATED="INITIATED",e.RUNNING="RUNNING",e.FINISHED="FINISHED",e.RESULTS_STORING="RESULTS_STORING",e.RESULTS_STORED="RESULTS_STORED",e.LEAVING="LEAVING",e.LEFT="LEFT"}(ms||(ms={})),function(e){e.TICK="tick",e.MICRO_TICK="microTick",e.BREAKPOINT="breakpoint"}(bs||(bs={})),function(e){e.FULL="FULL",e.CONDENSED="CONDENSED",e.NO="NO"}(vs||(vs={})),function(e){e.TASK="TASK",e.EVENT="EVENT",e.GATEWAY="GATEWAY"}(ys||(ys={})),function(e){e.EVENT_START="event.start",e.EVENT_END="event.end"}(ws||(ws={})),function(e){e.IN="IN",e.OUT="OUT",e.INOUT="INOUT"}(Es||(Es={})),function(e){e.DEFAULT="colabo.flow:default",e.EVENT_START="colabo.flow:event.start",e.EVENT_END="colabo.flow:event.end"}(Is||(Is={})),function(e){e.REGULAR="TASK.REGULAR",e.LOOP="TASK.LOOP",e.MULTIPLE_PARALLEL="TASK.MULTIPLE_PARALLEL",e.MULTIPLE_SEQUENTIAL="TASK.MULTIPLE_SEQUENTIAL",e.COMPENSATION="TASK.COMPENSATION",e.COMPENSATION_LOOP="TASK.COMPENSATION_LOOP",e.SUBPROCESS="TASK.SUBPROCESS",e.SUBPROCESS_LOOP="TASK.SUBPROCESS_LOOP",e.SUBPROCESS_MULTIPLE_PARALLEL="TASK.SUBPROCESS_MULTIPLE_PARALLEL",e.SUBPROCESS_MULTIPLE_SEQUENTIAL="TASK.SUBPROCESS_MULTIPLE_SEQUENTIAL",e.SUBPROCESS_COMPENSATION="TASK.SUBPROCESS_COMPENSATION",e.SUBPROCESS_ADHOC="TASK.SUBPROCESS_ADHOC",e.SUBPROCESS_EVENT="TASK.SUBPROCESS_EVENT",e.TRANSACTION="TASK.TRANSACTION",e.CALL_ACTIVITY="TASK.CALL_ACTIVITY",e.BUSINESS_RULE="TASK.BUSINESS_RULE",e.MANUAL="TASK.MANUAL",e.RECEIVE="TASK.RECEIVE",e.SCRIPT="TASK.SCRIPT",e.SEND="TASK.SEND",e.SERVICE="TASK.SERVICE",e.USER="TASK.USER"}(Cs||(Cs={})),function(e){e.START="EVENT.START",e.INTERMEDIATE="EVENT.INTERMEDIATE",e.END="EVENT.END"}(Bs||(Bs={})),function(e){e.EXCLUSIVE="GATEWAY.EXCLUSIVE",e.EVENT_BASED="GATEWAY.EVENT_BASED",e.PARALLEL="GATEWAY.PARALLEL",e.PARALLEL_EVENT_BASED="GATEWAY.PARALLEL_EVENT_BASED ",e.INCLUSIVE="GATEWAY.INCLUSIVE",e.COMPLEX="GATEWAY.COMPLEX"}(xs||(xs={})),function(e){e.NOT_EXECUTED="NOT_EXECUTED",e.EXECUTED="EXECUTED",e.PAUSED="PAUSED",e.INTERRUPTED="INTERRUPTED",e.FAILED="FAILED",e.EXECUTOR_NOT_FOUND="EXECUTOR_NOT_FOUND"}(Ts||(Ts={})),function(e){e.UNKNOWN="UNKNOWN",e.RUNNING="RUNNING",e.EXECUTED="EXECUTED",e.PAUSED="PAUSED",e.INTERRUPTED="INTERRUPTED",e.FAILED="FAILED",e.EXECUTOR_NOT_FOUND="EXECUTOR_NOT_FOUND"}(Us||(Us={})),function(e){e.BACKEND="backend",e.FRONTEND_VANILLA="frontend_vanilla",e.FRONTEND_ANGULAR="frontend_angular"}(ks||(ks={})),ks.BACKEND;var Ns=function(e,t){return Ns=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Ns(e,t)};function As(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ns(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Rs(e){return"function"==typeof e}console.log("[NgLess::Injectable] declaring ... "),console.log("[NgLess::Injectable] declared ");var Ls=!1,Ms={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,Ls=e},get useDeprecatedSynchronousErrorHandling(){return Ls}};function Fs(e){setTimeout((function(){throw e}),0)}var js={closed:!0,next:function(e){},error:function(e){if(Ms.useDeprecatedSynchronousErrorHandling)throw e;Fs(e)},complete:function(){}},Ps=Array.isArray||function(e){return e&&"number"==typeof e.length};function Ds(e){return null!==e&&"object"==typeof e}var qs=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),Hs=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r=this,n=r._parentOrParents,o=r._ctorUnsubscribe,i=r._unsubscribe,s=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(null!==n)for(var a=0;a<n.length;++a)n[a].remove(this);if(Rs(i)){o&&(this._unsubscribe=void 0);try{i.call(this)}catch(e){t=e instanceof qs?$s(e.errors):[e]}}if(Ps(s)){a=-1;for(var u=s.length;++a<u;){var c=s[a];if(Ds(c))try{c.unsubscribe()}catch(e){t=t||[],e instanceof qs?t=t.concat($s(e.errors)):t.push(e)}}}if(t)throw new qs(t)}},e.prototype.add=function(t){var r=t;if(!t)return e.EMPTY;switch(typeof t){case"function":r=new e(t);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof e)){var n=r;(r=new e)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof e){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function $s(e){return e.reduce((function(e,t){return e.concat(t instanceof qs?t.errors:t)}),[])}var zs="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),Ks=function(e){function t(r,n,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=js;break;case 1:if(!r){i.destination=js;break}if("object"==typeof r){r instanceof t?(i.syncErrorThrowable=r.syncErrorThrowable,i.destination=r,r.add(i)):(i.syncErrorThrowable=!0,i.destination=new Vs(i,r));break}default:i.syncErrorThrowable=!0,i.destination=new Vs(i,r,n,o)}return i}return As(t,e),t.prototype[zs]=function(){return this},t.create=function(e,r,n){var o=new t(e,r,n);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(Hs),Vs=function(e){function t(t,r,n,o){var i,s=e.call(this)||this;s._parentSubscriber=t;var a=s;return Rs(r)?i=r:r&&(i=r.next,n=r.error,o=r.complete,r!==js&&(Rs((a=Object.create(r)).unsubscribe)&&s.add(a.unsubscribe.bind(a)),a.unsubscribe=s.unsubscribe.bind(s))),s._context=a,s._next=i,s._error=n,s._complete=o,s}return As(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;Ms.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=Ms.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):Fs(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;Fs(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var r=function(){return e._complete.call(e._context)};Ms.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),Ms.useDeprecatedSynchronousErrorHandling)throw e;Fs(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!Ms.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(t){return Ms.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(Fs(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(Ks);function Gs(e){for(;e;){var t=e,r=t.closed,n=t.destination,o=t.isStopped;if(r||o)return!1;e=n&&n instanceof Ks?n:null}return!0}var Qs="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ws(e){return e}function Ys(e){return 0===e.length?Ws:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Js=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this.operator,o=function(e,t,r){if(e){if(e instanceof Ks)return e;if(e[zs])return e[zs]()}return e||t||r?new Ks(e,t,r):new Ks(js)}(e,t,r);if(n?o.add(n.call(o,this.source)):o.add(this.source||Ms.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),Ms.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){Ms.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Gs(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=Xs(t))((function(t,n){var o;o=r.subscribe((function(t){try{e(t)}catch(e){n(e),o&&o.unsubscribe()}}),n,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[Qs]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:Ys(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Xs(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function Xs(e){if(e||(e=Ms.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var Zs=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),ea=function(e){function t(t,r){var n=e.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return As(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var r=t.indexOf(this.subscriber);-1!==r&&t.splice(r,1)}}},t}(Hs),ta=function(e){function t(t){var r=e.call(this,t)||this;return r.destination=t,r}return As(t,e),t}(Ks),ra=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return As(t,e),t.prototype[zs]=function(){return new ta(this)},t.prototype.lift=function(e){var t=new na(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new Zs;if(!this.isStopped)for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new Zs;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),o=0;o<r;o++)n[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new Zs;this.isStopped=!0;for(var e=this.observers,t=e.length,r=e.slice(),n=0;n<t;n++)r[n].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new Zs;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new Zs;return this.hasError?(e.error(this.thrownError),Hs.EMPTY):this.isStopped?(e.complete(),Hs.EMPTY):(this.observers.push(e),new ea(this,e))},t.prototype.asObservable=function(){var e=new Js;return e.source=this,e},t.create=function(e,t){return new na(e,t)},t}(Js),na=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return As(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):Hs.EMPTY},t}(ra),oa=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var r=this.connectable;r._refCount++;var n=new ia(e,r),o=t.subscribe(n);return n.closed||(n.connection=r.connect()),o},e}(),ia=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return As(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var r=this.connection,n=e._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},t}(Ks),sa=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return As(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new Hs).add(this.source.subscribe(new aa(this.getSubject(),this))),e.closed&&(this._connection=null,e=Hs.EMPTY)),e},t.prototype.refCount=function(){return(e=this).lift(new oa(e));var e},t}(Js),aa=function(e){function t(t,r){var n=e.call(this,t)||this;return n.connectable=r,n}return As(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(ta),ua=function(e){function t(t,r,n){var o=e.call(this)||this;return o.key=t,o.groupSubject=r,o.refCountSubscription=n,o}return As(t,e),t.prototype._subscribe=function(e){var t=new Hs,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&t.add(new ca(r)),t.add(n.subscribe(e)),t},t}(Js),ca=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,t.count++,r}return As(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(Hs),la=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return As(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r&&!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Zs;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(ra),fa=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return As(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(n,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r=!1,n=void 0;try{this.work(e)}catch(e){r=!0,n=!!e&&e||new Error(e)}if(r)return this.unsubscribe(),n},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,r=t.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,r){return e.call(this)||this}return As(t,e),t.prototype.schedule=function(e,t){return this},t}(Hs)),ha=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return As(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):t.flush(this)},t}(fa),da=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}(),pa=function(e){function t(r,n){void 0===n&&(n=da.now);var o=e.call(this,r,(function(){return t.delegate&&t.delegate!==o?t.delegate.now():n()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return As(t,e),t.prototype.schedule=function(r,n,o){return void 0===n&&(n=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,n,o):e.prototype.schedule.call(this,r,n,o)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(da),ga=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return As(t,e),t}(pa))(ha),ma=ga,ba=new Js((function(e){return e.complete()}));function va(e){return e?function(e){return new Js((function(t){return e.schedule((function(){return t.complete()}))}))}(e):ba}function ya(e){return e&&"function"==typeof e.schedule}var wa,Ea=function(e){return function(t){for(var r=0,n=e.length;r<n&&!t.closed;r++)t.next(e[r]);t.complete()}};function Ia(e,t){return new Js((function(r){var n=new Hs,o=0;return n.add(t.schedule((function(){o!==e.length?(r.next(e[o++]),r.closed||n.add(this.schedule())):r.complete()}))),n}))}function Ca(e,t){return t?Ia(e,t):new Js(Ea(e))}function Ba(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return ya(r)?(e.pop(),Ia(e,r)):Ca(e)}function xa(e,t){return new Js(t?function(r){return t.schedule(Ta,0,{error:e,subscriber:r})}:function(t){return t.error(e)})}function Ta(e){var t=e.error;e.subscriber.error(t)}wa||(wa={});var Ua=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,r){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},e.prototype.accept=function(e,t,r){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){switch(this.kind){case"N":return Ba(this.value);case"E":return xa(this.error);case"C":return va()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}(),ka=function(e){function t(t,r,n){void 0===n&&(n=0);var o=e.call(this,t)||this;return o.scheduler=r,o.delay=n,o}return As(t,e),t.dispatch=function(e){var t=e.notification,r=e.destination;t.observe(r),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new Oa(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(Ua.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(Ua.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(Ua.createComplete()),this.unsubscribe()},t}(Ks),Oa=function(e,t){this.notification=e,this.destination=t},Sa=function(e){function t(t,r,n){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var o=e.call(this)||this;return o.scheduler=n,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return As(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new _a(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=n.length;if(this.closed)throw new Zs;if(this.isStopped||this.hasError?t=Hs.EMPTY:(this.observers.push(e),t=new ea(this,e)),o&&e.add(e=new ka(e,o)),r)for(var s=0;s<i&&!e.closed;s++)e.next(n[s]);else for(s=0;s<i&&!e.closed;s++)e.next(n[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||ma).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,r=this._windowTime,n=this._events,o=n.length,i=0;i<o&&!(e-n[i].time<r);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&n.splice(0,i),n},t}(ra),_a=function(e,t){this.time=e,this.value=t},Na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return As(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),Hs.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),Hs.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(ra),Aa=1,Ra=Promise.resolve(),La={};function Ma(e){return e in La&&(delete La[e],!0)}var Fa=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return As(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=function(e){var t=Aa++;return La[t]=!0,Ra.then((function(){return Ma(t)&&e()})),t}(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(function(e){Ma(e)}(r),t.scheduled=void 0)},t}(fa),ja=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return As(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(pa))(Fa),Pa=ja,Da=new pa(fa),qa=Da,Ha=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return As(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))},t.prototype.recycleAsyncId=function(t,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);0===t.actions.length&&(cancelAnimationFrame(r),t.scheduled=void 0)},t}(fa),$a=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return As(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,n=-1,o=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++n<o&&(e=r.shift()));if(this.active=!1,t){for(;++n<o&&(e=r.shift());)e.unsubscribe();throw t}},t}(pa))(Ha),za=$a,Ka=function(e){function t(t,r){void 0===t&&(t=Va),void 0===r&&(r=Number.POSITIVE_INFINITY);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return As(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(pa),Va=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var o=e.call(this,t,r)||this;return o.scheduler=t,o.work=r,o.index=n,o.active=!0,o.index=t.index=n,o}return As(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var o=new t(this.scheduler,this.work);return this.add(o),o.schedule(r,n)},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var o=e.actions;return o.push(this),o.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,r){},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(fa);function Ga(){}var Qa=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),Wa=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}(),Ya=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}();function Ja(e,t){return function(r){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new Xa(e,t))}}var Xa=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Za(e,this.project,this.thisArg))},e}(),Za=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return As(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(Ks);function eu(e){var t=this,r=e.args,n=e.subscriber,o=e.params,i=o.callbackFunc,s=o.context,a=o.scheduler,u=o.subject;if(!u){u=o.subject=new Na;try{i.apply(s,r.concat([function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.length<=1?e[0]:e;t.add(a.schedule(tu,0,{value:n,subject:u}))}]))}catch(e){u.error(e)}}this.add(u.subscribe(n))}function tu(e){var t=e.value,r=e.subject;r.next(t),r.complete()}function ru(e){var t=this,r=e.params,n=e.subscriber,o=e.context,i=r.callbackFunc,s=r.args,a=r.scheduler,u=r.subject;if(!u){u=r.subject=new Na;try{i.apply(o,s.concat([function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.shift();if(n)t.add(a.schedule(ou,0,{err:n,subject:u}));else{var o=e.length<=1?e[0]:e;t.add(a.schedule(nu,0,{value:o,subject:u}))}}]))}catch(e){this.add(a.schedule(ou,0,{err:e,subject:u}))}}this.add(u.subscribe(n))}function nu(e){var t=e.value,r=e.subject;r.next(t),r.complete()}function ou(e){var t=e.err;e.subject.error(t)}var iu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return As(t,e),t.prototype.notifyNext=function(e,t,r,n,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(Ks),su=function(e){function t(t,r,n){var o=e.call(this)||this;return o.parent=t,o.outerValue=r,o.outerIndex=n,o.index=0,o}return As(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(Ks),au="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",uu=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function cu(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var lu=function(e){if(e&&"function"==typeof e[Qs])return n=e,function(e){var t=n[Qs]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(uu(e))return Ea(e);if(cu(e))return r=e,function(e){return r.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,Fs),e};if(e&&"function"==typeof e[au])return t=e,function(e){for(var r=t[au]();;){var n=void 0;try{n=r.next()}catch(t){return e.error(t),e}if(n.done){e.complete();break}if(e.next(n.value),e.closed)break}return"function"==typeof r.return&&e.add((function(){r.return&&r.return()})),e};var t,r,n,o=Ds(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function fu(e,t,r,n,o){if(void 0===o&&(o=new su(e,r,n)),!o.closed)return t instanceof Js?t.subscribe(o):lu(t)(o)}var hu={},du=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new pu(e,this.resultSelector))},e}(),pu=function(e){function t(t,r){var n=e.call(this,t)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return As(t,e),t.prototype._next=function(e){this.values.push(hu),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var r=0;r<t;r++){var n=e[r];this.add(fu(this,n,void 0,r))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,r){var n=this.values,o=n[r],i=this.toRespond?o===hu?--this.toRespond:this.toRespond:0;n[r]=t,0===i&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(iu);function gu(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[Qs]}(e))return function(e,t){return new Js((function(r){var n=new Hs;return n.add(t.schedule((function(){var o=e[Qs]();n.add(o.subscribe({next:function(e){n.add(t.schedule((function(){return r.next(e)})))},error:function(e){n.add(t.schedule((function(){return r.error(e)})))},complete:function(){n.add(t.schedule((function(){return r.complete()})))}}))}))),n}))}(e,t);if(cu(e))return function(e,t){return new Js((function(r){var n=new Hs;return n.add(t.schedule((function(){return e.then((function(e){n.add(t.schedule((function(){r.next(e),n.add(t.schedule((function(){return r.complete()})))})))}),(function(e){n.add(t.schedule((function(){return r.error(e)})))}))}))),n}))}(e,t);if(uu(e))return Ia(e,t);if(function(e){return e&&"function"==typeof e[au]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new Js((function(r){var n,o=new Hs;return o.add((function(){n&&"function"==typeof n.return&&n.return()})),o.add(t.schedule((function(){n=e[au](),o.add(t.schedule((function(){if(!r.closed){var e,t;try{var o=n.next();e=o.value,t=o.done}catch(e){return void r.error(e)}t?r.complete():(r.next(e),this.schedule())}})))}))),o}))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}function mu(e,t){return t?gu(e,t):e instanceof Js?e:new Js(lu(e))}var bu=function(e){function t(t){var r=e.call(this)||this;return r.parent=t,r}return As(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(Ks),vu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return As(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(Ks);function yu(e,t){if(!t.closed){if(e instanceof Js)return e.subscribe(t);var r;try{r=lu(e)(t)}catch(e){t.error(e)}return r}}function wu(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?function(n){return n.pipe(wu((function(r,n){return mu(e(r,n)).pipe(Ja((function(e,o){return t(r,e,n,o)})))}),r))}:("number"==typeof t&&(r=t),function(t){return t.lift(new Eu(e,r))})}var Eu=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new Iu(e,this.project,this.concurrent))},e}(),Iu=function(e){function t(t,r,n){void 0===n&&(n=Number.POSITIVE_INFINITY);var o=e.call(this,t)||this;return o.project=r,o.concurrent=n,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return As(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.project(e,r)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new bu(this),r=this.destination;r.add(t);var n=yu(e,t);n!==t&&r.add(n)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(vu);function Cu(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),wu(Ws,e)}function Bu(){return Cu(1)}function xu(e){return new Js((function(t){var r;try{r=e()}catch(e){return void t.error(e)}return(r?mu(r):va()).subscribe(t)}))}function Tu(e,t){return new Js((function(r){var n=e.length;if(0!==n)for(var o=new Array(n),i=0,s=0,a=function(a){var u=mu(e[a]),c=!1;r.add(u.subscribe({next:function(e){c||(c=!0,s++),o[a]=e},error:function(e){return r.error(e)},complete:function(){++i!==n&&c||(s===n&&r.next(t?t.reduce((function(e,t,r){return e[t]=o[r],e}),{}):o),r.complete())}}))},u=0;u<n;u++)a(u);else r.complete()}))}function Uu(e,t,r,n,o){var i;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var s=e;e.addEventListener(t,r,o),i=function(){return s.removeEventListener(t,r,o)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var a=e;e.on(t,r),i=function(){return a.off(t,r)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var u=e;e.addListener(t,r),i=function(){return u.removeListener(t,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var c=0,l=e.length;c<l;c++)Uu(e[c],t,r,n,o)}n.add(i)}function ku(e){var t=e.subscriber,r=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(e){return void t.error(e)}else e.needIterate=!0;if(r){var n=void 0;try{n=r(e.state)}catch(e){return void t.error(e)}if(!n)return void t.complete();if(t.closed)return}var o;try{o=e.resultSelector(e.state)}catch(e){return void t.error(e)}if(!t.closed&&(t.next(o),!t.closed))return this.schedule(e)}}function Ou(e){return!Ps(e)&&e-parseFloat(e)+1>=0}function Su(e){var t=e.subscriber,r=e.counter,n=e.period;t.next(r),this.schedule({subscriber:t,counter:r+1,period:n},n)}var _u=new Js(Ga);function Nu(e){var t=e.keys,r=e.index,n=e.subscriber,o=e.subscription,i=e.obj;if(!n.closed)if(r<t.length){var s=t[r];n.next([s,i[s]]),o.add(this.schedule({keys:t,index:r+1,subscriber:n,subscription:o,obj:i}))}else n.complete()}function Au(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function Ru(e,t){return function(r){return r.lift(new Lu(e,t))}}var Lu=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Mu(e,this.predicate,this.thisArg))},e}(),Mu=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return As(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(Ks),Fu=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new ju(e))},e}(),ju=function(e){function t(t){var r=e.call(this,t)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return As(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var r=0;r<t&&!this.hasFirst;r++){var n=fu(this,e[r],void 0,r);this.subscriptions&&this.subscriptions.push(n),this.add(n)}this.observables=null}},t.prototype.notifyNext=function(e,t,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var o=this.subscriptions[n];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(iu);function Pu(e){var t=e.start,r=e.index,n=e.count,o=e.subscriber;r>=n?o.complete():(o.next(t),o.closed||(e.index=r+1,e.start=t+1,this.schedule(e)))}function Du(e){var t=e.index,r=e.period,n=e.subscriber;if(n.next(t),!n.closed){if(-1===r)return n.complete();e.index=t+1,this.schedule(e,r)}}var qu=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new Hu(e,this.resultSelector))},e}(),Hu=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.resultSelector=r,o.iterators=[],o.active=0,o.resultSelector="function"==typeof r?r:void 0,o}return As(t,e),t.prototype._next=function(e){var t=this.iterators;Ps(e)?t.push(new zu(e)):"function"==typeof e[au]?t.push(new $u(e[au]())):t.push(new Ku(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0!==t){this.active=t;for(var r=0;r<t;r++){var n=e[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}}else this.destination.complete()},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,r=this.destination,n=0;n<t;n++)if("function"==typeof(s=e[n]).hasValue&&!s.hasValue())return;var o=!1,i=[];for(n=0;n<t;n++){var s,a=(s=e[n]).next();if(s.hasCompleted()&&(o=!0),a.done)return void r.complete();i.push(a.value)}this.resultSelector?this._tryresultSelector(i):r.next(i),o&&r.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(Ks),$u=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return Boolean(e&&e.done)},e}(),zu=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[au]=function(){return this},e.prototype.next=function(e){var t=this.index++,r=this.array;return t<this.length?{value:r[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),Ku=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.parent=r,o.observable=n,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return As(t,e),t.prototype[au]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return yu(this.observable,new bu(this))},t}(vu),Vu=Object.freeze({__proto__:null,Observable:Js,ConnectableObservable:sa,GroupedObservable:ua,observable:Qs,Subject:ra,BehaviorSubject:la,ReplaySubject:Sa,AsyncSubject:Na,asap:Pa,asapScheduler:ja,async:qa,asyncScheduler:Da,queue:ma,queueScheduler:ga,animationFrame:za,animationFrameScheduler:$a,VirtualTimeScheduler:Ka,VirtualAction:Va,Scheduler:da,Subscription:Hs,Subscriber:Ks,Notification:Ua,get NotificationKind(){return wa},pipe:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ys(e)},noop:Ga,identity:Ws,isObservable:function(e){return!!e&&(e instanceof Js||"function"==typeof e.lift&&"function"==typeof e.subscribe)},ArgumentOutOfRangeError:Qa,EmptyError:Wa,ObjectUnsubscribedError:Zs,UnsubscriptionError:qs,TimeoutError:Ya,bindCallback:function e(t,r,n){if(r){if(!ya(r))return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return e(t,n).apply(void 0,o).pipe(Ja((function(e){return Ps(e)?r.apply(void 0,e):r(e)})))};n=r}return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o,i=this,s={context:i,subject:o,callbackFunc:t,scheduler:n};return new Js((function(r){if(n){var a={args:e,subscriber:r,params:s};return n.schedule(eu,0,a)}if(!o){o=new Na;try{t.apply(i,e.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o.next(e.length<=1?e[0]:e),o.complete()}]))}catch(e){Gs(o)?o.error(e):console.warn(e)}}return o.subscribe(r)}))}},bindNodeCallback:function e(t,r,n){if(r){if(!ya(r))return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return e(t,n).apply(void 0,o).pipe(Ja((function(e){return Ps(e)?r.apply(void 0,e):r(e)})))};n=r}return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new Js((function(r){var i=o.context,s=o.subject;if(n)return n.schedule(ru,0,{params:o,subscriber:r,context:i});if(!s){s=o.subject=new Na;try{t.apply(i,e.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.shift();r?s.error(r):(s.next(e.length<=1?e[0]:e),s.complete())}]))}catch(e){Gs(s)?s.error(e):console.warn(e)}}return s.subscribe(r)}))}},combineLatest:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=void 0,n=void 0;return ya(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(r=e.pop()),1===e.length&&Ps(e[0])&&(e=e[0]),Ca(e,n).lift(new du(r))},concat:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Bu()(Ba.apply(void 0,e))},defer:xu,empty:va,forkJoin:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){var r=e[0];if(Ps(r))return Tu(r,null);if(Ds(r)&&Object.getPrototypeOf(r)===Object.prototype){var n=Object.keys(r);return Tu(n.map((function(e){return r[e]})),n)}}if("function"==typeof e[e.length-1]){var o=e.pop();return Tu(e=1===e.length&&Ps(e[0])?e[0]:e,null).pipe(Ja((function(e){return o.apply(void 0,e)})))}return Tu(e,null)},from:mu,fromEvent:function e(t,r,n,o){return Rs(n)&&(o=n,n=void 0),o?e(t,r,n).pipe(Ja((function(e){return Ps(e)?o.apply(void 0,e):o(e)}))):new Js((function(e){Uu(t,r,(function(t){arguments.length>1?e.next(Array.prototype.slice.call(arguments)):e.next(t)}),e,n)}))},fromEventPattern:function e(t,r,n){return n?e(t,r).pipe(Ja((function(e){return Ps(e)?n.apply(void 0,e):n(e)}))):new Js((function(e){var n,o=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)};try{n=t(o)}catch(t){return void e.error(t)}if(Rs(r))return function(){return r(o,n)}}))},generate:function(e,t,r,n,o){var i,s;if(1==arguments.length){var a=e;s=a.initialState,t=a.condition,r=a.iterate,i=a.resultSelector||Ws,o=a.scheduler}else void 0===n||ya(n)?(s=e,i=Ws,o=n):(s=e,i=n);return new Js((function(e){var n=s;if(o)return o.schedule(ku,0,{subscriber:e,iterate:r,condition:t,resultSelector:i,state:n});for(;;){if(t){var a=void 0;try{a=t(n)}catch(t){return void e.error(t)}if(!a){e.complete();break}}var u=void 0;try{u=i(n)}catch(t){return void e.error(t)}if(e.next(u),e.closed)break;try{n=r(n)}catch(t){return void e.error(t)}}}))},iif:function(e,t,r){return void 0===t&&(t=ba),void 0===r&&(r=ba),xu((function(){return e()?t:r}))},interval:function(e,t){return void 0===e&&(e=0),void 0===t&&(t=qa),(!Ou(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=qa),new Js((function(r){return r.add(t.schedule(Su,e,{subscriber:r,counter:0,period:e})),r}))},merge:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Number.POSITIVE_INFINITY,n=null,o=e[e.length-1];return ya(o)?(n=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof o&&(r=e.pop()),null===n&&1===e.length&&e[0]instanceof Js?e[0]:Cu(r)(Ca(e,n))},never:function(){return _u},of:Ba,onErrorResumeNext:function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(0===t.length)return ba;var n=t[0],o=t.slice(1);return 1===t.length&&Ps(n)?e.apply(void 0,n):new Js((function(t){var r=function(){return t.add(e.apply(void 0,o).subscribe(t))};return mu(n).subscribe({next:function(e){t.next(e)},error:r,complete:r})}))},pairs:function(e,t){return new Js(t?function(r){var n=Object.keys(e),o=new Hs;return o.add(t.schedule(Nu,0,{keys:n,index:0,subscriber:r,subscription:o,obj:e})),o}:function(t){for(var r=Object.keys(e),n=0;n<r.length&&!t.closed;n++){var o=r[n];e.hasOwnProperty(o)&&t.next([o,e[o]])}t.complete()})},partition:function(e,t,r){return[Ru(t,r)(new Js(lu(e))),Ru(Au(t,r))(new Js(lu(e)))]},race:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!Ps(e[0]))return e[0];e=e[0]}return Ca(e,void 0).lift(new Fu)},range:function(e,t,r){return void 0===e&&(e=0),new Js((function(n){void 0===t&&(t=e,e=0);var o=0,i=e;if(r)return r.schedule(Pu,0,{index:o,count:t,start:e,subscriber:n});for(;;){if(o++>=t){n.complete();break}if(n.next(i++),n.closed)break}}))},throwError:xa,timer:function(e,t,r){void 0===e&&(e=0);var n=-1;return Ou(t)?n=Number(t)<1?1:Number(t):ya(t)&&(r=t),ya(r)||(r=qa),new Js((function(t){var o=Ou(e)?e:+e-r.now();return r.schedule(Du,o,{index:0,period:n,subscriber:t})}))},using:function(e,t){return new Js((function(r){var n,o;try{n=e()}catch(e){return void r.error(e)}try{o=t(n)}catch(e){return void r.error(e)}var i=(o?mu(o):ba).subscribe(r);return function(){i.unsubscribe(),n&&n.unsubscribe()}}))},zip:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[e.length-1];return"function"==typeof r&&e.pop(),Ca(e,void 0).lift(new qu(r))},scheduled:gu,EMPTY:ba,NEVER:_u,config:Ms});let Gu=class{addNotification(e){}};Gu=function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}([(console.log("[NgLess::Injectable] factory created"),function(e){console.log("[NgLess::Injectable::factory] class decorated: ",e.name)})],Gu),function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._tapNext=Ga,i._tapError=Ga,i._tapComplete=Ga,i._tapError=n||Ga,i._tapComplete=o||Ga,Rs(r)?(i._context=i,i._tapNext=r):r&&(i._context=r,i._tapNext=r.next||Ga,i._tapError=r.error||Ga,i._tapComplete=r.complete||Ga),i}As(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}(Ks);var Qu="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Wu={},Yu={exports:{}},Ju={exports:{}},Xu=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},Zu=Xu,ec=Object.prototype.toString;function tc(e){return"[object Array]"===ec.call(e)}function rc(e){return void 0===e}function nc(e){return null!==e&&"object"==typeof e}function oc(e){return"[object Function]"===ec.call(e)}function ic(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),tc(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var sc={isArray:tc,isArrayBuffer:function(e){return"[object ArrayBuffer]"===ec.call(e)},isBuffer:function(e){return null!==e&&!rc(e)&&null!==e.constructor&&!rc(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:nc,isUndefined:rc,isDate:function(e){return"[object Date]"===ec.call(e)},isFile:function(e){return"[object File]"===ec.call(e)},isBlob:function(e){return"[object Blob]"===ec.call(e)},isFunction:oc,isStream:function(e){return nc(e)&&oc(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:ic,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)ic(arguments[n],r);return t},deepMerge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]="object"==typeof r?e({},r):r}for(var n=0,o=arguments.length;n<o;n++)ic(arguments[n],r);return t},extend:function(e,t,r){return ic(t,(function(t,n){e[n]=r&&"function"==typeof t?Zu(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}},ac=sc;function uc(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var cc=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(ac.isURLSearchParams(t))n=t.toString();else{var o=[];ac.forEach(t,(function(e,t){null!=e&&(ac.isArray(e)?t+="[]":e=[e],ac.forEach(e,(function(e){ac.isDate(e)?e=e.toISOString():ac.isObject(e)&&(e=JSON.stringify(e)),o.push(uc(t)+"="+uc(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},lc=sc;function fc(){this.handlers=[]}fc.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},fc.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},fc.prototype.forEach=function(e){lc.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var hc,dc,pc=fc,gc=sc;function mc(){return dc?hc:(dc=1,hc=function(e){return!(!e||!e.__CANCEL__)})}var bc,vc,yc,wc,Ec,Ic,Cc,Bc,xc,Tc,Uc,kc,Oc,Sc,_c,Nc,Ac,Rc,Lc,Mc,Fc=sc;function jc(){return vc||(vc=1,bc=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}),bc}function Pc(){if(wc)return yc;wc=1;var e=jc();return yc=function(t,r,n,o,i){var s=new Error(t);return e(s,r,n,o,i)},yc}function Dc(){if(Ic)return Ec;Ic=1;var e=Pc();return Ec=function(t,r,n){var o=n.config.validateStatus;!o||o(n.status)?t(n):r(e("Request failed with status code "+n.status,n.config,null,n.request,n))}}function qc(){if(kc)return Uc;kc=1;var e=Bc?Cc:(Bc=1,Cc=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}),t=Tc?xc:(Tc=1,xc=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e});return Uc=function(r,n){return r&&!e(n)?t(r,n):n}}var Hc,$c,zc,Kc,Vc={exports:{}},Gc={exports:{}},Qc={exports:{}},Wc={exports:{}};function Yc(){return zc||(zc=1,function(e,t){function r(e){var r;function o(){if(o.enabled){var e=o,n=+new Date,i=n-(r||n);e.diff=i,e.prev=r,e.curr=n,r=n;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;u++;var o=t.formatters[n];if("function"==typeof o){var i=s[u];r=o.call(e,i),s.splice(u,1),u--}return r})),t.formatArgs.call(e,s);var c=o.log||t.log||console.log.bind(console);c.apply(e,s)}}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),o.destroy=n,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function n(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=Wc.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var r;t.save(e),t.names=[],t.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(r=0;r<t.instances.length;r++){var i=t.instances[r];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=function(){if($c)return Hc;$c=1;var e=1e3,t=60*e,r=60*t,n=24*r;function o(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}return Hc=function(i,s){s=s||{};var a=typeof i;if("string"===a&&i.length>0)return function(o){if(!((o=String(o)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*n;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*t;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(i);if("number"===a&&!1===isNaN(i))return s.long?function(i){return o(i,n,"day")||o(i,r,"hour")||o(i,t,"minute")||o(i,e,"second")||i+" ms"}(i):function(o){return o>=n?Math.round(o/n)+"d":o>=r?Math.round(o/r)+"h":o>=t?Math.round(o/t)+"m":o>=e?Math.round(o/e)+"s":o+"ms"}(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))}}(),t.instances=[],t.names=[],t.skips=[],t.formatters={}}(0,Wc.exports)),Wc.exports}var Jc={exports:{}};const Xc=n,Zc=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)},el=process.env;let tl;function rl(e){const t=function(e){if(!1===tl)return 0;if(Zc("color=16m")||Zc("color=full")||Zc("color=truecolor"))return 3;if(Zc("color=256"))return 2;if(e&&!e.isTTY&&!0!==tl)return 0;const t=tl?1:0;if("win32"===process.platform){const e=Xc.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in el)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in el))||"codeship"===el.CI_NAME?1:t;if("TEAMCITY_VERSION"in el)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(el.TEAMCITY_VERSION)?1:0;if("truecolor"===el.COLORTERM)return 3;if("TERM_PROGRAM"in el){const e=parseInt((el.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(el.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(el.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(el.TERM)||"COLORTERM"in el?1:(el.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}Zc("no-color")||Zc("no-colors")||Zc("color=false")?tl=!1:(Zc("color")||Zc("colors")||Zc("color=true")||Zc("color=always"))&&(tl=!0),"FORCE_COLOR"in el&&(tl=0===el.FORCE_COLOR.length||0!==parseInt(el.FORCE_COLOR,10));var nl,ol,il,sl={supportsColor:rl,stdout:rl(process.stdout),stderr:rl(process.stderr)};function al(){if(il)return Vc.exports;il=1;var e=d,n=f,o=h,a=i,u=s.Writable,c=function(){return ol||(ol=1,e=Gc,"undefined"==typeof process||"renderer"===process.type?e.exports=(Kc||(Kc=1,function(e,t){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=Qc.exports=Yc()).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())}(0,Qc.exports)),Qc.exports):e.exports=(nl||(nl=1,function(e,n){var o=t,i=r;(n=Jc.exports=Yc()).init=function(e){e.inspectOpts={};for(var t=Object.keys(n.inspectOpts),r=0;r<t.length;r++)e.inspectOpts[t[r]]=n.inspectOpts[t[r]]},n.log=function(){return process.stderr.write(i.format.apply(i,arguments)+"\n")},n.formatArgs=function(e){var t=this.namespace;if(this.useColors){var r=this.color,o="[3"+(r<8?r:"8;5;"+r),i=" "+o+";1m"+t+" ";e[0]=i+e[0].split("\n").join("\n"+i),e.push(o+"m+"+n.humanize(this.diff)+"")}else e[0]=(n.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+t+" "+e[0]},n.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},n.load=s,n.useColors=function(){return"colors"in n.inspectOpts?Boolean(n.inspectOpts.colors):o.isatty(process.stderr.fd)},n.colors=[6,2,3,4,5,1];try{sl&&sl.level>=2&&(n.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}function s(){return process.env.DEBUG}n.inspectOpts=Object.keys(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),n.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},n.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)},n.enable(s())}(0,Jc.exports)),Jc.exports)),Gc.exports;var e}()("follow-redirects"),l={GET:!0,HEAD:!0,OPTIONS:!0,TRACE:!0},p=Object.create(null);function g(e,t){u.call(this),e.headers=e.headers||{},this._options=e,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e.host&&(e.hostname||(e.hostname=e.host),delete e.host),t&&this.on("response",t);var r=this;if(this._onNativeResponse=function(e){r._processResponse(e)},!e.pathname&&e.path){var n=e.path.indexOf("?");n<0?e.pathname=e.path:(e.pathname=e.path.substring(0,n),e.search=e.path.substring(n))}this._performRequest()}function m(t){var r={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach((function(o){var i=o+":",s=n[i]=t[o],u=r[o]=Object.create(s);u.request=function(t,o){return"string"==typeof t?(t=e.parse(t)).maxRedirects=r.maxRedirects:t=Object.assign({protocol:i,maxRedirects:r.maxRedirects,maxBodyLength:r.maxBodyLength},t),t.nativeProtocols=n,a.equal(t.protocol,i,"protocol mismatch"),c("options",t),new g(t,o)},u.get=function(e,t){var r=u.request(e,t);return r.end(),r}})),r}return["abort","aborted","error","socket","timeout"].forEach((function(e){p[e]=function(t){this._redirectable.emit(e,t)}})),g.prototype=Object.create(u.prototype),g.prototype.write=function(e,t,r){if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new Error("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new Error("Request body larger than maxBodyLength limit")),this.abort()):r&&r()},g.prototype.end=function(e,t,r){"function"==typeof e?(r=e,e=t=null):"function"==typeof t&&(r=t,t=null);var n=this._currentRequest;this.write(e||"",t,(function(){n.end(null,null,r)}))},g.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},g.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive","setTimeout"].forEach((function(e){g.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(g.prototype,e,{get:function(){return this._currentRequest[e]}})})),g.prototype._performRequest=function(){var t=this._options.protocol,r=this._options.nativeProtocols[t];if(r){if(this._options.agents){var n=t.substr(0,t.length-1);this._options.agent=this._options.agents[n]}var o=this._currentRequest=r.request(this._options,this._onNativeResponse);for(var i in this._currentUrl=e.format(this._options),o._redirectable=this,p)i&&o.on(i,p[i]);if(this._isRedirect){var s=0,a=this._requestBodyBuffers;!function e(){if(s<a.length){var t=a[s++];o.write(t.data,t.encoding,e)}else o.end()}()}}else this.emit("error",new Error("Unsupported protocol "+t))},g.prototype._processResponse=function(t){this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:t.statusCode});var r=t.headers.location;if(r&&!1!==this._options.followRedirects&&t.statusCode>=300&&t.statusCode<400){if(++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Error("Max redirects exceeded."));var n,o=this._options.headers;if(307!==t.statusCode&&!(this._options.method in l))for(n in this._options.method="GET",this._requestBodyBuffers=[],o)/^content-/i.test(n)&&delete o[n];if(!this._isRedirect)for(n in o)/^host$/i.test(n)&&delete o[n];var i=e.resolve(this._currentUrl,r);c("redirecting to",i),Object.assign(this._options,e.parse(i)),this._isRedirect=!0,this._performRequest(),t.destroy()}else t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[]},Vc.exports=m({http:n,https:o}),Vc.exports.wrap=m,Vc.exports}var ul,cl,ll={name:"axios",version:"0.19.2",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test && bundlesize",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://github.com/axios/axios",devDependencies:{bundlesize:"^0.17.0",coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^5.2.0",sinon:"^4.5.0",typescript:"^2.8.1","url-search-params":"^0.10.0",webpack:"^1.13.1","webpack-dev-server":"^1.14.1"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},typings:"./index.d.ts",dependencies:{"follow-redirects":"1.5.10"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]},fl=sc,hl=function(e,t){Fc.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},dl={"Content-Type":"application/x-www-form-urlencoded"};function pl(e,t){!fl.isUndefined(e)&&fl.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var gl,ml={adapter:("undefined"!=typeof XMLHttpRequest?gl=function(){if(Mc)return Lc;Mc=1;var e=sc,t=Dc(),r=cc,n=qc(),o=function(){if(Sc)return Oc;Sc=1;var e=sc,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Oc=function(r){var n,o,i,s={};return r?(e.forEach(r.split("\n"),(function(r){if(i=r.indexOf(":"),n=e.trim(r.substr(0,i)).toLowerCase(),o=e.trim(r.substr(i+1)),n){if(s[n]&&t.indexOf(n)>=0)return;s[n]="set-cookie"===n?(s[n]?s[n]:[]).concat([o]):s[n]?s[n]+", "+o:o}})),s):s},Oc}(),i=function(){if(Nc)return _c;Nc=1;var e=sc;return _c=e.isStandardBrowserEnv()?function(){var t,r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var t=e;return r&&(n.setAttribute("href",t),t=n.href),n.setAttribute("href",t),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(r){var n=e.isString(r)?o(r):r;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}}(),s=Pc();return Lc=function(a){return new Promise((function(u,c){var l=a.data,f=a.headers;e.isFormData(l)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(a.auth){var d=a.auth.username||"",p=a.auth.password||"";f.Authorization="Basic "+btoa(d+":"+p)}var g=n(a.baseURL,a.url);if(h.open(a.method.toUpperCase(),r(g,a.params,a.paramsSerializer),!0),h.timeout=a.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in h?o(h.getAllResponseHeaders()):null,r={data:a.responseType&&"text"!==a.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:e,config:a,request:h};t(u,c,r),h=null}},h.onabort=function(){h&&(c(s("Request aborted",a,"ECONNABORTED",h)),h=null)},h.onerror=function(){c(s("Network Error",a,null,h)),h=null},h.ontimeout=function(){var e="timeout of "+a.timeout+"ms exceeded";a.timeoutErrorMessage&&(e=a.timeoutErrorMessage),c(s(e,a,"ECONNABORTED",h)),h=null},e.isStandardBrowserEnv()){var m=function(){if(Rc)return Ac;Rc=1;var e=sc;return Ac=e.isStandardBrowserEnv()?{write:function(t,r,n,o,i,s){var a=[];a.push(t+"="+encodeURIComponent(r)),e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),e.isString(o)&&a.push("path="+o),e.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Ac}(),b=(a.withCredentials||i(g))&&a.xsrfCookieName?m.read(a.xsrfCookieName):void 0;b&&(f[a.xsrfHeaderName]=b)}if("setRequestHeader"in h&&e.forEach(f,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),e.isUndefined(a.withCredentials)||(h.withCredentials=!!a.withCredentials),a.responseType)try{h.responseType=a.responseType}catch(e){if("json"!==a.responseType)throw e}"function"==typeof a.onDownloadProgress&&h.addEventListener("progress",a.onDownloadProgress),"function"==typeof a.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",a.onUploadProgress),a.cancelToken&&a.cancelToken.promise.then((function(e){h&&(h.abort(),c(e),h=null)})),void 0===l&&(l=null),h.send(l)}))},Lc}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(gl=function(){if(cl)return ul;cl=1;var e=sc,t=Dc(),r=qc(),n=cc,o=f,i=h,s=al().http,a=al().https,u=d,c=p,l=ll,g=Pc(),m=jc(),b=/https:?/;return ul=function(f){return new Promise((function(h,d){var p=function(e){h(e)},v=function(e){d(e)},y=f.data,w=f.headers;if(w["User-Agent"]||w["user-agent"]||(w["User-Agent"]="axios/"+l.version),y&&!e.isStream(y)){if(Buffer.isBuffer(y));else if(e.isArrayBuffer(y))y=Buffer.from(new Uint8Array(y));else{if(!e.isString(y))return v(g("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",f));y=Buffer.from(y,"utf-8")}w["Content-Length"]=y.length}var E=void 0;f.auth&&(E=(f.auth.username||"")+":"+(f.auth.password||""));var I=r(f.baseURL,f.url),C=u.parse(I),B=C.protocol||"http:";if(!E&&C.auth){var x=C.auth.split(":");E=(x[0]||"")+":"+(x[1]||"")}E&&delete w.Authorization;var T=b.test(B),U=T?f.httpsAgent:f.httpAgent,k={path:n(C.path,f.params,f.paramsSerializer).replace(/^\?/,""),method:f.method.toUpperCase(),headers:w,agent:U,agents:{http:f.httpAgent,https:f.httpsAgent},auth:E};f.socketPath?k.socketPath=f.socketPath:(k.hostname=C.hostname,k.port=C.port);var O,S=f.proxy;if(!S&&!1!==S){var _=B.slice(0,-1)+"_proxy",N=process.env[_]||process.env[_.toUpperCase()];if(N){var A=u.parse(N),R=process.env.no_proxy||process.env.NO_PROXY,L=!0;if(R&&(L=!R.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||"."===e[0]&&C.hostname.substr(C.hostname.length-e.length)===e||C.hostname===e)}))),L&&(S={host:A.hostname,port:A.port},A.auth)){var M=A.auth.split(":");S.auth={username:M[0],password:M[1]}}}}if(S&&(k.hostname=S.host,k.host=S.host,k.headers.host=C.hostname+(C.port?":"+C.port:""),k.port=S.port,k.path=B+"//"+C.hostname+(C.port?":"+C.port:"")+k.path,S.auth)){var F=Buffer.from(S.auth.username+":"+S.auth.password,"utf8").toString("base64");k.headers["Proxy-Authorization"]="Basic "+F}var j=T&&(!S||b.test(S.protocol));f.transport?O=f.transport:0===f.maxRedirects?O=j?i:o:(f.maxRedirects&&(k.maxRedirects=f.maxRedirects),O=j?a:s),f.maxContentLength&&f.maxContentLength>-1&&(k.maxBodyLength=f.maxContentLength);var P=O.request(k,(function(e){if(!P.aborted){var r=e;switch(e.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=204===e.statusCode?r:r.pipe(c.createUnzip()),delete e.headers["content-encoding"]}var n=e.req||P,o={status:e.statusCode,statusText:e.statusMessage,headers:e.headers,config:f,request:n};if("stream"===f.responseType)o.data=r,t(p,v,o);else{var i=[];r.on("data",(function(e){i.push(e),f.maxContentLength>-1&&Buffer.concat(i).length>f.maxContentLength&&(r.destroy(),v(g("maxContentLength size of "+f.maxContentLength+" exceeded",f,null,n)))})),r.on("error",(function(e){P.aborted||v(m(e,f,null,n))})),r.on("end",(function(){var e=Buffer.concat(i);"arraybuffer"!==f.responseType&&(e=e.toString(f.responseEncoding)),o.data=e,t(p,v,o)}))}}}));P.on("error",(function(e){P.aborted||v(m(e,f,null,P))})),f.timeout&&P.setTimeout(f.timeout,(function(){P.abort(),v(g("timeout of "+f.timeout+"ms exceeded",f,"ECONNABORTED",P))})),f.cancelToken&&f.cancelToken.promise.then((function(e){P.aborted||(P.abort(),v(e))})),e.isStream(y)?y.on("error",(function(e){v(m(e,f,null,P))})).pipe(P):P.end(y)}))},ul}()),gl),transformRequest:[function(e,t){return hl(t,"Accept"),hl(t,"Content-Type"),fl.isFormData(e)||fl.isArrayBuffer(e)||fl.isBuffer(e)||fl.isStream(e)||fl.isFile(e)||fl.isBlob(e)?e:fl.isArrayBufferView(e)?e.buffer:fl.isURLSearchParams(e)?(pl(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):fl.isObject(e)?(pl(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};fl.forEach(["delete","get","head"],(function(e){ml.headers[e]={}})),fl.forEach(["post","put","patch"],(function(e){ml.headers[e]=fl.merge(dl)}));var bl=ml,vl=sc,yl=function(e,t,r){return gc.forEach(r,(function(r){e=r(e,t)})),e},wl=mc(),El=bl;function Il(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Cl,Bl,xl,Tl,Ul,kl,Ol=sc,Sl=function(e,t){t=t||{};var r={},n=["url","method","params","data"],o=["headers","auth","proxy"],i=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];Ol.forEach(n,(function(e){void 0!==t[e]&&(r[e]=t[e])})),Ol.forEach(o,(function(n){Ol.isObject(t[n])?r[n]=Ol.deepMerge(e[n],t[n]):void 0!==t[n]?r[n]=t[n]:Ol.isObject(e[n])?r[n]=Ol.deepMerge(e[n]):void 0!==e[n]&&(r[n]=e[n])})),Ol.forEach(i,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}));var s=n.concat(o).concat(i),a=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return Ol.forEach(a,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r},_l=sc,Nl=cc,Al=pc,Rl=function(e){return Il(e),e.headers=e.headers||{},e.data=yl(e.data,e.headers,e.transformRequest),e.headers=vl.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),vl.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||El.adapter)(e).then((function(t){return Il(e),t.data=yl(t.data,t.headers,e.transformResponse),t}),(function(t){return wl(t)||(Il(e),t&&t.response&&(t.response.data=yl(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Ll=Sl;function Ml(e){this.defaults=e,this.interceptors={request:new Al,response:new Al}}function Fl(){if(Bl)return Cl;function e(e){this.message=e}return Bl=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,Cl=e}Ml.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Ll(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[Rl,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},Ml.prototype.getUri=function(e){return e=Ll(this.defaults,e),Nl(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},_l.forEach(["delete","get","head","options"],(function(e){Ml.prototype[e]=function(t,r){return this.request(_l.merge(r||{},{method:e,url:t}))}})),_l.forEach(["post","put","patch"],(function(e){Ml.prototype[e]=function(t,r,n){return this.request(_l.merge(n||{},{method:e,url:t,data:r}))}}));var jl=sc,Pl=Xu,Dl=Ml,ql=Sl;function Hl(e){var t=new Dl(e),r=Pl(Dl.prototype.request,t);return jl.extend(r,Dl.prototype,t),jl.extend(r,t),r}var $l=Hl(bl);$l.Axios=Dl,$l.create=function(e){return Hl(ql($l.defaults,e))},$l.Cancel=Fl(),$l.CancelToken=function(){if(Tl)return xl;Tl=1;var e=Fl();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(e){r=e}));var n=this;t((function(t){n.reason||(n.reason=new e(t),r(n.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},xl=t}(),$l.isCancel=mc(),$l.all=function(e){return Promise.all(e)},$l.spread=kl?Ul:(kl=1,Ul=function(e){return function(t){return e.apply(null,t)}}),Ju.exports=$l,Ju.exports.default=$l,Yu.exports=Ju.exports;var zl={},Kl=function(e){var t=e.default;if("function"==typeof t){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}(Vu),Vl=Qu&&Qu.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(zl,"__esModule",{value:!0});var Gl=Kl,Ql=Yu.exports;zl.createObservable=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n,o=t[t.length-1];o=o?Vl({},o):{},t[t.length-1]=o;var i=!!o.cancelToken;i&&console.warn("No need to use cancel token, just unsubscribe the subscription would cancel the http request automatically");var s=new Gl.Observable((function(r){i||(n=Ql.default.CancelToken.source(),o.cancelToken=n.token),e.apply(void 0,t).then((function(e){r.next(e),r.complete()})).catch((function(e){return r.error(e)}))})),a=s.subscribe.bind(s);return s.subscribe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.apply(void 0,e),o=r.unsubscribe.bind(r);return r.unsubscribe=function(){n&&n.cancel(),o()},r},s},Object.defineProperty(Wu,"__esModule",{value:!0});var Wl=Yu.exports,Yl=zl,Jl=function(){function e(e){this.axiosInstance=e}return Object.defineProperty(e.prototype,"defaults",{get:function(){return this.axiosInstance.defaults},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interceptors",{get:function(){return this.axiosInstance.interceptors},enumerable:!0,configurable:!0}),e.request=function(e){return Yl.createObservable(Wl.default.request,e)},e.get=function(e,t){return Yl.createObservable(Wl.default.get,e,t)},e.post=function(e,t,r){return Yl.createObservable(Wl.default.post,e,t,r)},e.put=function(e,t,r){return Yl.createObservable(Wl.default.put,e,t,r)},e.patch=function(e,t,r){return Yl.createObservable(Wl.default.patch,e,t,r)},e.delete=function(e,t){return Yl.createObservable(Wl.default.delete,e,t)},e.head=function(e,t){return Yl.createObservable(Wl.default.head,e,t)},e.create=function(t){return new e(Wl.default.create(t))},e.prototype.request=function(e){return Yl.createObservable(this.axiosInstance.request,e)},e.prototype.get=function(e,t){return Yl.createObservable(this.axiosInstance.get,e,t)},e.prototype.head=function(e,t){return Yl.createObservable(this.axiosInstance.head,e,t)},e.prototype.post=function(e,t,r){return Yl.createObservable(this.axiosInstance.post,e,t,r)},e.prototype.put=function(e,t,r){return Yl.createObservable(this.axiosInstance.put,e,t,r)},e.prototype.patch=function(e,t,r){return Yl.createObservable(this.axiosInstance.patch,e,t,r)},e.prototype.delete=function(e,t){return Yl.createObservable(this.axiosInstance.delete,e,t)},e.defaults=Wl.default.defaults,e.interceptors=Wl.default.interceptors,e}();Wu.Axios=Jl,(Wu.default=Jl).interceptors.response.use((function(e){let t=e.data,r=t.indexOf("\r");const n=t.indexOf("\n");return(r<0||r+1==n)&&(r=n),t=t.substring(r+1),e.data=JSON.parse(t),e}),(function(e){return Promise.reject(e)}));var Xl={exports:{}},Zl=/[|\\{}()[\]^$+*?.]/g,ef=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(Zl,"\\$&")},tf={exports:{}},rf={exports:{}},nf={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},of={};for(var sf in nf)nf.hasOwnProperty(sf)&&(of[nf[sf]]=sf);var af=rf.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var uf in af)if(af.hasOwnProperty(uf)){if(!("channels"in af[uf]))throw new Error("missing channels property: "+uf);if(!("labels"in af[uf]))throw new Error("missing channel labels property: "+uf);if(af[uf].labels.length!==af[uf].channels)throw new Error("channel and label counts mismatch: "+uf);var cf=af[uf].channels,lf=af[uf].labels;delete af[uf].channels,delete af[uf].labels,Object.defineProperty(af[uf],"channels",{value:cf}),Object.defineProperty(af[uf],"labels",{value:lf})}af.rgb.hsl=function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.min(n,o,i),a=Math.max(n,o,i),u=a-s;return a===s?t=0:n===a?t=(o-i)/u:o===a?t=2+(i-n)/u:i===a&&(t=4+(n-o)/u),(t=Math.min(60*t,360))<0&&(t+=360),r=(s+a)/2,[t,100*(a===s?0:r<=.5?u/(a+s):u/(2-a-s)),100*r]},af.rgb.hsv=function(e){var t,r,n,o,i,s=e[0]/255,a=e[1]/255,u=e[2]/255,c=Math.max(s,a,u),l=c-Math.min(s,a,u),f=function(e){return(c-e)/6/l+.5};return 0===l?o=i=0:(i=l/c,t=f(s),r=f(a),n=f(u),s===c?o=n-r:a===c?o=1/3+t-n:u===c&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},af.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2];return[af.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(r,n))*100,100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},af.rgb.cmyk=function(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-o)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},af.rgb.keyword=function(e){var t=of[e];if(t)return t;var r,n,o,i=1/0;for(var s in nf)if(nf.hasOwnProperty(s)){var a=(n=e,o=nf[s],Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2)+Math.pow(n[2]-o[2],2));a<i&&(i=a,r=s)}return r},af.keyword.rgb=function(e){return nf[e]},af.rgb.xyz=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},af.rgb.lab=function(e){var t=af.rgb.xyz(e),r=t[0],n=t[1],o=t[2];return n/=100,o/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},af.hsl.rgb=function(e){var t,r,n,o,i,s=e[0]/360,a=e[1]/100,u=e[2]/100;if(0===a)return[i=255*u,i,i];t=2*u-(r=u<.5?u*(1+a):u+a-u*a),o=[0,0,0];for(var c=0;c<3;c++)(n=s+1/3*-(c-1))<0&&n++,n>1&&n--,i=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,o[c]=255*i;return o},af.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,o=r,i=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,o*=i<=1?i:2-i,[t,100*(0===n?2*o/(i+o):2*r/(n+r)),(n+r)/2*100]},af.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),u=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,u,s];case 1:return[a,n,s];case 2:return[s,n,u];case 3:return[s,a,n];case 4:return[u,s,n];case 5:return[n,s,a]}},af.hsv.hsl=function(e){var t,r,n,o=e[0],i=e[1]/100,s=e[2]/100,a=Math.max(s,.01);return n=(2-i)*s,r=i*a,[o,100*(r=(r/=(t=(2-i)*a)<=1?t:2-t)||0),100*(n/=2)]},af.hwb.rgb=function(e){var t,r,n,o,i,s,a,u=e[0]/360,c=e[1]/100,l=e[2]/100,f=c+l;switch(f>1&&(c/=f,l/=f),n=6*u-(t=Math.floor(6*u)),0!=(1&t)&&(n=1-n),o=c+n*((r=1-l)-c),t){default:case 6:case 0:i=r,s=o,a=c;break;case 1:i=o,s=r,a=c;break;case 2:i=c,s=r,a=o;break;case 3:i=c,s=o,a=r;break;case 4:i=o,s=c,a=r;break;case 5:i=r,s=c,a=o}return[255*i,255*s,255*a]},af.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},af.xyz.rgb=function(e){var t,r,n,o=e[0]/100,i=e[1]/100,s=e[2]/100;return r=-.9689*o+1.8758*i+.0415*s,n=.0557*o+-.204*i+1.057*s,t=(t=3.2406*o+-1.5372*i+-.4986*s)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},af.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},af.lab.xyz=function(e){var t,r,n,o=e[0];t=e[1]/500+(r=(o+16)/116),n=r-e[2]/200;var i=Math.pow(r,3),s=Math.pow(t,3),a=Math.pow(n,3);return r=i>.008856?i:(r-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,[t*=95.047,r*=100,n*=108.883]},af.lab.lch=function(e){var t,r=e[0],n=e[1],o=e[2];return(t=360*Math.atan2(o,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+o*o),t]},af.lch.lab=function(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]},af.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],o=1 in arguments?arguments[1]:af.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var i=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return 2===o&&(i+=60),i},af.hsv.ansi16=function(e){return af.rgb.ansi16(af.hsv.rgb(e),e[2])},af.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},af.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},af.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var r;return e-=16,[Math.floor(e/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255]},af.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},af.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];3===t[0].length&&(r=r.split("").map((function(e){return e+e})).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},af.rgb.hcg=function(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255,i=Math.max(Math.max(r,n),o),s=Math.min(Math.min(r,n),o),a=i-s;return t=a<=0?0:i===r?(n-o)/a%6:i===n?2+(o-r)/a:4+(r-n)/a+4,t/=6,[360*(t%=1),100*a,100*(a<1?s/(1-a):0)]},af.hsl.hcg=function(e){var t,r=e[1]/100,n=e[2]/100,o=0;return(t=n<.5?2*r*n:2*r*(1-n))<1&&(o=(n-.5*t)/(1-t)),[e[0],100*t,100*o]},af.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},af.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];var o,i=[0,0,0],s=t%1*6,a=s%1,u=1-a;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=u,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=u,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=u}return o=(1-r)*n,[255*(r*i[0]+o),255*(r*i[1]+o),255*(r*i[2]+o)]},af.hcg.hsv=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},af.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},af.hcg.hwb=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},af.hwb.hcg=function(e){var t=e[1]/100,r=1-e[2]/100,n=r-t,o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},af.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},af.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},af.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},af.gray.hsl=af.gray.hsv=function(e){return[0,0,e[0]]},af.gray.hwb=function(e){return[0,100,e[0]]},af.gray.cmyk=function(e){return[0,0,0,e[0]]},af.gray.lab=function(e){return[e[0],0,0]},af.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},af.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var ff=rf.exports;function hf(e,t){return function(r){return t(e(r))}}function df(e,t){for(var r=[t[e].parent,e],n=ff[t[e].parent][e],o=t[e].parent;t[o].parent;)r.unshift(t[o].parent),n=hf(ff[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}var pf=rf.exports,gf={};Object.keys(pf).forEach((function(e){gf[e]={},Object.defineProperty(gf[e],"channels",{value:pf[e].channels}),Object.defineProperty(gf[e],"labels",{value:pf[e].labels});var t=function(e){for(var t=function(e){var t=function(){for(var e={},t=Object.keys(ff),r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;)for(var n=r.pop(),o=Object.keys(ff[n]),i=o.length,s=0;s<i;s++){var a=o[s],u=t[a];-1===u.distance&&(u.distance=t[n].distance+1,u.parent=n,r.unshift(a))}return t}(e),r={},n=Object.keys(t),o=n.length,i=0;i<o;i++){var s=n[i];null!==t[s].parent&&(r[s]=df(s,t))}return r}(e);Object.keys(t).forEach((function(r){var n=t[r];gf[e][r]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var r=e(t);if("object"==typeof r)for(var n=r.length,o=0;o<n;o++)r[o]=Math.round(r[o]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(n),gf[e][r].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))}));var mf=gf;!function(e){const t=mf,r=(e,r)=>function(){const n=e.apply(t,arguments);return`[${n+r}m`},n=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};5;${n}m`},o=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};2;${n[0]};${n[1]};${n[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.grey=i.color.gray;for(const t of Object.keys(i)){const r=i[t];for(const t of Object.keys(r)){const n=r[t];i[t]={open:`[${n[0]}m`,close:`[${n[1]}m`},r[t]=i[t],e.set(n[0],n[1])}Object.defineProperty(i,t,{value:r,enumerable:!1}),Object.defineProperty(i,"codes",{value:e,enumerable:!1})}const s=e=>e,a=(e,t,r)=>[e,t,r];i.color.close="",i.bgColor.close="",i.color.ansi={ansi:r(s,0)},i.color.ansi256={ansi256:n(s,0)},i.color.ansi16m={rgb:o(a,0)},i.bgColor.ansi={ansi:r(s,10)},i.bgColor.ansi256={ansi256:n(s,10)},i.bgColor.ansi16m={rgb:o(a,10)};for(let e of Object.keys(t)){if("object"!=typeof t[e])continue;const s=t[e];"ansi16"===e&&(e="ansi"),"ansi16"in s&&(i.color.ansi[e]=r(s.ansi16,0),i.bgColor.ansi[e]=r(s.ansi16,10)),"ansi256"in s&&(i.color.ansi256[e]=n(s.ansi256,0),i.bgColor.ansi256[e]=n(s.ansi256,10)),"rgb"in s&&(i.color.ansi16m[e]=o(s.rgb,0),i.bgColor.ansi16m[e]=o(s.rgb,10))}return i}})}(tf);const bf=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,vf=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,yf=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,wf=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Ef=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function If(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):Ef.get(e)||e}function Cf(e,t){const r=[],n=t.trim().split(/\s*,\s*/g);let o;for(const t of n)if(isNaN(t)){if(!(o=t.match(yf)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(o[2].replace(wf,((e,t,r)=>t?If(t):r)))}else r.push(Number(t));return r}function Bf(e){vf.lastIndex=0;const t=[];let r;for(;null!==(r=vf.exec(e));){const e=r[1];if(r[2]){const n=Cf(e,r[2]);t.push([e].concat(n))}else t.push([e])}return t}function xf(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const e of Object.keys(r))if(Array.isArray(r[e])){if(!(e in n))throw new Error(`Unknown Chalk style: ${e}`);n=r[e].length>0?n[e].apply(n,r[e]):n[e]}return n}var Tf,Uf,kf,Of=(e,t)=>{const r=[],n=[];let o=[];if(t.replace(bf,((t,i,s,a,u,c)=>{if(i)o.push(If(i));else if(a){const t=o.join("");o=[],n.push(0===r.length?t:xf(e,r)(t)),r.push({inverse:s,styles:Bf(a)})}else if(u){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");n.push(xf(e,r)(o.join(""))),o=[],r.pop()}else o.push(c)})),n.push(o.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")};!function(e){const t=ef,r=tf.exports,n=sl.stdout,o=Of,i="win32"===process.platform&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),s=["ansi","ansi","ansi256","ansi16m"],a=new Set(["gray"]),u=Object.create(null);function c(e,t){t=t||{};const r=n?n.level:0;e.level=void 0===t.level?r:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function l(e){if(!this||!(this instanceof l)||this.template){const t={};return c(t,e),t.template=function(){const e=[].slice.call(arguments);return p.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,l.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=l,t.template}c(this,e)}i&&(r.blue.open="");for(const e of Object.keys(r))r[e].closeRe=new RegExp(t(r[e].close),"g"),u[e]={get(){const t=r[e];return h.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};u.visible={get(){return h.call(this,this._styles||[],!0,"visible")}},r.color.closeRe=new RegExp(t(r.color.close),"g");for(const e of Object.keys(r.color.ansi))a.has(e)||(u[e]={get(){const t=this.level;return function(){const n=r.color[s[t]][e].apply(null,arguments),o={open:n,close:r.color.close,closeRe:r.color.closeRe};return h.call(this,this._styles?this._styles.concat(o):[o],this._empty,e)}}});r.bgColor.closeRe=new RegExp(t(r.bgColor.close),"g");for(const e of Object.keys(r.bgColor.ansi))a.has(e)||(u["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const n=r.bgColor[s[t]][e].apply(null,arguments),o={open:n,close:r.bgColor.close,closeRe:r.bgColor.closeRe};return h.call(this,this._styles?this._styles.concat(o):[o],this._empty,e)}}});const f=Object.defineProperties((()=>{}),u);function h(e,t,r){const n=function(){return d.apply(n,arguments)};n._styles=e,n._empty=t;const o=this;return Object.defineProperty(n,"level",{enumerable:!0,get:()=>o.level,set(e){o.level=e}}),Object.defineProperty(n,"enabled",{enumerable:!0,get:()=>o.enabled,set(e){o.enabled=e}}),n.hasGrey=this.hasGrey||"gray"===r||"grey"===r,n.__proto__=f,n}function d(){const e=arguments,t=e.length;let n=String(arguments[0]);if(0===t)return"";if(t>1)for(let r=1;r<t;r++)n+=" "+e[r];if(!this.enabled||this.level<=0||!n)return this._empty?"":n;const o=r.dim.open;i&&this.hasGrey&&(r.dim.open="");for(const e of this._styles.slice().reverse())n=e.open+n.replace(e.closeRe,e.open)+e.close,n=n.replace(/\r?\n/g,`${e.close}$&${e.open}`);return r.dim.open=o,n}function p(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");const r=[].slice.call(arguments,2),n=[t.raw[0]];for(let e=1;e<t.length;e++)n.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(t.raw[e]));return o(e,n.join(""))}Object.defineProperties(l.prototype,u),e.exports=l(),e.exports.supportsColor=n,e.exports.default=e.exports}(Xl),function(e){e.MOVE="MOVE",e.DELETE="DELETE",e.ADD="ADD",e.CODE="CODE",e.DUPLICATE="DUPLICATE"}(Tf||(Tf={})),function(e){e.SOURCE="SOURCE",e.DESTINATION="DESTINATION"}(Uf||(Uf={})),function(e){e.ALL_PATHS_AT_ITERABLE_PART="ALL_PATHS_AT_ITERABLE_PART",e.ALL_PATHS_AT_NON_ITERABLE_PART="ALL_PATHS_AT_NON_ITERABLE_PART",e.NOT_ALL_PATHS_AT_ITERABLE_PART="NOT_ALL_PATHS_AT_ITERABLE_PART"}(kf||(kf={}));var Sf,_f,Nf,Af;ms.JUST_ENTERED,ms.INITIATED,ms.RUNNING,function(e){e.WAITING_TO_START="POSSIBLE_TO_STOP",e.POSSIBLE_TO_STOP="POSSIBLE_TO_STOP",e.UNFINISHED="UNFINISHED",e.FINISHED="FINISHED"}(Sf||(Sf={})),function(e){e.SEQUENTIAL="SEQUENTIAL",e.PARALLEL="PARALLEL"}(_f||(_f={})),function(e){e.NATIVE="NATIVE",e.USER="USER",e.DATATALKS="DATATALKS"}(Nf||(Nf={})),function(e){e.ADD="ADD",e.REMOVE="REMOVE"}(Af||(Af={})),console.log("Loading the `@colabo-flow/i-core` barrel");const Rf=Yi.JAVASCRIPT,Lf=e=>{process.title=`ColaboFlow.Go-${e.hostname}`,e.appNameText=`[${Li.red.bold("Colabo")}${Li.blue.bold("Flow")}${Li.green.bold(".Go")}-${Li.green.yellow(e.hostname)}]`},Mf=(e,t)=>{console.log(`${e.appNameText} Registering task executor, executor.id "${Li.greenBright(t.id)}"`),e.taskExecutorsAvailable[t.id]=t},Ff=(e,t)=>{e.tasksAvailable[t.id]=t,console.log(`${e.appNameText} Registered task with task.id "${Li.greenBright(t.id)}"`)};let jf=0;const Pf=async(e,t)=>{if(!e.chHostHeartbeat)return void console.error(`${e.appNameText} [sendHeartbeatToHost] Error: channel host.chHostHeartbeat is not existing`);const r=t.extension,n=r.taskId,o=r.taskInput,i=t.replyTo??e.queueHostHeartbeat,s=e.tasksAvailable[n];s||console.error(`${e.appNameText} [processColaboFlowMsg_TaskExecute] task is missing for the id: ${n}`),console.log(`${e.appNameText} [processColaboFlowMsg_TaskExecute] Executing id: ${Li.blueBright(n)}, task.description: ${s.description}`);const a=`taskId:lang-${Rf}:host-${e.hostname}:${Gi()}`,u=(e=>({id:`${e.id}:${_s()}`,originId:e.id,placeType:ys.TASK,status:hs.WAITING,tokenStatus:ms.JUST_ENTERED,initiatedTokenIdsPerPorts:{},executionInputReferences:{},executionOutputReferences:{},currentTokenIds:[]}))(s);if(u.id=a,e.taskInstances[n]=u,e.runningTaskInstancesInfos[n]={id:a,taskInstance:u},void 0===s.executorRef?.id)return void console.error(`Executor ID is not provided for the task: ${n}`);const c=((e,t)=>e.taskExecutorsAvailable[t])(e,s.executorRef?.id),l={...Qi(e.hostname,Wi.TASK_EXECUTE_PROGRESS),requestId:t.requestId,msgReplyChainIds:[t.id],extension:{taskInstanceId:a,status:Ji.INITIALIZED,progress:0},msg:`Returning task execution for the taskId: '${n}' over queue: '${i}'}`};console.log(`${e.appNameText} Sending PROGRESS to the task execution requester (service) [queue: "${Li.blueBright(i)}"]: ${JSON.stringify(l)}`),e.chHostHeartbeat.sendToQueue(i,Buffer.from(JSON.stringify(l)));const f=await(c.reference?.method(o));console.log(`${e.appNameText} [processColaboFlowMsg_TaskExecute] task executed. Result is: ${Li.blueBright(JSON.stringify(f,null,4))}`);const h={...Qi(e.hostname,Wi.TASK_EXECUTE_RESPONSE),requestId:t.requestId,msgReplyChainIds:[t.id],extension:{taskOutput:f},msg:`Returning task execution for the taskId: '${n}' over queue: '${i}'}`};console.log(`${e.appNameText} Sending RESPONSE to the task execution requester (service) [queue: "${Li.blueBright(i)}"]: ${JSON.stringify(h)}`),e.chHostHeartbeat.sendToQueue(i,Buffer.from(JSON.stringify(h)))},Df=async e=>{process.title=`ColaboFlow.Go-${e.hostname}`,Li.red.bold("Colabo"),Li.blue.bold("Flow"),Li.green.bold(".Go"),Li.green.yellow(e.hostname);const t=await(async e=>{let t;console.log(`${e.appNameText} Connecting to the server: ${Li.greenBright(e.amqpUrl)}`);try{return t=await ui(e.amqpUrl),t}catch(t){throw console.error(`Error connecting to the "${Li.greenBright(e.amqpUrl)}" server: ${t}`),t}})(e),r=await(async(e,t)=>{let r;console.log(`${e.appNameText} Opening the ${Li.bold.italic("node host")} channel as a listener (consumer): ${Li.greenBright(e.queueHost)}`);try{return r=await t.createChannel(),r}catch(t){throw console.error(`${e.appNameText} Error creating the "${Li.greenBright(e.queueHost)}" queue: ${t}`),t}})(e,t);await(async(e,t)=>{console.log(`${e.appNameText} Opening the ${Li.bold.italic("service heartbeat")} channel as a produced (emitter): ${Li.greenBright(e.queueHostHeartbeat)}`);try{return e.chHostHeartbeat=await t.createChannel(),e.chHostHeartbeat}catch(t){throw console.error(`${e.appNameText} Error creating the "${Li.greenBright(e.queueHostHeartbeat)}" queue: ${t}`),t}})(e,t),console.log(`${e.appNameText} Hosting tasks: "${Li.greenBright(Object.keys(e.tasksAvailable).toString())}"`),setInterval((()=>{(async e=>{if(!e.chHostHeartbeat)return void console.error(`${e.appNameText} [sendHeartbeatToHost] Error: channel host.chHostHeartbeat is not existing`);const t={...Qi(e.hostname,Wi.HEARTBEAT),extension:{id:jf++,queueHost:e.queueHost,language:Yi.JAVASCRIPT,taskIds:Object.keys(e.taskExecutorsAvailable)},msg:`node host with tasks: ${JSON.stringify(Object.keys(e.taskExecutorsAvailable))}`};e.chHostHeartbeat.sendToQueue(e.queueHostHeartbeat,Buffer.from(JSON.stringify(t)))})(e)}),3e3),console.log(`${e.appNameText} Listening on the queue: "${Li.blueBright(e.queueHost)}"`),await r.assertQueue(e.queueHost,{exclusive:!0}),console.log(`${e.appNameText} [*] Waiting for messages in %s. To exit press "${Li.blueBright("CTRL+C")}"`),r.consume(e.queueHost,(t=>{if(null!==t){let n;try{n=JSON.parse(t.content.toString()),console.log(`${e.appNameText} Received: "${Li.blueBright(JSON.stringify(n))}"`),console.log(`${e.appNameText} msgObj.sender: "${Li.blueBright(n.sender)}", msgObj.type: "${Li.blueBright(n.type)}, msgObj.msg: "${Li.blueBright(n.msg)}"`)}catch(e){return void console.error(`Error parsing the message: ${t.content}`)}switch(n.type){case Wi.TASK_EXECUTE_REQUEST:Pf(e,n);break;case Wi.TASK_INSTANCES_REPORT__REQUEST:((e,t)=>{if(!e.chHostHeartbeat)return void console.error(`${e.appNameText} [sendHeartbeatToHost] Error: channel host.chHostHeartbeat is not existing`);const r=t.extension,n=r.reportFinalizedTaskInstances,o=r.reportRunningTaskInstances;console.log(`${e.appNameText} [processColaboFlowMsg_TaskInstancesReport] Sending task instances report to the requester: ${Li.blueBright(t.sender)}`);const i={};o&&Object.assign(i,e.runningTaskInstancesInfos),n&&Object.assign(i,e.finalizedTaskInstancesInfos);const s={...Qi(e.hostname,Wi.TASK_INSTANCES_REPORT__RESPONSE),requestId:t.requestId,msgReplyChainIds:[t.id],extension:{tasksInstanceInfos:i},msg:`node host with tasks: ${JSON.stringify(Object.keys(e.taskExecutorsAvailable))}`},a=t.replyTo??e.queueHostHeartbeat;console.log(`${e.appNameText} Sending response to the task instances report [queue: "${Li.blueBright(a)}"]: ${JSON.stringify(s)}`),e.chHostHeartbeat.sendToQueue(a,Buffer.from(JSON.stringify(s)))})(e,n)}r.ack(t)}else console.log("${host.appNameText} Consumer cancelled by server")}))};console.log(`clientRun: ${Xi}`);export{Wi as EColaboFlowGoMsgType,Yi as EProgrammingLanguageSupported,Ji as ETaskExecute_Progress_Status,es as clientClose,Zi as clientExecuteTask,Xi as clientRun,Ff as hostRegisterTask,Mf as hostRegisterTaskExecutor,Df as hostRun,Lf as hostSetTitles};
8
8
  //# sourceMappingURL=index.js.map