@formant/data-sdk 0.0.102 → 0.0.103
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/data-sdk.umd.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
${Z(Y)}`),H}),k=Object(w.createLogger)({level:P.f});if(P.g&&k.add(new w.transports.Console({format:L,level:"debug"})),P.d&&k.add(new x(P.d,()=>Object.assign(Object.assign(Object.assign({},D),O),{level:"debug"}))),P.h){const g=c.resolve(i.tmpdir(),`silly-${P.a}.log`);k.debug("Logging silly logs to file",{filename:g}),k.add(new w.transports.File({filename:g,maxsize:1*o,maxFiles:10,format:w.format.combine((E="silly",Object(w.format)(U=>U.level===E&&U)()),L),level:"silly"}))}var E},function(e,t,r){r.d(t,"a",function(){return n});const n={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}},function(e,t){var r,n,o=e.exports={};function l(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(w){if(r===setTimeout)return setTimeout(w,0);if((r===l||!r)&&setTimeout)return r=setTimeout,setTimeout(w,0);try{return r(w,0)}catch{try{return r.call(null,w,0)}catch{return r.call(this,w,0)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:l}catch{r=l}try{n=typeof clearTimeout=="function"?clearTimeout:s}catch{n=s}})();var c,u=[],b=!1,A=-1;function _(){b&&c&&(b=!1,c.length?u=c.concat(u):A=-1,u.length&&v())}function v(){if(!b){var w=i(_);b=!0;for(var P=u.length;P;){for(c=u,u=[];++A<P;)c&&c[A].run();A=-1,P=u.length}c=null,b=!1,function(N){if(n===clearTimeout)return clearTimeout(N);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(N);try{n(N)}catch{try{return n.call(null,N)}catch{return n.call(this,N)}}}(w)}}function f(w,P){this.fun=w,this.array=P}function S(){}o.nextTick=function(w){var P=new Array(arguments.length-1);if(arguments.length>1)for(var N=1;N<arguments.length;N++)P[N-1]=arguments[N];u.push(new f(w,P)),u.length!==1||b||i(v)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=S,o.addListener=S,o.once=S,o.off=S,o.removeListener=S,o.removeAllListeners=S,o.emit=S,o.prependListener=S,o.prependOnceListener=S,o.listeners=function(w){return[]},o.binding=function(w){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(w){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:r(117)})},function(e,t,r){(function(n){var o=r(125),l=r(126),s=r(38);function i(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(y,j){if(i()<j)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(y=new Uint8Array(j)).__proto__=u.prototype:(y===null&&(y=new u(j)),y.length=j),y}function u(y,j,W){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(y,j,W);if(typeof y=="number"){if(typeof j=="string")throw new Error("If encoding is specified then the first argument must be a string");return _(this,y)}return b(this,y,j,W)}function b(y,j,W,ee){if(typeof j=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&j instanceof ArrayBuffer?function(X,ne,ie,he){if(ne.byteLength,ie<0||ne.byteLength<ie)throw new RangeError("'offset' is out of bounds");if(ne.byteLength<ie+(he||0))throw new RangeError("'length' is out of bounds");return ne=ie===void 0&&he===void 0?new Uint8Array(ne):he===void 0?new Uint8Array(ne,ie):new Uint8Array(ne,ie,he),u.TYPED_ARRAY_SUPPORT?(X=ne).__proto__=u.prototype:X=v(X,ne),X}(y,j,W,ee):typeof j=="string"?function(X,ne,ie){if(typeof ie=="string"&&ie!==""||(ie="utf8"),!u.isEncoding(ie))throw new TypeError('"encoding" must be a valid string encoding');var he=0|S(ne,ie),Se=(X=c(X,he)).write(ne,ie);return Se!==he&&(X=X.slice(0,Se)),X}(y,j,W):function(X,ne){if(u.isBuffer(ne)){var ie=0|f(ne.length);return(X=c(X,ie)).length===0||ne.copy(X,0,0,ie),X}if(ne){if(typeof ArrayBuffer!="undefined"&&ne.buffer instanceof ArrayBuffer||"length"in ne)return typeof ne.length!="number"||(he=ne.length)!=he?c(X,0):v(X,ne);if(ne.type==="Buffer"&&s(ne.data))return v(X,ne.data)}var he;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(y,j)}function A(y){if(typeof y!="number")throw new TypeError('"size" argument must be a number');if(y<0)throw new RangeError('"size" argument must not be negative')}function _(y,j){if(A(j),y=c(y,j<0?0:0|f(j)),!u.TYPED_ARRAY_SUPPORT)for(var W=0;W<j;++W)y[W]=0;return y}function v(y,j){var W=j.length<0?0:0|f(j.length);y=c(y,W);for(var ee=0;ee<W;ee+=1)y[ee]=255&j[ee];return y}function f(y){if(y>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|y}function S(y,j){if(u.isBuffer(y))return y.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(y)||y instanceof ArrayBuffer))return y.byteLength;typeof y!="string"&&(y=""+y);var W=y.length;if(W===0)return 0;for(var ee=!1;;)switch(j){case"ascii":case"latin1":case"binary":return W;case"utf8":case"utf-8":case void 0:return K(y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*W;case"hex":return W>>>1;case"base64":return H(y).length;default:if(ee)return K(y).length;j=(""+j).toLowerCase(),ee=!0}}function w(y,j,W){var ee=!1;if((j===void 0||j<0)&&(j=0),j>this.length||((W===void 0||W>this.length)&&(W=this.length),W<=0)||(W>>>=0)<=(j>>>=0))return"";for(y||(y="utf8");;)switch(y){case"hex":return F(this,j,W);case"utf8":case"utf-8":return C(this,j,W);case"ascii":return m(this,j,W);case"latin1":case"binary":return x(this,j,W);case"base64":return p(this,j,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,j,W);default:if(ee)throw new TypeError("Unknown encoding: "+y);y=(y+"").toLowerCase(),ee=!0}}function P(y,j,W){var ee=y[j];y[j]=y[W],y[W]=ee}function N(y,j,W,ee,X){if(y.length===0)return-1;if(typeof W=="string"?(ee=W,W=0):W>2147483647?W=2147483647:W<-2147483648&&(W=-2147483648),W=+W,isNaN(W)&&(W=X?0:y.length-1),W<0&&(W=y.length+W),W>=y.length){if(X)return-1;W=y.length-1}else if(W<0){if(!X)return-1;W=0}if(typeof j=="string"&&(j=u.from(j,ee)),u.isBuffer(j))return j.length===0?-1:T(y,j,W,ee,X);if(typeof j=="number")return j&=255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(y,j,W):Uint8Array.prototype.lastIndexOf.call(y,j,W):T(y,[j],W,ee,X);throw new TypeError("val must be string, number or Buffer")}function T(y,j,W,ee,X){var ne,ie=1,he=y.length,Se=j.length;if(ee!==void 0&&((ee=String(ee).toLowerCase())==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(y.length<2||j.length<2)return-1;ie=2,he/=2,Se/=2,W/=2}function we($,te){return ie===1?$[te]:$.readUInt16BE(te*ie)}if(X){var Ee=-1;for(ne=W;ne<he;ne++)if(we(y,ne)===we(j,Ee===-1?0:ne-Ee)){if(Ee===-1&&(Ee=ne),ne-Ee+1===Se)return Ee*ie}else Ee!==-1&&(ne-=ne-Ee),Ee=-1}else for(W+Se>he&&(W=he-Se),ne=W;ne>=0;ne--){for(var ye=!0,q=0;q<Se;q++)if(we(y,ne+q)!==we(j,q)){ye=!1;break}if(ye)return ne}return-1}function R(y,j,W,ee){W=Number(W)||0;var X=y.length-W;ee?(ee=Number(ee))>X&&(ee=X):ee=X;var ne=j.length;if(ne%2!=0)throw new TypeError("Invalid hex string");ee>ne/2&&(ee=ne/2);for(var ie=0;ie<ee;++ie){var he=parseInt(j.substr(2*ie,2),16);if(isNaN(he))return ie;y[W+ie]=he}return ie}function d(y,j,W,ee){return V(K(j,y.length-W),y,W,ee)}function I(y,j,W,ee){return V(function(X){for(var ne=[],ie=0;ie<X.length;++ie)ne.push(255&X.charCodeAt(ie));return ne}(j),y,W,ee)}function Q(y,j,W,ee){return I(y,j,W,ee)}function Z(y,j,W,ee){return V(H(j),y,W,ee)}function h(y,j,W,ee){return V(function(X,ne){for(var ie,he,Se,we=[],Ee=0;Ee<X.length&&!((ne-=2)<0);++Ee)ie=X.charCodeAt(Ee),he=ie>>8,Se=ie%256,we.push(Se),we.push(he);return we}(j,y.length-W),y,W,ee)}function p(y,j,W){return j===0&&W===y.length?o.fromByteArray(y):o.fromByteArray(y.slice(j,W))}function C(y,j,W){W=Math.min(y.length,W);for(var ee=[],X=j;X<W;){var ne,ie,he,Se,we=y[X],Ee=null,ye=we>239?4:we>223?3:we>191?2:1;if(X+ye<=W)switch(ye){case 1:we<128&&(Ee=we);break;case 2:(192&(ne=y[X+1]))==128&&(Se=(31&we)<<6|63&ne)>127&&(Ee=Se);break;case 3:ne=y[X+1],ie=y[X+2],(192&ne)==128&&(192&ie)==128&&(Se=(15&we)<<12|(63&ne)<<6|63&ie)>2047&&(Se<55296||Se>57343)&&(Ee=Se);break;case 4:ne=y[X+1],ie=y[X+2],he=y[X+3],(192&ne)==128&&(192&ie)==128&&(192&he)==128&&(Se=(15&we)<<18|(63&ne)<<12|(63&ie)<<6|63&he)>65535&&Se<1114112&&(Ee=Se)}Ee===null?(Ee=65533,ye=1):Ee>65535&&(Ee-=65536,ee.push(Ee>>>10&1023|55296),Ee=56320|1023&Ee),ee.push(Ee),X+=ye}return function(q){var $=q.length;if($<=4096)return String.fromCharCode.apply(String,q);for(var te="",ue=0;ue<$;)te+=String.fromCharCode.apply(String,q.slice(ue,ue+=4096));return te}(ee)}t.Buffer=u,t.SlowBuffer=function(y){return+y!=y&&(y=0),u.alloc(+y)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=n.TYPED_ARRAY_SUPPORT!==void 0?n.TYPED_ARRAY_SUPPORT:function(){try{var y=new Uint8Array(1);return y.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},y.foo()===42&&typeof y.subarray=="function"&&y.subarray(1,1).byteLength===0}catch{return!1}}(),t.kMaxLength=i(),u.poolSize=8192,u._augment=function(y){return y.__proto__=u.prototype,y},u.from=function(y,j,W){return b(null,y,j,W)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(y,j,W){return function(ee,X,ne,ie){return A(X),X<=0?c(ee,X):ne!==void 0?typeof ie=="string"?c(ee,X).fill(ne,ie):c(ee,X).fill(ne):c(ee,X)}(null,y,j,W)},u.allocUnsafe=function(y){return _(null,y)},u.allocUnsafeSlow=function(y){return _(null,y)},u.isBuffer=function(y){return!(y==null||!y._isBuffer)},u.compare=function(y,j){if(!u.isBuffer(y)||!u.isBuffer(j))throw new TypeError("Arguments must be Buffers");if(y===j)return 0;for(var W=y.length,ee=j.length,X=0,ne=Math.min(W,ee);X<ne;++X)if(y[X]!==j[X]){W=y[X],ee=j[X];break}return W<ee?-1:ee<W?1:0},u.isEncoding=function(y){switch(String(y).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(y,j){if(!s(y))throw new TypeError('"list" argument must be an Array of Buffers');if(y.length===0)return u.alloc(0);var W;if(j===void 0)for(j=0,W=0;W<y.length;++W)j+=y[W].length;var ee=u.allocUnsafe(j),X=0;for(W=0;W<y.length;++W){var ne=y[W];if(!u.isBuffer(ne))throw new TypeError('"list" argument must be an Array of Buffers');ne.copy(ee,X),X+=ne.length}return ee},u.byteLength=S,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var y=this.length;if(y%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var j=0;j<y;j+=2)P(this,j,j+1);return this},u.prototype.swap32=function(){var y=this.length;if(y%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var j=0;j<y;j+=4)P(this,j,j+3),P(this,j+1,j+2);return this},u.prototype.swap64=function(){var y=this.length;if(y%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var j=0;j<y;j+=8)P(this,j,j+7),P(this,j+1,j+6),P(this,j+2,j+5),P(this,j+3,j+4);return this},u.prototype.toString=function(){var y=0|this.length;return y===0?"":arguments.length===0?C(this,0,y):w.apply(this,arguments)},u.prototype.equals=function(y){if(!u.isBuffer(y))throw new TypeError("Argument must be a Buffer");return this===y||u.compare(this,y)===0},u.prototype.inspect=function(){var y="",j=t.INSPECT_MAX_BYTES;return this.length>0&&(y=this.toString("hex",0,j).match(/.{2}/g).join(" "),this.length>j&&(y+=" ... ")),"<Buffer "+y+">"},u.prototype.compare=function(y,j,W,ee,X){if(!u.isBuffer(y))throw new TypeError("Argument must be a Buffer");if(j===void 0&&(j=0),W===void 0&&(W=y?y.length:0),ee===void 0&&(ee=0),X===void 0&&(X=this.length),j<0||W>y.length||ee<0||X>this.length)throw new RangeError("out of range index");if(ee>=X&&j>=W)return 0;if(ee>=X)return-1;if(j>=W)return 1;if(this===y)return 0;for(var ne=(X>>>=0)-(ee>>>=0),ie=(W>>>=0)-(j>>>=0),he=Math.min(ne,ie),Se=this.slice(ee,X),we=y.slice(j,W),Ee=0;Ee<he;++Ee)if(Se[Ee]!==we[Ee]){ne=Se[Ee],ie=we[Ee];break}return ne<ie?-1:ie<ne?1:0},u.prototype.includes=function(y,j,W){return this.indexOf(y,j,W)!==-1},u.prototype.indexOf=function(y,j,W){return N(this,y,j,W,!0)},u.prototype.lastIndexOf=function(y,j,W){return N(this,y,j,W,!1)},u.prototype.write=function(y,j,W,ee){if(j===void 0)ee="utf8",W=this.length,j=0;else if(W===void 0&&typeof j=="string")ee=j,W=this.length,j=0;else{if(!isFinite(j))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");j|=0,isFinite(W)?(W|=0,ee===void 0&&(ee="utf8")):(ee=W,W=void 0)}var X=this.length-j;if((W===void 0||W>X)&&(W=X),y.length>0&&(W<0||j<0)||j>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");for(var ne=!1;;)switch(ee){case"hex":return R(this,y,j,W);case"utf8":case"utf-8":return d(this,y,j,W);case"ascii":return I(this,y,j,W);case"latin1":case"binary":return Q(this,y,j,W);case"base64":return Z(this,y,j,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h(this,y,j,W);default:if(ne)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),ne=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function m(y,j,W){var ee="";W=Math.min(y.length,W);for(var X=j;X<W;++X)ee+=String.fromCharCode(127&y[X]);return ee}function x(y,j,W){var ee="";W=Math.min(y.length,W);for(var X=j;X<W;++X)ee+=String.fromCharCode(y[X]);return ee}function F(y,j,W){var ee=y.length;(!j||j<0)&&(j=0),(!W||W<0||W>ee)&&(W=ee);for(var X="",ne=j;ne<W;++ne)X+=Y(y[ne]);return X}function D(y,j,W){for(var ee=y.slice(j,W),X="",ne=0;ne<ee.length;ne+=2)X+=String.fromCharCode(ee[ne]+256*ee[ne+1]);return X}function O(y,j,W){if(y%1!=0||y<0)throw new RangeError("offset is not uint");if(y+j>W)throw new RangeError("Trying to access beyond buffer length")}function L(y,j,W,ee,X,ne){if(!u.isBuffer(y))throw new TypeError('"buffer" argument must be a Buffer instance');if(j>X||j<ne)throw new RangeError('"value" argument is out of bounds');if(W+ee>y.length)throw new RangeError("Index out of range")}function k(y,j,W,ee){j<0&&(j=65535+j+1);for(var X=0,ne=Math.min(y.length-W,2);X<ne;++X)y[W+X]=(j&255<<8*(ee?X:1-X))>>>8*(ee?X:1-X)}function E(y,j,W,ee){j<0&&(j=4294967295+j+1);for(var X=0,ne=Math.min(y.length-W,4);X<ne;++X)y[W+X]=j>>>8*(ee?X:3-X)&255}function g(y,j,W,ee,X,ne){if(W+ee>y.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("Index out of range")}function U(y,j,W,ee,X){return X||g(y,0,W,4),l.write(y,j,W,ee,23,4),W+4}function B(y,j,W,ee,X){return X||g(y,0,W,8),l.write(y,j,W,ee,52,8),W+8}u.prototype.slice=function(y,j){var W,ee=this.length;if((y=~~y)<0?(y+=ee)<0&&(y=0):y>ee&&(y=ee),(j=j===void 0?ee:~~j)<0?(j+=ee)<0&&(j=0):j>ee&&(j=ee),j<y&&(j=y),u.TYPED_ARRAY_SUPPORT)(W=this.subarray(y,j)).__proto__=u.prototype;else{var X=j-y;W=new u(X,void 0);for(var ne=0;ne<X;++ne)W[ne]=this[ne+y]}return W},u.prototype.readUIntLE=function(y,j,W){y|=0,j|=0,W||O(y,j,this.length);for(var ee=this[y],X=1,ne=0;++ne<j&&(X*=256);)ee+=this[y+ne]*X;return ee},u.prototype.readUIntBE=function(y,j,W){y|=0,j|=0,W||O(y,j,this.length);for(var ee=this[y+--j],X=1;j>0&&(X*=256);)ee+=this[y+--j]*X;return ee},u.prototype.readUInt8=function(y,j){return j||O(y,1,this.length),this[y]},u.prototype.readUInt16LE=function(y,j){return j||O(y,2,this.length),this[y]|this[y+1]<<8},u.prototype.readUInt16BE=function(y,j){return j||O(y,2,this.length),this[y]<<8|this[y+1]},u.prototype.readUInt32LE=function(y,j){return j||O(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+16777216*this[y+3]},u.prototype.readUInt32BE=function(y,j){return j||O(y,4,this.length),16777216*this[y]+(this[y+1]<<16|this[y+2]<<8|this[y+3])},u.prototype.readIntLE=function(y,j,W){y|=0,j|=0,W||O(y,j,this.length);for(var ee=this[y],X=1,ne=0;++ne<j&&(X*=256);)ee+=this[y+ne]*X;return ee>=(X*=128)&&(ee-=Math.pow(2,8*j)),ee},u.prototype.readIntBE=function(y,j,W){y|=0,j|=0,W||O(y,j,this.length);for(var ee=j,X=1,ne=this[y+--ee];ee>0&&(X*=256);)ne+=this[y+--ee]*X;return ne>=(X*=128)&&(ne-=Math.pow(2,8*j)),ne},u.prototype.readInt8=function(y,j){return j||O(y,1,this.length),128&this[y]?-1*(255-this[y]+1):this[y]},u.prototype.readInt16LE=function(y,j){j||O(y,2,this.length);var W=this[y]|this[y+1]<<8;return 32768&W?4294901760|W:W},u.prototype.readInt16BE=function(y,j){j||O(y,2,this.length);var W=this[y+1]|this[y]<<8;return 32768&W?4294901760|W:W},u.prototype.readInt32LE=function(y,j){return j||O(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},u.prototype.readInt32BE=function(y,j){return j||O(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},u.prototype.readFloatLE=function(y,j){return j||O(y,4,this.length),l.read(this,y,!0,23,4)},u.prototype.readFloatBE=function(y,j){return j||O(y,4,this.length),l.read(this,y,!1,23,4)},u.prototype.readDoubleLE=function(y,j){return j||O(y,8,this.length),l.read(this,y,!0,52,8)},u.prototype.readDoubleBE=function(y,j){return j||O(y,8,this.length),l.read(this,y,!1,52,8)},u.prototype.writeUIntLE=function(y,j,W,ee){y=+y,j|=0,W|=0,ee||L(this,y,j,W,Math.pow(2,8*W)-1,0);var X=1,ne=0;for(this[j]=255&y;++ne<W&&(X*=256);)this[j+ne]=y/X&255;return j+W},u.prototype.writeUIntBE=function(y,j,W,ee){y=+y,j|=0,W|=0,ee||L(this,y,j,W,Math.pow(2,8*W)-1,0);var X=W-1,ne=1;for(this[j+X]=255&y;--X>=0&&(ne*=256);)this[j+X]=y/ne&255;return j+W},u.prototype.writeUInt8=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,1,255,0),u.TYPED_ARRAY_SUPPORT||(y=Math.floor(y)),this[j]=255&y,j+1},u.prototype.writeUInt16LE=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[j]=255&y,this[j+1]=y>>>8):k(this,y,j,!0),j+2},u.prototype.writeUInt16BE=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[j]=y>>>8,this[j+1]=255&y):k(this,y,j,!1),j+2},u.prototype.writeUInt32LE=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[j+3]=y>>>24,this[j+2]=y>>>16,this[j+1]=y>>>8,this[j]=255&y):E(this,y,j,!0),j+4},u.prototype.writeUInt32BE=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[j]=y>>>24,this[j+1]=y>>>16,this[j+2]=y>>>8,this[j+3]=255&y):E(this,y,j,!1),j+4},u.prototype.writeIntLE=function(y,j,W,ee){if(y=+y,j|=0,!ee){var X=Math.pow(2,8*W-1);L(this,y,j,W,X-1,-X)}var ne=0,ie=1,he=0;for(this[j]=255&y;++ne<W&&(ie*=256);)y<0&&he===0&&this[j+ne-1]!==0&&(he=1),this[j+ne]=(y/ie>>0)-he&255;return j+W},u.prototype.writeIntBE=function(y,j,W,ee){if(y=+y,j|=0,!ee){var X=Math.pow(2,8*W-1);L(this,y,j,W,X-1,-X)}var ne=W-1,ie=1,he=0;for(this[j+ne]=255&y;--ne>=0&&(ie*=256);)y<0&&he===0&&this[j+ne+1]!==0&&(he=1),this[j+ne]=(y/ie>>0)-he&255;return j+W},u.prototype.writeInt8=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,1,127,-128),u.TYPED_ARRAY_SUPPORT||(y=Math.floor(y)),y<0&&(y=255+y+1),this[j]=255&y,j+1},u.prototype.writeInt16LE=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[j]=255&y,this[j+1]=y>>>8):k(this,y,j,!0),j+2},u.prototype.writeInt16BE=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[j]=y>>>8,this[j+1]=255&y):k(this,y,j,!1),j+2},u.prototype.writeInt32LE=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[j]=255&y,this[j+1]=y>>>8,this[j+2]=y>>>16,this[j+3]=y>>>24):E(this,y,j,!0),j+4},u.prototype.writeInt32BE=function(y,j,W){return y=+y,j|=0,W||L(this,y,j,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),u.TYPED_ARRAY_SUPPORT?(this[j]=y>>>24,this[j+1]=y>>>16,this[j+2]=y>>>8,this[j+3]=255&y):E(this,y,j,!1),j+4},u.prototype.writeFloatLE=function(y,j,W){return U(this,y,j,!0,W)},u.prototype.writeFloatBE=function(y,j,W){return U(this,y,j,!1,W)},u.prototype.writeDoubleLE=function(y,j,W){return B(this,y,j,!0,W)},u.prototype.writeDoubleBE=function(y,j,W){return B(this,y,j,!1,W)},u.prototype.copy=function(y,j,W,ee){if(W||(W=0),ee||ee===0||(ee=this.length),j>=y.length&&(j=y.length),j||(j=0),ee>0&&ee<W&&(ee=W),ee===W||y.length===0||this.length===0)return 0;if(j<0)throw new RangeError("targetStart out of bounds");if(W<0||W>=this.length)throw new RangeError("sourceStart out of bounds");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),y.length-j<ee-W&&(ee=y.length-j+W);var X,ne=ee-W;if(this===y&&W<j&&j<ee)for(X=ne-1;X>=0;--X)y[X+j]=this[X+W];else if(ne<1e3||!u.TYPED_ARRAY_SUPPORT)for(X=0;X<ne;++X)y[X+j]=this[X+W];else Uint8Array.prototype.set.call(y,this.subarray(W,W+ne),j);return ne},u.prototype.fill=function(y,j,W,ee){if(typeof y=="string"){if(typeof j=="string"?(ee=j,j=0,W=this.length):typeof W=="string"&&(ee=W,W=this.length),y.length===1){var X=y.charCodeAt(0);X<256&&(y=X)}if(ee!==void 0&&typeof ee!="string")throw new TypeError("encoding must be a string");if(typeof ee=="string"&&!u.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee)}else typeof y=="number"&&(y&=255);if(j<0||this.length<j||this.length<W)throw new RangeError("Out of range index");if(W<=j)return this;var ne;if(j>>>=0,W=W===void 0?this.length:W>>>0,y||(y=0),typeof y=="number")for(ne=j;ne<W;++ne)this[ne]=y;else{var ie=u.isBuffer(y)?y:K(new u(y,ee).toString()),he=ie.length;for(ne=0;ne<W-j;++ne)this[ne+j]=ie[ne%he]}return this};var G=/[^+\/0-9A-Za-z-_]/g;function Y(y){return y<16?"0"+y.toString(16):y.toString(16)}function K(y,j){var W;j=j||1/0;for(var ee=y.length,X=null,ne=[],ie=0;ie<ee;++ie){if((W=y.charCodeAt(ie))>55295&&W<57344){if(!X){if(W>56319){(j-=3)>-1&&ne.push(239,191,189);continue}if(ie+1===ee){(j-=3)>-1&&ne.push(239,191,189);continue}X=W;continue}if(W<56320){(j-=3)>-1&&ne.push(239,191,189),X=W;continue}W=65536+(X-55296<<10|W-56320)}else X&&(j-=3)>-1&&ne.push(239,191,189);if(X=null,W<128){if((j-=1)<0)break;ne.push(W)}else if(W<2048){if((j-=2)<0)break;ne.push(W>>6|192,63&W|128)}else if(W<65536){if((j-=3)<0)break;ne.push(W>>12|224,W>>6&63|128,63&W|128)}else{if(!(W<1114112))throw new Error("Invalid code point");if((j-=4)<0)break;ne.push(W>>18|240,W>>12&63|128,W>>6&63|128,63&W|128)}}return ne}function H(y){return o.toByteArray(function(j){if((j=function(W){return W.trim?W.trim():W.replace(/^\s+|\s+$/g,"")}(j).replace(G,"")).length<2)return"";for(;j.length%4!=0;)j+="=";return j}(y))}function V(y,j,W,ee){for(var X=0;X<ee&&!(X+W>=j.length||X>=y.length);++X)j[X+W]=y[X];return X}}).call(this,r(5))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}e.exports=r},function(e,t,r){(function(n){r.d(t,"a",function(){return s}),r.d(t,"i",function(){return i}),r.d(t,"j",function(){return c}),r.d(t,"b",function(){return u}),r.d(t,"f",function(){return b}),r.d(t,"e",function(){return A}),r.d(t,"g",function(){return _}),r.d(t,"d",function(){return v}),r.d(t,"c",function(){return f}),r.d(t,"h",function(){return S});var o=r(98);const l=o.from(Object.assign(Object.assign({},n.env),{ENVIRONMENT:n.env.ENV,APP:"realtime-sdk",NAMESPACE:"production",VERSION:n.env.VERSION,BUILD_TAG:n.env.BUILD_TAG,GIT_COMMIT:n.env.GIT_COMMIT,LOG_LEVEL:n.env.LOG_LEVEL,LOG_JSON:"false",LOG_API_ENDPOINT:n.env.LOG_API_ENDPOINT,JEST_WORKER_ID:n.env.JEST_WORKER_ID,ENABLE_SENTRY:n.env.ENABLE_SENTRY,SENTRY_DSN:n.env.SENTRY_DSN,STABLE_AGENT_VERSION:n.env.STABLE_AGENT_VERSION})),s=(l.get("ENVIRONMENT").default("").asString(),l.get("APP").default("").asString()),i=(l.get("APP_PATH").default("").asString(),l.get("API_ENDPOINT").default("").asString(),l.get("NAMESPACE").default("").asString()),c=l.get("VERSION").default("").asString(),u=l.get("BUILD_TAG").default("").asString(),b=(l.get("GIT_COMMIT").default("").asString(),l.get("ENABLE_SENTRY").default("false").asBool(),l.get("SENTRY_DSN").default("").asString(),l.get("LOG_LEVEL").default("debug").asString()),A=l.get("LOG_JSON").default("true").asBool(),_=l.get("LOG_TO_CONSOLE").default("true").asBool(),v=(l.get("STABLE_AGENT_VERSION").default("").asString(),l.get("LOG_API_ENDPOINT").asString()),f=l.get("JEST_WORKER_ID").asString(),S=(l.get("SHEET_EXPORT_MAX_ROW_COUNT").default("10000").asIntPositive(),l.get("LOG_TO_FILE").default("false").asBoolStrict())}).call(this,r(2))},function(e,t){typeof Object.create=="function"?e.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(r,n){if(n){r.super_=n;var o=function(){};o.prototype=n.prototype,r.prototype=new o,r.prototype.constructor=r}}},function(e,t,r){var n=r(95),o=n,l=Function("return this")(),s=r(94);o.object.extend(proto,s),o.exportSymbol("proto.v1.signaling.api.CreatePeerRequest",null,l),o.exportSymbol("proto.v1.signaling.api.CreatePeerResponse",null,l),o.exportSymbol("proto.v1.signaling.api.DeletePeerRequest",null,l),o.exportSymbol("proto.v1.signaling.api.DeletePeerResponse",null,l),o.exportSymbol("proto.v1.signaling.api.GetIceServersRequest",null,l),o.exportSymbol("proto.v1.signaling.api.GetIceServersResponse",null,l),o.exportSymbol("proto.v1.signaling.api.GetPeersRequest",null,l),o.exportSymbol("proto.v1.signaling.api.GetPeersResponse",null,l),o.exportSymbol("proto.v1.signaling.api.Peer",null,l),o.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamRequest",null,l),o.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamResponse",null,l),o.exportSymbol("proto.v1.signaling.api.RefreshPeerRequest",null,l),o.exportSymbol("proto.v1.signaling.api.RefreshPeerResponse",null,l),o.exportSymbol("proto.v1.signaling.api.SendSignalRequest",null,l),o.exportSymbol("proto.v1.signaling.api.SendSignalResponse",null,l),o.exportSymbol("proto.v1.signaling.api.SessionType",null,l),o.exportSymbol("proto.v1.signaling.api.Signal",null,l),proto.v1.signaling.api.Peer=function(i){n.Message.initialize(this,i,0,-1,proto.v1.signaling.api.Peer.repeatedFields_,null)},o.inherits(proto.v1.signaling.api.Peer,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Peer.displayName="proto.v1.signaling.api.Peer"),proto.v1.signaling.api.Signal=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.Signal,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Signal.displayName="proto.v1.signaling.api.Signal"),proto.v1.signaling.api.CreatePeerRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.CreatePeerRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerRequest.displayName="proto.v1.signaling.api.CreatePeerRequest"),proto.v1.signaling.api.CreatePeerResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.CreatePeerResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerResponse.displayName="proto.v1.signaling.api.CreatePeerResponse"),proto.v1.signaling.api.DeletePeerRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.DeletePeerRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerRequest.displayName="proto.v1.signaling.api.DeletePeerRequest"),proto.v1.signaling.api.DeletePeerResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.DeletePeerResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerResponse.displayName="proto.v1.signaling.api.DeletePeerResponse"),proto.v1.signaling.api.RefreshPeerRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.RefreshPeerRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerRequest.displayName="proto.v1.signaling.api.RefreshPeerRequest"),proto.v1.signaling.api.RefreshPeerResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.RefreshPeerResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerResponse.displayName="proto.v1.signaling.api.RefreshPeerResponse"),proto.v1.signaling.api.GetPeersRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetPeersRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersRequest.displayName="proto.v1.signaling.api.GetPeersRequest"),proto.v1.signaling.api.GetPeersResponse=function(i){n.Message.initialize(this,i,0,-1,proto.v1.signaling.api.GetPeersResponse.repeatedFields_,null)},o.inherits(proto.v1.signaling.api.GetPeersResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersResponse.displayName="proto.v1.signaling.api.GetPeersResponse"),proto.v1.signaling.api.GetIceServersRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetIceServersRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersRequest.displayName="proto.v1.signaling.api.GetIceServersRequest"),proto.v1.signaling.api.GetIceServersResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetIceServersResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersResponse.displayName="proto.v1.signaling.api.GetIceServersResponse"),proto.v1.signaling.api.SendSignalRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.SendSignalRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalRequest.displayName="proto.v1.signaling.api.SendSignalRequest"),proto.v1.signaling.api.SendSignalResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.SendSignalResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalResponse.displayName="proto.v1.signaling.api.SendSignalResponse"),proto.v1.signaling.api.ReceiveSignalStreamRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.ReceiveSignalStreamRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.displayName="proto.v1.signaling.api.ReceiveSignalStreamRequest"),proto.v1.signaling.api.ReceiveSignalStreamResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.ReceiveSignalStreamResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.displayName="proto.v1.signaling.api.ReceiveSignalStreamResponse"),proto.v1.signaling.api.Peer.repeatedFields_=[5],n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Peer.prototype.toObject=function(i){return proto.v1.signaling.api.Peer.toObject(i,this)},proto.v1.signaling.api.Peer.toObject=function(i,c){var u,b={peerId:n.Message.getFieldWithDefault(c,1,""),organizationId:n.Message.getFieldWithDefault(c,2,""),userId:(u=c.getUserId())&&s.StringValue.toObject(i,u),deviceId:(u=c.getDeviceId())&&s.StringValue.toObject(i,u),sessionIdsList:(u=n.Message.getRepeatedField(c,5))==null?void 0:u,peerCreatedTimestamp:(u=c.getPeerCreatedTimestamp())&&s.Int64Value.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.Peer.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.Peer;return proto.v1.signaling.api.Peer.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.Peer.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setPeerId(u);break;case 2:u=c.readString(),i.setOrganizationId(u);break;case 3:u=new s.StringValue,c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setUserId(u);break;case 4:u=new s.StringValue,c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setDeviceId(u);break;case 5:u=c.readString(),i.addSessionIds(u);break;case 6:u=new s.Int64Value,c.readMessage(u,s.Int64Value.deserializeBinaryFromReader),i.setPeerCreatedTimestamp(u);break;default:c.skipField()}return i},proto.v1.signaling.api.Peer.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.Peer.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.Peer.serializeBinaryToWriter=function(i,c){var u=void 0;(u=i.getPeerId()).length>0&&c.writeString(1,u),(u=i.getOrganizationId()).length>0&&c.writeString(2,u),(u=i.getUserId())!=null&&c.writeMessage(3,u,s.StringValue.serializeBinaryToWriter),(u=i.getDeviceId())!=null&&c.writeMessage(4,u,s.StringValue.serializeBinaryToWriter),(u=i.getSessionIdsList()).length>0&&c.writeRepeatedString(5,u),(u=i.getPeerCreatedTimestamp())!=null&&c.writeMessage(6,u,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.Peer.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.Peer.prototype.setPeerId=function(i){return n.Message.setProto3StringField(this,1,i)},proto.v1.signaling.api.Peer.prototype.getOrganizationId=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.v1.signaling.api.Peer.prototype.setOrganizationId=function(i){return n.Message.setProto3StringField(this,2,i)},proto.v1.signaling.api.Peer.prototype.getUserId=function(){return n.Message.getWrapperField(this,s.StringValue,3)},proto.v1.signaling.api.Peer.prototype.setUserId=function(i){return n.Message.setWrapperField(this,3,i)},proto.v1.signaling.api.Peer.prototype.clearUserId=function(){return this.setUserId(void 0)},proto.v1.signaling.api.Peer.prototype.hasUserId=function(){return n.Message.getField(this,3)!=null},proto.v1.signaling.api.Peer.prototype.getDeviceId=function(){return n.Message.getWrapperField(this,s.StringValue,4)},proto.v1.signaling.api.Peer.prototype.setDeviceId=function(i){return n.Message.setWrapperField(this,4,i)},proto.v1.signaling.api.Peer.prototype.clearDeviceId=function(){return this.setDeviceId(void 0)},proto.v1.signaling.api.Peer.prototype.hasDeviceId=function(){return n.Message.getField(this,4)!=null},proto.v1.signaling.api.Peer.prototype.getSessionIdsList=function(){return n.Message.getRepeatedField(this,5)},proto.v1.signaling.api.Peer.prototype.setSessionIdsList=function(i){return n.Message.setField(this,5,i||[])},proto.v1.signaling.api.Peer.prototype.addSessionIds=function(i,c){return n.Message.addToRepeatedField(this,5,i,c)},proto.v1.signaling.api.Peer.prototype.clearSessionIdsList=function(){return this.setSessionIdsList([])},proto.v1.signaling.api.Peer.prototype.getPeerCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,6)},proto.v1.signaling.api.Peer.prototype.setPeerCreatedTimestamp=function(i){return n.Message.setWrapperField(this,6,i)},proto.v1.signaling.api.Peer.prototype.clearPeerCreatedTimestamp=function(){return this.setPeerCreatedTimestamp(void 0)},proto.v1.signaling.api.Peer.prototype.hasPeerCreatedTimestamp=function(){return n.Message.getField(this,6)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Signal.prototype.toObject=function(i){return proto.v1.signaling.api.Signal.toObject(i,this)},proto.v1.signaling.api.Signal.toObject=function(i,c){var u,b={sessionId:(u=c.getSessionId())&&s.StringValue.toObject(i,u),sessionCreatedTimestamp:(u=c.getSessionCreatedTimestamp())&&s.Int64Value.toObject(i,u),senderId:n.Message.getFieldWithDefault(c,3,""),receiverId:n.Message.getFieldWithDefault(c,4,""),payload:n.Message.getFieldWithDefault(c,5,""),iceServers:n.Message.getFieldWithDefault(c,6,""),iceTransportPolicy:n.Message.getFieldWithDefault(c,7,""),sessionType:n.Message.getFieldWithDefault(c,8,0)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.Signal.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.Signal;return proto.v1.signaling.api.Signal.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.Signal.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new s.StringValue;c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setSessionId(u);break;case 2:u=new s.Int64Value,c.readMessage(u,s.Int64Value.deserializeBinaryFromReader),i.setSessionCreatedTimestamp(u);break;case 3:u=c.readString(),i.setSenderId(u);break;case 4:u=c.readString(),i.setReceiverId(u);break;case 5:u=c.readString(),i.setPayload(u);break;case 6:u=c.readString(),i.setIceServers(u);break;case 7:u=c.readString(),i.setIceTransportPolicy(u);break;case 8:u=c.readEnum(),i.setSessionType(u);break;default:c.skipField()}return i},proto.v1.signaling.api.Signal.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.Signal.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.Signal.serializeBinaryToWriter=function(i,c){var u=void 0;(u=i.getSessionId())!=null&&c.writeMessage(1,u,s.StringValue.serializeBinaryToWriter),(u=i.getSessionCreatedTimestamp())!=null&&c.writeMessage(2,u,s.Int64Value.serializeBinaryToWriter),(u=i.getSenderId()).length>0&&c.writeString(3,u),(u=i.getReceiverId()).length>0&&c.writeString(4,u),(u=i.getPayload()).length>0&&c.writeString(5,u),(u=i.getIceServers()).length>0&&c.writeString(6,u),(u=i.getIceTransportPolicy()).length>0&&c.writeString(7,u),(u=i.getSessionType())!==0&&c.writeEnum(8,u)},proto.v1.signaling.api.Signal.prototype.getSessionId=function(){return n.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.Signal.prototype.setSessionId=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.Signal.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionId=function(){return n.Message.getField(this,1)!=null},proto.v1.signaling.api.Signal.prototype.getSessionCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.Signal.prototype.setSessionCreatedTimestamp=function(i){return n.Message.setWrapperField(this,2,i)},proto.v1.signaling.api.Signal.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionCreatedTimestamp=function(){return n.Message.getField(this,2)!=null},proto.v1.signaling.api.Signal.prototype.getSenderId=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.v1.signaling.api.Signal.prototype.setSenderId=function(i){return n.Message.setProto3StringField(this,3,i)},proto.v1.signaling.api.Signal.prototype.getReceiverId=function(){return n.Message.getFieldWithDefault(this,4,"")},proto.v1.signaling.api.Signal.prototype.setReceiverId=function(i){return n.Message.setProto3StringField(this,4,i)},proto.v1.signaling.api.Signal.prototype.getPayload=function(){return n.Message.getFieldWithDefault(this,5,"")},proto.v1.signaling.api.Signal.prototype.setPayload=function(i){return n.Message.setProto3StringField(this,5,i)},proto.v1.signaling.api.Signal.prototype.getIceServers=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.v1.signaling.api.Signal.prototype.setIceServers=function(i){return n.Message.setProto3StringField(this,6,i)},proto.v1.signaling.api.Signal.prototype.getIceTransportPolicy=function(){return n.Message.getFieldWithDefault(this,7,"")},proto.v1.signaling.api.Signal.prototype.setIceTransportPolicy=function(i){return n.Message.setProto3StringField(this,7,i)},proto.v1.signaling.api.Signal.prototype.getSessionType=function(){return n.Message.getFieldWithDefault(this,8,0)},proto.v1.signaling.api.Signal.prototype.setSessionType=function(i){return n.Message.setProto3EnumField(this,8,i)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerRequest.prototype.toObject=function(i){return proto.v1.signaling.api.CreatePeerRequest.toObject(i,this)},proto.v1.signaling.api.CreatePeerRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.CreatePeerRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.CreatePeerRequest;return proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.CreatePeerRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter=function(i,c){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerResponse.prototype.toObject=function(i){return proto.v1.signaling.api.CreatePeerResponse.toObject(i,this)},proto.v1.signaling.api.CreatePeerResponse.toObject=function(i,c){var u,b={peer:(u=c.getPeer())&&proto.v1.signaling.api.Peer.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.CreatePeerResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.CreatePeerResponse;return proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),i.setPeer(u);break;default:c.skipField()}return i},proto.v1.signaling.api.CreatePeerResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeer())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.CreatePeerResponse.prototype.getPeer=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.CreatePeerResponse.prototype.setPeer=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.CreatePeerResponse.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.CreatePeerResponse.prototype.hasPeer=function(){return n.Message.getField(this,1)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerRequest.prototype.toObject=function(i){return proto.v1.signaling.api.DeletePeerRequest.toObject(i,this)},proto.v1.signaling.api.DeletePeerRequest.toObject=function(i,c){var u={peerId:n.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.DeletePeerRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.DeletePeerRequest;return proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setPeerId(u);break;default:c.skipField()}return i},proto.v1.signaling.api.DeletePeerRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeerId()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.DeletePeerRequest.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.DeletePeerRequest.prototype.setPeerId=function(i){return n.Message.setProto3StringField(this,1,i)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerResponse.prototype.toObject=function(i){return proto.v1.signaling.api.DeletePeerResponse.toObject(i,this)},proto.v1.signaling.api.DeletePeerResponse.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.DeletePeerResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.DeletePeerResponse;return proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.DeletePeerResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter=function(i,c){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerRequest.prototype.toObject=function(i){return proto.v1.signaling.api.RefreshPeerRequest.toObject(i,this)},proto.v1.signaling.api.RefreshPeerRequest.toObject=function(i,c){var u,b={peer:(u=c.getPeer())&&proto.v1.signaling.api.Peer.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.RefreshPeerRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.RefreshPeerRequest;return proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),i.setPeer(u);break;default:c.skipField()}return i},proto.v1.signaling.api.RefreshPeerRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeer())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.RefreshPeerRequest.prototype.getPeer=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.RefreshPeerRequest.prototype.setPeer=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.RefreshPeerRequest.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.RefreshPeerRequest.prototype.hasPeer=function(){return n.Message.getField(this,1)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerResponse.prototype.toObject=function(i){return proto.v1.signaling.api.RefreshPeerResponse.toObject(i,this)},proto.v1.signaling.api.RefreshPeerResponse.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.RefreshPeerResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.RefreshPeerResponse;return proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.RefreshPeerResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter=function(i,c){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersRequest.prototype.toObject=function(i){return proto.v1.signaling.api.GetPeersRequest.toObject(i,this)},proto.v1.signaling.api.GetPeersRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetPeersRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.GetPeersRequest;return proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.GetPeersRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter=function(i,c){},proto.v1.signaling.api.GetPeersResponse.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersResponse.prototype.toObject=function(i){return proto.v1.signaling.api.GetPeersResponse.toObject(i,this)},proto.v1.signaling.api.GetPeersResponse.toObject=function(i,c){var u={peersList:n.Message.toObjectList(c.getPeersList(),proto.v1.signaling.api.Peer.toObject,i)};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetPeersResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.GetPeersResponse;return proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),i.addPeers(u);break;default:c.skipField()}return i},proto.v1.signaling.api.GetPeersResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeersList()).length>0&&c.writeRepeatedMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.GetPeersResponse.prototype.getPeersList=function(){return n.Message.getRepeatedWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.GetPeersResponse.prototype.setPeersList=function(i){return n.Message.setRepeatedWrapperField(this,1,i)},proto.v1.signaling.api.GetPeersResponse.prototype.addPeers=function(i,c){return n.Message.addToRepeatedWrapperField(this,1,i,proto.v1.signaling.api.Peer,c)},proto.v1.signaling.api.GetPeersResponse.prototype.clearPeersList=function(){return this.setPeersList([])},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersRequest.prototype.toObject=function(i){return proto.v1.signaling.api.GetIceServersRequest.toObject(i,this)},proto.v1.signaling.api.GetIceServersRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetIceServersRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.GetIceServersRequest;return proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.GetIceServersRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter=function(i,c){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersResponse.prototype.toObject=function(i){return proto.v1.signaling.api.GetIceServersResponse.toObject(i,this)},proto.v1.signaling.api.GetIceServersResponse.toObject=function(i,c){var u={iceServers:n.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetIceServersResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.GetIceServersResponse;return proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setIceServers(u);break;default:c.skipField()}return i},proto.v1.signaling.api.GetIceServersResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getIceServers()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.GetIceServersResponse.prototype.getIceServers=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.GetIceServersResponse.prototype.setIceServers=function(i){return n.Message.setProto3StringField(this,1,i)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalRequest.prototype.toObject=function(i){return proto.v1.signaling.api.SendSignalRequest.toObject(i,this)},proto.v1.signaling.api.SendSignalRequest.toObject=function(i,c){var u,b={signal:(u=c.getSignal())&&proto.v1.signaling.api.Signal.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.SendSignalRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.SendSignalRequest;return proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Signal;c.readMessage(u,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),i.setSignal(u);break;default:c.skipField()}return i},proto.v1.signaling.api.SendSignalRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getSignal())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalRequest.prototype.getSignal=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.SendSignalRequest.prototype.setSignal=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.SendSignalRequest.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.SendSignalRequest.prototype.hasSignal=function(){return n.Message.getField(this,1)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalResponse.prototype.toObject=function(i){return proto.v1.signaling.api.SendSignalResponse.toObject(i,this)},proto.v1.signaling.api.SendSignalResponse.toObject=function(i,c){var u,b={sessionId:(u=c.getSessionId())&&s.StringValue.toObject(i,u),sessionCreatedTimestamp:(u=c.getSessionCreatedTimestamp())&&s.Int64Value.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.SendSignalResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.SendSignalResponse;return proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new s.StringValue;c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setSessionId(u);break;case 2:u=new s.Int64Value,c.readMessage(u,s.Int64Value.deserializeBinaryFromReader),i.setSessionCreatedTimestamp(u);break;default:c.skipField()}return i},proto.v1.signaling.api.SendSignalResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter=function(i,c){var u=void 0;(u=i.getSessionId())!=null&&c.writeMessage(1,u,s.StringValue.serializeBinaryToWriter),(u=i.getSessionCreatedTimestamp())!=null&&c.writeMessage(2,u,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionId=function(){return n.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionId=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionId=function(){return n.Message.getField(this,1)!=null},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionCreatedTimestamp=function(i){return n.Message.setWrapperField(this,2,i)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionCreatedTimestamp=function(){return n.Message.getField(this,2)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.toObject=function(i){return proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject(i,this)},proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject=function(i,c){var u={peerId:n.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.ReceiveSignalStreamRequest;return proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setPeerId(u);break;default:c.skipField()}return i},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeerId()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.setPeerId=function(i){return n.Message.setProto3StringField(this,1,i)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.toObject=function(i){return proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject(i,this)},proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject=function(i,c){var u,b={signal:(u=c.getSignal())&&proto.v1.signaling.api.Signal.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.ReceiveSignalStreamResponse;return proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Signal;c.readMessage(u,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),i.setSignal(u);break;default:c.skipField()}return i},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getSignal())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.getSignal=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.setSignal=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.hasSignal=function(){return n.Message.getField(this,1)!=null},proto.v1.signaling.api.SessionType={UNKNOWN:0,TELEOP:1,PORT_FORWARD:2,OBSERVE:3},o.object.extend(t,proto.v1.signaling.api)},function(e,t,r){function n(_){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(_)}function o(_,v){return!v||n(v)!=="object"&&typeof v!="function"?l(_):v}function l(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function s(_){var v=typeof Map=="function"?new Map:void 0;return(s=function(f){if(f===null||(S=f,Function.toString.call(S).indexOf("[native code]")===-1))return f;var S;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(v!==void 0){if(v.has(f))return v.get(f);v.set(f,w)}function w(){return i(f,arguments,b(this).constructor)}return w.prototype=Object.create(f.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),u(w,f)})(_)}function i(_,v,f){return(i=c()?Reflect.construct:function(S,w,P){var N=[null];N.push.apply(N,w);var T=new(Function.bind.apply(S,N));return P&&u(T,P.prototype),T}).apply(null,arguments)}function c(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function u(_,v){return(u=Object.setPrototypeOf||function(f,S){return f.__proto__=S,f})(_,v)}function b(_){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)})(_)}var A=function(_){(function(P,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(N&&N.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),N&&u(P,N)})(w,_);var v,f,S=(v=w,f=c(),function(){var P,N=b(v);if(f){var T=b(this).constructor;P=Reflect.construct(N,arguments,T)}else P=N.apply(this,arguments);return o(this,P)});function w(P){var N;return function(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")}(this,w),N=S.call(this,`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
1
|
+
(function(Ce,Me){typeof exports=="object"&&typeof module!="undefined"?Me(exports):typeof define=="function"&&define.amd?define(["exports"],Me):(Ce=typeof globalThis!="undefined"?globalThis:Ce||self,Me(Ce.FormantDataSDK={}))})(this,function(exports){"use strict";var lr=Object.defineProperty;var Zt=Object.getOwnPropertySymbols;var ur=Object.prototype.hasOwnProperty,cr=Object.prototype.propertyIsEnumerable;var Tt=(Ce,Me,e)=>Me in Ce?lr(Ce,Me,{enumerable:!0,configurable:!0,writable:!0,value:e}):Ce[Me]=e,st=(Ce,Me)=>{for(var e in Me||(Me={}))ur.call(Me,e)&&Tt(Ce,e,Me[e]);if(Zt)for(var e of Zt(Me))cr.call(Me,e)&&Tt(Ce,e,Me[e]);return Ce};var Re=(Ce,Me,e)=>(Tt(Ce,typeof Me!="symbol"?Me+"":Me,e),e);var dist={exports:{}};/*! For license information please see index.js.LICENSE.txt */(function(module,exports){(function(e,t){module.exports=t()})(window,function(){return function(e){function t(u){for(var b,A,_=u[0],v=u[1],f=0,S=[];f<_.length;f++)A=_[f],Object.prototype.hasOwnProperty.call(n,A)&&n[A]&&S.push(n[A][0]),n[A]=0;for(b in v)Object.prototype.hasOwnProperty.call(v,b)&&(e[b]=v[b]);for(c&&c(u);S.length;)S.shift()()}var r={},n={0:0};function o(u){if(r[u])return r[u].exports;var b=r[u]={i:u,l:!1,exports:{}};return e[u].call(b.exports,b,b.exports,o),b.l=!0,b.exports}o.e=function(){return Promise.resolve()},o.m=e,o.c=r,o.d=function(u,b,A){o.o(u,b)||Object.defineProperty(u,b,{enumerable:!0,get:A})},o.r=function(u){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})},o.t=function(u,b){if(1&b&&(u=o(u)),8&b||4&b&&typeof u=="object"&&u&&u.__esModule)return u;var A=Object.create(null);if(o.r(A),Object.defineProperty(A,"default",{enumerable:!0,value:u}),2&b&&typeof u!="string")for(var _ in u)o.d(A,_,function(v){return u[v]}.bind(null,_));return A},o.n=function(u){var b=u&&u.__esModule?function(){return u.default}:function(){return u};return o.d(b,"a",b),b},o.o=function(u,b){return Object.prototype.hasOwnProperty.call(u,b)},o.p="",o.oe=function(u){throw console.error(u),u};var l=window.webpackJsonpFormantRealtimeSDK=window.webpackJsonpFormantRealtimeSDK||[],s=l.push.bind(l);l.push=t,l=l.slice();for(var i=0;i<l.length;i++)t(l[i]);var c=s;return o(o.s=226)}([function(e,t,r){r.d(t,"a",function(){return k});const n=Math.pow(2,20),o=n;var l=r(54),s=r.n(l),i=r(15),c=r(53),u=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),b=new Uint8Array(16);function A(){if(!u)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(b)}for(var _=[],v=0;v<256;++v)_[v]=(v+256).toString(16).substr(1);var f=function(g,U){var B=U||0,G=_;return[G[g[B++]],G[g[B++]],G[g[B++]],G[g[B++]],"-",G[g[B++]],G[g[B++]],"-",G[g[B++]],G[g[B++]],"-",G[g[B++]],G[g[B++]],"-",G[g[B++]],G[g[B++]],G[g[B++]],G[g[B++]],G[g[B++]],G[g[B++]]].join("")},S=function(g,U,B){var G=U&&B||0;typeof g=="string"&&(U=g==="binary"?new Array(16):null,g=null);var Y=(g=g||{}).random||(g.rng||A)();if(Y[6]=15&Y[6]|64,Y[8]=63&Y[8]|128,U)for(var K=0;K<16;++K)U[G+K]=Y[K];return U||f(Y)},w=r(16),P=r(6),N=r(29),T=r(35),R=r.n(T);function d(g){return R()(g,{cycles:!0})}var I=function(g,U){var B={};for(var G in g)Object.prototype.hasOwnProperty.call(g,G)&&U.indexOf(G)<0&&(B[G]=g[G]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function"){var Y=0;for(G=Object.getOwnPropertySymbols(g);Y<G.length;Y++)U.indexOf(G[Y])<0&&Object.prototype.propertyIsEnumerable.call(g,G[Y])&&(B[G[Y]]=g[G[Y]])}return B};function Q(g,U={}){const B=V=>U.redacted!==!1?Object(N.a)(V):V;if(!g.stack)return{message:d(B(g))};const{name:G,message:Y,stack:K}=g,H=I(g,["name","message","stack"]);return{name:G,message:Y!==void 0?Y:d(B(g)),stack:K,meta:H&&Object.keys(H).length===0?void 0:B(H)}}function Z(g,U={}){const{message:B,stack:G,meta:Y}=Q(g,U);return`${G||B||""}${Y&&Object.keys(Y).length>0?` -- ${d(Y)}`:""}`}var h=r(99),p=r.n(h),j=function(g,U,B,G){return new(B||(B=Promise))(function(Y,K){function H(C){try{y(G.next(C))}catch(W){K(W)}}function V(C){try{y(G.throw(C))}catch(W){K(W)}}function y(C){var W;C.done?Y(C.value):(W=C.value,W instanceof B?W:new B(function(ee){ee(W)})).then(H,V)}y((G=G.apply(g,U||[])).next())})},m=function(g,U){var B={};for(var G in g)Object.prototype.hasOwnProperty.call(g,G)&&U.indexOf(G)<0&&(B[G]=g[G]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function"){var Y=0;for(G=Object.getOwnPropertySymbols(g);Y<G.length;Y++)U.indexOf(G[Y])<0&&Object.prototype.propertyIsEnumerable.call(g,G[Y])&&(B[G[Y]]=g[G[Y]])}return B};class x extends p.a{constructor(U,B){super(),this.endpoint=U,this.meta=B,this.logClient=this.getLogClient()}getLogClient(){return j(this,void 0,void 0,function*(){const{LogClient:U}=yield Promise.resolve().then(r.bind(null,228));return new U(this.endpoint)})}log(U,B){return j(this,void 0,void 0,function*(){const{level:G,message:Y,error:K}=U,H=m(U,["level","message","error"]);this.emit("logged");try{yield(yield this.logClient).log([{timestamp:new Date().toISOString(),level:G,message:Y.substring(0,1e3),error:K!==void 0?Q(K):void 0,meta:Object.assign(Object.assign({},H),this.meta())}])}catch(V){console.error(`Failed to log to log-api: ${Z(V)}`)}B()})}}var F=function(g,U){var B={};for(var G in g)Object.prototype.hasOwnProperty.call(g,G)&&U.indexOf(G)<0&&(B[G]=g[G]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function"){var Y=0;for(G=Object.getOwnPropertySymbols(g);Y<G.length;Y++)U.indexOf(G[Y])<0&&Object.prototype.propertyIsEnumerable.call(g,G[Y])&&(B[G[Y]]=g[G[Y]])}return B};const D={app:P.a,namespace:P.i,buildTag:P.b,instanceId:S()};let O={};const L=P.e?w.format.printf(g=>{var{timestamp:U,level:B,message:G,error:Y}=g,K=F(g,["timestamp","level","message","error"]);const H=Object.assign(Object.assign({timestamp:U?new Date(U).getTime():new Date().getTime(),level:B.toUpperCase(),message:G},Y?{error:Q(Y)}:{}),{meta:Object.assign(Object.assign(Object.assign({},D),O),K)});try{return JSON.stringify(H)}catch{return s()(H)}}):w.format.printf(g=>{var{timestamp:U,level:B,message:G,error:Y}=g,K=F(g,["timestamp","level","message","error"]);let H=`${U||new Date().toISOString()} ${B.toUpperCase()}: ${G} `;if(Object.keys(K).length>0)try{H+=JSON.stringify(K)}catch{H+=s()(K)}return Y&&(H+=`
|
|
2
|
+
${Z(Y)}`),H}),k=Object(w.createLogger)({level:P.f});if(P.g&&k.add(new w.transports.Console({format:L,level:"debug"})),P.d&&k.add(new x(P.d,()=>Object.assign(Object.assign(Object.assign({},D),O),{level:"debug"}))),P.h){const g=c.resolve(i.tmpdir(),`silly-${P.a}.log`);k.debug("Logging silly logs to file",{filename:g}),k.add(new w.transports.File({filename:g,maxsize:1*o,maxFiles:10,format:w.format.combine((E="silly",Object(w.format)(U=>U.level===E&&U)()),L),level:"silly"}))}var E},function(e,t,r){r.d(t,"a",function(){return n});const n={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}},function(e,t){var r,n,o=e.exports={};function l(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(w){if(r===setTimeout)return setTimeout(w,0);if((r===l||!r)&&setTimeout)return r=setTimeout,setTimeout(w,0);try{return r(w,0)}catch{try{return r.call(null,w,0)}catch{return r.call(this,w,0)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:l}catch{r=l}try{n=typeof clearTimeout=="function"?clearTimeout:s}catch{n=s}})();var c,u=[],b=!1,A=-1;function _(){b&&c&&(b=!1,c.length?u=c.concat(u):A=-1,u.length&&v())}function v(){if(!b){var w=i(_);b=!0;for(var P=u.length;P;){for(c=u,u=[];++A<P;)c&&c[A].run();A=-1,P=u.length}c=null,b=!1,function(N){if(n===clearTimeout)return clearTimeout(N);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(N);try{n(N)}catch{try{return n.call(null,N)}catch{return n.call(this,N)}}}(w)}}function f(w,P){this.fun=w,this.array=P}function S(){}o.nextTick=function(w){var P=new Array(arguments.length-1);if(arguments.length>1)for(var N=1;N<arguments.length;N++)P[N-1]=arguments[N];u.push(new f(w,P)),u.length!==1||b||i(v)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=S,o.addListener=S,o.once=S,o.off=S,o.removeListener=S,o.removeAllListeners=S,o.emit=S,o.prependListener=S,o.prependOnceListener=S,o.listeners=function(w){return[]},o.binding=function(w){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(w){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:r(117)})},function(e,t,r){(function(n){var o=r(125),l=r(126),s=r(38);function i(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(y,C){if(i()<C)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(y=new Uint8Array(C)).__proto__=u.prototype:(y===null&&(y=new u(C)),y.length=C),y}function u(y,C,W){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(y,C,W);if(typeof y=="number"){if(typeof C=="string")throw new Error("If encoding is specified then the first argument must be a string");return _(this,y)}return b(this,y,C,W)}function b(y,C,W,ee){if(typeof C=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&C instanceof ArrayBuffer?function(X,ne,ie,he){if(ne.byteLength,ie<0||ne.byteLength<ie)throw new RangeError("'offset' is out of bounds");if(ne.byteLength<ie+(he||0))throw new RangeError("'length' is out of bounds");return ne=ie===void 0&&he===void 0?new Uint8Array(ne):he===void 0?new Uint8Array(ne,ie):new Uint8Array(ne,ie,he),u.TYPED_ARRAY_SUPPORT?(X=ne).__proto__=u.prototype:X=v(X,ne),X}(y,C,W,ee):typeof C=="string"?function(X,ne,ie){if(typeof ie=="string"&&ie!==""||(ie="utf8"),!u.isEncoding(ie))throw new TypeError('"encoding" must be a valid string encoding');var he=0|S(ne,ie),Se=(X=c(X,he)).write(ne,ie);return Se!==he&&(X=X.slice(0,Se)),X}(y,C,W):function(X,ne){if(u.isBuffer(ne)){var ie=0|f(ne.length);return(X=c(X,ie)).length===0||ne.copy(X,0,0,ie),X}if(ne){if(typeof ArrayBuffer!="undefined"&&ne.buffer instanceof ArrayBuffer||"length"in ne)return typeof ne.length!="number"||(he=ne.length)!=he?c(X,0):v(X,ne);if(ne.type==="Buffer"&&s(ne.data))return v(X,ne.data)}var he;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(y,C)}function A(y){if(typeof y!="number")throw new TypeError('"size" argument must be a number');if(y<0)throw new RangeError('"size" argument must not be negative')}function _(y,C){if(A(C),y=c(y,C<0?0:0|f(C)),!u.TYPED_ARRAY_SUPPORT)for(var W=0;W<C;++W)y[W]=0;return y}function v(y,C){var W=C.length<0?0:0|f(C.length);y=c(y,W);for(var ee=0;ee<W;ee+=1)y[ee]=255&C[ee];return y}function f(y){if(y>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|y}function S(y,C){if(u.isBuffer(y))return y.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(y)||y instanceof ArrayBuffer))return y.byteLength;typeof y!="string"&&(y=""+y);var W=y.length;if(W===0)return 0;for(var ee=!1;;)switch(C){case"ascii":case"latin1":case"binary":return W;case"utf8":case"utf-8":case void 0:return K(y).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*W;case"hex":return W>>>1;case"base64":return H(y).length;default:if(ee)return K(y).length;C=(""+C).toLowerCase(),ee=!0}}function w(y,C,W){var ee=!1;if((C===void 0||C<0)&&(C=0),C>this.length||((W===void 0||W>this.length)&&(W=this.length),W<=0)||(W>>>=0)<=(C>>>=0))return"";for(y||(y="utf8");;)switch(y){case"hex":return F(this,C,W);case"utf8":case"utf-8":return j(this,C,W);case"ascii":return m(this,C,W);case"latin1":case"binary":return x(this,C,W);case"base64":return p(this,C,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,C,W);default:if(ee)throw new TypeError("Unknown encoding: "+y);y=(y+"").toLowerCase(),ee=!0}}function P(y,C,W){var ee=y[C];y[C]=y[W],y[W]=ee}function N(y,C,W,ee,X){if(y.length===0)return-1;if(typeof W=="string"?(ee=W,W=0):W>2147483647?W=2147483647:W<-2147483648&&(W=-2147483648),W=+W,isNaN(W)&&(W=X?0:y.length-1),W<0&&(W=y.length+W),W>=y.length){if(X)return-1;W=y.length-1}else if(W<0){if(!X)return-1;W=0}if(typeof C=="string"&&(C=u.from(C,ee)),u.isBuffer(C))return C.length===0?-1:T(y,C,W,ee,X);if(typeof C=="number")return C&=255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(y,C,W):Uint8Array.prototype.lastIndexOf.call(y,C,W):T(y,[C],W,ee,X);throw new TypeError("val must be string, number or Buffer")}function T(y,C,W,ee,X){var ne,ie=1,he=y.length,Se=C.length;if(ee!==void 0&&((ee=String(ee).toLowerCase())==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(y.length<2||C.length<2)return-1;ie=2,he/=2,Se/=2,W/=2}function we($,te){return ie===1?$[te]:$.readUInt16BE(te*ie)}if(X){var Ee=-1;for(ne=W;ne<he;ne++)if(we(y,ne)===we(C,Ee===-1?0:ne-Ee)){if(Ee===-1&&(Ee=ne),ne-Ee+1===Se)return Ee*ie}else Ee!==-1&&(ne-=ne-Ee),Ee=-1}else for(W+Se>he&&(W=he-Se),ne=W;ne>=0;ne--){for(var ye=!0,q=0;q<Se;q++)if(we(y,ne+q)!==we(C,q)){ye=!1;break}if(ye)return ne}return-1}function R(y,C,W,ee){W=Number(W)||0;var X=y.length-W;ee?(ee=Number(ee))>X&&(ee=X):ee=X;var ne=C.length;if(ne%2!=0)throw new TypeError("Invalid hex string");ee>ne/2&&(ee=ne/2);for(var ie=0;ie<ee;++ie){var he=parseInt(C.substr(2*ie,2),16);if(isNaN(he))return ie;y[W+ie]=he}return ie}function d(y,C,W,ee){return V(K(C,y.length-W),y,W,ee)}function I(y,C,W,ee){return V(function(X){for(var ne=[],ie=0;ie<X.length;++ie)ne.push(255&X.charCodeAt(ie));return ne}(C),y,W,ee)}function Q(y,C,W,ee){return I(y,C,W,ee)}function Z(y,C,W,ee){return V(H(C),y,W,ee)}function h(y,C,W,ee){return V(function(X,ne){for(var ie,he,Se,we=[],Ee=0;Ee<X.length&&!((ne-=2)<0);++Ee)ie=X.charCodeAt(Ee),he=ie>>8,Se=ie%256,we.push(Se),we.push(he);return we}(C,y.length-W),y,W,ee)}function p(y,C,W){return C===0&&W===y.length?o.fromByteArray(y):o.fromByteArray(y.slice(C,W))}function j(y,C,W){W=Math.min(y.length,W);for(var ee=[],X=C;X<W;){var ne,ie,he,Se,we=y[X],Ee=null,ye=we>239?4:we>223?3:we>191?2:1;if(X+ye<=W)switch(ye){case 1:we<128&&(Ee=we);break;case 2:(192&(ne=y[X+1]))==128&&(Se=(31&we)<<6|63&ne)>127&&(Ee=Se);break;case 3:ne=y[X+1],ie=y[X+2],(192&ne)==128&&(192&ie)==128&&(Se=(15&we)<<12|(63&ne)<<6|63&ie)>2047&&(Se<55296||Se>57343)&&(Ee=Se);break;case 4:ne=y[X+1],ie=y[X+2],he=y[X+3],(192&ne)==128&&(192&ie)==128&&(192&he)==128&&(Se=(15&we)<<18|(63&ne)<<12|(63&ie)<<6|63&he)>65535&&Se<1114112&&(Ee=Se)}Ee===null?(Ee=65533,ye=1):Ee>65535&&(Ee-=65536,ee.push(Ee>>>10&1023|55296),Ee=56320|1023&Ee),ee.push(Ee),X+=ye}return function(q){var $=q.length;if($<=4096)return String.fromCharCode.apply(String,q);for(var te="",ue=0;ue<$;)te+=String.fromCharCode.apply(String,q.slice(ue,ue+=4096));return te}(ee)}t.Buffer=u,t.SlowBuffer=function(y){return+y!=y&&(y=0),u.alloc(+y)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=n.TYPED_ARRAY_SUPPORT!==void 0?n.TYPED_ARRAY_SUPPORT:function(){try{var y=new Uint8Array(1);return y.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},y.foo()===42&&typeof y.subarray=="function"&&y.subarray(1,1).byteLength===0}catch{return!1}}(),t.kMaxLength=i(),u.poolSize=8192,u._augment=function(y){return y.__proto__=u.prototype,y},u.from=function(y,C,W){return b(null,y,C,W)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(y,C,W){return function(ee,X,ne,ie){return A(X),X<=0?c(ee,X):ne!==void 0?typeof ie=="string"?c(ee,X).fill(ne,ie):c(ee,X).fill(ne):c(ee,X)}(null,y,C,W)},u.allocUnsafe=function(y){return _(null,y)},u.allocUnsafeSlow=function(y){return _(null,y)},u.isBuffer=function(y){return!(y==null||!y._isBuffer)},u.compare=function(y,C){if(!u.isBuffer(y)||!u.isBuffer(C))throw new TypeError("Arguments must be Buffers");if(y===C)return 0;for(var W=y.length,ee=C.length,X=0,ne=Math.min(W,ee);X<ne;++X)if(y[X]!==C[X]){W=y[X],ee=C[X];break}return W<ee?-1:ee<W?1:0},u.isEncoding=function(y){switch(String(y).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(y,C){if(!s(y))throw new TypeError('"list" argument must be an Array of Buffers');if(y.length===0)return u.alloc(0);var W;if(C===void 0)for(C=0,W=0;W<y.length;++W)C+=y[W].length;var ee=u.allocUnsafe(C),X=0;for(W=0;W<y.length;++W){var ne=y[W];if(!u.isBuffer(ne))throw new TypeError('"list" argument must be an Array of Buffers');ne.copy(ee,X),X+=ne.length}return ee},u.byteLength=S,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var y=this.length;if(y%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var C=0;C<y;C+=2)P(this,C,C+1);return this},u.prototype.swap32=function(){var y=this.length;if(y%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var C=0;C<y;C+=4)P(this,C,C+3),P(this,C+1,C+2);return this},u.prototype.swap64=function(){var y=this.length;if(y%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var C=0;C<y;C+=8)P(this,C,C+7),P(this,C+1,C+6),P(this,C+2,C+5),P(this,C+3,C+4);return this},u.prototype.toString=function(){var y=0|this.length;return y===0?"":arguments.length===0?j(this,0,y):w.apply(this,arguments)},u.prototype.equals=function(y){if(!u.isBuffer(y))throw new TypeError("Argument must be a Buffer");return this===y||u.compare(this,y)===0},u.prototype.inspect=function(){var y="",C=t.INSPECT_MAX_BYTES;return this.length>0&&(y=this.toString("hex",0,C).match(/.{2}/g).join(" "),this.length>C&&(y+=" ... ")),"<Buffer "+y+">"},u.prototype.compare=function(y,C,W,ee,X){if(!u.isBuffer(y))throw new TypeError("Argument must be a Buffer");if(C===void 0&&(C=0),W===void 0&&(W=y?y.length:0),ee===void 0&&(ee=0),X===void 0&&(X=this.length),C<0||W>y.length||ee<0||X>this.length)throw new RangeError("out of range index");if(ee>=X&&C>=W)return 0;if(ee>=X)return-1;if(C>=W)return 1;if(this===y)return 0;for(var ne=(X>>>=0)-(ee>>>=0),ie=(W>>>=0)-(C>>>=0),he=Math.min(ne,ie),Se=this.slice(ee,X),we=y.slice(C,W),Ee=0;Ee<he;++Ee)if(Se[Ee]!==we[Ee]){ne=Se[Ee],ie=we[Ee];break}return ne<ie?-1:ie<ne?1:0},u.prototype.includes=function(y,C,W){return this.indexOf(y,C,W)!==-1},u.prototype.indexOf=function(y,C,W){return N(this,y,C,W,!0)},u.prototype.lastIndexOf=function(y,C,W){return N(this,y,C,W,!1)},u.prototype.write=function(y,C,W,ee){if(C===void 0)ee="utf8",W=this.length,C=0;else if(W===void 0&&typeof C=="string")ee=C,W=this.length,C=0;else{if(!isFinite(C))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");C|=0,isFinite(W)?(W|=0,ee===void 0&&(ee="utf8")):(ee=W,W=void 0)}var X=this.length-C;if((W===void 0||W>X)&&(W=X),y.length>0&&(W<0||C<0)||C>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");for(var ne=!1;;)switch(ee){case"hex":return R(this,y,C,W);case"utf8":case"utf-8":return d(this,y,C,W);case"ascii":return I(this,y,C,W);case"latin1":case"binary":return Q(this,y,C,W);case"base64":return Z(this,y,C,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h(this,y,C,W);default:if(ne)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),ne=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function m(y,C,W){var ee="";W=Math.min(y.length,W);for(var X=C;X<W;++X)ee+=String.fromCharCode(127&y[X]);return ee}function x(y,C,W){var ee="";W=Math.min(y.length,W);for(var X=C;X<W;++X)ee+=String.fromCharCode(y[X]);return ee}function F(y,C,W){var ee=y.length;(!C||C<0)&&(C=0),(!W||W<0||W>ee)&&(W=ee);for(var X="",ne=C;ne<W;++ne)X+=Y(y[ne]);return X}function D(y,C,W){for(var ee=y.slice(C,W),X="",ne=0;ne<ee.length;ne+=2)X+=String.fromCharCode(ee[ne]+256*ee[ne+1]);return X}function O(y,C,W){if(y%1!=0||y<0)throw new RangeError("offset is not uint");if(y+C>W)throw new RangeError("Trying to access beyond buffer length")}function L(y,C,W,ee,X,ne){if(!u.isBuffer(y))throw new TypeError('"buffer" argument must be a Buffer instance');if(C>X||C<ne)throw new RangeError('"value" argument is out of bounds');if(W+ee>y.length)throw new RangeError("Index out of range")}function k(y,C,W,ee){C<0&&(C=65535+C+1);for(var X=0,ne=Math.min(y.length-W,2);X<ne;++X)y[W+X]=(C&255<<8*(ee?X:1-X))>>>8*(ee?X:1-X)}function E(y,C,W,ee){C<0&&(C=4294967295+C+1);for(var X=0,ne=Math.min(y.length-W,4);X<ne;++X)y[W+X]=C>>>8*(ee?X:3-X)&255}function g(y,C,W,ee,X,ne){if(W+ee>y.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("Index out of range")}function U(y,C,W,ee,X){return X||g(y,0,W,4),l.write(y,C,W,ee,23,4),W+4}function B(y,C,W,ee,X){return X||g(y,0,W,8),l.write(y,C,W,ee,52,8),W+8}u.prototype.slice=function(y,C){var W,ee=this.length;if((y=~~y)<0?(y+=ee)<0&&(y=0):y>ee&&(y=ee),(C=C===void 0?ee:~~C)<0?(C+=ee)<0&&(C=0):C>ee&&(C=ee),C<y&&(C=y),u.TYPED_ARRAY_SUPPORT)(W=this.subarray(y,C)).__proto__=u.prototype;else{var X=C-y;W=new u(X,void 0);for(var ne=0;ne<X;++ne)W[ne]=this[ne+y]}return W},u.prototype.readUIntLE=function(y,C,W){y|=0,C|=0,W||O(y,C,this.length);for(var ee=this[y],X=1,ne=0;++ne<C&&(X*=256);)ee+=this[y+ne]*X;return ee},u.prototype.readUIntBE=function(y,C,W){y|=0,C|=0,W||O(y,C,this.length);for(var ee=this[y+--C],X=1;C>0&&(X*=256);)ee+=this[y+--C]*X;return ee},u.prototype.readUInt8=function(y,C){return C||O(y,1,this.length),this[y]},u.prototype.readUInt16LE=function(y,C){return C||O(y,2,this.length),this[y]|this[y+1]<<8},u.prototype.readUInt16BE=function(y,C){return C||O(y,2,this.length),this[y]<<8|this[y+1]},u.prototype.readUInt32LE=function(y,C){return C||O(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+16777216*this[y+3]},u.prototype.readUInt32BE=function(y,C){return C||O(y,4,this.length),16777216*this[y]+(this[y+1]<<16|this[y+2]<<8|this[y+3])},u.prototype.readIntLE=function(y,C,W){y|=0,C|=0,W||O(y,C,this.length);for(var ee=this[y],X=1,ne=0;++ne<C&&(X*=256);)ee+=this[y+ne]*X;return ee>=(X*=128)&&(ee-=Math.pow(2,8*C)),ee},u.prototype.readIntBE=function(y,C,W){y|=0,C|=0,W||O(y,C,this.length);for(var ee=C,X=1,ne=this[y+--ee];ee>0&&(X*=256);)ne+=this[y+--ee]*X;return ne>=(X*=128)&&(ne-=Math.pow(2,8*C)),ne},u.prototype.readInt8=function(y,C){return C||O(y,1,this.length),128&this[y]?-1*(255-this[y]+1):this[y]},u.prototype.readInt16LE=function(y,C){C||O(y,2,this.length);var W=this[y]|this[y+1]<<8;return 32768&W?4294901760|W:W},u.prototype.readInt16BE=function(y,C){C||O(y,2,this.length);var W=this[y+1]|this[y]<<8;return 32768&W?4294901760|W:W},u.prototype.readInt32LE=function(y,C){return C||O(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},u.prototype.readInt32BE=function(y,C){return C||O(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},u.prototype.readFloatLE=function(y,C){return C||O(y,4,this.length),l.read(this,y,!0,23,4)},u.prototype.readFloatBE=function(y,C){return C||O(y,4,this.length),l.read(this,y,!1,23,4)},u.prototype.readDoubleLE=function(y,C){return C||O(y,8,this.length),l.read(this,y,!0,52,8)},u.prototype.readDoubleBE=function(y,C){return C||O(y,8,this.length),l.read(this,y,!1,52,8)},u.prototype.writeUIntLE=function(y,C,W,ee){y=+y,C|=0,W|=0,ee||L(this,y,C,W,Math.pow(2,8*W)-1,0);var X=1,ne=0;for(this[C]=255&y;++ne<W&&(X*=256);)this[C+ne]=y/X&255;return C+W},u.prototype.writeUIntBE=function(y,C,W,ee){y=+y,C|=0,W|=0,ee||L(this,y,C,W,Math.pow(2,8*W)-1,0);var X=W-1,ne=1;for(this[C+X]=255&y;--X>=0&&(ne*=256);)this[C+X]=y/ne&255;return C+W},u.prototype.writeUInt8=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,1,255,0),u.TYPED_ARRAY_SUPPORT||(y=Math.floor(y)),this[C]=255&y,C+1},u.prototype.writeUInt16LE=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[C]=255&y,this[C+1]=y>>>8):k(this,y,C,!0),C+2},u.prototype.writeUInt16BE=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[C]=y>>>8,this[C+1]=255&y):k(this,y,C,!1),C+2},u.prototype.writeUInt32LE=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[C+3]=y>>>24,this[C+2]=y>>>16,this[C+1]=y>>>8,this[C]=255&y):E(this,y,C,!0),C+4},u.prototype.writeUInt32BE=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[C]=y>>>24,this[C+1]=y>>>16,this[C+2]=y>>>8,this[C+3]=255&y):E(this,y,C,!1),C+4},u.prototype.writeIntLE=function(y,C,W,ee){if(y=+y,C|=0,!ee){var X=Math.pow(2,8*W-1);L(this,y,C,W,X-1,-X)}var ne=0,ie=1,he=0;for(this[C]=255&y;++ne<W&&(ie*=256);)y<0&&he===0&&this[C+ne-1]!==0&&(he=1),this[C+ne]=(y/ie>>0)-he&255;return C+W},u.prototype.writeIntBE=function(y,C,W,ee){if(y=+y,C|=0,!ee){var X=Math.pow(2,8*W-1);L(this,y,C,W,X-1,-X)}var ne=W-1,ie=1,he=0;for(this[C+ne]=255&y;--ne>=0&&(ie*=256);)y<0&&he===0&&this[C+ne+1]!==0&&(he=1),this[C+ne]=(y/ie>>0)-he&255;return C+W},u.prototype.writeInt8=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,1,127,-128),u.TYPED_ARRAY_SUPPORT||(y=Math.floor(y)),y<0&&(y=255+y+1),this[C]=255&y,C+1},u.prototype.writeInt16LE=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[C]=255&y,this[C+1]=y>>>8):k(this,y,C,!0),C+2},u.prototype.writeInt16BE=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[C]=y>>>8,this[C+1]=255&y):k(this,y,C,!1),C+2},u.prototype.writeInt32LE=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[C]=255&y,this[C+1]=y>>>8,this[C+2]=y>>>16,this[C+3]=y>>>24):E(this,y,C,!0),C+4},u.prototype.writeInt32BE=function(y,C,W){return y=+y,C|=0,W||L(this,y,C,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),u.TYPED_ARRAY_SUPPORT?(this[C]=y>>>24,this[C+1]=y>>>16,this[C+2]=y>>>8,this[C+3]=255&y):E(this,y,C,!1),C+4},u.prototype.writeFloatLE=function(y,C,W){return U(this,y,C,!0,W)},u.prototype.writeFloatBE=function(y,C,W){return U(this,y,C,!1,W)},u.prototype.writeDoubleLE=function(y,C,W){return B(this,y,C,!0,W)},u.prototype.writeDoubleBE=function(y,C,W){return B(this,y,C,!1,W)},u.prototype.copy=function(y,C,W,ee){if(W||(W=0),ee||ee===0||(ee=this.length),C>=y.length&&(C=y.length),C||(C=0),ee>0&&ee<W&&(ee=W),ee===W||y.length===0||this.length===0)return 0;if(C<0)throw new RangeError("targetStart out of bounds");if(W<0||W>=this.length)throw new RangeError("sourceStart out of bounds");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),y.length-C<ee-W&&(ee=y.length-C+W);var X,ne=ee-W;if(this===y&&W<C&&C<ee)for(X=ne-1;X>=0;--X)y[X+C]=this[X+W];else if(ne<1e3||!u.TYPED_ARRAY_SUPPORT)for(X=0;X<ne;++X)y[X+C]=this[X+W];else Uint8Array.prototype.set.call(y,this.subarray(W,W+ne),C);return ne},u.prototype.fill=function(y,C,W,ee){if(typeof y=="string"){if(typeof C=="string"?(ee=C,C=0,W=this.length):typeof W=="string"&&(ee=W,W=this.length),y.length===1){var X=y.charCodeAt(0);X<256&&(y=X)}if(ee!==void 0&&typeof ee!="string")throw new TypeError("encoding must be a string");if(typeof ee=="string"&&!u.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee)}else typeof y=="number"&&(y&=255);if(C<0||this.length<C||this.length<W)throw new RangeError("Out of range index");if(W<=C)return this;var ne;if(C>>>=0,W=W===void 0?this.length:W>>>0,y||(y=0),typeof y=="number")for(ne=C;ne<W;++ne)this[ne]=y;else{var ie=u.isBuffer(y)?y:K(new u(y,ee).toString()),he=ie.length;for(ne=0;ne<W-C;++ne)this[ne+C]=ie[ne%he]}return this};var G=/[^+\/0-9A-Za-z-_]/g;function Y(y){return y<16?"0"+y.toString(16):y.toString(16)}function K(y,C){var W;C=C||1/0;for(var ee=y.length,X=null,ne=[],ie=0;ie<ee;++ie){if((W=y.charCodeAt(ie))>55295&&W<57344){if(!X){if(W>56319){(C-=3)>-1&&ne.push(239,191,189);continue}if(ie+1===ee){(C-=3)>-1&&ne.push(239,191,189);continue}X=W;continue}if(W<56320){(C-=3)>-1&&ne.push(239,191,189),X=W;continue}W=65536+(X-55296<<10|W-56320)}else X&&(C-=3)>-1&&ne.push(239,191,189);if(X=null,W<128){if((C-=1)<0)break;ne.push(W)}else if(W<2048){if((C-=2)<0)break;ne.push(W>>6|192,63&W|128)}else if(W<65536){if((C-=3)<0)break;ne.push(W>>12|224,W>>6&63|128,63&W|128)}else{if(!(W<1114112))throw new Error("Invalid code point");if((C-=4)<0)break;ne.push(W>>18|240,W>>12&63|128,W>>6&63|128,63&W|128)}}return ne}function H(y){return o.toByteArray(function(C){if((C=function(W){return W.trim?W.trim():W.replace(/^\s+|\s+$/g,"")}(C).replace(G,"")).length<2)return"";for(;C.length%4!=0;)C+="=";return C}(y))}function V(y,C,W,ee){for(var X=0;X<ee&&!(X+W>=C.length||X>=y.length);++X)C[X+W]=y[X];return X}}).call(this,r(5))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}e.exports=r},function(e,t,r){(function(n){r.d(t,"a",function(){return s}),r.d(t,"i",function(){return i}),r.d(t,"j",function(){return c}),r.d(t,"b",function(){return u}),r.d(t,"f",function(){return b}),r.d(t,"e",function(){return A}),r.d(t,"g",function(){return _}),r.d(t,"d",function(){return v}),r.d(t,"c",function(){return f}),r.d(t,"h",function(){return S});var o=r(98);const l=o.from(Object.assign(Object.assign({},n.env),{ENVIRONMENT:n.env.ENV,APP:"realtime-sdk",NAMESPACE:"production",VERSION:n.env.VERSION,BUILD_TAG:n.env.BUILD_TAG,GIT_COMMIT:n.env.GIT_COMMIT,LOG_LEVEL:n.env.LOG_LEVEL,LOG_JSON:"false",LOG_API_ENDPOINT:n.env.LOG_API_ENDPOINT,JEST_WORKER_ID:n.env.JEST_WORKER_ID,ENABLE_SENTRY:n.env.ENABLE_SENTRY,SENTRY_DSN:n.env.SENTRY_DSN,STABLE_AGENT_VERSION:n.env.STABLE_AGENT_VERSION})),s=(l.get("ENVIRONMENT").default("").asString(),l.get("APP").default("").asString()),i=(l.get("APP_PATH").default("").asString(),l.get("API_ENDPOINT").default("").asString(),l.get("NAMESPACE").default("").asString()),c=l.get("VERSION").default("").asString(),u=l.get("BUILD_TAG").default("").asString(),b=(l.get("GIT_COMMIT").default("").asString(),l.get("ENABLE_SENTRY").default("false").asBool(),l.get("SENTRY_DSN").default("").asString(),l.get("LOG_LEVEL").default("debug").asString()),A=l.get("LOG_JSON").default("true").asBool(),_=l.get("LOG_TO_CONSOLE").default("true").asBool(),v=(l.get("STABLE_AGENT_VERSION").default("").asString(),l.get("LOG_API_ENDPOINT").asString()),f=l.get("JEST_WORKER_ID").asString(),S=(l.get("SHEET_EXPORT_MAX_ROW_COUNT").default("10000").asIntPositive(),l.get("LOG_TO_FILE").default("false").asBoolStrict())}).call(this,r(2))},function(e,t){typeof Object.create=="function"?e.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(r,n){if(n){r.super_=n;var o=function(){};o.prototype=n.prototype,r.prototype=new o,r.prototype.constructor=r}}},function(e,t,r){var n=r(95),o=n,l=Function("return this")(),s=r(94);o.object.extend(proto,s),o.exportSymbol("proto.v1.signaling.api.CreatePeerRequest",null,l),o.exportSymbol("proto.v1.signaling.api.CreatePeerResponse",null,l),o.exportSymbol("proto.v1.signaling.api.DeletePeerRequest",null,l),o.exportSymbol("proto.v1.signaling.api.DeletePeerResponse",null,l),o.exportSymbol("proto.v1.signaling.api.GetIceServersRequest",null,l),o.exportSymbol("proto.v1.signaling.api.GetIceServersResponse",null,l),o.exportSymbol("proto.v1.signaling.api.GetPeersRequest",null,l),o.exportSymbol("proto.v1.signaling.api.GetPeersResponse",null,l),o.exportSymbol("proto.v1.signaling.api.Peer",null,l),o.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamRequest",null,l),o.exportSymbol("proto.v1.signaling.api.ReceiveSignalStreamResponse",null,l),o.exportSymbol("proto.v1.signaling.api.RefreshPeerRequest",null,l),o.exportSymbol("proto.v1.signaling.api.RefreshPeerResponse",null,l),o.exportSymbol("proto.v1.signaling.api.SendSignalRequest",null,l),o.exportSymbol("proto.v1.signaling.api.SendSignalResponse",null,l),o.exportSymbol("proto.v1.signaling.api.SessionType",null,l),o.exportSymbol("proto.v1.signaling.api.Signal",null,l),proto.v1.signaling.api.Peer=function(i){n.Message.initialize(this,i,0,-1,proto.v1.signaling.api.Peer.repeatedFields_,null)},o.inherits(proto.v1.signaling.api.Peer,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Peer.displayName="proto.v1.signaling.api.Peer"),proto.v1.signaling.api.Signal=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.Signal,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.Signal.displayName="proto.v1.signaling.api.Signal"),proto.v1.signaling.api.CreatePeerRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.CreatePeerRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerRequest.displayName="proto.v1.signaling.api.CreatePeerRequest"),proto.v1.signaling.api.CreatePeerResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.CreatePeerResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.CreatePeerResponse.displayName="proto.v1.signaling.api.CreatePeerResponse"),proto.v1.signaling.api.DeletePeerRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.DeletePeerRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerRequest.displayName="proto.v1.signaling.api.DeletePeerRequest"),proto.v1.signaling.api.DeletePeerResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.DeletePeerResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.DeletePeerResponse.displayName="proto.v1.signaling.api.DeletePeerResponse"),proto.v1.signaling.api.RefreshPeerRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.RefreshPeerRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerRequest.displayName="proto.v1.signaling.api.RefreshPeerRequest"),proto.v1.signaling.api.RefreshPeerResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.RefreshPeerResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.RefreshPeerResponse.displayName="proto.v1.signaling.api.RefreshPeerResponse"),proto.v1.signaling.api.GetPeersRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetPeersRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersRequest.displayName="proto.v1.signaling.api.GetPeersRequest"),proto.v1.signaling.api.GetPeersResponse=function(i){n.Message.initialize(this,i,0,-1,proto.v1.signaling.api.GetPeersResponse.repeatedFields_,null)},o.inherits(proto.v1.signaling.api.GetPeersResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetPeersResponse.displayName="proto.v1.signaling.api.GetPeersResponse"),proto.v1.signaling.api.GetIceServersRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetIceServersRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersRequest.displayName="proto.v1.signaling.api.GetIceServersRequest"),proto.v1.signaling.api.GetIceServersResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.GetIceServersResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.GetIceServersResponse.displayName="proto.v1.signaling.api.GetIceServersResponse"),proto.v1.signaling.api.SendSignalRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.SendSignalRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalRequest.displayName="proto.v1.signaling.api.SendSignalRequest"),proto.v1.signaling.api.SendSignalResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.SendSignalResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.SendSignalResponse.displayName="proto.v1.signaling.api.SendSignalResponse"),proto.v1.signaling.api.ReceiveSignalStreamRequest=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.ReceiveSignalStreamRequest,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.displayName="proto.v1.signaling.api.ReceiveSignalStreamRequest"),proto.v1.signaling.api.ReceiveSignalStreamResponse=function(i){n.Message.initialize(this,i,0,-1,null,null)},o.inherits(proto.v1.signaling.api.ReceiveSignalStreamResponse,n.Message),o.DEBUG&&!COMPILED&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.displayName="proto.v1.signaling.api.ReceiveSignalStreamResponse"),proto.v1.signaling.api.Peer.repeatedFields_=[5],n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Peer.prototype.toObject=function(i){return proto.v1.signaling.api.Peer.toObject(i,this)},proto.v1.signaling.api.Peer.toObject=function(i,c){var u,b={peerId:n.Message.getFieldWithDefault(c,1,""),organizationId:n.Message.getFieldWithDefault(c,2,""),userId:(u=c.getUserId())&&s.StringValue.toObject(i,u),deviceId:(u=c.getDeviceId())&&s.StringValue.toObject(i,u),sessionIdsList:(u=n.Message.getRepeatedField(c,5))==null?void 0:u,peerCreatedTimestamp:(u=c.getPeerCreatedTimestamp())&&s.Int64Value.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.Peer.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.Peer;return proto.v1.signaling.api.Peer.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.Peer.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setPeerId(u);break;case 2:u=c.readString(),i.setOrganizationId(u);break;case 3:u=new s.StringValue,c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setUserId(u);break;case 4:u=new s.StringValue,c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setDeviceId(u);break;case 5:u=c.readString(),i.addSessionIds(u);break;case 6:u=new s.Int64Value,c.readMessage(u,s.Int64Value.deserializeBinaryFromReader),i.setPeerCreatedTimestamp(u);break;default:c.skipField()}return i},proto.v1.signaling.api.Peer.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.Peer.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.Peer.serializeBinaryToWriter=function(i,c){var u=void 0;(u=i.getPeerId()).length>0&&c.writeString(1,u),(u=i.getOrganizationId()).length>0&&c.writeString(2,u),(u=i.getUserId())!=null&&c.writeMessage(3,u,s.StringValue.serializeBinaryToWriter),(u=i.getDeviceId())!=null&&c.writeMessage(4,u,s.StringValue.serializeBinaryToWriter),(u=i.getSessionIdsList()).length>0&&c.writeRepeatedString(5,u),(u=i.getPeerCreatedTimestamp())!=null&&c.writeMessage(6,u,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.Peer.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.Peer.prototype.setPeerId=function(i){return n.Message.setProto3StringField(this,1,i)},proto.v1.signaling.api.Peer.prototype.getOrganizationId=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.v1.signaling.api.Peer.prototype.setOrganizationId=function(i){return n.Message.setProto3StringField(this,2,i)},proto.v1.signaling.api.Peer.prototype.getUserId=function(){return n.Message.getWrapperField(this,s.StringValue,3)},proto.v1.signaling.api.Peer.prototype.setUserId=function(i){return n.Message.setWrapperField(this,3,i)},proto.v1.signaling.api.Peer.prototype.clearUserId=function(){return this.setUserId(void 0)},proto.v1.signaling.api.Peer.prototype.hasUserId=function(){return n.Message.getField(this,3)!=null},proto.v1.signaling.api.Peer.prototype.getDeviceId=function(){return n.Message.getWrapperField(this,s.StringValue,4)},proto.v1.signaling.api.Peer.prototype.setDeviceId=function(i){return n.Message.setWrapperField(this,4,i)},proto.v1.signaling.api.Peer.prototype.clearDeviceId=function(){return this.setDeviceId(void 0)},proto.v1.signaling.api.Peer.prototype.hasDeviceId=function(){return n.Message.getField(this,4)!=null},proto.v1.signaling.api.Peer.prototype.getSessionIdsList=function(){return n.Message.getRepeatedField(this,5)},proto.v1.signaling.api.Peer.prototype.setSessionIdsList=function(i){return n.Message.setField(this,5,i||[])},proto.v1.signaling.api.Peer.prototype.addSessionIds=function(i,c){return n.Message.addToRepeatedField(this,5,i,c)},proto.v1.signaling.api.Peer.prototype.clearSessionIdsList=function(){return this.setSessionIdsList([])},proto.v1.signaling.api.Peer.prototype.getPeerCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,6)},proto.v1.signaling.api.Peer.prototype.setPeerCreatedTimestamp=function(i){return n.Message.setWrapperField(this,6,i)},proto.v1.signaling.api.Peer.prototype.clearPeerCreatedTimestamp=function(){return this.setPeerCreatedTimestamp(void 0)},proto.v1.signaling.api.Peer.prototype.hasPeerCreatedTimestamp=function(){return n.Message.getField(this,6)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.Signal.prototype.toObject=function(i){return proto.v1.signaling.api.Signal.toObject(i,this)},proto.v1.signaling.api.Signal.toObject=function(i,c){var u,b={sessionId:(u=c.getSessionId())&&s.StringValue.toObject(i,u),sessionCreatedTimestamp:(u=c.getSessionCreatedTimestamp())&&s.Int64Value.toObject(i,u),senderId:n.Message.getFieldWithDefault(c,3,""),receiverId:n.Message.getFieldWithDefault(c,4,""),payload:n.Message.getFieldWithDefault(c,5,""),iceServers:n.Message.getFieldWithDefault(c,6,""),iceTransportPolicy:n.Message.getFieldWithDefault(c,7,""),sessionType:n.Message.getFieldWithDefault(c,8,0)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.Signal.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.Signal;return proto.v1.signaling.api.Signal.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.Signal.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new s.StringValue;c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setSessionId(u);break;case 2:u=new s.Int64Value,c.readMessage(u,s.Int64Value.deserializeBinaryFromReader),i.setSessionCreatedTimestamp(u);break;case 3:u=c.readString(),i.setSenderId(u);break;case 4:u=c.readString(),i.setReceiverId(u);break;case 5:u=c.readString(),i.setPayload(u);break;case 6:u=c.readString(),i.setIceServers(u);break;case 7:u=c.readString(),i.setIceTransportPolicy(u);break;case 8:u=c.readEnum(),i.setSessionType(u);break;default:c.skipField()}return i},proto.v1.signaling.api.Signal.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.Signal.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.Signal.serializeBinaryToWriter=function(i,c){var u=void 0;(u=i.getSessionId())!=null&&c.writeMessage(1,u,s.StringValue.serializeBinaryToWriter),(u=i.getSessionCreatedTimestamp())!=null&&c.writeMessage(2,u,s.Int64Value.serializeBinaryToWriter),(u=i.getSenderId()).length>0&&c.writeString(3,u),(u=i.getReceiverId()).length>0&&c.writeString(4,u),(u=i.getPayload()).length>0&&c.writeString(5,u),(u=i.getIceServers()).length>0&&c.writeString(6,u),(u=i.getIceTransportPolicy()).length>0&&c.writeString(7,u),(u=i.getSessionType())!==0&&c.writeEnum(8,u)},proto.v1.signaling.api.Signal.prototype.getSessionId=function(){return n.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.Signal.prototype.setSessionId=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.Signal.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionId=function(){return n.Message.getField(this,1)!=null},proto.v1.signaling.api.Signal.prototype.getSessionCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.Signal.prototype.setSessionCreatedTimestamp=function(i){return n.Message.setWrapperField(this,2,i)},proto.v1.signaling.api.Signal.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.Signal.prototype.hasSessionCreatedTimestamp=function(){return n.Message.getField(this,2)!=null},proto.v1.signaling.api.Signal.prototype.getSenderId=function(){return n.Message.getFieldWithDefault(this,3,"")},proto.v1.signaling.api.Signal.prototype.setSenderId=function(i){return n.Message.setProto3StringField(this,3,i)},proto.v1.signaling.api.Signal.prototype.getReceiverId=function(){return n.Message.getFieldWithDefault(this,4,"")},proto.v1.signaling.api.Signal.prototype.setReceiverId=function(i){return n.Message.setProto3StringField(this,4,i)},proto.v1.signaling.api.Signal.prototype.getPayload=function(){return n.Message.getFieldWithDefault(this,5,"")},proto.v1.signaling.api.Signal.prototype.setPayload=function(i){return n.Message.setProto3StringField(this,5,i)},proto.v1.signaling.api.Signal.prototype.getIceServers=function(){return n.Message.getFieldWithDefault(this,6,"")},proto.v1.signaling.api.Signal.prototype.setIceServers=function(i){return n.Message.setProto3StringField(this,6,i)},proto.v1.signaling.api.Signal.prototype.getIceTransportPolicy=function(){return n.Message.getFieldWithDefault(this,7,"")},proto.v1.signaling.api.Signal.prototype.setIceTransportPolicy=function(i){return n.Message.setProto3StringField(this,7,i)},proto.v1.signaling.api.Signal.prototype.getSessionType=function(){return n.Message.getFieldWithDefault(this,8,0)},proto.v1.signaling.api.Signal.prototype.setSessionType=function(i){return n.Message.setProto3EnumField(this,8,i)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerRequest.prototype.toObject=function(i){return proto.v1.signaling.api.CreatePeerRequest.toObject(i,this)},proto.v1.signaling.api.CreatePeerRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.CreatePeerRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.CreatePeerRequest;return proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.CreatePeerRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.CreatePeerRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.CreatePeerRequest.serializeBinaryToWriter=function(i,c){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.CreatePeerResponse.prototype.toObject=function(i){return proto.v1.signaling.api.CreatePeerResponse.toObject(i,this)},proto.v1.signaling.api.CreatePeerResponse.toObject=function(i,c){var u,b={peer:(u=c.getPeer())&&proto.v1.signaling.api.Peer.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.CreatePeerResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.CreatePeerResponse;return proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.CreatePeerResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),i.setPeer(u);break;default:c.skipField()}return i},proto.v1.signaling.api.CreatePeerResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.CreatePeerResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeer())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.CreatePeerResponse.prototype.getPeer=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.CreatePeerResponse.prototype.setPeer=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.CreatePeerResponse.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.CreatePeerResponse.prototype.hasPeer=function(){return n.Message.getField(this,1)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerRequest.prototype.toObject=function(i){return proto.v1.signaling.api.DeletePeerRequest.toObject(i,this)},proto.v1.signaling.api.DeletePeerRequest.toObject=function(i,c){var u={peerId:n.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.DeletePeerRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.DeletePeerRequest;return proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.DeletePeerRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setPeerId(u);break;default:c.skipField()}return i},proto.v1.signaling.api.DeletePeerRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.DeletePeerRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeerId()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.DeletePeerRequest.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.DeletePeerRequest.prototype.setPeerId=function(i){return n.Message.setProto3StringField(this,1,i)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.DeletePeerResponse.prototype.toObject=function(i){return proto.v1.signaling.api.DeletePeerResponse.toObject(i,this)},proto.v1.signaling.api.DeletePeerResponse.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.DeletePeerResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.DeletePeerResponse;return proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.DeletePeerResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.DeletePeerResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.DeletePeerResponse.serializeBinaryToWriter=function(i,c){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerRequest.prototype.toObject=function(i){return proto.v1.signaling.api.RefreshPeerRequest.toObject(i,this)},proto.v1.signaling.api.RefreshPeerRequest.toObject=function(i,c){var u,b={peer:(u=c.getPeer())&&proto.v1.signaling.api.Peer.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.RefreshPeerRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.RefreshPeerRequest;return proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.RefreshPeerRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),i.setPeer(u);break;default:c.skipField()}return i},proto.v1.signaling.api.RefreshPeerRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.RefreshPeerRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeer())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.RefreshPeerRequest.prototype.getPeer=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.RefreshPeerRequest.prototype.setPeer=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.RefreshPeerRequest.prototype.clearPeer=function(){return this.setPeer(void 0)},proto.v1.signaling.api.RefreshPeerRequest.prototype.hasPeer=function(){return n.Message.getField(this,1)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.RefreshPeerResponse.prototype.toObject=function(i){return proto.v1.signaling.api.RefreshPeerResponse.toObject(i,this)},proto.v1.signaling.api.RefreshPeerResponse.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.RefreshPeerResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.RefreshPeerResponse;return proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.RefreshPeerResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.RefreshPeerResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.RefreshPeerResponse.serializeBinaryToWriter=function(i,c){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersRequest.prototype.toObject=function(i){return proto.v1.signaling.api.GetPeersRequest.toObject(i,this)},proto.v1.signaling.api.GetPeersRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetPeersRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.GetPeersRequest;return proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetPeersRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.GetPeersRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetPeersRequest.serializeBinaryToWriter=function(i,c){},proto.v1.signaling.api.GetPeersResponse.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetPeersResponse.prototype.toObject=function(i){return proto.v1.signaling.api.GetPeersResponse.toObject(i,this)},proto.v1.signaling.api.GetPeersResponse.toObject=function(i,c){var u={peersList:n.Message.toObjectList(c.getPeersList(),proto.v1.signaling.api.Peer.toObject,i)};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetPeersResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.GetPeersResponse;return proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetPeersResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Peer;c.readMessage(u,proto.v1.signaling.api.Peer.deserializeBinaryFromReader),i.addPeers(u);break;default:c.skipField()}return i},proto.v1.signaling.api.GetPeersResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetPeersResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeersList()).length>0&&c.writeRepeatedMessage(1,u,proto.v1.signaling.api.Peer.serializeBinaryToWriter)},proto.v1.signaling.api.GetPeersResponse.prototype.getPeersList=function(){return n.Message.getRepeatedWrapperField(this,proto.v1.signaling.api.Peer,1)},proto.v1.signaling.api.GetPeersResponse.prototype.setPeersList=function(i){return n.Message.setRepeatedWrapperField(this,1,i)},proto.v1.signaling.api.GetPeersResponse.prototype.addPeers=function(i,c){return n.Message.addToRepeatedWrapperField(this,1,i,proto.v1.signaling.api.Peer,c)},proto.v1.signaling.api.GetPeersResponse.prototype.clearPeersList=function(){return this.setPeersList([])},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersRequest.prototype.toObject=function(i){return proto.v1.signaling.api.GetIceServersRequest.toObject(i,this)},proto.v1.signaling.api.GetIceServersRequest.toObject=function(i,c){var u={};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetIceServersRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.GetIceServersRequest;return proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetIceServersRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)c.getFieldNumber(),c.skipField();return i},proto.v1.signaling.api.GetIceServersRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetIceServersRequest.serializeBinaryToWriter=function(i,c){},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.GetIceServersResponse.prototype.toObject=function(i){return proto.v1.signaling.api.GetIceServersResponse.toObject(i,this)},proto.v1.signaling.api.GetIceServersResponse.toObject=function(i,c){var u={iceServers:n.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.GetIceServersResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.GetIceServersResponse;return proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.GetIceServersResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setIceServers(u);break;default:c.skipField()}return i},proto.v1.signaling.api.GetIceServersResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.GetIceServersResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getIceServers()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.GetIceServersResponse.prototype.getIceServers=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.GetIceServersResponse.prototype.setIceServers=function(i){return n.Message.setProto3StringField(this,1,i)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalRequest.prototype.toObject=function(i){return proto.v1.signaling.api.SendSignalRequest.toObject(i,this)},proto.v1.signaling.api.SendSignalRequest.toObject=function(i,c){var u,b={signal:(u=c.getSignal())&&proto.v1.signaling.api.Signal.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.SendSignalRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.SendSignalRequest;return proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.SendSignalRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Signal;c.readMessage(u,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),i.setSignal(u);break;default:c.skipField()}return i},proto.v1.signaling.api.SendSignalRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.SendSignalRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getSignal())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalRequest.prototype.getSignal=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.SendSignalRequest.prototype.setSignal=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.SendSignalRequest.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.SendSignalRequest.prototype.hasSignal=function(){return n.Message.getField(this,1)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.SendSignalResponse.prototype.toObject=function(i){return proto.v1.signaling.api.SendSignalResponse.toObject(i,this)},proto.v1.signaling.api.SendSignalResponse.toObject=function(i,c){var u,b={sessionId:(u=c.getSessionId())&&s.StringValue.toObject(i,u),sessionCreatedTimestamp:(u=c.getSessionCreatedTimestamp())&&s.Int64Value.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.SendSignalResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.SendSignalResponse;return proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.SendSignalResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new s.StringValue;c.readMessage(u,s.StringValue.deserializeBinaryFromReader),i.setSessionId(u);break;case 2:u=new s.Int64Value,c.readMessage(u,s.Int64Value.deserializeBinaryFromReader),i.setSessionCreatedTimestamp(u);break;default:c.skipField()}return i},proto.v1.signaling.api.SendSignalResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.SendSignalResponse.serializeBinaryToWriter=function(i,c){var u=void 0;(u=i.getSessionId())!=null&&c.writeMessage(1,u,s.StringValue.serializeBinaryToWriter),(u=i.getSessionCreatedTimestamp())!=null&&c.writeMessage(2,u,s.Int64Value.serializeBinaryToWriter)},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionId=function(){return n.Message.getWrapperField(this,s.StringValue,1)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionId=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionId=function(){return this.setSessionId(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionId=function(){return n.Message.getField(this,1)!=null},proto.v1.signaling.api.SendSignalResponse.prototype.getSessionCreatedTimestamp=function(){return n.Message.getWrapperField(this,s.Int64Value,2)},proto.v1.signaling.api.SendSignalResponse.prototype.setSessionCreatedTimestamp=function(i){return n.Message.setWrapperField(this,2,i)},proto.v1.signaling.api.SendSignalResponse.prototype.clearSessionCreatedTimestamp=function(){return this.setSessionCreatedTimestamp(void 0)},proto.v1.signaling.api.SendSignalResponse.prototype.hasSessionCreatedTimestamp=function(){return n.Message.getField(this,2)!=null},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.toObject=function(i){return proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject(i,this)},proto.v1.signaling.api.ReceiveSignalStreamRequest.toObject=function(i,c){var u={peerId:n.Message.getFieldWithDefault(c,1,"")};return i&&(u.$jspbMessageInstance=c),u}),proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.ReceiveSignalStreamRequest;return proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.ReceiveSignalStreamRequest.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=c.readString();i.setPeerId(u);break;default:c.skipField()}return i},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamRequest.serializeBinaryToWriter=function(i,c){var u;(u=i.getPeerId()).length>0&&c.writeString(1,u)},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.getPeerId=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.v1.signaling.api.ReceiveSignalStreamRequest.prototype.setPeerId=function(i){return n.Message.setProto3StringField(this,1,i)},n.Message.GENERATE_TO_OBJECT&&(proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.toObject=function(i){return proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject(i,this)},proto.v1.signaling.api.ReceiveSignalStreamResponse.toObject=function(i,c){var u,b={signal:(u=c.getSignal())&&proto.v1.signaling.api.Signal.toObject(i,u)};return i&&(b.$jspbMessageInstance=c),b}),proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary=function(i){var c=new n.BinaryReader(i),u=new proto.v1.signaling.api.ReceiveSignalStreamResponse;return proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader(u,c)},proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinaryFromReader=function(i,c){for(;c.nextField()&&!c.isEndGroup();)switch(c.getFieldNumber()){case 1:var u=new proto.v1.signaling.api.Signal;c.readMessage(u,proto.v1.signaling.api.Signal.deserializeBinaryFromReader),i.setSignal(u);break;default:c.skipField()}return i},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.serializeBinary=function(){var i=new n.BinaryWriter;return proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter(this,i),i.getResultBuffer()},proto.v1.signaling.api.ReceiveSignalStreamResponse.serializeBinaryToWriter=function(i,c){var u;(u=i.getSignal())!=null&&c.writeMessage(1,u,proto.v1.signaling.api.Signal.serializeBinaryToWriter)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.getSignal=function(){return n.Message.getWrapperField(this,proto.v1.signaling.api.Signal,1)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.setSignal=function(i){return n.Message.setWrapperField(this,1,i)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.clearSignal=function(){return this.setSignal(void 0)},proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.hasSignal=function(){return n.Message.getField(this,1)!=null},proto.v1.signaling.api.SessionType={UNKNOWN:0,TELEOP:1,PORT_FORWARD:2,OBSERVE:3},o.object.extend(t,proto.v1.signaling.api)},function(e,t,r){function n(_){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(_)}function o(_,v){return!v||n(v)!=="object"&&typeof v!="function"?l(_):v}function l(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function s(_){var v=typeof Map=="function"?new Map:void 0;return(s=function(f){if(f===null||(S=f,Function.toString.call(S).indexOf("[native code]")===-1))return f;var S;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(v!==void 0){if(v.has(f))return v.get(f);v.set(f,w)}function w(){return i(f,arguments,b(this).constructor)}return w.prototype=Object.create(f.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),u(w,f)})(_)}function i(_,v,f){return(i=c()?Reflect.construct:function(S,w,P){var N=[null];N.push.apply(N,w);var T=new(Function.bind.apply(S,N));return P&&u(T,P.prototype),T}).apply(null,arguments)}function c(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function u(_,v){return(u=Object.setPrototypeOf||function(f,S){return f.__proto__=S,f})(_,v)}function b(_){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)})(_)}var A=function(_){(function(P,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(N&&N.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),N&&u(P,N)})(w,_);var v,f,S=(v=w,f=c(),function(){var P,N=b(v);if(f){var T=b(this).constructor;P=Reflect.construct(N,arguments,T)}else P=N.apply(this,arguments);return o(this,P)});function w(P){var N;return function(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")}(this,w),N=S.call(this,`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
3
3
|
Found: `.concat(P.toString().split(`
|
|
4
4
|
`)[0],`
|
|
5
|
-
`)),Error.captureStackTrace(l(N),w),N}return w}(s(Error));e.exports=function(_){if(_.length>2)throw new A(_);function v(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=S}function f(S){return new v(S)}return v.prototype.transform=_,f.Format=v,f}},function(e,t,r){(function(n){var o=Object.getOwnPropertyDescriptors||function(O){for(var L=Object.keys(O),k={},E=0;E<L.length;E++)k[L[E]]=Object.getOwnPropertyDescriptor(O,L[E]);return k},l=/%[sdj%]/g;t.format=function(O){if(!N(O)){for(var L=[],k=0;k<arguments.length;k++)L.push(c(arguments[k]));return L.join(" ")}k=1;for(var E=arguments,g=E.length,U=String(O).replace(l,function(G){if(G==="%%")return"%";if(k>=g)return G;switch(G){case"%s":return String(E[k++]);case"%d":return Number(E[k++]);case"%j":try{return JSON.stringify(E[k++])}catch{return"[Circular]"}default:return G}}),B=E[k];k<g;B=E[++k])w(B)||!d(B)?U+=" "+B:U+=" "+c(B);return U},t.deprecate=function(O,L){if(n!==void 0&&n.noDeprecation===!0)return O;if(n===void 0)return function(){return t.deprecate(O,L).apply(this,arguments)};var k=!1;return function(){if(!k){if(n.throwDeprecation)throw new Error(L);n.traceDeprecation?console.trace(L):console.error(L),k=!0}return O.apply(this,arguments)}};var s,i={};function c(O,L){var k={seen:[],stylize:b};return arguments.length>=3&&(k.depth=arguments[2]),arguments.length>=4&&(k.colors=arguments[3]),S(L)?k.showHidden=L:L&&t._extend(k,L),T(k.showHidden)&&(k.showHidden=!1),T(k.depth)&&(k.depth=2),T(k.colors)&&(k.colors=!1),T(k.customInspect)&&(k.customInspect=!0),k.colors&&(k.stylize=u),A(k,O,k.depth)}function u(O,L){var k=c.styles[L];return k?"\x1B["+c.colors[k][0]+"m"+O+"\x1B["+c.colors[k][1]+"m":O}function b(O,L){return O}function A(O,L,k){if(O.customInspect&&L&&Z(L.inspect)&&L.inspect!==t.inspect&&(!L.constructor||L.constructor.prototype!==L)){var E=L.inspect(k,O);return N(E)||(E=A(O,E,k)),E}var g=function(y,
|
|
6
|
-
`)>=0,ee+X.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?W[0]+(
|
|
5
|
+
`)),Error.captureStackTrace(l(N),w),N}return w}(s(Error));e.exports=function(_){if(_.length>2)throw new A(_);function v(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=S}function f(S){return new v(S)}return v.prototype.transform=_,f.Format=v,f}},function(e,t,r){(function(n){var o=Object.getOwnPropertyDescriptors||function(O){for(var L=Object.keys(O),k={},E=0;E<L.length;E++)k[L[E]]=Object.getOwnPropertyDescriptor(O,L[E]);return k},l=/%[sdj%]/g;t.format=function(O){if(!N(O)){for(var L=[],k=0;k<arguments.length;k++)L.push(c(arguments[k]));return L.join(" ")}k=1;for(var E=arguments,g=E.length,U=String(O).replace(l,function(G){if(G==="%%")return"%";if(k>=g)return G;switch(G){case"%s":return String(E[k++]);case"%d":return Number(E[k++]);case"%j":try{return JSON.stringify(E[k++])}catch{return"[Circular]"}default:return G}}),B=E[k];k<g;B=E[++k])w(B)||!d(B)?U+=" "+B:U+=" "+c(B);return U},t.deprecate=function(O,L){if(n!==void 0&&n.noDeprecation===!0)return O;if(n===void 0)return function(){return t.deprecate(O,L).apply(this,arguments)};var k=!1;return function(){if(!k){if(n.throwDeprecation)throw new Error(L);n.traceDeprecation?console.trace(L):console.error(L),k=!0}return O.apply(this,arguments)}};var s,i={};function c(O,L){var k={seen:[],stylize:b};return arguments.length>=3&&(k.depth=arguments[2]),arguments.length>=4&&(k.colors=arguments[3]),S(L)?k.showHidden=L:L&&t._extend(k,L),T(k.showHidden)&&(k.showHidden=!1),T(k.depth)&&(k.depth=2),T(k.colors)&&(k.colors=!1),T(k.customInspect)&&(k.customInspect=!0),k.colors&&(k.stylize=u),A(k,O,k.depth)}function u(O,L){var k=c.styles[L];return k?"\x1B["+c.colors[k][0]+"m"+O+"\x1B["+c.colors[k][1]+"m":O}function b(O,L){return O}function A(O,L,k){if(O.customInspect&&L&&Z(L.inspect)&&L.inspect!==t.inspect&&(!L.constructor||L.constructor.prototype!==L)){var E=L.inspect(k,O);return N(E)||(E=A(O,E,k)),E}var g=function(y,C){if(T(C))return y.stylize("undefined","undefined");if(N(C)){var W="'"+JSON.stringify(C).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return y.stylize(W,"string")}if(P(C))return y.stylize(""+C,"number");if(S(C))return y.stylize(""+C,"boolean");if(w(C))return y.stylize("null","null")}(O,L);if(g)return g;var U=Object.keys(L),B=function(y){var C={};return y.forEach(function(W,ee){C[W]=!0}),C}(U);if(O.showHidden&&(U=Object.getOwnPropertyNames(L)),Q(L)&&(U.indexOf("message")>=0||U.indexOf("description")>=0))return _(L);if(U.length===0){if(Z(L)){var G=L.name?": "+L.name:"";return O.stylize("[Function"+G+"]","special")}if(R(L))return O.stylize(RegExp.prototype.toString.call(L),"regexp");if(I(L))return O.stylize(Date.prototype.toString.call(L),"date");if(Q(L))return _(L)}var Y,K="",H=!1,V=["{","}"];return f(L)&&(H=!0,V=["[","]"]),Z(L)&&(K=" [Function"+(L.name?": "+L.name:"")+"]"),R(L)&&(K=" "+RegExp.prototype.toString.call(L)),I(L)&&(K=" "+Date.prototype.toUTCString.call(L)),Q(L)&&(K=" "+_(L)),U.length!==0||H&&L.length!=0?k<0?R(L)?O.stylize(RegExp.prototype.toString.call(L),"regexp"):O.stylize("[Object]","special"):(O.seen.push(L),Y=H?function(y,C,W,ee,X){for(var ne=[],ie=0,he=C.length;ie<he;++ie)x(C,String(ie))?ne.push(v(y,C,W,ee,String(ie),!0)):ne.push("");return X.forEach(function(Se){Se.match(/^\d+$/)||ne.push(v(y,C,W,ee,Se,!0))}),ne}(O,L,k,B,U):U.map(function(y){return v(O,L,k,B,y,H)}),O.seen.pop(),function(y,C,W){return y.reduce(function(ee,X){return X.indexOf(`
|
|
6
|
+
`)>=0,ee+X.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?W[0]+(C===""?"":C+`
|
|
7
7
|
`)+" "+y.join(`,
|
|
8
|
-
`)+" "+W[1]:W[0]+
|
|
8
|
+
`)+" "+W[1]:W[0]+C+" "+y.join(", ")+" "+W[1]}(Y,K,V)):V[0]+K+V[1]}function _(O){return"["+Error.prototype.toString.call(O)+"]"}function v(O,L,k,E,g,U){var B,G,Y;if((Y=Object.getOwnPropertyDescriptor(L,g)||{value:L[g]}).get?G=Y.set?O.stylize("[Getter/Setter]","special"):O.stylize("[Getter]","special"):Y.set&&(G=O.stylize("[Setter]","special")),x(E,g)||(B="["+g+"]"),G||(O.seen.indexOf(Y.value)<0?(G=w(k)?A(O,Y.value,null):A(O,Y.value,k-1)).indexOf(`
|
|
9
9
|
`)>-1&&(G=U?G.split(`
|
|
10
10
|
`).map(function(K){return" "+K}).join(`
|
|
11
11
|
`).substr(2):`
|
|
12
12
|
`+G.split(`
|
|
13
13
|
`).map(function(K){return" "+K}).join(`
|
|
14
|
-
`)):G=O.stylize("[Circular]","special")),T(B)){if(U&&g.match(/^\d+$/))return G;(B=JSON.stringify(""+g)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(B=B.substr(1,B.length-2),B=O.stylize(B,"name")):(B=B.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),B=O.stylize(B,"string"))}return B+": "+G}function f(O){return Array.isArray(O)}function S(O){return typeof O=="boolean"}function w(O){return O===null}function P(O){return typeof O=="number"}function N(O){return typeof O=="string"}function T(O){return O===void 0}function R(O){return d(O)&&h(O)==="[object RegExp]"}function d(O){return typeof O=="object"&&O!==null}function I(O){return d(O)&&h(O)==="[object Date]"}function Q(O){return d(O)&&(h(O)==="[object Error]"||O instanceof Error)}function Z(O){return typeof O=="function"}function h(O){return Object.prototype.toString.call(O)}function p(O){return O<10?"0"+O.toString(10):O.toString(10)}t.debuglog=function(O){if(T(s)&&(s=n.env.NODE_DEBUG||""),O=O.toUpperCase(),!i[O])if(new RegExp("\\b"+O+"\\b","i").test(s)){var L=n.pid;i[O]=function(){var k=t.format.apply(t,arguments);console.error("%s %d: %s",O,L,k)}}else i[O]=function(){};return i[O]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=S,t.isNull=w,t.isNullOrUndefined=function(O){return O==null},t.isNumber=P,t.isString=N,t.isSymbol=function(O){return typeof O=="symbol"},t.isUndefined=T,t.isRegExp=R,t.isObject=d,t.isDate=I,t.isError=Q,t.isFunction=Z,t.isPrimitive=function(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||O===void 0},t.isBuffer=r(106);var
|
|
15
|
-
`,t.homedir=function(){return"/"}},function(e,t,r){var n=r(56),o=r(59).warn,l=t;l.version=r(137).version,l.transports=r(138),l.config=r(47),l.addColors=n.levels,l.format=n.format,l.createLogger=r(85),l.ExceptionHandler=r(86),l.RejectionHandler=r(90),l.Container=r(209),l.Transport=r(17),l.loggers=new l.Container;var s=l.createLogger();Object.keys(l.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(function(i){return l[i]=function(){return s[i].apply(s,arguments)}}),Object.defineProperty(l,"level",{get:function(){return s.level},set:function(i){s.level=i}}),Object.defineProperty(l,"exceptions",{get:function(){return s.exceptions}}),["exitOnError"].forEach(function(i){Object.defineProperty(l,i,{get:function(){return s[i]},set:function(c){s[i]=c}})}),Object.defineProperty(l,"default",{get:function(){return{exceptionHandlers:s.exceptionHandlers,rejectionHandlers:s.rejectionHandlers,transports:s.transports}}}),o.deprecated(l,"setLevels"),o.forFunctions(l,"useFormat",["cli"]),o.forProperties(l,"useFormat",["padLevels","stripColors"]),o.forFunctions(l,"deprecated",["addRewriter","addFilter","clone","extend"]),o.forProperties(l,"deprecated",["emitErrs","levelLength"]),o.moved(l,"createLogger","Logger")},function(e,t,r){var n=r(10),o=r(141),l=r(3).LEVEL,s=e.exports=function(){var i=this,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};o.call(this,{objectMode:!0,highWaterMark:c.highWaterMark}),this.format=c.format,this.level=c.level,this.handleExceptions=c.handleExceptions,this.handleRejections=c.handleRejections,this.silent=c.silent,c.log&&(this.log=c.log),c.logv&&(this.logv=c.logv),c.close&&(this.close=c.close),this.once("pipe",function(u){i.levels=u.levels,i.parent=u}),this.once("unpipe",function(u){u===i.parent&&(i.parent=null,i.close&&i.close())})};n.inherits(s,o),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);var b=this.level||this.parent&&this.parent.level;if(!b||this.levels[b]>=this.levels[i[l]]){if(i&&!this.format)return this.log(i,u);var A=void 0,_=void 0;try{_=this.format.transform(Object.assign({},i),this.format.options)}catch(v){A=v}if(A||!_){if(u(),A)throw A;return}return this.log(_,u)}return u(null)},s.prototype._writev=function(i,c){if(this.logv){var u=i.filter(this._accept,this);return u.length?this.logv(u,c):c(null)}for(var b=0;b<i.length;b++)if(this._accept(i[b]))if(!i[b].chunk||this.format){var A=void 0,_=void 0;try{_=this.format.transform(Object.assign({},i[b].chunk),this.format.options)}catch(v){A=v}if(A||!_){if(i[b].callback(),A)throw c(null),A}else this.log(_,i[b].callback)}else this.log(i[b].chunk,i[b].callback);return c(null)},s.prototype._accept=function(i){var c=i.chunk;if(this.silent)return!1;var u=this.level||this.parent&&this.parent.level;return!(c.exception!==!0&&u&&!(this.levels[u]>=this.levels[c[l]])||!this.handleExceptions&&c.exception===!0)},s.prototype._nop=function(){},e.exports.LegacyTransportStream=r(147)},function(e,t,r){var n,o=typeof Reflect=="object"?Reflect:null,l=o&&typeof o.apply=="function"?o.apply:function(w,P,N){return Function.prototype.apply.call(w,P,N)};n=o&&typeof o.ownKeys=="function"?o.ownKeys:Object.getOwnPropertySymbols?function(w){return Object.getOwnPropertyNames(w).concat(Object.getOwnPropertySymbols(w))}:function(w){return Object.getOwnPropertyNames(w)};var s=Number.isNaN||function(w){return w!=w};function i(){i.init.call(this)}e.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var c=10;function u(w){return w._maxListeners===void 0?i.defaultMaxListeners:w._maxListeners}function b(w,P,N,T){var R,d,I,Q;if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N);if((d=w._events)===void 0?(d=w._events=Object.create(null),w._eventsCount=0):(d.newListener!==void 0&&(w.emit("newListener",P,N.listener?N.listener:N),d=w._events),I=d[P]),I===void 0)I=d[P]=N,++w._eventsCount;else if(typeof I=="function"?I=d[P]=T?[N,I]:[I,N]:T?I.unshift(N):I.push(N),(R=u(w))>0&&I.length>R&&!I.warned){I.warned=!0;var Z=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(P)+" listeners added. Use emitter.setMaxListeners() to increase limit");Z.name="MaxListenersExceededWarning",Z.emitter=w,Z.type=P,Z.count=I.length,Q=Z,console&&console.warn&&console.warn(Q)}return w}function A(){for(var w=[],P=0;P<arguments.length;P++)w.push(arguments[P]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,l(this.listener,this.target,w))}function _(w,P,N){var T={fired:!1,wrapFn:void 0,target:w,type:P,listener:N},R=A.bind(T);return R.listener=N,T.wrapFn=R,R}function v(w,P,N){var T=w._events;if(T===void 0)return[];var R=T[P];return R===void 0?[]:typeof R=="function"?N?[R.listener||R]:[R]:N?function(d){for(var I=new Array(d.length),Q=0;Q<I.length;++Q)I[Q]=d[Q].listener||d[Q];return I}(R):S(R,R.length)}function f(w){var P=this._events;if(P!==void 0){var N=P[w];if(typeof N=="function")return 1;if(N!==void 0)return N.length}return 0}function S(w,P){for(var N=new Array(P),T=0;T<P;++T)N[T]=w[T];return N}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(w){if(typeof w!="number"||w<0||s(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");c=w}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(w){if(typeof w!="number"||w<0||s(w))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+w+".");return this._maxListeners=w,this},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(w){for(var P=[],N=1;N<arguments.length;N++)P.push(arguments[N]);var T=w==="error",R=this._events;if(R!==void 0)T=T&&R.error===void 0;else if(!T)return!1;if(T){var d;if(P.length>0&&(d=P[0]),d instanceof Error)throw d;var I=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw I.context=d,I}var Q=R[w];if(Q===void 0)return!1;if(typeof Q=="function")l(Q,this,P);else{var Z=Q.length,h=S(Q,Z);for(N=0;N<Z;++N)l(h[N],this,P)}return!0},i.prototype.addListener=function(w,P){return b(this,w,P,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(w,P){return b(this,w,P,!0)},i.prototype.once=function(w,P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P);return this.on(w,_(this,w,P)),this},i.prototype.prependOnceListener=function(w,P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P);return this.prependListener(w,_(this,w,P)),this},i.prototype.removeListener=function(w,P){var N,T,R,d,I;if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P);if((T=this._events)===void 0)return this;if((N=T[w])===void 0)return this;if(N===P||N.listener===P)--this._eventsCount==0?this._events=Object.create(null):(delete T[w],T.removeListener&&this.emit("removeListener",w,N.listener||P));else if(typeof N!="function"){for(R=-1,d=N.length-1;d>=0;d--)if(N[d]===P||N[d].listener===P){I=N[d].listener,R=d;break}if(R<0)return this;R===0?N.shift():function(Q,Z){for(;Z+1<Q.length;Z++)Q[Z]=Q[Z+1];Q.pop()}(N,R),N.length===1&&(T[w]=N[0]),T.removeListener!==void 0&&this.emit("removeListener",w,I||P)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(w){var P,N,T;if((N=this._events)===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[w]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete N[w]),this;if(arguments.length===0){var R,d=Object.keys(N);for(T=0;T<d.length;++T)(R=d[T])!=="removeListener"&&this.removeAllListeners(R);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(P=N[w])=="function")this.removeListener(w,P);else if(P!==void 0)for(T=P.length-1;T>=0;T--)this.removeListener(w,P[T]);return this},i.prototype.listeners=function(w){return v(this,w,!0)},i.prototype.rawListeners=function(w){return v(this,w,!1)},i.listenerCount=function(w,P){return typeof w.listenerCount=="function"?w.listenerCount(P):f.call(w,P)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){var n=r(146).Buffer,o=n.isEncoding||function(f){switch((f=""+f)&&f.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function l(f){var S;switch(this.encoding=function(w){var P=function(N){if(!N)return"utf8";for(var T;;)switch(N){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return N;default:if(T)return;N=(""+N).toLowerCase(),T=!0}}(w);if(typeof P!="string"&&(n.isEncoding===o||!o(w)))throw new Error("Unknown encoding: "+w);return P||w}(f),this.encoding){case"utf16le":this.text=c,this.end=u,S=4;break;case"utf8":this.fillLast=i,S=4;break;case"base64":this.text=b,this.end=A,S=3;break;default:return this.write=_,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(S)}function s(f){return f<=127?0:f>>5==6?2:f>>4==14?3:f>>3==30?4:f>>6==2?-1:-2}function i(f){var S=this.lastTotal-this.lastNeed,w=function(P,N,T){if((192&N[0])!=128)return P.lastNeed=0,"\uFFFD";if(P.lastNeed>1&&N.length>1){if((192&N[1])!=128)return P.lastNeed=1,"\uFFFD";if(P.lastNeed>2&&N.length>2&&(192&N[2])!=128)return P.lastNeed=2,"\uFFFD"}}(this,f);return w!==void 0?w:this.lastNeed<=f.length?(f.copy(this.lastChar,S,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(f.copy(this.lastChar,S,0,f.length),void(this.lastNeed-=f.length))}function c(f,S){if((f.length-S)%2==0){var w=f.toString("utf16le",S);if(w){var P=w.charCodeAt(w.length-1);if(P>=55296&&P<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=f[f.length-1],f.toString("utf16le",S,f.length-1)}function u(f){var S=f&&f.length?this.write(f):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return S+this.lastChar.toString("utf16le",0,w)}return S}function b(f,S){var w=(f.length-S)%3;return w===0?f.toString("base64",S):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=f[f.length-1]:(this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1]),f.toString("base64",S,f.length-w))}function A(f){var S=f&&f.length?this.write(f):"";return this.lastNeed?S+this.lastChar.toString("base64",0,3-this.lastNeed):S}function _(f){return f.toString(this.encoding)}function v(f){return f&&f.length?this.write(f):""}t.StringDecoder=l,l.prototype.write=function(f){if(f.length===0)return"";var S,w;if(this.lastNeed){if((S=this.fillLast(f))===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w<f.length?S?S+this.text(f,w):this.text(f,w):S||""},l.prototype.end=function(f){var S=f&&f.length?this.write(f):"";return this.lastNeed?S+"\uFFFD":S},l.prototype.text=function(f,S){var w=function(N,T,R){var d=T.length-1;if(d<R)return 0;var I=s(T[d]);return I>=0?(I>0&&(N.lastNeed=I-1),I):--d<R||I===-2?0:(I=s(T[d]))>=0?(I>0&&(N.lastNeed=I-2),I):--d<R||I===-2?0:(I=s(T[d]))>=0?(I>0&&(I===2?I=0:N.lastNeed=I-3),I):0}(this,f,S);if(!this.lastNeed)return f.toString("utf8",S);this.lastTotal=w;var P=f.length-(w-this.lastNeed);return f.copy(this.lastChar,0,P),f.toString("utf8",S,P)},l.prototype.fillLast=function(f){if(this.lastNeed<=f.length)return f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,f.length),this.lastNeed-=f.length}},function(e,t,r){var n=r(13),o=Object.keys||function(f){var S=[];for(var w in f)S.push(w);return S};e.exports=A;var l=r(14);l.inherits=r(7);var s=r(67),i=r(44);l.inherits(A,s);for(var c=o(i.prototype),u=0;u<c.length;u++){var b=c[u];A.prototype[b]||(A.prototype[b]=i.prototype[b])}function A(f){if(!(this instanceof A))return new A(f);s.call(this,f),i.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",_)}function _(){this.allowHalfOpen||this._writableState.ended||n.nextTick(v,this)}function v(f){f.end()}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),A.prototype._destroy=function(f,S){this.push(null),this.end(),n.nextTick(S,f)}},function(e,t,r){(function(n){function o(M){var z=0;return function(){return z<M.length?{done:!1,value:M[z++]}:{done:!0}}}var l=typeof Object.defineProperties=="function"?Object.defineProperty:function(M,z,J){M!=Array.prototype&&M!=Object.prototype&&(M[z]=J.value)},s=function(M){M=[typeof window=="object"&&window,typeof self=="object"&&self,typeof n=="object"&&n,M];for(var z=0;z<M.length;++z){var J=M[z];if(J&&J.Math==Math)return J}throw Error("Cannot find global object")}(this);function i(M,z){if(z){var J=s;M=M.split(".");for(var re=0;re<M.length-1;re++){var se=M[re];se in J||(J[se]={}),J=J[se]}(z=z(re=J[M=M[M.length-1]]))!=re&&z!=null&&l(J,M,{configurable:!0,writable:!0,value:z})}}function c(M){var z=typeof Symbol!="undefined"&&Symbol.iterator&&M[Symbol.iterator];return z?z.call(M):{next:o(M)}}i("Object.is",function(M){return M||function(z,J){return z===J?z!==0||1/z==1/J:z!=z&&J!=J}}),i("Array.prototype.includes",function(M){return M||function(z,J){var re=this;re instanceof String&&(re=String(re));var se=re.length;for(0>(J=J||0)&&(J=Math.max(J+se,0));J<se;J++){var fe=re[J];if(fe===z||Object.is(fe,z))return!0}return!1}}),i("Promise",function(M){function z(oe){this.b=0,this.c=void 0,this.a=[];var le=this.f();try{oe(le.resolve,le.reject)}catch(ve){le.reject(ve)}}function J(){this.a=null}function re(oe){return oe instanceof z?oe:new z(function(le){le(oe)})}if(M)return M;J.prototype.b=function(oe){if(this.a==null){this.a=[];var le=this;this.c(function(){le.g()})}this.a.push(oe)};var se=s.setTimeout;J.prototype.c=function(oe){se(oe,0)},J.prototype.g=function(){for(;this.a&&this.a.length;){var oe=this.a;this.a=[];for(var le=0;le<oe.length;++le){var ve=oe[le];oe[le]=null;try{ve()}catch(be){this.f(be)}}}this.a=null},J.prototype.f=function(oe){this.c(function(){throw oe})},z.prototype.f=function(){function oe(be){return function(_e){ve||(ve=!0,be.call(le,_e))}}var le=this,ve=!1;return{resolve:oe(this.m),reject:oe(this.g)}},z.prototype.m=function(oe){if(oe===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(oe instanceof z)this.o(oe);else{e:switch(typeof oe){case"object":var le=oe!=null;break e;case"function":le=!0;break e;default:le=!1}le?this.l(oe):this.h(oe)}},z.prototype.l=function(oe){var le=void 0;try{le=oe.then}catch(ve){return void this.g(ve)}typeof le=="function"?this.u(le,oe):this.h(oe)},z.prototype.g=function(oe){this.i(2,oe)},z.prototype.h=function(oe){this.i(1,oe)},z.prototype.i=function(oe,le){if(this.b!=0)throw Error("Cannot settle("+oe+", "+le+"): Promise already settled in state"+this.b);this.b=oe,this.c=le,this.j()},z.prototype.j=function(){if(this.a!=null){for(var oe=0;oe<this.a.length;++oe)fe.b(this.a[oe]);this.a=null}};var fe=new J;return z.prototype.o=function(oe){var le=this.f();oe.w(le.resolve,le.reject)},z.prototype.u=function(oe,le){var ve=this.f();try{oe.call(le,ve.resolve,ve.reject)}catch(be){ve.reject(be)}},z.prototype.then=function(oe,le){function ve(Ie,xe){return typeof Ie=="function"?function(Ne){try{be(Ie(Ne))}catch(Ue){_e(Ue)}}:xe}var be,_e,Ce=new z(function(Ie,xe){be=Ie,_e=xe});return this.w(ve(oe,be),ve(le,_e)),Ce},z.prototype.catch=function(oe){return this.then(void 0,oe)},z.prototype.w=function(oe,le){function ve(){switch(be.b){case 1:oe(be.c);break;case 2:le(be.c);break;default:throw Error("Unexpected state: "+be.b)}}var be=this;this.a==null?fe.b(ve):this.a.push(ve)},z.resolve=re,z.reject=function(oe){return new z(function(le,ve){ve(oe)})},z.race=function(oe){return new z(function(le,ve){for(var be=c(oe),_e=be.next();!_e.done;_e=be.next())re(_e.value).w(le,ve)})},z.all=function(oe){var le=c(oe),ve=le.next();return ve.done?re([]):new z(function(be,_e){function Ce(Ne){return function(Ue){Ie[Ne]=Ue,--xe==0&&be(Ie)}}var Ie=[],xe=0;do Ie.push(void 0),xe++,re(ve.value).w(Ce(Ie.length-1),_e),ve=le.next();while(!ve.done)})},z});var u=u||{},b=this||self;function A(M,z){M=M.split("."),z=z||b;for(var J=0;J<M.length;J++)if((z=z[M[J]])==null)return null;return z}function _(){}function v(M){var z=typeof M;if(z=="object"){if(!M)return"null";if(M instanceof Array)return"array";if(M instanceof Object)return z;var J=Object.prototype.toString.call(M);if(J=="[object Window]")return"object";if(J=="[object Array]"||typeof M.length=="number"&&M.splice!==void 0&&M.propertyIsEnumerable!==void 0&&!M.propertyIsEnumerable("splice"))return"array";if(J=="[object Function]"||M.call!==void 0&&M.propertyIsEnumerable!==void 0&&!M.propertyIsEnumerable("call"))return"function"}else if(z=="function"&&M.call===void 0)return"object";return z}function f(M){var z=typeof M;return z=="object"&&M!=null||z=="function"}function S(M,z,J){return M.call.apply(M.bind,arguments)}function w(M,z,J){if(!M)throw Error();if(2<arguments.length){var re=Array.prototype.slice.call(arguments,2);return function(){var se=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(se,re),M.apply(z,se)}}return function(){return M.apply(z,arguments)}}function P(M,z,J){return(P=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?S:w).apply(null,arguments)}function N(M,z){function J(){}J.prototype=z.prototype,M.S=z.prototype,M.prototype=new J,M.prototype.constructor=M}function T(){this.a={}}function R(M,z,J,re){this.f=M,this.c=z,this.b=J,this.a=re}function d(M,z,J,re){J=J===void 0?{}:J,this.c=M,this.a=J,this.b=z,this.f=re===void 0?null:re}function I(M,z,J,re,se,fe){this.name=M,this.a=se,this.b=fe}function Q(M,z,J){J=J===void 0?{}:J;var re=re===void 0?new T:re;return new R(z,M,J,re)}function Z(M,z,J,re){return re instanceof I?re:new I(M,J,re.b||z.constructor,re.f,re.a,re.c)}function h(M){this.a=M}function p(M){switch(M){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}}function C(M){if(Error.captureStackTrace)Error.captureStackTrace(this,C);else{var z=Error().stack;z&&(this.stack=z)}M&&(this.message=String(M))}function m(M,z){for(var J="",re=(M=M.split("%s")).length-1,se=0;se<re;se++)J+=M[se]+(se<z.length?z[se]:"%s");C.call(this,J+M[re])}function x(){this.j=null,this.i=[],this.l=0,this.b=F,this.f=this.a=this.h=0,this.c=null,this.g=0}T.prototype.get=function(M){return this.a[M]},T.prototype.f=function(){return Object.keys(this.a)},R.prototype.getRequestMessage=function(){return this.f},R.prototype.getMethodDescriptor=function(){return this.c},R.prototype.getMetadata=function(){return this.b},R.prototype.getCallOptions=function(){return this.a},d.prototype.getResponseMessage=function(){return this.c},d.prototype.getMetadata=function(){return this.a},d.prototype.getMethodDescriptor=function(){return this.b},d.prototype.getStatus=function(){return this.f},h.prototype.on=function(M,z){return M=="data"||M=="error"?this:this.a.on(M,z)},h.prototype.removeListener=function(M,z){return this.a.removeListener(M,z)},h.prototype.cancel=function(){this.a.cancel()},N(C,Error),C.prototype.name="CustomError",N(m,C),m.prototype.name="AssertionError";var F=0,D=1,O=2,L=3,k=0,E=128;function g(M,z,J,re){throw M.b=L,M.j="The stream is broken @"+M.l+"/"+J+". Error: "+re+`. With input:
|
|
16
|
-
`+z,Error(M.j)}var U=Array.prototype.indexOf?function(M,z){return Array.prototype.indexOf.call(M,z,void 0)}:function(M,z){if(typeof M=="string")return typeof z!="string"||z.length!=1?-1:M.indexOf(z,0);for(var J=0;J<M.length;J++)if(J in M&&M[J]===z)return J;return-1},B,G=String.prototype.trim?function(M){return M.trim()}:function(M){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(M)[1]};function Y(M,z){return M.indexOf(z)!=-1}function K(M,z){return M<z?-1:M>z?1:0}e:{var H=b.navigator;if(H){var V=H.userAgent;if(V){B=V;break e}}B=""}var y="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function j(M){var z=1;M=M.split(":");for(var J=[];0<z&&M.length;)J.push(M.shift()),z--;return M.length&&J.push(M.join(":")),J}function W(M){return W[" "](M),M}W[" "]=_;var ee,X,ne=Y(B,"Opera"),ie=Y(B,"Trident")||Y(B,"MSIE"),he=Y(B,"Edge"),Se=Y(B,"Gecko")&&!(Y(B.toLowerCase(),"webkit")&&!Y(B,"Edge"))&&!(Y(B,"Trident")||Y(B,"MSIE"))&&!Y(B,"Edge"),we=Y(B.toLowerCase(),"webkit")&&!Y(B,"Edge");function Ee(){var M=b.document;return M?M.documentMode:void 0}e:{var ye="",q=(X=B,Se?/rv:([^\);]+)(\)|;)/.exec(X):he?/Edge\/([\d\.]+)/.exec(X):ie?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(X):we?/WebKit\/(\S+)/.exec(X):ne?/(?:Version)[ \/]?(\S+)/.exec(X):void 0);if(q&&(ye=q?q[1]:""),ie){var $=Ee();if($!=null&&$>parseFloat(ye)){ee=String($);break e}}ee=ye}var te,ue={};function ae(M){return function(z,J){var re=ue;return Object.prototype.hasOwnProperty.call(re,z)?re[z]:re[z]=J(z)}(M,function(){for(var z=0,J=G(String(ee)).split("."),re=G(String(M)).split("."),se=Math.max(J.length,re.length),fe=0;z==0&&fe<se;fe++){var oe=J[fe]||"",le=re[fe]||"";do{if(oe=/(\d*)(\D*)(.*)/.exec(oe)||["","","",""],le=/(\d*)(\D*)(.*)/.exec(le)||["","","",""],oe[0].length==0&&le[0].length==0)break;z=K(oe[1].length==0?0:parseInt(oe[1],10),le[1].length==0?0:parseInt(le[1],10))||K(oe[2].length==0,le[2].length==0)||K(oe[2],le[2]),oe=oe[3],le=le[3]}while(z==0)}return 0<=z})}if(b.document&&ie){var de=Ee();te=de||parseInt(ee,10)||void 0}else te=void 0;var me=te;function pe(){this.F=this.F}pe.prototype.F=!1;var ge,ce=Object.freeze||function(M){return M};(ge=!ie)||(ge=9<=Number(me));var Te=ge,Re=ie&&!ae("9"),Pe=function(){if(!b.addEventListener||!Object.defineProperty)return!1;var M=!1,z=Object.defineProperty({},"passive",{get:function(){M=!0}});try{b.addEventListener("test",_,z),b.removeEventListener("test",_,z)}catch{}return M}();function Le(M,z){this.type=M,this.a=this.target=z,this.defaultPrevented=!1}function Fe(M,z){if(Le.call(this,M?M.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,M){var J=this.type=M.type,re=M.changedTouches&&M.changedTouches.length?M.changedTouches[0]:null;if(this.target=M.target||M.srcElement,this.a=z,z=M.relatedTarget){if(Se){e:{try{W(z.nodeName);var se=!0;break e}catch{}se=!1}se||(z=null)}}else J=="mouseover"?z=M.fromElement:J=="mouseout"&&(z=M.toElement);this.relatedTarget=z,re?(this.clientX=re.clientX!==void 0?re.clientX:re.pageX,this.clientY=re.clientY!==void 0?re.clientY:re.pageY,this.screenX=re.screenX||0,this.screenY=re.screenY||0):(this.clientX=M.clientX!==void 0?M.clientX:M.pageX,this.clientY=M.clientY!==void 0?M.clientY:M.pageY,this.screenX=M.screenX||0,this.screenY=M.screenY||0),this.button=M.button,this.key=M.key||"",this.ctrlKey=M.ctrlKey,this.altKey=M.altKey,this.shiftKey=M.shiftKey,this.metaKey=M.metaKey,this.pointerId=M.pointerId||0,this.pointerType=typeof M.pointerType=="string"?M.pointerType:ze[M.pointerType]||"",this.c=M,M.defaultPrevented&&this.b()}}Le.prototype.b=function(){this.defaultPrevented=!0},N(Fe,Le);var ze=ce({2:"touch",3:"pen",4:"mouse"});Fe.prototype.b=function(){Fe.S.b.call(this);var M=this.c;if(M.preventDefault)M.preventDefault();else if(M.returnValue=!1,Re)try{(M.ctrlKey||112<=M.keyCode&&123>=M.keyCode)&&(M.keyCode=-1)}catch{}};var De="closure_listenable_"+(1e6*Math.random()|0),We=0;function Be(M,z,J,re,se){this.listener=M,this.proxy=null,this.src=z,this.type=J,this.capture=!!re,this.A=se,this.key=++We,this.s=this.v=!1}function ke(M){M.s=!0,M.listener=null,M.proxy=null,M.src=null,M.A=null}function qe(M){this.src=M,this.a={},this.b=0}function Ge(M,z){var J=z.type;if(J in M.a){var re,se=M.a[J],fe=U(se,z);(re=0<=fe)&&Array.prototype.splice.call(se,fe,1),re&&(ke(z),M.a[J].length==0&&(delete M.a[J],M.b--))}}function gt(M,z,J,re){for(var se=0;se<M.length;++se){var fe=M[se];if(!fe.s&&fe.listener==z&&fe.capture==!!J&&fe.A==re)return se}return-1}qe.prototype.add=function(M,z,J,re,se){var fe=M.toString();(M=this.a[fe])||(M=this.a[fe]=[],this.b++);var oe=gt(M,z,re,se);return-1<oe?(z=M[oe],J||(z.v=!1)):((z=new Be(z,this.src,fe,!!re,se)).v=J,M.push(z)),z};var ft="closure_lm_"+(1e6*Math.random()|0),ht={};function at(M,z,J,re,se){if(re&&re.once)(function oe(le,ve,be,_e,Ce){if(Array.isArray(ve))for(var Ie=0;Ie<ve.length;Ie++)oe(le,ve[Ie],be,_e,Ce);else be=dt(be),le&&le[De]?le.f.add(String(ve),be,!0,f(_e)?!!_e.capture:!!_e,Ce):Rt(le,ve,be,!0,_e,Ce)})(M,z,J,re,se);else if(Array.isArray(z))for(var fe=0;fe<z.length;fe++)at(M,z[fe],J,re,se);else J=dt(J),M&&M[De]?M.f.add(String(z),J,!1,f(re)?!!re.capture:!!re,se):Rt(M,z,J,!1,re,se)}function Rt(M,z,J,re,se,fe){if(!z)throw Error("Invalid event type");var oe=f(se)?!!se.capture:!!se,le=lt(M);if(le||(M[ft]=le=new qe(M)),!(J=le.add(z,J,re,oe,fe)).proxy)if(re=function(){var ve=Kt,be=Te?function(_e){return ve.call(be.src,be.listener,_e)}:function(_e){if(!(_e=ve.call(be.src,be.listener,_e)))return _e};return be}(),J.proxy=re,re.src=M,re.listener=J,M.addEventListener)Pe||(se=oe),se===void 0&&(se=!1),M.addEventListener(z.toString(),re,se);else if(M.attachEvent)M.attachEvent(Ot(z.toString()),re);else{if(!M.addListener||!M.removeListener)throw Error("addEventListener and attachEvent are unavailable.");M.addListener(re)}}function At(M){if(typeof M!="number"&&M&&!M.s){var z=M.src;if(z&&z[De])Ge(z.f,M);else{var J=M.type,re=M.proxy;z.removeEventListener?z.removeEventListener(J,re,M.capture):z.detachEvent?z.detachEvent(Ot(J),re):z.addListener&&z.removeListener&&z.removeListener(re),(J=lt(z))?(Ge(J,M),J.b==0&&(J.src=null,z[ft]=null)):ke(M)}}}function Ot(M){return M in ht?ht[M]:ht[M]="on"+M}function jt(M,z,J,re){var se=!0;if((M=lt(M))&&(z=M.a[z.toString()]))for(z=z.concat(),M=0;M<z.length;M++){var fe=z[M];fe&&fe.capture==J&&!fe.s&&(fe=It(fe,re),se=se&&fe!==!1)}return se}function It(M,z){var J=M.listener,re=M.A||M.src;return M.v&&At(M),J.call(re,z)}function Kt(M,z){if(M.s)return!0;if(!Te){var J=z||A("window.event");z=new Fe(J,this);var re=!0;if(!(0>J.keyCode||J.returnValue!=null)){e:{var se=!1;if(J.keyCode==0)try{J.keyCode=-1;break e}catch{se=!0}(se||J.returnValue==null)&&(J.returnValue=!0)}for(J=[],se=z.a;se;se=se.parentNode)J.push(se);for(M=M.type,se=J.length-1;0<=se;se--){z.a=J[se];var fe=jt(J[se],M,!0,z);re=re&&fe}for(se=0;se<J.length;se++)z.a=J[se],fe=jt(J[se],M,!1,z),re=re&&fe}return re}return It(M,new Fe(z,this))}function lt(M){return(M=M[ft])instanceof qe?M:null}var pt="__closure_events_fn_"+(1e9*Math.random()>>>0);function dt(M){return v(M)=="function"?M:(M[pt]||(M[pt]=function(z){return M.handleEvent(z)}),M[pt])}function et(){pe.call(this),this.f=new qe(this),this.N=this}function Ze(M,z){M=M.N;var J=z.type||z;if(typeof z=="string")z=new Le(z,M);else if(z instanceof Le)z.target=z.target||M;else{var re=z;(function(se,fe){for(var oe,le,ve=1;ve<arguments.length;ve++){for(oe in le=arguments[ve])se[oe]=le[oe];for(var be=0;be<y.length;be++)oe=y[be],Object.prototype.hasOwnProperty.call(le,oe)&&(se[oe]=le[oe])}})(z=new Le(J,M),re)}Ct(M=z.a=M,J,!0,z),Ct(M,J,!1,z)}function Ct(M,z,J,re){if(z=M.f.a[String(z)]){z=z.concat();for(var se=!0,fe=0;fe<z.length;++fe){var oe=z[fe];if(oe&&!oe.s&&oe.capture==J){var le=oe.listener,ve=oe.A||oe.src;oe.v&&Ge(M.f,oe),se=le.call(ve,re)!==!1&&se}}}}function Mt(M,z,J){if(v(M)=="function")J&&(M=P(M,J));else{if(!M||typeof M.handleEvent!="function")throw Error("Invalid listener argument");M=P(M.handleEvent,M)}return 2147483647<Number(z)?-1:b.setTimeout(M,z||0)}function mt(M,z,J){this.reset(M,z,J,void 0,void 0)}N(et,pe),et.prototype[De]=!0,et.prototype.addEventListener=function(M,z,J,re){at(this,M,z,J,re)},et.prototype.removeEventListener=function(M,z,J,re){(function se(fe,oe,le,ve,be){if(Array.isArray(oe))for(var _e=0;_e<oe.length;_e++)se(fe,oe[_e],le,ve,be);else ve=f(ve)?!!ve.capture:!!ve,le=dt(le),fe&&fe[De]?(fe=fe.f,(oe=String(oe).toString())in fe.a&&-1<(le=gt(_e=fe.a[oe],le,ve,be))&&(ke(_e[le]),Array.prototype.splice.call(_e,le,1),_e.length==0&&(delete fe.a[oe],fe.b--))):fe&&(fe=lt(fe))&&(oe=fe.a[oe.toString()],fe=-1,oe&&(fe=gt(oe,le,ve,be)),(le=-1<fe?oe[fe]:null)&&At(le))})(this,M,z,J,re)},mt.prototype.a=null;function yt(M){this.f=M,this.b=this.c=this.a=null}function ut(M,z){this.name=M,this.value=z}mt.prototype.reset=function(M,z,J,re,se){delete this.a},ut.prototype.toString=function(){return this.name};var Pt=new ut("SEVERE",1e3),Jt=new ut("CONFIG",700),Xt=new ut("FINE",500);function Nt(M){return M.c?M.c:M.a?Nt(M.a):(function(z,J){throw new m("Failure"+(z?": "+z:""),Array.prototype.slice.call(arguments,1))}("Root logger has no level set."),null)}yt.prototype.log=function(M,z,J){if(M.value>=Nt(this).value)for(v(z)=="function"&&(z=z()),M=new mt(M,String(z),this.f),J&&(M.a=J),J=this;J;)J=J.a};var bt,vt={},ct=null;function He(M,z){M&&M.log(Xt,z,void 0)}function Lt(){}function xt(M){var z;return(z=M.a)||(z={},Bt(M)&&(z[0]=!0,z[1]=!0),z=M.a=z),z}function Ut(){}function Dt(M){return(M=Bt(M))?new ActiveXObject(M):new XMLHttpRequest}function Bt(M){if(!M.b&&typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var z=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],J=0;J<z.length;J++){var re=z[J];try{return new ActiveXObject(re),M.b=re}catch{}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return M.b}function Xe(M,z){this.b={},this.a=[],this.c=0;var J=arguments.length;if(1<J){if(J%2)throw Error("Uneven number of arguments");for(var re=0;re<J;re+=2)this.set(arguments[re],arguments[re+1])}else M&&kt(this,M)}function _t(M){if(M.c!=M.a.length){for(var z=0,J=0;z<M.a.length;){var re=M.a[z];tt(M.b,re)&&(M.a[J++]=re),z++}M.a.length=J}if(M.c!=M.a.length){var se={};for(J=z=0;z<M.a.length;)tt(se,re=M.a[z])||(M.a[J++]=re,se[re]=1),z++;M.a.length=J}}function kt(M,z){if(z instanceof Xe)for(var J=z.f(),re=0;re<J.length;re++)M.set(J[re],z.get(J[re]));else for(J in z)M.set(J,z[J])}function tt(M,z){return Object.prototype.hasOwnProperty.call(M,z)}Lt.prototype.a=null,N(Ut,Lt),bt=new Ut,Xe.prototype.f=function(){return _t(this),this.a.concat()},Xe.prototype.get=function(M,z){return tt(this.b,M)?this.b[M]:z},Xe.prototype.set=function(M,z){tt(this.b,M)||(this.c++,this.a.push(M)),this.b[M]=z},Xe.prototype.forEach=function(M,z){for(var J=this.f(),re=0;re<J.length;re++){var se=J[re],fe=this.get(se);M.call(z,fe,se,this)}};var Qt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Je(M){et.call(this),this.headers=new Xe,this.D=M||null,this.c=!1,this.C=this.a=null,this.J=this.o="",this.g=0,this.i="",this.h=this.I=this.m=this.G=!1,this.l=0,this.u=null,this.j=Ft,this.B=this.H=!1}N(Je,et);var Ft="",er=Je.prototype,tr=function M(z){var J;if(ct||(ct=new yt(""),vt[""]=ct,ct.c=Jt),!(J=vt[z])){J=new yt(z);var re=z.lastIndexOf("."),se=z.substr(re+1);(re=M(z.substr(0,re))).b||(re.b={}),re.b[se]=J,J.a=re,vt[z]=J}return J}("goog.net.XhrIo");er.b=tr;var rr=/^https?$/i,nr=["POST","PUT"];function or(M,z,J){if(M.a)throw Error("[goog.net.XhrIo] Object is active with another request="+M.o+"; newUri="+z);M.o=z,M.i="",M.g=0,M.J="POST",M.G=!1,M.c=!0,M.a=M.D?Dt(M.D):Dt(bt),M.C=M.D?xt(M.D):xt(bt),M.a.onreadystatechange=P(M.K,M);try{He(M.b,Ke(M,"Opening Xhr")),M.I=!0,M.a.open("POST",String(z),!0),M.I=!1}catch(fe){return He(M.b,Ke(M,"Error opening Xhr: "+fe.message)),void Wt(M,fe)}z=J||"";var re=function(fe){e:{for(var oe=ir,le=fe.length,ve=typeof fe=="string"?fe.split(""):fe,be=0;be<le;be++)if(be in ve&&oe.call(void 0,ve[be],be,fe)){oe=be;break e}oe=-1}return 0>oe?null:typeof fe=="string"?fe.charAt(oe):fe[oe]}((J=new Xe(M.headers)).f()),se=b.FormData&&z instanceof b.FormData;!(0<=U(nr,"POST"))||re||se||J.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),J.forEach(function(fe,oe){this.a.setRequestHeader(oe,fe)},M),M.j&&(M.a.responseType=M.j),"withCredentials"in M.a&&M.a.withCredentials!==M.H&&(M.a.withCredentials=M.H);try{Ht(M),0<M.l&&(M.B=function(fe){return ie&&ae(9)&&typeof fe.timeout=="number"&&fe.ontimeout!==void 0}(M.a),He(M.b,Ke(M,"Will abort after "+M.l+"ms if incomplete, xhr2 "+M.B)),M.B?(M.a.timeout=M.l,M.a.ontimeout=P(M.L,M)):M.u=Mt(M.L,M.l,M)),He(M.b,Ke(M,"Sending request")),M.m=!0,M.a.send(z),M.m=!1}catch(fe){He(M.b,Ke(M,"Send error: "+fe.message)),Wt(M,fe)}}function ir(M){return M.toLowerCase()=="content-type"}function Wt(M,z){M.c=!1,M.a&&(M.h=!0,M.a.abort(),M.h=!1),M.i=z,M.g=5,Vt(M),St(M)}function Vt(M){M.G||(M.G=!0,Ze(M,"complete"),Ze(M,"error"))}function zt(M){if(M.c&&u!==void 0){if(M.C[1]&&Qe(M)==4&&M.getStatus()==2)He(M.b,Ke(M,"Local request error detected and ignored"));else if(M.m&&Qe(M)==4)Mt(M.K,0,M);else if(Ze(M,"readystatechange"),Qe(M)==4){He(M.b,Ke(M,"Request complete")),M.c=!1;try{var z,J=M.getStatus();e:switch(J){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var re=!0;break e;default:re=!1}if(!(z=re)){var se;if(se=J===0){var fe=String(M.o).match(Qt)[1]||null;if(!fe&&b.self&&b.self.location){var oe=b.self.location.protocol;fe=oe.substr(0,oe.length-1)}se=!rr.test(fe?fe.toLowerCase():"")}z=se}if(z)Ze(M,"complete"),Ze(M,"success");else{M.g=6;try{var le=2<Qe(M)?M.a.statusText:""}catch(ve){He(M.b,"Can not get status: "+ve.message),le=""}M.i=le+" ["+M.getStatus()+"]",Vt(M)}}finally{St(M)}}}}function St(M){if(M.a){Ht(M);var z=M.a,J=M.C[0]?_:null;M.a=null,M.C=null,Ze(M,"ready");try{z.onreadystatechange=J}catch(re){(M=M.b)&&M.log(Pt,"Problem encountered resetting onreadystatechange: "+re.message,void 0)}}}function Ht(M){M.a&&M.B&&(M.a.ontimeout=null),M.u&&(b.clearTimeout(M.u),M.u=null)}function Qe(M){return M.a?M.a.readyState:0}function Gt(M,z){if(M.a&&Qe(M)==4)return(M=M.a.getResponseHeader(z))===null?void 0:M}function Ke(M,z){return z+" ["+M.J+" "+M.o+" "+M.getStatus()+"]"}Je.prototype.L=function(){u!==void 0&&this.a&&(this.i="Timed out after "+this.l+"ms, aborting",this.g=8,He(this.b,Ke(this,this.i)),Ze(this,"timeout"),this.abort(8))},Je.prototype.abort=function(M){this.a&&this.c&&(He(this.b,Ke(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.g=M||7,Ze(this,"complete"),Ze(this,"abort"),St(this))},Je.prototype.K=function(){this.F||(this.I||this.m||this.h?zt(this):this.O())},Je.prototype.O=function(){zt(this)},Je.prototype.getStatus=function(){try{return 2<Qe(this)?this.a.status:-1}catch{return-1}};var qt={},ot=null;function sr(M){var z=M.length,J=3*z/4;J%3?J=Math.floor(J):Y("=.",M[z-1])&&(J=Y("=.",M[z-2])?J-2:J-1);var re=new Uint8Array(J),se=0;return function(fe,oe){function le(xe){for(;ve<fe.length;){var Ne=fe.charAt(ve++),Ue=ot[Ne];if(Ue!=null)return Ue;if(!/^[\s\xa0]*$/.test(Ne))throw Error("Unknown base64 encoding at char: "+Ne)}return xe}Yt();for(var ve=0;;){var be=le(-1),_e=le(0),Ce=le(64),Ie=le(64);if(Ie===64&&be===-1)break;oe(be<<2|_e>>4),Ce!=64&&(oe(_e<<4&240|Ce>>2),Ie!=64&&oe(Ce<<6&192|Ie))}}(M,function(fe){re[se++]=fe}),re.subarray(0,se)}function Yt(){if(!ot){ot={};for(var M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),z=["+/=","+/","-_=","-_.","-_"],J=0;5>J;J++){var re=M.concat(z[J].split(""));qt[J]=re;for(var se=0;se<re.length;se++){var fe=re[se];ot[fe]===void 0&&(ot[fe]=se)}}}}var ar=["content-type","grpc-status","grpc-message"];function Ye(M){this.a=M.T,this.l=null,this.b=[],this.h=[],this.g=[],this.f=[],this.c=[],this.j=!1,this.i=0,this.m=new x;var z=this;at(this.a,"readystatechange",function(){var J=z.a;if(J=J.a?J.a.getResponseHeader("Content-Type"):null){if((J=J.toLowerCase()).lastIndexOf("application/grpc-web-text",0)==0){J=z.a;try{var re=J.a?J.a.responseText:""}catch(be){He(J.b,"Can not get responseText: "+be.message),re=""}if(re=(J=re||"").length-J.length%4,(J=J.substr(z.i,re-z.i)).length==0)return;z.i=re,J=sr(J)}else{if(J.lastIndexOf("application/grpc",0)!=0)return void rt(z,{code:2,message:"Unknown Content-type received.",metadata:{}});J=new Uint8Array(function(be){try{if(!be.a)return null;if("response"in be.a)return be.a.response;switch(be.j){case Ft:case"text":return be.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in be.a)return be.a.mozResponseArrayBuffer}var _e=be.b;return _e&&_e.log(Pt,"Response type "+be.j+" is not supported on this browser",void 0),null}catch(Ce){return He(be.b,"Can not get response: "+Ce.message),null}}(z.a))}re=null;try{re=function(be,_e){function Ce(nt){Ae.f++,Ae.a=(Ae.a<<8)+nt,Ae.f==4&&(Ae.b=O,Ae.g=0,typeof Uint8Array!="undefined"?Ae.c=new Uint8Array(Ae.a):Ae.c=Array(Ae.a),Ae.a==0&&xe())}function Ie(nt){Ae.c[Ae.g++]=nt,Ae.g==Ae.a&&xe()}function xe(){var nt={};nt[Ae.h]=Ae.c,Ae.i.push(nt),Ae.b=F}var Ne,Ue,Ae=be,$e=0;for(Ne=_e instanceof Uint8Array||_e instanceof Array?_e:new Uint8Array(_e);$e<Ne.length;){switch(Ae.b){case L:g(Ae,Ne,$e,"stream already broken");break;case F:(Ue=Ne[$e])==k||Ue==E?Ae.h=Ue:g(Ae,Ne,$e,"invalid frame byte"),Ae.b=D,Ae.a=0,Ae.f=0;break;case D:Ce(Ne[$e]);break;case O:Ie(Ne[$e]);break;default:throw Error("unexpected parser state: "+Ae.b)}Ae.l++,$e++}return be=Ae.i,Ae.i=[],0<be.length?be:null}(z.m,J)}catch{rt(z,{code:2,message:"Error in parsing response body",metadata:{}})}if(re)for(J=0;J<re.length;J++){if(k in re[J]){var se=re[J][k];if(se)try{var fe=z.l(se);if(fe){se=z;for(var oe=fe,le=0;le<se.b.length;le++)se.b[le](oe)}}catch{rt(z,{code:2,message:"Error in response deserializer function.",metadata:{}})}}if(E in re[J]&&0<re[J][E].length){for(se="",oe=0;oe<re[J][E].length;oe++)se+=String.fromCharCode(re[J][E][oe]);for(se=se.trim().split(`\r
|
|
14
|
+
`)):G=O.stylize("[Circular]","special")),T(B)){if(U&&g.match(/^\d+$/))return G;(B=JSON.stringify(""+g)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(B=B.substr(1,B.length-2),B=O.stylize(B,"name")):(B=B.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),B=O.stylize(B,"string"))}return B+": "+G}function f(O){return Array.isArray(O)}function S(O){return typeof O=="boolean"}function w(O){return O===null}function P(O){return typeof O=="number"}function N(O){return typeof O=="string"}function T(O){return O===void 0}function R(O){return d(O)&&h(O)==="[object RegExp]"}function d(O){return typeof O=="object"&&O!==null}function I(O){return d(O)&&h(O)==="[object Date]"}function Q(O){return d(O)&&(h(O)==="[object Error]"||O instanceof Error)}function Z(O){return typeof O=="function"}function h(O){return Object.prototype.toString.call(O)}function p(O){return O<10?"0"+O.toString(10):O.toString(10)}t.debuglog=function(O){if(T(s)&&(s=n.env.NODE_DEBUG||""),O=O.toUpperCase(),!i[O])if(new RegExp("\\b"+O+"\\b","i").test(s)){var L=n.pid;i[O]=function(){var k=t.format.apply(t,arguments);console.error("%s %d: %s",O,L,k)}}else i[O]=function(){};return i[O]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=S,t.isNull=w,t.isNullOrUndefined=function(O){return O==null},t.isNumber=P,t.isString=N,t.isSymbol=function(O){return typeof O=="symbol"},t.isUndefined=T,t.isRegExp=R,t.isObject=d,t.isDate=I,t.isError=Q,t.isFunction=Z,t.isPrimitive=function(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||O===void 0},t.isBuffer=r(106);var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function m(){var O=new Date,L=[p(O.getHours()),p(O.getMinutes()),p(O.getSeconds())].join(":");return[O.getDate(),j[O.getMonth()],L].join(" ")}function x(O,L){return Object.prototype.hasOwnProperty.call(O,L)}t.log=function(){console.log("%s - %s",m(),t.format.apply(t,arguments))},t.inherits=r(107),t._extend=function(O,L){if(!L||!d(L))return O;for(var k=Object.keys(L),E=k.length;E--;)O[k[E]]=L[k[E]];return O};var F=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;function D(O,L){if(!O){var k=new Error("Promise was rejected with a falsy value");k.reason=O,O=k}return L(O)}t.promisify=function(O){if(typeof O!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&O[F]){var L;if(typeof(L=O[F])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(L,F,{value:L,enumerable:!1,writable:!1,configurable:!0}),L}function L(){for(var k,E,g=new Promise(function(G,Y){k=G,E=Y}),U=[],B=0;B<arguments.length;B++)U.push(arguments[B]);U.push(function(G,Y){G?E(G):k(Y)});try{O.apply(this,U)}catch(G){E(G)}return g}return Object.setPrototypeOf(L,Object.getPrototypeOf(O)),F&&Object.defineProperty(L,F,{value:L,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(L,o(O))},t.promisify.custom=F,t.callbackify=function(O){if(typeof O!="function")throw new TypeError('The "original" argument must be of type Function');function L(){for(var k=[],E=0;E<arguments.length;E++)k.push(arguments[E]);var g=k.pop();if(typeof g!="function")throw new TypeError("The last argument must be of type Function");var U=this,B=function(){return g.apply(U,arguments)};O.apply(this,k).then(function(G){n.nextTick(B,null,G)},function(G){n.nextTick(D,G,B)})}return Object.setPrototypeOf(L,Object.getPrototypeOf(O)),Object.defineProperties(L,o(O)),L}}).call(this,r(2))},function(e,t,r){r.d(t,"a",function(){return n});const n=o=>new Promise(l=>setTimeout(l,o||0))},function(e,t,r){(function(n){var o=n!==void 0&&n||typeof self!="undefined"&&self||window,l=Function.prototype.apply;function s(i,c){this._id=i,this._clearFn=c}t.setTimeout=function(){return new s(l.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new s(l.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(i){i&&i.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(i,c){clearTimeout(i._idleTimeoutId),i._idleTimeout=c},t.unenroll=function(i){clearTimeout(i._idleTimeoutId),i._idleTimeout=-1},t._unrefActive=t.active=function(i){clearTimeout(i._idleTimeoutId);var c=i._idleTimeout;c>=0&&(i._idleTimeoutId=setTimeout(function(){i._onTimeout&&i._onTimeout()},c))},r(140),t.setImmediate=typeof self!="undefined"&&self.setImmediate||n!==void 0&&n.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self!="undefined"&&self.clearImmediate||n!==void 0&&n.clearImmediate||this&&this.clearImmediate}).call(this,r(5))},function(e,t,r){(function(n){n===void 0||!n.version||n.version.indexOf("v0.")===0||n.version.indexOf("v1.")===0&&n.version.indexOf("v1.8.")!==0?e.exports={nextTick:function(o,l,s,i){if(typeof o!="function")throw new TypeError('"callback" argument must be a function');var c,u,b=arguments.length;switch(b){case 0:case 1:return n.nextTick(o);case 2:return n.nextTick(function(){o.call(null,l)});case 3:return n.nextTick(function(){o.call(null,l,s)});case 4:return n.nextTick(function(){o.call(null,l,s,i)});default:for(c=new Array(b-1),u=0;u<c.length;)c[u++]=arguments[u];return n.nextTick(function(){o.apply(null,c)})}}}:e.exports=n}).call(this,r(2))},function(e,t,r){(function(n){function o(l){return Object.prototype.toString.call(l)}t.isArray=function(l){return Array.isArray?Array.isArray(l):o(l)==="[object Array]"},t.isBoolean=function(l){return typeof l=="boolean"},t.isNull=function(l){return l===null},t.isNullOrUndefined=function(l){return l==null},t.isNumber=function(l){return typeof l=="number"},t.isString=function(l){return typeof l=="string"},t.isSymbol=function(l){return typeof l=="symbol"},t.isUndefined=function(l){return l===void 0},t.isRegExp=function(l){return o(l)==="[object RegExp]"},t.isObject=function(l){return typeof l=="object"&&l!==null},t.isDate=function(l){return o(l)==="[object Date]"},t.isError=function(l){return o(l)==="[object Error]"||l instanceof Error},t.isFunction=function(l){return typeof l=="function"},t.isPrimitive=function(l){return l===null||typeof l=="boolean"||typeof l=="number"||typeof l=="string"||typeof l=="symbol"||l===void 0},t.isBuffer=n.isBuffer}).call(this,r(4).Buffer)},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return typeof location!="undefined"?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return typeof navigator!="undefined"?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL=`
|
|
15
|
+
`,t.homedir=function(){return"/"}},function(e,t,r){var n=r(56),o=r(59).warn,l=t;l.version=r(137).version,l.transports=r(138),l.config=r(47),l.addColors=n.levels,l.format=n.format,l.createLogger=r(85),l.ExceptionHandler=r(86),l.RejectionHandler=r(90),l.Container=r(209),l.Transport=r(17),l.loggers=new l.Container;var s=l.createLogger();Object.keys(l.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(function(i){return l[i]=function(){return s[i].apply(s,arguments)}}),Object.defineProperty(l,"level",{get:function(){return s.level},set:function(i){s.level=i}}),Object.defineProperty(l,"exceptions",{get:function(){return s.exceptions}}),["exitOnError"].forEach(function(i){Object.defineProperty(l,i,{get:function(){return s[i]},set:function(c){s[i]=c}})}),Object.defineProperty(l,"default",{get:function(){return{exceptionHandlers:s.exceptionHandlers,rejectionHandlers:s.rejectionHandlers,transports:s.transports}}}),o.deprecated(l,"setLevels"),o.forFunctions(l,"useFormat",["cli"]),o.forProperties(l,"useFormat",["padLevels","stripColors"]),o.forFunctions(l,"deprecated",["addRewriter","addFilter","clone","extend"]),o.forProperties(l,"deprecated",["emitErrs","levelLength"]),o.moved(l,"createLogger","Logger")},function(e,t,r){var n=r(10),o=r(141),l=r(3).LEVEL,s=e.exports=function(){var i=this,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};o.call(this,{objectMode:!0,highWaterMark:c.highWaterMark}),this.format=c.format,this.level=c.level,this.handleExceptions=c.handleExceptions,this.handleRejections=c.handleRejections,this.silent=c.silent,c.log&&(this.log=c.log),c.logv&&(this.logv=c.logv),c.close&&(this.close=c.close),this.once("pipe",function(u){i.levels=u.levels,i.parent=u}),this.once("unpipe",function(u){u===i.parent&&(i.parent=null,i.close&&i.close())})};n.inherits(s,o),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);var b=this.level||this.parent&&this.parent.level;if(!b||this.levels[b]>=this.levels[i[l]]){if(i&&!this.format)return this.log(i,u);var A=void 0,_=void 0;try{_=this.format.transform(Object.assign({},i),this.format.options)}catch(v){A=v}if(A||!_){if(u(),A)throw A;return}return this.log(_,u)}return u(null)},s.prototype._writev=function(i,c){if(this.logv){var u=i.filter(this._accept,this);return u.length?this.logv(u,c):c(null)}for(var b=0;b<i.length;b++)if(this._accept(i[b]))if(!i[b].chunk||this.format){var A=void 0,_=void 0;try{_=this.format.transform(Object.assign({},i[b].chunk),this.format.options)}catch(v){A=v}if(A||!_){if(i[b].callback(),A)throw c(null),A}else this.log(_,i[b].callback)}else this.log(i[b].chunk,i[b].callback);return c(null)},s.prototype._accept=function(i){var c=i.chunk;if(this.silent)return!1;var u=this.level||this.parent&&this.parent.level;return!(c.exception!==!0&&u&&!(this.levels[u]>=this.levels[c[l]])||!this.handleExceptions&&c.exception===!0)},s.prototype._nop=function(){},e.exports.LegacyTransportStream=r(147)},function(e,t,r){var n,o=typeof Reflect=="object"?Reflect:null,l=o&&typeof o.apply=="function"?o.apply:function(w,P,N){return Function.prototype.apply.call(w,P,N)};n=o&&typeof o.ownKeys=="function"?o.ownKeys:Object.getOwnPropertySymbols?function(w){return Object.getOwnPropertyNames(w).concat(Object.getOwnPropertySymbols(w))}:function(w){return Object.getOwnPropertyNames(w)};var s=Number.isNaN||function(w){return w!=w};function i(){i.init.call(this)}e.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var c=10;function u(w){return w._maxListeners===void 0?i.defaultMaxListeners:w._maxListeners}function b(w,P,N,T){var R,d,I,Q;if(typeof N!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof N);if((d=w._events)===void 0?(d=w._events=Object.create(null),w._eventsCount=0):(d.newListener!==void 0&&(w.emit("newListener",P,N.listener?N.listener:N),d=w._events),I=d[P]),I===void 0)I=d[P]=N,++w._eventsCount;else if(typeof I=="function"?I=d[P]=T?[N,I]:[I,N]:T?I.unshift(N):I.push(N),(R=u(w))>0&&I.length>R&&!I.warned){I.warned=!0;var Z=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(P)+" listeners added. Use emitter.setMaxListeners() to increase limit");Z.name="MaxListenersExceededWarning",Z.emitter=w,Z.type=P,Z.count=I.length,Q=Z,console&&console.warn&&console.warn(Q)}return w}function A(){for(var w=[],P=0;P<arguments.length;P++)w.push(arguments[P]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,l(this.listener,this.target,w))}function _(w,P,N){var T={fired:!1,wrapFn:void 0,target:w,type:P,listener:N},R=A.bind(T);return R.listener=N,T.wrapFn=R,R}function v(w,P,N){var T=w._events;if(T===void 0)return[];var R=T[P];return R===void 0?[]:typeof R=="function"?N?[R.listener||R]:[R]:N?function(d){for(var I=new Array(d.length),Q=0;Q<I.length;++Q)I[Q]=d[Q].listener||d[Q];return I}(R):S(R,R.length)}function f(w){var P=this._events;if(P!==void 0){var N=P[w];if(typeof N=="function")return 1;if(N!==void 0)return N.length}return 0}function S(w,P){for(var N=new Array(P),T=0;T<P;++T)N[T]=w[T];return N}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(w){if(typeof w!="number"||w<0||s(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");c=w}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(w){if(typeof w!="number"||w<0||s(w))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+w+".");return this._maxListeners=w,this},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(w){for(var P=[],N=1;N<arguments.length;N++)P.push(arguments[N]);var T=w==="error",R=this._events;if(R!==void 0)T=T&&R.error===void 0;else if(!T)return!1;if(T){var d;if(P.length>0&&(d=P[0]),d instanceof Error)throw d;var I=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw I.context=d,I}var Q=R[w];if(Q===void 0)return!1;if(typeof Q=="function")l(Q,this,P);else{var Z=Q.length,h=S(Q,Z);for(N=0;N<Z;++N)l(h[N],this,P)}return!0},i.prototype.addListener=function(w,P){return b(this,w,P,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(w,P){return b(this,w,P,!0)},i.prototype.once=function(w,P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P);return this.on(w,_(this,w,P)),this},i.prototype.prependOnceListener=function(w,P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P);return this.prependListener(w,_(this,w,P)),this},i.prototype.removeListener=function(w,P){var N,T,R,d,I;if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P);if((T=this._events)===void 0)return this;if((N=T[w])===void 0)return this;if(N===P||N.listener===P)--this._eventsCount==0?this._events=Object.create(null):(delete T[w],T.removeListener&&this.emit("removeListener",w,N.listener||P));else if(typeof N!="function"){for(R=-1,d=N.length-1;d>=0;d--)if(N[d]===P||N[d].listener===P){I=N[d].listener,R=d;break}if(R<0)return this;R===0?N.shift():function(Q,Z){for(;Z+1<Q.length;Z++)Q[Z]=Q[Z+1];Q.pop()}(N,R),N.length===1&&(T[w]=N[0]),T.removeListener!==void 0&&this.emit("removeListener",w,I||P)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(w){var P,N,T;if((N=this._events)===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[w]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete N[w]),this;if(arguments.length===0){var R,d=Object.keys(N);for(T=0;T<d.length;++T)(R=d[T])!=="removeListener"&&this.removeAllListeners(R);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(P=N[w])=="function")this.removeListener(w,P);else if(P!==void 0)for(T=P.length-1;T>=0;T--)this.removeListener(w,P[T]);return this},i.prototype.listeners=function(w){return v(this,w,!0)},i.prototype.rawListeners=function(w){return v(this,w,!1)},i.listenerCount=function(w,P){return typeof w.listenerCount=="function"?w.listenerCount(P):f.call(w,P)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){var n=r(146).Buffer,o=n.isEncoding||function(f){switch((f=""+f)&&f.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function l(f){var S;switch(this.encoding=function(w){var P=function(N){if(!N)return"utf8";for(var T;;)switch(N){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return N;default:if(T)return;N=(""+N).toLowerCase(),T=!0}}(w);if(typeof P!="string"&&(n.isEncoding===o||!o(w)))throw new Error("Unknown encoding: "+w);return P||w}(f),this.encoding){case"utf16le":this.text=c,this.end=u,S=4;break;case"utf8":this.fillLast=i,S=4;break;case"base64":this.text=b,this.end=A,S=3;break;default:return this.write=_,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(S)}function s(f){return f<=127?0:f>>5==6?2:f>>4==14?3:f>>3==30?4:f>>6==2?-1:-2}function i(f){var S=this.lastTotal-this.lastNeed,w=function(P,N,T){if((192&N[0])!=128)return P.lastNeed=0,"\uFFFD";if(P.lastNeed>1&&N.length>1){if((192&N[1])!=128)return P.lastNeed=1,"\uFFFD";if(P.lastNeed>2&&N.length>2&&(192&N[2])!=128)return P.lastNeed=2,"\uFFFD"}}(this,f);return w!==void 0?w:this.lastNeed<=f.length?(f.copy(this.lastChar,S,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(f.copy(this.lastChar,S,0,f.length),void(this.lastNeed-=f.length))}function c(f,S){if((f.length-S)%2==0){var w=f.toString("utf16le",S);if(w){var P=w.charCodeAt(w.length-1);if(P>=55296&&P<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=f[f.length-1],f.toString("utf16le",S,f.length-1)}function u(f){var S=f&&f.length?this.write(f):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return S+this.lastChar.toString("utf16le",0,w)}return S}function b(f,S){var w=(f.length-S)%3;return w===0?f.toString("base64",S):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=f[f.length-1]:(this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1]),f.toString("base64",S,f.length-w))}function A(f){var S=f&&f.length?this.write(f):"";return this.lastNeed?S+this.lastChar.toString("base64",0,3-this.lastNeed):S}function _(f){return f.toString(this.encoding)}function v(f){return f&&f.length?this.write(f):""}t.StringDecoder=l,l.prototype.write=function(f){if(f.length===0)return"";var S,w;if(this.lastNeed){if((S=this.fillLast(f))===void 0)return"";w=this.lastNeed,this.lastNeed=0}else w=0;return w<f.length?S?S+this.text(f,w):this.text(f,w):S||""},l.prototype.end=function(f){var S=f&&f.length?this.write(f):"";return this.lastNeed?S+"\uFFFD":S},l.prototype.text=function(f,S){var w=function(N,T,R){var d=T.length-1;if(d<R)return 0;var I=s(T[d]);return I>=0?(I>0&&(N.lastNeed=I-1),I):--d<R||I===-2?0:(I=s(T[d]))>=0?(I>0&&(N.lastNeed=I-2),I):--d<R||I===-2?0:(I=s(T[d]))>=0?(I>0&&(I===2?I=0:N.lastNeed=I-3),I):0}(this,f,S);if(!this.lastNeed)return f.toString("utf8",S);this.lastTotal=w;var P=f.length-(w-this.lastNeed);return f.copy(this.lastChar,0,P),f.toString("utf8",S,P)},l.prototype.fillLast=function(f){if(this.lastNeed<=f.length)return f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,this.lastTotal-this.lastNeed,0,f.length),this.lastNeed-=f.length}},function(e,t,r){var n=r(13),o=Object.keys||function(f){var S=[];for(var w in f)S.push(w);return S};e.exports=A;var l=r(14);l.inherits=r(7);var s=r(67),i=r(44);l.inherits(A,s);for(var c=o(i.prototype),u=0;u<c.length;u++){var b=c[u];A.prototype[b]||(A.prototype[b]=i.prototype[b])}function A(f){if(!(this instanceof A))return new A(f);s.call(this,f),i.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",_)}function _(){this.allowHalfOpen||this._writableState.ended||n.nextTick(v,this)}function v(f){f.end()}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),A.prototype._destroy=function(f,S){this.push(null),this.end(),n.nextTick(S,f)}},function(e,t,r){(function(n){function o(M){var z=0;return function(){return z<M.length?{done:!1,value:M[z++]}:{done:!0}}}var l=typeof Object.defineProperties=="function"?Object.defineProperty:function(M,z,J){M!=Array.prototype&&M!=Object.prototype&&(M[z]=J.value)},s=function(M){M=[typeof window=="object"&&window,typeof self=="object"&&self,typeof n=="object"&&n,M];for(var z=0;z<M.length;++z){var J=M[z];if(J&&J.Math==Math)return J}throw Error("Cannot find global object")}(this);function i(M,z){if(z){var J=s;M=M.split(".");for(var re=0;re<M.length-1;re++){var se=M[re];se in J||(J[se]={}),J=J[se]}(z=z(re=J[M=M[M.length-1]]))!=re&&z!=null&&l(J,M,{configurable:!0,writable:!0,value:z})}}function c(M){var z=typeof Symbol!="undefined"&&Symbol.iterator&&M[Symbol.iterator];return z?z.call(M):{next:o(M)}}i("Object.is",function(M){return M||function(z,J){return z===J?z!==0||1/z==1/J:z!=z&&J!=J}}),i("Array.prototype.includes",function(M){return M||function(z,J){var re=this;re instanceof String&&(re=String(re));var se=re.length;for(0>(J=J||0)&&(J=Math.max(J+se,0));J<se;J++){var fe=re[J];if(fe===z||Object.is(fe,z))return!0}return!1}}),i("Promise",function(M){function z(oe){this.b=0,this.c=void 0,this.a=[];var le=this.f();try{oe(le.resolve,le.reject)}catch(ve){le.reject(ve)}}function J(){this.a=null}function re(oe){return oe instanceof z?oe:new z(function(le){le(oe)})}if(M)return M;J.prototype.b=function(oe){if(this.a==null){this.a=[];var le=this;this.c(function(){le.g()})}this.a.push(oe)};var se=s.setTimeout;J.prototype.c=function(oe){se(oe,0)},J.prototype.g=function(){for(;this.a&&this.a.length;){var oe=this.a;this.a=[];for(var le=0;le<oe.length;++le){var ve=oe[le];oe[le]=null;try{ve()}catch(be){this.f(be)}}}this.a=null},J.prototype.f=function(oe){this.c(function(){throw oe})},z.prototype.f=function(){function oe(be){return function(_e){ve||(ve=!0,be.call(le,_e))}}var le=this,ve=!1;return{resolve:oe(this.m),reject:oe(this.g)}},z.prototype.m=function(oe){if(oe===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(oe instanceof z)this.o(oe);else{e:switch(typeof oe){case"object":var le=oe!=null;break e;case"function":le=!0;break e;default:le=!1}le?this.l(oe):this.h(oe)}},z.prototype.l=function(oe){var le=void 0;try{le=oe.then}catch(ve){return void this.g(ve)}typeof le=="function"?this.u(le,oe):this.h(oe)},z.prototype.g=function(oe){this.i(2,oe)},z.prototype.h=function(oe){this.i(1,oe)},z.prototype.i=function(oe,le){if(this.b!=0)throw Error("Cannot settle("+oe+", "+le+"): Promise already settled in state"+this.b);this.b=oe,this.c=le,this.j()},z.prototype.j=function(){if(this.a!=null){for(var oe=0;oe<this.a.length;++oe)fe.b(this.a[oe]);this.a=null}};var fe=new J;return z.prototype.o=function(oe){var le=this.f();oe.w(le.resolve,le.reject)},z.prototype.u=function(oe,le){var ve=this.f();try{oe.call(le,ve.resolve,ve.reject)}catch(be){ve.reject(be)}},z.prototype.then=function(oe,le){function ve(Ie,xe){return typeof Ie=="function"?function(Ne){try{be(Ie(Ne))}catch(Ue){_e(Ue)}}:xe}var be,_e,je=new z(function(Ie,xe){be=Ie,_e=xe});return this.w(ve(oe,be),ve(le,_e)),je},z.prototype.catch=function(oe){return this.then(void 0,oe)},z.prototype.w=function(oe,le){function ve(){switch(be.b){case 1:oe(be.c);break;case 2:le(be.c);break;default:throw Error("Unexpected state: "+be.b)}}var be=this;this.a==null?fe.b(ve):this.a.push(ve)},z.resolve=re,z.reject=function(oe){return new z(function(le,ve){ve(oe)})},z.race=function(oe){return new z(function(le,ve){for(var be=c(oe),_e=be.next();!_e.done;_e=be.next())re(_e.value).w(le,ve)})},z.all=function(oe){var le=c(oe),ve=le.next();return ve.done?re([]):new z(function(be,_e){function je(Ne){return function(Ue){Ie[Ne]=Ue,--xe==0&&be(Ie)}}var Ie=[],xe=0;do Ie.push(void 0),xe++,re(ve.value).w(je(Ie.length-1),_e),ve=le.next();while(!ve.done)})},z});var u=u||{},b=this||self;function A(M,z){M=M.split("."),z=z||b;for(var J=0;J<M.length;J++)if((z=z[M[J]])==null)return null;return z}function _(){}function v(M){var z=typeof M;if(z=="object"){if(!M)return"null";if(M instanceof Array)return"array";if(M instanceof Object)return z;var J=Object.prototype.toString.call(M);if(J=="[object Window]")return"object";if(J=="[object Array]"||typeof M.length=="number"&&M.splice!==void 0&&M.propertyIsEnumerable!==void 0&&!M.propertyIsEnumerable("splice"))return"array";if(J=="[object Function]"||M.call!==void 0&&M.propertyIsEnumerable!==void 0&&!M.propertyIsEnumerable("call"))return"function"}else if(z=="function"&&M.call===void 0)return"object";return z}function f(M){var z=typeof M;return z=="object"&&M!=null||z=="function"}function S(M,z,J){return M.call.apply(M.bind,arguments)}function w(M,z,J){if(!M)throw Error();if(2<arguments.length){var re=Array.prototype.slice.call(arguments,2);return function(){var se=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(se,re),M.apply(z,se)}}return function(){return M.apply(z,arguments)}}function P(M,z,J){return(P=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?S:w).apply(null,arguments)}function N(M,z){function J(){}J.prototype=z.prototype,M.S=z.prototype,M.prototype=new J,M.prototype.constructor=M}function T(){this.a={}}function R(M,z,J,re){this.f=M,this.c=z,this.b=J,this.a=re}function d(M,z,J,re){J=J===void 0?{}:J,this.c=M,this.a=J,this.b=z,this.f=re===void 0?null:re}function I(M,z,J,re,se,fe){this.name=M,this.a=se,this.b=fe}function Q(M,z,J){J=J===void 0?{}:J;var re=re===void 0?new T:re;return new R(z,M,J,re)}function Z(M,z,J,re){return re instanceof I?re:new I(M,J,re.b||z.constructor,re.f,re.a,re.c)}function h(M){this.a=M}function p(M){switch(M){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}}function j(M){if(Error.captureStackTrace)Error.captureStackTrace(this,j);else{var z=Error().stack;z&&(this.stack=z)}M&&(this.message=String(M))}function m(M,z){for(var J="",re=(M=M.split("%s")).length-1,se=0;se<re;se++)J+=M[se]+(se<z.length?z[se]:"%s");j.call(this,J+M[re])}function x(){this.j=null,this.i=[],this.l=0,this.b=F,this.f=this.a=this.h=0,this.c=null,this.g=0}T.prototype.get=function(M){return this.a[M]},T.prototype.f=function(){return Object.keys(this.a)},R.prototype.getRequestMessage=function(){return this.f},R.prototype.getMethodDescriptor=function(){return this.c},R.prototype.getMetadata=function(){return this.b},R.prototype.getCallOptions=function(){return this.a},d.prototype.getResponseMessage=function(){return this.c},d.prototype.getMetadata=function(){return this.a},d.prototype.getMethodDescriptor=function(){return this.b},d.prototype.getStatus=function(){return this.f},h.prototype.on=function(M,z){return M=="data"||M=="error"?this:this.a.on(M,z)},h.prototype.removeListener=function(M,z){return this.a.removeListener(M,z)},h.prototype.cancel=function(){this.a.cancel()},N(j,Error),j.prototype.name="CustomError",N(m,j),m.prototype.name="AssertionError";var F=0,D=1,O=2,L=3,k=0,E=128;function g(M,z,J,re){throw M.b=L,M.j="The stream is broken @"+M.l+"/"+J+". Error: "+re+`. With input:
|
|
16
|
+
`+z,Error(M.j)}var U=Array.prototype.indexOf?function(M,z){return Array.prototype.indexOf.call(M,z,void 0)}:function(M,z){if(typeof M=="string")return typeof z!="string"||z.length!=1?-1:M.indexOf(z,0);for(var J=0;J<M.length;J++)if(J in M&&M[J]===z)return J;return-1},B,G=String.prototype.trim?function(M){return M.trim()}:function(M){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(M)[1]};function Y(M,z){return M.indexOf(z)!=-1}function K(M,z){return M<z?-1:M>z?1:0}e:{var H=b.navigator;if(H){var V=H.userAgent;if(V){B=V;break e}}B=""}var y="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function C(M){var z=1;M=M.split(":");for(var J=[];0<z&&M.length;)J.push(M.shift()),z--;return M.length&&J.push(M.join(":")),J}function W(M){return W[" "](M),M}W[" "]=_;var ee,X,ne=Y(B,"Opera"),ie=Y(B,"Trident")||Y(B,"MSIE"),he=Y(B,"Edge"),Se=Y(B,"Gecko")&&!(Y(B.toLowerCase(),"webkit")&&!Y(B,"Edge"))&&!(Y(B,"Trident")||Y(B,"MSIE"))&&!Y(B,"Edge"),we=Y(B.toLowerCase(),"webkit")&&!Y(B,"Edge");function Ee(){var M=b.document;return M?M.documentMode:void 0}e:{var ye="",q=(X=B,Se?/rv:([^\);]+)(\)|;)/.exec(X):he?/Edge\/([\d\.]+)/.exec(X):ie?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(X):we?/WebKit\/(\S+)/.exec(X):ne?/(?:Version)[ \/]?(\S+)/.exec(X):void 0);if(q&&(ye=q?q[1]:""),ie){var $=Ee();if($!=null&&$>parseFloat(ye)){ee=String($);break e}}ee=ye}var te,ue={};function ae(M){return function(z,J){var re=ue;return Object.prototype.hasOwnProperty.call(re,z)?re[z]:re[z]=J(z)}(M,function(){for(var z=0,J=G(String(ee)).split("."),re=G(String(M)).split("."),se=Math.max(J.length,re.length),fe=0;z==0&&fe<se;fe++){var oe=J[fe]||"",le=re[fe]||"";do{if(oe=/(\d*)(\D*)(.*)/.exec(oe)||["","","",""],le=/(\d*)(\D*)(.*)/.exec(le)||["","","",""],oe[0].length==0&&le[0].length==0)break;z=K(oe[1].length==0?0:parseInt(oe[1],10),le[1].length==0?0:parseInt(le[1],10))||K(oe[2].length==0,le[2].length==0)||K(oe[2],le[2]),oe=oe[3],le=le[3]}while(z==0)}return 0<=z})}if(b.document&&ie){var de=Ee();te=de||parseInt(ee,10)||void 0}else te=void 0;var me=te;function pe(){this.F=this.F}pe.prototype.F=!1;var ge,ce=Object.freeze||function(M){return M};(ge=!ie)||(ge=9<=Number(me));var Te=ge,Ae=ie&&!ae("9"),Pe=function(){if(!b.addEventListener||!Object.defineProperty)return!1;var M=!1,z=Object.defineProperty({},"passive",{get:function(){M=!0}});try{b.addEventListener("test",_,z),b.removeEventListener("test",_,z)}catch{}return M}();function Le(M,z){this.type=M,this.a=this.target=z,this.defaultPrevented=!1}function Fe(M,z){if(Le.call(this,M?M.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,M){var J=this.type=M.type,re=M.changedTouches&&M.changedTouches.length?M.changedTouches[0]:null;if(this.target=M.target||M.srcElement,this.a=z,z=M.relatedTarget){if(Se){e:{try{W(z.nodeName);var se=!0;break e}catch{}se=!1}se||(z=null)}}else J=="mouseover"?z=M.fromElement:J=="mouseout"&&(z=M.toElement);this.relatedTarget=z,re?(this.clientX=re.clientX!==void 0?re.clientX:re.pageX,this.clientY=re.clientY!==void 0?re.clientY:re.pageY,this.screenX=re.screenX||0,this.screenY=re.screenY||0):(this.clientX=M.clientX!==void 0?M.clientX:M.pageX,this.clientY=M.clientY!==void 0?M.clientY:M.pageY,this.screenX=M.screenX||0,this.screenY=M.screenY||0),this.button=M.button,this.key=M.key||"",this.ctrlKey=M.ctrlKey,this.altKey=M.altKey,this.shiftKey=M.shiftKey,this.metaKey=M.metaKey,this.pointerId=M.pointerId||0,this.pointerType=typeof M.pointerType=="string"?M.pointerType:ze[M.pointerType]||"",this.c=M,M.defaultPrevented&&this.b()}}Le.prototype.b=function(){this.defaultPrevented=!0},N(Fe,Le);var ze=ce({2:"touch",3:"pen",4:"mouse"});Fe.prototype.b=function(){Fe.S.b.call(this);var M=this.c;if(M.preventDefault)M.preventDefault();else if(M.returnValue=!1,Ae)try{(M.ctrlKey||112<=M.keyCode&&123>=M.keyCode)&&(M.keyCode=-1)}catch{}};var De="closure_listenable_"+(1e6*Math.random()|0),We=0;function Be(M,z,J,re,se){this.listener=M,this.proxy=null,this.src=z,this.type=J,this.capture=!!re,this.A=se,this.key=++We,this.s=this.v=!1}function ke(M){M.s=!0,M.listener=null,M.proxy=null,M.src=null,M.A=null}function qe(M){this.src=M,this.a={},this.b=0}function Ge(M,z){var J=z.type;if(J in M.a){var re,se=M.a[J],fe=U(se,z);(re=0<=fe)&&Array.prototype.splice.call(se,fe,1),re&&(ke(z),M.a[J].length==0&&(delete M.a[J],M.b--))}}function gt(M,z,J,re){for(var se=0;se<M.length;++se){var fe=M[se];if(!fe.s&&fe.listener==z&&fe.capture==!!J&&fe.A==re)return se}return-1}qe.prototype.add=function(M,z,J,re,se){var fe=M.toString();(M=this.a[fe])||(M=this.a[fe]=[],this.b++);var oe=gt(M,z,re,se);return-1<oe?(z=M[oe],J||(z.v=!1)):((z=new Be(z,this.src,fe,!!re,se)).v=J,M.push(z)),z};var ft="closure_lm_"+(1e6*Math.random()|0),ht={};function at(M,z,J,re,se){if(re&&re.once)(function oe(le,ve,be,_e,je){if(Array.isArray(ve))for(var Ie=0;Ie<ve.length;Ie++)oe(le,ve[Ie],be,_e,je);else be=dt(be),le&&le[De]?le.f.add(String(ve),be,!0,f(_e)?!!_e.capture:!!_e,je):Rt(le,ve,be,!0,_e,je)})(M,z,J,re,se);else if(Array.isArray(z))for(var fe=0;fe<z.length;fe++)at(M,z[fe],J,re,se);else J=dt(J),M&&M[De]?M.f.add(String(z),J,!1,f(re)?!!re.capture:!!re,se):Rt(M,z,J,!1,re,se)}function Rt(M,z,J,re,se,fe){if(!z)throw Error("Invalid event type");var oe=f(se)?!!se.capture:!!se,le=lt(M);if(le||(M[ft]=le=new qe(M)),!(J=le.add(z,J,re,oe,fe)).proxy)if(re=function(){var ve=Kt,be=Te?function(_e){return ve.call(be.src,be.listener,_e)}:function(_e){if(!(_e=ve.call(be.src,be.listener,_e)))return _e};return be}(),J.proxy=re,re.src=M,re.listener=J,M.addEventListener)Pe||(se=oe),se===void 0&&(se=!1),M.addEventListener(z.toString(),re,se);else if(M.attachEvent)M.attachEvent(Ot(z.toString()),re);else{if(!M.addListener||!M.removeListener)throw Error("addEventListener and attachEvent are unavailable.");M.addListener(re)}}function At(M){if(typeof M!="number"&&M&&!M.s){var z=M.src;if(z&&z[De])Ge(z.f,M);else{var J=M.type,re=M.proxy;z.removeEventListener?z.removeEventListener(J,re,M.capture):z.detachEvent?z.detachEvent(Ot(J),re):z.addListener&&z.removeListener&&z.removeListener(re),(J=lt(z))?(Ge(J,M),J.b==0&&(J.src=null,z[ft]=null)):ke(M)}}}function Ot(M){return M in ht?ht[M]:ht[M]="on"+M}function Ct(M,z,J,re){var se=!0;if((M=lt(M))&&(z=M.a[z.toString()]))for(z=z.concat(),M=0;M<z.length;M++){var fe=z[M];fe&&fe.capture==J&&!fe.s&&(fe=It(fe,re),se=se&&fe!==!1)}return se}function It(M,z){var J=M.listener,re=M.A||M.src;return M.v&&At(M),J.call(re,z)}function Kt(M,z){if(M.s)return!0;if(!Te){var J=z||A("window.event");z=new Fe(J,this);var re=!0;if(!(0>J.keyCode||J.returnValue!=null)){e:{var se=!1;if(J.keyCode==0)try{J.keyCode=-1;break e}catch{se=!0}(se||J.returnValue==null)&&(J.returnValue=!0)}for(J=[],se=z.a;se;se=se.parentNode)J.push(se);for(M=M.type,se=J.length-1;0<=se;se--){z.a=J[se];var fe=Ct(J[se],M,!0,z);re=re&&fe}for(se=0;se<J.length;se++)z.a=J[se],fe=Ct(J[se],M,!1,z),re=re&&fe}return re}return It(M,new Fe(z,this))}function lt(M){return(M=M[ft])instanceof qe?M:null}var pt="__closure_events_fn_"+(1e9*Math.random()>>>0);function dt(M){return v(M)=="function"?M:(M[pt]||(M[pt]=function(z){return M.handleEvent(z)}),M[pt])}function et(){pe.call(this),this.f=new qe(this),this.N=this}function Ze(M,z){M=M.N;var J=z.type||z;if(typeof z=="string")z=new Le(z,M);else if(z instanceof Le)z.target=z.target||M;else{var re=z;(function(se,fe){for(var oe,le,ve=1;ve<arguments.length;ve++){for(oe in le=arguments[ve])se[oe]=le[oe];for(var be=0;be<y.length;be++)oe=y[be],Object.prototype.hasOwnProperty.call(le,oe)&&(se[oe]=le[oe])}})(z=new Le(J,M),re)}jt(M=z.a=M,J,!0,z),jt(M,J,!1,z)}function jt(M,z,J,re){if(z=M.f.a[String(z)]){z=z.concat();for(var se=!0,fe=0;fe<z.length;++fe){var oe=z[fe];if(oe&&!oe.s&&oe.capture==J){var le=oe.listener,ve=oe.A||oe.src;oe.v&&Ge(M.f,oe),se=le.call(ve,re)!==!1&&se}}}}function Mt(M,z,J){if(v(M)=="function")J&&(M=P(M,J));else{if(!M||typeof M.handleEvent!="function")throw Error("Invalid listener argument");M=P(M.handleEvent,M)}return 2147483647<Number(z)?-1:b.setTimeout(M,z||0)}function mt(M,z,J){this.reset(M,z,J,void 0,void 0)}N(et,pe),et.prototype[De]=!0,et.prototype.addEventListener=function(M,z,J,re){at(this,M,z,J,re)},et.prototype.removeEventListener=function(M,z,J,re){(function se(fe,oe,le,ve,be){if(Array.isArray(oe))for(var _e=0;_e<oe.length;_e++)se(fe,oe[_e],le,ve,be);else ve=f(ve)?!!ve.capture:!!ve,le=dt(le),fe&&fe[De]?(fe=fe.f,(oe=String(oe).toString())in fe.a&&-1<(le=gt(_e=fe.a[oe],le,ve,be))&&(ke(_e[le]),Array.prototype.splice.call(_e,le,1),_e.length==0&&(delete fe.a[oe],fe.b--))):fe&&(fe=lt(fe))&&(oe=fe.a[oe.toString()],fe=-1,oe&&(fe=gt(oe,le,ve,be)),(le=-1<fe?oe[fe]:null)&&At(le))})(this,M,z,J,re)},mt.prototype.a=null;function yt(M){this.f=M,this.b=this.c=this.a=null}function ut(M,z){this.name=M,this.value=z}mt.prototype.reset=function(M,z,J,re,se){delete this.a},ut.prototype.toString=function(){return this.name};var Pt=new ut("SEVERE",1e3),Jt=new ut("CONFIG",700),Xt=new ut("FINE",500);function Nt(M){return M.c?M.c:M.a?Nt(M.a):(function(z,J){throw new m("Failure"+(z?": "+z:""),Array.prototype.slice.call(arguments,1))}("Root logger has no level set."),null)}yt.prototype.log=function(M,z,J){if(M.value>=Nt(this).value)for(v(z)=="function"&&(z=z()),M=new mt(M,String(z),this.f),J&&(M.a=J),J=this;J;)J=J.a};var bt,vt={},ct=null;function He(M,z){M&&M.log(Xt,z,void 0)}function Lt(){}function xt(M){var z;return(z=M.a)||(z={},Bt(M)&&(z[0]=!0,z[1]=!0),z=M.a=z),z}function Ut(){}function Dt(M){return(M=Bt(M))?new ActiveXObject(M):new XMLHttpRequest}function Bt(M){if(!M.b&&typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var z=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],J=0;J<z.length;J++){var re=z[J];try{return new ActiveXObject(re),M.b=re}catch{}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return M.b}function Xe(M,z){this.b={},this.a=[],this.c=0;var J=arguments.length;if(1<J){if(J%2)throw Error("Uneven number of arguments");for(var re=0;re<J;re+=2)this.set(arguments[re],arguments[re+1])}else M&&kt(this,M)}function _t(M){if(M.c!=M.a.length){for(var z=0,J=0;z<M.a.length;){var re=M.a[z];tt(M.b,re)&&(M.a[J++]=re),z++}M.a.length=J}if(M.c!=M.a.length){var se={};for(J=z=0;z<M.a.length;)tt(se,re=M.a[z])||(M.a[J++]=re,se[re]=1),z++;M.a.length=J}}function kt(M,z){if(z instanceof Xe)for(var J=z.f(),re=0;re<J.length;re++)M.set(J[re],z.get(J[re]));else for(J in z)M.set(J,z[J])}function tt(M,z){return Object.prototype.hasOwnProperty.call(M,z)}Lt.prototype.a=null,N(Ut,Lt),bt=new Ut,Xe.prototype.f=function(){return _t(this),this.a.concat()},Xe.prototype.get=function(M,z){return tt(this.b,M)?this.b[M]:z},Xe.prototype.set=function(M,z){tt(this.b,M)||(this.c++,this.a.push(M)),this.b[M]=z},Xe.prototype.forEach=function(M,z){for(var J=this.f(),re=0;re<J.length;re++){var se=J[re],fe=this.get(se);M.call(z,fe,se,this)}};var Qt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Je(M){et.call(this),this.headers=new Xe,this.D=M||null,this.c=!1,this.C=this.a=null,this.J=this.o="",this.g=0,this.i="",this.h=this.I=this.m=this.G=!1,this.l=0,this.u=null,this.j=Ft,this.B=this.H=!1}N(Je,et);var Ft="",er=Je.prototype,tr=function M(z){var J;if(ct||(ct=new yt(""),vt[""]=ct,ct.c=Jt),!(J=vt[z])){J=new yt(z);var re=z.lastIndexOf("."),se=z.substr(re+1);(re=M(z.substr(0,re))).b||(re.b={}),re.b[se]=J,J.a=re,vt[z]=J}return J}("goog.net.XhrIo");er.b=tr;var rr=/^https?$/i,nr=["POST","PUT"];function or(M,z,J){if(M.a)throw Error("[goog.net.XhrIo] Object is active with another request="+M.o+"; newUri="+z);M.o=z,M.i="",M.g=0,M.J="POST",M.G=!1,M.c=!0,M.a=M.D?Dt(M.D):Dt(bt),M.C=M.D?xt(M.D):xt(bt),M.a.onreadystatechange=P(M.K,M);try{He(M.b,Ke(M,"Opening Xhr")),M.I=!0,M.a.open("POST",String(z),!0),M.I=!1}catch(fe){return He(M.b,Ke(M,"Error opening Xhr: "+fe.message)),void Wt(M,fe)}z=J||"";var re=function(fe){e:{for(var oe=ir,le=fe.length,ve=typeof fe=="string"?fe.split(""):fe,be=0;be<le;be++)if(be in ve&&oe.call(void 0,ve[be],be,fe)){oe=be;break e}oe=-1}return 0>oe?null:typeof fe=="string"?fe.charAt(oe):fe[oe]}((J=new Xe(M.headers)).f()),se=b.FormData&&z instanceof b.FormData;!(0<=U(nr,"POST"))||re||se||J.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),J.forEach(function(fe,oe){this.a.setRequestHeader(oe,fe)},M),M.j&&(M.a.responseType=M.j),"withCredentials"in M.a&&M.a.withCredentials!==M.H&&(M.a.withCredentials=M.H);try{Ht(M),0<M.l&&(M.B=function(fe){return ie&&ae(9)&&typeof fe.timeout=="number"&&fe.ontimeout!==void 0}(M.a),He(M.b,Ke(M,"Will abort after "+M.l+"ms if incomplete, xhr2 "+M.B)),M.B?(M.a.timeout=M.l,M.a.ontimeout=P(M.L,M)):M.u=Mt(M.L,M.l,M)),He(M.b,Ke(M,"Sending request")),M.m=!0,M.a.send(z),M.m=!1}catch(fe){He(M.b,Ke(M,"Send error: "+fe.message)),Wt(M,fe)}}function ir(M){return M.toLowerCase()=="content-type"}function Wt(M,z){M.c=!1,M.a&&(M.h=!0,M.a.abort(),M.h=!1),M.i=z,M.g=5,Vt(M),St(M)}function Vt(M){M.G||(M.G=!0,Ze(M,"complete"),Ze(M,"error"))}function zt(M){if(M.c&&u!==void 0){if(M.C[1]&&Qe(M)==4&&M.getStatus()==2)He(M.b,Ke(M,"Local request error detected and ignored"));else if(M.m&&Qe(M)==4)Mt(M.K,0,M);else if(Ze(M,"readystatechange"),Qe(M)==4){He(M.b,Ke(M,"Request complete")),M.c=!1;try{var z,J=M.getStatus();e:switch(J){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var re=!0;break e;default:re=!1}if(!(z=re)){var se;if(se=J===0){var fe=String(M.o).match(Qt)[1]||null;if(!fe&&b.self&&b.self.location){var oe=b.self.location.protocol;fe=oe.substr(0,oe.length-1)}se=!rr.test(fe?fe.toLowerCase():"")}z=se}if(z)Ze(M,"complete"),Ze(M,"success");else{M.g=6;try{var le=2<Qe(M)?M.a.statusText:""}catch(ve){He(M.b,"Can not get status: "+ve.message),le=""}M.i=le+" ["+M.getStatus()+"]",Vt(M)}}finally{St(M)}}}}function St(M){if(M.a){Ht(M);var z=M.a,J=M.C[0]?_:null;M.a=null,M.C=null,Ze(M,"ready");try{z.onreadystatechange=J}catch(re){(M=M.b)&&M.log(Pt,"Problem encountered resetting onreadystatechange: "+re.message,void 0)}}}function Ht(M){M.a&&M.B&&(M.a.ontimeout=null),M.u&&(b.clearTimeout(M.u),M.u=null)}function Qe(M){return M.a?M.a.readyState:0}function Gt(M,z){if(M.a&&Qe(M)==4)return(M=M.a.getResponseHeader(z))===null?void 0:M}function Ke(M,z){return z+" ["+M.J+" "+M.o+" "+M.getStatus()+"]"}Je.prototype.L=function(){u!==void 0&&this.a&&(this.i="Timed out after "+this.l+"ms, aborting",this.g=8,He(this.b,Ke(this,this.i)),Ze(this,"timeout"),this.abort(8))},Je.prototype.abort=function(M){this.a&&this.c&&(He(this.b,Ke(this,"Aborting")),this.c=!1,this.h=!0,this.a.abort(),this.h=!1,this.g=M||7,Ze(this,"complete"),Ze(this,"abort"),St(this))},Je.prototype.K=function(){this.F||(this.I||this.m||this.h?zt(this):this.O())},Je.prototype.O=function(){zt(this)},Je.prototype.getStatus=function(){try{return 2<Qe(this)?this.a.status:-1}catch{return-1}};var qt={},ot=null;function sr(M){var z=M.length,J=3*z/4;J%3?J=Math.floor(J):Y("=.",M[z-1])&&(J=Y("=.",M[z-2])?J-2:J-1);var re=new Uint8Array(J),se=0;return function(fe,oe){function le(xe){for(;ve<fe.length;){var Ne=fe.charAt(ve++),Ue=ot[Ne];if(Ue!=null)return Ue;if(!/^[\s\xa0]*$/.test(Ne))throw Error("Unknown base64 encoding at char: "+Ne)}return xe}Yt();for(var ve=0;;){var be=le(-1),_e=le(0),je=le(64),Ie=le(64);if(Ie===64&&be===-1)break;oe(be<<2|_e>>4),je!=64&&(oe(_e<<4&240|je>>2),Ie!=64&&oe(je<<6&192|Ie))}}(M,function(fe){re[se++]=fe}),re.subarray(0,se)}function Yt(){if(!ot){ot={};for(var M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),z=["+/=","+/","-_=","-_.","-_"],J=0;5>J;J++){var re=M.concat(z[J].split(""));qt[J]=re;for(var se=0;se<re.length;se++){var fe=re[se];ot[fe]===void 0&&(ot[fe]=se)}}}}var ar=["content-type","grpc-status","grpc-message"];function Ye(M){this.a=M.T,this.l=null,this.b=[],this.h=[],this.g=[],this.f=[],this.c=[],this.j=!1,this.i=0,this.m=new x;var z=this;at(this.a,"readystatechange",function(){var J=z.a;if(J=J.a?J.a.getResponseHeader("Content-Type"):null){if((J=J.toLowerCase()).lastIndexOf("application/grpc-web-text",0)==0){J=z.a;try{var re=J.a?J.a.responseText:""}catch(be){He(J.b,"Can not get responseText: "+be.message),re=""}if(re=(J=re||"").length-J.length%4,(J=J.substr(z.i,re-z.i)).length==0)return;z.i=re,J=sr(J)}else{if(J.lastIndexOf("application/grpc",0)!=0)return void rt(z,{code:2,message:"Unknown Content-type received.",metadata:{}});J=new Uint8Array(function(be){try{if(!be.a)return null;if("response"in be.a)return be.a.response;switch(be.j){case Ft:case"text":return be.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in be.a)return be.a.mozResponseArrayBuffer}var _e=be.b;return _e&&_e.log(Pt,"Response type "+be.j+" is not supported on this browser",void 0),null}catch(je){return He(be.b,"Can not get response: "+je.message),null}}(z.a))}re=null;try{re=function(be,_e){function je(nt){Oe.f++,Oe.a=(Oe.a<<8)+nt,Oe.f==4&&(Oe.b=O,Oe.g=0,typeof Uint8Array!="undefined"?Oe.c=new Uint8Array(Oe.a):Oe.c=Array(Oe.a),Oe.a==0&&xe())}function Ie(nt){Oe.c[Oe.g++]=nt,Oe.g==Oe.a&&xe()}function xe(){var nt={};nt[Oe.h]=Oe.c,Oe.i.push(nt),Oe.b=F}var Ne,Ue,Oe=be,$e=0;for(Ne=_e instanceof Uint8Array||_e instanceof Array?_e:new Uint8Array(_e);$e<Ne.length;){switch(Oe.b){case L:g(Oe,Ne,$e,"stream already broken");break;case F:(Ue=Ne[$e])==k||Ue==E?Oe.h=Ue:g(Oe,Ne,$e,"invalid frame byte"),Oe.b=D,Oe.a=0,Oe.f=0;break;case D:je(Ne[$e]);break;case O:Ie(Ne[$e]);break;default:throw Error("unexpected parser state: "+Oe.b)}Oe.l++,$e++}return be=Oe.i,Oe.i=[],0<be.length?be:null}(z.m,J)}catch{rt(z,{code:2,message:"Error in parsing response body",metadata:{}})}if(re)for(J=0;J<re.length;J++){if(k in re[J]){var se=re[J][k];if(se)try{var fe=z.l(se);if(fe){se=z;for(var oe=fe,le=0;le<se.b.length;le++)se.b[le](oe)}}catch{rt(z,{code:2,message:"Error in response deserializer function.",metadata:{}})}}if(E in re[J]&&0<re[J][E].length){for(se="",oe=0;oe<re[J][E].length;oe++)se+=String.fromCharCode(re[J][E][oe]);for(se=se.trim().split(`\r
|
|
17
17
|
`),oe={},le=0;le<se.length;le++){var ve=se[le].indexOf(":");oe[se[le].substring(0,ve).trim()]=se[le].substring(ve+1).trim()}se=oe,oe=0,le="","grpc-status"in se&&(oe=se["grpc-status"],delete se["grpc-status"]),"grpc-message"in se&&(le=se["grpc-message"],delete se["grpc-message"]),rt(z,{code:Number(oe),message:le,metadata:se})}}}}),at(this.a,"complete",function(){var J=z.a.g,re="",se={},fe=function(le){var ve={};le=(le.a&&Qe(le)==4&&le.a.getAllResponseHeaders()||"").split(`\r
|
|
18
|
-
`);for(var be=0;be<le.length;be++)if(!/^[\s\xa0]*$/.test(le[be])){var _e=
|
|
19
|
-
`}),Ne}(oe),typeof se=="string"?(_e=encodeURIComponent("$httpHeaders"),(_e+=oe=oe!=null?"="+encodeURIComponent(String(oe)):"")&&(0>(oe=se.indexOf("#"))&&(oe=se.length),0>(le=se.indexOf("?"))||le>oe?(le=oe,ve=""):ve=se.substring(le+1,oe),oe=(se=[se.substr(0,le),ve,se.substr(oe)])[1],se[1]=_e?oe?oe+"&"+_e:_e:oe,se=se[0]+(se[1]?"?"+se[1]:"")+se[2])):se.a("$httpHeaders",oe))}for(re=(z=(0,re.a)(z.getRequestMessage())).length,_e=[0,0,0,0],oe=new Uint8Array(5+re),le=3;0<=le;le--)_e[le]=re%256,re>>>=8;if(oe.set(new Uint8Array(_e),1),oe.set(z,5),z=oe,M.a=="text"){var Ce;for(M=z,Ce===void 0&&(Ce=0),Yt(),Ce=qt[Ce],z=[],re=0;re<M.length;re+=3){be=M[re];var Ie=(_e=re+1<M.length)?M[re+1]:0;le=be>>2,be=(3&be)<<4|Ie>>4,Ie=(15&Ie)<<2|(ve=(oe=re+2<M.length)?M[re+2]:0)>>6,ve&=63,oe||(ve=64,_e||(Ie=64)),z.push(Ce[le],Ce[be],Ce[Ie]||"",Ce[ve]||"")}z=z.join("")}else M.a=="binary"&&(J.j="arraybuffer");return or(J,se,z),fe}function $t(M,z,J){var re=null,se=!1;M.on("data",function(fe){re=fe}),M.on("error",function(fe){fe.code==0||se||(se=!0,z(fe,null))}),M.on("status",function(fe){fe.code==0||se?J&&z(null,null,fe):(se=!0,z({code:fe.code,message:fe.details,metadata:fe.metadata},null))}),J&&M.on("metadata",function(fe){z(null,null,null,fe)}),M.on("end",function(){se||(re==null?z({code:2,message:"Incomplete response"}):z(null,re)),J&&z(null,null)})}function Et(M,z){var J=M;return z.forEach(function(re){var se=J;J=function(fe){return re.intercept(fe,se)}}),J}Ye.prototype.on=function(M,z){return M=="data"?this.b.push(z):M=="status"?this.h.push(z):M=="metadata"?this.g.push(z):M=="end"?this.c.push(z):M=="error"&&this.f.push(z),this},Ye.prototype.removeListener=function(M,z){return M=="data"?it(this.b,z):M=="status"?it(this.h,z):M=="metadata"?it(this.g,z):M=="end"?it(this.c,z):M=="error"&&it(this.f,z),this},Ye.prototype.cancel=function(){this.j=!0,this.a.abort()},Ye.prototype.cancel=Ye.prototype.cancel,Ye.prototype.removeListener=Ye.prototype.removeListener,Ye.prototype.on=Ye.prototype.on,Ve.prototype.P=function(M,z,J,re,se){var fe=this;re=Z(M,z,"unary",re);var oe=M.substr(0,M.length-re.name.length);return $t(M=Et(function(le){return wt(fe,le,oe)},this.b).call(this,Q(re,z,J)),se,!1),new h(M)},Ve.prototype.M=function(M,z,J,re){var se=this;re=Z(M,z,"unary",re);var fe=M.substr(0,M.length-re.name.length);return Et(function(oe){return new Promise(function(le,ve){var be,_e,Ce;$t(wt(se,oe,fe),function(Ie,xe,Ne,Ue){Ie?ve(Ie):xe?Ce=xe:Ne?_e=Ne:Ue?be=Ue:(Ie=oe.getMethodDescriptor(),le(new d(Ce,Ie,xe=(xe=be)===void 0?{}:xe,_e===void 0?null:_e)))},!0)})},this.g).call(this,Q(re,z,J)).then(function(oe){return oe.getResponseMessage()})},Ve.prototype.unaryCall=function(M,z,J,re){return this.M(M,z,J,re)},Ve.prototype.R=function(M,z,J,re){var se=this;re=Z(M,z,"server_streaming",re);var fe=M.substr(0,M.length-re.name.length);return Et(function(oe){return wt(se,oe,fe)},this.b).call(this,Q(re,z,J))},Ve.prototype.serverStreaming=Ve.prototype.R,Ve.prototype.unaryCall=Ve.prototype.unaryCall,Ve.prototype.thenableCall=Ve.prototype.M,Ve.prototype.rpcCall=Ve.prototype.P,e.exports.AbstractClientBase={MethodInfo:function(M,z,J,re,se){this.name=re,this.b=se,this.f=M,this.a=z,this.c=J}},e.exports.GrpcWebClientBase=Ve,e.exports.StatusCode={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,UNAUTHENTICATED:16,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15},e.exports.MethodDescriptor=I,e.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming"}}).call(this,r(5))},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=t.isAsyncGenerator=t.isAsync=void 0;var n,o=r(151),l=(n=o)&&n.__esModule?n:{default:n};function s(i){return i[Symbol.toStringTag]==="AsyncFunction"}t.default=function(i){if(typeof i!="function")throw new Error("expected a function");return s(i)?(0,l.default)(i):i},t.isAsync=s,t.isAsyncGenerator=function(i){return i[Symbol.toStringTag]==="AsyncGenerator"},t.isAsyncIterable=function(i){return typeof i[Symbol.asyncIterator]=="function"}},function(e,t,r){var n={};function o(s,i,c){c||(c=Error);var u=function(b){var A,_;function v(f,S,w){return b.call(this,function(P,N,T){return typeof i=="string"?i:i(P,N,T)}(f,S,w))||this}return _=b,(A=v).prototype=Object.create(_.prototype),A.prototype.constructor=A,A.__proto__=_,v}(c);u.prototype.name=c.name,u.prototype.code=s,n[s]=u}function l(s,i){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(i," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(i," ").concat(s[0]," or ").concat(s[1]):"of ".concat(i," ").concat(s[0])}return"of ".concat(i," ").concat(String(s))}o("ERR_INVALID_OPT_VALUE",function(s,i){return'The value "'+i+'" is invalid for option "'+s+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(s,i,c){var u,b,A;if(typeof i=="string"&&(b="not ",i.substr(0,b.length)===b)?(u="must not be",i=i.replace(/^not /,"")):u="must be",function(v,f,S){return(S===void 0||S>v.length)&&(S=v.length),v.substring(S-f.length,S)===f}(s," argument"))A="The ".concat(s," ").concat(u," ").concat(l(i,"type"));else{var _=function(v,f,S){return typeof S!="number"&&(S=0),!(S+f.length>v.length)&&v.indexOf(f,S)!==-1}(s,".")?"property":"argument";A='The "'.concat(s,'" ').concat(_," ").concat(u," ").concat(l(i,"type"))}return A+=". Received type ".concat(typeof c)},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){(function(n){var o=Object.keys||function(v){var f=[];for(var S in v)f.push(S);return f};e.exports=b;var l=r(75),s=r(79);r(7)(b,l);for(var i=o(s.prototype),c=0;c<i.length;c++){var u=i[c];b.prototype[u]||(b.prototype[u]=s.prototype[u])}function b(v){if(!(this instanceof b))return new b(v);l.call(this,v),s.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",A)))}function A(){this._writableState.ended||n.nextTick(_,this)}function _(v){v.end()}Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(b.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(b.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(b.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=v,this._writableState.destroyed=v)}})}).call(this,r(2))},function(e,t,r){r.d(t,"a",function(){return s});var n=r(36),o=r(6);const l={"app-id":["app-id must match formant/*"]};class s extends n.a{constructor(c,u={}){super(c,Object.assign({validateHeaders:b=>`${b.get("app-id")}`.startsWith("formant/")?{}:l,headers:Object.assign(Object.assign({},s.headers),{"App-ID":`formant/${o.a}`,"App-Version":o.j})},u)),this.endpoint=c}}s.headers={}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n,o=n.length){if(!o)throw new Error("arity is undefined");return function(...l){return typeof l[o-1]=="function"?n.apply(this,l):new Promise((s,i)=>{l[o-1]=(c,...u)=>{if(c)return i(c);s(u.length>1?u:u[0])},n.apply(this,l)})}},e.exports=t.default},function(e,t,r){(t=e.exports=r(67)).Stream=t,t.Readable=t,t.Writable=r(44),t.Duplex=r(20),t.Transform=r(70),t.PassThrough=r(164)},function(e,t,r){(t=e.exports=r(75)).Stream=t,t.Readable=t,t.Writable=r(79),t.Duplex=r(24),t.Transform=r(80),t.PassThrough=r(183),t.finished=r(45),t.pipeline=r(184)},function(e,t,r){r.d(t,"a",function(){return o});const n=["password","secret","token","key","buffer"];function o(l,s=new Set){return s.has(l)?"[ RECURSIVE ]":!(i=l)||typeof i!="object"&&typeof i!="function"?l:(s.add(l),Object.keys(l).reduce((c,u)=>(c[u]=n.some(b=>u.toLowerCase().includes(b.toLowerCase()))?"[ REDACTED ]":o(l[u],s),c),{}));var i}},function(e,t){e.exports=n,n.default=n,n.stable=l,n.stableStringify=l;var r=[];function n(s,i,c){(function A(_,v,f,S){var w;if(typeof _=="object"&&_!==null){for(w=0;w<f.length;w++)if(f[w]===_)return S[v]="[Circular]",void r.push([S,v,_]);if(f.push(_),Array.isArray(_))for(w=0;w<_.length;w++)A(_[w],w,f,_);else{var P=Object.keys(_);for(w=0;w<P.length;w++){var N=P[w];A(_[N],N,f,_)}}f.pop()}})(s,"",[],void 0);for(var u=JSON.stringify(s,i,c);r.length!==0;){var b=r.pop();b[0][b[1]]=b[2]}return u}function o(s,i){return s<i?-1:s>i?1:0}function l(s,i,c){for(var u=function _(v,f,S,w){var P;if(typeof v=="object"&&v!==null){for(P=0;P<S.length;P++)if(S[P]===v)return w[f]="[Circular]",void r.push([w,f,v]);if(typeof v.toJSON=="function")return;if(S.push(v),Array.isArray(v))for(P=0;P<v.length;P++)_(v[P],P,S,v);else{var N={},T=Object.keys(v).sort(o);for(P=0;P<T.length;P++){var R=T[P];_(v[R],R,S,v),N[R]=v[R]}if(w===void 0)return N;r.push([w,f,v]),w[f]=N}S.pop()}}(s,"",[],void 0)||s,b=JSON.stringify(u,i,c);r.length!==0;){var A=r.pop();A[0][A[1]]=A[2]}return b}},function(e,t,r){var n=r(13),o=Object.keys||function(f){var S=[];for(var w in f)S.push(w);return S};e.exports=A;var l=Object.create(r(14));l.inherits=r(7);var s=r(142),i=r(60);l.inherits(A,s);for(var c=o(i.prototype),u=0;u<c.length;u++){var b=c[u];A.prototype[b]||(A.prototype[b]=i.prototype[b])}function A(f){if(!(this instanceof A))return new A(f);s.call(this,f),i.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",_)}function _(){this.allowHalfOpen||this._writableState.ended||n.nextTick(v,this)}function v(f){f.end()}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),A.prototype._destroy=function(f,S){this.push(null),this.end(),n.nextTick(S,f)}},function(e,t,r){var n=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function o(i,c){return Object.prototype.hasOwnProperty.call(i,c)}t.assign=function(i){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var b in u)o(u,b)&&(i[b]=u[b])}}return i},t.shrinkBuf=function(i,c){return i.length===c?i:i.subarray?i.subarray(0,c):(i.length=c,i)};var l={arraySet:function(i,c,u,b,A){if(c.subarray&&i.subarray)i.set(c.subarray(u,u+b),A);else for(var _=0;_<b;_++)i[A+_]=c[u+_]},flattenChunks:function(i){var c,u,b,A,_,v;for(b=0,c=0,u=i.length;c<u;c++)b+=i[c].length;for(v=new Uint8Array(b),A=0,c=0,u=i.length;c<u;c++)_=i[c],v.set(_,A),A+=_.length;return v}},s={arraySet:function(i,c,u,b,A){for(var _=0;_<b;_++)i[A+_]=c[u+_]},flattenChunks:function(i){return[].concat.apply([],i)}};t.setTyped=function(i){i?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,l)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(n)},function(e,t,r){e.exports=r(185)},function(e,t,r){e.exports=function(n){return n}},function(e,t,r){e.exports=function(n,o){o||(o={}),typeof o=="function"&&(o={cmp:o});var l,s=typeof o.cycles=="boolean"&&o.cycles,i=o.cmp&&(l=o.cmp,function(u){return function(b,A){var _={key:b,value:u[b]},v={key:A,value:u[A]};return l(_,v)}}),c=[];return function u(b){if(b&&b.toJSON&&typeof b.toJSON=="function"&&(b=b.toJSON()),b!==void 0){if(typeof b=="number")return isFinite(b)?""+b:"null";if(typeof b!="object")return JSON.stringify(b);var A,_;if(Array.isArray(b)){for(_="[",A=0;A<b.length;A++)A&&(_+=","),_+=u(b[A])||"null";return _+"]"}if(b===null)return"null";if(c.indexOf(b)!==-1){if(s)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var v=c.push(b)-1,f=Object.keys(b).sort(i&&i(b));for(_="",A=0;A<f.length;A++){var S=f[A],w=u(b[S]);w&&(_&&(_+=","),_+=JSON.stringify(S)+":"+w)}return c.splice(v,1),"{"+_+"}"}}(n)}},function(e,t,r){r.d(t,"a",function(){return N});var n=r(11),o=r(0);function l(T,R,d=()=>!0){if(T instanceof R&&d(T))return T;throw T}var s=r(1),i=r(100),c=r.n(i),u=r(101),b=r.n(u);class A extends Error{constructor(R,d,I){super(`Connection failure: ${R.message}`),this.cause=R,this.url=d,this.retryable=I}}var _=r(29);class v extends Error{constructor(R,d,I,Q,Z={},h){super(`Unexpected response (${I}) for ${R} ${d}: ${JSON.stringify(h?Object(_.a)([...h.entries()].reduce((p,[C,m])=>(p[C]=m,p),{})):{})} -- ${JSON.stringify(Object(_.a)(Q))}`),this.method=R,this.url=d,this.statusCode=I,this.body=Q,this.validationErrors=Z,this.headers=h}}class f extends Error{constructor(R,d){super(`Invalid headers (${JSON.stringify(R)}) for response: ${d.message}`),this.validationErrors=R,this.responseError=d}}var S=function(T,R,d,I){return new(d||(d=Promise))(function(Q,Z){function h(m){try{C(I.next(m))}catch(x){Z(x)}}function p(m){try{C(I.throw(m))}catch(x){Z(x)}}function C(m){var x;m.done?Q(m.value):(x=m.value,x instanceof d?x:new d(function(F){F(x)})).then(h,p)}C((I=I.apply(T,R||[])).next())})},w=function(T,R){var d={};for(var I in T)Object.prototype.hasOwnProperty.call(T,I)&&R.indexOf(I)<0&&(d[I]=T[I]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function"){var Q=0;for(I=Object.getOwnPropertySymbols(T);Q<I.length;Q++)R.indexOf(I[Q])<0&&Object.prototype.propertyIsEnumerable.call(T,I[Q])&&(d[I[Q]]=T[I[Q]])}return d};const P=new Set(["GET","HEAD","PUT","QUERY","DELETE","OPTIONS","TRACE"]);class N{constructor(R,d={}){if(this.endpoint=R,this.validateHeaders=I=>d.validateHeaders?d.validateHeaders(I):{},this.verbose=d.verbose!==!1,this.headers=d.headers||{},d.retries!==void 0&&!(d.retries>=0))throw new Error("retries must be positive or zero");if(this.configuredRetries=d.retries,d.timeoutMs!==void 0&&!(d.timeoutMs>0))throw new Error("timeoutMs must be positive");if(this.timeoutMs=d.timeoutMs,d.maxBackoffDelayMs!==void 0&&!(d.maxBackoffDelayMs>0))throw new Error("maxBackoffDelayMs must be positive");this.maxBackoffDelayMs=d.maxBackoffDelayMs||30*s.a.second}getRetries(){return this.configuredRetries!==void 0?this.configuredRetries:this.constructor.retries}fetch(R,d={}){return S(this,void 0,void 0,function*(){return(yield this.fetchVerbose(R,d)).body})}fetchVerbose(R,d={}){return S(this,void 0,void 0,function*(){let I=100*s.a.millisecond,Q=0;const Z=this.timeoutMs!==void 0?new Date().getTime()+this.timeoutMs:void 0,h=Z?()=>Math.max(Z-new Date().getTime(),0):void 0;for(;;)try{return yield this.doFetch(R,d,h)}catch(p){const C=l(p,A);if((h==null?void 0:h())===0||Q===this.getRetries()||!C.retryable)throw C;Q++,I=Math.min(...h?[h()]:[],I*(2+.1*(Math.random()-.5)),this.maxBackoffDelayMs),yield Object(n.a)(I),this.verbose&&o.a.warn(`Connection failure, retrying. Error: ${p.cause.message}`,{url:p.url,error:p.cause,attempt:Q})}})}doFetch(R,d,I){return S(this,void 0,void 0,function*(){const{token:Q,json:Z,allowUnsafeRetries:h}=d,p=w(d,["token","json","allowUnsafeRetries"]),C=(p.method||"GET").toUpperCase(),m=this.endpoint!==void 0?`${this.endpoint}${R?`/${R}`:""}`:R,x=new c.a;let F;if(I){const D=I();D>0?F=setTimeout(()=>{x.abort()},D):x.abort()}try{let D;yield Promise.race([this.constructor.waitForConnectivity(),new Promise(B=>{D=setTimeout(B,I?Math.min(s.a.minute,I()):s.a.minute)})]),D&&clearTimeout(D);const O=yield b()(m,Object.assign(Object.assign({},p),{headers:Object.assign(Object.assign(Object.assign(Object.assign({},Z!==!1?{"Content-Type":"application/json"}:{}),this.headers),p.headers||{}),Q!==void 0?{Authorization:`Bearer ${Q}`}:{}),signal:x.signal})),L=O.headers.get("content-type")||"",k=L&&L.startsWith("application/json"),E=k?yield O.json():yield O.text(),g=()=>new v(C,m,O.status,E,E&&E.validationErrors||{},O.headers);if(!O.ok)throw this.verbose&&o.a[O.status>=500?"warn":"info"]("Response error",{method:C,url:m,statusCode:O.status}),g();const U=this.validateHeaders(O.headers);if(Object.keys(U).length!==0)throw new f(U,g());if(O.status===204)return{body:void 0,headers:O.headers};if(Z&&!k)throw new Error(`Response is not JSON: ${JSON.stringify(E)}`);return{body:E,headers:O.headers}}catch(D){const O=h||P.has(C);if(D.message==="Network request failed")throw new A(D,m,O);if(D.type==="system"&&["EAI_AGAIN","ECONNREFUSED","EHOSTUNREACH","ENOTFOUND"].find(g=>g===D.code))throw new A(D,m,!0);if(D.type==="system"&&["ETIMEDOUT","ECONNRESET","ESOCKETTIMEDOUT","EPIPE"].find(g=>g===D.code))throw new A(D,m,O);if(D.name==="AbortError")throw new A(D,m,O);const L=l(D,v),{statusCode:k}=L;if(k===408||k===429||k===502||k===503||k===504)throw this.verbose&&!O&&o.a.warn("Potentially unsafe retry"),new A(D,m,!0);const E=this.validateHeaders(L.headers);throw Object.keys(E).length!==0?new f(E,L):(yield this.constructor.onResponseError(L),D)}finally{F&&clearTimeout(F)}})}}N.retries=8,N.waitForConnectivity=()=>S(void 0,void 0,void 0,function*(){}),N.onResponseError=()=>S(void 0,void 0,void 0,function*(){})},function(e,t,r){function n(A,_){if(!(A instanceof _))throw new TypeError("Cannot call a class as a function")}function o(A,_){for(var v=0;v<_.length;v++){var f=_[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(A,f.key,f)}}var l=r(57),s=r(3),i=s.LEVEL,c=s.MESSAGE;l.enabled=!0;var u=/\s+/,b=function(){function A(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(this,A),S.colors&&this.addColors(S.colors),this.options=S}var _,v,f;return _=A,f=[{key:"addColors",value:function(S){var w=Object.keys(S).reduce(function(P,N){return P[N]=u.test(S[N])?S[N].split(u):S[N],P},{});return A.allColors=Object.assign({},A.allColors||{},w),A.allColors}}],(v=[{key:"addColors",value:function(S){return A.addColors(S)}},{key:"colorize",value:function(S,w,P){if(P===void 0&&(P=w),!Array.isArray(A.allColors[S]))return l[A.allColors[S]](P);for(var N=0,T=A.allColors[S].length;N<T;N++)P=l[A.allColors[S][N]](P);return P}},{key:"transform",value:function(S,w){return w.all&&typeof S[c]=="string"&&(S[c]=this.colorize(S[i],S.level,S[c])),(w.level||w.all||!w.message)&&(S.level=this.colorize(S[i],S.level)),(w.all||w.message)&&(S.message=this.colorize(S[i],S.level,S.message)),S}}])&&o(_.prototype,v),f&&o(_,f),A}();e.exports=function(A){return new b(A)},e.exports.Colorizer=e.exports.Format=b},function(e,t){var r={}.toString;e.exports=Array.isArray||function(n){return r.call(n)=="[object Array]"}},function(e,t,r){(function(n){function o(l){try{if(!n.localStorage)return!1}catch{return!1}var s=n.localStorage[l];return s!=null&&String(s).toLowerCase()==="true"}e.exports=function(l,s){if(o("noDeprecation"))return l;var i=!1;return function(){if(!i){if(o("throwDeprecation"))throw new Error(s);o("traceDeprecation")?console.trace(s):console.warn(s),i=!0}return l.apply(this,arguments)}}}).call(this,r(5))},function(e,t,r){var n=r(4),o=n.Buffer;function l(i,c){for(var u in i)c[u]=i[u]}function s(i,c,u){return o(i,c,u)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(l(n,t),t.Buffer=s),l(o,s),s.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,c,u)},s.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var b=o(i);return c!==void 0?typeof u=="string"?b.fill(c,u):b.fill(c):b.fill(0),b},s.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},s.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(i)}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return n&&typeof n.length=="number"&&n.length>=0&&n.length%1==0},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},function(e,t,r){var n=r(4),o=n.Buffer;function l(i,c){for(var u in i)c[u]=i[u]}function s(i,c,u){return o(i,c,u)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(l(n,t),t.Buffer=s),l(o,s),s.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,c,u)},s.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var b=o(i);return c!==void 0?typeof u=="string"?b.fill(c,u):b.fill(c):b.fill(0),b},s.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},s.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(i)}},function(e,t,r){(function(n,o,l){var s=r(13);function i(p){var C=this;this.next=null,this.entry=null,this.finish=function(){(function(m,x,F){var D=m.entry;for(m.entry=null;D;){var O=D.callback;x.pendingcb--,O(F),D=D.next}x.corkedRequestsFree?x.corkedRequestsFree.next=m:x.corkedRequestsFree=m})(C,p)}}e.exports=T;var c,u=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?o:s.nextTick;T.WritableState=N;var b=r(14);b.inherits=r(7);var A={deprecate:r(39)},_=r(68),v=r(43).Buffer,f=l.Uint8Array||function(){},S,w=r(69);function P(){}function N(p,C){c=c||r(20),p=p||{};var m=C instanceof c;this.objectMode=!!p.objectMode,m&&(this.objectMode=this.objectMode||!!p.writableObjectMode);var x=p.highWaterMark,F=p.writableHighWaterMark,D=this.objectMode?16:16384;this.highWaterMark=x||x===0?x:m&&(F||F===0)?F:D,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=p.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=p.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){(function(k,E){var g=k._writableState,U=g.sync,B=g.writecb;if(function(Y){Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0}(g),E)(function(Y,K,H,V,y){--K.pendingcb,H?(s.nextTick(y,V),s.nextTick(h,Y,K),Y._writableState.errorEmitted=!0,Y.emit("error",V)):(y(V),Y._writableState.errorEmitted=!0,Y.emit("error",V),h(Y,K))})(k,g,U,E,B);else{var G=Q(g);G||g.corked||g.bufferProcessing||!g.bufferedRequest||I(k,g),U?u(d,k,g,G,B):d(k,g,G,B)}})(C,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(p){if(c=c||r(20),!(S.call(T,this)||this instanceof c))return new T(p);this._writableState=new N(p,this),this.writable=!0,p&&(typeof p.write=="function"&&(this._write=p.write),typeof p.writev=="function"&&(this._writev=p.writev),typeof p.destroy=="function"&&(this._destroy=p.destroy),typeof p.final=="function"&&(this._final=p.final)),_.call(this)}function R(p,C,m,x,F,D,O){C.writelen=x,C.writecb=O,C.writing=!0,C.sync=!0,m?p._writev(F,C.onwrite):p._write(F,D,C.onwrite),C.sync=!1}function d(p,C,m,x){m||function(F,D){D.length===0&&D.needDrain&&(D.needDrain=!1,F.emit("drain"))}(p,C),C.pendingcb--,x(),h(p,C)}function I(p,C){C.bufferProcessing=!0;var m=C.bufferedRequest;if(p._writev&&m&&m.next){var x=C.bufferedRequestCount,F=new Array(x),D=C.corkedRequestsFree;D.entry=m;for(var O=0,L=!0;m;)F[O]=m,m.isBuf||(L=!1),m=m.next,O+=1;F.allBuffers=L,R(p,C,!0,C.length,F,"",D.finish),C.pendingcb++,C.lastBufferedRequest=null,D.next?(C.corkedRequestsFree=D.next,D.next=null):C.corkedRequestsFree=new i(C),C.bufferedRequestCount=0}else{for(;m;){var k=m.chunk,E=m.encoding,g=m.callback;if(R(p,C,!1,C.objectMode?1:k.length,k,E,g),m=m.next,C.bufferedRequestCount--,C.writing)break}m===null&&(C.lastBufferedRequest=null)}C.bufferedRequest=m,C.bufferProcessing=!1}function Q(p){return p.ending&&p.length===0&&p.bufferedRequest===null&&!p.finished&&!p.writing}function Z(p,C){p._final(function(m){C.pendingcb--,m&&p.emit("error",m),C.prefinished=!0,p.emit("prefinish"),h(p,C)})}function h(p,C){var m=Q(C);return m&&(function(x,F){F.prefinished||F.finalCalled||(typeof x._final=="function"?(F.pendingcb++,F.finalCalled=!0,s.nextTick(Z,x,F)):(F.prefinished=!0,x.emit("prefinish")))}(p,C),C.pendingcb===0&&(C.finished=!0,p.emit("finish"))),m}b.inherits(T,_),N.prototype.getBuffer=function(){for(var p=this.bufferedRequest,C=[];p;)C.push(p),p=p.next;return C},function(){try{Object.defineProperty(N.prototype,"buffer",{get:A.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(p){return!!S.call(this,p)||this===T&&p&&p._writableState instanceof N}})):S=function(p){return p instanceof this},T.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},T.prototype.write=function(p,C,m){var x,F=this._writableState,D=!1,O=!F.objectMode&&(x=p,v.isBuffer(x)||x instanceof f);return O&&!v.isBuffer(p)&&(p=function(L){return v.from(L)}(p)),typeof C=="function"&&(m=C,C=null),O?C="buffer":C||(C=F.defaultEncoding),typeof m!="function"&&(m=P),F.ended?function(L,k){var E=new Error("write after end");L.emit("error",E),s.nextTick(k,E)}(this,m):(O||function(L,k,E,g){var U=!0,B=!1;return E===null?B=new TypeError("May not write null values to stream"):typeof E=="string"||E===void 0||k.objectMode||(B=new TypeError("Invalid non-string/buffer chunk")),B&&(L.emit("error",B),s.nextTick(g,B),U=!1),U}(this,F,p,m))&&(F.pendingcb++,D=function(L,k,E,g,U,B){if(!E){var G=function(V,y,j){return V.objectMode||V.decodeStrings===!1||typeof y!="string"||(y=v.from(y,j)),y}(k,g,U);g!==G&&(E=!0,U="buffer",g=G)}var Y=k.objectMode?1:g.length;k.length+=Y;var K=k.length<k.highWaterMark;if(K||(k.needDrain=!0),k.writing||k.corked){var H=k.lastBufferedRequest;k.lastBufferedRequest={chunk:g,encoding:U,isBuf:E,callback:B,next:null},H?H.next=k.lastBufferedRequest:k.bufferedRequest=k.lastBufferedRequest,k.bufferedRequestCount+=1}else R(L,k,!1,Y,g,U,B);return K}(this,F,O,p,C,m)),D},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var p=this._writableState;p.corked&&(p.corked--,p.writing||p.corked||p.finished||p.bufferProcessing||!p.bufferedRequest||I(this,p))},T.prototype.setDefaultEncoding=function(p){if(typeof p=="string"&&(p=p.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((p+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+p);return this._writableState.defaultEncoding=p,this},Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(p,C,m){m(new Error("_write() is not implemented"))},T.prototype._writev=null,T.prototype.end=function(p,C,m){var x=this._writableState;typeof p=="function"?(m=p,p=null,C=null):typeof C=="function"&&(m=C,C=null),p!=null&&this.write(p,C),x.corked&&(x.corked=1,this.uncork()),x.ending||x.finished||function(F,D,O){D.ending=!0,h(F,D),O&&(D.finished?s.nextTick(O):F.once("finish",O)),D.ended=!0,F.writable=!1}(this,x,m)},Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(p){this._writableState&&(this._writableState.destroyed=p)}}),T.prototype.destroy=w.destroy,T.prototype._undestroy=w.undestroy,T.prototype._destroy=function(p,C){this.end(),C(p)}}).call(this,r(2),r(12).setImmediate,r(5))},function(e,t,r){var n=r(23).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function l(s,i,c){if(typeof i=="function")return l(s,null,i);i||(i={}),c=function(T){var R=!1;return function(){if(!R){R=!0;for(var d=arguments.length,I=new Array(d),Q=0;Q<d;Q++)I[Q]=arguments[Q];T.apply(this,I)}}}(c||o);var u=i.readable||i.readable!==!1&&s.readable,b=i.writable||i.writable!==!1&&s.writable,A=function(){s.writable||v()},_=s._writableState&&s._writableState.finished,v=function(){b=!1,_=!0,u||c.call(s)},f=s._readableState&&s._readableState.endEmitted,S=function(){u=!1,f=!0,b||c.call(s)},w=function(T){c.call(s,T)},P=function(){var T;return u&&!f?(s._readableState&&s._readableState.ended||(T=new n),c.call(s,T)):b&&!_?(s._writableState&&s._writableState.ended||(T=new n),c.call(s,T)):void 0},N=function(){s.req.on("finish",v)};return function(T){return T.setHeader&&typeof T.abort=="function"}(s)?(s.on("complete",v),s.on("abort",P),s.req?N():s.on("request",N)):b&&!s._writableState&&(s.on("end",A),s.on("close",A)),s.on("end",S),s.on("finish",v),i.error!==!1&&s.on("error",w),s.on("close",P),function(){s.removeListener("complete",v),s.removeListener("abort",P),s.removeListener("request",N),s.req&&s.req.removeListener("finish",v),s.removeListener("end",A),s.removeListener("close",A),s.removeListener("finish",v),s.removeListener("end",S),s.removeListener("error",w),s.removeListener("close",P)}}},function(e,t,r){var n=r(193),o=r(195);function l(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=T,t.resolve=function(R,d){return T(R,!1,!0).resolve(d)},t.resolveObject=function(R,d){return R?T(R,!1,!0).resolveObject(d):d},t.format=function(R){return o.isString(R)&&(R=T(R)),R instanceof l?R.format():l.prototype.format.call(R)},t.Url=l;var s=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
20
|
-
`," "]),b=["'"].concat(u),A=["%","/","?",";","#"].concat(b),_=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,S={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},P={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=r(196);function T(R,d,I){if(R&&o.isObject(R)&&R instanceof l)return R;var Q=new l;return Q.parse(R,d,I),Q}l.prototype.parse=function(R,d,I){if(!o.isString(R))throw new TypeError("Parameter 'url' must be a string, not "+typeof R);var Q=R.indexOf("?"),Z=Q!==-1&&Q<R.indexOf("#")?"?":"#",h=R.split(Z);h[0]=h[0].replace(/\\/g,"/");var p=R=h.join(Z);if(p=p.trim(),!I&&R.split("#").length===1){var C=c.exec(p);if(C)return this.path=p,this.href=p,this.pathname=C[1],C[2]?(this.search=C[2],this.query=d?N.parse(this.search.substr(1)):this.search.substr(1)):d&&(this.search="",this.query={}),this}var m=s.exec(p);if(m){var x=(m=m[0]).toLowerCase();this.protocol=x,p=p.substr(m.length)}if(I||m||p.match(/^\/\/[^@\/]+@[^@\/]+/)){var F=p.substr(0,2)==="//";!F||m&&w[m]||(p=p.substr(2),this.slashes=!0)}if(!w[m]&&(F||m&&!P[m])){for(var D,O,L=-1,k=0;k<_.length;k++)(E=p.indexOf(_[k]))!==-1&&(L===-1||E<L)&&(L=E);for((O=L===-1?p.lastIndexOf("@"):p.lastIndexOf("@",L))!==-1&&(D=p.slice(0,O),p=p.slice(O+1),this.auth=decodeURIComponent(D)),L=-1,k=0;k<A.length;k++){var E;(E=p.indexOf(A[k]))!==-1&&(L===-1||E<L)&&(L=E)}L===-1&&(L=p.length),this.host=p.slice(0,L),p=p.slice(L),this.parseHost(),this.hostname=this.hostname||"";var g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g)for(var U=this.hostname.split(/\./),B=(k=0,U.length);k<B;k++){var G=U[k];if(G&&!G.match(v)){for(var Y="",K=0,H=G.length;K<H;K++)G.charCodeAt(K)>127?Y+="x":Y+=G[K];if(!Y.match(v)){var V=U.slice(0,k),y=U.slice(k+1),j=G.match(f);j&&(V.push(j[1]),y.unshift(j[2])),y.length&&(p="/"+y.join(".")+p),this.hostname=V.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=n.toASCII(this.hostname));var W=this.port?":"+this.port:"",ee=this.hostname||"";this.host=ee+W,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),p[0]!=="/"&&(p="/"+p))}if(!S[x])for(k=0,B=b.length;k<B;k++){var X=b[k];if(p.indexOf(X)!==-1){var ne=encodeURIComponent(X);ne===X&&(ne=escape(X)),p=p.split(X).join(ne)}}var ie=p.indexOf("#");ie!==-1&&(this.hash=p.substr(ie),p=p.slice(0,ie));var he=p.indexOf("?");if(he!==-1?(this.search=p.substr(he),this.query=p.substr(he+1),d&&(this.query=N.parse(this.query)),p=p.slice(0,he)):d&&(this.search="",this.query={}),p&&(this.pathname=p),P[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){W=this.pathname||"";var Se=this.search||"";this.path=W+Se}return this.href=this.format(),this},l.prototype.format=function(){var R=this.auth||"";R&&(R=(R=encodeURIComponent(R)).replace(/%3A/i,":"),R+="@");var d=this.protocol||"",I=this.pathname||"",Q=this.hash||"",Z=!1,h="";this.host?Z=R+this.host:this.hostname&&(Z=R+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(Z+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(h=N.stringify(this.query));var p=this.search||h&&"?"+h||"";return d&&d.substr(-1)!==":"&&(d+=":"),this.slashes||(!d||P[d])&&Z!==!1?(Z="//"+(Z||""),I&&I.charAt(0)!=="/"&&(I="/"+I)):Z||(Z=""),Q&&Q.charAt(0)!=="#"&&(Q="#"+Q),p&&p.charAt(0)!=="?"&&(p="?"+p),d+Z+(I=I.replace(/[?#]/g,function(C){return encodeURIComponent(C)}))+(p=p.replace("#","%23"))+Q},l.prototype.resolve=function(R){return this.resolveObject(T(R,!1,!0)).format()},l.prototype.resolveObject=function(R){if(o.isString(R)){var d=new l;d.parse(R,!1,!0),R=d}for(var I=new l,Q=Object.keys(this),Z=0;Z<Q.length;Z++){var h=Q[Z];I[h]=this[h]}if(I.hash=R.hash,R.href==="")return I.href=I.format(),I;if(R.slashes&&!R.protocol){for(var p=Object.keys(R),C=0;C<p.length;C++){var m=p[C];m!=="protocol"&&(I[m]=R[m])}return P[I.protocol]&&I.hostname&&!I.pathname&&(I.path=I.pathname="/"),I.href=I.format(),I}if(R.protocol&&R.protocol!==I.protocol){if(!P[R.protocol]){for(var x=Object.keys(R),F=0;F<x.length;F++){var D=x[F];I[D]=R[D]}return I.href=I.format(),I}if(I.protocol=R.protocol,R.host||w[R.protocol])I.pathname=R.pathname;else{for(var O=(R.pathname||"").split("/");O.length&&!(R.host=O.shift()););R.host||(R.host=""),R.hostname||(R.hostname=""),O[0]!==""&&O.unshift(""),O.length<2&&O.unshift(""),I.pathname=O.join("/")}if(I.search=R.search,I.query=R.query,I.host=R.host||"",I.auth=R.auth,I.hostname=R.hostname||R.host,I.port=R.port,I.pathname||I.search){var L=I.pathname||"",k=I.search||"";I.path=L+k}return I.slashes=I.slashes||R.slashes,I.href=I.format(),I}var E=I.pathname&&I.pathname.charAt(0)==="/",g=R.host||R.pathname&&R.pathname.charAt(0)==="/",U=g||E||I.host&&R.pathname,B=U,G=I.pathname&&I.pathname.split("/")||[],Y=(O=R.pathname&&R.pathname.split("/")||[],I.protocol&&!P[I.protocol]);if(Y&&(I.hostname="",I.port=null,I.host&&(G[0]===""?G[0]=I.host:G.unshift(I.host)),I.host="",R.protocol&&(R.hostname=null,R.port=null,R.host&&(O[0]===""?O[0]=R.host:O.unshift(R.host)),R.host=null),U=U&&(O[0]===""||G[0]==="")),g)I.host=R.host||R.host===""?R.host:I.host,I.hostname=R.hostname||R.hostname===""?R.hostname:I.hostname,I.search=R.search,I.query=R.query,G=O;else if(O.length)G||(G=[]),G.pop(),G=G.concat(O),I.search=R.search,I.query=R.query;else if(!o.isNullOrUndefined(R.search))return Y&&(I.hostname=I.host=G.shift(),(j=!!(I.host&&I.host.indexOf("@")>0)&&I.host.split("@"))&&(I.auth=j.shift(),I.host=I.hostname=j.shift())),I.search=R.search,I.query=R.query,o.isNull(I.pathname)&&o.isNull(I.search)||(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.href=I.format(),I;if(!G.length)return I.pathname=null,I.search?I.path="/"+I.search:I.path=null,I.href=I.format(),I;for(var K=G.slice(-1)[0],H=(I.host||R.host||G.length>1)&&(K==="."||K==="..")||K==="",V=0,y=G.length;y>=0;y--)(K=G[y])==="."?G.splice(y,1):K===".."?(G.splice(y,1),V++):V&&(G.splice(y,1),V--);if(!U&&!B)for(;V--;V)G.unshift("..");!U||G[0]===""||G[0]&&G[0].charAt(0)==="/"||G.unshift(""),H&&G.join("/").substr(-1)!=="/"&&G.push("");var j,W=G[0]===""||G[0]&&G[0].charAt(0)==="/";return Y&&(I.hostname=I.host=W?"":G.length?G.shift():"",(j=!!(I.host&&I.host.indexOf("@")>0)&&I.host.split("@"))&&(I.auth=j.shift(),I.host=I.hostname=j.shift())),(U=U||I.host&&G.length)&&!W&&G.unshift(""),G.length?I.pathname=G.join("/"):(I.pathname=null,I.path=null),o.isNull(I.pathname)&&o.isNull(I.search)||(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.auth=R.auth||I.auth,I.slashes=I.slashes||R.slashes,I.href=I.format(),I},l.prototype.parseHost=function(){var R=this.host,d=i.exec(R);d&&((d=d[0])!==":"&&(this.port=d.substr(1)),R=R.substr(0,R.length-d.length)),R&&(this.hostname=R)}},function(e,t,r){var n=r(56),o=r(3).configs;t.cli=n.levels(o.cli),t.npm=n.levels(o.npm),t.syslog=n.levels(o.syslog),t.addColors=n.levels},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(202)),o=i(r(203)),l=i(r(22)),s=i(r(26));function i(c){return c&&c.__esModule?c:{default:c}}t.default=(0,s.default)(function(c,u,b){return(0,n.default)(c,(0,o.default)((0,l.default)(u)),b)},3),e.exports=t.default},function(e,t,r){function n(o){Error.captureStackTrace(this,this.constructor),this.name="EnvVarError",this.message=`env-var: ${o}`}(0,r(10).inherits)(n,Error),e.exports=n},function(e,t,r){e.exports=function(n){const o=parseInt(n,10);if(isNaN(o)||n.toString().indexOf(".")!==-1)throw new Error("should be a valid integer");return o}},function(e,t,r){e.exports=function(n){const o=parseFloat(n);if(isNaN(o))throw new Error("should be a valid float");return o}},function(e,t,r){e.exports=function(n){try{return JSON.parse(n)}catch{throw new Error("should be valid (parseable) JSON")}}},function(e,t,r){(function(n){function o(i,c){for(var u=0,b=i.length-1;b>=0;b--){var A=i[b];A==="."?i.splice(b,1):A===".."?(i.splice(b,1),u++):u&&(i.splice(b,1),u--)}if(c)for(;u--;u)i.unshift("..");return i}function l(i,c){if(i.filter)return i.filter(c);for(var u=[],b=0;b<i.length;b++)c(i[b],b,i)&&u.push(i[b]);return u}t.resolve=function(){for(var i="",c=!1,u=arguments.length-1;u>=-1&&!c;u--){var b=u>=0?arguments[u]:n.cwd();if(typeof b!="string")throw new TypeError("Arguments to path.resolve must be strings");b&&(i=b+"/"+i,c=b.charAt(0)==="/")}return(c?"/":"")+(i=o(l(i.split("/"),function(A){return!!A}),!c).join("/"))||"."},t.normalize=function(i){var c=t.isAbsolute(i),u=s(i,-1)==="/";return(i=o(l(i.split("/"),function(b){return!!b}),!c).join("/"))||c||(i="."),i&&u&&(i+="/"),(c?"/":"")+i},t.isAbsolute=function(i){return i.charAt(0)==="/"},t.join=function(){var i=Array.prototype.slice.call(arguments,0);return t.normalize(l(i,function(c,u){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(i,c){function u(w){for(var P=0;P<w.length&&w[P]==="";P++);for(var N=w.length-1;N>=0&&w[N]==="";N--);return P>N?[]:w.slice(P,N-P+1)}i=t.resolve(i).substr(1),c=t.resolve(c).substr(1);for(var b=u(i.split("/")),A=u(c.split("/")),_=Math.min(b.length,A.length),v=_,f=0;f<_;f++)if(b[f]!==A[f]){v=f;break}var S=[];for(f=v;f<b.length;f++)S.push("..");return(S=S.concat(A.slice(v))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(i){if(typeof i!="string"&&(i+=""),i.length===0)return".";for(var c=i.charCodeAt(0),u=c===47,b=-1,A=!0,_=i.length-1;_>=1;--_)if((c=i.charCodeAt(_))===47){if(!A){b=_;break}}else A=!1;return b===-1?u?"/":".":u&&b===1?"/":i.slice(0,b)},t.basename=function(i,c){var u=function(b){typeof b!="string"&&(b+="");var A,_=0,v=-1,f=!0;for(A=b.length-1;A>=0;--A)if(b.charCodeAt(A)===47){if(!f){_=A+1;break}}else v===-1&&(f=!1,v=A+1);return v===-1?"":b.slice(_,v)}(i);return c&&u.substr(-1*c.length)===c&&(u=u.substr(0,u.length-c.length)),u},t.extname=function(i){typeof i!="string"&&(i+="");for(var c=-1,u=0,b=-1,A=!0,_=0,v=i.length-1;v>=0;--v){var f=i.charCodeAt(v);if(f!==47)b===-1&&(A=!1,b=v+1),f===46?c===-1?c=v:_!==1&&(_=1):c!==-1&&(_=-1);else if(!A){u=v+1;break}}return c===-1||b===-1||_===0||_===1&&c===b-1&&c===u+1?"":i.slice(c,b)};var s="ab".substr(-1)==="b"?function(i,c,u){return i.substr(c,u)}:function(i,c,u){return c<0&&(c=i.length+c),i.substr(c,u)}}).call(this,r(2))},function(e,t){function r(n,o){var l=[],s=[];return o==null&&(o=function(i,c){return l[0]===c?"[Circular ~]":"[Circular ~."+s.slice(0,l.indexOf(c)).join(".")+"]"}),function(i,c){if(l.length>0){var u=l.indexOf(this);~u?l.splice(u+1):l.push(this),~u?s.splice(u,1/0,i):s.push(i),~l.indexOf(c)&&(c=o.call(this,i,c))}else l.push(c);return n==null?c:n.call(this,i,c)}}(e.exports=function(n,o,l,s){return JSON.stringify(n,r(o,s),l)}).getSerialize=r},function(e,t,r){r(225),e.exports={encode:n=>new TextEncoder().encode(n),decode:n=>new TextDecoder().decode(n)}},function(e,t,r){var n=t.format=r(9);t.levels=r(104),Object.defineProperty(n,"align",{value:r(121)}),Object.defineProperty(n,"cli",{value:r(122)}),Object.defineProperty(n,"combine",{value:r(123)}),Object.defineProperty(n,"colorize",{value:r(37)}),Object.defineProperty(n,"json",{value:r(124)}),Object.defineProperty(n,"label",{value:r(127)}),Object.defineProperty(n,"logstash",{value:r(128)}),Object.defineProperty(n,"metadata",{value:r(129)}),Object.defineProperty(n,"padLevels",{value:r(58)}),Object.defineProperty(n,"prettyPrint",{value:r(130)}),Object.defineProperty(n,"printf",{value:r(131)}),Object.defineProperty(n,"simple",{value:r(132)}),Object.defineProperty(n,"splat",{value:r(133)}),Object.defineProperty(n,"timestamp",{value:r(134)}),Object.defineProperty(n,"uncolorize",{value:r(136)})},function(e,t,r){var n=r(105);e.exports=n},function(e,t,r){function n(_){return function(v){if(Array.isArray(v))return o(v)}(_)||function(v){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(v))return Array.from(v)}(_)||function(v,f){if(!!v){if(typeof v=="string")return o(v,f);var S=Object.prototype.toString.call(v).slice(8,-1);if(S==="Object"&&v.constructor&&(S=v.constructor.name),S==="Map"||S==="Set")return Array.from(v);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return o(v,f)}}(_)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
18
|
+
`);for(var be=0;be<le.length;be++)if(!/^[\s\xa0]*$/.test(le[be])){var _e=C(le[be]),je=_e[0];if(typeof(_e=_e[1])=="string"){_e=_e.trim();var Ie=ve[je]||[];ve[je]=Ie,Ie.push(_e)}}return function(xe,Ne){var Ue,Oe={};for(Ue in xe)Oe[Ue]=Ne.call(void 0,xe[Ue],Ue,xe);return Oe}(ve,function(xe){return xe.join(", ")})}(z.a);if(Object.keys(fe).forEach(function(le){ar.includes(le)||(se[le]=fe[le])}),function(le,ve){for(var be=0;be<le.g.length;be++)le.g[be](ve)}(z,se),J!=0){switch(J){case 7:var oe=10;break;case 8:oe=4;break;case 6:oe=function(le){switch(le){case 200:return 0;case 400:return 3;case 401:return 16;case 403:return 7;case 404:return 5;case 409:return 10;case 412:return 9;case 429:return 8;case 499:return 1;case 500:return 2;case 501:return 12;case 503:return 14;case 504:return 4;default:return 2}}(z.a.getStatus());break;default:oe=14}oe==10&&z.j||rt(z,{code:oe,message:p(J),metadata:{}})}else J=!1,"grpc-status"in fe&&(oe=Gt(z.a,"grpc-status"),"grpc-message"in fe&&(re=Gt(z.a,"grpc-message")),Number(oe)!=0&&(rt(z,{code:Number(oe),message:re,metadata:fe}),J=!0)),J||function(le){for(var ve=0;ve<le.c.length;ve++)le.c[ve]()}(z)})}function it(M,z){-1<(z=M.indexOf(z))&&M.splice(z,1)}function rt(M,z){if(z.code!=0)for(var J={code:z.code,message:decodeURIComponent(z.message||""),metadata:z.metadata},re=0;re<M.f.length;re++)M.f[re](J);for(z={code:z.code,details:decodeURIComponent(z.message||""),metadata:z.metadata},J=0;J<M.h.length;J++)M.h[J](z)}function Ve(M){this.a=A("format",M)||"text",this.f=A("suppressCorsPreflight",M)||!1,this.c=A("withCredentials",M)||!1,this.b=A("streamInterceptors",M)||[],this.g=A("unaryInterceptors",M)||[]}function wt(M,z,J){var re=z.getMethodDescriptor(),se=J+re.name;(J=new Je).H=M.c;var fe=new Ye({T:J});if(fe.l=re.b,kt(J.headers,z.getMetadata()),M.a=="text"?(J.headers.set("Content-Type","application/grpc-web-text"),J.headers.set("Accept","application/grpc-web-text")):J.headers.set("Content-Type","application/grpc-web+proto"),J.headers.set("X-User-Agent","grpc-web-javascript/0.1"),J.headers.set("X-Grpc-Web","1"),tt(J.headers.b,"deadline")){var oe=J.headers.get("deadline");oe=Math.round(oe-new Date().getTime());var le=J.headers;tt(le.b,"deadline")&&(delete le.b.deadline,le.c--,le.a.length>2*le.c&&_t(le)),1/0===oe&&(oe=0),0<oe&&J.headers.set("grpc-timeout",oe+"m")}if(M.f){_t(le=J.headers),oe={};for(var ve=0;ve<le.a.length;ve++){var be=le.a[ve];oe[be]=le.b[be]}(le=J.headers).b={},le.a.length=0,le.c=0;e:{for(_e in oe){var _e=!1;break e}_e=!0}_e||(oe=function(xe){var Ne="";return function(Ue,Oe){for(var $e in Ue)Oe.call(void 0,Ue[$e],$e,Ue)}(xe,function(Ue,Oe){Ne+=Oe,Ne+=":",Ne+=Ue,Ne+=`\r
|
|
19
|
+
`}),Ne}(oe),typeof se=="string"?(_e=encodeURIComponent("$httpHeaders"),(_e+=oe=oe!=null?"="+encodeURIComponent(String(oe)):"")&&(0>(oe=se.indexOf("#"))&&(oe=se.length),0>(le=se.indexOf("?"))||le>oe?(le=oe,ve=""):ve=se.substring(le+1,oe),oe=(se=[se.substr(0,le),ve,se.substr(oe)])[1],se[1]=_e?oe?oe+"&"+_e:_e:oe,se=se[0]+(se[1]?"?"+se[1]:"")+se[2])):se.a("$httpHeaders",oe))}for(re=(z=(0,re.a)(z.getRequestMessage())).length,_e=[0,0,0,0],oe=new Uint8Array(5+re),le=3;0<=le;le--)_e[le]=re%256,re>>>=8;if(oe.set(new Uint8Array(_e),1),oe.set(z,5),z=oe,M.a=="text"){var je;for(M=z,je===void 0&&(je=0),Yt(),je=qt[je],z=[],re=0;re<M.length;re+=3){be=M[re];var Ie=(_e=re+1<M.length)?M[re+1]:0;le=be>>2,be=(3&be)<<4|Ie>>4,Ie=(15&Ie)<<2|(ve=(oe=re+2<M.length)?M[re+2]:0)>>6,ve&=63,oe||(ve=64,_e||(Ie=64)),z.push(je[le],je[be],je[Ie]||"",je[ve]||"")}z=z.join("")}else M.a=="binary"&&(J.j="arraybuffer");return or(J,se,z),fe}function $t(M,z,J){var re=null,se=!1;M.on("data",function(fe){re=fe}),M.on("error",function(fe){fe.code==0||se||(se=!0,z(fe,null))}),M.on("status",function(fe){fe.code==0||se?J&&z(null,null,fe):(se=!0,z({code:fe.code,message:fe.details,metadata:fe.metadata},null))}),J&&M.on("metadata",function(fe){z(null,null,null,fe)}),M.on("end",function(){se||(re==null?z({code:2,message:"Incomplete response"}):z(null,re)),J&&z(null,null)})}function Et(M,z){var J=M;return z.forEach(function(re){var se=J;J=function(fe){return re.intercept(fe,se)}}),J}Ye.prototype.on=function(M,z){return M=="data"?this.b.push(z):M=="status"?this.h.push(z):M=="metadata"?this.g.push(z):M=="end"?this.c.push(z):M=="error"&&this.f.push(z),this},Ye.prototype.removeListener=function(M,z){return M=="data"?it(this.b,z):M=="status"?it(this.h,z):M=="metadata"?it(this.g,z):M=="end"?it(this.c,z):M=="error"&&it(this.f,z),this},Ye.prototype.cancel=function(){this.j=!0,this.a.abort()},Ye.prototype.cancel=Ye.prototype.cancel,Ye.prototype.removeListener=Ye.prototype.removeListener,Ye.prototype.on=Ye.prototype.on,Ve.prototype.P=function(M,z,J,re,se){var fe=this;re=Z(M,z,"unary",re);var oe=M.substr(0,M.length-re.name.length);return $t(M=Et(function(le){return wt(fe,le,oe)},this.b).call(this,Q(re,z,J)),se,!1),new h(M)},Ve.prototype.M=function(M,z,J,re){var se=this;re=Z(M,z,"unary",re);var fe=M.substr(0,M.length-re.name.length);return Et(function(oe){return new Promise(function(le,ve){var be,_e,je;$t(wt(se,oe,fe),function(Ie,xe,Ne,Ue){Ie?ve(Ie):xe?je=xe:Ne?_e=Ne:Ue?be=Ue:(Ie=oe.getMethodDescriptor(),le(new d(je,Ie,xe=(xe=be)===void 0?{}:xe,_e===void 0?null:_e)))},!0)})},this.g).call(this,Q(re,z,J)).then(function(oe){return oe.getResponseMessage()})},Ve.prototype.unaryCall=function(M,z,J,re){return this.M(M,z,J,re)},Ve.prototype.R=function(M,z,J,re){var se=this;re=Z(M,z,"server_streaming",re);var fe=M.substr(0,M.length-re.name.length);return Et(function(oe){return wt(se,oe,fe)},this.b).call(this,Q(re,z,J))},Ve.prototype.serverStreaming=Ve.prototype.R,Ve.prototype.unaryCall=Ve.prototype.unaryCall,Ve.prototype.thenableCall=Ve.prototype.M,Ve.prototype.rpcCall=Ve.prototype.P,e.exports.AbstractClientBase={MethodInfo:function(M,z,J,re,se){this.name=re,this.b=se,this.f=M,this.a=z,this.c=J}},e.exports.GrpcWebClientBase=Ve,e.exports.StatusCode={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,UNAUTHENTICATED:16,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15},e.exports.MethodDescriptor=I,e.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming"}}).call(this,r(5))},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=t.isAsyncGenerator=t.isAsync=void 0;var n,o=r(151),l=(n=o)&&n.__esModule?n:{default:n};function s(i){return i[Symbol.toStringTag]==="AsyncFunction"}t.default=function(i){if(typeof i!="function")throw new Error("expected a function");return s(i)?(0,l.default)(i):i},t.isAsync=s,t.isAsyncGenerator=function(i){return i[Symbol.toStringTag]==="AsyncGenerator"},t.isAsyncIterable=function(i){return typeof i[Symbol.asyncIterator]=="function"}},function(e,t,r){var n={};function o(s,i,c){c||(c=Error);var u=function(b){var A,_;function v(f,S,w){return b.call(this,function(P,N,T){return typeof i=="string"?i:i(P,N,T)}(f,S,w))||this}return _=b,(A=v).prototype=Object.create(_.prototype),A.prototype.constructor=A,A.__proto__=_,v}(c);u.prototype.name=c.name,u.prototype.code=s,n[s]=u}function l(s,i){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(i," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(i," ").concat(s[0]," or ").concat(s[1]):"of ".concat(i," ").concat(s[0])}return"of ".concat(i," ").concat(String(s))}o("ERR_INVALID_OPT_VALUE",function(s,i){return'The value "'+i+'" is invalid for option "'+s+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(s,i,c){var u,b,A;if(typeof i=="string"&&(b="not ",i.substr(0,b.length)===b)?(u="must not be",i=i.replace(/^not /,"")):u="must be",function(v,f,S){return(S===void 0||S>v.length)&&(S=v.length),v.substring(S-f.length,S)===f}(s," argument"))A="The ".concat(s," ").concat(u," ").concat(l(i,"type"));else{var _=function(v,f,S){return typeof S!="number"&&(S=0),!(S+f.length>v.length)&&v.indexOf(f,S)!==-1}(s,".")?"property":"argument";A='The "'.concat(s,'" ').concat(_," ").concat(u," ").concat(l(i,"type"))}return A+=". Received type ".concat(typeof c)},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){(function(n){var o=Object.keys||function(v){var f=[];for(var S in v)f.push(S);return f};e.exports=b;var l=r(75),s=r(79);r(7)(b,l);for(var i=o(s.prototype),c=0;c<i.length;c++){var u=i[c];b.prototype[u]||(b.prototype[u]=s.prototype[u])}function b(v){if(!(this instanceof b))return new b(v);l.call(this,v),s.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",A)))}function A(){this._writableState.ended||n.nextTick(_,this)}function _(v){v.end()}Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(b.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(b.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(b.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=v,this._writableState.destroyed=v)}})}).call(this,r(2))},function(e,t,r){r.d(t,"a",function(){return s});var n=r(36),o=r(6);const l={"app-id":["app-id must match formant/*"]};class s extends n.a{constructor(c,u={}){super(c,Object.assign({validateHeaders:b=>`${b.get("app-id")}`.startsWith("formant/")?{}:l,headers:Object.assign(Object.assign({},s.headers),{"App-ID":`formant/${o.a}`,"App-Version":o.j})},u)),this.endpoint=c}}s.headers={}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n,o=n.length){if(!o)throw new Error("arity is undefined");return function(...l){return typeof l[o-1]=="function"?n.apply(this,l):new Promise((s,i)=>{l[o-1]=(c,...u)=>{if(c)return i(c);s(u.length>1?u:u[0])},n.apply(this,l)})}},e.exports=t.default},function(e,t,r){(t=e.exports=r(67)).Stream=t,t.Readable=t,t.Writable=r(44),t.Duplex=r(20),t.Transform=r(70),t.PassThrough=r(164)},function(e,t,r){(t=e.exports=r(75)).Stream=t,t.Readable=t,t.Writable=r(79),t.Duplex=r(24),t.Transform=r(80),t.PassThrough=r(183),t.finished=r(45),t.pipeline=r(184)},function(e,t,r){r.d(t,"a",function(){return o});const n=["password","secret","token","key","buffer"];function o(l,s=new Set){return s.has(l)?"[ RECURSIVE ]":!(i=l)||typeof i!="object"&&typeof i!="function"?l:(s.add(l),Object.keys(l).reduce((c,u)=>(c[u]=n.some(b=>u.toLowerCase().includes(b.toLowerCase()))?"[ REDACTED ]":o(l[u],s),c),{}));var i}},function(e,t){e.exports=n,n.default=n,n.stable=l,n.stableStringify=l;var r=[];function n(s,i,c){(function A(_,v,f,S){var w;if(typeof _=="object"&&_!==null){for(w=0;w<f.length;w++)if(f[w]===_)return S[v]="[Circular]",void r.push([S,v,_]);if(f.push(_),Array.isArray(_))for(w=0;w<_.length;w++)A(_[w],w,f,_);else{var P=Object.keys(_);for(w=0;w<P.length;w++){var N=P[w];A(_[N],N,f,_)}}f.pop()}})(s,"",[],void 0);for(var u=JSON.stringify(s,i,c);r.length!==0;){var b=r.pop();b[0][b[1]]=b[2]}return u}function o(s,i){return s<i?-1:s>i?1:0}function l(s,i,c){for(var u=function _(v,f,S,w){var P;if(typeof v=="object"&&v!==null){for(P=0;P<S.length;P++)if(S[P]===v)return w[f]="[Circular]",void r.push([w,f,v]);if(typeof v.toJSON=="function")return;if(S.push(v),Array.isArray(v))for(P=0;P<v.length;P++)_(v[P],P,S,v);else{var N={},T=Object.keys(v).sort(o);for(P=0;P<T.length;P++){var R=T[P];_(v[R],R,S,v),N[R]=v[R]}if(w===void 0)return N;r.push([w,f,v]),w[f]=N}S.pop()}}(s,"",[],void 0)||s,b=JSON.stringify(u,i,c);r.length!==0;){var A=r.pop();A[0][A[1]]=A[2]}return b}},function(e,t,r){var n=r(13),o=Object.keys||function(f){var S=[];for(var w in f)S.push(w);return S};e.exports=A;var l=Object.create(r(14));l.inherits=r(7);var s=r(142),i=r(60);l.inherits(A,s);for(var c=o(i.prototype),u=0;u<c.length;u++){var b=c[u];A.prototype[b]||(A.prototype[b]=i.prototype[b])}function A(f){if(!(this instanceof A))return new A(f);s.call(this,f),i.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",_)}function _(){this.allowHalfOpen||this._writableState.ended||n.nextTick(v,this)}function v(f){f.end()}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),A.prototype._destroy=function(f,S){this.push(null),this.end(),n.nextTick(S,f)}},function(e,t,r){var n=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function o(i,c){return Object.prototype.hasOwnProperty.call(i,c)}t.assign=function(i){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var b in u)o(u,b)&&(i[b]=u[b])}}return i},t.shrinkBuf=function(i,c){return i.length===c?i:i.subarray?i.subarray(0,c):(i.length=c,i)};var l={arraySet:function(i,c,u,b,A){if(c.subarray&&i.subarray)i.set(c.subarray(u,u+b),A);else for(var _=0;_<b;_++)i[A+_]=c[u+_]},flattenChunks:function(i){var c,u,b,A,_,v;for(b=0,c=0,u=i.length;c<u;c++)b+=i[c].length;for(v=new Uint8Array(b),A=0,c=0,u=i.length;c<u;c++)_=i[c],v.set(_,A),A+=_.length;return v}},s={arraySet:function(i,c,u,b,A){for(var _=0;_<b;_++)i[A+_]=c[u+_]},flattenChunks:function(i){return[].concat.apply([],i)}};t.setTyped=function(i){i?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,l)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(n)},function(e,t,r){e.exports=r(185)},function(e,t,r){e.exports=function(n){return n}},function(e,t,r){e.exports=function(n,o){o||(o={}),typeof o=="function"&&(o={cmp:o});var l,s=typeof o.cycles=="boolean"&&o.cycles,i=o.cmp&&(l=o.cmp,function(u){return function(b,A){var _={key:b,value:u[b]},v={key:A,value:u[A]};return l(_,v)}}),c=[];return function u(b){if(b&&b.toJSON&&typeof b.toJSON=="function"&&(b=b.toJSON()),b!==void 0){if(typeof b=="number")return isFinite(b)?""+b:"null";if(typeof b!="object")return JSON.stringify(b);var A,_;if(Array.isArray(b)){for(_="[",A=0;A<b.length;A++)A&&(_+=","),_+=u(b[A])||"null";return _+"]"}if(b===null)return"null";if(c.indexOf(b)!==-1){if(s)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var v=c.push(b)-1,f=Object.keys(b).sort(i&&i(b));for(_="",A=0;A<f.length;A++){var S=f[A],w=u(b[S]);w&&(_&&(_+=","),_+=JSON.stringify(S)+":"+w)}return c.splice(v,1),"{"+_+"}"}}(n)}},function(e,t,r){r.d(t,"a",function(){return N});var n=r(11),o=r(0);function l(T,R,d=()=>!0){if(T instanceof R&&d(T))return T;throw T}var s=r(1),i=r(100),c=r.n(i),u=r(101),b=r.n(u);class A extends Error{constructor(R,d,I){super(`Connection failure: ${R.message}`),this.cause=R,this.url=d,this.retryable=I}}var _=r(29);class v extends Error{constructor(R,d,I,Q,Z={},h){super(`Unexpected response (${I}) for ${R} ${d}: ${JSON.stringify(h?Object(_.a)([...h.entries()].reduce((p,[j,m])=>(p[j]=m,p),{})):{})} -- ${JSON.stringify(Object(_.a)(Q))}`),this.method=R,this.url=d,this.statusCode=I,this.body=Q,this.validationErrors=Z,this.headers=h}}class f extends Error{constructor(R,d){super(`Invalid headers (${JSON.stringify(R)}) for response: ${d.message}`),this.validationErrors=R,this.responseError=d}}var S=function(T,R,d,I){return new(d||(d=Promise))(function(Q,Z){function h(m){try{j(I.next(m))}catch(x){Z(x)}}function p(m){try{j(I.throw(m))}catch(x){Z(x)}}function j(m){var x;m.done?Q(m.value):(x=m.value,x instanceof d?x:new d(function(F){F(x)})).then(h,p)}j((I=I.apply(T,R||[])).next())})},w=function(T,R){var d={};for(var I in T)Object.prototype.hasOwnProperty.call(T,I)&&R.indexOf(I)<0&&(d[I]=T[I]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function"){var Q=0;for(I=Object.getOwnPropertySymbols(T);Q<I.length;Q++)R.indexOf(I[Q])<0&&Object.prototype.propertyIsEnumerable.call(T,I[Q])&&(d[I[Q]]=T[I[Q]])}return d};const P=new Set(["GET","HEAD","PUT","QUERY","DELETE","OPTIONS","TRACE"]);class N{constructor(R,d={}){if(this.endpoint=R,this.validateHeaders=I=>d.validateHeaders?d.validateHeaders(I):{},this.verbose=d.verbose!==!1,this.headers=d.headers||{},d.retries!==void 0&&!(d.retries>=0))throw new Error("retries must be positive or zero");if(this.configuredRetries=d.retries,d.timeoutMs!==void 0&&!(d.timeoutMs>0))throw new Error("timeoutMs must be positive");if(this.timeoutMs=d.timeoutMs,d.maxBackoffDelayMs!==void 0&&!(d.maxBackoffDelayMs>0))throw new Error("maxBackoffDelayMs must be positive");this.maxBackoffDelayMs=d.maxBackoffDelayMs||30*s.a.second}getRetries(){return this.configuredRetries!==void 0?this.configuredRetries:this.constructor.retries}fetch(R,d={}){return S(this,void 0,void 0,function*(){return(yield this.fetchVerbose(R,d)).body})}fetchVerbose(R,d={}){return S(this,void 0,void 0,function*(){let I=100*s.a.millisecond,Q=0;const Z=this.timeoutMs!==void 0?new Date().getTime()+this.timeoutMs:void 0,h=Z?()=>Math.max(Z-new Date().getTime(),0):void 0;for(;;)try{return yield this.doFetch(R,d,h)}catch(p){const j=l(p,A);if((h==null?void 0:h())===0||Q===this.getRetries()||!j.retryable)throw j;Q++,I=Math.min(...h?[h()]:[],I*(2+.1*(Math.random()-.5)),this.maxBackoffDelayMs),yield Object(n.a)(I),this.verbose&&o.a.warn(`Connection failure, retrying. Error: ${p.cause.message}`,{url:p.url,error:p.cause,attempt:Q})}})}doFetch(R,d,I){return S(this,void 0,void 0,function*(){const{token:Q,json:Z,allowUnsafeRetries:h}=d,p=w(d,["token","json","allowUnsafeRetries"]),j=(p.method||"GET").toUpperCase(),m=this.endpoint!==void 0?`${this.endpoint}${R?`/${R}`:""}`:R,x=new c.a;let F;if(I){const D=I();D>0?F=setTimeout(()=>{x.abort()},D):x.abort()}try{let D;yield Promise.race([this.constructor.waitForConnectivity(),new Promise(B=>{D=setTimeout(B,I?Math.min(s.a.minute,I()):s.a.minute)})]),D&&clearTimeout(D);const O=yield b()(m,Object.assign(Object.assign({},p),{headers:Object.assign(Object.assign(Object.assign(Object.assign({},Z!==!1?{"Content-Type":"application/json"}:{}),this.headers),p.headers||{}),Q!==void 0?{Authorization:`Bearer ${Q}`}:{}),signal:x.signal})),L=O.headers.get("content-type")||"",k=L&&L.startsWith("application/json"),E=k?yield O.json():yield O.text(),g=()=>new v(j,m,O.status,E,E&&E.validationErrors||{},O.headers);if(!O.ok)throw this.verbose&&o.a[O.status>=500?"warn":"info"]("Response error",{method:j,url:m,statusCode:O.status}),g();const U=this.validateHeaders(O.headers);if(Object.keys(U).length!==0)throw new f(U,g());if(O.status===204)return{body:void 0,headers:O.headers};if(Z&&!k)throw new Error(`Response is not JSON: ${JSON.stringify(E)}`);return{body:E,headers:O.headers}}catch(D){const O=h||P.has(j);if(D.message==="Network request failed")throw new A(D,m,O);if(D.type==="system"&&["EAI_AGAIN","ECONNREFUSED","EHOSTUNREACH","ENOTFOUND"].find(g=>g===D.code))throw new A(D,m,!0);if(D.type==="system"&&["ETIMEDOUT","ECONNRESET","ESOCKETTIMEDOUT","EPIPE"].find(g=>g===D.code))throw new A(D,m,O);if(D.name==="AbortError")throw new A(D,m,O);const L=l(D,v),{statusCode:k}=L;if(k===408||k===429||k===502||k===503||k===504)throw this.verbose&&!O&&o.a.warn("Potentially unsafe retry"),new A(D,m,!0);const E=this.validateHeaders(L.headers);throw Object.keys(E).length!==0?new f(E,L):(yield this.constructor.onResponseError(L),D)}finally{F&&clearTimeout(F)}})}}N.retries=8,N.waitForConnectivity=()=>S(void 0,void 0,void 0,function*(){}),N.onResponseError=()=>S(void 0,void 0,void 0,function*(){})},function(e,t,r){function n(A,_){if(!(A instanceof _))throw new TypeError("Cannot call a class as a function")}function o(A,_){for(var v=0;v<_.length;v++){var f=_[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(A,f.key,f)}}var l=r(57),s=r(3),i=s.LEVEL,c=s.MESSAGE;l.enabled=!0;var u=/\s+/,b=function(){function A(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(this,A),S.colors&&this.addColors(S.colors),this.options=S}var _,v,f;return _=A,f=[{key:"addColors",value:function(S){var w=Object.keys(S).reduce(function(P,N){return P[N]=u.test(S[N])?S[N].split(u):S[N],P},{});return A.allColors=Object.assign({},A.allColors||{},w),A.allColors}}],(v=[{key:"addColors",value:function(S){return A.addColors(S)}},{key:"colorize",value:function(S,w,P){if(P===void 0&&(P=w),!Array.isArray(A.allColors[S]))return l[A.allColors[S]](P);for(var N=0,T=A.allColors[S].length;N<T;N++)P=l[A.allColors[S][N]](P);return P}},{key:"transform",value:function(S,w){return w.all&&typeof S[c]=="string"&&(S[c]=this.colorize(S[i],S.level,S[c])),(w.level||w.all||!w.message)&&(S.level=this.colorize(S[i],S.level)),(w.all||w.message)&&(S.message=this.colorize(S[i],S.level,S.message)),S}}])&&o(_.prototype,v),f&&o(_,f),A}();e.exports=function(A){return new b(A)},e.exports.Colorizer=e.exports.Format=b},function(e,t){var r={}.toString;e.exports=Array.isArray||function(n){return r.call(n)=="[object Array]"}},function(e,t,r){(function(n){function o(l){try{if(!n.localStorage)return!1}catch{return!1}var s=n.localStorage[l];return s!=null&&String(s).toLowerCase()==="true"}e.exports=function(l,s){if(o("noDeprecation"))return l;var i=!1;return function(){if(!i){if(o("throwDeprecation"))throw new Error(s);o("traceDeprecation")?console.trace(s):console.warn(s),i=!0}return l.apply(this,arguments)}}}).call(this,r(5))},function(e,t,r){var n=r(4),o=n.Buffer;function l(i,c){for(var u in i)c[u]=i[u]}function s(i,c,u){return o(i,c,u)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(l(n,t),t.Buffer=s),l(o,s),s.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,c,u)},s.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var b=o(i);return c!==void 0?typeof u=="string"?b.fill(c,u):b.fill(c):b.fill(0),b},s.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},s.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(i)}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return n&&typeof n.length=="number"&&n.length>=0&&n.length%1==0},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},function(e,t,r){var n=r(4),o=n.Buffer;function l(i,c){for(var u in i)c[u]=i[u]}function s(i,c,u){return o(i,c,u)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(l(n,t),t.Buffer=s),l(o,s),s.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,c,u)},s.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var b=o(i);return c!==void 0?typeof u=="string"?b.fill(c,u):b.fill(c):b.fill(0),b},s.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},s.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(i)}},function(e,t,r){(function(n,o,l){var s=r(13);function i(p){var j=this;this.next=null,this.entry=null,this.finish=function(){(function(m,x,F){var D=m.entry;for(m.entry=null;D;){var O=D.callback;x.pendingcb--,O(F),D=D.next}x.corkedRequestsFree?x.corkedRequestsFree.next=m:x.corkedRequestsFree=m})(j,p)}}e.exports=T;var c,u=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?o:s.nextTick;T.WritableState=N;var b=r(14);b.inherits=r(7);var A={deprecate:r(39)},_=r(68),v=r(43).Buffer,f=l.Uint8Array||function(){},S,w=r(69);function P(){}function N(p,j){c=c||r(20),p=p||{};var m=j instanceof c;this.objectMode=!!p.objectMode,m&&(this.objectMode=this.objectMode||!!p.writableObjectMode);var x=p.highWaterMark,F=p.writableHighWaterMark,D=this.objectMode?16:16384;this.highWaterMark=x||x===0?x:m&&(F||F===0)?F:D,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=p.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=p.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){(function(k,E){var g=k._writableState,U=g.sync,B=g.writecb;if(function(Y){Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0}(g),E)(function(Y,K,H,V,y){--K.pendingcb,H?(s.nextTick(y,V),s.nextTick(h,Y,K),Y._writableState.errorEmitted=!0,Y.emit("error",V)):(y(V),Y._writableState.errorEmitted=!0,Y.emit("error",V),h(Y,K))})(k,g,U,E,B);else{var G=Q(g);G||g.corked||g.bufferProcessing||!g.bufferedRequest||I(k,g),U?u(d,k,g,G,B):d(k,g,G,B)}})(j,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(p){if(c=c||r(20),!(S.call(T,this)||this instanceof c))return new T(p);this._writableState=new N(p,this),this.writable=!0,p&&(typeof p.write=="function"&&(this._write=p.write),typeof p.writev=="function"&&(this._writev=p.writev),typeof p.destroy=="function"&&(this._destroy=p.destroy),typeof p.final=="function"&&(this._final=p.final)),_.call(this)}function R(p,j,m,x,F,D,O){j.writelen=x,j.writecb=O,j.writing=!0,j.sync=!0,m?p._writev(F,j.onwrite):p._write(F,D,j.onwrite),j.sync=!1}function d(p,j,m,x){m||function(F,D){D.length===0&&D.needDrain&&(D.needDrain=!1,F.emit("drain"))}(p,j),j.pendingcb--,x(),h(p,j)}function I(p,j){j.bufferProcessing=!0;var m=j.bufferedRequest;if(p._writev&&m&&m.next){var x=j.bufferedRequestCount,F=new Array(x),D=j.corkedRequestsFree;D.entry=m;for(var O=0,L=!0;m;)F[O]=m,m.isBuf||(L=!1),m=m.next,O+=1;F.allBuffers=L,R(p,j,!0,j.length,F,"",D.finish),j.pendingcb++,j.lastBufferedRequest=null,D.next?(j.corkedRequestsFree=D.next,D.next=null):j.corkedRequestsFree=new i(j),j.bufferedRequestCount=0}else{for(;m;){var k=m.chunk,E=m.encoding,g=m.callback;if(R(p,j,!1,j.objectMode?1:k.length,k,E,g),m=m.next,j.bufferedRequestCount--,j.writing)break}m===null&&(j.lastBufferedRequest=null)}j.bufferedRequest=m,j.bufferProcessing=!1}function Q(p){return p.ending&&p.length===0&&p.bufferedRequest===null&&!p.finished&&!p.writing}function Z(p,j){p._final(function(m){j.pendingcb--,m&&p.emit("error",m),j.prefinished=!0,p.emit("prefinish"),h(p,j)})}function h(p,j){var m=Q(j);return m&&(function(x,F){F.prefinished||F.finalCalled||(typeof x._final=="function"?(F.pendingcb++,F.finalCalled=!0,s.nextTick(Z,x,F)):(F.prefinished=!0,x.emit("prefinish")))}(p,j),j.pendingcb===0&&(j.finished=!0,p.emit("finish"))),m}b.inherits(T,_),N.prototype.getBuffer=function(){for(var p=this.bufferedRequest,j=[];p;)j.push(p),p=p.next;return j},function(){try{Object.defineProperty(N.prototype,"buffer",{get:A.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(p){return!!S.call(this,p)||this===T&&p&&p._writableState instanceof N}})):S=function(p){return p instanceof this},T.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},T.prototype.write=function(p,j,m){var x,F=this._writableState,D=!1,O=!F.objectMode&&(x=p,v.isBuffer(x)||x instanceof f);return O&&!v.isBuffer(p)&&(p=function(L){return v.from(L)}(p)),typeof j=="function"&&(m=j,j=null),O?j="buffer":j||(j=F.defaultEncoding),typeof m!="function"&&(m=P),F.ended?function(L,k){var E=new Error("write after end");L.emit("error",E),s.nextTick(k,E)}(this,m):(O||function(L,k,E,g){var U=!0,B=!1;return E===null?B=new TypeError("May not write null values to stream"):typeof E=="string"||E===void 0||k.objectMode||(B=new TypeError("Invalid non-string/buffer chunk")),B&&(L.emit("error",B),s.nextTick(g,B),U=!1),U}(this,F,p,m))&&(F.pendingcb++,D=function(L,k,E,g,U,B){if(!E){var G=function(V,y,C){return V.objectMode||V.decodeStrings===!1||typeof y!="string"||(y=v.from(y,C)),y}(k,g,U);g!==G&&(E=!0,U="buffer",g=G)}var Y=k.objectMode?1:g.length;k.length+=Y;var K=k.length<k.highWaterMark;if(K||(k.needDrain=!0),k.writing||k.corked){var H=k.lastBufferedRequest;k.lastBufferedRequest={chunk:g,encoding:U,isBuf:E,callback:B,next:null},H?H.next=k.lastBufferedRequest:k.bufferedRequest=k.lastBufferedRequest,k.bufferedRequestCount+=1}else R(L,k,!1,Y,g,U,B);return K}(this,F,O,p,j,m)),D},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var p=this._writableState;p.corked&&(p.corked--,p.writing||p.corked||p.finished||p.bufferProcessing||!p.bufferedRequest||I(this,p))},T.prototype.setDefaultEncoding=function(p){if(typeof p=="string"&&(p=p.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((p+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+p);return this._writableState.defaultEncoding=p,this},Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(p,j,m){m(new Error("_write() is not implemented"))},T.prototype._writev=null,T.prototype.end=function(p,j,m){var x=this._writableState;typeof p=="function"?(m=p,p=null,j=null):typeof j=="function"&&(m=j,j=null),p!=null&&this.write(p,j),x.corked&&(x.corked=1,this.uncork()),x.ending||x.finished||function(F,D,O){D.ending=!0,h(F,D),O&&(D.finished?s.nextTick(O):F.once("finish",O)),D.ended=!0,F.writable=!1}(this,x,m)},Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(p){this._writableState&&(this._writableState.destroyed=p)}}),T.prototype.destroy=w.destroy,T.prototype._undestroy=w.undestroy,T.prototype._destroy=function(p,j){this.end(),j(p)}}).call(this,r(2),r(12).setImmediate,r(5))},function(e,t,r){var n=r(23).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function l(s,i,c){if(typeof i=="function")return l(s,null,i);i||(i={}),c=function(T){var R=!1;return function(){if(!R){R=!0;for(var d=arguments.length,I=new Array(d),Q=0;Q<d;Q++)I[Q]=arguments[Q];T.apply(this,I)}}}(c||o);var u=i.readable||i.readable!==!1&&s.readable,b=i.writable||i.writable!==!1&&s.writable,A=function(){s.writable||v()},_=s._writableState&&s._writableState.finished,v=function(){b=!1,_=!0,u||c.call(s)},f=s._readableState&&s._readableState.endEmitted,S=function(){u=!1,f=!0,b||c.call(s)},w=function(T){c.call(s,T)},P=function(){var T;return u&&!f?(s._readableState&&s._readableState.ended||(T=new n),c.call(s,T)):b&&!_?(s._writableState&&s._writableState.ended||(T=new n),c.call(s,T)):void 0},N=function(){s.req.on("finish",v)};return function(T){return T.setHeader&&typeof T.abort=="function"}(s)?(s.on("complete",v),s.on("abort",P),s.req?N():s.on("request",N)):b&&!s._writableState&&(s.on("end",A),s.on("close",A)),s.on("end",S),s.on("finish",v),i.error!==!1&&s.on("error",w),s.on("close",P),function(){s.removeListener("complete",v),s.removeListener("abort",P),s.removeListener("request",N),s.req&&s.req.removeListener("finish",v),s.removeListener("end",A),s.removeListener("close",A),s.removeListener("finish",v),s.removeListener("end",S),s.removeListener("error",w),s.removeListener("close",P)}}},function(e,t,r){var n=r(193),o=r(195);function l(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=T,t.resolve=function(R,d){return T(R,!1,!0).resolve(d)},t.resolveObject=function(R,d){return R?T(R,!1,!0).resolveObject(d):d},t.format=function(R){return o.isString(R)&&(R=T(R)),R instanceof l?R.format():l.prototype.format.call(R)},t.Url=l;var s=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
20
|
+
`," "]),b=["'"].concat(u),A=["%","/","?",";","#"].concat(b),_=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,S={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},P={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=r(196);function T(R,d,I){if(R&&o.isObject(R)&&R instanceof l)return R;var Q=new l;return Q.parse(R,d,I),Q}l.prototype.parse=function(R,d,I){if(!o.isString(R))throw new TypeError("Parameter 'url' must be a string, not "+typeof R);var Q=R.indexOf("?"),Z=Q!==-1&&Q<R.indexOf("#")?"?":"#",h=R.split(Z);h[0]=h[0].replace(/\\/g,"/");var p=R=h.join(Z);if(p=p.trim(),!I&&R.split("#").length===1){var j=c.exec(p);if(j)return this.path=p,this.href=p,this.pathname=j[1],j[2]?(this.search=j[2],this.query=d?N.parse(this.search.substr(1)):this.search.substr(1)):d&&(this.search="",this.query={}),this}var m=s.exec(p);if(m){var x=(m=m[0]).toLowerCase();this.protocol=x,p=p.substr(m.length)}if(I||m||p.match(/^\/\/[^@\/]+@[^@\/]+/)){var F=p.substr(0,2)==="//";!F||m&&w[m]||(p=p.substr(2),this.slashes=!0)}if(!w[m]&&(F||m&&!P[m])){for(var D,O,L=-1,k=0;k<_.length;k++)(E=p.indexOf(_[k]))!==-1&&(L===-1||E<L)&&(L=E);for((O=L===-1?p.lastIndexOf("@"):p.lastIndexOf("@",L))!==-1&&(D=p.slice(0,O),p=p.slice(O+1),this.auth=decodeURIComponent(D)),L=-1,k=0;k<A.length;k++){var E;(E=p.indexOf(A[k]))!==-1&&(L===-1||E<L)&&(L=E)}L===-1&&(L=p.length),this.host=p.slice(0,L),p=p.slice(L),this.parseHost(),this.hostname=this.hostname||"";var g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g)for(var U=this.hostname.split(/\./),B=(k=0,U.length);k<B;k++){var G=U[k];if(G&&!G.match(v)){for(var Y="",K=0,H=G.length;K<H;K++)G.charCodeAt(K)>127?Y+="x":Y+=G[K];if(!Y.match(v)){var V=U.slice(0,k),y=U.slice(k+1),C=G.match(f);C&&(V.push(C[1]),y.unshift(C[2])),y.length&&(p="/"+y.join(".")+p),this.hostname=V.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=n.toASCII(this.hostname));var W=this.port?":"+this.port:"",ee=this.hostname||"";this.host=ee+W,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),p[0]!=="/"&&(p="/"+p))}if(!S[x])for(k=0,B=b.length;k<B;k++){var X=b[k];if(p.indexOf(X)!==-1){var ne=encodeURIComponent(X);ne===X&&(ne=escape(X)),p=p.split(X).join(ne)}}var ie=p.indexOf("#");ie!==-1&&(this.hash=p.substr(ie),p=p.slice(0,ie));var he=p.indexOf("?");if(he!==-1?(this.search=p.substr(he),this.query=p.substr(he+1),d&&(this.query=N.parse(this.query)),p=p.slice(0,he)):d&&(this.search="",this.query={}),p&&(this.pathname=p),P[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){W=this.pathname||"";var Se=this.search||"";this.path=W+Se}return this.href=this.format(),this},l.prototype.format=function(){var R=this.auth||"";R&&(R=(R=encodeURIComponent(R)).replace(/%3A/i,":"),R+="@");var d=this.protocol||"",I=this.pathname||"",Q=this.hash||"",Z=!1,h="";this.host?Z=R+this.host:this.hostname&&(Z=R+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(Z+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(h=N.stringify(this.query));var p=this.search||h&&"?"+h||"";return d&&d.substr(-1)!==":"&&(d+=":"),this.slashes||(!d||P[d])&&Z!==!1?(Z="//"+(Z||""),I&&I.charAt(0)!=="/"&&(I="/"+I)):Z||(Z=""),Q&&Q.charAt(0)!=="#"&&(Q="#"+Q),p&&p.charAt(0)!=="?"&&(p="?"+p),d+Z+(I=I.replace(/[?#]/g,function(j){return encodeURIComponent(j)}))+(p=p.replace("#","%23"))+Q},l.prototype.resolve=function(R){return this.resolveObject(T(R,!1,!0)).format()},l.prototype.resolveObject=function(R){if(o.isString(R)){var d=new l;d.parse(R,!1,!0),R=d}for(var I=new l,Q=Object.keys(this),Z=0;Z<Q.length;Z++){var h=Q[Z];I[h]=this[h]}if(I.hash=R.hash,R.href==="")return I.href=I.format(),I;if(R.slashes&&!R.protocol){for(var p=Object.keys(R),j=0;j<p.length;j++){var m=p[j];m!=="protocol"&&(I[m]=R[m])}return P[I.protocol]&&I.hostname&&!I.pathname&&(I.path=I.pathname="/"),I.href=I.format(),I}if(R.protocol&&R.protocol!==I.protocol){if(!P[R.protocol]){for(var x=Object.keys(R),F=0;F<x.length;F++){var D=x[F];I[D]=R[D]}return I.href=I.format(),I}if(I.protocol=R.protocol,R.host||w[R.protocol])I.pathname=R.pathname;else{for(var O=(R.pathname||"").split("/");O.length&&!(R.host=O.shift()););R.host||(R.host=""),R.hostname||(R.hostname=""),O[0]!==""&&O.unshift(""),O.length<2&&O.unshift(""),I.pathname=O.join("/")}if(I.search=R.search,I.query=R.query,I.host=R.host||"",I.auth=R.auth,I.hostname=R.hostname||R.host,I.port=R.port,I.pathname||I.search){var L=I.pathname||"",k=I.search||"";I.path=L+k}return I.slashes=I.slashes||R.slashes,I.href=I.format(),I}var E=I.pathname&&I.pathname.charAt(0)==="/",g=R.host||R.pathname&&R.pathname.charAt(0)==="/",U=g||E||I.host&&R.pathname,B=U,G=I.pathname&&I.pathname.split("/")||[],Y=(O=R.pathname&&R.pathname.split("/")||[],I.protocol&&!P[I.protocol]);if(Y&&(I.hostname="",I.port=null,I.host&&(G[0]===""?G[0]=I.host:G.unshift(I.host)),I.host="",R.protocol&&(R.hostname=null,R.port=null,R.host&&(O[0]===""?O[0]=R.host:O.unshift(R.host)),R.host=null),U=U&&(O[0]===""||G[0]==="")),g)I.host=R.host||R.host===""?R.host:I.host,I.hostname=R.hostname||R.hostname===""?R.hostname:I.hostname,I.search=R.search,I.query=R.query,G=O;else if(O.length)G||(G=[]),G.pop(),G=G.concat(O),I.search=R.search,I.query=R.query;else if(!o.isNullOrUndefined(R.search))return Y&&(I.hostname=I.host=G.shift(),(C=!!(I.host&&I.host.indexOf("@")>0)&&I.host.split("@"))&&(I.auth=C.shift(),I.host=I.hostname=C.shift())),I.search=R.search,I.query=R.query,o.isNull(I.pathname)&&o.isNull(I.search)||(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.href=I.format(),I;if(!G.length)return I.pathname=null,I.search?I.path="/"+I.search:I.path=null,I.href=I.format(),I;for(var K=G.slice(-1)[0],H=(I.host||R.host||G.length>1)&&(K==="."||K==="..")||K==="",V=0,y=G.length;y>=0;y--)(K=G[y])==="."?G.splice(y,1):K===".."?(G.splice(y,1),V++):V&&(G.splice(y,1),V--);if(!U&&!B)for(;V--;V)G.unshift("..");!U||G[0]===""||G[0]&&G[0].charAt(0)==="/"||G.unshift(""),H&&G.join("/").substr(-1)!=="/"&&G.push("");var C,W=G[0]===""||G[0]&&G[0].charAt(0)==="/";return Y&&(I.hostname=I.host=W?"":G.length?G.shift():"",(C=!!(I.host&&I.host.indexOf("@")>0)&&I.host.split("@"))&&(I.auth=C.shift(),I.host=I.hostname=C.shift())),(U=U||I.host&&G.length)&&!W&&G.unshift(""),G.length?I.pathname=G.join("/"):(I.pathname=null,I.path=null),o.isNull(I.pathname)&&o.isNull(I.search)||(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.auth=R.auth||I.auth,I.slashes=I.slashes||R.slashes,I.href=I.format(),I},l.prototype.parseHost=function(){var R=this.host,d=i.exec(R);d&&((d=d[0])!==":"&&(this.port=d.substr(1)),R=R.substr(0,R.length-d.length)),R&&(this.hostname=R)}},function(e,t,r){var n=r(56),o=r(3).configs;t.cli=n.levels(o.cli),t.npm=n.levels(o.npm),t.syslog=n.levels(o.syslog),t.addColors=n.levels},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(202)),o=i(r(203)),l=i(r(22)),s=i(r(26));function i(c){return c&&c.__esModule?c:{default:c}}t.default=(0,s.default)(function(c,u,b){return(0,n.default)(c,(0,o.default)((0,l.default)(u)),b)},3),e.exports=t.default},function(e,t,r){function n(o){Error.captureStackTrace(this,this.constructor),this.name="EnvVarError",this.message=`env-var: ${o}`}(0,r(10).inherits)(n,Error),e.exports=n},function(e,t,r){e.exports=function(n){const o=parseInt(n,10);if(isNaN(o)||n.toString().indexOf(".")!==-1)throw new Error("should be a valid integer");return o}},function(e,t,r){e.exports=function(n){const o=parseFloat(n);if(isNaN(o))throw new Error("should be a valid float");return o}},function(e,t,r){e.exports=function(n){try{return JSON.parse(n)}catch{throw new Error("should be valid (parseable) JSON")}}},function(e,t,r){(function(n){function o(i,c){for(var u=0,b=i.length-1;b>=0;b--){var A=i[b];A==="."?i.splice(b,1):A===".."?(i.splice(b,1),u++):u&&(i.splice(b,1),u--)}if(c)for(;u--;u)i.unshift("..");return i}function l(i,c){if(i.filter)return i.filter(c);for(var u=[],b=0;b<i.length;b++)c(i[b],b,i)&&u.push(i[b]);return u}t.resolve=function(){for(var i="",c=!1,u=arguments.length-1;u>=-1&&!c;u--){var b=u>=0?arguments[u]:n.cwd();if(typeof b!="string")throw new TypeError("Arguments to path.resolve must be strings");b&&(i=b+"/"+i,c=b.charAt(0)==="/")}return(c?"/":"")+(i=o(l(i.split("/"),function(A){return!!A}),!c).join("/"))||"."},t.normalize=function(i){var c=t.isAbsolute(i),u=s(i,-1)==="/";return(i=o(l(i.split("/"),function(b){return!!b}),!c).join("/"))||c||(i="."),i&&u&&(i+="/"),(c?"/":"")+i},t.isAbsolute=function(i){return i.charAt(0)==="/"},t.join=function(){var i=Array.prototype.slice.call(arguments,0);return t.normalize(l(i,function(c,u){if(typeof c!="string")throw new TypeError("Arguments to path.join must be strings");return c}).join("/"))},t.relative=function(i,c){function u(w){for(var P=0;P<w.length&&w[P]==="";P++);for(var N=w.length-1;N>=0&&w[N]==="";N--);return P>N?[]:w.slice(P,N-P+1)}i=t.resolve(i).substr(1),c=t.resolve(c).substr(1);for(var b=u(i.split("/")),A=u(c.split("/")),_=Math.min(b.length,A.length),v=_,f=0;f<_;f++)if(b[f]!==A[f]){v=f;break}var S=[];for(f=v;f<b.length;f++)S.push("..");return(S=S.concat(A.slice(v))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(i){if(typeof i!="string"&&(i+=""),i.length===0)return".";for(var c=i.charCodeAt(0),u=c===47,b=-1,A=!0,_=i.length-1;_>=1;--_)if((c=i.charCodeAt(_))===47){if(!A){b=_;break}}else A=!1;return b===-1?u?"/":".":u&&b===1?"/":i.slice(0,b)},t.basename=function(i,c){var u=function(b){typeof b!="string"&&(b+="");var A,_=0,v=-1,f=!0;for(A=b.length-1;A>=0;--A)if(b.charCodeAt(A)===47){if(!f){_=A+1;break}}else v===-1&&(f=!1,v=A+1);return v===-1?"":b.slice(_,v)}(i);return c&&u.substr(-1*c.length)===c&&(u=u.substr(0,u.length-c.length)),u},t.extname=function(i){typeof i!="string"&&(i+="");for(var c=-1,u=0,b=-1,A=!0,_=0,v=i.length-1;v>=0;--v){var f=i.charCodeAt(v);if(f!==47)b===-1&&(A=!1,b=v+1),f===46?c===-1?c=v:_!==1&&(_=1):c!==-1&&(_=-1);else if(!A){u=v+1;break}}return c===-1||b===-1||_===0||_===1&&c===b-1&&c===u+1?"":i.slice(c,b)};var s="ab".substr(-1)==="b"?function(i,c,u){return i.substr(c,u)}:function(i,c,u){return c<0&&(c=i.length+c),i.substr(c,u)}}).call(this,r(2))},function(e,t){function r(n,o){var l=[],s=[];return o==null&&(o=function(i,c){return l[0]===c?"[Circular ~]":"[Circular ~."+s.slice(0,l.indexOf(c)).join(".")+"]"}),function(i,c){if(l.length>0){var u=l.indexOf(this);~u?l.splice(u+1):l.push(this),~u?s.splice(u,1/0,i):s.push(i),~l.indexOf(c)&&(c=o.call(this,i,c))}else l.push(c);return n==null?c:n.call(this,i,c)}}(e.exports=function(n,o,l,s){return JSON.stringify(n,r(o,s),l)}).getSerialize=r},function(e,t,r){r(225),e.exports={encode:n=>new TextEncoder().encode(n),decode:n=>new TextDecoder().decode(n)}},function(e,t,r){var n=t.format=r(9);t.levels=r(104),Object.defineProperty(n,"align",{value:r(121)}),Object.defineProperty(n,"cli",{value:r(122)}),Object.defineProperty(n,"combine",{value:r(123)}),Object.defineProperty(n,"colorize",{value:r(37)}),Object.defineProperty(n,"json",{value:r(124)}),Object.defineProperty(n,"label",{value:r(127)}),Object.defineProperty(n,"logstash",{value:r(128)}),Object.defineProperty(n,"metadata",{value:r(129)}),Object.defineProperty(n,"padLevels",{value:r(58)}),Object.defineProperty(n,"prettyPrint",{value:r(130)}),Object.defineProperty(n,"printf",{value:r(131)}),Object.defineProperty(n,"simple",{value:r(132)}),Object.defineProperty(n,"splat",{value:r(133)}),Object.defineProperty(n,"timestamp",{value:r(134)}),Object.defineProperty(n,"uncolorize",{value:r(136)})},function(e,t,r){var n=r(105);e.exports=n},function(e,t,r){function n(_){return function(v){if(Array.isArray(v))return o(v)}(_)||function(v){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(v))return Array.from(v)}(_)||function(v,f){if(!!v){if(typeof v=="string")return o(v,f);var S=Object.prototype.toString.call(v).slice(8,-1);if(S==="Object"&&v.constructor&&(S=v.constructor.name),S==="Map"||S==="Set")return Array.from(v);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return o(v,f)}}(_)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
21
21
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function o(_,v){(v==null||v>_.length)&&(v=_.length);for(var f=0,S=new Array(v);f<v;f++)S[f]=_[f];return S}function l(_,v){if(!(_ instanceof v))throw new TypeError("Cannot call a class as a function")}function s(_,v){for(var f=0;f<v.length;f++){var S=v[f];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(_,S.key,S)}}var i=r(3),c=i.configs,u=i.LEVEL,b=i.MESSAGE,A=function(){function _(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{levels:c.npm.levels};l(this,_),this.paddings=_.paddingForLevels(w.levels,w.filler),this.options=w}var v,f,S;return v=_,S=[{key:"getLongestLevel",value:function(w){var P=Object.keys(w).map(function(N){return N.length});return Math.max.apply(Math,n(P))}},{key:"paddingForLevel",value:function(w,P,N){var T=N+1-w.length,R=Math.floor(T/P.length);return"".concat(P).concat(P.repeat(R)).slice(0,T)}},{key:"paddingForLevels",value:function(w){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:" ",N=_.getLongestLevel(w);return Object.keys(w).reduce(function(T,R){return T[R]=_.paddingForLevel(R,P,N),T},{})}}],(f=[{key:"transform",value:function(w,P){return w.message="".concat(this.paddings[w[u]]).concat(w.message),w[b]&&(w[b]="".concat(this.paddings[w[u]]).concat(w[b])),w}}])&&s(v.prototype,f),S&&s(v,S),_}();e.exports=function(_){return new A(_)},e.exports.Padder=e.exports.Format=A},function(e,t,r){var n=r(10).format;t.warn={deprecated:function(o){return function(){throw new Error(n("{ %s } was removed in winston@3.0.0.",o))}},useFormat:function(o){return function(){throw new Error([n("{ %s } was removed in winston@3.0.0.",o),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
22
22
|
`))}},forFunctions:function(o,l,s){s.forEach(function(i){o[i]=t.warn[l](i)})},moved:function(o,l,s){function i(){return function(){throw new Error([n("winston.%s was moved in winston@3.0.0.",s),n("Use a winston.%s instead.",l)].join(`
|
|
23
|
-
`))}}Object.defineProperty(o,s,{get:i,set:i})},forProperties:function(o,l,s){s.forEach(function(i){var c=t.warn[l](i);Object.defineProperty(o,i,{get:c,set:c})})}}},function(e,t,r){(function(n,o,l){var s=r(13);function i(p){var C=this;this.next=null,this.entry=null,this.finish=function(){(function(m,x,F){var D=m.entry;for(m.entry=null;D;){var O=D.callback;x.pendingcb--,O(F),D=D.next}x.corkedRequestsFree?x.corkedRequestsFree.next=m:x.corkedRequestsFree=m})(C,p)}}e.exports=T;var c,u=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?o:s.nextTick;T.WritableState=N;var b=Object.create(r(14));b.inherits=r(7);var A={deprecate:r(39)},_=r(61),v=r(40).Buffer,f=l.Uint8Array||function(){},S,w=r(62);function P(){}function N(p,C){c=c||r(31),p=p||{};var m=C instanceof c;this.objectMode=!!p.objectMode,m&&(this.objectMode=this.objectMode||!!p.writableObjectMode);var x=p.highWaterMark,F=p.writableHighWaterMark,D=this.objectMode?16:16384;this.highWaterMark=x||x===0?x:m&&(F||F===0)?F:D,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=p.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=p.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){(function(k,E){var g=k._writableState,U=g.sync,B=g.writecb;if(function(Y){Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0}(g),E)(function(Y,K,H,V,y){--K.pendingcb,H?(s.nextTick(y,V),s.nextTick(h,Y,K),Y._writableState.errorEmitted=!0,Y.emit("error",V)):(y(V),Y._writableState.errorEmitted=!0,Y.emit("error",V),h(Y,K))})(k,g,U,E,B);else{var G=Q(g);G||g.corked||g.bufferProcessing||!g.bufferedRequest||I(k,g),U?u(d,k,g,G,B):d(k,g,G,B)}})(C,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(p){if(c=c||r(31),!(S.call(T,this)||this instanceof c))return new T(p);this._writableState=new N(p,this),this.writable=!0,p&&(typeof p.write=="function"&&(this._write=p.write),typeof p.writev=="function"&&(this._writev=p.writev),typeof p.destroy=="function"&&(this._destroy=p.destroy),typeof p.final=="function"&&(this._final=p.final)),_.call(this)}function R(p,C,m,x,F,D,O){C.writelen=x,C.writecb=O,C.writing=!0,C.sync=!0,m?p._writev(F,C.onwrite):p._write(F,D,C.onwrite),C.sync=!1}function d(p,C,m,x){m||function(F,D){D.length===0&&D.needDrain&&(D.needDrain=!1,F.emit("drain"))}(p,C),C.pendingcb--,x(),h(p,C)}function I(p,C){C.bufferProcessing=!0;var m=C.bufferedRequest;if(p._writev&&m&&m.next){var x=C.bufferedRequestCount,F=new Array(x),D=C.corkedRequestsFree;D.entry=m;for(var O=0,L=!0;m;)F[O]=m,m.isBuf||(L=!1),m=m.next,O+=1;F.allBuffers=L,R(p,C,!0,C.length,F,"",D.finish),C.pendingcb++,C.lastBufferedRequest=null,D.next?(C.corkedRequestsFree=D.next,D.next=null):C.corkedRequestsFree=new i(C),C.bufferedRequestCount=0}else{for(;m;){var k=m.chunk,E=m.encoding,g=m.callback;if(R(p,C,!1,C.objectMode?1:k.length,k,E,g),m=m.next,C.bufferedRequestCount--,C.writing)break}m===null&&(C.lastBufferedRequest=null)}C.bufferedRequest=m,C.bufferProcessing=!1}function Q(p){return p.ending&&p.length===0&&p.bufferedRequest===null&&!p.finished&&!p.writing}function Z(p,C){p._final(function(m){C.pendingcb--,m&&p.emit("error",m),C.prefinished=!0,p.emit("prefinish"),h(p,C)})}function h(p,C){var m=Q(C);return m&&(function(x,F){F.prefinished||F.finalCalled||(typeof x._final=="function"?(F.pendingcb++,F.finalCalled=!0,s.nextTick(Z,x,F)):(F.prefinished=!0,x.emit("prefinish")))}(p,C),C.pendingcb===0&&(C.finished=!0,p.emit("finish"))),m}b.inherits(T,_),N.prototype.getBuffer=function(){for(var p=this.bufferedRequest,C=[];p;)C.push(p),p=p.next;return C},function(){try{Object.defineProperty(N.prototype,"buffer",{get:A.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(p){return!!S.call(this,p)||this===T&&p&&p._writableState instanceof N}})):S=function(p){return p instanceof this},T.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},T.prototype.write=function(p,C,m){var x,F=this._writableState,D=!1,O=!F.objectMode&&(x=p,v.isBuffer(x)||x instanceof f);return O&&!v.isBuffer(p)&&(p=function(L){return v.from(L)}(p)),typeof C=="function"&&(m=C,C=null),O?C="buffer":C||(C=F.defaultEncoding),typeof m!="function"&&(m=P),F.ended?function(L,k){var E=new Error("write after end");L.emit("error",E),s.nextTick(k,E)}(this,m):(O||function(L,k,E,g){var U=!0,B=!1;return E===null?B=new TypeError("May not write null values to stream"):typeof E=="string"||E===void 0||k.objectMode||(B=new TypeError("Invalid non-string/buffer chunk")),B&&(L.emit("error",B),s.nextTick(g,B),U=!1),U}(this,F,p,m))&&(F.pendingcb++,D=function(L,k,E,g,U,B){if(!E){var G=function(V,y,j){return V.objectMode||V.decodeStrings===!1||typeof y!="string"||(y=v.from(y,j)),y}(k,g,U);g!==G&&(E=!0,U="buffer",g=G)}var Y=k.objectMode?1:g.length;k.length+=Y;var K=k.length<k.highWaterMark;if(K||(k.needDrain=!0),k.writing||k.corked){var H=k.lastBufferedRequest;k.lastBufferedRequest={chunk:g,encoding:U,isBuf:E,callback:B,next:null},H?H.next=k.lastBufferedRequest:k.bufferedRequest=k.lastBufferedRequest,k.bufferedRequestCount+=1}else R(L,k,!1,Y,g,U,B);return K}(this,F,O,p,C,m)),D},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var p=this._writableState;p.corked&&(p.corked--,p.writing||p.corked||p.finished||p.bufferProcessing||!p.bufferedRequest||I(this,p))},T.prototype.setDefaultEncoding=function(p){if(typeof p=="string"&&(p=p.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((p+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+p);return this._writableState.defaultEncoding=p,this},Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(p,C,m){m(new Error("_write() is not implemented"))},T.prototype._writev=null,T.prototype.end=function(p,C,m){var x=this._writableState;typeof p=="function"?(m=p,p=null,C=null):typeof C=="function"&&(m=C,C=null),p!=null&&this.write(p,C),x.corked&&(x.corked=1,this.uncork()),x.ending||x.finished||function(F,D,O){D.ending=!0,h(F,D),O&&(D.finished?s.nextTick(O):F.once("finish",O)),D.ended=!0,F.writable=!1}(this,x,m)},Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(p){this._writableState&&(this._writableState.destroyed=p)}}),T.prototype.destroy=w.destroy,T.prototype._undestroy=w.undestroy,T.prototype._destroy=function(p,C){this.end(),C(p)}}).call(this,r(2),r(12).setImmediate,r(5))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){var n=r(13);function o(l,s){l.emit("error",s)}e.exports={destroy:function(l,s){var i=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(l):!l||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,l),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(b){!s&&b?(n.nextTick(o,i,b),i._writableState&&(i._writableState.errorEmitted=!0)):s&&s(b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t){},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(155)),o=s(r(22)),l=s(r(26));function s(i){return i&&i.__esModule?i:{default:i}}t.default=(0,l.default)(function(i,c,u,b){return(0,n.default)(c)(i,(0,o.default)(u),b)},4),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){function o(...l){if(n!==null){var s=n;n=null,s.apply(this,l)}}return Object.assign(o,n),o},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return function(...o){if(n===null)throw new Error("Callback was already called.");var l=n;n=null,l.apply(this,o)}},e.exports=t.default},function(e,t,r){(function(n,o){var l=r(13);e.exports=R;var s,i=r(38);R.ReadableState=T,r(18).EventEmitter;var c=function(E,g){return E.listeners(g).length},u=r(68),b=r(43).Buffer,A=n.Uint8Array||function(){},_=r(14);_.inherits=r(7);var v=r(161),f=void 0;f=v&&v.debuglog?v.debuglog("stream"):function(){};var S,w=r(162),P=r(69);_.inherits(R,u);var N=["error","close","destroy","pause","resume"];function T(E,g){E=E||{};var U=g instanceof(s=s||r(20));this.objectMode=!!E.objectMode,U&&(this.objectMode=this.objectMode||!!E.readableObjectMode);var B=E.highWaterMark,G=E.readableHighWaterMark,Y=this.objectMode?16:16384;this.highWaterMark=B||B===0?B:U&&(G||G===0)?G:Y,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,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.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=E.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,E.encoding&&(S||(S=r(19).StringDecoder),this.decoder=new S(E.encoding),this.encoding=E.encoding)}function R(E){if(s=s||r(20),!(this instanceof R))return new R(E);this._readableState=new T(E,this),this.readable=!0,E&&(typeof E.read=="function"&&(this._read=E.read),typeof E.destroy=="function"&&(this._destroy=E.destroy)),u.call(this)}function d(E,g,U,B,G){var Y,K=E._readableState;return g===null?(K.reading=!1,function(H,V){if(!V.ended){if(V.decoder){var y=V.decoder.end();y&&y.length&&(V.buffer.push(y),V.length+=V.objectMode?1:y.length)}V.ended=!0,Z(H)}}(E,K)):(G||(Y=function(H,V){var y;j=V,b.isBuffer(j)||j instanceof A||typeof V=="string"||V===void 0||H.objectMode||(y=new TypeError("Invalid non-string/buffer chunk"));var j;return y}(K,g)),Y?E.emit("error",Y):K.objectMode||g&&g.length>0?(typeof g=="string"||K.objectMode||Object.getPrototypeOf(g)===b.prototype||(g=function(H){return b.from(H)}(g)),B?K.endEmitted?E.emit("error",new Error("stream.unshift() after end event")):I(E,K,g,!0):K.ended?E.emit("error",new Error("stream.push() after EOF")):(K.reading=!1,K.decoder&&!U?(g=K.decoder.write(g),K.objectMode||g.length!==0?I(E,K,g,!1):p(E,K)):I(E,K,g,!1))):B||(K.reading=!1)),function(H){return!H.ended&&(H.needReadable||H.length<H.highWaterMark||H.length===0)}(K)}function I(E,g,U,B){g.flowing&&g.length===0&&!g.sync?(E.emit("data",U),E.read(0)):(g.length+=g.objectMode?1:U.length,B?g.buffer.unshift(U):g.buffer.push(U),g.needReadable&&Z(E)),p(E,g)}Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(E){this._readableState&&(this._readableState.destroyed=E)}}),R.prototype.destroy=P.destroy,R.prototype._undestroy=P.undestroy,R.prototype._destroy=function(E,g){this.push(null),g(E)},R.prototype.push=function(E,g){var U,B=this._readableState;return B.objectMode?U=!0:typeof E=="string"&&((g=g||B.defaultEncoding)!==B.encoding&&(E=b.from(E,g),g=""),U=!0),d(this,E,g,!1,U)},R.prototype.unshift=function(E){return d(this,E,null,!0,!1)},R.prototype.isPaused=function(){return this._readableState.flowing===!1},R.prototype.setEncoding=function(E){return S||(S=r(19).StringDecoder),this._readableState.decoder=new S(E),this._readableState.encoding=E,this};function Q(E,g){return E<=0||g.length===0&&g.ended?0:g.objectMode?1:E!=E?g.flowing&&g.length?g.buffer.head.data.length:g.length:(E>g.highWaterMark&&(g.highWaterMark=function(U){return U>=8388608?U=8388608:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}(E)),E<=g.length?E:g.ended?g.length:(g.needReadable=!0,0))}function Z(E){var g=E._readableState;g.needReadable=!1,g.emittedReadable||(f("emitReadable",g.flowing),g.emittedReadable=!0,g.sync?l.nextTick(h,E):h(E))}function h(E){f("emit readable"),E.emit("readable"),F(E)}function p(E,g){g.readingMore||(g.readingMore=!0,l.nextTick(C,E,g))}function C(E,g){for(var U=g.length;!g.reading&&!g.flowing&&!g.ended&&g.length<g.highWaterMark&&(f("maybeReadMore read 0"),E.read(0),U!==g.length);)U=g.length;g.readingMore=!1}function m(E){f("readable nexttick read 0"),E.read(0)}function x(E,g){g.reading||(f("resume read 0"),E.read(0)),g.resumeScheduled=!1,g.awaitDrain=0,E.emit("resume"),F(E),g.flowing&&!g.reading&&E.read(0)}function F(E){var g=E._readableState;for(f("flow",g.flowing);g.flowing&&E.read()!==null;);}function D(E,g){return g.length===0?null:(g.objectMode?U=g.buffer.shift():!E||E>=g.length?(U=g.decoder?g.buffer.join(""):g.buffer.length===1?g.buffer.head.data:g.buffer.concat(g.length),g.buffer.clear()):U=function(B,G,Y){var K;return B<G.head.data.length?(K=G.head.data.slice(0,B),G.head.data=G.head.data.slice(B)):K=B===G.head.data.length?G.shift():Y?function(H,V){var y=V.head,j=1,W=y.data;for(H-=W.length;y=y.next;){var ee=y.data,X=H>ee.length?ee.length:H;if(X===ee.length?W+=ee:W+=ee.slice(0,H),(H-=X)===0){X===ee.length?(++j,y.next?V.head=y.next:V.head=V.tail=null):(V.head=y,y.data=ee.slice(X));break}++j}return V.length-=j,W}(B,G):function(H,V){var y=b.allocUnsafe(H),j=V.head,W=1;for(j.data.copy(y),H-=j.data.length;j=j.next;){var ee=j.data,X=H>ee.length?ee.length:H;if(ee.copy(y,y.length-H,0,X),(H-=X)===0){X===ee.length?(++W,j.next?V.head=j.next:V.head=V.tail=null):(V.head=j,j.data=ee.slice(X));break}++W}return V.length-=W,y}(B,G),K}(E,g.buffer,g.decoder),U);var U}function O(E){var g=E._readableState;if(g.length>0)throw new Error('"endReadable()" called on non-empty stream');g.endEmitted||(g.ended=!0,l.nextTick(L,g,E))}function L(E,g){E.endEmitted||E.length!==0||(E.endEmitted=!0,g.readable=!1,g.emit("end"))}function k(E,g){for(var U=0,B=E.length;U<B;U++)if(E[U]===g)return U;return-1}R.prototype.read=function(E){f("read",E),E=parseInt(E,10);var g=this._readableState,U=E;if(E!==0&&(g.emittedReadable=!1),E===0&&g.needReadable&&(g.length>=g.highWaterMark||g.ended))return f("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?O(this):Z(this),null;if((E=Q(E,g))===0&&g.ended)return g.length===0&&O(this),null;var B,G=g.needReadable;return f("need readable",G),(g.length===0||g.length-E<g.highWaterMark)&&f("length less than watermark",G=!0),g.ended||g.reading?f("reading or ended",G=!1):G&&(f("do read"),g.reading=!0,g.sync=!0,g.length===0&&(g.needReadable=!0),this._read(g.highWaterMark),g.sync=!1,g.reading||(E=Q(U,g))),(B=E>0?D(E,g):null)===null?(g.needReadable=!0,E=0):g.length-=E,g.length===0&&(g.ended||(g.needReadable=!0),U!==E&&g.ended&&O(this)),B!==null&&this.emit("data",B),B},R.prototype._read=function(E){this.emit("error",new Error("_read() is not implemented"))},R.prototype.pipe=function(E,g){var U=this,B=this._readableState;switch(B.pipesCount){case 0:B.pipes=E;break;case 1:B.pipes=[B.pipes,E];break;default:B.pipes.push(E)}B.pipesCount+=1,f("pipe count=%d opts=%j",B.pipesCount,g);var G=(!g||g.end!==!1)&&E!==o.stdout&&E!==o.stderr?K:ne;function Y(ie,he){f("onunpipe"),ie===U&&he&&he.hasUnpiped===!1&&(he.hasUnpiped=!0,f("cleanup"),E.removeListener("close",ee),E.removeListener("finish",X),E.removeListener("drain",H),E.removeListener("error",W),E.removeListener("unpipe",Y),U.removeListener("end",K),U.removeListener("end",ne),U.removeListener("data",j),V=!0,!B.awaitDrain||E._writableState&&!E._writableState.needDrain||H())}function K(){f("onend"),E.end()}B.endEmitted?l.nextTick(G):U.once("end",G),E.on("unpipe",Y);var H=function(ie){return function(){var he=ie._readableState;f("pipeOnDrain",he.awaitDrain),he.awaitDrain&&he.awaitDrain--,he.awaitDrain===0&&c(ie,"data")&&(he.flowing=!0,F(ie))}}(U);E.on("drain",H);var V=!1,y=!1;function j(ie){f("ondata"),y=!1,E.write(ie)!==!1||y||((B.pipesCount===1&&B.pipes===E||B.pipesCount>1&&k(B.pipes,E)!==-1)&&!V&&(f("false write response, pause",U._readableState.awaitDrain),U._readableState.awaitDrain++,y=!0),U.pause())}function W(ie){f("onerror",ie),ne(),E.removeListener("error",W),c(E,"error")===0&&E.emit("error",ie)}function ee(){E.removeListener("finish",X),ne()}function X(){f("onfinish"),E.removeListener("close",ee),ne()}function ne(){f("unpipe"),U.unpipe(E)}return U.on("data",j),function(ie,he,Se){if(typeof ie.prependListener=="function")return ie.prependListener(he,Se);ie._events&&ie._events[he]?i(ie._events[he])?ie._events[he].unshift(Se):ie._events[he]=[Se,ie._events[he]]:ie.on(he,Se)}(E,"error",W),E.once("close",ee),E.once("finish",X),E.emit("pipe",U),B.flowing||(f("pipe resume"),U.resume()),E},R.prototype.unpipe=function(E){var g=this._readableState,U={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return E&&E!==g.pipes||(E||(E=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,E&&E.emit("unpipe",this,U)),this;if(!E){var B=g.pipes,G=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var Y=0;Y<G;Y++)B[Y].emit("unpipe",this,U);return this}var K=k(g.pipes,E);return K===-1||(g.pipes.splice(K,1),g.pipesCount-=1,g.pipesCount===1&&(g.pipes=g.pipes[0]),E.emit("unpipe",this,U)),this},R.prototype.on=function(E,g){var U=u.prototype.on.call(this,E,g);if(E==="data")this._readableState.flowing!==!1&&this.resume();else if(E==="readable"){var B=this._readableState;B.endEmitted||B.readableListening||(B.readableListening=B.needReadable=!0,B.emittedReadable=!1,B.reading?B.length&&Z(this):l.nextTick(m,this))}return U},R.prototype.addListener=R.prototype.on,R.prototype.resume=function(){var E=this._readableState;return E.flowing||(f("resume"),E.flowing=!0,function(g,U){U.resumeScheduled||(U.resumeScheduled=!0,l.nextTick(x,g,U))}(this,E)),this},R.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},R.prototype.wrap=function(E){var g=this,U=this._readableState,B=!1;for(var G in E.on("end",function(){if(f("wrapped end"),U.decoder&&!U.ended){var K=U.decoder.end();K&&K.length&&g.push(K)}g.push(null)}),E.on("data",function(K){f("wrapped data"),U.decoder&&(K=U.decoder.write(K)),U.objectMode&&K==null||(U.objectMode||K&&K.length)&&(g.push(K)||(B=!0,E.pause()))}),E)this[G]===void 0&&typeof E[G]=="function"&&(this[G]=function(K){return function(){return E[K].apply(E,arguments)}}(G));for(var Y=0;Y<N.length;Y++)E.on(N[Y],this.emit.bind(this,N[Y]));return this._read=function(K){f("wrapped _read",K),B&&(B=!1,E.resume())},this},Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),R._fromList=D}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){var n=r(13);function o(l,s){l.emit("error",s)}e.exports={destroy:function(l,s){var i=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(l):!l||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,l),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(b){!s&&b?(n.nextTick(o,i,b),i._writableState&&(i._writableState.errorEmitted=!0)):s&&s(b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){e.exports=s;var n=r(20),o=r(14);function l(u,b){var A=this._transformState;A.transforming=!1;var _=A.writecb;if(!_)return this.emit("error",new Error("write callback called multiple times"));A.writechunk=null,A.writecb=null,b!=null&&this.push(b),_(u);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);n.call(this,u),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",i)}function i(){var u=this;typeof this._flush=="function"?this._flush(function(b,A){c(u,b,A)}):c(this,null,null)}function c(u,b,A){if(b)return u.emit("error",b);if(A!=null&&u.push(A),u._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(u._transformState.transforming)throw new Error("Calling transform done when still transforming");return u.push(null)}o.inherits=r(7),o.inherits(s,n),s.prototype.push=function(u,b){return this._transformState.needTransform=!1,n.prototype.push.call(this,u,b)},s.prototype._transform=function(u,b,A){throw new Error("_transform() is not implemented")},s.prototype._write=function(u,b,A){var _=this._transformState;if(_.writecb=A,_.writechunk=u,_.writeencoding=b,!_.transforming){var v=this._readableState;(_.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},s.prototype._read=function(u){var b=this._transformState;b.writechunk!==null&&b.writecb&&!b.transforming?(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform)):b.needTransform=!0},s.prototype._destroy=function(u,b){var A=this;n.prototype._destroy.call(this,u,function(_){b(_),A.emit("close")})}},function(e,t,r){e.exports=r(44)},function(e,t,r){(function(n){var o=r(169);function l(h,p){if(h===p)return 0;for(var C=h.length,m=p.length,x=0,F=Math.min(C,m);x<F;++x)if(h[x]!==p[x]){C=h[x],m=p[x];break}return C<m?-1:m<C?1:0}function s(h){return n.Buffer&&typeof n.Buffer.isBuffer=="function"?n.Buffer.isBuffer(h):!(h==null||!h._isBuffer)}var i=r(10),c=Object.prototype.hasOwnProperty,u=Array.prototype.slice,b=function(){}.name==="foo";function A(h){return Object.prototype.toString.call(h)}function _(h){return!s(h)&&typeof n.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(h):!!h&&(h instanceof DataView||!!(h.buffer&&h.buffer instanceof ArrayBuffer)))}var v=e.exports=T,f=/\s*function\s+([^\(\s]*)\s*/;function S(h){if(i.isFunction(h)){if(b)return h.name;var p=h.toString().match(f);return p&&p[1]}}function w(h,p){return typeof h=="string"?h.length<p?h:h.slice(0,p):h}function P(h){if(b||!i.isFunction(h))return i.inspect(h);var p=S(h);return"[Function"+(p?": "+p:"")+"]"}function N(h,p,C,m,x){throw new v.AssertionError({message:C,actual:h,expected:p,operator:m,stackStartFunction:x})}function T(h,p){h||N(h,!0,p,"==",v.ok)}function R(h,p,C,m){if(h===p)return!0;if(s(h)&&s(p))return l(h,p)===0;if(i.isDate(h)&&i.isDate(p))return h.getTime()===p.getTime();if(i.isRegExp(h)&&i.isRegExp(p))return h.source===p.source&&h.global===p.global&&h.multiline===p.multiline&&h.lastIndex===p.lastIndex&&h.ignoreCase===p.ignoreCase;if(h!==null&&typeof h=="object"||p!==null&&typeof p=="object"){if(_(h)&&_(p)&&A(h)===A(p)&&!(h instanceof Float32Array||h instanceof Float64Array))return l(new Uint8Array(h.buffer),new Uint8Array(p.buffer))===0;if(s(h)!==s(p))return!1;var x=(m=m||{actual:[],expected:[]}).actual.indexOf(h);return x!==-1&&x===m.expected.indexOf(p)||(m.actual.push(h),m.expected.push(p),function(F,D,O,L){if(F==null||D==null)return!1;if(i.isPrimitive(F)||i.isPrimitive(D))return F===D;if(O&&Object.getPrototypeOf(F)!==Object.getPrototypeOf(D))return!1;var k=d(F),E=d(D);if(k&&!E||!k&&E)return!1;if(k)return F=u.call(F),D=u.call(D),R(F,D,O);var g,U,B=Z(F),G=Z(D);if(B.length!==G.length)return!1;for(B.sort(),G.sort(),U=B.length-1;U>=0;U--)if(B[U]!==G[U])return!1;for(U=B.length-1;U>=0;U--)if(g=B[U],!R(F[g],D[g],O,L))return!1;return!0}(h,p,C,m))}return C?h===p:h==p}function d(h){return Object.prototype.toString.call(h)=="[object Arguments]"}function I(h,p){if(!h||!p)return!1;if(Object.prototype.toString.call(p)=="[object RegExp]")return p.test(h);try{if(h instanceof p)return!0}catch{}return!Error.isPrototypeOf(p)&&p.call({},h)===!0}function Q(h,p,C,m){var x;if(typeof p!="function")throw new TypeError('"block" argument must be a function');typeof C=="string"&&(m=C,C=null),x=function(O){var L;try{O()}catch(k){L=k}return L}(p),m=(C&&C.name?" ("+C.name+").":".")+(m?" "+m:"."),h&&!x&&N(x,C,"Missing expected exception"+m);var F=typeof m=="string",D=!h&&x&&!C;if((!h&&i.isError(x)&&F&&I(x,C)||D)&&N(x,C,"Got unwanted exception"+m),h&&x&&C&&!I(x,C)||!h&&x)throw x}v.AssertionError=function(h){this.name="AssertionError",this.actual=h.actual,this.expected=h.expected,this.operator=h.operator,h.message?(this.message=h.message,this.generatedMessage=!1):(this.message=function(O){return w(P(O.actual),128)+" "+O.operator+" "+w(P(O.expected),128)}(this),this.generatedMessage=!0);var p=h.stackStartFunction||N;if(Error.captureStackTrace)Error.captureStackTrace(this,p);else{var C=new Error;if(C.stack){var m=C.stack,x=S(p),F=m.indexOf(`
|
|
23
|
+
`))}}Object.defineProperty(o,s,{get:i,set:i})},forProperties:function(o,l,s){s.forEach(function(i){var c=t.warn[l](i);Object.defineProperty(o,i,{get:c,set:c})})}}},function(e,t,r){(function(n,o,l){var s=r(13);function i(p){var j=this;this.next=null,this.entry=null,this.finish=function(){(function(m,x,F){var D=m.entry;for(m.entry=null;D;){var O=D.callback;x.pendingcb--,O(F),D=D.next}x.corkedRequestsFree?x.corkedRequestsFree.next=m:x.corkedRequestsFree=m})(j,p)}}e.exports=T;var c,u=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?o:s.nextTick;T.WritableState=N;var b=Object.create(r(14));b.inherits=r(7);var A={deprecate:r(39)},_=r(61),v=r(40).Buffer,f=l.Uint8Array||function(){},S,w=r(62);function P(){}function N(p,j){c=c||r(31),p=p||{};var m=j instanceof c;this.objectMode=!!p.objectMode,m&&(this.objectMode=this.objectMode||!!p.writableObjectMode);var x=p.highWaterMark,F=p.writableHighWaterMark,D=this.objectMode?16:16384;this.highWaterMark=x||x===0?x:m&&(F||F===0)?F:D,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=p.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=p.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){(function(k,E){var g=k._writableState,U=g.sync,B=g.writecb;if(function(Y){Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0}(g),E)(function(Y,K,H,V,y){--K.pendingcb,H?(s.nextTick(y,V),s.nextTick(h,Y,K),Y._writableState.errorEmitted=!0,Y.emit("error",V)):(y(V),Y._writableState.errorEmitted=!0,Y.emit("error",V),h(Y,K))})(k,g,U,E,B);else{var G=Q(g);G||g.corked||g.bufferProcessing||!g.bufferedRequest||I(k,g),U?u(d,k,g,G,B):d(k,g,G,B)}})(j,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(p){if(c=c||r(31),!(S.call(T,this)||this instanceof c))return new T(p);this._writableState=new N(p,this),this.writable=!0,p&&(typeof p.write=="function"&&(this._write=p.write),typeof p.writev=="function"&&(this._writev=p.writev),typeof p.destroy=="function"&&(this._destroy=p.destroy),typeof p.final=="function"&&(this._final=p.final)),_.call(this)}function R(p,j,m,x,F,D,O){j.writelen=x,j.writecb=O,j.writing=!0,j.sync=!0,m?p._writev(F,j.onwrite):p._write(F,D,j.onwrite),j.sync=!1}function d(p,j,m,x){m||function(F,D){D.length===0&&D.needDrain&&(D.needDrain=!1,F.emit("drain"))}(p,j),j.pendingcb--,x(),h(p,j)}function I(p,j){j.bufferProcessing=!0;var m=j.bufferedRequest;if(p._writev&&m&&m.next){var x=j.bufferedRequestCount,F=new Array(x),D=j.corkedRequestsFree;D.entry=m;for(var O=0,L=!0;m;)F[O]=m,m.isBuf||(L=!1),m=m.next,O+=1;F.allBuffers=L,R(p,j,!0,j.length,F,"",D.finish),j.pendingcb++,j.lastBufferedRequest=null,D.next?(j.corkedRequestsFree=D.next,D.next=null):j.corkedRequestsFree=new i(j),j.bufferedRequestCount=0}else{for(;m;){var k=m.chunk,E=m.encoding,g=m.callback;if(R(p,j,!1,j.objectMode?1:k.length,k,E,g),m=m.next,j.bufferedRequestCount--,j.writing)break}m===null&&(j.lastBufferedRequest=null)}j.bufferedRequest=m,j.bufferProcessing=!1}function Q(p){return p.ending&&p.length===0&&p.bufferedRequest===null&&!p.finished&&!p.writing}function Z(p,j){p._final(function(m){j.pendingcb--,m&&p.emit("error",m),j.prefinished=!0,p.emit("prefinish"),h(p,j)})}function h(p,j){var m=Q(j);return m&&(function(x,F){F.prefinished||F.finalCalled||(typeof x._final=="function"?(F.pendingcb++,F.finalCalled=!0,s.nextTick(Z,x,F)):(F.prefinished=!0,x.emit("prefinish")))}(p,j),j.pendingcb===0&&(j.finished=!0,p.emit("finish"))),m}b.inherits(T,_),N.prototype.getBuffer=function(){for(var p=this.bufferedRequest,j=[];p;)j.push(p),p=p.next;return j},function(){try{Object.defineProperty(N.prototype,"buffer",{get:A.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(p){return!!S.call(this,p)||this===T&&p&&p._writableState instanceof N}})):S=function(p){return p instanceof this},T.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},T.prototype.write=function(p,j,m){var x,F=this._writableState,D=!1,O=!F.objectMode&&(x=p,v.isBuffer(x)||x instanceof f);return O&&!v.isBuffer(p)&&(p=function(L){return v.from(L)}(p)),typeof j=="function"&&(m=j,j=null),O?j="buffer":j||(j=F.defaultEncoding),typeof m!="function"&&(m=P),F.ended?function(L,k){var E=new Error("write after end");L.emit("error",E),s.nextTick(k,E)}(this,m):(O||function(L,k,E,g){var U=!0,B=!1;return E===null?B=new TypeError("May not write null values to stream"):typeof E=="string"||E===void 0||k.objectMode||(B=new TypeError("Invalid non-string/buffer chunk")),B&&(L.emit("error",B),s.nextTick(g,B),U=!1),U}(this,F,p,m))&&(F.pendingcb++,D=function(L,k,E,g,U,B){if(!E){var G=function(V,y,C){return V.objectMode||V.decodeStrings===!1||typeof y!="string"||(y=v.from(y,C)),y}(k,g,U);g!==G&&(E=!0,U="buffer",g=G)}var Y=k.objectMode?1:g.length;k.length+=Y;var K=k.length<k.highWaterMark;if(K||(k.needDrain=!0),k.writing||k.corked){var H=k.lastBufferedRequest;k.lastBufferedRequest={chunk:g,encoding:U,isBuf:E,callback:B,next:null},H?H.next=k.lastBufferedRequest:k.bufferedRequest=k.lastBufferedRequest,k.bufferedRequestCount+=1}else R(L,k,!1,Y,g,U,B);return K}(this,F,O,p,j,m)),D},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var p=this._writableState;p.corked&&(p.corked--,p.writing||p.corked||p.finished||p.bufferProcessing||!p.bufferedRequest||I(this,p))},T.prototype.setDefaultEncoding=function(p){if(typeof p=="string"&&(p=p.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((p+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+p);return this._writableState.defaultEncoding=p,this},Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(p,j,m){m(new Error("_write() is not implemented"))},T.prototype._writev=null,T.prototype.end=function(p,j,m){var x=this._writableState;typeof p=="function"?(m=p,p=null,j=null):typeof j=="function"&&(m=j,j=null),p!=null&&this.write(p,j),x.corked&&(x.corked=1,this.uncork()),x.ending||x.finished||function(F,D,O){D.ending=!0,h(F,D),O&&(D.finished?s.nextTick(O):F.once("finish",O)),D.ended=!0,F.writable=!1}(this,x,m)},Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(p){this._writableState&&(this._writableState.destroyed=p)}}),T.prototype.destroy=w.destroy,T.prototype._undestroy=w.undestroy,T.prototype._destroy=function(p,j){this.end(),j(p)}}).call(this,r(2),r(12).setImmediate,r(5))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){var n=r(13);function o(l,s){l.emit("error",s)}e.exports={destroy:function(l,s){var i=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(l):!l||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,l),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(b){!s&&b?(n.nextTick(o,i,b),i._writableState&&(i._writableState.errorEmitted=!0)):s&&s(b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t){},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(155)),o=s(r(22)),l=s(r(26));function s(i){return i&&i.__esModule?i:{default:i}}t.default=(0,l.default)(function(i,c,u,b){return(0,n.default)(c)(i,(0,o.default)(u),b)},4),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){function o(...l){if(n!==null){var s=n;n=null,s.apply(this,l)}}return Object.assign(o,n),o},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return function(...o){if(n===null)throw new Error("Callback was already called.");var l=n;n=null,l.apply(this,o)}},e.exports=t.default},function(e,t,r){(function(n,o){var l=r(13);e.exports=R;var s,i=r(38);R.ReadableState=T,r(18).EventEmitter;var c=function(E,g){return E.listeners(g).length},u=r(68),b=r(43).Buffer,A=n.Uint8Array||function(){},_=r(14);_.inherits=r(7);var v=r(161),f=void 0;f=v&&v.debuglog?v.debuglog("stream"):function(){};var S,w=r(162),P=r(69);_.inherits(R,u);var N=["error","close","destroy","pause","resume"];function T(E,g){E=E||{};var U=g instanceof(s=s||r(20));this.objectMode=!!E.objectMode,U&&(this.objectMode=this.objectMode||!!E.readableObjectMode);var B=E.highWaterMark,G=E.readableHighWaterMark,Y=this.objectMode?16:16384;this.highWaterMark=B||B===0?B:U&&(G||G===0)?G:Y,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,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.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=E.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,E.encoding&&(S||(S=r(19).StringDecoder),this.decoder=new S(E.encoding),this.encoding=E.encoding)}function R(E){if(s=s||r(20),!(this instanceof R))return new R(E);this._readableState=new T(E,this),this.readable=!0,E&&(typeof E.read=="function"&&(this._read=E.read),typeof E.destroy=="function"&&(this._destroy=E.destroy)),u.call(this)}function d(E,g,U,B,G){var Y,K=E._readableState;return g===null?(K.reading=!1,function(H,V){if(!V.ended){if(V.decoder){var y=V.decoder.end();y&&y.length&&(V.buffer.push(y),V.length+=V.objectMode?1:y.length)}V.ended=!0,Z(H)}}(E,K)):(G||(Y=function(H,V){var y;C=V,b.isBuffer(C)||C instanceof A||typeof V=="string"||V===void 0||H.objectMode||(y=new TypeError("Invalid non-string/buffer chunk"));var C;return y}(K,g)),Y?E.emit("error",Y):K.objectMode||g&&g.length>0?(typeof g=="string"||K.objectMode||Object.getPrototypeOf(g)===b.prototype||(g=function(H){return b.from(H)}(g)),B?K.endEmitted?E.emit("error",new Error("stream.unshift() after end event")):I(E,K,g,!0):K.ended?E.emit("error",new Error("stream.push() after EOF")):(K.reading=!1,K.decoder&&!U?(g=K.decoder.write(g),K.objectMode||g.length!==0?I(E,K,g,!1):p(E,K)):I(E,K,g,!1))):B||(K.reading=!1)),function(H){return!H.ended&&(H.needReadable||H.length<H.highWaterMark||H.length===0)}(K)}function I(E,g,U,B){g.flowing&&g.length===0&&!g.sync?(E.emit("data",U),E.read(0)):(g.length+=g.objectMode?1:U.length,B?g.buffer.unshift(U):g.buffer.push(U),g.needReadable&&Z(E)),p(E,g)}Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(E){this._readableState&&(this._readableState.destroyed=E)}}),R.prototype.destroy=P.destroy,R.prototype._undestroy=P.undestroy,R.prototype._destroy=function(E,g){this.push(null),g(E)},R.prototype.push=function(E,g){var U,B=this._readableState;return B.objectMode?U=!0:typeof E=="string"&&((g=g||B.defaultEncoding)!==B.encoding&&(E=b.from(E,g),g=""),U=!0),d(this,E,g,!1,U)},R.prototype.unshift=function(E){return d(this,E,null,!0,!1)},R.prototype.isPaused=function(){return this._readableState.flowing===!1},R.prototype.setEncoding=function(E){return S||(S=r(19).StringDecoder),this._readableState.decoder=new S(E),this._readableState.encoding=E,this};function Q(E,g){return E<=0||g.length===0&&g.ended?0:g.objectMode?1:E!=E?g.flowing&&g.length?g.buffer.head.data.length:g.length:(E>g.highWaterMark&&(g.highWaterMark=function(U){return U>=8388608?U=8388608:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}(E)),E<=g.length?E:g.ended?g.length:(g.needReadable=!0,0))}function Z(E){var g=E._readableState;g.needReadable=!1,g.emittedReadable||(f("emitReadable",g.flowing),g.emittedReadable=!0,g.sync?l.nextTick(h,E):h(E))}function h(E){f("emit readable"),E.emit("readable"),F(E)}function p(E,g){g.readingMore||(g.readingMore=!0,l.nextTick(j,E,g))}function j(E,g){for(var U=g.length;!g.reading&&!g.flowing&&!g.ended&&g.length<g.highWaterMark&&(f("maybeReadMore read 0"),E.read(0),U!==g.length);)U=g.length;g.readingMore=!1}function m(E){f("readable nexttick read 0"),E.read(0)}function x(E,g){g.reading||(f("resume read 0"),E.read(0)),g.resumeScheduled=!1,g.awaitDrain=0,E.emit("resume"),F(E),g.flowing&&!g.reading&&E.read(0)}function F(E){var g=E._readableState;for(f("flow",g.flowing);g.flowing&&E.read()!==null;);}function D(E,g){return g.length===0?null:(g.objectMode?U=g.buffer.shift():!E||E>=g.length?(U=g.decoder?g.buffer.join(""):g.buffer.length===1?g.buffer.head.data:g.buffer.concat(g.length),g.buffer.clear()):U=function(B,G,Y){var K;return B<G.head.data.length?(K=G.head.data.slice(0,B),G.head.data=G.head.data.slice(B)):K=B===G.head.data.length?G.shift():Y?function(H,V){var y=V.head,C=1,W=y.data;for(H-=W.length;y=y.next;){var ee=y.data,X=H>ee.length?ee.length:H;if(X===ee.length?W+=ee:W+=ee.slice(0,H),(H-=X)===0){X===ee.length?(++C,y.next?V.head=y.next:V.head=V.tail=null):(V.head=y,y.data=ee.slice(X));break}++C}return V.length-=C,W}(B,G):function(H,V){var y=b.allocUnsafe(H),C=V.head,W=1;for(C.data.copy(y),H-=C.data.length;C=C.next;){var ee=C.data,X=H>ee.length?ee.length:H;if(ee.copy(y,y.length-H,0,X),(H-=X)===0){X===ee.length?(++W,C.next?V.head=C.next:V.head=V.tail=null):(V.head=C,C.data=ee.slice(X));break}++W}return V.length-=W,y}(B,G),K}(E,g.buffer,g.decoder),U);var U}function O(E){var g=E._readableState;if(g.length>0)throw new Error('"endReadable()" called on non-empty stream');g.endEmitted||(g.ended=!0,l.nextTick(L,g,E))}function L(E,g){E.endEmitted||E.length!==0||(E.endEmitted=!0,g.readable=!1,g.emit("end"))}function k(E,g){for(var U=0,B=E.length;U<B;U++)if(E[U]===g)return U;return-1}R.prototype.read=function(E){f("read",E),E=parseInt(E,10);var g=this._readableState,U=E;if(E!==0&&(g.emittedReadable=!1),E===0&&g.needReadable&&(g.length>=g.highWaterMark||g.ended))return f("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?O(this):Z(this),null;if((E=Q(E,g))===0&&g.ended)return g.length===0&&O(this),null;var B,G=g.needReadable;return f("need readable",G),(g.length===0||g.length-E<g.highWaterMark)&&f("length less than watermark",G=!0),g.ended||g.reading?f("reading or ended",G=!1):G&&(f("do read"),g.reading=!0,g.sync=!0,g.length===0&&(g.needReadable=!0),this._read(g.highWaterMark),g.sync=!1,g.reading||(E=Q(U,g))),(B=E>0?D(E,g):null)===null?(g.needReadable=!0,E=0):g.length-=E,g.length===0&&(g.ended||(g.needReadable=!0),U!==E&&g.ended&&O(this)),B!==null&&this.emit("data",B),B},R.prototype._read=function(E){this.emit("error",new Error("_read() is not implemented"))},R.prototype.pipe=function(E,g){var U=this,B=this._readableState;switch(B.pipesCount){case 0:B.pipes=E;break;case 1:B.pipes=[B.pipes,E];break;default:B.pipes.push(E)}B.pipesCount+=1,f("pipe count=%d opts=%j",B.pipesCount,g);var G=(!g||g.end!==!1)&&E!==o.stdout&&E!==o.stderr?K:ne;function Y(ie,he){f("onunpipe"),ie===U&&he&&he.hasUnpiped===!1&&(he.hasUnpiped=!0,f("cleanup"),E.removeListener("close",ee),E.removeListener("finish",X),E.removeListener("drain",H),E.removeListener("error",W),E.removeListener("unpipe",Y),U.removeListener("end",K),U.removeListener("end",ne),U.removeListener("data",C),V=!0,!B.awaitDrain||E._writableState&&!E._writableState.needDrain||H())}function K(){f("onend"),E.end()}B.endEmitted?l.nextTick(G):U.once("end",G),E.on("unpipe",Y);var H=function(ie){return function(){var he=ie._readableState;f("pipeOnDrain",he.awaitDrain),he.awaitDrain&&he.awaitDrain--,he.awaitDrain===0&&c(ie,"data")&&(he.flowing=!0,F(ie))}}(U);E.on("drain",H);var V=!1,y=!1;function C(ie){f("ondata"),y=!1,E.write(ie)!==!1||y||((B.pipesCount===1&&B.pipes===E||B.pipesCount>1&&k(B.pipes,E)!==-1)&&!V&&(f("false write response, pause",U._readableState.awaitDrain),U._readableState.awaitDrain++,y=!0),U.pause())}function W(ie){f("onerror",ie),ne(),E.removeListener("error",W),c(E,"error")===0&&E.emit("error",ie)}function ee(){E.removeListener("finish",X),ne()}function X(){f("onfinish"),E.removeListener("close",ee),ne()}function ne(){f("unpipe"),U.unpipe(E)}return U.on("data",C),function(ie,he,Se){if(typeof ie.prependListener=="function")return ie.prependListener(he,Se);ie._events&&ie._events[he]?i(ie._events[he])?ie._events[he].unshift(Se):ie._events[he]=[Se,ie._events[he]]:ie.on(he,Se)}(E,"error",W),E.once("close",ee),E.once("finish",X),E.emit("pipe",U),B.flowing||(f("pipe resume"),U.resume()),E},R.prototype.unpipe=function(E){var g=this._readableState,U={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return E&&E!==g.pipes||(E||(E=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,E&&E.emit("unpipe",this,U)),this;if(!E){var B=g.pipes,G=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var Y=0;Y<G;Y++)B[Y].emit("unpipe",this,U);return this}var K=k(g.pipes,E);return K===-1||(g.pipes.splice(K,1),g.pipesCount-=1,g.pipesCount===1&&(g.pipes=g.pipes[0]),E.emit("unpipe",this,U)),this},R.prototype.on=function(E,g){var U=u.prototype.on.call(this,E,g);if(E==="data")this._readableState.flowing!==!1&&this.resume();else if(E==="readable"){var B=this._readableState;B.endEmitted||B.readableListening||(B.readableListening=B.needReadable=!0,B.emittedReadable=!1,B.reading?B.length&&Z(this):l.nextTick(m,this))}return U},R.prototype.addListener=R.prototype.on,R.prototype.resume=function(){var E=this._readableState;return E.flowing||(f("resume"),E.flowing=!0,function(g,U){U.resumeScheduled||(U.resumeScheduled=!0,l.nextTick(x,g,U))}(this,E)),this},R.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},R.prototype.wrap=function(E){var g=this,U=this._readableState,B=!1;for(var G in E.on("end",function(){if(f("wrapped end"),U.decoder&&!U.ended){var K=U.decoder.end();K&&K.length&&g.push(K)}g.push(null)}),E.on("data",function(K){f("wrapped data"),U.decoder&&(K=U.decoder.write(K)),U.objectMode&&K==null||(U.objectMode||K&&K.length)&&(g.push(K)||(B=!0,E.pause()))}),E)this[G]===void 0&&typeof E[G]=="function"&&(this[G]=function(K){return function(){return E[K].apply(E,arguments)}}(G));for(var Y=0;Y<N.length;Y++)E.on(N[Y],this.emit.bind(this,N[Y]));return this._read=function(K){f("wrapped _read",K),B&&(B=!1,E.resume())},this},Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),R._fromList=D}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){var n=r(13);function o(l,s){l.emit("error",s)}e.exports={destroy:function(l,s){var i=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(l):!l||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,l),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(b){!s&&b?(n.nextTick(o,i,b),i._writableState&&(i._writableState.errorEmitted=!0)):s&&s(b)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){e.exports=s;var n=r(20),o=r(14);function l(u,b){var A=this._transformState;A.transforming=!1;var _=A.writecb;if(!_)return this.emit("error",new Error("write callback called multiple times"));A.writechunk=null,A.writecb=null,b!=null&&this.push(b),_(u);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);n.call(this,u),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",i)}function i(){var u=this;typeof this._flush=="function"?this._flush(function(b,A){c(u,b,A)}):c(this,null,null)}function c(u,b,A){if(b)return u.emit("error",b);if(A!=null&&u.push(A),u._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(u._transformState.transforming)throw new Error("Calling transform done when still transforming");return u.push(null)}o.inherits=r(7),o.inherits(s,n),s.prototype.push=function(u,b){return this._transformState.needTransform=!1,n.prototype.push.call(this,u,b)},s.prototype._transform=function(u,b,A){throw new Error("_transform() is not implemented")},s.prototype._write=function(u,b,A){var _=this._transformState;if(_.writecb=A,_.writechunk=u,_.writeencoding=b,!_.transforming){var v=this._readableState;(_.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},s.prototype._read=function(u){var b=this._transformState;b.writechunk!==null&&b.writecb&&!b.transforming?(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform)):b.needTransform=!0},s.prototype._destroy=function(u,b){var A=this;n.prototype._destroy.call(this,u,function(_){b(_),A.emit("close")})}},function(e,t,r){e.exports=r(44)},function(e,t,r){(function(n){var o=r(169);function l(h,p){if(h===p)return 0;for(var j=h.length,m=p.length,x=0,F=Math.min(j,m);x<F;++x)if(h[x]!==p[x]){j=h[x],m=p[x];break}return j<m?-1:m<j?1:0}function s(h){return n.Buffer&&typeof n.Buffer.isBuffer=="function"?n.Buffer.isBuffer(h):!(h==null||!h._isBuffer)}var i=r(10),c=Object.prototype.hasOwnProperty,u=Array.prototype.slice,b=function(){}.name==="foo";function A(h){return Object.prototype.toString.call(h)}function _(h){return!s(h)&&typeof n.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(h):!!h&&(h instanceof DataView||!!(h.buffer&&h.buffer instanceof ArrayBuffer)))}var v=e.exports=T,f=/\s*function\s+([^\(\s]*)\s*/;function S(h){if(i.isFunction(h)){if(b)return h.name;var p=h.toString().match(f);return p&&p[1]}}function w(h,p){return typeof h=="string"?h.length<p?h:h.slice(0,p):h}function P(h){if(b||!i.isFunction(h))return i.inspect(h);var p=S(h);return"[Function"+(p?": "+p:"")+"]"}function N(h,p,j,m,x){throw new v.AssertionError({message:j,actual:h,expected:p,operator:m,stackStartFunction:x})}function T(h,p){h||N(h,!0,p,"==",v.ok)}function R(h,p,j,m){if(h===p)return!0;if(s(h)&&s(p))return l(h,p)===0;if(i.isDate(h)&&i.isDate(p))return h.getTime()===p.getTime();if(i.isRegExp(h)&&i.isRegExp(p))return h.source===p.source&&h.global===p.global&&h.multiline===p.multiline&&h.lastIndex===p.lastIndex&&h.ignoreCase===p.ignoreCase;if(h!==null&&typeof h=="object"||p!==null&&typeof p=="object"){if(_(h)&&_(p)&&A(h)===A(p)&&!(h instanceof Float32Array||h instanceof Float64Array))return l(new Uint8Array(h.buffer),new Uint8Array(p.buffer))===0;if(s(h)!==s(p))return!1;var x=(m=m||{actual:[],expected:[]}).actual.indexOf(h);return x!==-1&&x===m.expected.indexOf(p)||(m.actual.push(h),m.expected.push(p),function(F,D,O,L){if(F==null||D==null)return!1;if(i.isPrimitive(F)||i.isPrimitive(D))return F===D;if(O&&Object.getPrototypeOf(F)!==Object.getPrototypeOf(D))return!1;var k=d(F),E=d(D);if(k&&!E||!k&&E)return!1;if(k)return F=u.call(F),D=u.call(D),R(F,D,O);var g,U,B=Z(F),G=Z(D);if(B.length!==G.length)return!1;for(B.sort(),G.sort(),U=B.length-1;U>=0;U--)if(B[U]!==G[U])return!1;for(U=B.length-1;U>=0;U--)if(g=B[U],!R(F[g],D[g],O,L))return!1;return!0}(h,p,j,m))}return j?h===p:h==p}function d(h){return Object.prototype.toString.call(h)=="[object Arguments]"}function I(h,p){if(!h||!p)return!1;if(Object.prototype.toString.call(p)=="[object RegExp]")return p.test(h);try{if(h instanceof p)return!0}catch{}return!Error.isPrototypeOf(p)&&p.call({},h)===!0}function Q(h,p,j,m){var x;if(typeof p!="function")throw new TypeError('"block" argument must be a function');typeof j=="string"&&(m=j,j=null),x=function(O){var L;try{O()}catch(k){L=k}return L}(p),m=(j&&j.name?" ("+j.name+").":".")+(m?" "+m:"."),h&&!x&&N(x,j,"Missing expected exception"+m);var F=typeof m=="string",D=!h&&x&&!j;if((!h&&i.isError(x)&&F&&I(x,j)||D)&&N(x,j,"Got unwanted exception"+m),h&&x&&j&&!I(x,j)||!h&&x)throw x}v.AssertionError=function(h){this.name="AssertionError",this.actual=h.actual,this.expected=h.expected,this.operator=h.operator,h.message?(this.message=h.message,this.generatedMessage=!1):(this.message=function(O){return w(P(O.actual),128)+" "+O.operator+" "+w(P(O.expected),128)}(this),this.generatedMessage=!0);var p=h.stackStartFunction||N;if(Error.captureStackTrace)Error.captureStackTrace(this,p);else{var j=new Error;if(j.stack){var m=j.stack,x=S(p),F=m.indexOf(`
|
|
24
24
|
`+x);if(F>=0){var D=m.indexOf(`
|
|
25
|
-
`,F+1);m=m.substring(D+1)}this.stack=m}}},i.inherits(v.AssertionError,Error),v.fail=N,v.ok=T,v.equal=function(h,p,C){h!=p&&N(h,p,C,"==",v.equal)},v.notEqual=function(h,p,C){h==p&&N(h,p,C,"!=",v.notEqual)},v.deepEqual=function(h,p,C){R(h,p,!1)||N(h,p,C,"deepEqual",v.deepEqual)},v.deepStrictEqual=function(h,p,C){R(h,p,!0)||N(h,p,C,"deepStrictEqual",v.deepStrictEqual)},v.notDeepEqual=function(h,p,C){R(h,p,!1)&&N(h,p,C,"notDeepEqual",v.notDeepEqual)},v.notDeepStrictEqual=function h(p,C,m){R(p,C,!0)&&N(p,C,m,"notDeepStrictEqual",h)},v.strictEqual=function(h,p,C){h!==p&&N(h,p,C,"===",v.strictEqual)},v.notStrictEqual=function(h,p,C){h===p&&N(h,p,C,"!==",v.notStrictEqual)},v.throws=function(h,p,C){Q(!0,h,p,C)},v.doesNotThrow=function(h,p,C){Q(!1,h,p,C)},v.ifError=function(h){if(h)throw h},v.strict=o(function h(p,C){p||N(p,!0,C,"==",h)},v,{equal:v.strictEqual,deepEqual:v.deepStrictEqual,notEqual:v.notStrictEqual,notDeepEqual:v.notDeepStrictEqual}),v.strict.strict=v.strict;var Z=Object.keys||function(h){var p=[];for(var C in h)c.call(h,C)&&p.push(C);return p}}).call(this,r(5))},function(e,t,r){e.exports=function(n,o,l,s){for(var i=65535&n|0,c=n>>>16&65535|0,u=0;l!==0;){l-=u=l>2e3?2e3:l;do c=c+(i=i+o[s++]|0)|0;while(--u);i%=65521,c%=65521}return i|c<<16|0}},function(e,t,r){var n=function(){for(var o,l=[],s=0;s<256;s++){o=s;for(var i=0;i<8;i++)o=1&o?3988292384^o>>>1:o>>>1;l[s]=o}return l}();e.exports=function(o,l,s,i){var c=n,u=i+s;o^=-1;for(var b=i;b<u;b++)o=o>>>8^c[255&(o^l[b])];return-1^o}},function(e,t,r){(function(n,o){var l;e.exports=p,p.ReadableState=h,r(18).EventEmitter;var s=function(H,V){return H.listeners(V).length},i=r(76),c=r(4).Buffer,u=n.Uint8Array||function(){},b,A=r(178);b=A&&A.debuglog?A.debuglog("stream"):function(){};var _,v,f,S=r(179),w=r(77),P=r(78).getHighWaterMark,N=r(23).codes,T=N.ERR_INVALID_ARG_TYPE,R=N.ERR_STREAM_PUSH_AFTER_EOF,d=N.ERR_METHOD_NOT_IMPLEMENTED,I=N.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(7)(p,i);var Q=w.errorOrDestroy,Z=["error","close","destroy","pause","resume"];function h(H,V,y){l=l||r(24),H=H||{},typeof y!="boolean"&&(y=V instanceof l),this.objectMode=!!H.objectMode,y&&(this.objectMode=this.objectMode||!!H.readableObjectMode),this.highWaterMark=P(this,H,"readableHighWaterMark",y),this.buffer=new S,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.resumeScheduled=!1,this.paused=!0,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.destroyed=!1,this.defaultEncoding=H.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,H.encoding&&(_||(_=r(19).StringDecoder),this.decoder=new _(H.encoding),this.encoding=H.encoding)}function p(H){if(l=l||r(24),!(this instanceof p))return new p(H);var V=this instanceof l;this._readableState=new h(H,this,V),this.readable=!0,H&&(typeof H.read=="function"&&(this._read=H.read),typeof H.destroy=="function"&&(this._destroy=H.destroy)),i.call(this)}function C(H,V,y,j,W){b("readableAddChunk",V);var ee,X=H._readableState;if(V===null)X.reading=!1,function(ne,ie){if(b("onEofChunk"),!ie.ended){if(ie.decoder){var he=ie.decoder.end();he&&he.length&&(ie.buffer.push(he),ie.length+=ie.objectMode?1:he.length)}ie.ended=!0,ie.sync?F(ne):(ie.needReadable=!1,ie.emittedReadable||(ie.emittedReadable=!0,D(ne)))}}(H,X);else if(W||(ee=function(ne,ie){var he;Se=ie,c.isBuffer(Se)||Se instanceof u||typeof ie=="string"||ie===void 0||ne.objectMode||(he=new T("chunk",["string","Buffer","Uint8Array"],ie));var Se;return he}(X,V)),ee)Q(H,ee);else if(X.objectMode||V&&V.length>0)if(typeof V=="string"||X.objectMode||Object.getPrototypeOf(V)===c.prototype||(V=function(ne){return c.from(ne)}(V)),j)X.endEmitted?Q(H,new I):m(H,X,V,!0);else if(X.ended)Q(H,new R);else{if(X.destroyed)return!1;X.reading=!1,X.decoder&&!y?(V=X.decoder.write(V),X.objectMode||V.length!==0?m(H,X,V,!1):O(H,X)):m(H,X,V,!1)}else j||(X.reading=!1,O(H,X));return!X.ended&&(X.length<X.highWaterMark||X.length===0)}function m(H,V,y,j){V.flowing&&V.length===0&&!V.sync?(V.awaitDrain=0,H.emit("data",y)):(V.length+=V.objectMode?1:y.length,j?V.buffer.unshift(y):V.buffer.push(y),V.needReadable&&F(H)),O(H,V)}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(H){this._readableState&&(this._readableState.destroyed=H)}}),p.prototype.destroy=w.destroy,p.prototype._undestroy=w.undestroy,p.prototype._destroy=function(H,V){V(H)},p.prototype.push=function(H,V){var y,j=this._readableState;return j.objectMode?y=!0:typeof H=="string"&&((V=V||j.defaultEncoding)!==j.encoding&&(H=c.from(H,V),V=""),y=!0),C(this,H,V,!1,y)},p.prototype.unshift=function(H){return C(this,H,null,!0,!1)},p.prototype.isPaused=function(){return this._readableState.flowing===!1},p.prototype.setEncoding=function(H){_||(_=r(19).StringDecoder);var V=new _(H);this._readableState.decoder=V,this._readableState.encoding=this._readableState.decoder.encoding;for(var y=this._readableState.buffer.head,j="";y!==null;)j+=V.write(y.data),y=y.next;return this._readableState.buffer.clear(),j!==""&&this._readableState.buffer.push(j),this._readableState.length=j.length,this};function x(H,V){return H<=0||V.length===0&&V.ended?0:V.objectMode?1:H!=H?V.flowing&&V.length?V.buffer.head.data.length:V.length:(H>V.highWaterMark&&(V.highWaterMark=function(y){return y>=1073741824?y=1073741824:(y--,y|=y>>>1,y|=y>>>2,y|=y>>>4,y|=y>>>8,y|=y>>>16,y++),y}(H)),H<=V.length?H:V.ended?V.length:(V.needReadable=!0,0))}function F(H){var V=H._readableState;b("emitReadable",V.needReadable,V.emittedReadable),V.needReadable=!1,V.emittedReadable||(b("emitReadable",V.flowing),V.emittedReadable=!0,o.nextTick(D,H))}function D(H){var V=H._readableState;b("emitReadable_",V.destroyed,V.length,V.ended),V.destroyed||!V.length&&!V.ended||(H.emit("readable"),V.emittedReadable=!1),V.needReadable=!V.flowing&&!V.ended&&V.length<=V.highWaterMark,U(H)}function O(H,V){V.readingMore||(V.readingMore=!0,o.nextTick(L,H,V))}function L(H,V){for(;!V.reading&&!V.ended&&(V.length<V.highWaterMark||V.flowing&&V.length===0);){var y=V.length;if(b("maybeReadMore read 0"),H.read(0),y===V.length)break}V.readingMore=!1}function k(H){var V=H._readableState;V.readableListening=H.listenerCount("readable")>0,V.resumeScheduled&&!V.paused?V.flowing=!0:H.listenerCount("data")>0&&H.resume()}function E(H){b("readable nexttick read 0"),H.read(0)}function g(H,V){b("resume",V.reading),V.reading||H.read(0),V.resumeScheduled=!1,H.emit("resume"),U(H),V.flowing&&!V.reading&&H.read(0)}function U(H){var V=H._readableState;for(b("flow",V.flowing);V.flowing&&H.read()!==null;);}function B(H,V){return V.length===0?null:(V.objectMode?y=V.buffer.shift():!H||H>=V.length?(y=V.decoder?V.buffer.join(""):V.buffer.length===1?V.buffer.first():V.buffer.concat(V.length),V.buffer.clear()):y=V.buffer.consume(H,V.decoder),y);var y}function G(H){var V=H._readableState;b("endReadable",V.endEmitted),V.endEmitted||(V.ended=!0,o.nextTick(Y,V,H))}function Y(H,V){if(b("endReadableNT",H.endEmitted,H.length),!H.endEmitted&&H.length===0&&(H.endEmitted=!0,V.readable=!1,V.emit("end"),H.autoDestroy)){var y=V._writableState;(!y||y.autoDestroy&&y.finished)&&V.destroy()}}function K(H,V){for(var y=0,j=H.length;y<j;y++)if(H[y]===V)return y;return-1}p.prototype.read=function(H){b("read",H),H=parseInt(H,10);var V=this._readableState,y=H;if(H!==0&&(V.emittedReadable=!1),H===0&&V.needReadable&&((V.highWaterMark!==0?V.length>=V.highWaterMark:V.length>0)||V.ended))return b("read: emitReadable",V.length,V.ended),V.length===0&&V.ended?G(this):F(this),null;if((H=x(H,V))===0&&V.ended)return V.length===0&&G(this),null;var j,W=V.needReadable;return b("need readable",W),(V.length===0||V.length-H<V.highWaterMark)&&b("length less than watermark",W=!0),V.ended||V.reading?b("reading or ended",W=!1):W&&(b("do read"),V.reading=!0,V.sync=!0,V.length===0&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||(H=x(y,V))),(j=H>0?B(H,V):null)===null?(V.needReadable=V.length<=V.highWaterMark,H=0):(V.length-=H,V.awaitDrain=0),V.length===0&&(V.ended||(V.needReadable=!0),y!==H&&V.ended&&G(this)),j!==null&&this.emit("data",j),j},p.prototype._read=function(H){Q(this,new d("_read()"))},p.prototype.pipe=function(H,V){var y=this,j=this._readableState;switch(j.pipesCount){case 0:j.pipes=H;break;case 1:j.pipes=[j.pipes,H];break;default:j.pipes.push(H)}j.pipesCount+=1,b("pipe count=%d opts=%j",j.pipesCount,V);var W=(!V||V.end!==!1)&&H!==o.stdout&&H!==o.stderr?X:ye;function ee(q,$){b("onunpipe"),q===y&&$&&$.hasUnpiped===!1&&($.hasUnpiped=!0,b("cleanup"),H.removeListener("close",we),H.removeListener("finish",Ee),H.removeListener("drain",ne),H.removeListener("error",Se),H.removeListener("unpipe",ee),y.removeListener("end",X),y.removeListener("end",ye),y.removeListener("data",he),ie=!0,!j.awaitDrain||H._writableState&&!H._writableState.needDrain||ne())}function X(){b("onend"),H.end()}j.endEmitted?o.nextTick(W):y.once("end",W),H.on("unpipe",ee);var ne=function(q){return function(){var $=q._readableState;b("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&s(q,"data")&&($.flowing=!0,U(q))}}(y);H.on("drain",ne);var ie=!1;function he(q){b("ondata");var $=H.write(q);b("dest.write",$),$===!1&&((j.pipesCount===1&&j.pipes===H||j.pipesCount>1&&K(j.pipes,H)!==-1)&&!ie&&(b("false write response, pause",j.awaitDrain),j.awaitDrain++),y.pause())}function Se(q){b("onerror",q),ye(),H.removeListener("error",Se),s(H,"error")===0&&Q(H,q)}function we(){H.removeListener("finish",Ee),ye()}function Ee(){b("onfinish"),H.removeListener("close",we),ye()}function ye(){b("unpipe"),y.unpipe(H)}return y.on("data",he),function(q,$,te){if(typeof q.prependListener=="function")return q.prependListener($,te);q._events&&q._events[$]?Array.isArray(q._events[$])?q._events[$].unshift(te):q._events[$]=[te,q._events[$]]:q.on($,te)}(H,"error",Se),H.once("close",we),H.once("finish",Ee),H.emit("pipe",y),j.flowing||(b("pipe resume"),y.resume()),H},p.prototype.unpipe=function(H){var V=this._readableState,y={hasUnpiped:!1};if(V.pipesCount===0)return this;if(V.pipesCount===1)return H&&H!==V.pipes||(H||(H=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,H&&H.emit("unpipe",this,y)),this;if(!H){var j=V.pipes,W=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var ee=0;ee<W;ee++)j[ee].emit("unpipe",this,{hasUnpiped:!1});return this}var X=K(V.pipes,H);return X===-1||(V.pipes.splice(X,1),V.pipesCount-=1,V.pipesCount===1&&(V.pipes=V.pipes[0]),H.emit("unpipe",this,y)),this},p.prototype.on=function(H,V){var y=i.prototype.on.call(this,H,V),j=this._readableState;return H==="data"?(j.readableListening=this.listenerCount("readable")>0,j.flowing!==!1&&this.resume()):H==="readable"&&(j.endEmitted||j.readableListening||(j.readableListening=j.needReadable=!0,j.flowing=!1,j.emittedReadable=!1,b("on readable",j.length,j.reading),j.length?F(this):j.reading||o.nextTick(E,this))),y},p.prototype.addListener=p.prototype.on,p.prototype.removeListener=function(H,V){var y=i.prototype.removeListener.call(this,H,V);return H==="readable"&&o.nextTick(k,this),y},p.prototype.removeAllListeners=function(H){var V=i.prototype.removeAllListeners.apply(this,arguments);return H!=="readable"&&H!==void 0||o.nextTick(k,this),V},p.prototype.resume=function(){var H=this._readableState;return H.flowing||(b("resume"),H.flowing=!H.readableListening,function(V,y){y.resumeScheduled||(y.resumeScheduled=!0,o.nextTick(g,V,y))}(this,H)),H.paused=!1,this},p.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},p.prototype.wrap=function(H){var V=this,y=this._readableState,j=!1;for(var W in H.on("end",function(){if(b("wrapped end"),y.decoder&&!y.ended){var X=y.decoder.end();X&&X.length&&V.push(X)}V.push(null)}),H.on("data",function(X){b("wrapped data"),y.decoder&&(X=y.decoder.write(X)),y.objectMode&&X==null||(y.objectMode||X&&X.length)&&(V.push(X)||(j=!0,H.pause()))}),H)this[W]===void 0&&typeof H[W]=="function"&&(this[W]=function(X){return function(){return H[X].apply(H,arguments)}}(W));for(var ee=0;ee<Z.length;ee++)H.on(Z[ee],this.emit.bind(this,Z[ee]));return this._read=function(X){b("wrapped _read",X),j&&(j=!1,H.resume())},this},typeof Symbol=="function"&&(p.prototype[Symbol.asyncIterator]=function(){return v===void 0&&(v=r(181)),v(this)}),Object.defineProperty(p.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(p.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(p.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(H){this._readableState&&(this._readableState.flowing=H)}}),p._fromList=B,Object.defineProperty(p.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(p.from=function(H,V){return f===void 0&&(f=r(182)),f(p,H,V)})}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){(function(n){function o(i,c){s(i,c),l(i)}function l(i){i._writableState&&!i._writableState.emitClose||i._readableState&&!i._readableState.emitClose||i.emit("close")}function s(i,c){i.emit("error",c)}e.exports={destroy:function(i,c){var u=this,b=this._readableState&&this._readableState.destroyed,A=this._writableState&&this._writableState.destroyed;return b||A?(c?c(i):i&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,i)):n.nextTick(s,this,i)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(i||null,function(_){!c&&_?u._writableState?u._writableState.errorEmitted?n.nextTick(l,u):(u._writableState.errorEmitted=!0,n.nextTick(o,u,_)):n.nextTick(o,u,_):c?(n.nextTick(l,u),c(_)):n.nextTick(l,u)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(i,c){var u=i._readableState,b=i._writableState;u&&u.autoDestroy||b&&b.autoDestroy?i.destroy(c):i.emit("error",c)}}}).call(this,r(2))},function(e,t,r){var n=r(23).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(o,l,s,i){var c=function(u,b,A){return u.highWaterMark!=null?u.highWaterMark:b?u[A]:null}(l,i,s);if(c!=null){if(!isFinite(c)||Math.floor(c)!==c||c<0)throw new n(i?s:"highWaterMark",c);return Math.floor(c)}return o.objectMode?16:16384}}},function(e,t,r){(function(n,o){function l(L){var k=this;this.next=null,this.entry=null,this.finish=function(){(function(E,g,U){var B=E.entry;for(E.entry=null;B;){var G=B.callback;g.pendingcb--,G(U),B=B.next}g.corkedRequestsFree.next=E})(k,L)}}var s;e.exports=p,p.WritableState=h;var i={deprecate:r(39)},c=r(76),u=r(4).Buffer,b=n.Uint8Array||function(){},A,_=r(77),v=r(78).getHighWaterMark,f=r(23).codes,S=f.ERR_INVALID_ARG_TYPE,w=f.ERR_METHOD_NOT_IMPLEMENTED,P=f.ERR_MULTIPLE_CALLBACK,N=f.ERR_STREAM_CANNOT_PIPE,T=f.ERR_STREAM_DESTROYED,R=f.ERR_STREAM_NULL_VALUES,d=f.ERR_STREAM_WRITE_AFTER_END,I=f.ERR_UNKNOWN_ENCODING,Q=_.errorOrDestroy;function Z(){}function h(L,k,E){s=s||r(24),L=L||{},typeof E!="boolean"&&(E=k instanceof s),this.objectMode=!!L.objectMode,E&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=v(this,L,"writableHighWaterMark",E),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var g=L.decodeStrings===!1;this.decodeStrings=!g,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(U){(function(B,G){var Y=B._writableState,K=Y.sync,H=Y.writecb;if(typeof H!="function")throw new P;if(function(y){y.writing=!1,y.writecb=null,y.length-=y.writelen,y.writelen=0}(Y),G)(function(y,j,W,ee,X){--j.pendingcb,W?(o.nextTick(X,ee),o.nextTick(O,y,j),y._writableState.errorEmitted=!0,Q(y,ee)):(X(ee),y._writableState.errorEmitted=!0,Q(y,ee),O(y,j))})(B,Y,K,G,H);else{var V=F(Y)||B.destroyed;V||Y.corked||Y.bufferProcessing||!Y.bufferedRequest||x(B,Y),K?o.nextTick(m,B,Y,V,H):m(B,Y,V,H)}})(k,U)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new l(this)}function p(L){var k=this instanceof(s=s||r(24));if(!k&&!A.call(p,this))return new p(L);this._writableState=new h(L,this,k),this.writable=!0,L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final)),c.call(this)}function C(L,k,E,g,U,B,G){k.writelen=g,k.writecb=G,k.writing=!0,k.sync=!0,k.destroyed?k.onwrite(new T("write")):E?L._writev(U,k.onwrite):L._write(U,B,k.onwrite),k.sync=!1}function m(L,k,E,g){E||function(U,B){B.length===0&&B.needDrain&&(B.needDrain=!1,U.emit("drain"))}(L,k),k.pendingcb--,g(),O(L,k)}function x(L,k){k.bufferProcessing=!0;var E=k.bufferedRequest;if(L._writev&&E&&E.next){var g=k.bufferedRequestCount,U=new Array(g),B=k.corkedRequestsFree;B.entry=E;for(var G=0,Y=!0;E;)U[G]=E,E.isBuf||(Y=!1),E=E.next,G+=1;U.allBuffers=Y,C(L,k,!0,k.length,U,"",B.finish),k.pendingcb++,k.lastBufferedRequest=null,B.next?(k.corkedRequestsFree=B.next,B.next=null):k.corkedRequestsFree=new l(k),k.bufferedRequestCount=0}else{for(;E;){var K=E.chunk,H=E.encoding,V=E.callback;if(C(L,k,!1,k.objectMode?1:K.length,K,H,V),E=E.next,k.bufferedRequestCount--,k.writing)break}E===null&&(k.lastBufferedRequest=null)}k.bufferedRequest=E,k.bufferProcessing=!1}function F(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function D(L,k){L._final(function(E){k.pendingcb--,E&&Q(L,E),k.prefinished=!0,L.emit("prefinish"),O(L,k)})}function O(L,k){var E=F(k);if(E&&(function(U,B){B.prefinished||B.finalCalled||(typeof U._final!="function"||B.destroyed?(B.prefinished=!0,U.emit("prefinish")):(B.pendingcb++,B.finalCalled=!0,o.nextTick(D,U,B)))}(L,k),k.pendingcb===0&&(k.finished=!0,L.emit("finish"),k.autoDestroy))){var g=L._readableState;(!g||g.autoDestroy&&g.endEmitted)&&L.destroy()}return E}r(7)(p,c),h.prototype.getBuffer=function(){for(var L=this.bufferedRequest,k=[];L;)k.push(L),L=L.next;return k},function(){try{Object.defineProperty(h.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(L){return!!A.call(this,L)||this===p&&L&&L._writableState instanceof h}})):A=function(L){return L instanceof this},p.prototype.pipe=function(){Q(this,new N)},p.prototype.write=function(L,k,E){var g,U=this._writableState,B=!1,G=!U.objectMode&&(g=L,u.isBuffer(g)||g instanceof b);return G&&!u.isBuffer(L)&&(L=function(Y){return u.from(Y)}(L)),typeof k=="function"&&(E=k,k=null),G?k="buffer":k||(k=U.defaultEncoding),typeof E!="function"&&(E=Z),U.ending?function(Y,K){var H=new d;Q(Y,H),o.nextTick(K,H)}(this,E):(G||function(Y,K,H,V){var y;return H===null?y=new R:typeof H=="string"||K.objectMode||(y=new S("chunk",["string","Buffer"],H)),!y||(Q(Y,y),o.nextTick(V,y),!1)}(this,U,L,E))&&(U.pendingcb++,B=function(Y,K,H,V,y,j){if(!H){var W=function(ie,he,Se){return ie.objectMode||ie.decodeStrings===!1||typeof he!="string"||(he=u.from(he,Se)),he}(K,V,y);V!==W&&(H=!0,y="buffer",V=W)}var ee=K.objectMode?1:V.length;K.length+=ee;var X=K.length<K.highWaterMark;if(X||(K.needDrain=!0),K.writing||K.corked){var ne=K.lastBufferedRequest;K.lastBufferedRequest={chunk:V,encoding:y,isBuf:H,callback:j,next:null},ne?ne.next=K.lastBufferedRequest:K.bufferedRequest=K.lastBufferedRequest,K.bufferedRequestCount+=1}else C(Y,K,!1,ee,V,y,j);return X}(this,U,G,L,k,E)),B},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,L.writing||L.corked||L.bufferProcessing||!L.bufferedRequest||x(this,L))},p.prototype.setDefaultEncoding=function(L){if(typeof L=="string"&&(L=L.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((L+"").toLowerCase())>-1))throw new I(L);return this._writableState.defaultEncoding=L,this},Object.defineProperty(p.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),p.prototype._write=function(L,k,E){E(new w("_write()"))},p.prototype._writev=null,p.prototype.end=function(L,k,E){var g=this._writableState;return typeof L=="function"?(E=L,L=null,k=null):typeof k=="function"&&(E=k,k=null),L!=null&&this.write(L,k),g.corked&&(g.corked=1,this.uncork()),g.ending||function(U,B,G){B.ending=!0,O(U,B),G&&(B.finished?o.nextTick(G):U.once("finish",G)),B.ended=!0,U.writable=!1}(this,g,E),this},Object.defineProperty(p.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(L){this._writableState&&(this._writableState.destroyed=L)}}),p.prototype.destroy=_.destroy,p.prototype._undestroy=_.undestroy,p.prototype._destroy=function(L,k){k(L)}}).call(this,r(5),r(2))},function(e,t,r){e.exports=b;var n=r(23).codes,o=n.ERR_METHOD_NOT_IMPLEMENTED,l=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(24);function u(v,f){var S=this._transformState;S.transforming=!1;var w=S.writecb;if(w===null)return this.emit("error",new l);S.writechunk=null,S.writecb=null,f!=null&&this.push(f),w(v);var P=this._readableState;P.reading=!1,(P.needReadable||P.length<P.highWaterMark)&&this._read(P.highWaterMark)}function b(v){if(!(this instanceof b))return new b(v);c.call(this,v),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,v&&(typeof v.transform=="function"&&(this._transform=v.transform),typeof v.flush=="function"&&(this._flush=v.flush)),this.on("prefinish",A)}function A(){var v=this;typeof this._flush!="function"||this._readableState.destroyed?_(this,null,null):this._flush(function(f,S){_(v,f,S)})}function _(v,f,S){if(f)return v.emit("error",f);if(S!=null&&v.push(S),v._writableState.length)throw new i;if(v._transformState.transforming)throw new s;return v.push(null)}r(7)(b,c),b.prototype.push=function(v,f){return this._transformState.needTransform=!1,c.prototype.push.call(this,v,f)},b.prototype._transform=function(v,f,S){S(new o("_transform()"))},b.prototype._write=function(v,f,S){var w=this._transformState;if(w.writecb=S,w.writechunk=v,w.writeencoding=f,!w.transforming){var P=this._readableState;(w.needTransform||P.needReadable||P.length<P.highWaterMark)&&this._read(P.highWaterMark)}},b.prototype._read=function(v){var f=this._transformState;f.writechunk===null||f.transforming?f.needTransform=!0:(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform))},b.prototype._destroy=function(v,f){c.prototype._destroy.call(this,v,function(S){f(S)})}},function(e,t,r){(function(n){var o=r(189),l=r(83),s=r(191),i=r(192),c=r(46),u=t;u.request=function(b,A){b=typeof b=="string"?c.parse(b):s(b);var _=n.location.protocol.search(/^https?:$/)===-1?"http:":"",v=b.protocol||_,f=b.hostname||b.host,S=b.port,w=b.path||"/";f&&f.indexOf(":")!==-1&&(f="["+f+"]"),b.url=(f?v+"//"+f:"")+(S?":"+S:"")+w,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var P=new o(b);return A&&P.on("response",A),P},u.get=function(b,A){var _=u.request(b,A);return _.end(),_},u.ClientRequest=o,u.IncomingMessage=l.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=i,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(5))},function(e,t,r){(function(n){t.fetch=u(n.fetch)&&u(n.ReadableStream),t.writableStream=u(n.WritableStream),t.abortController=u(n.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch{}var o;function l(){if(o!==void 0)return o;if(n.XMLHttpRequest){o=new n.XMLHttpRequest;try{o.open("GET",n.XDomainRequest?"/":"https://example.com")}catch{o=null}}else o=null;return o}function s(b){var A=l();if(!A)return!1;try{return A.responseType=b,A.responseType===b}catch{}return!1}var i=n.ArrayBuffer!==void 0,c=i&&u(n.ArrayBuffer.prototype.slice);function u(b){return typeof b=="function"}t.arraybuffer=t.fetch||i&&s("arraybuffer"),t.msstream=!t.fetch&&c&&s("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&s("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!l()&&u(l().overrideMimeType),t.vbArray=u(n.VBArray),o=null}).call(this,r(5))},function(e,t,r){(function(n,o,l){var s=r(82),i=r(7),c=r(27),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},b=t.IncomingMessage=function(A,_,v,f){var S=this;if(c.Readable.call(S),S._mode=v,S.headers={},S.rawHeaders=[],S.trailers={},S.rawTrailers=[],S.on("end",function(){n.nextTick(function(){S.emit("close")})}),v==="fetch"){if(S._fetchResponse=_,S.url=_.url,S.statusCode=_.status,S.statusMessage=_.statusText,_.headers.forEach(function(R,d){S.headers[d.toLowerCase()]=R,S.rawHeaders.push(d,R)}),s.writableStream){var w=new WritableStream({write:function(R){return new Promise(function(d,I){S._destroyed?I():S.push(new o(R))?d():S._resumeFetch=d})},close:function(){l.clearTimeout(f),S._destroyed||S.push(null)},abort:function(R){S._destroyed||S.emit("error",R)}});try{return void _.body.pipeTo(w).catch(function(R){l.clearTimeout(f),S._destroyed||S.emit("error",R)})}catch{}}var P=_.body.getReader();(function R(){P.read().then(function(d){if(!S._destroyed){if(d.done)return l.clearTimeout(f),void S.push(null);S.push(new o(d.value)),R()}}).catch(function(d){l.clearTimeout(f),S._destroyed||S.emit("error",d)})})()}else if(S._xhr=A,S._pos=0,S.url=A.responseURL,S.statusCode=A.status,S.statusMessage=A.statusText,A.getAllResponseHeaders().split(/\r?\n/).forEach(function(R){var d=R.match(/^([^:]+):\s*(.*)/);if(d){var I=d[1].toLowerCase();I==="set-cookie"?(S.headers[I]===void 0&&(S.headers[I]=[]),S.headers[I].push(d[2])):S.headers[I]!==void 0?S.headers[I]+=", "+d[2]:S.headers[I]=d[2],S.rawHeaders.push(d[1],d[2])}}),S._charset="x-user-defined",!s.overrideMimeType){var N=S.rawHeaders["mime-type"];if(N){var T=N.match(/;\s*charset=([^;])(;|$)/);T&&(S._charset=T[1].toLowerCase())}S._charset||(S._charset="utf-8")}};i(b,c.Readable),b.prototype._read=function(){var A=this._resumeFetch;A&&(this._resumeFetch=null,A())},b.prototype._onXHRProgress=function(){var A=this,_=A._xhr,v=null;switch(A._mode){case"text:vbarray":if(_.readyState!==u.DONE)break;try{v=new l.VBArray(_.responseBody).toArray()}catch{}if(v!==null){A.push(new o(v));break}case"text":try{v=_.responseText}catch{A._mode="text:vbarray";break}if(v.length>A._pos){var f=v.substr(A._pos);if(A._charset==="x-user-defined"){for(var S=new o(f.length),w=0;w<f.length;w++)S[w]=255&f.charCodeAt(w);A.push(S)}else A.push(f,A._charset);A._pos=v.length}break;case"arraybuffer":if(_.readyState!==u.DONE||!_.response)break;v=_.response,A.push(new o(new Uint8Array(v)));break;case"moz-chunked-arraybuffer":if(v=_.response,_.readyState!==u.LOADING||!v)break;A.push(new o(new Uint8Array(v)));break;case"ms-stream":if(v=_.response,_.readyState!==u.LOADING)break;var P=new l.MSStreamReader;P.onprogress=function(){P.result.byteLength>A._pos&&(A.push(new o(new Uint8Array(P.result.slice(A._pos)))),A._pos=P.result.byteLength)},P.onload=function(){A.push(null)},P.readAsArrayBuffer(v)}A._xhr.readyState===u.DONE&&A._mode!=="ms-stream"&&A.push(null)}}).call(this,r(2),r(4).Buffer,r(5))},function(e,t,r){const n=o=>o!==null&&typeof o=="object"&&typeof o.pipe=="function";n.writable=o=>n(o)&&o.writable!==!1&&typeof o._write=="function"&&typeof o._writableState=="object",n.readable=o=>n(o)&&o.readable!==!1&&typeof o._read=="function"&&typeof o._readableState=="object",n.duplex=o=>n.writable(o)&&n.readable(o),n.transform=o=>n.duplex(o)&&typeof o._transform=="function"&&typeof o._transformState=="object",e.exports=n},function(e,t,r){function n(S){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(S)}function o(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function l(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),w&&s(S,w)}function s(S,w){return(s=Object.setPrototypeOf||function(P,N){return P.__proto__=N,P})(S,w)}function i(S){var w=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var P,N=u(S);if(w){var T=u(this).constructor;P=Reflect.construct(N,arguments,T)}else P=N.apply(this,arguments);return c(this,P)}}function c(S,w){return!w||n(w)!=="object"&&typeof w!="function"?function(P){if(P===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P}(S):w}function u(S){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)})(S)}var b=r(3).LEVEL,A=r(47),_=r(201),v=r(33)("winston:create-logger");function f(S){return"is"+S.charAt(0).toUpperCase()+S.slice(1)+"Enabled"}e.exports=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.levels=S.levels||A.npm.levels;var w=function(N){l(R,N);var T=i(R);function R(d){return o(this,R),T.call(this,d)}return R}(_),P=new w(S);return Object.keys(S.levels).forEach(function(N){v('Define prototype method for "%s"',N),N!=="log"?(w.prototype[N]=function(){for(var T=this||P,R=arguments.length,d=new Array(R),I=0;I<R;I++)d[I]=arguments[I];if(d.length===1){var Q=d[0],Z=Q&&Q.message&&Q||{message:Q};return Z.level=Z[b]=N,T._addDefaultMeta(Z),T.write(Z),this||P}return d.length===0?(T.log(N,""),T):T.log.apply(T,[N].concat(d))},w.prototype[f(N)]=function(){return(this||P).isLevelEnabled(N)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')}),P}},function(e,t,r){(function(n){function o(A,_){for(var v=0;v<_.length;v++){var f=_[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(A,f.key,f)}}var l=r(15),s=r(48),i=r(33)("winston:exception"),c=r(87),u=r(88),b=r(89);e.exports=function(){function A(f){if(function(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}(this,A),!f)throw new Error("Logger is required to handle exceptions");this.logger=f,this.handlers=new Map}var _,v;return _=A,(v=[{key:"handle",value:function(){for(var f=this,S=arguments.length,w=new Array(S),P=0;P<S;P++)w[P]=arguments[P];w.forEach(function(N){if(Array.isArray(N))return N.forEach(function(T){return f._addHandler(T)});f._addHandler(N)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),n.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var f=this;this.catcher&&(n.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(function(S){return f.logger.unpipe(S)}))}},{key:"getAllInfo",value:function(f){var S=f.message;return S||typeof f!="string"||(S=f),{error:f,level:"error",message:["uncaughtException: ".concat(S||"(no error message)"),f.stack||" No stack trace"].join(`
|
|
25
|
+
`,F+1);m=m.substring(D+1)}this.stack=m}}},i.inherits(v.AssertionError,Error),v.fail=N,v.ok=T,v.equal=function(h,p,j){h!=p&&N(h,p,j,"==",v.equal)},v.notEqual=function(h,p,j){h==p&&N(h,p,j,"!=",v.notEqual)},v.deepEqual=function(h,p,j){R(h,p,!1)||N(h,p,j,"deepEqual",v.deepEqual)},v.deepStrictEqual=function(h,p,j){R(h,p,!0)||N(h,p,j,"deepStrictEqual",v.deepStrictEqual)},v.notDeepEqual=function(h,p,j){R(h,p,!1)&&N(h,p,j,"notDeepEqual",v.notDeepEqual)},v.notDeepStrictEqual=function h(p,j,m){R(p,j,!0)&&N(p,j,m,"notDeepStrictEqual",h)},v.strictEqual=function(h,p,j){h!==p&&N(h,p,j,"===",v.strictEqual)},v.notStrictEqual=function(h,p,j){h===p&&N(h,p,j,"!==",v.notStrictEqual)},v.throws=function(h,p,j){Q(!0,h,p,j)},v.doesNotThrow=function(h,p,j){Q(!1,h,p,j)},v.ifError=function(h){if(h)throw h},v.strict=o(function h(p,j){p||N(p,!0,j,"==",h)},v,{equal:v.strictEqual,deepEqual:v.deepStrictEqual,notEqual:v.notStrictEqual,notDeepEqual:v.notDeepStrictEqual}),v.strict.strict=v.strict;var Z=Object.keys||function(h){var p=[];for(var j in h)c.call(h,j)&&p.push(j);return p}}).call(this,r(5))},function(e,t,r){e.exports=function(n,o,l,s){for(var i=65535&n|0,c=n>>>16&65535|0,u=0;l!==0;){l-=u=l>2e3?2e3:l;do c=c+(i=i+o[s++]|0)|0;while(--u);i%=65521,c%=65521}return i|c<<16|0}},function(e,t,r){var n=function(){for(var o,l=[],s=0;s<256;s++){o=s;for(var i=0;i<8;i++)o=1&o?3988292384^o>>>1:o>>>1;l[s]=o}return l}();e.exports=function(o,l,s,i){var c=n,u=i+s;o^=-1;for(var b=i;b<u;b++)o=o>>>8^c[255&(o^l[b])];return-1^o}},function(e,t,r){(function(n,o){var l;e.exports=p,p.ReadableState=h,r(18).EventEmitter;var s=function(H,V){return H.listeners(V).length},i=r(76),c=r(4).Buffer,u=n.Uint8Array||function(){},b,A=r(178);b=A&&A.debuglog?A.debuglog("stream"):function(){};var _,v,f,S=r(179),w=r(77),P=r(78).getHighWaterMark,N=r(23).codes,T=N.ERR_INVALID_ARG_TYPE,R=N.ERR_STREAM_PUSH_AFTER_EOF,d=N.ERR_METHOD_NOT_IMPLEMENTED,I=N.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(7)(p,i);var Q=w.errorOrDestroy,Z=["error","close","destroy","pause","resume"];function h(H,V,y){l=l||r(24),H=H||{},typeof y!="boolean"&&(y=V instanceof l),this.objectMode=!!H.objectMode,y&&(this.objectMode=this.objectMode||!!H.readableObjectMode),this.highWaterMark=P(this,H,"readableHighWaterMark",y),this.buffer=new S,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.resumeScheduled=!1,this.paused=!0,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.destroyed=!1,this.defaultEncoding=H.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,H.encoding&&(_||(_=r(19).StringDecoder),this.decoder=new _(H.encoding),this.encoding=H.encoding)}function p(H){if(l=l||r(24),!(this instanceof p))return new p(H);var V=this instanceof l;this._readableState=new h(H,this,V),this.readable=!0,H&&(typeof H.read=="function"&&(this._read=H.read),typeof H.destroy=="function"&&(this._destroy=H.destroy)),i.call(this)}function j(H,V,y,C,W){b("readableAddChunk",V);var ee,X=H._readableState;if(V===null)X.reading=!1,function(ne,ie){if(b("onEofChunk"),!ie.ended){if(ie.decoder){var he=ie.decoder.end();he&&he.length&&(ie.buffer.push(he),ie.length+=ie.objectMode?1:he.length)}ie.ended=!0,ie.sync?F(ne):(ie.needReadable=!1,ie.emittedReadable||(ie.emittedReadable=!0,D(ne)))}}(H,X);else if(W||(ee=function(ne,ie){var he;Se=ie,c.isBuffer(Se)||Se instanceof u||typeof ie=="string"||ie===void 0||ne.objectMode||(he=new T("chunk",["string","Buffer","Uint8Array"],ie));var Se;return he}(X,V)),ee)Q(H,ee);else if(X.objectMode||V&&V.length>0)if(typeof V=="string"||X.objectMode||Object.getPrototypeOf(V)===c.prototype||(V=function(ne){return c.from(ne)}(V)),C)X.endEmitted?Q(H,new I):m(H,X,V,!0);else if(X.ended)Q(H,new R);else{if(X.destroyed)return!1;X.reading=!1,X.decoder&&!y?(V=X.decoder.write(V),X.objectMode||V.length!==0?m(H,X,V,!1):O(H,X)):m(H,X,V,!1)}else C||(X.reading=!1,O(H,X));return!X.ended&&(X.length<X.highWaterMark||X.length===0)}function m(H,V,y,C){V.flowing&&V.length===0&&!V.sync?(V.awaitDrain=0,H.emit("data",y)):(V.length+=V.objectMode?1:y.length,C?V.buffer.unshift(y):V.buffer.push(y),V.needReadable&&F(H)),O(H,V)}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(H){this._readableState&&(this._readableState.destroyed=H)}}),p.prototype.destroy=w.destroy,p.prototype._undestroy=w.undestroy,p.prototype._destroy=function(H,V){V(H)},p.prototype.push=function(H,V){var y,C=this._readableState;return C.objectMode?y=!0:typeof H=="string"&&((V=V||C.defaultEncoding)!==C.encoding&&(H=c.from(H,V),V=""),y=!0),j(this,H,V,!1,y)},p.prototype.unshift=function(H){return j(this,H,null,!0,!1)},p.prototype.isPaused=function(){return this._readableState.flowing===!1},p.prototype.setEncoding=function(H){_||(_=r(19).StringDecoder);var V=new _(H);this._readableState.decoder=V,this._readableState.encoding=this._readableState.decoder.encoding;for(var y=this._readableState.buffer.head,C="";y!==null;)C+=V.write(y.data),y=y.next;return this._readableState.buffer.clear(),C!==""&&this._readableState.buffer.push(C),this._readableState.length=C.length,this};function x(H,V){return H<=0||V.length===0&&V.ended?0:V.objectMode?1:H!=H?V.flowing&&V.length?V.buffer.head.data.length:V.length:(H>V.highWaterMark&&(V.highWaterMark=function(y){return y>=1073741824?y=1073741824:(y--,y|=y>>>1,y|=y>>>2,y|=y>>>4,y|=y>>>8,y|=y>>>16,y++),y}(H)),H<=V.length?H:V.ended?V.length:(V.needReadable=!0,0))}function F(H){var V=H._readableState;b("emitReadable",V.needReadable,V.emittedReadable),V.needReadable=!1,V.emittedReadable||(b("emitReadable",V.flowing),V.emittedReadable=!0,o.nextTick(D,H))}function D(H){var V=H._readableState;b("emitReadable_",V.destroyed,V.length,V.ended),V.destroyed||!V.length&&!V.ended||(H.emit("readable"),V.emittedReadable=!1),V.needReadable=!V.flowing&&!V.ended&&V.length<=V.highWaterMark,U(H)}function O(H,V){V.readingMore||(V.readingMore=!0,o.nextTick(L,H,V))}function L(H,V){for(;!V.reading&&!V.ended&&(V.length<V.highWaterMark||V.flowing&&V.length===0);){var y=V.length;if(b("maybeReadMore read 0"),H.read(0),y===V.length)break}V.readingMore=!1}function k(H){var V=H._readableState;V.readableListening=H.listenerCount("readable")>0,V.resumeScheduled&&!V.paused?V.flowing=!0:H.listenerCount("data")>0&&H.resume()}function E(H){b("readable nexttick read 0"),H.read(0)}function g(H,V){b("resume",V.reading),V.reading||H.read(0),V.resumeScheduled=!1,H.emit("resume"),U(H),V.flowing&&!V.reading&&H.read(0)}function U(H){var V=H._readableState;for(b("flow",V.flowing);V.flowing&&H.read()!==null;);}function B(H,V){return V.length===0?null:(V.objectMode?y=V.buffer.shift():!H||H>=V.length?(y=V.decoder?V.buffer.join(""):V.buffer.length===1?V.buffer.first():V.buffer.concat(V.length),V.buffer.clear()):y=V.buffer.consume(H,V.decoder),y);var y}function G(H){var V=H._readableState;b("endReadable",V.endEmitted),V.endEmitted||(V.ended=!0,o.nextTick(Y,V,H))}function Y(H,V){if(b("endReadableNT",H.endEmitted,H.length),!H.endEmitted&&H.length===0&&(H.endEmitted=!0,V.readable=!1,V.emit("end"),H.autoDestroy)){var y=V._writableState;(!y||y.autoDestroy&&y.finished)&&V.destroy()}}function K(H,V){for(var y=0,C=H.length;y<C;y++)if(H[y]===V)return y;return-1}p.prototype.read=function(H){b("read",H),H=parseInt(H,10);var V=this._readableState,y=H;if(H!==0&&(V.emittedReadable=!1),H===0&&V.needReadable&&((V.highWaterMark!==0?V.length>=V.highWaterMark:V.length>0)||V.ended))return b("read: emitReadable",V.length,V.ended),V.length===0&&V.ended?G(this):F(this),null;if((H=x(H,V))===0&&V.ended)return V.length===0&&G(this),null;var C,W=V.needReadable;return b("need readable",W),(V.length===0||V.length-H<V.highWaterMark)&&b("length less than watermark",W=!0),V.ended||V.reading?b("reading or ended",W=!1):W&&(b("do read"),V.reading=!0,V.sync=!0,V.length===0&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||(H=x(y,V))),(C=H>0?B(H,V):null)===null?(V.needReadable=V.length<=V.highWaterMark,H=0):(V.length-=H,V.awaitDrain=0),V.length===0&&(V.ended||(V.needReadable=!0),y!==H&&V.ended&&G(this)),C!==null&&this.emit("data",C),C},p.prototype._read=function(H){Q(this,new d("_read()"))},p.prototype.pipe=function(H,V){var y=this,C=this._readableState;switch(C.pipesCount){case 0:C.pipes=H;break;case 1:C.pipes=[C.pipes,H];break;default:C.pipes.push(H)}C.pipesCount+=1,b("pipe count=%d opts=%j",C.pipesCount,V);var W=(!V||V.end!==!1)&&H!==o.stdout&&H!==o.stderr?X:ye;function ee(q,$){b("onunpipe"),q===y&&$&&$.hasUnpiped===!1&&($.hasUnpiped=!0,b("cleanup"),H.removeListener("close",we),H.removeListener("finish",Ee),H.removeListener("drain",ne),H.removeListener("error",Se),H.removeListener("unpipe",ee),y.removeListener("end",X),y.removeListener("end",ye),y.removeListener("data",he),ie=!0,!C.awaitDrain||H._writableState&&!H._writableState.needDrain||ne())}function X(){b("onend"),H.end()}C.endEmitted?o.nextTick(W):y.once("end",W),H.on("unpipe",ee);var ne=function(q){return function(){var $=q._readableState;b("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&s(q,"data")&&($.flowing=!0,U(q))}}(y);H.on("drain",ne);var ie=!1;function he(q){b("ondata");var $=H.write(q);b("dest.write",$),$===!1&&((C.pipesCount===1&&C.pipes===H||C.pipesCount>1&&K(C.pipes,H)!==-1)&&!ie&&(b("false write response, pause",C.awaitDrain),C.awaitDrain++),y.pause())}function Se(q){b("onerror",q),ye(),H.removeListener("error",Se),s(H,"error")===0&&Q(H,q)}function we(){H.removeListener("finish",Ee),ye()}function Ee(){b("onfinish"),H.removeListener("close",we),ye()}function ye(){b("unpipe"),y.unpipe(H)}return y.on("data",he),function(q,$,te){if(typeof q.prependListener=="function")return q.prependListener($,te);q._events&&q._events[$]?Array.isArray(q._events[$])?q._events[$].unshift(te):q._events[$]=[te,q._events[$]]:q.on($,te)}(H,"error",Se),H.once("close",we),H.once("finish",Ee),H.emit("pipe",y),C.flowing||(b("pipe resume"),y.resume()),H},p.prototype.unpipe=function(H){var V=this._readableState,y={hasUnpiped:!1};if(V.pipesCount===0)return this;if(V.pipesCount===1)return H&&H!==V.pipes||(H||(H=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,H&&H.emit("unpipe",this,y)),this;if(!H){var C=V.pipes,W=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var ee=0;ee<W;ee++)C[ee].emit("unpipe",this,{hasUnpiped:!1});return this}var X=K(V.pipes,H);return X===-1||(V.pipes.splice(X,1),V.pipesCount-=1,V.pipesCount===1&&(V.pipes=V.pipes[0]),H.emit("unpipe",this,y)),this},p.prototype.on=function(H,V){var y=i.prototype.on.call(this,H,V),C=this._readableState;return H==="data"?(C.readableListening=this.listenerCount("readable")>0,C.flowing!==!1&&this.resume()):H==="readable"&&(C.endEmitted||C.readableListening||(C.readableListening=C.needReadable=!0,C.flowing=!1,C.emittedReadable=!1,b("on readable",C.length,C.reading),C.length?F(this):C.reading||o.nextTick(E,this))),y},p.prototype.addListener=p.prototype.on,p.prototype.removeListener=function(H,V){var y=i.prototype.removeListener.call(this,H,V);return H==="readable"&&o.nextTick(k,this),y},p.prototype.removeAllListeners=function(H){var V=i.prototype.removeAllListeners.apply(this,arguments);return H!=="readable"&&H!==void 0||o.nextTick(k,this),V},p.prototype.resume=function(){var H=this._readableState;return H.flowing||(b("resume"),H.flowing=!H.readableListening,function(V,y){y.resumeScheduled||(y.resumeScheduled=!0,o.nextTick(g,V,y))}(this,H)),H.paused=!1,this},p.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},p.prototype.wrap=function(H){var V=this,y=this._readableState,C=!1;for(var W in H.on("end",function(){if(b("wrapped end"),y.decoder&&!y.ended){var X=y.decoder.end();X&&X.length&&V.push(X)}V.push(null)}),H.on("data",function(X){b("wrapped data"),y.decoder&&(X=y.decoder.write(X)),y.objectMode&&X==null||(y.objectMode||X&&X.length)&&(V.push(X)||(C=!0,H.pause()))}),H)this[W]===void 0&&typeof H[W]=="function"&&(this[W]=function(X){return function(){return H[X].apply(H,arguments)}}(W));for(var ee=0;ee<Z.length;ee++)H.on(Z[ee],this.emit.bind(this,Z[ee]));return this._read=function(X){b("wrapped _read",X),C&&(C=!1,H.resume())},this},typeof Symbol=="function"&&(p.prototype[Symbol.asyncIterator]=function(){return v===void 0&&(v=r(181)),v(this)}),Object.defineProperty(p.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(p.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(p.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(H){this._readableState&&(this._readableState.flowing=H)}}),p._fromList=B,Object.defineProperty(p.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(p.from=function(H,V){return f===void 0&&(f=r(182)),f(p,H,V)})}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(18).EventEmitter},function(e,t,r){(function(n){function o(i,c){s(i,c),l(i)}function l(i){i._writableState&&!i._writableState.emitClose||i._readableState&&!i._readableState.emitClose||i.emit("close")}function s(i,c){i.emit("error",c)}e.exports={destroy:function(i,c){var u=this,b=this._readableState&&this._readableState.destroyed,A=this._writableState&&this._writableState.destroyed;return b||A?(c?c(i):i&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,i)):n.nextTick(s,this,i)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(i||null,function(_){!c&&_?u._writableState?u._writableState.errorEmitted?n.nextTick(l,u):(u._writableState.errorEmitted=!0,n.nextTick(o,u,_)):n.nextTick(o,u,_):c?(n.nextTick(l,u),c(_)):n.nextTick(l,u)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(i,c){var u=i._readableState,b=i._writableState;u&&u.autoDestroy||b&&b.autoDestroy?i.destroy(c):i.emit("error",c)}}}).call(this,r(2))},function(e,t,r){var n=r(23).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(o,l,s,i){var c=function(u,b,A){return u.highWaterMark!=null?u.highWaterMark:b?u[A]:null}(l,i,s);if(c!=null){if(!isFinite(c)||Math.floor(c)!==c||c<0)throw new n(i?s:"highWaterMark",c);return Math.floor(c)}return o.objectMode?16:16384}}},function(e,t,r){(function(n,o){function l(L){var k=this;this.next=null,this.entry=null,this.finish=function(){(function(E,g,U){var B=E.entry;for(E.entry=null;B;){var G=B.callback;g.pendingcb--,G(U),B=B.next}g.corkedRequestsFree.next=E})(k,L)}}var s;e.exports=p,p.WritableState=h;var i={deprecate:r(39)},c=r(76),u=r(4).Buffer,b=n.Uint8Array||function(){},A,_=r(77),v=r(78).getHighWaterMark,f=r(23).codes,S=f.ERR_INVALID_ARG_TYPE,w=f.ERR_METHOD_NOT_IMPLEMENTED,P=f.ERR_MULTIPLE_CALLBACK,N=f.ERR_STREAM_CANNOT_PIPE,T=f.ERR_STREAM_DESTROYED,R=f.ERR_STREAM_NULL_VALUES,d=f.ERR_STREAM_WRITE_AFTER_END,I=f.ERR_UNKNOWN_ENCODING,Q=_.errorOrDestroy;function Z(){}function h(L,k,E){s=s||r(24),L=L||{},typeof E!="boolean"&&(E=k instanceof s),this.objectMode=!!L.objectMode,E&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=v(this,L,"writableHighWaterMark",E),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var g=L.decodeStrings===!1;this.decodeStrings=!g,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(U){(function(B,G){var Y=B._writableState,K=Y.sync,H=Y.writecb;if(typeof H!="function")throw new P;if(function(y){y.writing=!1,y.writecb=null,y.length-=y.writelen,y.writelen=0}(Y),G)(function(y,C,W,ee,X){--C.pendingcb,W?(o.nextTick(X,ee),o.nextTick(O,y,C),y._writableState.errorEmitted=!0,Q(y,ee)):(X(ee),y._writableState.errorEmitted=!0,Q(y,ee),O(y,C))})(B,Y,K,G,H);else{var V=F(Y)||B.destroyed;V||Y.corked||Y.bufferProcessing||!Y.bufferedRequest||x(B,Y),K?o.nextTick(m,B,Y,V,H):m(B,Y,V,H)}})(k,U)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new l(this)}function p(L){var k=this instanceof(s=s||r(24));if(!k&&!A.call(p,this))return new p(L);this._writableState=new h(L,this,k),this.writable=!0,L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final)),c.call(this)}function j(L,k,E,g,U,B,G){k.writelen=g,k.writecb=G,k.writing=!0,k.sync=!0,k.destroyed?k.onwrite(new T("write")):E?L._writev(U,k.onwrite):L._write(U,B,k.onwrite),k.sync=!1}function m(L,k,E,g){E||function(U,B){B.length===0&&B.needDrain&&(B.needDrain=!1,U.emit("drain"))}(L,k),k.pendingcb--,g(),O(L,k)}function x(L,k){k.bufferProcessing=!0;var E=k.bufferedRequest;if(L._writev&&E&&E.next){var g=k.bufferedRequestCount,U=new Array(g),B=k.corkedRequestsFree;B.entry=E;for(var G=0,Y=!0;E;)U[G]=E,E.isBuf||(Y=!1),E=E.next,G+=1;U.allBuffers=Y,j(L,k,!0,k.length,U,"",B.finish),k.pendingcb++,k.lastBufferedRequest=null,B.next?(k.corkedRequestsFree=B.next,B.next=null):k.corkedRequestsFree=new l(k),k.bufferedRequestCount=0}else{for(;E;){var K=E.chunk,H=E.encoding,V=E.callback;if(j(L,k,!1,k.objectMode?1:K.length,K,H,V),E=E.next,k.bufferedRequestCount--,k.writing)break}E===null&&(k.lastBufferedRequest=null)}k.bufferedRequest=E,k.bufferProcessing=!1}function F(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function D(L,k){L._final(function(E){k.pendingcb--,E&&Q(L,E),k.prefinished=!0,L.emit("prefinish"),O(L,k)})}function O(L,k){var E=F(k);if(E&&(function(U,B){B.prefinished||B.finalCalled||(typeof U._final!="function"||B.destroyed?(B.prefinished=!0,U.emit("prefinish")):(B.pendingcb++,B.finalCalled=!0,o.nextTick(D,U,B)))}(L,k),k.pendingcb===0&&(k.finished=!0,L.emit("finish"),k.autoDestroy))){var g=L._readableState;(!g||g.autoDestroy&&g.endEmitted)&&L.destroy()}return E}r(7)(p,c),h.prototype.getBuffer=function(){for(var L=this.bufferedRequest,k=[];L;)k.push(L),L=L.next;return k},function(){try{Object.defineProperty(h.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(L){return!!A.call(this,L)||this===p&&L&&L._writableState instanceof h}})):A=function(L){return L instanceof this},p.prototype.pipe=function(){Q(this,new N)},p.prototype.write=function(L,k,E){var g,U=this._writableState,B=!1,G=!U.objectMode&&(g=L,u.isBuffer(g)||g instanceof b);return G&&!u.isBuffer(L)&&(L=function(Y){return u.from(Y)}(L)),typeof k=="function"&&(E=k,k=null),G?k="buffer":k||(k=U.defaultEncoding),typeof E!="function"&&(E=Z),U.ending?function(Y,K){var H=new d;Q(Y,H),o.nextTick(K,H)}(this,E):(G||function(Y,K,H,V){var y;return H===null?y=new R:typeof H=="string"||K.objectMode||(y=new S("chunk",["string","Buffer"],H)),!y||(Q(Y,y),o.nextTick(V,y),!1)}(this,U,L,E))&&(U.pendingcb++,B=function(Y,K,H,V,y,C){if(!H){var W=function(ie,he,Se){return ie.objectMode||ie.decodeStrings===!1||typeof he!="string"||(he=u.from(he,Se)),he}(K,V,y);V!==W&&(H=!0,y="buffer",V=W)}var ee=K.objectMode?1:V.length;K.length+=ee;var X=K.length<K.highWaterMark;if(X||(K.needDrain=!0),K.writing||K.corked){var ne=K.lastBufferedRequest;K.lastBufferedRequest={chunk:V,encoding:y,isBuf:H,callback:C,next:null},ne?ne.next=K.lastBufferedRequest:K.bufferedRequest=K.lastBufferedRequest,K.bufferedRequestCount+=1}else j(Y,K,!1,ee,V,y,C);return X}(this,U,G,L,k,E)),B},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,L.writing||L.corked||L.bufferProcessing||!L.bufferedRequest||x(this,L))},p.prototype.setDefaultEncoding=function(L){if(typeof L=="string"&&(L=L.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((L+"").toLowerCase())>-1))throw new I(L);return this._writableState.defaultEncoding=L,this},Object.defineProperty(p.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),p.prototype._write=function(L,k,E){E(new w("_write()"))},p.prototype._writev=null,p.prototype.end=function(L,k,E){var g=this._writableState;return typeof L=="function"?(E=L,L=null,k=null):typeof k=="function"&&(E=k,k=null),L!=null&&this.write(L,k),g.corked&&(g.corked=1,this.uncork()),g.ending||function(U,B,G){B.ending=!0,O(U,B),G&&(B.finished?o.nextTick(G):U.once("finish",G)),B.ended=!0,U.writable=!1}(this,g,E),this},Object.defineProperty(p.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(L){this._writableState&&(this._writableState.destroyed=L)}}),p.prototype.destroy=_.destroy,p.prototype._undestroy=_.undestroy,p.prototype._destroy=function(L,k){k(L)}}).call(this,r(5),r(2))},function(e,t,r){e.exports=b;var n=r(23).codes,o=n.ERR_METHOD_NOT_IMPLEMENTED,l=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(24);function u(v,f){var S=this._transformState;S.transforming=!1;var w=S.writecb;if(w===null)return this.emit("error",new l);S.writechunk=null,S.writecb=null,f!=null&&this.push(f),w(v);var P=this._readableState;P.reading=!1,(P.needReadable||P.length<P.highWaterMark)&&this._read(P.highWaterMark)}function b(v){if(!(this instanceof b))return new b(v);c.call(this,v),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,v&&(typeof v.transform=="function"&&(this._transform=v.transform),typeof v.flush=="function"&&(this._flush=v.flush)),this.on("prefinish",A)}function A(){var v=this;typeof this._flush!="function"||this._readableState.destroyed?_(this,null,null):this._flush(function(f,S){_(v,f,S)})}function _(v,f,S){if(f)return v.emit("error",f);if(S!=null&&v.push(S),v._writableState.length)throw new i;if(v._transformState.transforming)throw new s;return v.push(null)}r(7)(b,c),b.prototype.push=function(v,f){return this._transformState.needTransform=!1,c.prototype.push.call(this,v,f)},b.prototype._transform=function(v,f,S){S(new o("_transform()"))},b.prototype._write=function(v,f,S){var w=this._transformState;if(w.writecb=S,w.writechunk=v,w.writeencoding=f,!w.transforming){var P=this._readableState;(w.needTransform||P.needReadable||P.length<P.highWaterMark)&&this._read(P.highWaterMark)}},b.prototype._read=function(v){var f=this._transformState;f.writechunk===null||f.transforming?f.needTransform=!0:(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform))},b.prototype._destroy=function(v,f){c.prototype._destroy.call(this,v,function(S){f(S)})}},function(e,t,r){(function(n){var o=r(189),l=r(83),s=r(191),i=r(192),c=r(46),u=t;u.request=function(b,A){b=typeof b=="string"?c.parse(b):s(b);var _=n.location.protocol.search(/^https?:$/)===-1?"http:":"",v=b.protocol||_,f=b.hostname||b.host,S=b.port,w=b.path||"/";f&&f.indexOf(":")!==-1&&(f="["+f+"]"),b.url=(f?v+"//"+f:"")+(S?":"+S:"")+w,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var P=new o(b);return A&&P.on("response",A),P},u.get=function(b,A){var _=u.request(b,A);return _.end(),_},u.ClientRequest=o,u.IncomingMessage=l.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=i,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(5))},function(e,t,r){(function(n){t.fetch=u(n.fetch)&&u(n.ReadableStream),t.writableStream=u(n.WritableStream),t.abortController=u(n.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch{}var o;function l(){if(o!==void 0)return o;if(n.XMLHttpRequest){o=new n.XMLHttpRequest;try{o.open("GET",n.XDomainRequest?"/":"https://example.com")}catch{o=null}}else o=null;return o}function s(b){var A=l();if(!A)return!1;try{return A.responseType=b,A.responseType===b}catch{}return!1}var i=n.ArrayBuffer!==void 0,c=i&&u(n.ArrayBuffer.prototype.slice);function u(b){return typeof b=="function"}t.arraybuffer=t.fetch||i&&s("arraybuffer"),t.msstream=!t.fetch&&c&&s("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&s("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!l()&&u(l().overrideMimeType),t.vbArray=u(n.VBArray),o=null}).call(this,r(5))},function(e,t,r){(function(n,o,l){var s=r(82),i=r(7),c=r(27),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},b=t.IncomingMessage=function(A,_,v,f){var S=this;if(c.Readable.call(S),S._mode=v,S.headers={},S.rawHeaders=[],S.trailers={},S.rawTrailers=[],S.on("end",function(){n.nextTick(function(){S.emit("close")})}),v==="fetch"){if(S._fetchResponse=_,S.url=_.url,S.statusCode=_.status,S.statusMessage=_.statusText,_.headers.forEach(function(R,d){S.headers[d.toLowerCase()]=R,S.rawHeaders.push(d,R)}),s.writableStream){var w=new WritableStream({write:function(R){return new Promise(function(d,I){S._destroyed?I():S.push(new o(R))?d():S._resumeFetch=d})},close:function(){l.clearTimeout(f),S._destroyed||S.push(null)},abort:function(R){S._destroyed||S.emit("error",R)}});try{return void _.body.pipeTo(w).catch(function(R){l.clearTimeout(f),S._destroyed||S.emit("error",R)})}catch{}}var P=_.body.getReader();(function R(){P.read().then(function(d){if(!S._destroyed){if(d.done)return l.clearTimeout(f),void S.push(null);S.push(new o(d.value)),R()}}).catch(function(d){l.clearTimeout(f),S._destroyed||S.emit("error",d)})})()}else if(S._xhr=A,S._pos=0,S.url=A.responseURL,S.statusCode=A.status,S.statusMessage=A.statusText,A.getAllResponseHeaders().split(/\r?\n/).forEach(function(R){var d=R.match(/^([^:]+):\s*(.*)/);if(d){var I=d[1].toLowerCase();I==="set-cookie"?(S.headers[I]===void 0&&(S.headers[I]=[]),S.headers[I].push(d[2])):S.headers[I]!==void 0?S.headers[I]+=", "+d[2]:S.headers[I]=d[2],S.rawHeaders.push(d[1],d[2])}}),S._charset="x-user-defined",!s.overrideMimeType){var N=S.rawHeaders["mime-type"];if(N){var T=N.match(/;\s*charset=([^;])(;|$)/);T&&(S._charset=T[1].toLowerCase())}S._charset||(S._charset="utf-8")}};i(b,c.Readable),b.prototype._read=function(){var A=this._resumeFetch;A&&(this._resumeFetch=null,A())},b.prototype._onXHRProgress=function(){var A=this,_=A._xhr,v=null;switch(A._mode){case"text:vbarray":if(_.readyState!==u.DONE)break;try{v=new l.VBArray(_.responseBody).toArray()}catch{}if(v!==null){A.push(new o(v));break}case"text":try{v=_.responseText}catch{A._mode="text:vbarray";break}if(v.length>A._pos){var f=v.substr(A._pos);if(A._charset==="x-user-defined"){for(var S=new o(f.length),w=0;w<f.length;w++)S[w]=255&f.charCodeAt(w);A.push(S)}else A.push(f,A._charset);A._pos=v.length}break;case"arraybuffer":if(_.readyState!==u.DONE||!_.response)break;v=_.response,A.push(new o(new Uint8Array(v)));break;case"moz-chunked-arraybuffer":if(v=_.response,_.readyState!==u.LOADING||!v)break;A.push(new o(new Uint8Array(v)));break;case"ms-stream":if(v=_.response,_.readyState!==u.LOADING)break;var P=new l.MSStreamReader;P.onprogress=function(){P.result.byteLength>A._pos&&(A.push(new o(new Uint8Array(P.result.slice(A._pos)))),A._pos=P.result.byteLength)},P.onload=function(){A.push(null)},P.readAsArrayBuffer(v)}A._xhr.readyState===u.DONE&&A._mode!=="ms-stream"&&A.push(null)}}).call(this,r(2),r(4).Buffer,r(5))},function(e,t,r){const n=o=>o!==null&&typeof o=="object"&&typeof o.pipe=="function";n.writable=o=>n(o)&&o.writable!==!1&&typeof o._write=="function"&&typeof o._writableState=="object",n.readable=o=>n(o)&&o.readable!==!1&&typeof o._read=="function"&&typeof o._readableState=="object",n.duplex=o=>n.writable(o)&&n.readable(o),n.transform=o=>n.duplex(o)&&typeof o._transform=="function"&&typeof o._transformState=="object",e.exports=n},function(e,t,r){function n(S){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(S)}function o(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function l(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),w&&s(S,w)}function s(S,w){return(s=Object.setPrototypeOf||function(P,N){return P.__proto__=N,P})(S,w)}function i(S){var w=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var P,N=u(S);if(w){var T=u(this).constructor;P=Reflect.construct(N,arguments,T)}else P=N.apply(this,arguments);return c(this,P)}}function c(S,w){return!w||n(w)!=="object"&&typeof w!="function"?function(P){if(P===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P}(S):w}function u(S){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)})(S)}var b=r(3).LEVEL,A=r(47),_=r(201),v=r(33)("winston:create-logger");function f(S){return"is"+S.charAt(0).toUpperCase()+S.slice(1)+"Enabled"}e.exports=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};S.levels=S.levels||A.npm.levels;var w=function(N){l(R,N);var T=i(R);function R(d){return o(this,R),T.call(this,d)}return R}(_),P=new w(S);return Object.keys(S.levels).forEach(function(N){v('Define prototype method for "%s"',N),N!=="log"?(w.prototype[N]=function(){for(var T=this||P,R=arguments.length,d=new Array(R),I=0;I<R;I++)d[I]=arguments[I];if(d.length===1){var Q=d[0],Z=Q&&Q.message&&Q||{message:Q};return Z.level=Z[b]=N,T._addDefaultMeta(Z),T.write(Z),this||P}return d.length===0?(T.log(N,""),T):T.log.apply(T,[N].concat(d))},w.prototype[f(N)]=function(){return(this||P).isLevelEnabled(N)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')}),P}},function(e,t,r){(function(n){function o(A,_){for(var v=0;v<_.length;v++){var f=_[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(A,f.key,f)}}var l=r(15),s=r(48),i=r(33)("winston:exception"),c=r(87),u=r(88),b=r(89);e.exports=function(){function A(f){if(function(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}(this,A),!f)throw new Error("Logger is required to handle exceptions");this.logger=f,this.handlers=new Map}var _,v;return _=A,(v=[{key:"handle",value:function(){for(var f=this,S=arguments.length,w=new Array(S),P=0;P<S;P++)w[P]=arguments[P];w.forEach(function(N){if(Array.isArray(N))return N.forEach(function(T){return f._addHandler(T)});f._addHandler(N)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),n.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var f=this;this.catcher&&(n.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(function(S){return f.logger.unpipe(S)}))}},{key:"getAllInfo",value:function(f){var S=f.message;return S||typeof f!="string"||(S=f),{error:f,level:"error",message:["uncaughtException: ".concat(S||"(no error message)"),f.stack||" No stack trace"].join(`
|
|
26
26
|
`),stack:f.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(f)}}},{key:"getProcessInfo",value:function(){return{pid:n.pid,uid:n.getuid?n.getuid():null,gid:n.getgid?n.getgid():null,cwd:n.cwd(),execPath:n.execPath,version:n.version,argv:n.argv,memoryUsage:n.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:l.loadavg(),uptime:l.uptime()}}},{key:"getTrace",value:function(f){return(f?u.parse(f):u.get()).map(function(S){return{column:S.getColumnNumber(),file:S.getFileName(),function:S.getFunctionName(),line:S.getLineNumber(),method:S.getMethodName(),native:S.isNative()}})}},{key:"_addHandler",value:function(f){if(!this.handlers.has(f)){f.handleExceptions=!0;var S=new b(f);this.handlers.set(f,S),this.logger.pipe(S)}}},{key:"_uncaughtException",value:function(f){var S,w=this.getAllInfo(f),P=this._getExceptionHandlers(),N=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(f):this.logger.exitOnError;function T(){i("doExit",N),i("process._exiting",n._exiting),N&&!n._exiting&&(S&&clearTimeout(S),n.exit(1))}if(!P.length&&N&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),N=!1),!P||P.length===0)return n.nextTick(T);s(P,function(R,d){var I=c(d),Q=R.transport||R;function Z(h){return function(){i(h),I()}}Q._ending=!0,Q.once("finish",Z("finished")),Q.once("error",Z("error"))},function(){return N&&T()}),this.logger.log(w),N&&(S=setTimeout(T,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter(function(f){return(f.transport||f).handleExceptions})}}])&&o(_.prototype,v),A}()}).call(this,r(2))},function(e,t,r){var n=r(204);e.exports=function(o){var l,s=0;function i(){return s||(s=1,l=o.apply(this,arguments),o=null),l}return i.displayName=n(o),i}},function(e,t){function r(n){for(var o in n)this[o]=n[o]}t.get=function(n){var o=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var l={},s=Error.prepareStackTrace;Error.prepareStackTrace=function(c,u){return u},Error.captureStackTrace(l,n||t.get);var i=l.stack;return Error.prepareStackTrace=s,Error.stackTraceLimit=o,i},t.parse=function(n){if(!n.stack)return[];var o=this;return n.stack.split(`
|
|
27
27
|
`).slice(1).map(function(l){if(l.match(/^\s*[-]{4,}$/))return o._createParsedCallSite({fileName:l,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var s=l.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(s){var i=null,c=null,u=null,b=null,A=null,_=s[5]==="native";if(s[1]){var v=(u=s[1]).lastIndexOf(".");if(u[v-1]=="."&&v--,v>0){i=u.substr(0,v),c=u.substr(v+1);var f=i.indexOf(".Module");f>0&&(u=u.substr(f+1),i=i.substr(0,f))}b=null}c&&(b=i,A=c),c==="<anonymous>"&&(A=null,u=null);var S={fileName:s[2]||null,lineNumber:parseInt(s[3],10)||null,functionName:u,typeName:b,methodName:A,columnNumber:parseInt(s[4],10)||null,native:_};return o._createParsedCallSite(S)}}).filter(function(l){return!!l})},["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach(function(n){r.prototype[n]=null,r.prototype["get"+n[0].toUpperCase()+n.substr(1)]=function(){return this[n]}}),["topLevel","eval","native","constructor"].forEach(function(n){r.prototype[n]=!1,r.prototype["is"+n[0].toUpperCase()+n.substr(1)]=function(){return this[n]}}),t._createParsedCallSite=function(n){return new r(n)}},function(e,t,r){function n(b){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(b)}function o(b,A){for(var _=0;_<A.length;_++){var v=A[_];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(b,v.key,v)}}function l(b,A){return(l=Object.setPrototypeOf||function(_,v){return _.__proto__=v,_})(b,A)}function s(b){var A=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var _,v=c(b);if(A){var f=c(this).constructor;_=Reflect.construct(v,arguments,f)}else _=v.apply(this,arguments);return i(this,_)}}function i(b,A){return!A||n(A)!=="object"&&typeof A!="function"?function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(b):A}function c(b){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(b)}var u=r(28).Writable;e.exports=function(b){(function(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),w&&l(S,w)})(f,b);var A,_,v=s(f);function f(S){var w;if(function(P,N){if(!(P instanceof N))throw new TypeError("Cannot call a class as a function")}(this,f),w=v.call(this,{objectMode:!0}),!S)throw new Error("ExceptionStream requires a TransportStream instance.");return w.handleExceptions=!0,w.transport=S,w}return A=f,(_=[{key:"_write",value:function(S,w,P){return S.exception?this.transport.log(S,P):(P(),!0)}}])&&o(A.prototype,_),f}(u)},function(e,t,r){(function(n){function o(A,_){for(var v=0;v<_.length;v++){var f=_[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(A,f.key,f)}}var l=r(15),s=r(48),i=r(33)("winston:rejection"),c=r(87),u=r(88),b=r(89);e.exports=function(){function A(f){if(function(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}(this,A),!f)throw new Error("Logger is required to handle rejections");this.logger=f,this.handlers=new Map}var _,v;return _=A,(v=[{key:"handle",value:function(){for(var f=this,S=arguments.length,w=new Array(S),P=0;P<S;P++)w[P]=arguments[P];w.forEach(function(N){if(Array.isArray(N))return N.forEach(function(T){return f._addHandler(T)});f._addHandler(N)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),n.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var f=this;this.catcher&&(n.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(function(S){return f.logger.unpipe(S)}))}},{key:"getAllInfo",value:function(f){var S=f.message;return S||typeof f!="string"||(S=f),{error:f,level:"error",message:["unhandledRejection: ".concat(S||"(no error message)"),f.stack||" No stack trace"].join(`
|
|
28
28
|
`),stack:f.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(f)}}},{key:"getProcessInfo",value:function(){return{pid:n.pid,uid:n.getuid?n.getuid():null,gid:n.getgid?n.getgid():null,cwd:n.cwd(),execPath:n.execPath,version:n.version,argv:n.argv,memoryUsage:n.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:l.loadavg(),uptime:l.uptime()}}},{key:"getTrace",value:function(f){return(f?u.parse(f):u.get()).map(function(S){return{column:S.getColumnNumber(),file:S.getFileName(),function:S.getFunctionName(),line:S.getLineNumber(),method:S.getMethodName(),native:S.isNative()}})}},{key:"_addHandler",value:function(f){if(!this.handlers.has(f)){f.handleRejections=!0;var S=new b(f);this.handlers.set(f,S),this.logger.pipe(S)}}},{key:"_unhandledRejection",value:function(f){var S,w=this.getAllInfo(f),P=this._getRejectionHandlers(),N=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(f):this.logger.exitOnError;function T(){i("doExit",N),i("process._exiting",n._exiting),N&&!n._exiting&&(S&&clearTimeout(S),n.exit(1))}if(!P.length&&N&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),N=!1),!P||P.length===0)return n.nextTick(T);s(P,function(R,d){var I=c(d),Q=R.transport||R;function Z(h){return function(){i(h),I()}}Q._ending=!0,Q.once("finish",Z("finished")),Q.once("error",Z("error"))},function(){return N&&T()}),this.logger.log(w),N&&(S=setTimeout(T,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter(function(f){return(f.transport||f).handleRejections})}}])&&o(_.prototype,v),A}()}).call(this,r(2))},function(e,t,r){const n=r(50);e.exports=function(o){const l=n(o);if(l<0)throw new Error("should be a positive integer");return l}},function(e,t,r){const n=r(46).URL,o=r(34);e.exports=function(l){const s=o(l);try{return new n(s)}catch{throw new Error("should be a valid URL")}}},function(e,t,r){const n={};n.web=r(21),r(94);const o={v1:{}};o.v1.signaling={},o.v1.signaling.api=r(8),o.v1.signaling.api.SignalingClient=function(_,v,f){f||(f={}),f.format="text",this.client_=new n.web.GrpcWebClientBase(f),this.hostname_=_},o.v1.signaling.api.SignalingPromiseClient=function(_,v,f){f||(f={}),f.format="text",this.client_=new n.web.GrpcWebClientBase(f),this.hostname_=_};const l=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/CreatePeer",n.web.MethodType.UNARY,o.v1.signaling.api.CreatePeerRequest,o.v1.signaling.api.CreatePeerResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.CreatePeerResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.CreatePeerResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.CreatePeerResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.createPeer=function(_,v,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",_,v||{},l,f)},o.v1.signaling.api.SignalingPromiseClient.prototype.createPeer=function(_,v){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/CreatePeer",_,v||{},l)};const s=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/DeletePeer",n.web.MethodType.UNARY,o.v1.signaling.api.DeletePeerRequest,o.v1.signaling.api.DeletePeerResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.DeletePeerResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.DeletePeerResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.DeletePeerResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.deletePeer=function(_,v,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",_,v||{},s,f)},o.v1.signaling.api.SignalingPromiseClient.prototype.deletePeer=function(_,v){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/DeletePeer",_,v||{},s)};const i=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/RefreshPeer",n.web.MethodType.UNARY,o.v1.signaling.api.RefreshPeerRequest,o.v1.signaling.api.RefreshPeerResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.RefreshPeerResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.RefreshPeerResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.RefreshPeerResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.refreshPeer=function(_,v,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",_,v||{},i,f)},o.v1.signaling.api.SignalingPromiseClient.prototype.refreshPeer=function(_,v){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/RefreshPeer",_,v||{},i)};const c=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/GetPeers",n.web.MethodType.UNARY,o.v1.signaling.api.GetPeersRequest,o.v1.signaling.api.GetPeersResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.GetPeersResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.GetPeersResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.GetPeersResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.getPeers=function(_,v,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",_,v||{},c,f)},o.v1.signaling.api.SignalingPromiseClient.prototype.getPeers=function(_,v){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetPeers",_,v||{},c)};const u=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/GetIceServers",n.web.MethodType.UNARY,o.v1.signaling.api.GetIceServersRequest,o.v1.signaling.api.GetIceServersResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.GetIceServersResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.GetIceServersResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.GetIceServersResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.getIceServers=function(_,v,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",_,v||{},u,f)},o.v1.signaling.api.SignalingPromiseClient.prototype.getIceServers=function(_,v){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/GetIceServers",_,v||{},u)};const b=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/SendSignal",n.web.MethodType.UNARY,o.v1.signaling.api.SendSignalRequest,o.v1.signaling.api.SendSignalResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.SendSignalResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.SendSignalResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.SendSignalResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.sendSignal=function(_,v,f){return this.client_.rpcCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",_,v||{},b,f)},o.v1.signaling.api.SignalingPromiseClient.prototype.sendSignal=function(_,v){return this.client_.unaryCall(this.hostname_+"/v1.signaling.api.Signaling/SendSignal",_,v||{},b)};const A=new n.web.MethodDescriptor("/v1.signaling.api.Signaling/ReceiveSignalStream",n.web.MethodType.SERVER_STREAMING,o.v1.signaling.api.ReceiveSignalStreamRequest,o.v1.signaling.api.ReceiveSignalStreamResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary);new n.web.AbstractClientBase.MethodInfo(o.v1.signaling.api.ReceiveSignalStreamResponse,function(_){return _.serializeBinary()},o.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary),o.v1.signaling.api.SignalingClient.prototype.receiveSignalStream=function(_,v){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",_,v||{},A)},o.v1.signaling.api.SignalingPromiseClient.prototype.receiveSignalStream=function(_,v){return this.client_.serverStreaming(this.hostname_+"/v1.signaling.api.Signaling/ReceiveSignalStream",_,v||{},A)},e.exports=o.v1.signaling.api},function(e,t,r){var n=r(95),o=n,l=Function("return this")();o.exportSymbol("proto.google.protobuf.BoolValue",null,l),o.exportSymbol("proto.google.protobuf.BytesValue",null,l),o.exportSymbol("proto.google.protobuf.DoubleValue",null,l),o.exportSymbol("proto.google.protobuf.FloatValue",null,l),o.exportSymbol("proto.google.protobuf.Int32Value",null,l),o.exportSymbol("proto.google.protobuf.Int64Value",null,l),o.exportSymbol("proto.google.protobuf.StringValue",null,l),o.exportSymbol("proto.google.protobuf.UInt32Value",null,l),o.exportSymbol("proto.google.protobuf.UInt64Value",null,l),proto.google.protobuf.DoubleValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.DoubleValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.DoubleValue.displayName="proto.google.protobuf.DoubleValue"),proto.google.protobuf.FloatValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.FloatValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.FloatValue.displayName="proto.google.protobuf.FloatValue"),proto.google.protobuf.Int64Value=function(s){n.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.Int64Value,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Int64Value.displayName="proto.google.protobuf.Int64Value"),proto.google.protobuf.UInt64Value=function(s){n.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.UInt64Value,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt64Value.displayName="proto.google.protobuf.UInt64Value"),proto.google.protobuf.Int32Value=function(s){n.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.Int32Value,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Int32Value.displayName="proto.google.protobuf.Int32Value"),proto.google.protobuf.UInt32Value=function(s){n.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.UInt32Value,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.UInt32Value.displayName="proto.google.protobuf.UInt32Value"),proto.google.protobuf.BoolValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.BoolValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.BoolValue.displayName="proto.google.protobuf.BoolValue"),proto.google.protobuf.StringValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.StringValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.StringValue.displayName="proto.google.protobuf.StringValue"),proto.google.protobuf.BytesValue=function(s){n.Message.initialize(this,s,0,-1,null,null)},o.inherits(proto.google.protobuf.BytesValue,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.BytesValue.displayName="proto.google.protobuf.BytesValue"),n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.DoubleValue.prototype.toObject=function(s){return proto.google.protobuf.DoubleValue.toObject(s,this)},proto.google.protobuf.DoubleValue.toObject=function(s,i){var c={value:n.Message.getFloatingPointFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.DoubleValue.deserializeBinary=function(s){var i=new n.BinaryReader(s),c=new proto.google.protobuf.DoubleValue;return proto.google.protobuf.DoubleValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.DoubleValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readDouble();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.DoubleValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.DoubleValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.DoubleValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeDouble(1,c)},proto.google.protobuf.DoubleValue.prototype.getValue=function(){return n.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.DoubleValue.prototype.setValue=function(s){return n.Message.setProto3FloatField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.FloatValue.prototype.toObject=function(s){return proto.google.protobuf.FloatValue.toObject(s,this)},proto.google.protobuf.FloatValue.toObject=function(s,i){var c={value:n.Message.getFloatingPointFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.FloatValue.deserializeBinary=function(s){var i=new n.BinaryReader(s),c=new proto.google.protobuf.FloatValue;return proto.google.protobuf.FloatValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.FloatValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readFloat();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.FloatValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.FloatValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.FloatValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeFloat(1,c)},proto.google.protobuf.FloatValue.prototype.getValue=function(){return n.Message.getFloatingPointFieldWithDefault(this,1,0)},proto.google.protobuf.FloatValue.prototype.setValue=function(s){return n.Message.setProto3FloatField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int64Value.prototype.toObject=function(s){return proto.google.protobuf.Int64Value.toObject(s,this)},proto.google.protobuf.Int64Value.toObject=function(s,i){var c={value:n.Message.getFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.Int64Value.deserializeBinary=function(s){var i=new n.BinaryReader(s),c=new proto.google.protobuf.Int64Value;return proto.google.protobuf.Int64Value.deserializeBinaryFromReader(c,i)},proto.google.protobuf.Int64Value.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readInt64();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.Int64Value.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.Int64Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.Int64Value.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeInt64(1,c)},proto.google.protobuf.Int64Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int64Value.prototype.setValue=function(s){return n.Message.setProto3IntField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt64Value.prototype.toObject=function(s){return proto.google.protobuf.UInt64Value.toObject(s,this)},proto.google.protobuf.UInt64Value.toObject=function(s,i){var c={value:n.Message.getFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.UInt64Value.deserializeBinary=function(s){var i=new n.BinaryReader(s),c=new proto.google.protobuf.UInt64Value;return proto.google.protobuf.UInt64Value.deserializeBinaryFromReader(c,i)},proto.google.protobuf.UInt64Value.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readUint64();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.UInt64Value.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.UInt64Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.UInt64Value.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeUint64(1,c)},proto.google.protobuf.UInt64Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt64Value.prototype.setValue=function(s){return n.Message.setProto3IntField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Int32Value.prototype.toObject=function(s){return proto.google.protobuf.Int32Value.toObject(s,this)},proto.google.protobuf.Int32Value.toObject=function(s,i){var c={value:n.Message.getFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.Int32Value.deserializeBinary=function(s){var i=new n.BinaryReader(s),c=new proto.google.protobuf.Int32Value;return proto.google.protobuf.Int32Value.deserializeBinaryFromReader(c,i)},proto.google.protobuf.Int32Value.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readInt32();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.Int32Value.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.Int32Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.Int32Value.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeInt32(1,c)},proto.google.protobuf.Int32Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.Int32Value.prototype.setValue=function(s){return n.Message.setProto3IntField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.UInt32Value.prototype.toObject=function(s){return proto.google.protobuf.UInt32Value.toObject(s,this)},proto.google.protobuf.UInt32Value.toObject=function(s,i){var c={value:n.Message.getFieldWithDefault(i,1,0)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.UInt32Value.deserializeBinary=function(s){var i=new n.BinaryReader(s),c=new proto.google.protobuf.UInt32Value;return proto.google.protobuf.UInt32Value.deserializeBinaryFromReader(c,i)},proto.google.protobuf.UInt32Value.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readUint32();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.UInt32Value.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.UInt32Value.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.UInt32Value.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())!==0&&i.writeUint32(1,c)},proto.google.protobuf.UInt32Value.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,0)},proto.google.protobuf.UInt32Value.prototype.setValue=function(s){return n.Message.setProto3IntField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BoolValue.prototype.toObject=function(s){return proto.google.protobuf.BoolValue.toObject(s,this)},proto.google.protobuf.BoolValue.toObject=function(s,i){var c={value:n.Message.getBooleanFieldWithDefault(i,1,!1)};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.BoolValue.deserializeBinary=function(s){var i=new n.BinaryReader(s),c=new proto.google.protobuf.BoolValue;return proto.google.protobuf.BoolValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.BoolValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readBool();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.BoolValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.BoolValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.BoolValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue())&&i.writeBool(1,c)},proto.google.protobuf.BoolValue.prototype.getValue=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},proto.google.protobuf.BoolValue.prototype.setValue=function(s){return n.Message.setProto3BooleanField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.StringValue.prototype.toObject=function(s){return proto.google.protobuf.StringValue.toObject(s,this)},proto.google.protobuf.StringValue.toObject=function(s,i){var c={value:n.Message.getFieldWithDefault(i,1,"")};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.StringValue.deserializeBinary=function(s){var i=new n.BinaryReader(s),c=new proto.google.protobuf.StringValue;return proto.google.protobuf.StringValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.StringValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readString();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.StringValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.StringValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.StringValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue()).length>0&&i.writeString(1,c)},proto.google.protobuf.StringValue.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.StringValue.prototype.setValue=function(s){return n.Message.setProto3StringField(this,1,s)},n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.BytesValue.prototype.toObject=function(s){return proto.google.protobuf.BytesValue.toObject(s,this)},proto.google.protobuf.BytesValue.toObject=function(s,i){var c={value:i.getValue_asB64()};return s&&(c.$jspbMessageInstance=i),c}),proto.google.protobuf.BytesValue.deserializeBinary=function(s){var i=new n.BinaryReader(s),c=new proto.google.protobuf.BytesValue;return proto.google.protobuf.BytesValue.deserializeBinaryFromReader(c,i)},proto.google.protobuf.BytesValue.deserializeBinaryFromReader=function(s,i){for(;i.nextField()&&!i.isEndGroup();)switch(i.getFieldNumber()){case 1:var c=i.readBytes();s.setValue(c);break;default:i.skipField()}return s},proto.google.protobuf.BytesValue.prototype.serializeBinary=function(){var s=new n.BinaryWriter;return proto.google.protobuf.BytesValue.serializeBinaryToWriter(this,s),s.getResultBuffer()},proto.google.protobuf.BytesValue.serializeBinaryToWriter=function(s,i){var c;(c=s.getValue_asU8()).length>0&&i.writeBytes(1,c)},proto.google.protobuf.BytesValue.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.BytesValue.prototype.getValue_asB64=function(){return n.Message.bytesAsB64(this.getValue())},proto.google.protobuf.BytesValue.prototype.getValue_asU8=function(){return n.Message.bytesAsU8(this.getValue())},proto.google.protobuf.BytesValue.prototype.setValue=function(s){return n.Message.setProto3BytesField(this,1,s)},o.object.extend(t,proto.google.protobuf)},function(module,exports,__webpack_require__){(function(global,Buffer){var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(e,t,r){e instanceof String&&(e=String(e));for(var n=e.length,o=0;o<n;o++){var l=e[o];if(t.call(r,l,o,e))return{i:o,v:l}}return{i:-1,v:void 0}},$jscomp.ASSUME_ES5=!1,$jscomp.ASSUME_NO_NATIVE_MAP=!1,$jscomp.ASSUME_NO_NATIVE_SET=!1,$jscomp.SIMPLE_FROUND_POLYFILL=!1,$jscomp.defineProperty=$jscomp.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},$jscomp.getGlobal=function(e){return typeof window!="undefined"&&window===e?e:global!==void 0&&global!=null?global:e},$jscomp.global=$jscomp.getGlobal(this),$jscomp.polyfill=function(e,t,r,n){if(t){for(r=$jscomp.global,e=e.split("."),n=0;n<e.length-1;n++){var o=e[n];o in r||(r[o]={}),r=r[o]}(t=t(n=r[e=e[e.length-1]]))!=n&&t!=null&&$jscomp.defineProperty(r,e,{configurable:!0,writable:!0,value:t})}},$jscomp.polyfill("Array.prototype.findIndex",function(e){return e||function(t,r){return $jscomp.findInternal(this,t,r).i}},"es6","es3"),$jscomp.checkStringArgs=function(e,t,r){if(e==null)throw new TypeError("The 'this' value for String.prototype."+r+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+r+" must not be a regular expression");return e+""},$jscomp.polyfill("String.prototype.endsWith",function(e){return e||function(t,r){var n=$jscomp.checkStringArgs(this,t,"endsWith");t+="",r===void 0&&(r=n.length),r=Math.max(0,Math.min(0|r,n.length));for(var o=t.length;0<o&&0<r;)if(n[--r]!=t[--o])return!1;return 0>=o}},"es6","es3"),$jscomp.polyfill("Array.prototype.find",function(e){return e||function(t,r){return $jscomp.findInternal(this,t,r).v}},"es6","es3"),$jscomp.polyfill("String.prototype.startsWith",function(e){return e||function(t,r){var n=$jscomp.checkStringArgs(this,t,"startsWith");t+="";var o=n.length,l=t.length;r=Math.max(0,Math.min(0|r,n.length));for(var s=0;s<l&&r<o;)if(n[r++]!=t[s++])return!1;return s>=l}},"es6","es3"),$jscomp.polyfill("String.prototype.repeat",function(e){return e||function(t){var r=$jscomp.checkStringArgs(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var n="";t;)1&t&&(n+=r),(t>>>=1)&&(r+=r);return n}},"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.isDef=function(e){return e!==void 0},goog.isString=function(e){return typeof e=="string"},goog.isBoolean=function(e){return typeof e=="boolean"},goog.isNumber=function(e){return typeof e=="number"},goog.exportPath_=function(e,t,r){e=e.split("."),r=r||goog.global,e[0]in r||r.execScript===void 0||r.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(t)?r[n]=t:r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}},goog.define=function(e,t){return t},goog.FEATURESET_YEAR=2012,goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(goog.cspNonce_===null&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||e.search(goog.VALID_MODULE_RE_)==-1)throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=e},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&typeof e.getCurrentModulePath=="function"&&!!e.getCurrentModulePath()},goog.module.declareLegacyNamespace=function(){goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||typeof t.getCurrentModulePath!="function")throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},goog.getObjectByName=function(e,t){e=e.split("."),t=t||goog.global;for(var r=0;r<e.length;r++)if(t=t[e[r]],!goog.isDefAndNotNull(t))return null;return t},goog.globalize=function(e,t){for(var r in t=t||goog.global,e)t[r]=e[r]},goog.addDependency=function(e,t,r,n){},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(e){},goog.requireType=function(e){return{}},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.instance_=void 0,e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!COMPILED,goog.TRANSPILE="detect",goog.ASSUME_ES_MODULES_TRANSPILED=!1,goog.TRANSPILE_TO_LANGUAGE="",goog.TRANSPILER="transpile.js",goog.hasBadLetScoping=null,goog.useSafari10Workaround=function(){if(goog.hasBadLetScoping==null){try{var a=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(e){a=!1}goog.hasBadLetScoping=a}return goog.hasBadLetScoping},goog.workaroundSafari10EvalBug=function(e){return"(function(){"+e+`
|
|
@@ -31,14 +31,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
31
31
|
//# sourceURL=`+l)}.call(goog.global),goog.global.$gwtExport&&goog.global.$gwtExport.$jscomp&&!goog.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(goog.global.$gwtExport));goog.global.$jscomp.transpile=goog.global.$gwtExport.$jscomp.transpile,o=(n=goog.global.$jscomp).transpile}}return o||(o=n.transpile=function(i,c){return goog.logToConsole_(c+" requires transpilation but no transpiler was found."),i}),o(e,t,r)},goog.typeOf=function(e){var t=typeof e;if(t=="object"){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var r=Object.prototype.toString.call(e);if(r=="[object Window]")return"object";if(r=="[object Array]"||typeof e.length=="number"&&e.splice!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable("splice"))return"array";if(r=="[object Function]"||e.call!==void 0&&e.propertyIsEnumerable!==void 0&&!e.propertyIsEnumerable("call"))return"function"}else if(t=="function"&&e.call===void 0)return"object";return t},goog.isNull=function(e){return e===null},goog.isDefAndNotNull=function(e){return e!=null},goog.isArray=function(e){return goog.typeOf(e)=="array"},goog.isArrayLike=function(e){var t=goog.typeOf(e);return t=="array"||t=="object"&&typeof e.length=="number"},goog.isDateLike=function(e){return goog.isObject(e)&&typeof e.getFullYear=="function"},goog.isFunction=function(e){return goog.typeOf(e)=="function"},goog.isObject=function(e){var t=typeof e;return t=="object"&&e!=null||t=="function"},goog.getUid=function(e){return e[goog.UID_PROPERTY_]||(e[goog.UID_PROPERTY_]=++goog.uidCounter_)},goog.hasUid=function(e){return!!e[goog.UID_PROPERTY_]},goog.removeUid=function(e){e!==null&&"removeAttribute"in e&&e.removeAttribute(goog.UID_PROPERTY_);try{delete e[goog.UID_PROPERTY_]}catch{}},goog.UID_PROPERTY_="closure_uid_"+(1e9*Math.random()>>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if(t=="object"||t=="array"){if(typeof e.clone=="function")return e.clone();for(var r in t=t=="array"?[]:{},e)t[r]=goog.cloneObject(e[r]);return t}return e},goog.bindNative_=function(e,t,r){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,r){if(!e)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var o=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(o,n),e.apply(t,o)}}return function(){return e.apply(t,arguments)}},goog.bind=function(e,t,r){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_,goog.bind.apply(null,arguments)},goog.partial=function(e,t){var r=Array.prototype.slice.call(arguments,1);return function(){var n=r.slice();return n.push.apply(n,arguments),e.apply(this,n)}},goog.mixin=function(e,t){for(var r in t)e[r]=t[r]},goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date},goog.globalEval=function(e){if(goog.global.execScript)goog.global.execScript(e,"JavaScript");else{if(!goog.global.eval)throw Error("goog.globalEval not available");if(goog.evalWorksForGlobals_==null){try{goog.global.eval("var _evalTest_ = 1;")}catch{}if(goog.global._evalTest_!==void 0){try{delete goog.global._evalTest_}catch{}goog.evalWorksForGlobals_=!0}else goog.evalWorksForGlobals_=!1}if(goog.evalWorksForGlobals_)goog.global.eval(e);else{var t=goog.global.document,r=t.createElement("SCRIPT");r.type="text/javascript",r.defer=!1,r.appendChild(t.createTextNode(e)),t.head.appendChild(r),t.head.removeChild(r)}}},goog.evalWorksForGlobals_=null,goog.getCssName=function(e,t){if(String(e).charAt(0)==".")throw Error('className passed in goog.getCssName must not start with ".". You passed: '+e);var r=function(o){return goog.cssNameMapping_[o]||o},n=function(o){o=o.split("-");for(var l=[],s=0;s<o.length;s++)l.push(r(o[s]));return l.join("-")};return n=goog.cssNameMapping_?goog.cssNameMappingStyle_=="BY_WHOLE"?r:n:function(o){return o},e=t?e+"-"+n(t):n(e),goog.global.CLOSURE_CSS_NAME_MAP_FN?goog.global.CLOSURE_CSS_NAME_MAP_FN(e):e},goog.setCssNameMapping=function(e,t){goog.cssNameMapping_=e,goog.cssNameMappingStyle_=t},goog.getMsg=function(e,t,r){return r&&r.html&&(e=e.replace(/</g,"<")),t&&(e=e.replace(/\{\$([^}]+)}/g,function(n,o){return t!=null&&o in t?t[o]:n})),e},goog.getMsgWithFallback=function(e,t){return e},goog.exportSymbol=function(e,t,r){goog.exportPath_(e,t,r)},goog.exportProperty=function(e,t,r){e[t]=r},goog.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.base=function(n,o,l){for(var s=Array(arguments.length-2),i=2;i<arguments.length;i++)s[i-2]=arguments[i];return t.prototype[o].apply(n,s)}},goog.base=function(e,t,r){var n=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!n)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(n.superClass_!==void 0){for(var o=Array(arguments.length-1),l=1;l<arguments.length;l++)o[l-1]=arguments[l];return n.superClass_.constructor.apply(e,o)}if(typeof t!="string"&&typeof t!="symbol")throw Error("method names provided to goog.base must be a string or a symbol");for(o=Array(arguments.length-2),l=2;l<arguments.length;l++)o[l-2]=arguments[l];l=!1;for(var s=e.constructor.prototype;s;s=Object.getPrototypeOf(s))if(s[t]===n)l=!0;else if(l)return s[t].apply(e,o);if(e[t]===n)return e.constructor.prototype[t].apply(e,o);throw Error("goog.base called from a method of one name to a method of a different name")},goog.scope=function(e){if(goog.isInModuleLoader_())throw Error("goog.scope is not supported within a module.");e.call(goog.global)},goog.defineClass=function(e,t){var r=t.constructor,n=t.statics;return r&&r!=Object.prototype.constructor||(r=function(){throw Error("cannot instantiate an interface (no constructor defined).")}),r=goog.defineClass.createSealingConstructor_(r,e),e&&goog.inherits(r,e),delete t.constructor,delete t.statics,goog.defineClass.applyProperties_(r.prototype,t),n!=null&&(n instanceof Function?n(r):goog.defineClass.applyProperties_(r,n)),r},goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG,goog.defineClass.createSealingConstructor_=function(e,t){if(!goog.defineClass.SEAL_CLASS_INSTANCES)return e;var r=!goog.defineClass.isUnsealable_(t),n=function(){var o=e.apply(this,arguments)||this;return o[goog.UID_PROPERTY_]=o[goog.UID_PROPERTY_],this.constructor===n&&r&&Object.seal instanceof Function&&Object.seal(o),o};return n},goog.defineClass.isUnsealable_=function(e){return e&&e.prototype&&e.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]},goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.defineClass.applyProperties_=function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);for(var n=0;n<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;n++)r=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[n],Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},goog.tagUnsealableClass=function(e){},goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable",goog.TRUSTED_TYPES_POLICY_NAME="",goog.identity_=function(e){return e},goog.createTrustedTypesPolicy=function(e){var t=null;if(typeof TrustedTypes=="undefined"||!TrustedTypes.createPolicy)return t;try{t=TrustedTypes.createPolicy(e,{createHTML:goog.identity_,createScript:goog.identity_,createScriptURL:goog.identity_,createURL:goog.identity_})}catch(r){goog.logToConsole_(r.message)}return t},goog.TRUSTED_TYPES_POLICY_=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#base"):null;var jspb={BinaryConstants:{},ConstBinaryMessage:function(){},BinaryMessage:function(){}};jspb.BinaryConstants.FieldType={INVALID:-1,DOUBLE:1,FLOAT:2,INT64:3,UINT64:4,INT32:5,FIXED64:6,FIXED32:7,BOOL:8,STRING:9,GROUP:10,MESSAGE:11,BYTES:12,UINT32:13,ENUM:14,SFIXED32:15,SFIXED64:16,SINT32:17,SINT64:18,FHASH64:30,VHASH64:31},jspb.BinaryConstants.WireType={INVALID:-1,VARINT:0,FIXED64:1,DELIMITED:2,START_GROUP:3,END_GROUP:4,FIXED32:5},jspb.BinaryConstants.FieldTypeToWireType=function(e){var t=jspb.BinaryConstants.FieldType,r=jspb.BinaryConstants.WireType;switch(e){case t.INT32:case t.INT64:case t.UINT32:case t.UINT64:case t.SINT32:case t.SINT64:case t.BOOL:case t.ENUM:case t.VHASH64:return r.VARINT;case t.DOUBLE:case t.FIXED64:case t.SFIXED64:case t.FHASH64:return r.FIXED64;case t.STRING:case t.MESSAGE:case t.BYTES:return r.DELIMITED;case t.FLOAT:case t.FIXED32:case t.SFIXED32:return r.FIXED32;default:return r.INVALID}},jspb.BinaryConstants.INVALID_FIELD_NUMBER=-1,jspb.BinaryConstants.FLOAT32_EPS=1401298464324817e-60,jspb.BinaryConstants.FLOAT32_MIN=11754943508222875e-54,jspb.BinaryConstants.FLOAT32_MAX=34028234663852886e22,jspb.BinaryConstants.FLOAT64_EPS=5e-324,jspb.BinaryConstants.FLOAT64_MIN=22250738585072014e-324,jspb.BinaryConstants.FLOAT64_MAX=17976931348623157e292,jspb.BinaryConstants.TWO_TO_20=1048576,jspb.BinaryConstants.TWO_TO_23=8388608,jspb.BinaryConstants.TWO_TO_31=2147483648,jspb.BinaryConstants.TWO_TO_32=4294967296,jspb.BinaryConstants.TWO_TO_52=4503599627370496,jspb.BinaryConstants.TWO_TO_63=9223372036854776e3,jspb.BinaryConstants.TWO_TO_64=0xffffffffffffffff,jspb.BinaryConstants.ZERO_HASH="\0\0\0\0\0\0\0\0",goog.dom={},goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},goog.debug={},goog.debug.Error=function(e){if(Error.captureStackTrace)Error.captureStackTrace(this,goog.debug.Error);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e)),this.reportErrorToServer=!0},goog.inherits(goog.debug.Error,Error),goog.debug.Error.prototype.name="CustomError",goog.asserts={},goog.asserts.ENABLE_ASSERTS=goog.DEBUG,goog.asserts.AssertionError=function(e,t){goog.debug.Error.call(this,goog.asserts.subs_(e,t)),this.messagePattern=e},goog.inherits(goog.asserts.AssertionError,goog.debug.Error),goog.asserts.AssertionError.prototype.name="AssertionError",goog.asserts.DEFAULT_ERROR_HANDLER=function(e){throw e},goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER,goog.asserts.subs_=function(e,t){for(var r="",n=(e=e.split("%s")).length-1,o=0;o<n;o++)r+=e[o]+(o<t.length?t[o]:"%s");return r+e[n]},goog.asserts.doAssertFailure_=function(e,t,r,n){var o="Assertion failed";if(r){o+=": "+r;var l=n}else e&&(o+=": "+e,l=t);e=new goog.asserts.AssertionError(""+o,l||[]),goog.asserts.errorHandler_(e)},goog.asserts.setErrorHandler=function(e){goog.asserts.ENABLE_ASSERTS&&(goog.asserts.errorHandler_=e)},goog.asserts.assert=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!e&&goog.asserts.doAssertFailure_("",null,t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertExists=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&e==null&&goog.asserts.doAssertFailure_("Expected to exist: %s.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.fail=function(e,t){goog.asserts.ENABLE_ASSERTS&&goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1)))},goog.asserts.assertNumber=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isNumber(e)&&goog.asserts.doAssertFailure_("Expected number but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertString=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isString(e)&&goog.asserts.doAssertFailure_("Expected string but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertFunction=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isFunction(e)&&goog.asserts.doAssertFailure_("Expected function but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObject=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isObject(e)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertArray=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isArray(e)&&goog.asserts.doAssertFailure_("Expected array but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertBoolean=function(e,t,r){return goog.asserts.ENABLE_ASSERTS&&!goog.isBoolean(e)&&goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertElement=function(e,t,r){return!goog.asserts.ENABLE_ASSERTS||goog.isObject(e)&&e.nodeType==goog.dom.NodeType.ELEMENT||goog.asserts.doAssertFailure_("Expected Element but got %s: %s.",[goog.typeOf(e),e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertInstanceof=function(e,t,r,n){return!goog.asserts.ENABLE_ASSERTS||e instanceof t||goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[goog.asserts.getType_(t),goog.asserts.getType_(e)],r,Array.prototype.slice.call(arguments,3)),e},goog.asserts.assertFinite=function(e,t,r){return!goog.asserts.ENABLE_ASSERTS||typeof e=="number"&&isFinite(e)||goog.asserts.doAssertFailure_("Expected %s to be a finite number but it is not.",[e],t,Array.prototype.slice.call(arguments,2)),e},goog.asserts.assertObjectPrototypeIsIntact=function(){for(var e in Object.prototype)goog.asserts.fail(e+" should not be enumerable in Object.prototype.")},goog.asserts.getType_=function(e){return e instanceof Function?e.displayName||e.name||"unknown type name":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):e===null?"null":typeof e},goog.array={},goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE,goog.array.ASSUME_NATIVE_FUNCTIONS=2012<goog.FEATURESET_YEAR,goog.array.peek=function(e){return e[e.length-1]},goog.array.last=goog.array.peek,goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.indexOf.call(e,t,r)}:function(e,t,r){if(r=r==null?0:0>r?Math.max(0,e.length+r):r,goog.isString(e))return goog.isString(t)&&t.length==1?e.indexOf(t,r):-1;for(;r<e.length;r++)if(r in e&&e[r]===t)return r;return-1},goog.array.lastIndexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.lastIndexOf.call(e,t,r==null?e.length-1:r)}:function(e,t,r){if(0>(r=r==null?e.length-1:r)&&(r=Math.max(0,e.length+r)),goog.isString(e))return goog.isString(t)&&t.length==1?e.lastIndexOf(t,r):-1;for(;0<=r;r--)if(r in e&&e[r]===t)return r;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(e,t,r){goog.asserts.assert(e.length!=null),Array.prototype.forEach.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=goog.isString(e)?e.split(""):e,l=0;l<n;l++)l in o&&t.call(r,o[l],l,e)},goog.array.forEachRight=function(e,t,r){var n=e.length,o=goog.isString(e)?e.split(""):e;for(--n;0<=n;--n)n in o&&t.call(r,o[n],n,e)},goog.array.filter=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.filter.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=[],l=0,s=goog.isString(e)?e.split(""):e,i=0;i<n;i++)if(i in s){var c=s[i];t.call(r,c,i,e)&&(o[l++]=c)}return o},goog.array.map=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.map.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=Array(n),l=goog.isString(e)?e.split(""):e,s=0;s<n;s++)s in l&&(o[s]=t.call(r,l[s],s,e));return o},goog.array.reduce=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(e,t,r,n){return goog.asserts.assert(e.length!=null),n&&(t=goog.bind(t,n)),Array.prototype.reduce.call(e,t,r)}:function(e,t,r,n){var o=r;return goog.array.forEach(e,function(l,s){o=t.call(n,o,l,s,e)}),o},goog.array.reduceRight=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(e,t,r,n){return goog.asserts.assert(e.length!=null),goog.asserts.assert(t!=null),n&&(t=goog.bind(t,n)),Array.prototype.reduceRight.call(e,t,r)}:function(e,t,r,n){var o=r;return goog.array.forEachRight(e,function(l,s){o=t.call(n,o,l,s,e)}),o},goog.array.some=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.some.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=goog.isString(e)?e.split(""):e,l=0;l<n;l++)if(l in o&&t.call(r,o[l],l,e))return!0;return!1},goog.array.every=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(e,t,r){return goog.asserts.assert(e.length!=null),Array.prototype.every.call(e,t,r)}:function(e,t,r){for(var n=e.length,o=goog.isString(e)?e.split(""):e,l=0;l<n;l++)if(l in o&&!t.call(r,o[l],l,e))return!1;return!0},goog.array.count=function(e,t,r){var n=0;return goog.array.forEach(e,function(o,l,s){t.call(r,o,l,s)&&++n},r),n},goog.array.find=function(e,t,r){return 0>(t=goog.array.findIndex(e,t,r))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndex=function(e,t,r){for(var n=e.length,o=goog.isString(e)?e.split(""):e,l=0;l<n;l++)if(l in o&&t.call(r,o[l],l,e))return l;return-1},goog.array.findRight=function(e,t,r){return 0>(t=goog.array.findIndexRight(e,t,r))?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndexRight=function(e,t,r){var n=e.length,o=goog.isString(e)?e.split(""):e;for(--n;0<=n;n--)if(n in o&&t.call(r,o[n],n,e))return n;return-1},goog.array.contains=function(e,t){return 0<=goog.array.indexOf(e,t)},goog.array.isEmpty=function(e){return e.length==0},goog.array.clear=function(e){if(!goog.isArray(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0},goog.array.insert=function(e,t){goog.array.contains(e,t)||e.push(t)},goog.array.insertAt=function(e,t,r){goog.array.splice(e,r,0,t)},goog.array.insertArrayAt=function(e,t,r){goog.partial(goog.array.splice,e,r,0).apply(null,t)},goog.array.insertBefore=function(e,t,r){var n;arguments.length==2||0>(n=goog.array.indexOf(e,r))?e.push(t):goog.array.insertAt(e,t,n)},goog.array.remove=function(e,t){var r;return(r=0<=(t=goog.array.indexOf(e,t)))&&goog.array.removeAt(e,t),r},goog.array.removeLast=function(e,t){return 0<=(t=goog.array.lastIndexOf(e,t))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAt=function(e,t){return goog.asserts.assert(e.length!=null),Array.prototype.splice.call(e,t,1).length==1},goog.array.removeIf=function(e,t,r){return 0<=(t=goog.array.findIndex(e,t,r))&&(goog.array.removeAt(e,t),!0)},goog.array.removeAllIf=function(e,t,r){var n=0;return goog.array.forEachRight(e,function(o,l){t.call(r,o,l,e)&&goog.array.removeAt(e,l)&&n++}),n},goog.array.concat=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.join=function(e){return Array.prototype.concat.apply([],arguments)},goog.array.toArray=function(e){var t=e.length;if(0<t){for(var r=Array(t),n=0;n<t;n++)r[n]=e[n];return r}return[]},goog.array.clone=goog.array.toArray,goog.array.extend=function(e,t){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(goog.isArrayLike(n)){var o=e.length||0,l=n.length||0;e.length=o+l;for(var s=0;s<l;s++)e[o+s]=n[s]}else e.push(n)}},goog.array.splice=function(e,t,r,n){return goog.asserts.assert(e.length!=null),Array.prototype.splice.apply(e,goog.array.slice(arguments,1))},goog.array.slice=function(e,t,r){return goog.asserts.assert(e.length!=null),2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)},goog.array.removeDuplicates=function(e,t,r){t=t||e;var n=function(c){return goog.isObject(c)?"o"+goog.getUid(c):(typeof c).charAt(0)+c};r=r||n,n={};for(var o=0,l=0;l<e.length;){var s=e[l++],i=r(s);Object.prototype.hasOwnProperty.call(n,i)||(n[i]=!0,t[o++]=s)}t.length=o},goog.array.binarySearch=function(e,t,r){return goog.array.binarySearch_(e,r||goog.array.defaultCompare,!1,t)},goog.array.binarySelect=function(e,t,r){return goog.array.binarySearch_(e,t,!0,void 0,r)},goog.array.binarySearch_=function(e,t,r,n,o){for(var l,s=0,i=e.length;s<i;){var c=s+i>>1,u=r?t.call(o,e[c],c,e):t(n,e[c]);0<u?s=c+1:(i=c,l=!u)}return l?s:~s},goog.array.sort=function(e,t){e.sort(t||goog.array.defaultCompare)},goog.array.stableSort=function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]={index:n,value:e[n]};var o=t||goog.array.defaultCompare;for(goog.array.sort(r,function(l,s){return o(l.value,s.value)||l.index-s.index}),n=0;n<e.length;n++)e[n]=r[n].value},goog.array.sortByKey=function(e,t,r){var n=r||goog.array.defaultCompare;goog.array.sort(e,function(o,l){return n(t(o),t(l))})},goog.array.sortObjectsByKey=function(e,t,r){goog.array.sortByKey(e,function(n){return n[t]},r)},goog.array.isSorted=function(e,t,r){t=t||goog.array.defaultCompare;for(var n=1;n<e.length;n++){var o=t(e[n-1],e[n]);if(0<o||o==0&&r)return!1}return!0},goog.array.equals=function(e,t,r){if(!goog.isArrayLike(e)||!goog.isArrayLike(t)||e.length!=t.length)return!1;var n=e.length;r=r||goog.array.defaultCompareEquality;for(var o=0;o<n;o++)if(!r(e[o],t[o]))return!1;return!0},goog.array.compare3=function(e,t,r){r=r||goog.array.defaultCompare;for(var n=Math.min(e.length,t.length),o=0;o<n;o++){var l=r(e[o],t[o]);if(l!=0)return l}return goog.array.defaultCompare(e.length,t.length)},goog.array.defaultCompare=function(e,t){return e>t?1:e<t?-1:0},goog.array.inverseDefaultCompare=function(e,t){return-goog.array.defaultCompare(e,t)},goog.array.defaultCompareEquality=function(e,t){return e===t},goog.array.binaryInsert=function(e,t,r){return 0>(r=goog.array.binarySearch(e,t,r))&&(goog.array.insertAt(e,t,-(r+1)),!0)},goog.array.binaryRemove=function(e,t,r){return 0<=(t=goog.array.binarySearch(e,t,r))&&goog.array.removeAt(e,t)},goog.array.bucket=function(e,t,r){for(var n={},o=0;o<e.length;o++){var l=e[o],s=t.call(r,l,o,e);goog.isDef(s)&&(n[s]||(n[s]=[])).push(l)}return n},goog.array.toObject=function(e,t,r){var n={};return goog.array.forEach(e,function(o,l){n[t.call(r,o,l,e)]=o}),n},goog.array.range=function(e,t,r){var n=[],o=0,l=e;if(t!==void 0&&(o=e,l=t),0>(r=r||1)*(l-o))return[];if(0<r)for(e=o;e<l;e+=r)n.push(e);else for(e=o;e>l;e+=r)n.push(e);return n},goog.array.repeat=function(e,t){for(var r=[],n=0;n<t;n++)r[n]=e;return r},goog.array.flatten=function(e){for(var t=[],r=0;r<arguments.length;r++){var n=arguments[r];if(goog.isArray(n))for(var o=0;o<n.length;o+=8192){var l=goog.array.slice(n,o,o+8192);l=goog.array.flatten.apply(null,l);for(var s=0;s<l.length;s++)t.push(l[s])}else t.push(n)}return t},goog.array.rotate=function(e,t){return goog.asserts.assert(e.length!=null),e.length&&(0<(t%=e.length)?Array.prototype.unshift.apply(e,e.splice(-t,t)):0>t&&Array.prototype.push.apply(e,e.splice(0,-t))),e},goog.array.moveItem=function(e,t,r){goog.asserts.assert(0<=t&&t<e.length),goog.asserts.assert(0<=r&&r<e.length),t=Array.prototype.splice.call(e,t,1),Array.prototype.splice.call(e,r,0,t[0])},goog.array.zip=function(e){if(!arguments.length)return[];for(var t=[],r=arguments[0].length,n=1;n<arguments.length;n++)arguments[n].length<r&&(r=arguments[n].length);for(n=0;n<r;n++){for(var o=[],l=0;l<arguments.length;l++)o.push(arguments[l][n]);t.push(o)}return t},goog.array.shuffle=function(e,t){t=t||Math.random;for(var r=e.length-1;0<r;r--){var n=Math.floor(t()*(r+1)),o=e[r];e[r]=e[n],e[n]=o}},goog.array.copyByIndex=function(e,t){var r=[];return goog.array.forEach(t,function(n){r.push(e[n])}),r},goog.array.concatMap=function(e,t,r){return goog.array.concat.apply([],goog.array.map(e,t,r))},goog.crypt={},goog.crypt.stringToByteArray=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);255<o&&(t[r++]=255&o,o>>=8),t[r++]=o}return t},goog.crypt.byteArrayToString=function(e){if(8192>=e.length)return String.fromCharCode.apply(null,e);for(var t="",r=0;r<e.length;r+=8192){var n=goog.array.slice(e,r,r+8192);t+=String.fromCharCode.apply(null,n)}return t},goog.crypt.byteArrayToHex=function(e,t){return goog.array.map(e,function(r){return 1<(r=r.toString(16)).length?r:"0"+r}).join(t||"")},goog.crypt.hexToByteArray=function(e){goog.asserts.assert(e.length%2==0,"Key string length must be multiple of 2");for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substring(r,r+2),16));return t},goog.crypt.stringToUtf8ByteArray=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);128>o?t[r++]=o:(2048>o?t[r++]=o>>6|192:((64512&o)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n)),t[r++]=o>>18|240,t[r++]=o>>12&63|128):t[r++]=o>>12|224,t[r++]=o>>6&63|128),t[r++]=63&o|128)}return t},goog.crypt.utf8ByteArrayToString=function(e){for(var t=[],r=0,n=0;r<e.length;){var o=e[r++];if(128>o)t[n++]=String.fromCharCode(o);else if(191<o&&224>o){var l=e[r++];t[n++]=String.fromCharCode((31&o)<<6|63&l)}else if(239<o&&365>o){l=e[r++];var s=e[r++];o=((7&o)<<18|(63&l)<<12|(63&s)<<6|63&e[r++])-65536,t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))}else l=e[r++],s=e[r++],t[n++]=String.fromCharCode((15&o)<<12|(63&l)<<6|63&s)}return t.join("")},goog.crypt.xorByteArray=function(e,t){goog.asserts.assert(e.length==t.length,"XOR array lengths must match");for(var r=[],n=0;n<e.length;n++)r.push(e[n]^t[n]);return r},goog.string={},goog.string.internal={},goog.string.internal.startsWith=function(e,t){return e.lastIndexOf(t,0)==0},goog.string.internal.endsWith=function(e,t){var r=e.length-t.length;return 0<=r&&e.indexOf(t,r)==r},goog.string.internal.caseInsensitiveStartsWith=function(e,t){return goog.string.internal.caseInsensitiveCompare(t,e.substr(0,t.length))==0},goog.string.internal.caseInsensitiveEndsWith=function(e,t){return goog.string.internal.caseInsensitiveCompare(t,e.substr(e.length-t.length,t.length))==0},goog.string.internal.caseInsensitiveEquals=function(e,t){return e.toLowerCase()==t.toLowerCase()},goog.string.internal.isEmptyOrWhitespace=function(e){return/^[\s\xa0]*$/.test(e)},goog.string.internal.trim=goog.TRUSTED_SITE&&String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},goog.string.internal.caseInsensitiveCompare=function(e,t){return(e=String(e).toLowerCase())<(t=String(t).toLowerCase())?-1:e==t?0:1},goog.string.internal.newLineToBr=function(e,t){return e.replace(/(\r\n|\r|\n)/g,t?"<br />":"<br>")},goog.string.internal.htmlEscape=function(e,t){if(t)e=e.replace(goog.string.internal.AMP_RE_,"&").replace(goog.string.internal.LT_RE_,"<").replace(goog.string.internal.GT_RE_,">").replace(goog.string.internal.QUOT_RE_,""").replace(goog.string.internal.SINGLE_QUOTE_RE_,"'").replace(goog.string.internal.NULL_RE_,"�");else{if(!goog.string.internal.ALL_RE_.test(e))return e;e.indexOf("&")!=-1&&(e=e.replace(goog.string.internal.AMP_RE_,"&")),e.indexOf("<")!=-1&&(e=e.replace(goog.string.internal.LT_RE_,"<")),e.indexOf(">")!=-1&&(e=e.replace(goog.string.internal.GT_RE_,">")),e.indexOf('"')!=-1&&(e=e.replace(goog.string.internal.QUOT_RE_,""")),e.indexOf("'")!=-1&&(e=e.replace(goog.string.internal.SINGLE_QUOTE_RE_,"'")),e.indexOf("\0")!=-1&&(e=e.replace(goog.string.internal.NULL_RE_,"�"))}return e},goog.string.internal.AMP_RE_=/&/g,goog.string.internal.LT_RE_=/</g,goog.string.internal.GT_RE_=/>/g,goog.string.internal.QUOT_RE_=/"/g,goog.string.internal.SINGLE_QUOTE_RE_=/'/g,goog.string.internal.NULL_RE_=/\x00/g,goog.string.internal.ALL_RE_=/[\x00&<>"']/,goog.string.internal.whitespaceEscape=function(e,t){return goog.string.internal.newLineToBr(e.replace(/ /g,"  "),t)},goog.string.internal.contains=function(e,t){return e.indexOf(t)!=-1},goog.string.internal.caseInsensitiveContains=function(e,t){return goog.string.internal.contains(e.toLowerCase(),t.toLowerCase())},goog.string.internal.compareVersions=function(e,t){var r=0;e=goog.string.internal.trim(String(e)).split("."),t=goog.string.internal.trim(String(t)).split(".");for(var n=Math.max(e.length,t.length),o=0;r==0&&o<n;o++){var l=e[o]||"",s=t[o]||"";do{if(l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],l[0].length==0&&s[0].length==0)break;r=l[1].length==0?0:parseInt(l[1],10);var i=s[1].length==0?0:parseInt(s[1],10);r=goog.string.internal.compareElements_(r,i)||goog.string.internal.compareElements_(l[2].length==0,s[2].length==0)||goog.string.internal.compareElements_(l[2],s[2]),l=l[3],s=s[3]}while(r==0)}return r},goog.string.internal.compareElements_=function(e,t){return e<t?-1:e>t?1:0},goog.string.TypedString=function(){},goog.string.Const=function(e,t){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=e===goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_&&t||"",this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=goog.string.Const.TYPE_MARKER_},goog.string.Const.prototype.implementsGoogStringTypedString=!0,goog.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_},goog.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"},goog.string.Const.unwrap=function(e){return e instanceof goog.string.Const&&e.constructor===goog.string.Const&&e.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===goog.string.Const.TYPE_MARKER_?e.stringConstValueWithSecurityContract__googStringSecurityPrivate_:(goog.asserts.fail("expected object of type Const, got '"+e+"'"),"type_error:Const")},goog.string.Const.from=function(e){return new goog.string.Const(goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_,e)},goog.string.Const.TYPE_MARKER_={},goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_={},goog.string.Const.EMPTY=goog.string.Const.from(""),goog.fs={},goog.fs.url={},goog.fs.url.createObjectUrl=function(e){return goog.fs.url.getUrlObject_().createObjectURL(e)},goog.fs.url.revokeObjectUrl=function(e){goog.fs.url.getUrlObject_().revokeObjectURL(e)},goog.fs.url.getUrlObject_=function(){var e=goog.fs.url.findUrlObject_();if(e!=null)return e;throw Error("This browser doesn't seem to support blob URLs")},goog.fs.url.findUrlObject_=function(){return goog.isDef(goog.global.URL)&&goog.isDef(goog.global.URL.createObjectURL)?goog.global.URL:goog.isDef(goog.global.webkitURL)&&goog.isDef(goog.global.webkitURL.createObjectURL)?goog.global.webkitURL:goog.isDef(goog.global.createObjectURL)?goog.global:null},goog.fs.url.browserSupportsObjectUrls=function(){return goog.fs.url.findUrlObject_()!=null},goog.html={},goog.html.trustedtypes={},goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#html"):null,goog.i18n={},goog.i18n.bidi={},goog.i18n.bidi.FORCE_RTL=!1,goog.i18n.bidi.IS_RTL=goog.i18n.bidi.FORCE_RTL||(goog.LOCALE.substring(0,2).toLowerCase()=="ar"||goog.LOCALE.substring(0,2).toLowerCase()=="fa"||goog.LOCALE.substring(0,2).toLowerCase()=="he"||goog.LOCALE.substring(0,2).toLowerCase()=="iw"||goog.LOCALE.substring(0,2).toLowerCase()=="ps"||goog.LOCALE.substring(0,2).toLowerCase()=="sd"||goog.LOCALE.substring(0,2).toLowerCase()=="ug"||goog.LOCALE.substring(0,2).toLowerCase()=="ur"||goog.LOCALE.substring(0,2).toLowerCase()=="yi")&&(goog.LOCALE.length==2||goog.LOCALE.substring(2,3)=="-"||goog.LOCALE.substring(2,3)=="_")||3<=goog.LOCALE.length&&goog.LOCALE.substring(0,3).toLowerCase()=="ckb"&&(goog.LOCALE.length==3||goog.LOCALE.substring(3,4)=="-"||goog.LOCALE.substring(3,4)=="_")||7<=goog.LOCALE.length&&(goog.LOCALE.substring(2,3)=="-"||goog.LOCALE.substring(2,3)=="_")&&(goog.LOCALE.substring(3,7).toLowerCase()=="adlm"||goog.LOCALE.substring(3,7).toLowerCase()=="arab"||goog.LOCALE.substring(3,7).toLowerCase()=="hebr"||goog.LOCALE.substring(3,7).toLowerCase()=="nkoo"||goog.LOCALE.substring(3,7).toLowerCase()=="rohg"||goog.LOCALE.substring(3,7).toLowerCase()=="thaa")||8<=goog.LOCALE.length&&(goog.LOCALE.substring(3,4)=="-"||goog.LOCALE.substring(3,4)=="_")&&(goog.LOCALE.substring(4,8).toLowerCase()=="adlm"||goog.LOCALE.substring(4,8).toLowerCase()=="arab"||goog.LOCALE.substring(4,8).toLowerCase()=="hebr"||goog.LOCALE.substring(4,8).toLowerCase()=="nkoo"||goog.LOCALE.substring(4,8).toLowerCase()=="rohg"||goog.LOCALE.substring(4,8).toLowerCase()=="thaa"),goog.i18n.bidi.Format={LRE:"\u202A",RLE:"\u202B",PDF:"\u202C",LRM:"\u200E",RLM:"\u200F"},goog.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0},goog.i18n.bidi.RIGHT="right",goog.i18n.bidi.LEFT="left",goog.i18n.bidi.I18N_RIGHT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.LEFT:goog.i18n.bidi.RIGHT,goog.i18n.bidi.I18N_LEFT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,goog.i18n.bidi.toDir=function(e,t){return typeof e=="number"?0<e?goog.i18n.bidi.Dir.LTR:0>e?goog.i18n.bidi.Dir.RTL:t?null:goog.i18n.bidi.Dir.NEUTRAL:e==null?null:e?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.ltrChars_="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0900-\u1FFF\u200E\u2C00-\uD801\uD804-\uD839\uD83C-\uDBFF\uF900-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",goog.i18n.bidi.rtlChars_="\u0591-\u06EF\u06FA-\u08FF\u200F\uD802-\uD803\uD83A-\uD83B\uFB1D-\uFDFF\uFE70-\uFEFC",goog.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g,goog.i18n.bidi.stripHtmlIfNeeded_=function(e,t){return t?e.replace(goog.i18n.bidi.htmlSkipReg_,""):e},goog.i18n.bidi.rtlCharReg_=new RegExp("["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.ltrCharReg_=new RegExp("["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.hasAnyRtl=function(e,t){return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.hasRtlChar=goog.i18n.bidi.hasAnyRtl,goog.i18n.bidi.hasAnyLtr=function(e,t){return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.ltrRe_=new RegExp("^["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlRe_=new RegExp("^["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.isRtlChar=function(e){return goog.i18n.bidi.rtlRe_.test(e)},goog.i18n.bidi.isLtrChar=function(e){return goog.i18n.bidi.ltrRe_.test(e)},goog.i18n.bidi.isNeutralChar=function(e){return!goog.i18n.bidi.isLtrChar(e)&&!goog.i18n.bidi.isRtlChar(e)},goog.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.rtlChars_+"]*["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.ltrChars_+"]*["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.startsWithRtl=function(e,t){return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlText=goog.i18n.bidi.startsWithRtl,goog.i18n.bidi.startsWithLtr=function(e,t){return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrText=goog.i18n.bidi.startsWithLtr,goog.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/,goog.i18n.bidi.isNeutralText=function(e,t){return e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t),goog.i18n.bidi.isRequiredLtrRe_.test(e)||!goog.i18n.bidi.hasAnyLtr(e)&&!goog.i18n.bidi.hasAnyRtl(e)},goog.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.ltrChars_+"][^"+goog.i18n.bidi.rtlChars_+"]*$"),goog.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.rtlChars_+"][^"+goog.i18n.bidi.ltrChars_+"]*$"),goog.i18n.bidi.endsWithLtr=function(e,t){return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrExitText=goog.i18n.bidi.endsWithLtr,goog.i18n.bidi.endsWithRtl=function(e,t){return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlExitText=goog.i18n.bidi.endsWithRtl,goog.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,goog.i18n.bidi.isRtlLanguage=function(e){return goog.i18n.bidi.rtlLocalesRe_.test(e)},goog.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g,goog.i18n.bidi.guardBracketInText=function(e,t){return t=(t===void 0?goog.i18n.bidi.hasAnyRtl(e):t)?goog.i18n.bidi.Format.RLM:goog.i18n.bidi.Format.LRM,e.replace(goog.i18n.bidi.bracketGuardTextRe_,t+"$&"+t)},goog.i18n.bidi.enforceRtlInHtml=function(e){return e.charAt(0)=="<"?e.replace(/<\w+/,"$& dir=rtl"):`
|
|
32
32
|
<span dir=rtl>`+e+"</span>"},goog.i18n.bidi.enforceRtlInText=function(e){return goog.i18n.bidi.Format.RLE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.enforceLtrInHtml=function(e){return e.charAt(0)=="<"?e.replace(/<\w+/,"$& dir=ltr"):`
|
|
33
33
|
<span dir=ltr>`+e+"</span>"},goog.i18n.bidi.enforceLtrInText=function(e){return goog.i18n.bidi.Format.LRE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g,goog.i18n.bidi.leftRe_=/left/gi,goog.i18n.bidi.rightRe_=/right/gi,goog.i18n.bidi.tempRe_=/%%%%/g,goog.i18n.bidi.mirrorCSS=function(e){return e.replace(goog.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_,"%%%%").replace(goog.i18n.bidi.rightRe_,goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_,goog.i18n.bidi.RIGHT)},goog.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g,goog.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g,goog.i18n.bidi.normalizeHebrewQuote=function(e){return e.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_,"$1\u05F4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_,"$1\u05F3")},goog.i18n.bidi.wordSeparatorRe_=/\s+/,goog.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/,goog.i18n.bidi.rtlDetectionThreshold_=.4,goog.i18n.bidi.estimateDirection=function(e,t){var r=0,n=0,o=!1;for(e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t).split(goog.i18n.bidi.wordSeparatorRe_),t=0;t<e.length;t++){var l=e[t];goog.i18n.bidi.startsWithRtl(l)?(r++,n++):goog.i18n.bidi.isRequiredLtrRe_.test(l)?o=!0:goog.i18n.bidi.hasAnyLtr(l)?n++:goog.i18n.bidi.hasNumeralsRe_.test(l)&&(o=!0)}return n==0?o?goog.i18n.bidi.Dir.LTR:goog.i18n.bidi.Dir.NEUTRAL:r/n>goog.i18n.bidi.rtlDetectionThreshold_?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.detectRtlDirectionality=function(e,t){return goog.i18n.bidi.estimateDirection(e,t)==goog.i18n.bidi.Dir.RTL},goog.i18n.bidi.setElementDirAndAlign=function(e,t){e&&(t=goog.i18n.bidi.toDir(t))&&(e.style.textAlign=t==goog.i18n.bidi.Dir.RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,e.dir=t==goog.i18n.bidi.Dir.RTL?"rtl":"ltr")},goog.i18n.bidi.setElementDirByTextDirectionality=function(e,t){switch(goog.i18n.bidi.estimateDirection(t)){case goog.i18n.bidi.Dir.LTR:e.dir="ltr";break;case goog.i18n.bidi.Dir.RTL:e.dir="rtl";break;default:e.removeAttribute("dir")}},goog.i18n.bidi.DirectionalString=function(){},goog.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="",this.trustedURL_=null,this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0,goog.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()},goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.TrustedResourceUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.html.TrustedResourceUrl.prototype.cloneWithParams=function(e,t){var r=goog.html.TrustedResourceUrl.unwrap(this),n=(r=goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(r))[3]||"";return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(r[1]+goog.html.TrustedResourceUrl.stringifyParams_("?",r[2]||"",e)+goog.html.TrustedResourceUrl.stringifyParams_("#",n,t))},goog.DEBUG&&(goog.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"}),goog.html.TrustedResourceUrl.unwrap=function(e){return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(e).toString()},goog.html.TrustedResourceUrl.unwrapTrustedScriptURL=function(e){return e instanceof goog.html.TrustedResourceUrl&&e.constructor===goog.html.TrustedResourceUrl&&e.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_:(goog.asserts.fail("expected object of type TrustedResourceUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:TrustedResourceUrl")},goog.html.TrustedResourceUrl.unwrapTrustedURL=function(e){return e.trustedURL_?e.trustedURL_:goog.html.TrustedResourceUrl.unwrap(e)},goog.html.TrustedResourceUrl.format=function(e,t){var r=goog.string.Const.unwrap(e);if(!goog.html.TrustedResourceUrl.BASE_URL_.test(r))throw Error("Invalid TrustedResourceUrl format: "+r);return e=r.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_,function(n,o){if(!Object.prototype.hasOwnProperty.call(t,o))throw Error('Found marker, "'+o+'", in format string, "'+r+'", but no valid label mapping found in args: '+JSON.stringify(t));return(n=t[o])instanceof goog.string.Const?goog.string.Const.unwrap(n):encodeURIComponent(String(n))}),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g,goog.html.TrustedResourceUrl.BASE_URL_=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,goog.html.TrustedResourceUrl.URL_PARAM_PARSER_=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/,goog.html.TrustedResourceUrl.formatWithParams=function(e,t,r,n){return goog.html.TrustedResourceUrl.format(e,t).cloneWithParams(r,n)},goog.html.TrustedResourceUrl.fromConstant=function(e){return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.TrustedResourceUrl.fromConstants=function(e){for(var t="",r=0;r<e.length;r++)t+=goog.string.Const.unwrap(e[r]);return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.TrustedResourceUrl;return t.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScriptURL(e):e,goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY&&(t.trustedURL_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e)),t},goog.html.TrustedResourceUrl.stringifyParams_=function(e,t,r){if(r==null)return t;if(goog.isString(r))return r?e+encodeURIComponent(r):"";for(var n in r){var o=r[n];o=goog.isArray(o)?o:[o];for(var l=0;l<o.length;l++){var s=o[l];s!=null&&(t||(t=e),t+=(t.length>e.length?"&":"")+encodeURIComponent(n)+"="+encodeURIComponent(String(s)))}}return t},goog.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeUrlWrappedValue_="",this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez",goog.html.SafeUrl.prototype.implementsGoogStringTypedString=!0,goog.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()},goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.DEBUG&&(goog.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeUrlWrappedValue_+"}"}),goog.html.SafeUrl.unwrap=function(e){return goog.html.SafeUrl.unwrapTrustedURL(e).toString()},goog.html.SafeUrl.unwrapTrustedURL=function(e){return e instanceof goog.html.SafeUrl&&e.constructor===goog.html.SafeUrl&&e.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeUrlWrappedValue_:(goog.asserts.fail("expected object of type SafeUrl, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeUrl")},goog.html.SafeUrl.fromConstant=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.SAFE_MIME_TYPE_PATTERN_=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i,goog.html.SafeUrl.isSafeMimeType=function(e){return goog.html.SAFE_MIME_TYPE_PATTERN_.test(e)},goog.html.SafeUrl.fromBlob=function(e){return e=goog.html.SAFE_MIME_TYPE_PATTERN_.test(e.type)?goog.fs.url.createObjectUrl(e):goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.DATA_URL_PATTERN_=/^data:([^,]*);base64,[a-z0-9+\/]+=*$/i,goog.html.SafeUrl.fromDataUrl=function(e){var t=(e=e.replace(/(%0A|%0D)/g,"")).match(goog.html.DATA_URL_PATTERN_);return t=t&&goog.html.SAFE_MIME_TYPE_PATTERN_.test(t[1]),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t?e:goog.html.SafeUrl.INNOCUOUS_STRING)},goog.html.SafeUrl.fromTelUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"tel:")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SIP_URL_PATTERN_=/^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i,goog.html.SafeUrl.fromSipUrl=function(e){return goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(e))||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromFacebookMessengerUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"fb-messenger://share")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromWhatsAppUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"whatsapp://send")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.fromSmsUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"sms:")&&goog.html.SafeUrl.isSmsUrlBodyValid_(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.isSmsUrlBodyValid_=function(e){var t=e.indexOf("#");if(0<t&&(e=e.substring(0,t)),!(t=e.match(/[?&]body=/gi)))return!0;if(1<t.length)return!1;if(!(e=e.match(/[?&]body=([^&]*)/)[1]))return!0;try{decodeURIComponent(e)}catch{return!1}return/^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(e)},goog.html.SafeUrl.fromSshUrl=function(e){return goog.string.internal.caseInsensitiveStartsWith(e,"ssh://")||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeUrl.sanitizeChromeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeFirefoxExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeEdgeExtensionUrl=function(e,t){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//,e,t)},goog.html.SafeUrl.sanitizeExtensionUrl_=function(e,t,r){return(e=e.exec(t))?(e=e[1],(r instanceof goog.string.Const?[goog.string.Const.unwrap(r)]:r.map(function(n){return goog.string.Const.unwrap(n)})).indexOf(e)==-1&&(t=goog.html.SafeUrl.INNOCUOUS_STRING)):t=goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeUrl.fromTrustedResourceUrl=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.TrustedResourceUrl.unwrap(e))},goog.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,goog.html.SafeUrl.SAFE_URL_PATTERN=goog.html.SAFE_URL_PATTERN_,goog.html.SafeUrl.sanitize=function(e){return e instanceof goog.html.SafeUrl?e:(e=typeof e=="object"&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SAFE_URL_PATTERN_.test(e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeUrl.sanitizeAssertUnchanged=function(e,t){return e instanceof goog.html.SafeUrl?e:(e=typeof e=="object"&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),t&&/^data:/i.test(e)&&(t=goog.html.SafeUrl.fromDataUrl(e)).getTypedStringValue()==e?t:(goog.asserts.assert(goog.html.SAFE_URL_PATTERN_.test(e),"%s does not match the safe URL pattern",e)||(e=goog.html.SafeUrl.INNOCUOUS_STRING),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)))},goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.SafeUrl;return t.privateDoNotAccessOrElseSafeUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(e):e,t},goog.html.SafeUrl.ABOUT_BLANK=goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank"),goog.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="",this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyle.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyle.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeStyle.EMPTY:(goog.asserts.assert(goog.string.internal.endsWith(e,";"),"Last character of style string is not ';': "+e),goog.asserts.assert(goog.string.internal.contains(e,":"),`Style string must contain at least one ':', to specify a "name: value" pair: `+e),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_},goog.DEBUG&&(goog.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"}),goog.html.SafeStyle.unwrap=function(e){return e instanceof goog.html.SafeStyle&&e.constructor===goog.html.SafeStyle&&e.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleWrappedValue_:(goog.asserts.fail("expected object of type SafeStyle, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyle")},goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeStyle().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_=e,this},goog.html.SafeStyle.EMPTY=goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""),goog.html.SafeStyle.INNOCUOUS_STRING="zClosurez",goog.html.SafeStyle.create=function(e){var t,r="";for(t in e){if(!/^[-_a-zA-Z0-9]+$/.test(t))throw Error("Name allows only [-_a-zA-Z0-9], got: "+t);var n=e[t];n!=null&&(r+=t+":"+(n=goog.isArray(n)?goog.array.map(n,goog.html.SafeStyle.sanitizePropertyValue_).join(" "):goog.html.SafeStyle.sanitizePropertyValue_(n))+";")}return r?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(r):goog.html.SafeStyle.EMPTY},goog.html.SafeStyle.sanitizePropertyValue_=function(e){if(e instanceof goog.html.SafeUrl)return'url("'+goog.html.SafeUrl.unwrap(e).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';if(e=e instanceof goog.string.Const?goog.string.Const.unwrap(e):goog.html.SafeStyle.sanitizePropertyValueString_(String(e)),/[{;}]/.test(e))throw new goog.asserts.AssertionError("Value does not allow [{;}], got: %s.",[e]);return e},goog.html.SafeStyle.sanitizePropertyValueString_=function(e){var t=e.replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.URL_RE_,"url");return goog.html.SafeStyle.VALUE_RE_.test(t)?goog.html.SafeStyle.COMMENT_RE_.test(e)?(goog.asserts.fail("String value disallows comments, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):goog.html.SafeStyle.hasBalancedQuotes_(e)?goog.html.SafeStyle.hasBalancedSquareBrackets_(e)?goog.html.SafeStyle.sanitizeUrl_(e):(goog.asserts.fail("String value requires balanced square brackets and one identifier per pair of brackets, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value requires balanced quotes, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING):(goog.asserts.fail("String value allows only "+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+" and simple functions, got: "+e),goog.html.SafeStyle.INNOCUOUS_STRING)},goog.html.SafeStyle.hasBalancedQuotes_=function(e){for(var t=!0,r=!0,n=0;n<e.length;n++){var o=e.charAt(n);o=="'"&&r?t=!t:o=='"'&&t&&(r=!r)}return t&&r},goog.html.SafeStyle.hasBalancedSquareBrackets_=function(e){for(var t=!0,r=/^[-_a-zA-Z0-9]$/,n=0;n<e.length;n++){var o=e.charAt(n);if(o=="]"){if(t)return!1;t=!0}else if(o=="["){if(!t)return!1;t=!1}else if(!t&&!r.test(o))return!1}return t},goog.html.SafeStyle.VALUE_ALLOWED_CHARS_=`[-,."'%_!# a-zA-Z0-9\\[\\]]`,goog.html.SafeStyle.VALUE_RE_=new RegExp("^"+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+"+$"),goog.html.SafeStyle.URL_RE_=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g,goog.html.SafeStyle.FUNCTIONS_RE_=/\b(hsl|hsla|rgb|rgba|matrix|calc|minmax|fit-content|repeat|(rotate|scale|translate)(X|Y|Z|3d)?)\([-+*/0-9a-z.%\[\], ]+\)/g,goog.html.SafeStyle.COMMENT_RE_=/\/\*/,goog.html.SafeStyle.sanitizeUrl_=function(e){return e.replace(goog.html.SafeStyle.URL_RE_,function(t,r,n,o){var l="";return n=n.replace(/^(['"])(.*)\1$/,function(s,i,c){return l=i,c}),t=goog.html.SafeUrl.sanitize(n).getTypedStringValue(),r+l+t+l+o})},goog.html.SafeStyle.concat=function(e){var t="",r=function(n){goog.isArray(n)?goog.array.forEach(n,r):t+=goog.html.SafeStyle.unwrap(n)};return goog.array.forEach(arguments,r),t?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t):goog.html.SafeStyle.EMPTY},goog.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="",this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeScript.prototype.implementsGoogStringTypedString=!0,goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeScript.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeScript.EMPTY:goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeScript.fromConstantAndArgs=function(e,t){for(var r=[],n=1;n<arguments.length;n++)r.push(goog.html.SafeScript.stringify_(arguments[n]));return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("("+goog.string.Const.unwrap(e)+")("+r.join(", ")+");")},goog.html.SafeScript.fromJson=function(e){return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(goog.html.SafeScript.stringify_(e))},goog.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"}),goog.html.SafeScript.unwrap=function(e){return goog.html.SafeScript.unwrapTrustedScript(e).toString()},goog.html.SafeScript.unwrapTrustedScript=function(e){return e instanceof goog.html.SafeScript&&e.constructor===goog.html.SafeScript&&e.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeScriptWrappedValue_:(goog.asserts.fail("expected object of type SafeScript, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeScript")},goog.html.SafeScript.stringify_=function(e){return JSON.stringify(e).replace(/</g,"\\x3c")},goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeScript().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScript(e):e,this},goog.html.SafeScript.EMPTY=goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(""),goog.object={},goog.object.is=function(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t},goog.object.forEach=function(e,t,r){for(var n in e)t.call(r,e[n],n,e)},goog.object.filter=function(e,t,r){var n,o={};for(n in e)t.call(r,e[n],n,e)&&(o[n]=e[n]);return o},goog.object.map=function(e,t,r){var n,o={};for(n in e)o[n]=t.call(r,e[n],n,e);return o},goog.object.some=function(e,t,r){for(var n in e)if(t.call(r,e[n],n,e))return!0;return!1},goog.object.every=function(e,t,r){for(var n in e)if(!t.call(r,e[n],n,e))return!1;return!0},goog.object.getCount=function(e){var t,r=0;for(t in e)r++;return r},goog.object.getAnyKey=function(e){for(var t in e)return t},goog.object.getAnyValue=function(e){for(var t in e)return e[t]},goog.object.contains=function(e,t){return goog.object.containsValue(e,t)},goog.object.getValues=function(e){var t,r=[],n=0;for(t in e)r[n++]=e[t];return r},goog.object.getKeys=function(e){var t,r=[],n=0;for(t in e)r[n++]=t;return r},goog.object.getValueByKeys=function(e,t){var r=goog.isArrayLike(t),n=r?t:arguments;for(r=r?0:1;r<n.length;r++){if(e==null)return;e=e[n[r]]}return e},goog.object.containsKey=function(e,t){return e!==null&&t in e},goog.object.containsValue=function(e,t){for(var r in e)if(e[r]==t)return!0;return!1},goog.object.findKey=function(e,t,r){for(var n in e)if(t.call(r,e[n],n,e))return n},goog.object.findValue=function(e,t,r){return(t=goog.object.findKey(e,t,r))&&e[t]},goog.object.isEmpty=function(e){for(var t in e)return!1;return!0},goog.object.clear=function(e){for(var t in e)delete e[t]},goog.object.remove=function(e,t){var r;return(r=t in e)&&delete e[t],r},goog.object.add=function(e,t,r){if(e!==null&&t in e)throw Error('The object already contains the key "'+t+'"');goog.object.set(e,t,r)},goog.object.get=function(e,t,r){return e!==null&&t in e?e[t]:r},goog.object.set=function(e,t,r){e[t]=r},goog.object.setIfUndefined=function(e,t,r){return t in e?e[t]:e[t]=r},goog.object.setWithReturnValueIfNotSet=function(e,t,r){return t in e?e[t]:(r=r(),e[t]=r)},goog.object.equals=function(e,t){for(var r in e)if(!(r in t)||e[r]!==t[r])return!1;for(var n in t)if(!(n in e))return!1;return!0},goog.object.clone=function(e){var t,r={};for(t in e)r[t]=e[t];return r},goog.object.unsafeClone=function(e){var t=goog.typeOf(e);if(t=="object"||t=="array"){if(goog.isFunction(e.clone))return e.clone();for(var r in t=t=="array"?[]:{},e)t[r]=goog.object.unsafeClone(e[r]);return t}return e},goog.object.transpose=function(e){var t,r={};for(t in e)r[e[t]]=t;return r},goog.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),goog.object.extend=function(e,t){for(var r,n,o=1;o<arguments.length;o++){for(r in n=arguments[o])e[r]=n[r];for(var l=0;l<goog.object.PROTOTYPE_FIELDS_.length;l++)r=goog.object.PROTOTYPE_FIELDS_[l],Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}},goog.object.create=function(e){var t=arguments.length;if(t==1&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(t%2)throw Error("Uneven number of arguments");for(var r={},n=0;n<t;n+=2)r[arguments[n]]=arguments[n+1];return r},goog.object.createSet=function(e){var t=arguments.length;if(t==1&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var r={},n=0;n<t;n++)r[arguments[n]]=!0;return r},goog.object.createImmutableView=function(e){var t=e;return Object.isFrozen&&!Object.isFrozen(e)&&(t=Object.create(e),Object.freeze(t)),t},goog.object.isImmutableView=function(e){return!!Object.isFrozen&&Object.isFrozen(e)},goog.object.getAllPropertyNames=function(e,t,r){if(!e)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return goog.object.getKeys(e);for(var n={};e&&(e!==Object.prototype||t)&&(e!==Function.prototype||r);){for(var o=Object.getOwnPropertyNames(e),l=0;l<o.length;l++)n[o[l]]=!0;e=Object.getPrototypeOf(e)}return goog.object.getKeys(n)},goog.object.getSuperClass=function(e){return(e=Object.getPrototypeOf(e.prototype))&&e.constructor},goog.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="",this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0,goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeStyleSheet.createRule=function(e,t){if(goog.string.internal.contains(e,"<"))throw Error("Selector does not allow '<', got: "+e);var r=e.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g,"");if(!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(r))throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: "+e);if(!goog.html.SafeStyleSheet.hasBalancedBrackets_(r))throw Error("() and [] in selector must be balanced, got: "+e);return t instanceof goog.html.SafeStyle||(t=goog.html.SafeStyle.create(t)),e=e+"{"+goog.html.SafeStyle.unwrap(t).replace(/</g,"\\3C ")+"}",goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e)},goog.html.SafeStyleSheet.hasBalancedBrackets_=function(e){for(var t={"(":")","[":"]"},r=[],n=0;n<e.length;n++){var o=e[n];if(t[o])r.push(t[o]);else if(goog.object.contains(t,o)&&r.pop()!=o)return!1}return r.length==0},goog.html.SafeStyleSheet.concat=function(e){var t="",r=function(n){goog.isArray(n)?goog.array.forEach(n,r):t+=goog.html.SafeStyleSheet.unwrap(n)};return goog.array.forEach(arguments,r),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.SafeStyleSheet.fromConstant=function(e){return(e=goog.string.Const.unwrap(e)).length===0?goog.html.SafeStyleSheet.EMPTY:(goog.asserts.assert(!goog.string.internal.contains(e,"<"),"Forbidden '<' character in style sheet string: "+e),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_},goog.DEBUG&&(goog.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"}),goog.html.SafeStyleSheet.unwrap=function(e){return e instanceof goog.html.SafeStyleSheet&&e.constructor===goog.html.SafeStyleSheet&&e.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_:(goog.asserts.fail("expected object of type SafeStyleSheet, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeStyleSheet")},goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(e){return new goog.html.SafeStyleSheet().initSecurityPrivateDoNotAccessOrElse_(e)},goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=e,this},goog.html.SafeStyleSheet.EMPTY=goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(""),goog.dom.tags={},goog.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},goog.dom.tags.isVoidTag=function(e){return goog.dom.tags.VOID_TAGS_[e]===!0},goog.dom.HtmlElement=function(){},goog.dom.TagName=function(e){this.tagName_=e},goog.dom.TagName.prototype.toString=function(){return this.tagName_},goog.dom.TagName.A=new goog.dom.TagName("A"),goog.dom.TagName.ABBR=new goog.dom.TagName("ABBR"),goog.dom.TagName.ACRONYM=new goog.dom.TagName("ACRONYM"),goog.dom.TagName.ADDRESS=new goog.dom.TagName("ADDRESS"),goog.dom.TagName.APPLET=new goog.dom.TagName("APPLET"),goog.dom.TagName.AREA=new goog.dom.TagName("AREA"),goog.dom.TagName.ARTICLE=new goog.dom.TagName("ARTICLE"),goog.dom.TagName.ASIDE=new goog.dom.TagName("ASIDE"),goog.dom.TagName.AUDIO=new goog.dom.TagName("AUDIO"),goog.dom.TagName.B=new goog.dom.TagName("B"),goog.dom.TagName.BASE=new goog.dom.TagName("BASE"),goog.dom.TagName.BASEFONT=new goog.dom.TagName("BASEFONT"),goog.dom.TagName.BDI=new goog.dom.TagName("BDI"),goog.dom.TagName.BDO=new goog.dom.TagName("BDO"),goog.dom.TagName.BIG=new goog.dom.TagName("BIG"),goog.dom.TagName.BLOCKQUOTE=new goog.dom.TagName("BLOCKQUOTE"),goog.dom.TagName.BODY=new goog.dom.TagName("BODY"),goog.dom.TagName.BR=new goog.dom.TagName("BR"),goog.dom.TagName.BUTTON=new goog.dom.TagName("BUTTON"),goog.dom.TagName.CANVAS=new goog.dom.TagName("CANVAS"),goog.dom.TagName.CAPTION=new goog.dom.TagName("CAPTION"),goog.dom.TagName.CENTER=new goog.dom.TagName("CENTER"),goog.dom.TagName.CITE=new goog.dom.TagName("CITE"),goog.dom.TagName.CODE=new goog.dom.TagName("CODE"),goog.dom.TagName.COL=new goog.dom.TagName("COL"),goog.dom.TagName.COLGROUP=new goog.dom.TagName("COLGROUP"),goog.dom.TagName.COMMAND=new goog.dom.TagName("COMMAND"),goog.dom.TagName.DATA=new goog.dom.TagName("DATA"),goog.dom.TagName.DATALIST=new goog.dom.TagName("DATALIST"),goog.dom.TagName.DD=new goog.dom.TagName("DD"),goog.dom.TagName.DEL=new goog.dom.TagName("DEL"),goog.dom.TagName.DETAILS=new goog.dom.TagName("DETAILS"),goog.dom.TagName.DFN=new goog.dom.TagName("DFN"),goog.dom.TagName.DIALOG=new goog.dom.TagName("DIALOG"),goog.dom.TagName.DIR=new goog.dom.TagName("DIR"),goog.dom.TagName.DIV=new goog.dom.TagName("DIV"),goog.dom.TagName.DL=new goog.dom.TagName("DL"),goog.dom.TagName.DT=new goog.dom.TagName("DT"),goog.dom.TagName.EM=new goog.dom.TagName("EM"),goog.dom.TagName.EMBED=new goog.dom.TagName("EMBED"),goog.dom.TagName.FIELDSET=new goog.dom.TagName("FIELDSET"),goog.dom.TagName.FIGCAPTION=new goog.dom.TagName("FIGCAPTION"),goog.dom.TagName.FIGURE=new goog.dom.TagName("FIGURE"),goog.dom.TagName.FONT=new goog.dom.TagName("FONT"),goog.dom.TagName.FOOTER=new goog.dom.TagName("FOOTER"),goog.dom.TagName.FORM=new goog.dom.TagName("FORM"),goog.dom.TagName.FRAME=new goog.dom.TagName("FRAME"),goog.dom.TagName.FRAMESET=new goog.dom.TagName("FRAMESET"),goog.dom.TagName.H1=new goog.dom.TagName("H1"),goog.dom.TagName.H2=new goog.dom.TagName("H2"),goog.dom.TagName.H3=new goog.dom.TagName("H3"),goog.dom.TagName.H4=new goog.dom.TagName("H4"),goog.dom.TagName.H5=new goog.dom.TagName("H5"),goog.dom.TagName.H6=new goog.dom.TagName("H6"),goog.dom.TagName.HEAD=new goog.dom.TagName("HEAD"),goog.dom.TagName.HEADER=new goog.dom.TagName("HEADER"),goog.dom.TagName.HGROUP=new goog.dom.TagName("HGROUP"),goog.dom.TagName.HR=new goog.dom.TagName("HR"),goog.dom.TagName.HTML=new goog.dom.TagName("HTML"),goog.dom.TagName.I=new goog.dom.TagName("I"),goog.dom.TagName.IFRAME=new goog.dom.TagName("IFRAME"),goog.dom.TagName.IMG=new goog.dom.TagName("IMG"),goog.dom.TagName.INPUT=new goog.dom.TagName("INPUT"),goog.dom.TagName.INS=new goog.dom.TagName("INS"),goog.dom.TagName.ISINDEX=new goog.dom.TagName("ISINDEX"),goog.dom.TagName.KBD=new goog.dom.TagName("KBD"),goog.dom.TagName.KEYGEN=new goog.dom.TagName("KEYGEN"),goog.dom.TagName.LABEL=new goog.dom.TagName("LABEL"),goog.dom.TagName.LEGEND=new goog.dom.TagName("LEGEND"),goog.dom.TagName.LI=new goog.dom.TagName("LI"),goog.dom.TagName.LINK=new goog.dom.TagName("LINK"),goog.dom.TagName.MAIN=new goog.dom.TagName("MAIN"),goog.dom.TagName.MAP=new goog.dom.TagName("MAP"),goog.dom.TagName.MARK=new goog.dom.TagName("MARK"),goog.dom.TagName.MATH=new goog.dom.TagName("MATH"),goog.dom.TagName.MENU=new goog.dom.TagName("MENU"),goog.dom.TagName.MENUITEM=new goog.dom.TagName("MENUITEM"),goog.dom.TagName.META=new goog.dom.TagName("META"),goog.dom.TagName.METER=new goog.dom.TagName("METER"),goog.dom.TagName.NAV=new goog.dom.TagName("NAV"),goog.dom.TagName.NOFRAMES=new goog.dom.TagName("NOFRAMES"),goog.dom.TagName.NOSCRIPT=new goog.dom.TagName("NOSCRIPT"),goog.dom.TagName.OBJECT=new goog.dom.TagName("OBJECT"),goog.dom.TagName.OL=new goog.dom.TagName("OL"),goog.dom.TagName.OPTGROUP=new goog.dom.TagName("OPTGROUP"),goog.dom.TagName.OPTION=new goog.dom.TagName("OPTION"),goog.dom.TagName.OUTPUT=new goog.dom.TagName("OUTPUT"),goog.dom.TagName.P=new goog.dom.TagName("P"),goog.dom.TagName.PARAM=new goog.dom.TagName("PARAM"),goog.dom.TagName.PICTURE=new goog.dom.TagName("PICTURE"),goog.dom.TagName.PRE=new goog.dom.TagName("PRE"),goog.dom.TagName.PROGRESS=new goog.dom.TagName("PROGRESS"),goog.dom.TagName.Q=new goog.dom.TagName("Q"),goog.dom.TagName.RP=new goog.dom.TagName("RP"),goog.dom.TagName.RT=new goog.dom.TagName("RT"),goog.dom.TagName.RTC=new goog.dom.TagName("RTC"),goog.dom.TagName.RUBY=new goog.dom.TagName("RUBY"),goog.dom.TagName.S=new goog.dom.TagName("S"),goog.dom.TagName.SAMP=new goog.dom.TagName("SAMP"),goog.dom.TagName.SCRIPT=new goog.dom.TagName("SCRIPT"),goog.dom.TagName.SECTION=new goog.dom.TagName("SECTION"),goog.dom.TagName.SELECT=new goog.dom.TagName("SELECT"),goog.dom.TagName.SMALL=new goog.dom.TagName("SMALL"),goog.dom.TagName.SOURCE=new goog.dom.TagName("SOURCE"),goog.dom.TagName.SPAN=new goog.dom.TagName("SPAN"),goog.dom.TagName.STRIKE=new goog.dom.TagName("STRIKE"),goog.dom.TagName.STRONG=new goog.dom.TagName("STRONG"),goog.dom.TagName.STYLE=new goog.dom.TagName("STYLE"),goog.dom.TagName.SUB=new goog.dom.TagName("SUB"),goog.dom.TagName.SUMMARY=new goog.dom.TagName("SUMMARY"),goog.dom.TagName.SUP=new goog.dom.TagName("SUP"),goog.dom.TagName.SVG=new goog.dom.TagName("SVG"),goog.dom.TagName.TABLE=new goog.dom.TagName("TABLE"),goog.dom.TagName.TBODY=new goog.dom.TagName("TBODY"),goog.dom.TagName.TD=new goog.dom.TagName("TD"),goog.dom.TagName.TEMPLATE=new goog.dom.TagName("TEMPLATE"),goog.dom.TagName.TEXTAREA=new goog.dom.TagName("TEXTAREA"),goog.dom.TagName.TFOOT=new goog.dom.TagName("TFOOT"),goog.dom.TagName.TH=new goog.dom.TagName("TH"),goog.dom.TagName.THEAD=new goog.dom.TagName("THEAD"),goog.dom.TagName.TIME=new goog.dom.TagName("TIME"),goog.dom.TagName.TITLE=new goog.dom.TagName("TITLE"),goog.dom.TagName.TR=new goog.dom.TagName("TR"),goog.dom.TagName.TRACK=new goog.dom.TagName("TRACK"),goog.dom.TagName.TT=new goog.dom.TagName("TT"),goog.dom.TagName.U=new goog.dom.TagName("U"),goog.dom.TagName.UL=new goog.dom.TagName("UL"),goog.dom.TagName.VAR=new goog.dom.TagName("VAR"),goog.dom.TagName.VIDEO=new goog.dom.TagName("VIDEO"),goog.dom.TagName.WBR=new goog.dom.TagName("WBR"),goog.labs={},goog.labs.userAgent={},goog.labs.userAgent.util={},goog.labs.userAgent.util.getNativeUserAgentString_=function(){var e=goog.labs.userAgent.util.getNavigator_();return e&&(e=e.userAgent)?e:""},goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator},goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_(),goog.labs.userAgent.util.setUserAgent=function(e){goog.labs.userAgent.util.userAgent_=e||goog.labs.userAgent.util.getNativeUserAgentString_()},goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_},goog.labs.userAgent.util.matchUserAgent=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.contains(t,e)},goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.caseInsensitiveContains(t,e)},goog.labs.userAgent.util.extractVersionTuples=function(e){for(var t,r=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,n=[];t=r.exec(e);)n.push([t[1],t[2],t[3]||void 0]);return n},goog.labs.userAgent.browser={},goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")},goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.browser.matchEdgeHtml_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.browser.matchEdgeChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("Edg/")},goog.labs.userAgent.browser.matchOperaChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("OPR")},goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")||goog.labs.userAgent.util.matchUserAgent("FxiOS")},goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!(goog.labs.userAgent.browser.matchChrome_()||goog.labs.userAgent.browser.matchCoast_()||goog.labs.userAgent.browser.matchOpera_()||goog.labs.userAgent.browser.matchEdgeHtml_()||goog.labs.userAgent.browser.matchEdgeChromium_()||goog.labs.userAgent.browser.matchOperaChromium_()||goog.labs.userAgent.browser.matchFirefox_()||goog.labs.userAgent.browser.isSilk()||goog.labs.userAgent.util.matchUserAgent("Android"))},goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")},goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&!goog.labs.userAgent.browser.matchFirefox_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")},goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchEdgeHtml_()},goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())},goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_,goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_,goog.labs.userAgent.browser.isEdge=goog.labs.userAgent.browser.matchEdgeHtml_,goog.labs.userAgent.browser.isEdgeChromium=goog.labs.userAgent.browser.matchEdgeChromium_,goog.labs.userAgent.browser.isOperaChromium=goog.labs.userAgent.browser.matchOperaChromium_,goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_,goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_,goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_,goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_,goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_,goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_,goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")},goog.labs.userAgent.browser.getVersion=function(){function e(o){return o=goog.array.find(o,n),r[o]||""}var t=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(t);t=goog.labs.userAgent.util.extractVersionTuples(t);var r={};goog.array.forEach(t,function(o){r[o[0]]=o[1]});var n=goog.partial(goog.object.containsKey,r);return goog.labs.userAgent.browser.isOpera()?e(["Version","Opera"]):goog.labs.userAgent.browser.isEdge()?e(["Edge"]):goog.labs.userAgent.browser.isEdgeChromium()?e(["Edg"]):goog.labs.userAgent.browser.isChrome()?e(["Chrome","CriOS"]):(t=t[2])&&t[1]||""},goog.labs.userAgent.browser.isVersionOrHigher=function(e){return 0<=goog.string.internal.compareVersions(goog.labs.userAgent.browser.getVersion(),e)},goog.labs.userAgent.browser.getIEVersion_=function(e){var t=/rv: *([\d\.]*)/.exec(e);if(t&&t[1])return t[1];t="";var r=/MSIE +([\d\.]+)/.exec(e);if(r&&r[1])if(e=/Trident\/(\d.\d)/.exec(e),r[1]=="7.0")if(e&&e[1])switch(e[1]){case"4.0":t="8.0";break;case"5.0":t="9.0";break;case"6.0":t="10.0";break;case"7.0":t="11.0"}else t="7.0";else t=r[1];return t},goog.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="",this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_,this.dir_=null},goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeHtml.prototype.getDirection=function(){return this.dir_},goog.html.SafeHtml.prototype.implementsGoogStringTypedString=!0,goog.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()},goog.DEBUG&&(goog.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"}),goog.html.SafeHtml.unwrap=function(e){return goog.html.SafeHtml.unwrapTrustedHTML(e).toString()},goog.html.SafeHtml.unwrapTrustedHTML=function(e){return e instanceof goog.html.SafeHtml&&e.constructor===goog.html.SafeHtml&&e.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeHtmlWrappedValue_:(goog.asserts.fail("expected object of type SafeHtml, got '"+e+"' of type "+goog.typeOf(e)),"type_error:SafeHtml")},goog.html.SafeHtml.htmlEscape=function(e){if(e instanceof goog.html.SafeHtml)return e;var t=typeof e=="object",r=null;return t&&e.implementsGoogI18nBidiDirectionalString&&(r=e.getDirection()),e=t&&e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.htmlEscape(e),r)},goog.html.SafeHtml.htmlEscapePreservingNewlines=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.newLineToBr(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.whitespaceEscape(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.from=goog.html.SafeHtml.htmlEscape,goog.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/,goog.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.html.SafeHtml.create=function(e,t,r){return goog.html.SafeHtml.verifyTagName(String(e)),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(e),t,r)},goog.html.SafeHtml.verifyTagName=function(e){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(e))throw Error("Invalid tag name <"+e+">.");if(e.toUpperCase()in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+e+"> is not allowed for SafeHtml.")},goog.html.SafeHtml.createIframe=function(e,t,r,n){e&&goog.html.TrustedResourceUrl.unwrap(e);var o={};return o.src=e||null,o.srcdoc=t&&goog.html.SafeHtml.unwrap(t),e=goog.html.SafeHtml.combineAttributes(o,{sandbox:""},r),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,n)},goog.html.SafeHtml.createSandboxIframe=function(e,t,r,n){if(!goog.html.SafeHtml.canUseSandboxIframe())throw Error("The browser does not support sandboxed iframes.");var o={};return o.src=e?goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)):null,o.srcdoc=t||null,o.sandbox="",e=goog.html.SafeHtml.combineAttributes(o,{},r),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",e,n)},goog.html.SafeHtml.canUseSandboxIframe=function(){return goog.global.HTMLIFrameElement&&"sandbox"in goog.global.HTMLIFrameElement.prototype},goog.html.SafeHtml.createScriptSrc=function(e,t){return goog.html.TrustedResourceUrl.unwrap(e),e=goog.html.SafeHtml.combineAttributes({src:e},{},t),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",e)},goog.html.SafeHtml.createScript=function(e,t){for(var r in t){var n=r.toLowerCase();if(n=="language"||n=="src"||n=="text"||n=="type")throw Error('Cannot set "'+n+'" attribute')}for(r="",e=goog.array.concat(e),n=0;n<e.length;n++)r+=goog.html.SafeScript.unwrap(e[n]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(r,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",t,e)},goog.html.SafeHtml.createStyle=function(e,t){t=goog.html.SafeHtml.combineAttributes({type:"text/css"},{},t);var r="";e=goog.array.concat(e);for(var n=0;n<e.length;n++)r+=goog.html.SafeStyleSheet.unwrap(e[n]);return e=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(r,goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",t,e)},goog.html.SafeHtml.createMetaRefresh=function(e,t){return e=goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(e)),(goog.labs.userAgent.browser.isIE()||goog.labs.userAgent.browser.isEdge())&&goog.string.internal.contains(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",{"http-equiv":"refresh",content:(t||0)+"; url="+e})},goog.html.SafeHtml.getAttrNameAndValue_=function(e,t,r){if(r instanceof goog.string.Const)r=goog.string.Const.unwrap(r);else if(t.toLowerCase()=="style")r=goog.html.SafeHtml.getStyleValue_(r);else{if(/^on/i.test(t))throw Error('Attribute "'+t+'" requires goog.string.Const value, "'+r+'" given.');if(t.toLowerCase()in goog.html.SafeHtml.URL_ATTRIBUTES_)if(r instanceof goog.html.TrustedResourceUrl)r=goog.html.TrustedResourceUrl.unwrap(r);else if(r instanceof goog.html.SafeUrl)r=goog.html.SafeUrl.unwrap(r);else{if(!goog.isString(r))throw Error('Attribute "'+t+'" on tag "'+e+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+r+'" given.');r=goog.html.SafeUrl.sanitize(r).getTypedStringValue()}}return r.implementsGoogStringTypedString&&(r=r.getTypedStringValue()),goog.asserts.assert(goog.isString(r)||goog.isNumber(r),"String or number value expected, got "+typeof r+" with value: "+r),t+'="'+goog.string.internal.htmlEscape(String(r))+'"'},goog.html.SafeHtml.getStyleValue_=function(e){if(!goog.isObject(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof e+" given: "+e);return e instanceof goog.html.SafeStyle||(e=goog.html.SafeStyle.create(e)),goog.html.SafeStyle.unwrap(e)},goog.html.SafeHtml.createWithDir=function(e,t,r,n){return(t=goog.html.SafeHtml.create(t,r,n)).dir_=e,t},goog.html.SafeHtml.join=function(e,t){var r=(e=goog.html.SafeHtml.htmlEscape(e)).getDirection(),n=[],o=function(l){goog.isArray(l)?goog.array.forEach(l,o):(l=goog.html.SafeHtml.htmlEscape(l),n.push(goog.html.SafeHtml.unwrap(l)),l=l.getDirection(),r==goog.i18n.bidi.Dir.NEUTRAL?r=l:l!=goog.i18n.bidi.Dir.NEUTRAL&&r!=l&&(r=null))};return goog.array.forEach(t,o),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(n.join(goog.html.SafeHtml.unwrap(e)),r)},goog.html.SafeHtml.concat=function(e){return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY,Array.prototype.slice.call(arguments))},goog.html.SafeHtml.concatWithDir=function(e,t){var r=goog.html.SafeHtml.concat(goog.array.slice(arguments,1));return r.dir_=e,r},goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(e,t){return new goog.html.SafeHtml().initSecurityPrivateDoNotAccessOrElse_(e,t)},goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(e,t){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createHTML(e):e,this.dir_=t,this},goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(e,t,r){var n=null,o="<"+e+goog.html.SafeHtml.stringifyAttributes(e,t);return goog.isDefAndNotNull(r)?goog.isArray(r)||(r=[r]):r=[],goog.dom.tags.isVoidTag(e.toLowerCase())?(goog.asserts.assert(!r.length,"Void tag <"+e+"> does not allow content."),o+=">"):(n=goog.html.SafeHtml.concat(r),o+=">"+goog.html.SafeHtml.unwrap(n)+"</"+e+">",n=n.getDirection()),(e=t&&t.dir)&&(n=/^(ltr|rtl|auto)$/i.test(e)?goog.i18n.bidi.Dir.NEUTRAL:null),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(o,n)},goog.html.SafeHtml.stringifyAttributes=function(e,t){var r="";if(t)for(var n in t){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(n))throw Error('Invalid attribute name "'+n+'".');var o=t[n];goog.isDefAndNotNull(o)&&(r+=" "+goog.html.SafeHtml.getAttrNameAndValue_(e,n,o))}return r},goog.html.SafeHtml.combineAttributes=function(e,t,r){var n,o={};for(n in e)goog.asserts.assert(n.toLowerCase()==n,"Must be lower case"),o[n]=e[n];for(n in t)goog.asserts.assert(n.toLowerCase()==n,"Must be lower case"),o[n]=t[n];for(n in r){var l=n.toLowerCase();if(l in e)throw Error('Cannot override "'+l+'" attribute, got "'+n+'" with value "'+r[n]+'"');l in t&&delete o[l],o[n]=r[n]}return o},goog.html.SafeHtml.DOCTYPE_HTML=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.EMPTY=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",goog.i18n.bidi.Dir.NEUTRAL),goog.html.SafeHtml.BR=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",goog.i18n.bidi.Dir.NEUTRAL),goog.html.uncheckedconversions={},goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(e,t,r){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(t,r||null)},goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(t)},goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(e,t){return goog.asserts.assertString(goog.string.Const.unwrap(e),"must provide justification"),goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(e)),"must provide non-empty justification"),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(t)},goog.dom.asserts={},goog.dom.asserts.assertIsLocation=function(e){if(goog.asserts.ENABLE_ASSERTS){var t=goog.dom.asserts.getWindow_(e);t&&(!e||!(e instanceof t.Location)&&e instanceof t.Element)&&goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s",goog.dom.asserts.debugStringForType_(e))}return e},goog.dom.asserts.assertIsElementType_=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var r=goog.dom.asserts.getWindow_(e);r&&r[t]!==void 0&&(e&&(e instanceof r[t]||!(e instanceof r.Location||e instanceof r.Element))||goog.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s",t,goog.dom.asserts.debugStringForType_(e)))}return e},goog.dom.asserts.assertIsHTMLAnchorElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAnchorElement")},goog.dom.asserts.assertIsHTMLButtonElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLButtonElement")},goog.dom.asserts.assertIsHTMLLinkElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLLinkElement")},goog.dom.asserts.assertIsHTMLImageElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLImageElement")},goog.dom.asserts.assertIsHTMLAudioElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLAudioElement")},goog.dom.asserts.assertIsHTMLVideoElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLVideoElement")},goog.dom.asserts.assertIsHTMLInputElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLInputElement")},goog.dom.asserts.assertIsHTMLTextAreaElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLTextAreaElement")},goog.dom.asserts.assertIsHTMLCanvasElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLCanvasElement")},goog.dom.asserts.assertIsHTMLEmbedElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLEmbedElement")},goog.dom.asserts.assertIsHTMLFormElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFormElement")},goog.dom.asserts.assertIsHTMLFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLFrameElement")},goog.dom.asserts.assertIsHTMLIFrameElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLIFrameElement")},goog.dom.asserts.assertIsHTMLObjectElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLObjectElement")},goog.dom.asserts.assertIsHTMLScriptElement=function(e){return goog.dom.asserts.assertIsElementType_(e,"HTMLScriptElement")},goog.dom.asserts.debugStringForType_=function(e){if(!goog.isObject(e))return e===void 0?"undefined":e===null?"null":typeof e;try{return e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e)}catch{return"<object could not be stringified>"}},goog.dom.asserts.getWindow_=function(e){try{var t=e&&e.ownerDocument,r=t&&(t.defaultView||t.parentWindow);if((r=r||goog.global).Element&&r.Location)return r}catch{}return null},goog.functions={},goog.functions.constant=function(e){return function(){return e}},goog.functions.FALSE=function(){return!1},goog.functions.TRUE=function(){return!0},goog.functions.NULL=function(){return null},goog.functions.identity=function(e,t){return e},goog.functions.error=function(e){return function(){throw Error(e)}},goog.functions.fail=function(e){return function(){throw e}},goog.functions.lock=function(e,t){return t=t||0,function(){return e.apply(this,Array.prototype.slice.call(arguments,0,t))}},goog.functions.nth=function(e){return function(){return arguments[e]}},goog.functions.partialRight=function(e,t){var r=Array.prototype.slice.call(arguments,1);return function(){var n=Array.prototype.slice.call(arguments);return n.push.apply(n,r),e.apply(this,n)}},goog.functions.withReturnValue=function(e,t){return goog.functions.sequence(e,goog.functions.constant(t))},goog.functions.equalTo=function(e,t){return function(r){return t?e==r:e===r}},goog.functions.compose=function(e,t){var r=arguments,n=r.length;return function(){var o;n&&(o=r[n-1].apply(this,arguments));for(var l=n-2;0<=l;l--)o=r[l].call(this,o);return o}},goog.functions.sequence=function(e){var t=arguments,r=t.length;return function(){for(var n,o=0;o<r;o++)n=t[o].apply(this,arguments);return n}},goog.functions.and=function(e){var t=arguments,r=t.length;return function(){for(var n=0;n<r;n++)if(!t[n].apply(this,arguments))return!1;return!0}},goog.functions.or=function(e){var t=arguments,r=t.length;return function(){for(var n=0;n<r;n++)if(t[n].apply(this,arguments))return!0;return!1}},goog.functions.not=function(e){return function(){return!e.apply(this,arguments)}},goog.functions.create=function(e,t){var r=function(){};return r.prototype=e.prototype,r=new r,e.apply(r,Array.prototype.slice.call(arguments,1)),r},goog.functions.CACHE_RETURN_VALUE=!0,goog.functions.cacheReturnValue=function(e){var t,r=!1;return function(){return goog.functions.CACHE_RETURN_VALUE?(r||(t=e(),r=!0),t):e()}},goog.functions.once=function(e){var t=e;return function(){if(t){var r=t;t=null,r()}}},goog.functions.debounce=function(e,t,r){var n=0;return function(o){goog.global.clearTimeout(n);var l=arguments;n=goog.global.setTimeout(function(){e.apply(r,l)},t)}},goog.functions.throttle=function(e,t,r){var n=0,o=!1,l=[],s=function(){n=0,o&&(o=!1,i())},i=function(){n=goog.global.setTimeout(s,t),e.apply(r,l)};return function(c){l=arguments,n?o=!0:i()}},goog.functions.rateLimit=function(e,t,r){var n=0,o=function(){n=0};return function(l){n||(n=goog.global.setTimeout(o,t),e.apply(r,arguments))}},goog.dom.safe={},goog.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"},goog.dom.safe.insertAdjacentHtml=function(e,t,r){e.insertAdjacentHTML(t,goog.html.SafeHtml.unwrapTrustedHTML(r))},goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},goog.dom.safe.isInnerHtmlCleanupRecursive_=goog.functions.cacheReturnValue(function(){if(goog.DEBUG&&typeof document=="undefined")return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!(goog.DEBUG&&!e.firstChild)&&(t=e.firstChild.firstChild,e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY),!t.parentElement)}),goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse=function(e,t){if(goog.dom.safe.isInnerHtmlCleanupRecursive_())for(;e.lastChild;)e.removeChild(e.lastChild);e.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setInnerHtml=function(e,t){if(goog.asserts.ENABLE_ASSERTS){var r=e.tagName.toUpperCase();if(goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[r])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+e.tagName+".")}goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(e,t)},goog.dom.safe.setOuterHtml=function(e,t){e.outerHTML=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setFormElementAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLFormElement(e).action=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setButtonFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLButtonElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setInputFormAction=function(e,t){t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),goog.dom.asserts.assertIsHTMLInputElement(e).formAction=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setStyle=function(e,t){e.style.cssText=goog.html.SafeStyle.unwrap(t)},goog.dom.safe.documentWrite=function(e,t){e.write(goog.html.SafeHtml.unwrapTrustedHTML(t))},goog.dom.safe.setAnchorHref=function(e,t){goog.dom.asserts.assertIsHTMLAnchorElement(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setImageSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLImageElement(e),!(t instanceof goog.html.SafeUrl)){var r=/^data:image\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,r)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setAudioSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLAudioElement(e),!(t instanceof goog.html.SafeUrl)){var r=/^data:audio\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,r)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setVideoSrc=function(e,t){if(goog.dom.asserts.assertIsHTMLVideoElement(e),!(t instanceof goog.html.SafeUrl)){var r=/^data:video\//i.test(t);t=goog.html.SafeUrl.sanitizeAssertUnchanged(t,r)}e.src=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.setEmbedSrc=function(e,t){goog.dom.asserts.assertIsHTMLEmbedElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setFrameSrc=function(e,t){goog.dom.asserts.assertIsHTMLFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)},goog.dom.safe.setIframeSrcdoc=function(e,t){goog.dom.asserts.assertIsHTMLIFrameElement(e),e.srcdoc=goog.html.SafeHtml.unwrapTrustedHTML(t)},goog.dom.safe.setLinkHrefAndRel=function(e,t,r){goog.dom.asserts.assertIsHTMLLinkElement(e),e.rel=r,goog.string.internal.caseInsensitiveContains(r,"stylesheet")?(goog.asserts.assert(t instanceof goog.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),e.href=goog.html.TrustedResourceUrl.unwrapTrustedURL(t)):e.href=t instanceof goog.html.TrustedResourceUrl?goog.html.TrustedResourceUrl.unwrapTrustedURL(t):t instanceof goog.html.SafeUrl?goog.html.SafeUrl.unwrapTrustedURL(t):goog.html.SafeUrl.unwrapTrustedURL(goog.html.SafeUrl.sanitizeAssertUnchanged(t))},goog.dom.safe.setObjectData=function(e,t){goog.dom.asserts.assertIsHTMLObjectElement(e),e.data=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t)},goog.dom.safe.setScriptSrc=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setScriptContent=function(e,t){goog.dom.asserts.assertIsHTMLScriptElement(e),e.text=goog.html.SafeScript.unwrapTrustedScript(t),(t=goog.getScriptNonce())&&e.setAttribute("nonce",t)},goog.dom.safe.setLocationHref=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.href=goog.html.SafeUrl.unwrapTrustedURL(t)},goog.dom.safe.assignLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.assign(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.replaceLocation=function(e,t){goog.dom.asserts.assertIsLocation(e),t=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitizeAssertUnchanged(t),e.replace(goog.html.SafeUrl.unwrapTrustedURL(t))},goog.dom.safe.openInWindow=function(e,t,r,n,o){return e=e instanceof goog.html.SafeUrl?e:goog.html.SafeUrl.sanitizeAssertUnchanged(e),(t||goog.global).open(goog.html.SafeUrl.unwrapTrustedURL(e),r?goog.string.Const.unwrap(r):"",n,o)},goog.dom.safe.parseFromStringHtml=function(e,t){return goog.dom.safe.parseFromString(e,t,"text/html")},goog.dom.safe.parseFromString=function(e,t,r){return e.parseFromString(goog.html.SafeHtml.unwrapTrustedHTML(t),r)},goog.dom.safe.createImageFromBlob=function(e){if(!/^image\/.*/g.test(e.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var t=goog.global.URL.createObjectURL(e);return(e=new goog.global.Image).onload=function(){goog.global.URL.revokeObjectURL(t)},goog.dom.safe.setImageSrc(e,goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Image blob URL."),t)),e},goog.string.DETECT_DOUBLE_ESCAPING=!1,goog.string.FORCE_NON_DOM_HTML_UNESCAPING=!1,goog.string.Unicode={NBSP:"\xA0"},goog.string.startsWith=goog.string.internal.startsWith,goog.string.endsWith=goog.string.internal.endsWith,goog.string.caseInsensitiveStartsWith=goog.string.internal.caseInsensitiveStartsWith,goog.string.caseInsensitiveEndsWith=goog.string.internal.caseInsensitiveEndsWith,goog.string.caseInsensitiveEquals=goog.string.internal.caseInsensitiveEquals,goog.string.subs=function(e,t){for(var r=e.split("%s"),n="",o=Array.prototype.slice.call(arguments,1);o.length&&1<r.length;)n+=r.shift()+o.shift();return n+r.join("%s")},goog.string.collapseWhitespace=function(e){return e.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},goog.string.isEmptyOrWhitespace=goog.string.internal.isEmptyOrWhitespace,goog.string.isEmptyString=function(e){return e.length==0},goog.string.isEmpty=goog.string.isEmptyOrWhitespace,goog.string.isEmptyOrWhitespaceSafe=function(e){return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(e))},goog.string.isEmptySafe=goog.string.isEmptyOrWhitespaceSafe,goog.string.isBreakingWhitespace=function(e){return!/[^\t\n\r ]/.test(e)},goog.string.isAlpha=function(e){return!/[^a-zA-Z]/.test(e)},goog.string.isNumeric=function(e){return!/[^0-9]/.test(e)},goog.string.isAlphaNumeric=function(e){return!/[^a-zA-Z0-9]/.test(e)},goog.string.isSpace=function(e){return e==" "},goog.string.isUnicodeChar=function(e){return e.length==1&&" "<=e&&"~">=e||"\x80"<=e&&"\uFFFD">=e},goog.string.stripNewlines=function(e){return e.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(e){return e.replace(/(\r\n|\r|\n)/g,`
|
|
34
|
-
`)},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.string.internal.trim,goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=goog.string.internal.caseInsensitiveCompare,goog.string.numberAwareCompare_=function(e,t,r){if(e==t)return 0;if(!e)return-1;if(!t)return 1;for(var n=e.toLowerCase().match(r),o=t.toLowerCase().match(r),l=Math.min(n.length,o.length),s=0;s<l;s++){r=n[s];var i=o[s];if(r!=i)return e=parseInt(r,10),!isNaN(e)&&(t=parseInt(i,10),!isNaN(t)&&e-t)?e-t:r<i?-1:1}return n.length!=o.length?n.length-o.length:e<t?-1:1},goog.string.intAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\D+/g)},goog.string.floatAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\.\d+|\D+/g)},goog.string.numerateCompare=goog.string.floatAwareCompare,goog.string.urlEncode=function(e){return encodeURIComponent(String(e))},goog.string.urlDecode=function(e){return decodeURIComponent(e.replace(/\+/g," "))},goog.string.newLineToBr=goog.string.internal.newLineToBr,goog.string.htmlEscape=function(e,t){return e=goog.string.internal.htmlEscape(e,t),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"e")),e},goog.string.E_RE_=/e/g,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,t){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,t):e},goog.string.unescapeEntitiesUsingDom_=function(e,t){var r={"&":"&","<":"<",">":">",""":'"'},n=t?t.createElement("div"):goog.global.document.createElement("div");return e.replace(goog.string.HTML_ENTITY_PATTERN_,function(o,l){var s=r[o];return s||(l.charAt(0)=="#"&&(l=Number("0"+l.substr(1)),isNaN(l)||(s=String.fromCharCode(l))),s||(goog.dom.safe.setInnerHtml(n,goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Single HTML entity."),o+" ")),s=n.firstChild.nodeValue.slice(0,-1)),r[o]=s)})},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,function(t,r){switch(r){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';default:return r.charAt(0)!="#"||(r=Number("0"+r.substr(1)),isNaN(r))?t:String.fromCharCode(r)}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,t){return goog.string.newLineToBr(e.replace(/ /g,"  "),t)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(e,t){for(var r=t.length,n=0;n<r;n++){var o=r==1?t:t.charAt(n);if(e.charAt(0)==o&&e.charAt(e.length-1)==o)return e.substring(1,e.length-1)}return e},goog.string.truncate=function(e,t,r){return r&&(e=goog.string.unescapeEntities(e)),e.length>t&&(e=e.substring(0,t-3)+"..."),r&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(e,t,r,n){if(r&&(e=goog.string.unescapeEntities(e)),n&&e.length>t){n>t&&(n=t);var o=e.length-n;e=e.substring(0,t-n)+"..."+e.substring(o)}else e.length>t&&(n=Math.floor(t/2),o=e.length-n,e=e.substring(0,n+t%2)+"..."+e.substring(o));return r&&(e=goog.string.htmlEscape(e)),e},goog.string.specialEscapeChars_={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(e){e=String(e);for(var t=['"'],r=0;r<e.length;r++){var n=e.charAt(r),o=n.charCodeAt(0);t[r+1]=goog.string.specialEscapeChars_[n]||(31<o&&127>o?n:goog.string.escapeChar(n))}return t.push('"'),t.join("")},goog.string.escapeString=function(e){for(var t=[],r=0;r<e.length;r++)t[r]=goog.string.escapeChar(e.charAt(r));return t.join("")},goog.string.escapeChar=function(e){if(e in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[e];if(e in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[e]=goog.string.specialEscapeChars_[e];var t=e.charCodeAt(0);if(31<t&&127>t)var r=e;else 256>t?(r="\\x",(16>t||256<t)&&(r+="0")):(r="\\u",4096>t&&(r+="0")),r+=t.toString(16).toUpperCase();return goog.string.jsEscapeCache_[e]=r},goog.string.contains=goog.string.internal.contains,goog.string.caseInsensitiveContains=goog.string.internal.caseInsensitiveContains,goog.string.countOf=function(e,t){return e&&t?e.split(t).length-1:0},goog.string.removeAt=function(e,t,r){var n=e;return 0<=t&&t<e.length&&0<r&&(n=e.substr(0,t)+e.substr(t+r,e.length-t-r)),n},goog.string.remove=function(e,t){return e.replace(t,"")},goog.string.removeAll=function(e,t){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,"")},goog.string.replaceAll=function(e,t,r){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,r.replace(/\$/g,"$$$$"))},goog.string.regExpEscape=function(e){return String(e).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},goog.string.repeat=String.prototype.repeat?function(e,t){return e.repeat(t)}:function(e,t){return Array(t+1).join(e)},goog.string.padNumber=function(e,t,r){return(r=(e=goog.isDef(r)?e.toFixed(r):String(e)).indexOf("."))==-1&&(r=e.length),goog.string.repeat("0",Math.max(0,t-r))+e},goog.string.makeSafe=function(e){return e==null?"":String(e)},goog.string.buildString=function(e){return Array.prototype.join.call(arguments,"")},goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)},goog.string.compareVersions=goog.string.internal.compareVersions,goog.string.hashCode=function(e){for(var t=0,r=0;r<e.length;++r)t=31*t+e.charCodeAt(r)>>>0;return t},goog.string.uniqueStringCounter_=2147483648*Math.random()|0,goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(e){var t=Number(e);return t==0&&goog.string.isEmptyOrWhitespace(e)?NaN:t},goog.string.isLowerCamelCase=function(e){return/^[a-z]+([A-Z][a-z]*)*$/.test(e)},goog.string.isUpperCamelCase=function(e){return/^([A-Z][a-z]*)+$/.test(e)},goog.string.toCamelCase=function(e){return String(e).replace(/\-([a-z])/g,function(t,r){return r.toUpperCase()})},goog.string.toSelectorCase=function(e){return String(e).replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(e,t){return t=goog.isString(t)?goog.string.regExpEscape(t):"\\s",e.replace(new RegExp("(^"+(t?"|["+t+"]+":"")+")([a-z])","g"),function(r,n,o){return n+o.toUpperCase()})},goog.string.capitalize=function(e){return String(e.charAt(0)).toUpperCase()+String(e.substr(1)).toLowerCase()},goog.string.parseInt=function(e){return isFinite(e)&&(e=String(e)),goog.isString(e)?/^\s*-?0x/i.test(e)?parseInt(e,16):parseInt(e,10):NaN},goog.string.splitLimit=function(e,t,r){e=e.split(t);for(var n=[];0<r&&e.length;)n.push(e.shift()),r--;return e.length&&n.push(e.join(t)),n},goog.string.lastComponent=function(e,t){if(!t)return e;typeof t=="string"&&(t=[t]);for(var r=-1,n=0;n<t.length;n++)if(t[n]!=""){var o=e.lastIndexOf(t[n]);o>r&&(r=o)}return r==-1?e:e.slice(r+1)},goog.string.editDistance=function(e,t){var r=[],n=[];if(e==t)return 0;if(!e.length||!t.length)return Math.max(e.length,t.length);for(var o=0;o<t.length+1;o++)r[o]=o;for(o=0;o<e.length;o++){n[0]=o+1;for(var l=0;l<t.length;l++)n[l+1]=Math.min(n[l]+1,r[l+1]+1,r[l]+Number(e[o]!=t[l]));for(l=0;l<r.length;l++)r[l]=n[l]}return n[t.length]},goog.labs.userAgent.platform={},goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")},goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()},goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")},goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")},goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")},goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")},goog.labs.userAgent.platform.isChromecast=function(){return goog.labs.userAgent.util.matchUserAgent("CrKey")},goog.labs.userAgent.platform.isKaiOS=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")},goog.labs.userAgent.platform.isGo2Phone=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("GAFP")},goog.labs.userAgent.platform.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent(),t="";return goog.labs.userAgent.platform.isWindows()?t=(e=(t=/Windows (?:NT|Phone) ([0-9.]+)/).exec(e))?e[1]:"0.0":goog.labs.userAgent.platform.isIos()?t=(e=(t=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/).exec(e))&&e[1].replace(/_/g,"."):goog.labs.userAgent.platform.isMacintosh()?t=(e=(t=/Mac OS X ([0-9_.]+)/).exec(e))?e[1].replace(/_/g,"."):"10":goog.labs.userAgent.platform.isKaiOS()?t=(e=(t=/(?:KaiOS)\/(\S+)/i).exec(e))&&e[1]:goog.labs.userAgent.platform.isAndroid()?t=(e=(t=/Android\s+([^\);]+)(\)|;)/).exec(e))&&e[1]:goog.labs.userAgent.platform.isChromeOS()&&(t=(e=(t=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/).exec(e))&&e[1]),t||""},goog.labs.userAgent.platform.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),e)},goog.reflect={},goog.reflect.object=function(e,t){return t},goog.reflect.objectProperty=function(e,t){return e},goog.reflect.sinkValue=function(e){return goog.reflect.sinkValue[" "](e),e},goog.reflect.sinkValue[" "]=goog.nullFunction,goog.reflect.canAccessProperty=function(e,t){try{return goog.reflect.sinkValue(e[t]),!0}catch{}return!1},goog.reflect.cache=function(e,t,r,n){return n=n?n(t):t,Object.prototype.hasOwnProperty.call(e,n)?e[n]:e[n]=r(t)},goog.labs.userAgent.engine={},goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")},goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent();if(e){e=goog.labs.userAgent.util.extractVersionTuples(e);var t,r=goog.labs.userAgent.engine.getEngineTuple_(e);if(r)return r[0]=="Gecko"?goog.labs.userAgent.engine.getVersionForKey_(e,"Firefox"):r[1];if((e=e[0])&&(t=e[2])&&(t=/Trident\/([^\s;]+)/.exec(t)))return t[1]}return""},goog.labs.userAgent.engine.getEngineTuple_=function(e){if(!goog.labs.userAgent.engine.isEdge())return e[1];for(var t=0;t<e.length;t++){var r=e[t];if(r[0]=="Edge")return r}},goog.labs.userAgent.engine.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),e)},goog.labs.userAgent.engine.getVersionForKey_=function(e,t){return(e=goog.array.find(e,function(r){return t==r[0]}))&&e[1]||""},goog.userAgent={},goog.userAgent.ASSUME_IE=!1,goog.userAgent.ASSUME_EDGE=!1,goog.userAgent.ASSUME_GECKO=!1,goog.userAgent.ASSUME_WEBKIT=!1,goog.userAgent.ASSUME_MOBILE_WEBKIT=!1,goog.userAgent.ASSUME_OPERA=!1,goog.userAgent.ASSUME_ANY_VERSION=!1,goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA,goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()},goog.userAgent.getNavigatorTyped=function(){return goog.global.navigator||null},goog.userAgent.getNavigator=function(){return goog.userAgent.getNavigatorTyped()},goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera(),goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE(),goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge(),goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE,goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko(),goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit(),goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")},goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_(),goog.userAgent.SAFARI=goog.userAgent.WEBKIT,goog.userAgent.determinePlatform_=function(){var e=goog.userAgent.getNavigatorTyped();return e&&e.platform||""},goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_(),goog.userAgent.ASSUME_MAC=!1,goog.userAgent.ASSUME_WINDOWS=!1,goog.userAgent.ASSUME_LINUX=!1,goog.userAgent.ASSUME_X11=!1,goog.userAgent.ASSUME_ANDROID=!1,goog.userAgent.ASSUME_IPHONE=!1,goog.userAgent.ASSUME_IPAD=!1,goog.userAgent.ASSUME_IPOD=!1,goog.userAgent.ASSUME_KAIOS=!1,goog.userAgent.ASSUME_GO2PHONE=!1,goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD,goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh(),goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows(),goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()},goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_(),goog.userAgent.isX11_=function(){var e=goog.userAgent.getNavigatorTyped();return!!e&&goog.string.contains(e.appVersion||"","X11")},goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_(),goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid(),goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone(),goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.IPOD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIpod(),goog.userAgent.IOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIos(),goog.userAgent.KAIOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_KAIOS:goog.labs.userAgent.platform.isKaiOS(),goog.userAgent.GO2PHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_GO2PHONE:goog.labs.userAgent.platform.isGo2Phone(),goog.userAgent.determineVersion_=function(){var e="",t=goog.userAgent.getVersionRegexResult_();return t&&(e=t?t[1]:""),goog.userAgent.IE&&(t=goog.userAgent.getDocumentMode_())!=null&&t>parseFloat(e)?String(t):e},goog.userAgent.getVersionRegexResult_=function(){var e=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv:([^\);]+)(\)|;)/.exec(e):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(e):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(e):goog.userAgent.OPERA?/(?:Version)[ \/]?(\S+)/.exec(e):void 0},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,t){return goog.string.compareVersions(e,t)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_,e,function(){return 0<=goog.string.compareVersions(goog.userAgent.VERSION,e)})},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return Number(goog.userAgent.DOCUMENT_MODE)>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){if(goog.global.document&&goog.userAgent.IE)return goog.userAgent.getDocumentMode_()}(),goog.userAgent.product={},goog.userAgent.product.ASSUME_FIREFOX=!1,goog.userAgent.product.ASSUME_IPHONE=!1,goog.userAgent.product.ASSUME_IPAD=!1,goog.userAgent.product.ASSUME_ANDROID=!1,goog.userAgent.product.ASSUME_CHROME=!1,goog.userAgent.product.ASSUME_SAFARI=!1,goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI,goog.userAgent.product.OPERA=goog.userAgent.OPERA,goog.userAgent.product.IE=goog.userAgent.IE,goog.userAgent.product.EDGE=goog.userAgent.EDGE,goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox(),goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()},goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_(),goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser(),goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome(),goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()},goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_(),goog.crypt.base64={},goog.crypt.base64.DEFAULT_ALPHABET_COMMON_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"+/=",goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"-_.",goog.crypt.base64.Alphabet={DEFAULT:0,NO_PADDING:1,WEBSAFE:2,WEBSAFE_DOT_PADDING:3,WEBSAFE_NO_PADDING:4},goog.crypt.base64.paddingChars_="=.",goog.crypt.base64.isPadding_=function(e){return goog.string.contains(goog.crypt.base64.paddingChars_,e)},goog.crypt.base64.byteToCharMaps_={},goog.crypt.base64.charToByteMap_=null,goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA,goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||typeof goog.global.btoa=="function",goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&typeof goog.global.atob=="function",goog.crypt.base64.encodeByteArray=function(e,t){goog.asserts.assert(goog.isArrayLike(e),"encodeByteArray takes an array as a parameter"),t===void 0&&(t=goog.crypt.base64.Alphabet.DEFAULT),goog.crypt.base64.init_(),t=goog.crypt.base64.byteToCharMaps_[t];for(var r=[],n=0;n<e.length;n+=3){var o=e[n],l=n+1<e.length,s=l?e[n+1]:0,i=n+2<e.length,c=i?e[n+2]:0,u=o>>2;o=(3&o)<<4|s>>4,s=(15&s)<<2|c>>6,c&=63,i||(c=64,l||(s=64)),r.push(t[u],t[o],t[s]||"",t[c]||"")}return r.join("")},goog.crypt.base64.encodeString=function(e,t){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!t?goog.global.btoa(e):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(e),t)},goog.crypt.base64.decodeString=function(e,t){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!t)return goog.global.atob(e);var r="";return goog.crypt.base64.decodeStringInternal_(e,function(n){r+=String.fromCharCode(n)}),r},goog.crypt.base64.decodeStringToByteArray=function(e,t){var r=[];return goog.crypt.base64.decodeStringInternal_(e,function(n){r.push(n)}),r},goog.crypt.base64.decodeStringToUint8Array=function(e){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var t=e.length,r=3*t/4;r%3?r=Math.floor(r):goog.crypt.base64.isPadding_(e[t-1])&&(r=goog.crypt.base64.isPadding_(e[t-2])?r-2:r-1);var n=new Uint8Array(r),o=0;return goog.crypt.base64.decodeStringInternal_(e,function(l){n[o++]=l}),n.subarray(0,o)},goog.crypt.base64.decodeStringInternal_=function(e,t){function r(c){for(;n<e.length;){var u=e.charAt(n++),b=goog.crypt.base64.charToByteMap_[u];if(b!=null)return b;if(!goog.string.isEmptyOrWhitespace(u))throw Error("Unknown base64 encoding at char: "+u)}return c}goog.crypt.base64.init_();for(var n=0;;){var o=r(-1),l=r(0),s=r(64),i=r(64);if(i===64&&o===-1)break;t(o<<2|l>>4),s!=64&&(t(l<<4&240|s>>2),i!=64&&t(s<<6&192|i))}},goog.crypt.base64.init_=function(){if(!goog.crypt.base64.charToByteMap_){goog.crypt.base64.charToByteMap_={};for(var e=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));goog.crypt.base64.byteToCharMaps_[r]=n;for(var o=0;o<n.length;o++){var l=n[o],s=goog.crypt.base64.charToByteMap_[l];s===void 0?goog.crypt.base64.charToByteMap_[l]=o:goog.asserts.assert(s===o)}}}},jspb.utils={},jspb.utils.split64Low=0,jspb.utils.split64High=0,jspb.utils.splitUint64=function(e){var t=e>>>0;e=Math.floor((e-t)/jspb.BinaryConstants.TWO_TO_32)>>>0,jspb.utils.split64Low=t,jspb.utils.split64High=e},jspb.utils.splitInt64=function(e){var t=0>e,r=(e=Math.abs(e))>>>0;e=Math.floor((e-r)/jspb.BinaryConstants.TWO_TO_32),e>>>=0,t&&(e=~e>>>0,4294967295<(r=1+(~r>>>0))&&(r=0,4294967295<++e&&(e=0))),jspb.utils.split64Low=r,jspb.utils.split64High=e},jspb.utils.splitZigzag64=function(e){var t=0>e;e=2*Math.abs(e),jspb.utils.splitUint64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;t&&(e==0?r==0?r=e=4294967295:(r--,e=4294967295):e--),jspb.utils.split64Low=e,jspb.utils.split64High=r},jspb.utils.splitFloat32=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)0<1/e?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648);else if(isNaN(e))jspb.utils.split64High=0,jspb.utils.split64Low=2147483647;else if(e>jspb.BinaryConstants.FLOAT32_MAX)jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|2139095040)>>>0;else if(e<jspb.BinaryConstants.FLOAT32_MIN)e=Math.round(e/Math.pow(2,-149)),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|e)>>>0;else{var r=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-r),e=8388607&Math.round(e*jspb.BinaryConstants.TWO_TO_23),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|r+127<<23|e)>>>0}},jspb.utils.splitFloat64=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)jspb.utils.split64High=0<1/e?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(e))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(e>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(t<<31|2146435072)>>>0,jspb.utils.split64Low=0;else if(e<jspb.BinaryConstants.FLOAT64_MIN){var r=e/Math.pow(2,-1074);e=r/jspb.BinaryConstants.TWO_TO_32,jspb.utils.split64High=(t<<31|e)>>>0,jspb.utils.split64Low=r>>>0}else{var n=0;if(2<=(r=e))for(;2<=r&&1023>n;)n++,r/=2;else for(;1>r&&-1022<n;)r*=2,n--;e=(r=e*Math.pow(2,-n))*jspb.BinaryConstants.TWO_TO_20&1048575,r=r*jspb.BinaryConstants.TWO_TO_52>>>0,jspb.utils.split64High=(t<<31|n+1023<<20|e)>>>0,jspb.utils.split64Low=r}},jspb.utils.splitHash64=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),l=e.charCodeAt(4),s=e.charCodeAt(5),i=e.charCodeAt(6);e=e.charCodeAt(7),jspb.utils.split64Low=t+(r<<8)+(n<<16)+(o<<24)>>>0,jspb.utils.split64High=l+(s<<8)+(i<<16)+(e<<24)>>>0},jspb.utils.joinUint64=function(e,t){return t*jspb.BinaryConstants.TWO_TO_32+(e>>>0)},jspb.utils.joinInt64=function(e,t){var r=2147483648&t;return r&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),e=jspb.utils.joinUint64(e,t),r?-e:e},jspb.utils.toZigzag64=function(e,t,r){var n=t>>31;return r(e<<1^n,(t<<1|e>>>31)^n)},jspb.utils.joinZigzag64=function(e,t){return jspb.utils.fromZigzag64(e,t,jspb.utils.joinInt64)},jspb.utils.fromZigzag64=function(e,t,r){var n=-(1&e);return r((e>>>1|t<<31)^n,t>>>1^n)},jspb.utils.joinFloat32=function(e,t){t=2*(e>>31)+1;var r=e>>>23&255;return e&=8388607,r==255?e?NaN:1/0*t:r==0?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))},jspb.utils.joinFloat64=function(e,t){var r=2*(t>>31)+1,n=t>>>20&2047;return e=jspb.BinaryConstants.TWO_TO_32*(1048575&t)+e,n==2047?e?NaN:1/0*r:n==0?r*Math.pow(2,-1074)*e:r*Math.pow(2,n-1075)*(e+jspb.BinaryConstants.TWO_TO_52)},jspb.utils.joinHash64=function(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)},jspb.utils.DIGITS="0123456789abcdef".split(""),jspb.utils.ZERO_CHAR_CODE_=48,jspb.utils.A_CHAR_CODE_=97,jspb.utils.joinUnsignedDecimalString=function(e,t){function r(o,l){return o=o?String(o):"",l?"0000000".slice(o.length)+o:o}if(2097151>=t)return""+(jspb.BinaryConstants.TWO_TO_32*t+e);var n=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*n+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,1e7<=e&&(n+=Math.floor(e/1e7),e%=1e7),1e7<=n&&(t+=Math.floor(n/1e7),n%=1e7),r(t,0)+r(n,t)+r(e,1)},jspb.utils.joinSignedDecimalString=function(e,t){var r=2147483648&t;return r&&(t=~t+((e=1+~e>>>0)==0?1:0)>>>0),e=jspb.utils.joinUnsignedDecimalString(e,t),r?"-"+e:e},jspb.utils.hash64ToDecimalString=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;return t?jspb.utils.joinSignedDecimalString(e,r):jspb.utils.joinUnsignedDecimalString(e,r)},jspb.utils.hash64ArrayToDecimalStrings=function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]=jspb.utils.hash64ToDecimalString(e[n],t);return r},jspb.utils.decimalStringToHash64=function(e){function t(l,s){for(var i=0;8>i&&(l!==1||0<s);i++)s=l*n[i]+s,n[i]=255&s,s>>>=8}goog.asserts.assert(0<e.length);var r=!1;e[0]==="-"&&(r=!0,e=e.slice(1));for(var n=[0,0,0,0,0,0,0,0],o=0;o<e.length;o++)t(10,e.charCodeAt(o)-jspb.utils.ZERO_CHAR_CODE_);return r&&(function(){for(var l=0;8>l;l++)n[l]=255&~n[l]}(),t(1,1)),goog.crypt.byteArrayToString(n)},jspb.utils.splitDecimalString=function(e){jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e))},jspb.utils.toHexDigit_=function(e){return String.fromCharCode(10>e?jspb.utils.ZERO_CHAR_CODE_+e:jspb.utils.A_CHAR_CODE_-10+e)},jspb.utils.fromHexCharCode_=function(e){return e>=jspb.utils.A_CHAR_CODE_?e-jspb.utils.A_CHAR_CODE_+10:e-jspb.utils.ZERO_CHAR_CODE_},jspb.utils.hash64ToHexString=function(e){var t=Array(18);t[0]="0",t[1]="x";for(var r=0;8>r;r++){var n=e.charCodeAt(7-r);t[2*r+2]=jspb.utils.toHexDigit_(n>>4),t[2*r+3]=jspb.utils.toHexDigit_(15&n)}return t.join("")},jspb.utils.hexStringToHash64=function(e){e=e.toLowerCase(),goog.asserts.assert(e.length==18),goog.asserts.assert(e[0]=="0"),goog.asserts.assert(e[1]=="x");for(var t="",r=0;8>r;r++){var n=jspb.utils.fromHexCharCode_(e.charCodeAt(2*r+2)),o=jspb.utils.fromHexCharCode_(e.charCodeAt(2*r+3));t=String.fromCharCode(16*n+o)+t}return t},jspb.utils.hash64ToNumber=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;return t?jspb.utils.joinInt64(e,r):jspb.utils.joinUint64(e,r)},jspb.utils.numberToHash64=function(e){return jspb.utils.splitInt64(e),jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.utils.countVarints=function(e,t,r){for(var n=0,o=t;o<r;o++)n+=e[o]>>7;return r-t-n},jspb.utils.countVarintFields=function(e,t,r,n){var o=0;if(128>(n=8*n+jspb.BinaryConstants.WireType.VARINT))for(;t<r&&e[t++]==n;)for(o++;;){var l=e[t++];if((128&l)==0)break}else for(;t<r;){for(l=n;128<l;){if(e[t]!=(127&l|128))return o;t++,l>>=7}if(e[t++]!=l)break;for(o++;(128&(l=e[t++]))!=0;);}return o},jspb.utils.countFixedFields_=function(e,t,r,n,o){var l=0;if(128>n)for(;t<r&&e[t++]==n;)l++,t+=o;else for(;t<r;){for(var s=n;128<s;){if(e[t++]!=(127&s|128))return l;s>>=7}if(e[t++]!=s)break;l++,t+=o}return l},jspb.utils.countFixed32Fields=function(e,t,r,n){return jspb.utils.countFixedFields_(e,t,r,8*n+jspb.BinaryConstants.WireType.FIXED32,4)},jspb.utils.countFixed64Fields=function(e,t,r,n){return jspb.utils.countFixedFields_(e,t,r,8*n+jspb.BinaryConstants.WireType.FIXED64,8)},jspb.utils.countDelimitedFields=function(e,t,r,n){var o=0;for(n=8*n+jspb.BinaryConstants.WireType.DELIMITED;t<r;){for(var l=n;128<l;){if(e[t++]!=(127&l|128))return o;l>>=7}if(e[t++]!=l)break;o++;for(var s=0,i=1;s+=(127&(l=e[t++]))*i,i*=128,(128&l)!=0;);t+=s}return o},jspb.utils.debugBytesToTextFormat=function(e){var t='"';if(e){e=jspb.utils.byteSourceToUint8Array(e);for(var r=0;r<e.length;r++)t+="\\x",16>e[r]&&(t+="0"),t+=e[r].toString(16)}return t+'"'},jspb.utils.debugScalarToTextFormat=function(e){return typeof e=="string"?goog.string.quote(e):e.toString()},jspb.utils.stringToByteArray=function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++){var n=e.charCodeAt(r);if(255<n)throw Error("Conversion error: string contains codepoint outside of byte range");t[r]=n}return t},jspb.utils.byteSourceToUint8Array=function(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||Buffer!==void 0&&e.constructor===Buffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Type not convertible to Uint8Array."),new Uint8Array(0))},jspb.BinaryDecoder=function(e,t,r){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1,e&&this.setBlock(e,t,r)},jspb.BinaryDecoder.instanceCache_=[],jspb.BinaryDecoder.alloc=function(e,t,r){if(jspb.BinaryDecoder.instanceCache_.length){var n=jspb.BinaryDecoder.instanceCache_.pop();return e&&n.setBlock(e,t,r),n}return new jspb.BinaryDecoder(e,t,r)},jspb.BinaryDecoder.prototype.free=function(){this.clear(),100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)},jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)},jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1},jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_},jspb.BinaryDecoder.prototype.setBlock=function(e,t,r){this.bytes_=jspb.utils.byteSourceToUint8Array(e),this.start_=t!==void 0?t:0,this.end_=r!==void 0?this.start_+r:this.bytes_.length,this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_},jspb.BinaryDecoder.prototype.setEnd=function(e){this.end_=e},jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_},jspb.BinaryDecoder.prototype.setCursor=function(e){this.cursor_=e},jspb.BinaryDecoder.prototype.advance=function(e){this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_)},jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_},jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_},jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_},jspb.BinaryDecoder.prototype.readSplitVarint64=function(e){for(var t=128,r=0,n=0,o=0;4>o&&128<=t;o++)r|=(127&(t=this.bytes_[this.cursor_++]))<<7*o;if(128<=t&&(r|=(127&(t=this.bytes_[this.cursor_++]))<<28,n|=(127&t)>>4),128<=t)for(o=0;5>o&&128<=t;o++)n|=(127&(t=this.bytes_[this.cursor_++]))<<7*o+3;if(128>t)return e(r>>>0,n>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid."),this.error_=!0},jspb.BinaryDecoder.prototype.readSplitZigzagVarint64=function(e){return this.readSplitVarint64(function(t,r){return jspb.utils.fromZigzag64(t,r,e)})},jspb.BinaryDecoder.prototype.readSplitFixed64=function(e){var t=this.bytes_,r=this.cursor_;this.cursor_+=8;for(var n=0,o=0,l=r+7;l>=r;l--)n=n<<8|t[l],o=o<<8|t[l+4];return e(n,o)},jspb.BinaryDecoder.prototype.skipVarint=function(){for(;128&this.bytes_[this.cursor_];)this.cursor_++;this.cursor_++},jspb.BinaryDecoder.prototype.unskipVarint=function(e){for(;128<e;)this.cursor_--,e>>>=7;this.cursor_--},jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var e=this.bytes_,t=e[this.cursor_+0],r=127&t;return 128>t?(this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+1]))<<7,128>t?(this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+2]))<<14,128>t?(this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+3]))<<21,128>t?(this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(15&(t=e[this.cursor_+4]))<<28,128>t?(this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),r>>>0):(this.cursor_+=5,128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&goog.asserts.assert(!1),goog.asserts.assert(this.cursor_<=this.end_),r)))))},jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32,jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()},jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()},jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var e=this.readUnsignedVarint32();return e>>>1^-(1&e)},jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinUint64)},jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinUnsignedDecimalString)},jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinInt64)},jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64(jspb.utils.joinZigzag64)},jspb.BinaryDecoder.prototype.readZigzagVarintHash64=function(){return this.readSplitZigzagVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readSplitZigzagVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readUint8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e},jspb.BinaryDecoder.prototype.readUint16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8},jspb.BinaryDecoder.prototype.readUint32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8|r<<16|n<<24)>>>0},jspb.BinaryDecoder.prototype.readUint64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUint64(e,t)},jspb.BinaryDecoder.prototype.readUint64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUnsignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readInt8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e<<24>>24},jspb.BinaryDecoder.prototype.readInt16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8)<<16>>16},jspb.BinaryDecoder.prototype.readInt32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8|r<<16|n<<24},jspb.BinaryDecoder.prototype.readInt64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinInt64(e,t)},jspb.BinaryDecoder.prototype.readInt64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinSignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readFloat=function(){var e=this.readUint32();return jspb.utils.joinFloat32(e,0)},jspb.BinaryDecoder.prototype.readDouble=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinFloat64(e,t)},jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]},jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()},jspb.BinaryDecoder.prototype.readString=function(e){var t=this.bytes_,r=this.cursor_;e=r+e;for(var n=[],o="";r<e;){var l=t[r++];if(128>l)n.push(l);else{if(192>l)continue;if(224>l){var s=t[r++];n.push((31&l)<<6|63&s)}else if(240>l){s=t[r++];var i=t[r++];n.push((15&l)<<12|(63&s)<<6|63&i)}else 248>l&&(l=(7&l)<<18|(63&(s=t[r++]))<<12|(63&(i=t[r++]))<<6|63&t[r++],l-=65536,n.push(55296+(l>>10&1023),56320+(1023&l)))}8192<=n.length&&(o+=String.fromCharCode.apply(null,n),n.length=0)}return o+=goog.crypt.byteArrayToString(n),this.cursor_=r,o},jspb.BinaryDecoder.prototype.readStringWithLength=function(){var e=this.readUnsignedVarint32();return this.readString(e)},jspb.BinaryDecoder.prototype.readBytes=function(e){if(0>e||this.cursor_+e>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var t=this.bytes_.subarray(this.cursor_,this.cursor_+e);return this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_),t},jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readFixedHash64=function(){var e=this.bytes_,t=this.cursor_,r=e[t+0],n=e[t+1],o=e[t+2],l=e[t+3],s=e[t+4],i=e[t+5],c=e[t+6];return e=e[t+7],this.cursor_+=8,String.fromCharCode(r,n,o,l,s,i,c,e)},jspb.BinaryReader=function(e,t,r){this.decoder_=jspb.BinaryDecoder.alloc(e,t,r),this.fieldCursor_=this.decoder_.getCursor(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null},jspb.BinaryReader.instanceCache_=[],jspb.BinaryReader.alloc=function(e,t,r){if(jspb.BinaryReader.instanceCache_.length){var n=jspb.BinaryReader.instanceCache_.pop();return e&&n.decoder_.setBlock(e,t,r),n}return new jspb.BinaryReader(e,t,r)},jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc,jspb.BinaryReader.prototype.free=function(){this.decoder_.clear(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null,100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)},jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_},jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()},jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()},jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_},jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_},jspb.BinaryReader.prototype.isDelimited=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED},jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP},jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()},jspb.BinaryReader.prototype.setBlock=function(e,t,r){this.decoder_.setBlock(e,t,r),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.advance=function(e){this.decoder_.advance(e)},jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var e=this.decoder_.readUnsignedVarint32(),t=e>>>3;return(e&=7)!=jspb.BinaryConstants.WireType.VARINT&&e!=jspb.BinaryConstants.WireType.FIXED32&&e!=jspb.BinaryConstants.WireType.FIXED64&&e!=jspb.BinaryConstants.WireType.DELIMITED&&e!=jspb.BinaryConstants.WireType.START_GROUP&&e!=jspb.BinaryConstants.WireType.END_GROUP?(goog.asserts.fail("Invalid wire type: %s (at position %s)",e,this.fieldCursor_),this.error_=!0,!1):(this.nextField_=t,this.nextWireType_=e,!0)},jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)},jspb.BinaryReader.prototype.skipMatchingFields=function(){var e=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==e;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()},jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.VARINT?(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField()):this.decoder_.skipVarint()},jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var e=this.decoder_.readUnsignedVarint32();this.decoder_.advance(e)}},jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED32?(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField()):this.decoder_.advance(4)},jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED64?(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField()):this.decoder_.advance(8)},jspb.BinaryReader.prototype.skipGroup=function(){for(var e=this.nextField_;;){if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF"),this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP){this.nextField_!=e&&(goog.asserts.fail("Unmatched end-group tag"),this.error_=!0);break}this.skipField()}},jspb.BinaryReader.prototype.skipField=function(){switch(this.nextWireType_){case jspb.BinaryConstants.WireType.VARINT:this.skipVarintField();break;case jspb.BinaryConstants.WireType.FIXED64:this.skipFixed64Field();break;case jspb.BinaryConstants.WireType.DELIMITED:this.skipDelimitedField();break;case jspb.BinaryConstants.WireType.FIXED32:this.skipFixed32Field();break;case jspb.BinaryConstants.WireType.START_GROUP:this.skipGroup();break;default:goog.asserts.fail("Invalid wire encoding for field.")}},jspb.BinaryReader.prototype.registerReadCallback=function(e,t){this.readCallbacks_===null&&(this.readCallbacks_={}),goog.asserts.assert(!this.readCallbacks_[e]),this.readCallbacks_[e]=t},jspb.BinaryReader.prototype.runReadCallback=function(e){return goog.asserts.assert(this.readCallbacks_!==null),e=this.readCallbacks_[e],goog.asserts.assert(e),e(this)},jspb.BinaryReader.prototype.readAny=function(e){this.nextWireType_=jspb.BinaryConstants.FieldTypeToWireType(e);var t=jspb.BinaryConstants.FieldType;switch(e){case t.DOUBLE:return this.readDouble();case t.FLOAT:return this.readFloat();case t.INT64:return this.readInt64();case t.UINT64:return this.readUint64();case t.INT32:return this.readInt32();case t.FIXED64:return this.readFixed64();case t.FIXED32:return this.readFixed32();case t.BOOL:return this.readBool();case t.STRING:return this.readString();case t.GROUP:goog.asserts.fail("Group field type not supported in readAny()");case t.MESSAGE:goog.asserts.fail("Message field type not supported in readAny()");case t.BYTES:return this.readBytes();case t.UINT32:return this.readUint32();case t.ENUM:return this.readEnum();case t.SFIXED32:return this.readSfixed32();case t.SFIXED64:return this.readSfixed64();case t.SINT32:return this.readSint32();case t.SINT64:return this.readSint64();case t.FHASH64:return this.readFixedHash64();case t.VHASH64:return this.readVarintHash64();default:goog.asserts.fail("Invalid field type in readAny()")}return 0},jspb.BinaryReader.prototype.readMessage=function(e,t){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var r=this.decoder_.getEnd(),n=this.decoder_.readUnsignedVarint32();n=this.decoder_.getCursor()+n,this.decoder_.setEnd(n),t(e,this),this.decoder_.setCursor(n),this.decoder_.setEnd(r)},jspb.BinaryReader.prototype.readGroup=function(e,t,r){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP),goog.asserts.assert(this.nextField_==e),r(t,this),this.error_||this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP||(goog.asserts.fail("Group submessage did not end with an END_GROUP tag"),this.error_=!0)},jspb.BinaryReader.prototype.getFieldDecoder=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32(),t=this.decoder_.getCursor(),r=t+e;return e=jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(),t,e),this.decoder_.setCursor(r),e},jspb.BinaryReader.prototype.readInt32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32()},jspb.BinaryReader.prototype.readInt32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32String()},jspb.BinaryReader.prototype.readInt64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readInt64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64String()},jspb.BinaryReader.prototype.readUint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readUint32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32String()},jspb.BinaryReader.prototype.readUint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64()},jspb.BinaryReader.prototype.readUint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64String()},jspb.BinaryReader.prototype.readSint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint32()},jspb.BinaryReader.prototype.readSint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64()},jspb.BinaryReader.prototype.readSint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64String()},jspb.BinaryReader.prototype.readFixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readUint32()},jspb.BinaryReader.prototype.readFixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64()},jspb.BinaryReader.prototype.readFixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64String()},jspb.BinaryReader.prototype.readSfixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32()},jspb.BinaryReader.prototype.readSfixed32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32().toString()},jspb.BinaryReader.prototype.readSfixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64()},jspb.BinaryReader.prototype.readSfixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64String()},jspb.BinaryReader.prototype.readFloat=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readFloat()},jspb.BinaryReader.prototype.readDouble=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readDouble()},jspb.BinaryReader.prototype.readBool=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),!!this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readEnum=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readString=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readString(e)},jspb.BinaryReader.prototype.readBytes=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readBytes(e)},jspb.BinaryReader.prototype.readVarintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readVarintHash64()},jspb.BinaryReader.prototype.readSintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarintHash64()},jspb.BinaryReader.prototype.readSplitVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(e)},jspb.BinaryReader.prototype.readSplitZigzagVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(function(t,r){return jspb.utils.fromZigzag64(t,r,e)})},jspb.BinaryReader.prototype.readFixedHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readFixedHash64()},jspb.BinaryReader.prototype.readSplitFixed64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readSplitFixed64(e)},jspb.BinaryReader.prototype.readPackedField_=function(e){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var t=this.decoder_.readUnsignedVarint32();t=this.decoder_.getCursor()+t;for(var r=[];this.decoder_.getCursor()<t;)r.push(e.call(this.decoder_));return r},jspb.BinaryReader.prototype.readPackedInt32=function(){return this.readPackedField_(this.decoder_.readSignedVarint32)},jspb.BinaryReader.prototype.readPackedInt32String=function(){return this.readPackedField_(this.decoder_.readSignedVarint32String)},jspb.BinaryReader.prototype.readPackedInt64=function(){return this.readPackedField_(this.decoder_.readSignedVarint64)},jspb.BinaryReader.prototype.readPackedInt64String=function(){return this.readPackedField_(this.decoder_.readSignedVarint64String)},jspb.BinaryReader.prototype.readPackedUint32=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32)},jspb.BinaryReader.prototype.readPackedUint32String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32String)},jspb.BinaryReader.prototype.readPackedUint64=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64)},jspb.BinaryReader.prototype.readPackedUint64String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64String)},jspb.BinaryReader.prototype.readPackedSint32=function(){return this.readPackedField_(this.decoder_.readZigzagVarint32)},jspb.BinaryReader.prototype.readPackedSint64=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64)},jspb.BinaryReader.prototype.readPackedSint64String=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64String)},jspb.BinaryReader.prototype.readPackedFixed32=function(){return this.readPackedField_(this.decoder_.readUint32)},jspb.BinaryReader.prototype.readPackedFixed64=function(){return this.readPackedField_(this.decoder_.readUint64)},jspb.BinaryReader.prototype.readPackedFixed64String=function(){return this.readPackedField_(this.decoder_.readUint64String)},jspb.BinaryReader.prototype.readPackedSfixed32=function(){return this.readPackedField_(this.decoder_.readInt32)},jspb.BinaryReader.prototype.readPackedSfixed64=function(){return this.readPackedField_(this.decoder_.readInt64)},jspb.BinaryReader.prototype.readPackedSfixed64String=function(){return this.readPackedField_(this.decoder_.readInt64String)},jspb.BinaryReader.prototype.readPackedFloat=function(){return this.readPackedField_(this.decoder_.readFloat)},jspb.BinaryReader.prototype.readPackedDouble=function(){return this.readPackedField_(this.decoder_.readDouble)},jspb.BinaryReader.prototype.readPackedBool=function(){return this.readPackedField_(this.decoder_.readBool)},jspb.BinaryReader.prototype.readPackedEnum=function(){return this.readPackedField_(this.decoder_.readEnum)},jspb.BinaryReader.prototype.readPackedVarintHash64=function(){return this.readPackedField_(this.decoder_.readVarintHash64)},jspb.BinaryReader.prototype.readPackedFixedHash64=function(){return this.readPackedField_(this.decoder_.readFixedHash64)},jspb.Map=function(e,t){this.arr_=e,this.valueCtor_=t,this.map_={},this.arrClean=!0,0<this.arr_.length&&this.loadFromArray_()},jspb.Map.prototype.loadFromArray_=function(){for(var e=0;e<this.arr_.length;e++){var t=this.arr_[e],r=t[0];this.map_[r.toString()]=new jspb.Map.Entry_(r,t[1])}this.arrClean=!0},jspb.Map.prototype.toArray=function(){if(this.arrClean){if(this.valueCtor_){var e,t=this.map_;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e].valueWrapper;r&&r.toArray()}}}else{for(this.arr_.length=0,(t=this.stringKeys_()).sort(),e=0;e<t.length;e++){var n=this.map_[t[e]];(r=n.valueWrapper)&&r.toArray(),this.arr_.push([n.key,n.value])}this.arrClean=!0}return this.arr_},jspb.Map.prototype.toObject=function(e,t){for(var r=this.toArray(),n=[],o=0;o<r.length;o++){var l=this.map_[r[o][0].toString()];this.wrapEntry_(l);var s=l.valueWrapper;s?(goog.asserts.assert(t),n.push([l.key,t(e,s)])):n.push([l.key,l.value])}return n},jspb.Map.fromObject=function(e,t,r){t=new jspb.Map([],t);for(var n=0;n<e.length;n++){var o=e[n][0],l=r(e[n][1]);t.set(o,l)}return t},jspb.Map.ArrayIteratorIterable_=function(e){this.idx_=0,this.arr_=e},jspb.Map.ArrayIteratorIterable_.prototype.next=function(){return this.idx_<this.arr_.length?{done:!1,value:this.arr_[this.idx_++]}:{done:!0,value:void 0}},typeof Symbol!="undefined"&&(jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator]=function(){return this}),jspb.Map.prototype.getLength=function(){return this.stringKeys_().length},jspb.Map.prototype.clear=function(){this.map_={},this.arrClean=!1},jspb.Map.prototype.del=function(e){e=e.toString();var t=this.map_.hasOwnProperty(e);return delete this.map_[e],this.arrClean=!1,t},jspb.Map.prototype.getEntryList=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++){var n=this.map_[t[r]];e.push([n.key,n.value])}return e},jspb.Map.prototype.entries=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++){var n=this.map_[t[r]];e.push([n.key,this.wrapEntry_(n)])}return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.keys=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++)e.push(this.map_[t[r]].key);return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.values=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++)e.push(this.wrapEntry_(this.map_[t[r]]));return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.forEach=function(e,t){var r=this.stringKeys_();r.sort();for(var n=0;n<r.length;n++){var o=this.map_[r[n]];e.call(t,this.wrapEntry_(o),o.key,this)}},jspb.Map.prototype.set=function(e,t){var r=new jspb.Map.Entry_(e);return this.valueCtor_?(r.valueWrapper=t,r.value=t.toArray()):r.value=t,this.map_[e.toString()]=r,this.arrClean=!1,this},jspb.Map.prototype.wrapEntry_=function(e){return this.valueCtor_?(e.valueWrapper||(e.valueWrapper=new this.valueCtor_(e.value)),e.valueWrapper):e.value},jspb.Map.prototype.get=function(e){if(e=this.map_[e.toString()])return this.wrapEntry_(e)},jspb.Map.prototype.has=function(e){return e.toString()in this.map_},jspb.Map.prototype.serializeBinary=function(e,t,r,n,o){var l=this.stringKeys_();l.sort();for(var s=0;s<l.length;s++){var i=this.map_[l[s]];t.beginSubMessage(e),r.call(t,1,i.key),this.valueCtor_?n.call(t,2,this.wrapEntry_(i),o):n.call(t,2,i.value),t.endSubMessage()}},jspb.Map.deserializeBinary=function(e,t,r,n,o,l,s){for(;t.nextField()&&!t.isEndGroup();){var i=t.getFieldNumber();i==1?l=r.call(t):i==2&&(e.valueCtor_?(goog.asserts.assert(o),s||(s=new e.valueCtor_),n.call(t,s,o)):s=n.call(t))}goog.asserts.assert(l!=null),goog.asserts.assert(s!=null),e.set(l,s)},jspb.Map.prototype.stringKeys_=function(){var e,t=this.map_,r=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(e);return r},jspb.Map.Entry_=function(e,t){this.key=e,this.value=t,this.valueWrapper=void 0},jspb.ExtensionFieldInfo=function(e,t,r,n,o){this.fieldIndex=e,this.fieldName=t,this.ctor=r,this.toObjectFn=n,this.isRepeated=o},jspb.ExtensionFieldBinaryInfo=function(e,t,r,n,o,l){this.fieldInfo=e,this.binaryReaderFn=t,this.binaryWriterFn=r,this.binaryMessageSerializeFn=n,this.binaryMessageDeserializeFn=o,this.isPacked=l},jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor},jspb.Message=function(){},jspb.Message.GENERATE_TO_OBJECT=!0,jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE,jspb.Message.GENERATE_TO_STRING=!0,jspb.Message.ASSUME_LOCAL_ARRAYS=!1,jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0,jspb.Message.SUPPORTS_UINT8ARRAY_=typeof Uint8Array=="function",jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_},jspb.Message.getIndex_=function(e,t){return t+e.arrayIndexOffset_},jspb.Message.hiddenES6Property_=function(){},jspb.Message.getFieldNumber_=function(e,t){return t-e.arrayIndexOffset_},jspb.Message.initialize=function(e,t,r,n,o,l){if(e.wrappers_=null,t||(t=r?[r]:[]),e.messageId_=r?String(r):void 0,e.arrayIndexOffset_=r===0?-1:0,e.array=t,jspb.Message.initPivotAndExtensionObject_(e,n),e.convertedPrimitiveFields_={},jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(e.repeatedFields=o),o)for(t=0;t<o.length;t++)(r=o[t])<e.pivot_?(r=jspb.Message.getIndex_(e,r),e.array[r]=e.array[r]||jspb.Message.EMPTY_LIST_SENTINEL_):(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[r]=e.extensionObject_[r]||jspb.Message.EMPTY_LIST_SENTINEL_);if(l&&l.length)for(t=0;t<l.length;t++)jspb.Message.computeOneofCase(e,l[t])},jspb.Message.EMPTY_LIST_SENTINEL_=goog.DEBUG&&Object.freeze?Object.freeze([]):[],jspb.Message.isArray_=function(e){return jspb.Message.ASSUME_LOCAL_ARRAYS?e instanceof Array:Array.isArray(e)},jspb.Message.isExtensionObject_=function(e){return!(e===null||typeof e!="object"||jspb.Message.isArray_(e)||jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)},jspb.Message.initPivotAndExtensionObject_=function(e,t){var r=e.array.length,n=-1;if(r&&(n=r-1,r=e.array[n],jspb.Message.isExtensionObject_(r)))return e.pivot_=jspb.Message.getFieldNumber_(e,n),void(e.extensionObject_=r);-1<t?(e.pivot_=Math.max(t,jspb.Message.getFieldNumber_(e,n+1)),e.extensionObject_=null):e.pivot_=Number.MAX_VALUE},jspb.Message.maybeInitEmptyExtensionObject_=function(e){var t=jspb.Message.getIndex_(e,e.pivot_);e.array[t]||(e.extensionObject_=e.array[t]={})},jspb.Message.toObjectList=function(e,t,r){for(var n=[],o=0;o<e.length;o++)n[o]=t.call(e[o],r,e[o]);return n},jspb.Message.toObjectExtension=function(e,t,r,n,o){for(var l in r){var s=r[l],i=n.call(e,s);if(i!=null){for(var c in s.fieldName)if(s.fieldName.hasOwnProperty(c))break;t[c]=s.toObjectFn?s.isRepeated?jspb.Message.toObjectList(i,s.toObjectFn,o):s.toObjectFn(o,i):i}}},jspb.Message.serializeBinaryExtensions=function(e,t,r,n){for(var o in r){var l=r[o],s=l.fieldInfo;if(!l.binaryWriterFn)throw Error("Message extension present that was generated without binary serialization support");var i=n.call(e,s);if(i!=null)if(s.isMessageType()){if(!l.binaryMessageSerializeFn)throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");l.binaryWriterFn.call(t,s.fieldIndex,i,l.binaryMessageSerializeFn)}else l.binaryWriterFn.call(t,s.fieldIndex,i)}},jspb.Message.readBinaryExtension=function(e,t,r,n,o){var l=r[t.getFieldNumber()];if(l){if(r=l.fieldInfo,!l.binaryReaderFn)throw Error("Deserializing extension whose generated code does not support binary format");if(r.isMessageType()){var s=new r.ctor;l.binaryReaderFn.call(t,s,l.binaryMessageDeserializeFn)}else s=l.binaryReaderFn.call(t);r.isRepeated&&!l.isPacked?(t=n.call(e,r))?t.push(s):o.call(e,r,[s]):o.call(e,r,s)}else t.skipField()},jspb.Message.getField=function(e,t){if(t<e.pivot_){t=jspb.Message.getIndex_(e,t);var r=e.array[t];return r===jspb.Message.EMPTY_LIST_SENTINEL_?e.array[t]=[]:r}if(e.extensionObject_)return(r=e.extensionObject_[t])===jspb.Message.EMPTY_LIST_SENTINEL_?e.extensionObject_[t]=[]:r},jspb.Message.getRepeatedField=function(e,t){return jspb.Message.getField(e,t)},jspb.Message.getOptionalFloatingPointField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:+e},jspb.Message.getBooleanField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:!!e},jspb.Message.getRepeatedFloatingPointField=function(e,t){var r=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var n=0;n<r.length;n++)r[n]=+r[n];e.convertedPrimitiveFields_[t]=!0}return r},jspb.Message.getRepeatedBooleanField=function(e,t){var r=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var n=0;n<r.length;n++)r[n]=!!r[n];e.convertedPrimitiveFields_[t]=!0}return r},jspb.Message.bytesAsB64=function(e){return e==null||typeof e=="string"?e:jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array?goog.crypt.base64.encodeByteArray(e):(goog.asserts.fail("Cannot coerce to b64 string: "+goog.typeOf(e)),null)},jspb.Message.bytesAsU8=function(e){return e==null||e instanceof Uint8Array?e:typeof e=="string"?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Cannot coerce to Uint8Array: "+goog.typeOf(e)),null)},jspb.Message.bytesListAsB64=function(e){return jspb.Message.assertConsistentTypes_(e),e.length&&typeof e[0]!="string"?goog.array.map(e,jspb.Message.bytesAsB64):e},jspb.Message.bytesListAsU8=function(e){return jspb.Message.assertConsistentTypes_(e),!e.length||e[0]instanceof Uint8Array?e:goog.array.map(e,jspb.Message.bytesAsU8)},jspb.Message.assertConsistentTypes_=function(e){if(goog.DEBUG&&e&&1<e.length){var t=goog.typeOf(e[0]);goog.array.forEach(e,function(r){goog.typeOf(r)!=t&&goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got "+goog.typeOf(r)+" expected "+t)})}},jspb.Message.getFieldWithDefault=function(e,t,r){return(e=jspb.Message.getField(e,t))==null?r:e},jspb.Message.getBooleanFieldWithDefault=function(e,t,r){return(e=jspb.Message.getBooleanField(e,t))==null?r:e},jspb.Message.getFloatingPointFieldWithDefault=function(e,t,r){return(e=jspb.Message.getOptionalFloatingPointField(e,t))==null?r:e},jspb.Message.getFieldProto3=jspb.Message.getFieldWithDefault,jspb.Message.getMapField=function(e,t,r,n){if(e.wrappers_||(e.wrappers_={}),t in e.wrappers_)return e.wrappers_[t];var o=jspb.Message.getField(e,t);if(!o){if(r)return;o=[],jspb.Message.setField(e,t,o)}return e.wrappers_[t]=new jspb.Map(o,n)},jspb.Message.setField=function(e,t,r){return goog.asserts.assertInstanceof(e,jspb.Message),t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=r:(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[t]=r),e},jspb.Message.setProto3IntField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3FloatField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3BooleanField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,!1)},jspb.Message.setProto3StringField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"")},jspb.Message.setProto3BytesField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"")},jspb.Message.setProto3EnumField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3StringIntField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"0")},jspb.Message.setFieldIgnoringDefault_=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),r!==n?jspb.Message.setField(e,t,r):t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=null:(jspb.Message.maybeInitEmptyExtensionObject_(e),delete e.extensionObject_[t]),e},jspb.Message.addToRepeatedField=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),t=jspb.Message.getRepeatedField(e,t),n!=null?t.splice(n,0,r):t.push(r),e},jspb.Message.setOneofField=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),(r=jspb.Message.computeOneofCase(e,r))&&r!==t&&n!==void 0&&(e.wrappers_&&r in e.wrappers_&&(e.wrappers_[r]=void 0),jspb.Message.setField(e,r,void 0)),jspb.Message.setField(e,t,n)},jspb.Message.computeOneofCase=function(e,t){for(var r,n,o=0;o<t.length;o++){var l=t[o],s=jspb.Message.getField(e,l);s!=null&&(r=l,n=s,jspb.Message.setField(e,l,void 0))}return r?(jspb.Message.setField(e,r,n),r):0},jspb.Message.getWrapperField=function(e,t,r,n){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[r]){var o=jspb.Message.getField(e,r);(n||o)&&(e.wrappers_[r]=new t(o))}return e.wrappers_[r]},jspb.Message.getRepeatedWrapperField=function(e,t,r){return jspb.Message.wrapRepeatedField_(e,t,r),(t=e.wrappers_[r])==jspb.Message.EMPTY_LIST_SENTINEL_&&(t=e.wrappers_[r]=[]),t},jspb.Message.wrapRepeatedField_=function(e,t,r){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[r]){for(var n=jspb.Message.getRepeatedField(e,r),o=[],l=0;l<n.length;l++)o[l]=new t(n[l]);e.wrappers_[r]=o}},jspb.Message.setWrapperField=function(e,t,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var n=r&&r.toArray();return e.wrappers_[t]=r,jspb.Message.setField(e,t,n)},jspb.Message.setOneofWrapperField=function(e,t,r,n){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var o=n&&n.toArray();return e.wrappers_[t]=n,jspb.Message.setOneofField(e,t,r,o)},jspb.Message.setRepeatedWrapperField=function(e,t,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={}),r=r||[];for(var n=[],o=0;o<r.length;o++)n[o]=r[o].toArray();return e.wrappers_[t]=r,jspb.Message.setField(e,t,n)},jspb.Message.addToRepeatedWrapperField=function(e,t,r,n,o){jspb.Message.wrapRepeatedField_(e,n,t);var l=e.wrappers_[t];return l||(l=e.wrappers_[t]=[]),r=r||new n,e=jspb.Message.getRepeatedField(e,t),o!=null?(l.splice(o,0,r),e.splice(o,0,r.toArray())):(l.push(r),e.push(r.toArray())),r},jspb.Message.toMap=function(e,t,r,n){for(var o={},l=0;l<e.length;l++)o[t.call(e[l])]=r?r.call(e[l],n,e[l]):e[l];return o},jspb.Message.prototype.syncMapFields_=function(){if(this.wrappers_)for(var e in this.wrappers_){var t=this.wrappers_[e];if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&t[r].toArray();else t&&t.toArray()}},jspb.Message.prototype.toArray=function(){return this.syncMapFields_(),this.array},jspb.Message.GENERATE_TO_STRING&&(jspb.Message.prototype.toString=function(){return this.syncMapFields_(),this.array.toString()}),jspb.Message.prototype.getExtension=function(e){if(this.extensionObject_){this.wrappers_||(this.wrappers_={});var t=e.fieldIndex;if(e.isRepeated){if(e.isMessageType())return this.wrappers_[t]||(this.wrappers_[t]=goog.array.map(this.extensionObject_[t]||[],function(r){return new e.ctor(r)})),this.wrappers_[t]}else if(e.isMessageType())return!this.wrappers_[t]&&this.extensionObject_[t]&&(this.wrappers_[t]=new e.ctor(this.extensionObject_[t])),this.wrappers_[t];return this.extensionObject_[t]}},jspb.Message.prototype.setExtension=function(e,t){this.wrappers_||(this.wrappers_={}),jspb.Message.maybeInitEmptyExtensionObject_(this);var r=e.fieldIndex;return e.isRepeated?(t=t||[],e.isMessageType()?(this.wrappers_[r]=t,this.extensionObject_[r]=goog.array.map(t,function(n){return n.toArray()})):this.extensionObject_[r]=t):e.isMessageType()?(this.wrappers_[r]=t,this.extensionObject_[r]=t&&t.toArray()):this.extensionObject_[r]=t,this},jspb.Message.difference=function(e,t){if(!(e instanceof t.constructor))throw Error("Messages have different types.");var r=e.toArray();t=t.toArray();var n=[],o=0,l=r.length>t.length?r.length:t.length;for(e.getJsPbMessageId()&&(n[0]=e.getJsPbMessageId(),o=1);o<l;o++)jspb.Message.compareFields(r[o],t[o])||(n[o]=t[o]);return new e.constructor(n)},jspb.Message.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&jspb.Message.compareFields(e.toArray(),t.toArray())},jspb.Message.compareExtensions=function(e,t){e=e||{},t=t||{};var r,n={};for(r in e)n[r]=0;for(r in t)n[r]=0;for(r in n)if(!jspb.Message.compareFields(e[r],t[r]))return!1;return!0},jspb.Message.compareFields=function(e,t){if(e==t)return!0;if(!goog.isObject(e)||!goog.isObject(t))return!!(typeof e=="number"&&isNaN(e)||typeof t=="number"&&isNaN(t))&&String(e)==String(t);if(e.constructor!=t.constructor)return!1;if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}if(e.constructor===Array){var n=void 0,o=void 0,l=Math.max(e.length,t.length);for(r=0;r<l;r++){var s=e[r],i=t[r];if(s&&s.constructor==Object&&(goog.asserts.assert(n===void 0),goog.asserts.assert(r===e.length-1),n=s,s=void 0),i&&i.constructor==Object&&(goog.asserts.assert(o===void 0),goog.asserts.assert(r===t.length-1),o=i,i=void 0),!jspb.Message.compareFields(s,i))return!1}return!n&&!o||(n=n||{},o=o||{},jspb.Message.compareExtensions(n,o))}if(e.constructor===Object)return jspb.Message.compareExtensions(e,t);throw Error("Invalid type in JSPB array")},jspb.Message.prototype.cloneMessage=function(){return jspb.Message.cloneMessage(this)},jspb.Message.prototype.clone=function(){return jspb.Message.cloneMessage(this)},jspb.Message.clone=function(e){return jspb.Message.cloneMessage(e)},jspb.Message.cloneMessage=function(e){return new e.constructor(jspb.Message.clone_(e.toArray()))},jspb.Message.copyInto=function(e,t){goog.asserts.assertInstanceof(e,jspb.Message),goog.asserts.assertInstanceof(t,jspb.Message),goog.asserts.assert(e.constructor==t.constructor,"Copy source and target message should have the same type."),e=jspb.Message.clone(e);for(var r=t.toArray(),n=e.toArray(),o=r.length=0;o<n.length;o++)r[o]=n[o];t.wrappers_=e.wrappers_,t.extensionObject_=e.extensionObject_},jspb.Message.clone_=function(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<e.length;r++){var n=e[r];n!=null&&(t[r]=typeof n=="object"?jspb.Message.clone_(goog.asserts.assert(n)):n)}return t}if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)return new Uint8Array(e);for(r in t={},e)(n=e[r])!=null&&(t[r]=typeof n=="object"?jspb.Message.clone_(goog.asserts.assert(n)):n);return t},jspb.Message.registerMessageType=function(e,t){t.messageId=e},jspb.Message.messageSetExtensions={},jspb.Message.messageSetExtensionsBinary={},jspb.arith={},jspb.arith.UInt64=function(e,t){this.lo=e,this.hi=t},jspb.arith.UInt64.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1},jspb.arith.UInt64.prototype.rightShift=function(){return new jspb.arith.UInt64((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},jspb.arith.UInt64.prototype.msb=function(){return!!(2147483648&this.hi)},jspb.arith.UInt64.prototype.lsb=function(){return!!(1&this.lo)},jspb.arith.UInt64.prototype.zero=function(){return this.lo==0&&this.hi==0},jspb.arith.UInt64.prototype.add=function(e){return new jspb.arith.UInt64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.UInt64.prototype.sub=function(e){return new jspb.arith.UInt64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.UInt64.mul32x32=function(e,t){var r=65535&e,n=65535&t,o=t>>>16;for(t=r*n+65536*(r*o&65535)+65536*((e>>>=16)*n&65535),r=e*o+(r*o>>>16)+(e*n>>>16);4294967296<=t;)t-=4294967296,r+=1;return new jspb.arith.UInt64(t>>>0,r>>>0)},jspb.arith.UInt64.prototype.mul=function(e){var t=jspb.arith.UInt64.mul32x32(this.lo,e);return(e=jspb.arith.UInt64.mul32x32(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},jspb.arith.UInt64.prototype.div=function(e){if(e==0)return[];var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(this.lo,this.hi);e=new jspb.arith.UInt64(e,0);for(var n=new jspb.arith.UInt64(1,0);!e.msb();)e=e.leftShift(),n=n.leftShift();for(;!n.zero();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.rightShift(),n=n.rightShift();return[t,r]},jspb.arith.UInt64.prototype.toString=function(){for(var e="",t=this;!t.zero();){var r=(t=t.div(10))[0];e=t[1].lo+e,t=r}return e==""&&(e="0"),e},jspb.arith.UInt64.fromString=function(e){for(var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(0,0),n=0;n<e.length;n++){if("0">e[n]||"9"<e[n])return null;var o=parseInt(e[n],10);r.lo=o,t=t.mul(10).add(r)}return t},jspb.arith.UInt64.prototype.clone=function(){return new jspb.arith.UInt64(this.lo,this.hi)},jspb.arith.Int64=function(e,t){this.lo=e,this.hi=t},jspb.arith.Int64.prototype.add=function(e){return new jspb.arith.Int64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.sub=function(e){return new jspb.arith.Int64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)},jspb.arith.Int64.prototype.toString=function(){var e=(2147483648&this.hi)!=0,t=new jspb.arith.UInt64(this.lo,this.hi);return e&&(t=new jspb.arith.UInt64(0,0).sub(t)),(e?"-":"")+t.toString()},jspb.arith.Int64.fromString=function(e){var t=0<e.length&&e[0]=="-";return t&&(e=e.substring(1)),(e=jspb.arith.UInt64.fromString(e))===null?null:(t&&(e=new jspb.arith.UInt64(0,0).sub(e)),new jspb.arith.Int64(e.lo,e.hi))},jspb.BinaryEncoder=function(){this.buffer_=[]},jspb.BinaryEncoder.prototype.length=function(){return this.buffer_.length},jspb.BinaryEncoder.prototype.end=function(){var e=this.buffer_;return this.buffer_=[],e},jspb.BinaryEncoder.prototype.writeSplitVarint64=function(e,t){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32);0<t||127<e;)this.buffer_.push(127&e|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSplitFixed64=function(e,t){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUint32(e),this.writeUint32(t)},jspb.BinaryEncoder.prototype.writeUnsignedVarint32=function(e){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32);127<e;)this.buffer_.push(127&e|128),e>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSignedVarint32=function(e){if(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),0<=e)this.writeUnsignedVarint32(e);else{for(var t=0;9>t;t++)this.buffer_.push(127&e|128),e>>=7;this.buffer_.push(1)}},jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeSignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeUnsignedVarint32((e<<1^e>>31)>>>0)},jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitZigzag64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint64String=function(e){this.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(e))},jspb.BinaryEncoder.prototype.writeZigzagVarintHash64=function(e){var t=this;jspb.utils.splitHash64(e),jspb.utils.toZigzag64(jspb.utils.split64Low,jspb.utils.split64High,function(r,n){t.writeSplitVarint64(r>>>0,n>>>0)})},jspb.BinaryEncoder.prototype.writeUint8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&256>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeUint16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&65536>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeUint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeUint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitUint64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-128<=e&&128>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeInt16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-32768<=e&&32768>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeInt32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeInt64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt64String=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(+e>=-jspb.BinaryConstants.TWO_TO_63&&+e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e)),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFloat=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT32_MAX&&e<=jspb.BinaryConstants.FLOAT32_MAX),jspb.utils.splitFloat32(e),this.writeUint32(jspb.utils.split64Low)},jspb.BinaryEncoder.prototype.writeDouble=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT64_MAX&&e<=jspb.BinaryConstants.FLOAT64_MAX),jspb.utils.splitFloat64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeBool=function(e){goog.asserts.assert(typeof e=="boolean"||typeof e=="number"),this.buffer_.push(e?1:0)},jspb.BinaryEncoder.prototype.writeEnum=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32(e)},jspb.BinaryEncoder.prototype.writeBytes=function(e){this.buffer_.push.apply(this.buffer_,e)},jspb.BinaryEncoder.prototype.writeVarintHash64=function(e){jspb.utils.splitHash64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFixedHash64=function(e){jspb.utils.splitHash64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeString=function(e){for(var t=this.buffer_.length,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(128>n)this.buffer_.push(n);else if(2048>n)this.buffer_.push(n>>6|192),this.buffer_.push(63&n|128);else if(65536>n)if(55296<=n&&56319>=n&&r+1<e.length){var o=e.charCodeAt(r+1);56320<=o&&57343>=o&&(n=1024*(n-55296)+o-56320+65536,this.buffer_.push(n>>18|240),this.buffer_.push(n>>12&63|128),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128),r++)}else this.buffer_.push(n>>12|224),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128)}return this.buffer_.length-t},jspb.BinaryWriter=function(){this.blocks_=[],this.totalLength_=0,this.encoder_=new jspb.BinaryEncoder,this.bookmarks_=[]},jspb.BinaryWriter.prototype.appendUint8Array_=function(e){var t=this.encoder_.end();this.blocks_.push(t),this.blocks_.push(e),this.totalLength_+=t.length+e.length},jspb.BinaryWriter.prototype.beginDelimited_=function(e){return this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),e=this.encoder_.end(),this.blocks_.push(e),this.totalLength_+=e.length,e.push(this.totalLength_),e},jspb.BinaryWriter.prototype.endDelimited_=function(e){var t=e.pop();for(t=this.totalLength_+this.encoder_.length()-t,goog.asserts.assert(0<=t);127<t;)e.push(127&t|128),t>>>=7,this.totalLength_++;e.push(t),this.totalLength_++},jspb.BinaryWriter.prototype.writeSerializedMessage=function(e,t,r){this.appendUint8Array_(e.subarray(t,r))},jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(e,t,r){e!=null&&t!=null&&r!=null&&this.writeSerializedMessage(e,t,r)},jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[],this.encoder_.end(),this.totalLength_=0,this.bookmarks_=[]},jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(this.bookmarks_.length==0);for(var e=new Uint8Array(this.totalLength_+this.encoder_.length()),t=this.blocks_,r=t.length,n=0,o=0;o<r;o++){var l=t[o];e.set(l,n),n+=l.length}return t=this.encoder_.end(),e.set(t,n),n+=t.length,goog.asserts.assert(n==e.length),this.blocks_=[e],e},jspb.BinaryWriter.prototype.getResultBase64String=function(e){return goog.crypt.base64.encodeByteArray(this.getResultBuffer(),e)},jspb.BinaryWriter.prototype.beginSubMessage=function(e){this.bookmarks_.push(this.beginDelimited_(e))},jspb.BinaryWriter.prototype.endSubMessage=function(){goog.asserts.assert(0<=this.bookmarks_.length),this.endDelimited_(this.bookmarks_.pop())},jspb.BinaryWriter.prototype.writeFieldHeader_=function(e,t){goog.asserts.assert(1<=e&&e==Math.floor(e)),this.encoder_.writeUnsignedVarint32(8*e+t)},jspb.BinaryWriter.prototype.writeAny=function(e,t,r){var n=jspb.BinaryConstants.FieldType;switch(e){case n.DOUBLE:this.writeDouble(t,r);break;case n.FLOAT:this.writeFloat(t,r);break;case n.INT64:this.writeInt64(t,r);break;case n.UINT64:this.writeUint64(t,r);break;case n.INT32:this.writeInt32(t,r);break;case n.FIXED64:this.writeFixed64(t,r);break;case n.FIXED32:this.writeFixed32(t,r);break;case n.BOOL:this.writeBool(t,r);break;case n.STRING:this.writeString(t,r);break;case n.GROUP:goog.asserts.fail("Group field type not supported in writeAny()");break;case n.MESSAGE:goog.asserts.fail("Message field type not supported in writeAny()");break;case n.BYTES:this.writeBytes(t,r);break;case n.UINT32:this.writeUint32(t,r);break;case n.ENUM:this.writeEnum(t,r);break;case n.SFIXED32:this.writeSfixed32(t,r);break;case n.SFIXED64:this.writeSfixed64(t,r);break;case n.SINT32:this.writeSint32(t,r);break;case n.SINT64:this.writeSint64(t,r);break;case n.FHASH64:this.writeFixedHash64(t,r);break;case n.VHASH64:this.writeVarintHash64(t,r);break;default:goog.asserts.fail("Invalid field type in writeAny()")}},jspb.BinaryWriter.prototype.writeUnsignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint32(t))},jspb.BinaryWriter.prototype.writeSignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeUnsignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint64(t))},jspb.BinaryWriter.prototype.writeSignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint32(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64String_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64String(t))},jspb.BinaryWriter.prototype.writeZigzagVarintHash64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarintHash64(t))},jspb.BinaryWriter.prototype.writeInt32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeSignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeInt64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeUint32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeUnsignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeUint64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSint32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeZigzagVarint32_(e,t))},jspb.BinaryWriter.prototype.writeSint64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeZigzagVarint64_(e,t))},jspb.BinaryWriter.prototype.writeSintHash64=function(e,t){t!=null&&this.writeZigzagVarintHash64_(e,t)},jspb.BinaryWriter.prototype.writeSint64String=function(e,t){t!=null&&this.writeZigzagVarint64String_(e,t)},jspb.BinaryWriter.prototype.writeFixed32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeUint32(t))},jspb.BinaryWriter.prototype.writeFixed64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeUint64(t))},jspb.BinaryWriter.prototype.writeFixed64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSfixed32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeInt32(t))},jspb.BinaryWriter.prototype.writeSfixed64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeInt64(t))},jspb.BinaryWriter.prototype.writeSfixed64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeFloat=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeFloat(t))},jspb.BinaryWriter.prototype.writeDouble=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeDouble(t))},jspb.BinaryWriter.prototype.writeBool=function(e,t){t!=null&&(goog.asserts.assert(typeof t=="boolean"||typeof t=="number"),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeBool(t))},jspb.BinaryWriter.prototype.writeEnum=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeString=function(e,t){t!=null&&(e=this.beginDelimited_(e),this.encoder_.writeString(t),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeBytes=function(e,t){t!=null&&(t=jspb.utils.byteSourceToUint8Array(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),this.appendUint8Array_(t))},jspb.BinaryWriter.prototype.writeMessage=function(e,t,r){t!=null&&(e=this.beginDelimited_(e),r(t,this),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeMessageSet=function(e,t,r){t!=null&&(this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.START_GROUP),this.writeFieldHeader_(2,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(e),e=this.beginDelimited_(3),r(t,this),this.endDelimited_(e),this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeGroup=function(e,t,r){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),r(t,this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeFixedHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeFixedHash64(t))},jspb.BinaryWriter.prototype.writeVarintHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeVarintHash64(t))},jspb.BinaryWriter.prototype.writeSplitFixed64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t,r)},jspb.BinaryWriter.prototype.writeSplitVarint64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t,r)},jspb.BinaryWriter.prototype.writeSplitZigzagVarint64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT);var n=this.encoder_;jspb.utils.toZigzag64(t,r,function(o,l){n.writeSplitVarint64(o>>>0,l>>>0)})},jspb.BinaryWriter.prototype.writeRepeatedInt32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSignedVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedInt32String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeInt32String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedInt64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSignedVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSplitFixed64=function(e,t,r,n){if(t!=null)for(var o=0;o<t.length;o++)this.writeSplitFixed64(e,r(t[o]),n(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedSplitVarint64=function(e,t,r,n){if(t!=null)for(var o=0;o<t.length;o++)this.writeSplitVarint64(e,r(t[o]),n(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64=function(e,t,r,n){if(t!=null)for(var o=0;o<t.length;o++)this.writeSplitZigzagVarint64(e,r(t[o]),n(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedInt64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeInt64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUnsignedVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUint32String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUnsignedVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUint64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarint64String_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSintHash64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarintHash64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixed32(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixed64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixed64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSfixed32(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSfixed64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSfixed64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFloat=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFloat(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedDouble=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeDouble(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedBool=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeBool(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedEnum=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeEnum(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedString=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeString(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedBytes=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeBytes(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedMessage=function(e,t,r){if(t!=null)for(var n=0;n<t.length;n++){var o=this.beginDelimited_(e);r(t[n],this),this.endDelimited_(o)}},jspb.BinaryWriter.prototype.writeRepeatedGroup=function(e,t,r){if(t!=null)for(var n=0;n<t.length;n++)this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),r(t[n],this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP)},jspb.BinaryWriter.prototype.writeRepeatedFixedHash64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixedHash64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedVarintHash64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeVarintHash64(e,t[r])},jspb.BinaryWriter.prototype.writePackedInt32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint32(parseInt(t[r],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitFixed64=function(e,t,r,n){if(t!=null){e=this.beginDelimited_(e);for(var o=0;o<t.length;o++)this.encoder_.writeSplitFixed64(r(t[o]),n(t[o]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitVarint64=function(e,t,r,n){if(t!=null){e=this.beginDelimited_(e);for(var o=0;o<t.length;o++)this.encoder_.writeSplitVarint64(r(t[o]),n(t[o]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitZigzagVarint64=function(e,t,r,n){if(t!=null){e=this.beginDelimited_(e);for(var o=this.encoder_,l=0;l<t.length;l++)jspb.utils.toZigzag64(r(t[l]),n(t[l]),function(s,i){o.writeSplitVarint64(s>>>0,i>>>0)});this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++){var n=jspb.arith.Int64.fromString(t[r]);this.encoder_.writeSplitVarint64(n.lo,n.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint32(parseInt(t[r],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++){var n=jspb.arith.UInt64.fromString(t[r]);this.encoder_.writeSplitVarint64(n.lo,n.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(t[r]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarintHash64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeUint32(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeUint64(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++){var r=jspb.arith.UInt64.fromString(t[e]);this.encoder_.writeSplitFixed64(r.lo,r.hi)}},jspb.BinaryWriter.prototype.writePackedSfixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeInt32(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64String(t[e])},jspb.BinaryWriter.prototype.writePackedFloat=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeFloat(t[e])},jspb.BinaryWriter.prototype.writePackedDouble=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeDouble(t[e])},jspb.BinaryWriter.prototype.writePackedBool=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),e=0;e<t.length;e++)this.encoder_.writeBool(t[e])},jspb.BinaryWriter.prototype.writePackedEnum=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeEnum(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixedHash64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeFixedHash64(t[e])},jspb.BinaryWriter.prototype.writePackedVarintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeVarintHash64(t[r]);this.endDelimited_(e)}},jspb.Export={},exports.Map=jspb.Map,exports.Message=jspb.Message,exports.BinaryReader=jspb.BinaryReader,exports.BinaryWriter=jspb.BinaryWriter,exports.ExtensionFieldInfo=jspb.ExtensionFieldInfo,exports.ExtensionFieldBinaryInfo=jspb.ExtensionFieldBinaryInfo,exports.exportSymbol=goog.exportSymbol,exports.inherits=goog.inherits,exports.object={extend:goog.object.extend},exports.typeOf=goog.typeOf}).call(this,__webpack_require__(5),__webpack_require__(4).Buffer)},function(e,t){var r=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var l,s=0;s<16;s++)(3&s)==0&&(l=4294967296*Math.random()),o[s]=l>>>((3&s)<<3)&255;return o}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(o,l){var s=l||0,i=r;return[i[o[s++]],i[o[s++]],i[o[s++]],i[o[s++]],"-",i[o[s++]],i[o[s++]],"-",i[o[s++]],i[o[s++]],"-",i[o[s++]],i[o[s++]],"-",i[o[s++]],i[o[s++]],i[o[s++]],i[o[s++]],i[o[s++]],i[o[s++]]].join("")}},function(e,t,r){(function(n){const o=r(210),l=r(49),s=(i,c)=>({from:s,EnvVarError:r(49),get:function(u){if(!u)return i;if(arguments.length>1)throw new l("It looks like you passed more than one argument to env.get(). Since env-var@6.0.0 this is no longer supported. To set a default value use env.get(TARGET).default(DEFAULT)");return o(i,u,c||{})}});e.exports=s(n.env)}).call(this,r(2))},function(e,t,r){var n=r(10),o=r(71),l=r(3).LEVEL,s=e.exports=function(){var i=this,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};o.call(this,{objectMode:!0,highWaterMark:c.highWaterMark}),this.format=c.format,this.level=c.level,this.handleExceptions=c.handleExceptions,this.silent=c.silent,c.log&&(this.log=c.log),c.logv&&(this.logv=c.logv),c.close&&(this.close=c.close),this.once("pipe",function(u){i.levels=u.levels,i.parent=u}),this.once("unpipe",function(u){u===i.parent&&(i.parent=null,i.close&&i.close())})};n.inherits(s,o),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);var b=this.level||this.parent&&this.parent.level;if(!b||this.levels[b]>=this.levels[i[l]]){if(i&&!this.format)return this.log(i,u);var A=void 0,_=void 0;try{_=this.format.transform(Object.assign({},i),this.format.options)}catch(v){A=v}if(A||!_){if(u(),A)throw A;return}return this.log(_,u)}return u(null)},s.prototype._writev=function(i,c){if(this.logv){var u=i.filter(this._accept,this);return u.length?this.logv(u,c):c(null)}for(var b=0;b<i.length;b++)if(this._accept(i[b]))if(!i[b].chunk||this.format){var A=void 0,_=void 0;try{_=this.format.transform(Object.assign({},i[b].chunk),this.format.options)}catch(v){A=v}if(A||!_){if(i[b].callback(),A)throw c(null),A}else this.log(_,i[b].callback)}else this.log(i[b].chunk,i[b].callback);return c(null)},s.prototype._accept=function(i){var c=i.chunk;if(this.silent)return!1;var u=this.level||this.parent&&this.parent.level;return!(c.exception!==!0&&u&&!(this.levels[u]>=this.levels[c[l]])||!this.handleExceptions&&c.exception===!0)},s.prototype._nop=function(){}},function(e,t,r){const{AbortController:n,AbortSignal:o}=typeof self!="undefined"?self:typeof window!="undefined"?window:void 0;e.exports=n,e.exports.AbortSignal=o,e.exports.default=n},function(e,t){var r=function(n){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}(typeof self!="undefined"?self:this);(function(n){(function(o){var l="URLSearchParams"in n,s="Symbol"in n&&"iterator"in Symbol,i="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),c="FormData"in n,u="ArrayBuffer"in n;if(u)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],A=ArrayBuffer.isView||function(C){return C&&b.indexOf(Object.prototype.toString.call(C))>-1};function _(C){if(typeof C!="string"&&(C=String(C)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(C))throw new TypeError("Invalid character in header field name");return C.toLowerCase()}function v(C){return typeof C!="string"&&(C=String(C)),C}function f(C){var m={next:function(){var x=C.shift();return{done:x===void 0,value:x}}};return s&&(m[Symbol.iterator]=function(){return m}),m}function S(C){this.map={},C instanceof S?C.forEach(function(m,x){this.append(x,m)},this):Array.isArray(C)?C.forEach(function(m){this.append(m[0],m[1])},this):C&&Object.getOwnPropertyNames(C).forEach(function(m){this.append(m,C[m])},this)}function w(C){if(C.bodyUsed)return Promise.reject(new TypeError("Already read"));C.bodyUsed=!0}function P(C){return new Promise(function(m,x){C.onload=function(){m(C.result)},C.onerror=function(){x(C.error)}})}function N(C){var m=new FileReader,x=P(m);return m.readAsArrayBuffer(C),x}function T(C){if(C.slice)return C.slice(0);var m=new Uint8Array(C.byteLength);return m.set(new Uint8Array(C)),m.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(C){var m;this._bodyInit=C,C?typeof C=="string"?this._bodyText=C:i&&Blob.prototype.isPrototypeOf(C)?this._bodyBlob=C:c&&FormData.prototype.isPrototypeOf(C)?this._bodyFormData=C:l&&URLSearchParams.prototype.isPrototypeOf(C)?this._bodyText=C.toString():u&&i&&(m=C)&&DataView.prototype.isPrototypeOf(m)?(this._bodyArrayBuffer=T(C.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(C)||A(C))?this._bodyArrayBuffer=T(C):this._bodyText=C=Object.prototype.toString.call(C):this._bodyText="",this.headers.get("content-type")||(typeof C=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l&&URLSearchParams.prototype.isPrototypeOf(C)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var C=w(this);if(C)return C;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?w(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(N)}),this.text=function(){var C,m,x,F=w(this);if(F)return F;if(this._bodyBlob)return C=this._bodyBlob,m=new FileReader,x=P(m),m.readAsText(C),x;if(this._bodyArrayBuffer)return Promise.resolve(function(D){for(var O=new Uint8Array(D),L=new Array(O.length),k=0;k<O.length;k++)L[k]=String.fromCharCode(O[k]);return L.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then(Q)}),this.json=function(){return this.text().then(JSON.parse)},this}S.prototype.append=function(C,m){C=_(C),m=v(m);var x=this.map[C];this.map[C]=x?x+", "+m:m},S.prototype.delete=function(C){delete this.map[_(C)]},S.prototype.get=function(C){return C=_(C),this.has(C)?this.map[C]:null},S.prototype.has=function(C){return this.map.hasOwnProperty(_(C))},S.prototype.set=function(C,m){this.map[_(C)]=v(m)},S.prototype.forEach=function(C,m){for(var x in this.map)this.map.hasOwnProperty(x)&&C.call(m,this.map[x],x,this)},S.prototype.keys=function(){var C=[];return this.forEach(function(m,x){C.push(x)}),f(C)},S.prototype.values=function(){var C=[];return this.forEach(function(m){C.push(m)}),f(C)},S.prototype.entries=function(){var C=[];return this.forEach(function(m,x){C.push([x,m])}),f(C)},s&&(S.prototype[Symbol.iterator]=S.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function I(C,m){var x,F,D=(m=m||{}).body;if(C instanceof I){if(C.bodyUsed)throw new TypeError("Already read");this.url=C.url,this.credentials=C.credentials,m.headers||(this.headers=new S(C.headers)),this.method=C.method,this.mode=C.mode,this.signal=C.signal,D||C._bodyInit==null||(D=C._bodyInit,C.bodyUsed=!0)}else this.url=String(C);if(this.credentials=m.credentials||this.credentials||"same-origin",!m.headers&&this.headers||(this.headers=new S(m.headers)),this.method=(x=m.method||this.method||"GET",F=x.toUpperCase(),d.indexOf(F)>-1?F:x),this.mode=m.mode||this.mode||null,this.signal=m.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&D)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(D)}function Q(C){var m=new FormData;return C.trim().split("&").forEach(function(x){if(x){var F=x.split("="),D=F.shift().replace(/\+/g," "),O=F.join("=").replace(/\+/g," ");m.append(decodeURIComponent(D),decodeURIComponent(O))}}),m}function Z(C,m){m||(m={}),this.type="default",this.status=m.status===void 0?200:m.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in m?m.statusText:"OK",this.headers=new S(m.headers),this.url=m.url||"",this._initBody(C)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})},R.call(I.prototype),R.call(Z.prototype),Z.prototype.clone=function(){return new Z(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new S(this.headers),url:this.url})},Z.error=function(){var C=new Z(null,{status:0,statusText:""});return C.type="error",C};var h=[301,302,303,307,308];Z.redirect=function(C,m){if(h.indexOf(m)===-1)throw new RangeError("Invalid status code");return new Z(null,{status:m,headers:{location:C}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(m,x){this.message=m,this.name=x;var F=Error(m);this.stack=F.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function p(C,m){return new Promise(function(x,F){var D=new I(C,m);if(D.signal&&D.signal.aborted)return F(new o.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function L(){O.abort()}O.onload=function(){var k,E,g={status:O.status,statusText:O.statusText,headers:(k=O.getAllResponseHeaders()||"",E=new S,k.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(B){var G=B.split(":"),Y=G.shift().trim();if(Y){var K=G.join(":").trim();E.append(Y,K)}}),E)};g.url="responseURL"in O?O.responseURL:g.headers.get("X-Request-URL");var U="response"in O?O.response:O.responseText;x(new Z(U,g))},O.onerror=function(){F(new TypeError("Network request failed"))},O.ontimeout=function(){F(new TypeError("Network request failed"))},O.onabort=function(){F(new o.DOMException("Aborted","AbortError"))},O.open(D.method,D.url,!0),D.credentials==="include"?O.withCredentials=!0:D.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&i&&(O.responseType="blob"),D.headers.forEach(function(k,E){O.setRequestHeader(E,k)}),D.signal&&(D.signal.addEventListener("abort",L),O.onreadystatechange=function(){O.readyState===4&&D.signal.removeEventListener("abort",L)}),O.send(D._bodyInit===void 0?null:D._bodyInit)})}p.polyfill=!0,n.fetch||(n.fetch=p,n.Headers=S,n.Request=I,n.Response=Z),o.Headers=S,o.Request=I,o.Response=Z,o.fetch=p})({})})(r),delete r.fetch.polyfill,(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t},function(e,t,r){(function(n){const o=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,l=typeof AbortController=="function"?AbortController:Object.assign(class{constructor(){this.signal=new l.AbortSignal}abort(){this.signal.dispatchEvent("abort")}},{AbortSignal:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(P){if(P==="abort"){this.aborted=!0;const N={type:P,target:this};this.onabort(N),this._listeners.forEach(T=>T(N),this)}}onabort(){}addEventListener(P,N){P==="abort"&&this._listeners.push(N)}removeEventListener(P,N){P==="abort"&&(this._listeners=this._listeners.filter(T=>T!==N))}}}),s=new Set,i=(P,N)=>{const T=`LRU_CACHE_OPTION_${P}`;b(T)&&A(T,`${P} option`,`options.${N}`,w)},c=(P,N)=>{const T=`LRU_CACHE_METHOD_${P}`;if(b(T)){const{prototype:R}=w,{get:d}=Object.getOwnPropertyDescriptor(R,P);A(T,`${P} method`,`cache.${N}()`,d)}},u=(...P)=>{typeof n=="object"&&n&&typeof n.emitWarning=="function"?n.emitWarning(...P):console.error(...P)},b=P=>!s.has(P),A=(P,N,T,R)=>{s.add(P),u(`The ${N} is deprecated. Please use ${T} instead.`,"DeprecationWarning",P,R)},_=P=>P&&P===Math.floor(P)&&P>0&&isFinite(P),v=P=>_(P)?P<=Math.pow(2,8)?Uint8Array:P<=Math.pow(2,16)?Uint16Array:P<=Math.pow(2,32)?Uint32Array:P<=Number.MAX_SAFE_INTEGER?f:null:null;class f extends Array{constructor(N){super(N),this.fill(0)}}class S{constructor(N){if(N===0)return[];const T=v(N);this.heap=new T(N),this.length=0}push(N){this.heap[this.length++]=N}pop(){return this.heap[--this.length]}}class w{constructor(N={}){const{max:T=0,ttl:R,ttlResolution:d=1,ttlAutopurge:I,updateAgeOnGet:Q,updateAgeOnHas:Z,allowStale:h,dispose:p,disposeAfter:C,noDisposeOnSet:m,noUpdateTTL:x,maxSize:F=0,sizeCalculation:D,fetchMethod:O}=N,{length:L,maxAge:k,stale:E}=N instanceof w?{}:N;if(T!==0&&!_(T))throw new TypeError("max option must be a nonnegative integer");const g=T?v(T):Array;if(!g)throw new Error("invalid max value: "+T);if(this.max=T,this.maxSize=F,this.sizeCalculation=D||L,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=O||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.keyMap=new Map,this.keyList=new Array(T).fill(null),this.valList=new Array(T).fill(null),this.next=new g(T),this.prev=new g(T),this.head=0,this.tail=0,this.free=new S(T),this.initialFill=1,this.size=0,typeof p=="function"&&(this.dispose=p),typeof C=="function"?(this.disposeAfter=C,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!m,this.noUpdateTTL=!!x,this.maxSize!==0){if(!_(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!h||!!E,this.updateAgeOnGet=!!Q,this.updateAgeOnHas=!!Z,this.ttlResolution=_(d)||d===0?d:1,this.ttlAutopurge=!!I,this.ttl=R||k||0,this.ttl){if(!_(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const U="LRU_CACHE_UNBOUNDED";b(U)&&(s.add(U),u("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",U,w))}E&&i("stale","allowStale"),k&&i("maxAge","ttl"),L&&i("length","sizeCalculation")}getRemainingTTL(N){return this.has(N,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new f(this.max),this.starts=new f(this.max),this.setItemTTL=(R,d)=>{if(this.starts[R]=d!==0?o.now():0,this.ttls[R]=d,d!==0&&this.ttlAutopurge){const I=setTimeout(()=>{this.isStale(R)&&this.delete(this.keyList[R])},d+1);I.unref&&I.unref()}},this.updateItemAge=R=>{this.starts[R]=this.ttls[R]!==0?o.now():0};let N=0;const T=()=>{const R=o.now();if(this.ttlResolution>0){N=R;const d=setTimeout(()=>N=0,this.ttlResolution);d.unref&&d.unref()}return R};this.getRemainingTTL=R=>{const d=this.keyMap.get(R);return d===void 0?0:this.ttls[d]===0||this.starts[d]===0?1/0:this.starts[d]+this.ttls[d]-(N||T())},this.isStale=R=>this.ttls[R]!==0&&this.starts[R]!==0&&(N||T())-this.starts[R]>this.ttls[R]}updateItemAge(N){}setItemTTL(N,T){}isStale(N){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new f(this.max),this.removeItemSize=N=>this.calculatedSize-=this.sizes[N],this.requireSize=(N,T,R,d)=>{if(!_(R)){if(!d)throw new TypeError("invalid size value (must be positive integer)");if(typeof d!="function")throw new TypeError("sizeCalculation must be a function");if(R=d(T,N),!_(R))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return R},this.addItemSize=(N,T,R,d)=>{this.sizes[N]=d;const I=this.maxSize-this.sizes[N];for(;this.calculatedSize>I;)this.evict(!0);this.calculatedSize+=this.sizes[N]}}removeItemSize(N){}addItemSize(N,T,R,d){}requireSize(N,T,R,d){if(R||d)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:N=this.allowStale}={}){if(this.size)for(let T=this.tail;this.isValidIndex(T)&&(!N&&this.isStale(T)||(yield T),T!==this.head);)T=this.prev[T]}*rindexes({allowStale:N=this.allowStale}={}){if(this.size)for(let T=this.head;this.isValidIndex(T)&&(!N&&this.isStale(T)||(yield T),T!==this.tail);)T=this.next[T]}isValidIndex(N){return this.keyMap.get(this.keyList[N])===N}*entries(){for(const N of this.indexes())yield[this.keyList[N],this.valList[N]]}*rentries(){for(const N of this.rindexes())yield[this.keyList[N],this.valList[N]]}*keys(){for(const N of this.indexes())yield this.keyList[N]}*rkeys(){for(const N of this.rindexes())yield this.keyList[N]}*values(){for(const N of this.indexes())yield this.valList[N]}*rvalues(){for(const N of this.rindexes())yield this.valList[N]}[Symbol.iterator](){return this.entries()}find(N,T={}){for(const R of this.indexes())if(N(this.valList[R],this.keyList[R],this))return this.get(this.keyList[R],T)}forEach(N,T=this){for(const R of this.indexes())N.call(T,this.valList[R],this.keyList[R],this)}rforEach(N,T=this){for(const R of this.rindexes())N.call(T,this.valList[R],this.keyList[R],this)}get prune(){return c("prune","purgeStale"),this.purgeStale}purgeStale(){let N=!1;for(const T of this.rindexes({allowStale:!0}))this.isStale(T)&&(this.delete(this.keyList[T]),N=!0);return N}dump(){const N=[];for(const T of this.indexes()){const R=this.keyList[T],d={value:this.valList[T]};this.ttls&&(d.ttl=this.ttls[T]),this.sizes&&(d.size=this.sizes[T]),N.unshift([R,d])}return N}load(N){this.clear();for(const[T,R]of N)this.set(T,R.value,R)}dispose(N,T,R){}set(N,T,{ttl:R=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:I=0,sizeCalculation:Q=this.sizeCalculation,noUpdateTTL:Z=this.noUpdateTTL}={}){I=this.requireSize(N,T,I,Q);let h=this.size===0?void 0:this.keyMap.get(N);if(h===void 0)h=this.newIndex(),this.keyList[h]=N,this.valList[h]=T,this.keyMap.set(N,h),this.next[this.tail]=h,this.prev[h]=this.tail,this.tail=h,this.size++,this.addItemSize(h,T,N,I),Z=!1;else{const p=this.valList[h];T!==p&&(this.isBackgroundFetch(p)?p.__abortController.abort():d||(this.dispose(p,N,"set"),this.disposeAfter&&this.disposed.push([p,N,"set"])),this.removeItemSize(h),this.valList[h]=T,this.addItemSize(h,T,N,I)),this.moveToTail(h)}if(R===0||this.ttl!==0||this.ttls||this.initializeTTLTracking(),Z||this.setItemTTL(h,R),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const N=this.valList[this.head];return this.evict(!0),N}}evict(N){const T=this.head,R=this.keyList[T],d=this.valList[T];return this.isBackgroundFetch(d)?d.__abortController.abort():(this.dispose(d,R,"evict"),this.disposeAfter&&this.disposed.push([d,R,"evict"])),this.removeItemSize(T),N&&(this.keyList[T]=null,this.valList[T]=null,this.free.push(T)),this.head=this.next[T],this.keyMap.delete(R),this.size--,T}has(N,{updateAgeOnHas:T=this.updateAgeOnHas}={}){const R=this.keyMap.get(N);return R!==void 0&&!this.isStale(R)&&(T&&this.updateItemAge(R),!0)}peek(N,{allowStale:T=this.allowStale}={}){const R=this.keyMap.get(N);if(R!==void 0&&(T||!this.isStale(R)))return this.valList[R]}backgroundFetch(N,T,R){const d=T===void 0?void 0:this.valList[T];if(this.isBackgroundFetch(d))return d;const I=new l,Q={signal:I.signal,options:R},Z=Promise.resolve(this.fetchMethod(N,d,Q)).then(h=>(I.signal.aborted||this.set(N,h,Q.options),h));return Z.__abortController=I,Z.__staleWhileFetching=d,T===void 0?(this.set(N,Z,Q.options),T=this.keyMap.get(N)):this.valList[T]=Z,Z}isBackgroundFetch(N){return N&&typeof N=="object"&&typeof N.then=="function"&&Object.prototype.hasOwnProperty.call(N,"__staleWhileFetching")}async fetch(N,{allowStale:T=this.allowStale,updateAgeOnGet:R=this.updateAgeOnGet,ttl:d=this.ttl,noDisposeOnSet:I=this.noDisposeOnSet,size:Q=0,sizeCalculation:Z=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL}={}){if(!this.fetchMethod)return this.get(N,{allowStale:T,updateAgeOnGet:R});const p={allowStale:T,updateAgeOnGet:R,ttl:d,noDisposeOnSet:I,size:Q,sizeCalculation:Z,noUpdateTTL:h};let C=this.keyMap.get(N);if(C===void 0)return this.backgroundFetch(N,C,p);{const m=this.valList[C];if(this.isBackgroundFetch(m))return T&&m.__staleWhileFetching!==void 0?m.__staleWhileFetching:m;if(!this.isStale(C))return this.moveToTail(C),R&&this.updateItemAge(C),m;const x=this.backgroundFetch(N,C,p);return T&&x.__staleWhileFetching!==void 0?x.__staleWhileFetching:x}}get(N,{allowStale:T=this.allowStale,updateAgeOnGet:R=this.updateAgeOnGet}={}){const d=this.keyMap.get(N);if(d!==void 0){const I=this.valList[d],Q=this.isBackgroundFetch(I);return this.isStale(d)?Q?T?I.__staleWhileFetching:void 0:(this.delete(N),T?I:void 0):Q?void 0:(this.moveToTail(d),R&&this.updateItemAge(d),I)}}connect(N,T){this.prev[T]=N,this.next[N]=T}moveToTail(N){N!==this.tail&&(N===this.head?this.head=this.next[N]:this.connect(this.prev[N],this.next[N]),this.connect(this.tail,N),this.tail=N)}get del(){return c("del","delete"),this.delete}delete(N){let T=!1;if(this.size!==0){const R=this.keyMap.get(N);if(R!==void 0)if(T=!0,this.size===1)this.clear();else{this.removeItemSize(R);const d=this.valList[R];this.isBackgroundFetch(d)?d.__abortController.abort():(this.dispose(d,N,"delete"),this.disposeAfter&&this.disposed.push([d,N,"delete"])),this.keyMap.delete(N),this.keyList[R]=null,this.valList[R]=null,R===this.tail?this.tail=this.prev[R]:R===this.head?this.head=this.next[R]:(this.next[this.prev[R]]=this.next[R],this.prev[this.next[R]]=this.prev[R]),this.size--,this.free.push(R)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return T}clear(){for(const N of this.rindexes({allowStale:!0})){const T=this.valList[N];if(this.isBackgroundFetch(T))T.__abortController.abort();else{const R=this.keyList[N];this.dispose(T,R,"delete"),this.disposeAfter&&this.disposed.push([T,R,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return c("reset","clear"),this.clear}get length(){return((N,T)=>{const R=`LRU_CACHE_PROPERTY_${N}`;if(b(R)){const{prototype:d}=w,{get:I}=Object.getOwnPropertyDescriptor(d,N);A(R,`${N} property`,`cache.${T}`,I)}})("length","size"),this.size}static get AbortController(){return l}}e.exports=w}).call(this,r(2))},function(e,t,r){var n=r(223),o=r(224),l=o;l.v1=n,l.v4=o,e.exports=l},function(e,t,r){var n=r(37).Colorizer;e.exports=function(o){return n.addColors(o.colors||o),o}},function(e,t,r){var n={};e.exports=n,n.themes={};var o=r(10),l=n.styles=r(108),s=Object.defineProperties,i=new RegExp(/[\r\n]+/g);n.supportsColor=r(109).supportsColor,n.enabled===void 0&&(n.enabled=n.supportsColor()!==!1),n.enable=function(){n.enabled=!0},n.disable=function(){n.enabled=!1},n.stripColors=n.strip=function(w){return(""+w).replace(/\x1B\[\d+m/g,"")},n.stylize=function(w,P){return n.enabled?l[P].open+w+l[P].close:w+""};var c=/[|\\{}()[\]^$+*?.]/g;function u(w){var P=function N(){return v.apply(N,arguments)};return P._styles=w,P.__proto__=_,P}var b,A=(b={},l.grey=l.gray,Object.keys(l).forEach(function(w){l[w].closeRe=new RegExp(function(P){if(typeof P!="string")throw new TypeError("Expected a string");return P.replace(c,"\\$&")}(l[w].close),"g"),b[w]={get:function(){return u(this._styles.concat(w))}}}),b),_=s(function(){},A);function v(){var w=Array.prototype.slice.call(arguments),P=w.map(function(I){return I!==void 0&&I.constructor===String?I:o.inspect(I)}).join(" ");if(!n.enabled||!P)return P;for(var N=P.indexOf(`
|
|
34
|
+
`)},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.string.internal.trim,goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=goog.string.internal.caseInsensitiveCompare,goog.string.numberAwareCompare_=function(e,t,r){if(e==t)return 0;if(!e)return-1;if(!t)return 1;for(var n=e.toLowerCase().match(r),o=t.toLowerCase().match(r),l=Math.min(n.length,o.length),s=0;s<l;s++){r=n[s];var i=o[s];if(r!=i)return e=parseInt(r,10),!isNaN(e)&&(t=parseInt(i,10),!isNaN(t)&&e-t)?e-t:r<i?-1:1}return n.length!=o.length?n.length-o.length:e<t?-1:1},goog.string.intAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\D+/g)},goog.string.floatAwareCompare=function(e,t){return goog.string.numberAwareCompare_(e,t,/\d+|\.\d+|\D+/g)},goog.string.numerateCompare=goog.string.floatAwareCompare,goog.string.urlEncode=function(e){return encodeURIComponent(String(e))},goog.string.urlDecode=function(e){return decodeURIComponent(e.replace(/\+/g," "))},goog.string.newLineToBr=goog.string.internal.newLineToBr,goog.string.htmlEscape=function(e,t){return e=goog.string.internal.htmlEscape(e,t),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"e")),e},goog.string.E_RE_=/e/g,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,t){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,t):e},goog.string.unescapeEntitiesUsingDom_=function(e,t){var r={"&":"&","<":"<",">":">",""":'"'},n=t?t.createElement("div"):goog.global.document.createElement("div");return e.replace(goog.string.HTML_ENTITY_PATTERN_,function(o,l){var s=r[o];return s||(l.charAt(0)=="#"&&(l=Number("0"+l.substr(1)),isNaN(l)||(s=String.fromCharCode(l))),s||(goog.dom.safe.setInnerHtml(n,goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Single HTML entity."),o+" ")),s=n.firstChild.nodeValue.slice(0,-1)),r[o]=s)})},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,function(t,r){switch(r){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';default:return r.charAt(0)!="#"||(r=Number("0"+r.substr(1)),isNaN(r))?t:String.fromCharCode(r)}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,t){return goog.string.newLineToBr(e.replace(/ /g,"  "),t)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(e,t){for(var r=t.length,n=0;n<r;n++){var o=r==1?t:t.charAt(n);if(e.charAt(0)==o&&e.charAt(e.length-1)==o)return e.substring(1,e.length-1)}return e},goog.string.truncate=function(e,t,r){return r&&(e=goog.string.unescapeEntities(e)),e.length>t&&(e=e.substring(0,t-3)+"..."),r&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(e,t,r,n){if(r&&(e=goog.string.unescapeEntities(e)),n&&e.length>t){n>t&&(n=t);var o=e.length-n;e=e.substring(0,t-n)+"..."+e.substring(o)}else e.length>t&&(n=Math.floor(t/2),o=e.length-n,e=e.substring(0,n+t%2)+"..."+e.substring(o));return r&&(e=goog.string.htmlEscape(e)),e},goog.string.specialEscapeChars_={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(e){e=String(e);for(var t=['"'],r=0;r<e.length;r++){var n=e.charAt(r),o=n.charCodeAt(0);t[r+1]=goog.string.specialEscapeChars_[n]||(31<o&&127>o?n:goog.string.escapeChar(n))}return t.push('"'),t.join("")},goog.string.escapeString=function(e){for(var t=[],r=0;r<e.length;r++)t[r]=goog.string.escapeChar(e.charAt(r));return t.join("")},goog.string.escapeChar=function(e){if(e in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[e];if(e in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[e]=goog.string.specialEscapeChars_[e];var t=e.charCodeAt(0);if(31<t&&127>t)var r=e;else 256>t?(r="\\x",(16>t||256<t)&&(r+="0")):(r="\\u",4096>t&&(r+="0")),r+=t.toString(16).toUpperCase();return goog.string.jsEscapeCache_[e]=r},goog.string.contains=goog.string.internal.contains,goog.string.caseInsensitiveContains=goog.string.internal.caseInsensitiveContains,goog.string.countOf=function(e,t){return e&&t?e.split(t).length-1:0},goog.string.removeAt=function(e,t,r){var n=e;return 0<=t&&t<e.length&&0<r&&(n=e.substr(0,t)+e.substr(t+r,e.length-t-r)),n},goog.string.remove=function(e,t){return e.replace(t,"")},goog.string.removeAll=function(e,t){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,"")},goog.string.replaceAll=function(e,t,r){return t=new RegExp(goog.string.regExpEscape(t),"g"),e.replace(t,r.replace(/\$/g,"$$$$"))},goog.string.regExpEscape=function(e){return String(e).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},goog.string.repeat=String.prototype.repeat?function(e,t){return e.repeat(t)}:function(e,t){return Array(t+1).join(e)},goog.string.padNumber=function(e,t,r){return(r=(e=goog.isDef(r)?e.toFixed(r):String(e)).indexOf("."))==-1&&(r=e.length),goog.string.repeat("0",Math.max(0,t-r))+e},goog.string.makeSafe=function(e){return e==null?"":String(e)},goog.string.buildString=function(e){return Array.prototype.join.call(arguments,"")},goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)},goog.string.compareVersions=goog.string.internal.compareVersions,goog.string.hashCode=function(e){for(var t=0,r=0;r<e.length;++r)t=31*t+e.charCodeAt(r)>>>0;return t},goog.string.uniqueStringCounter_=2147483648*Math.random()|0,goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(e){var t=Number(e);return t==0&&goog.string.isEmptyOrWhitespace(e)?NaN:t},goog.string.isLowerCamelCase=function(e){return/^[a-z]+([A-Z][a-z]*)*$/.test(e)},goog.string.isUpperCamelCase=function(e){return/^([A-Z][a-z]*)+$/.test(e)},goog.string.toCamelCase=function(e){return String(e).replace(/\-([a-z])/g,function(t,r){return r.toUpperCase()})},goog.string.toSelectorCase=function(e){return String(e).replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(e,t){return t=goog.isString(t)?goog.string.regExpEscape(t):"\\s",e.replace(new RegExp("(^"+(t?"|["+t+"]+":"")+")([a-z])","g"),function(r,n,o){return n+o.toUpperCase()})},goog.string.capitalize=function(e){return String(e.charAt(0)).toUpperCase()+String(e.substr(1)).toLowerCase()},goog.string.parseInt=function(e){return isFinite(e)&&(e=String(e)),goog.isString(e)?/^\s*-?0x/i.test(e)?parseInt(e,16):parseInt(e,10):NaN},goog.string.splitLimit=function(e,t,r){e=e.split(t);for(var n=[];0<r&&e.length;)n.push(e.shift()),r--;return e.length&&n.push(e.join(t)),n},goog.string.lastComponent=function(e,t){if(!t)return e;typeof t=="string"&&(t=[t]);for(var r=-1,n=0;n<t.length;n++)if(t[n]!=""){var o=e.lastIndexOf(t[n]);o>r&&(r=o)}return r==-1?e:e.slice(r+1)},goog.string.editDistance=function(e,t){var r=[],n=[];if(e==t)return 0;if(!e.length||!t.length)return Math.max(e.length,t.length);for(var o=0;o<t.length+1;o++)r[o]=o;for(o=0;o<e.length;o++){n[0]=o+1;for(var l=0;l<t.length;l++)n[l+1]=Math.min(n[l]+1,r[l+1]+1,r[l]+Number(e[o]!=t[l]));for(l=0;l<r.length;l++)r[l]=n[l]}return n[t.length]},goog.labs.userAgent.platform={},goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")},goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()},goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")},goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")},goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")},goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")},goog.labs.userAgent.platform.isChromecast=function(){return goog.labs.userAgent.util.matchUserAgent("CrKey")},goog.labs.userAgent.platform.isKaiOS=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")},goog.labs.userAgent.platform.isGo2Phone=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("GAFP")},goog.labs.userAgent.platform.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent(),t="";return goog.labs.userAgent.platform.isWindows()?t=(e=(t=/Windows (?:NT|Phone) ([0-9.]+)/).exec(e))?e[1]:"0.0":goog.labs.userAgent.platform.isIos()?t=(e=(t=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/).exec(e))&&e[1].replace(/_/g,"."):goog.labs.userAgent.platform.isMacintosh()?t=(e=(t=/Mac OS X ([0-9_.]+)/).exec(e))?e[1].replace(/_/g,"."):"10":goog.labs.userAgent.platform.isKaiOS()?t=(e=(t=/(?:KaiOS)\/(\S+)/i).exec(e))&&e[1]:goog.labs.userAgent.platform.isAndroid()?t=(e=(t=/Android\s+([^\);]+)(\)|;)/).exec(e))&&e[1]:goog.labs.userAgent.platform.isChromeOS()&&(t=(e=(t=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/).exec(e))&&e[1]),t||""},goog.labs.userAgent.platform.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),e)},goog.reflect={},goog.reflect.object=function(e,t){return t},goog.reflect.objectProperty=function(e,t){return e},goog.reflect.sinkValue=function(e){return goog.reflect.sinkValue[" "](e),e},goog.reflect.sinkValue[" "]=goog.nullFunction,goog.reflect.canAccessProperty=function(e,t){try{return goog.reflect.sinkValue(e[t]),!0}catch{}return!1},goog.reflect.cache=function(e,t,r,n){return n=n?n(t):t,Object.prototype.hasOwnProperty.call(e,n)?e[n]:e[n]=r(t)},goog.labs.userAgent.engine={},goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")},goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")},goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()},goog.labs.userAgent.engine.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent();if(e){e=goog.labs.userAgent.util.extractVersionTuples(e);var t,r=goog.labs.userAgent.engine.getEngineTuple_(e);if(r)return r[0]=="Gecko"?goog.labs.userAgent.engine.getVersionForKey_(e,"Firefox"):r[1];if((e=e[0])&&(t=e[2])&&(t=/Trident\/([^\s;]+)/.exec(t)))return t[1]}return""},goog.labs.userAgent.engine.getEngineTuple_=function(e){if(!goog.labs.userAgent.engine.isEdge())return e[1];for(var t=0;t<e.length;t++){var r=e[t];if(r[0]=="Edge")return r}},goog.labs.userAgent.engine.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),e)},goog.labs.userAgent.engine.getVersionForKey_=function(e,t){return(e=goog.array.find(e,function(r){return t==r[0]}))&&e[1]||""},goog.userAgent={},goog.userAgent.ASSUME_IE=!1,goog.userAgent.ASSUME_EDGE=!1,goog.userAgent.ASSUME_GECKO=!1,goog.userAgent.ASSUME_WEBKIT=!1,goog.userAgent.ASSUME_MOBILE_WEBKIT=!1,goog.userAgent.ASSUME_OPERA=!1,goog.userAgent.ASSUME_ANY_VERSION=!1,goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA,goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()},goog.userAgent.getNavigatorTyped=function(){return goog.global.navigator||null},goog.userAgent.getNavigator=function(){return goog.userAgent.getNavigatorTyped()},goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera(),goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE(),goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge(),goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE,goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko(),goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit(),goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")},goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_(),goog.userAgent.SAFARI=goog.userAgent.WEBKIT,goog.userAgent.determinePlatform_=function(){var e=goog.userAgent.getNavigatorTyped();return e&&e.platform||""},goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_(),goog.userAgent.ASSUME_MAC=!1,goog.userAgent.ASSUME_WINDOWS=!1,goog.userAgent.ASSUME_LINUX=!1,goog.userAgent.ASSUME_X11=!1,goog.userAgent.ASSUME_ANDROID=!1,goog.userAgent.ASSUME_IPHONE=!1,goog.userAgent.ASSUME_IPAD=!1,goog.userAgent.ASSUME_IPOD=!1,goog.userAgent.ASSUME_KAIOS=!1,goog.userAgent.ASSUME_GO2PHONE=!1,goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD,goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh(),goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows(),goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()},goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_(),goog.userAgent.isX11_=function(){var e=goog.userAgent.getNavigatorTyped();return!!e&&goog.string.contains(e.appVersion||"","X11")},goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_(),goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid(),goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone(),goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.IPOD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIpod(),goog.userAgent.IOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIos(),goog.userAgent.KAIOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_KAIOS:goog.labs.userAgent.platform.isKaiOS(),goog.userAgent.GO2PHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_GO2PHONE:goog.labs.userAgent.platform.isGo2Phone(),goog.userAgent.determineVersion_=function(){var e="",t=goog.userAgent.getVersionRegexResult_();return t&&(e=t?t[1]:""),goog.userAgent.IE&&(t=goog.userAgent.getDocumentMode_())!=null&&t>parseFloat(e)?String(t):e},goog.userAgent.getVersionRegexResult_=function(){var e=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv:([^\);]+)(\)|;)/.exec(e):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(e):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(e):goog.userAgent.OPERA?/(?:Version)[ \/]?(\S+)/.exec(e):void 0},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,t){return goog.string.compareVersions(e,t)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_,e,function(){return 0<=goog.string.compareVersions(goog.userAgent.VERSION,e)})},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return Number(goog.userAgent.DOCUMENT_MODE)>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){if(goog.global.document&&goog.userAgent.IE)return goog.userAgent.getDocumentMode_()}(),goog.userAgent.product={},goog.userAgent.product.ASSUME_FIREFOX=!1,goog.userAgent.product.ASSUME_IPHONE=!1,goog.userAgent.product.ASSUME_IPAD=!1,goog.userAgent.product.ASSUME_ANDROID=!1,goog.userAgent.product.ASSUME_CHROME=!1,goog.userAgent.product.ASSUME_SAFARI=!1,goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI,goog.userAgent.product.OPERA=goog.userAgent.OPERA,goog.userAgent.product.IE=goog.userAgent.IE,goog.userAgent.product.EDGE=goog.userAgent.EDGE,goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox(),goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()},goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_(),goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser(),goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome(),goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()},goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_(),goog.crypt.base64={},goog.crypt.base64.DEFAULT_ALPHABET_COMMON_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"+/=",goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"-_.",goog.crypt.base64.Alphabet={DEFAULT:0,NO_PADDING:1,WEBSAFE:2,WEBSAFE_DOT_PADDING:3,WEBSAFE_NO_PADDING:4},goog.crypt.base64.paddingChars_="=.",goog.crypt.base64.isPadding_=function(e){return goog.string.contains(goog.crypt.base64.paddingChars_,e)},goog.crypt.base64.byteToCharMaps_={},goog.crypt.base64.charToByteMap_=null,goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA,goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||typeof goog.global.btoa=="function",goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&typeof goog.global.atob=="function",goog.crypt.base64.encodeByteArray=function(e,t){goog.asserts.assert(goog.isArrayLike(e),"encodeByteArray takes an array as a parameter"),t===void 0&&(t=goog.crypt.base64.Alphabet.DEFAULT),goog.crypt.base64.init_(),t=goog.crypt.base64.byteToCharMaps_[t];for(var r=[],n=0;n<e.length;n+=3){var o=e[n],l=n+1<e.length,s=l?e[n+1]:0,i=n+2<e.length,c=i?e[n+2]:0,u=o>>2;o=(3&o)<<4|s>>4,s=(15&s)<<2|c>>6,c&=63,i||(c=64,l||(s=64)),r.push(t[u],t[o],t[s]||"",t[c]||"")}return r.join("")},goog.crypt.base64.encodeString=function(e,t){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!t?goog.global.btoa(e):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(e),t)},goog.crypt.base64.decodeString=function(e,t){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!t)return goog.global.atob(e);var r="";return goog.crypt.base64.decodeStringInternal_(e,function(n){r+=String.fromCharCode(n)}),r},goog.crypt.base64.decodeStringToByteArray=function(e,t){var r=[];return goog.crypt.base64.decodeStringInternal_(e,function(n){r.push(n)}),r},goog.crypt.base64.decodeStringToUint8Array=function(e){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var t=e.length,r=3*t/4;r%3?r=Math.floor(r):goog.crypt.base64.isPadding_(e[t-1])&&(r=goog.crypt.base64.isPadding_(e[t-2])?r-2:r-1);var n=new Uint8Array(r),o=0;return goog.crypt.base64.decodeStringInternal_(e,function(l){n[o++]=l}),n.subarray(0,o)},goog.crypt.base64.decodeStringInternal_=function(e,t){function r(c){for(;n<e.length;){var u=e.charAt(n++),b=goog.crypt.base64.charToByteMap_[u];if(b!=null)return b;if(!goog.string.isEmptyOrWhitespace(u))throw Error("Unknown base64 encoding at char: "+u)}return c}goog.crypt.base64.init_();for(var n=0;;){var o=r(-1),l=r(0),s=r(64),i=r(64);if(i===64&&o===-1)break;t(o<<2|l>>4),s!=64&&(t(l<<4&240|s>>2),i!=64&&t(s<<6&192|i))}},goog.crypt.base64.init_=function(){if(!goog.crypt.base64.charToByteMap_){goog.crypt.base64.charToByteMap_={};for(var e=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));goog.crypt.base64.byteToCharMaps_[r]=n;for(var o=0;o<n.length;o++){var l=n[o],s=goog.crypt.base64.charToByteMap_[l];s===void 0?goog.crypt.base64.charToByteMap_[l]=o:goog.asserts.assert(s===o)}}}},jspb.utils={},jspb.utils.split64Low=0,jspb.utils.split64High=0,jspb.utils.splitUint64=function(e){var t=e>>>0;e=Math.floor((e-t)/jspb.BinaryConstants.TWO_TO_32)>>>0,jspb.utils.split64Low=t,jspb.utils.split64High=e},jspb.utils.splitInt64=function(e){var t=0>e,r=(e=Math.abs(e))>>>0;e=Math.floor((e-r)/jspb.BinaryConstants.TWO_TO_32),e>>>=0,t&&(e=~e>>>0,4294967295<(r=1+(~r>>>0))&&(r=0,4294967295<++e&&(e=0))),jspb.utils.split64Low=r,jspb.utils.split64High=e},jspb.utils.splitZigzag64=function(e){var t=0>e;e=2*Math.abs(e),jspb.utils.splitUint64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;t&&(e==0?r==0?r=e=4294967295:(r--,e=4294967295):e--),jspb.utils.split64Low=e,jspb.utils.split64High=r},jspb.utils.splitFloat32=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)0<1/e?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648);else if(isNaN(e))jspb.utils.split64High=0,jspb.utils.split64Low=2147483647;else if(e>jspb.BinaryConstants.FLOAT32_MAX)jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|2139095040)>>>0;else if(e<jspb.BinaryConstants.FLOAT32_MIN)e=Math.round(e/Math.pow(2,-149)),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|e)>>>0;else{var r=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-r),e=8388607&Math.round(e*jspb.BinaryConstants.TWO_TO_23),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|r+127<<23|e)>>>0}},jspb.utils.splitFloat64=function(e){var t=0>e?1:0;if((e=t?-e:e)===0)jspb.utils.split64High=0<1/e?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(e))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(e>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(t<<31|2146435072)>>>0,jspb.utils.split64Low=0;else if(e<jspb.BinaryConstants.FLOAT64_MIN){var r=e/Math.pow(2,-1074);e=r/jspb.BinaryConstants.TWO_TO_32,jspb.utils.split64High=(t<<31|e)>>>0,jspb.utils.split64Low=r>>>0}else{var n=0;if(2<=(r=e))for(;2<=r&&1023>n;)n++,r/=2;else for(;1>r&&-1022<n;)r*=2,n--;e=(r=e*Math.pow(2,-n))*jspb.BinaryConstants.TWO_TO_20&1048575,r=r*jspb.BinaryConstants.TWO_TO_52>>>0,jspb.utils.split64High=(t<<31|n+1023<<20|e)>>>0,jspb.utils.split64Low=r}},jspb.utils.splitHash64=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),o=e.charCodeAt(3),l=e.charCodeAt(4),s=e.charCodeAt(5),i=e.charCodeAt(6);e=e.charCodeAt(7),jspb.utils.split64Low=t+(r<<8)+(n<<16)+(o<<24)>>>0,jspb.utils.split64High=l+(s<<8)+(i<<16)+(e<<24)>>>0},jspb.utils.joinUint64=function(e,t){return t*jspb.BinaryConstants.TWO_TO_32+(e>>>0)},jspb.utils.joinInt64=function(e,t){var r=2147483648&t;return r&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),e=jspb.utils.joinUint64(e,t),r?-e:e},jspb.utils.toZigzag64=function(e,t,r){var n=t>>31;return r(e<<1^n,(t<<1|e>>>31)^n)},jspb.utils.joinZigzag64=function(e,t){return jspb.utils.fromZigzag64(e,t,jspb.utils.joinInt64)},jspb.utils.fromZigzag64=function(e,t,r){var n=-(1&e);return r((e>>>1|t<<31)^n,t>>>1^n)},jspb.utils.joinFloat32=function(e,t){t=2*(e>>31)+1;var r=e>>>23&255;return e&=8388607,r==255?e?NaN:1/0*t:r==0?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))},jspb.utils.joinFloat64=function(e,t){var r=2*(t>>31)+1,n=t>>>20&2047;return e=jspb.BinaryConstants.TWO_TO_32*(1048575&t)+e,n==2047?e?NaN:1/0*r:n==0?r*Math.pow(2,-1074)*e:r*Math.pow(2,n-1075)*(e+jspb.BinaryConstants.TWO_TO_52)},jspb.utils.joinHash64=function(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)},jspb.utils.DIGITS="0123456789abcdef".split(""),jspb.utils.ZERO_CHAR_CODE_=48,jspb.utils.A_CHAR_CODE_=97,jspb.utils.joinUnsignedDecimalString=function(e,t){function r(o,l){return o=o?String(o):"",l?"0000000".slice(o.length)+o:o}if(2097151>=t)return""+(jspb.BinaryConstants.TWO_TO_32*t+e);var n=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*n+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,1e7<=e&&(n+=Math.floor(e/1e7),e%=1e7),1e7<=n&&(t+=Math.floor(n/1e7),n%=1e7),r(t,0)+r(n,t)+r(e,1)},jspb.utils.joinSignedDecimalString=function(e,t){var r=2147483648&t;return r&&(t=~t+((e=1+~e>>>0)==0?1:0)>>>0),e=jspb.utils.joinUnsignedDecimalString(e,t),r?"-"+e:e},jspb.utils.hash64ToDecimalString=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;return t?jspb.utils.joinSignedDecimalString(e,r):jspb.utils.joinUnsignedDecimalString(e,r)},jspb.utils.hash64ArrayToDecimalStrings=function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]=jspb.utils.hash64ToDecimalString(e[n],t);return r},jspb.utils.decimalStringToHash64=function(e){function t(l,s){for(var i=0;8>i&&(l!==1||0<s);i++)s=l*n[i]+s,n[i]=255&s,s>>>=8}goog.asserts.assert(0<e.length);var r=!1;e[0]==="-"&&(r=!0,e=e.slice(1));for(var n=[0,0,0,0,0,0,0,0],o=0;o<e.length;o++)t(10,e.charCodeAt(o)-jspb.utils.ZERO_CHAR_CODE_);return r&&(function(){for(var l=0;8>l;l++)n[l]=255&~n[l]}(),t(1,1)),goog.crypt.byteArrayToString(n)},jspb.utils.splitDecimalString=function(e){jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e))},jspb.utils.toHexDigit_=function(e){return String.fromCharCode(10>e?jspb.utils.ZERO_CHAR_CODE_+e:jspb.utils.A_CHAR_CODE_-10+e)},jspb.utils.fromHexCharCode_=function(e){return e>=jspb.utils.A_CHAR_CODE_?e-jspb.utils.A_CHAR_CODE_+10:e-jspb.utils.ZERO_CHAR_CODE_},jspb.utils.hash64ToHexString=function(e){var t=Array(18);t[0]="0",t[1]="x";for(var r=0;8>r;r++){var n=e.charCodeAt(7-r);t[2*r+2]=jspb.utils.toHexDigit_(n>>4),t[2*r+3]=jspb.utils.toHexDigit_(15&n)}return t.join("")},jspb.utils.hexStringToHash64=function(e){e=e.toLowerCase(),goog.asserts.assert(e.length==18),goog.asserts.assert(e[0]=="0"),goog.asserts.assert(e[1]=="x");for(var t="",r=0;8>r;r++){var n=jspb.utils.fromHexCharCode_(e.charCodeAt(2*r+2)),o=jspb.utils.fromHexCharCode_(e.charCodeAt(2*r+3));t=String.fromCharCode(16*n+o)+t}return t},jspb.utils.hash64ToNumber=function(e,t){jspb.utils.splitHash64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;return t?jspb.utils.joinInt64(e,r):jspb.utils.joinUint64(e,r)},jspb.utils.numberToHash64=function(e){return jspb.utils.splitInt64(e),jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.utils.countVarints=function(e,t,r){for(var n=0,o=t;o<r;o++)n+=e[o]>>7;return r-t-n},jspb.utils.countVarintFields=function(e,t,r,n){var o=0;if(128>(n=8*n+jspb.BinaryConstants.WireType.VARINT))for(;t<r&&e[t++]==n;)for(o++;;){var l=e[t++];if((128&l)==0)break}else for(;t<r;){for(l=n;128<l;){if(e[t]!=(127&l|128))return o;t++,l>>=7}if(e[t++]!=l)break;for(o++;(128&(l=e[t++]))!=0;);}return o},jspb.utils.countFixedFields_=function(e,t,r,n,o){var l=0;if(128>n)for(;t<r&&e[t++]==n;)l++,t+=o;else for(;t<r;){for(var s=n;128<s;){if(e[t++]!=(127&s|128))return l;s>>=7}if(e[t++]!=s)break;l++,t+=o}return l},jspb.utils.countFixed32Fields=function(e,t,r,n){return jspb.utils.countFixedFields_(e,t,r,8*n+jspb.BinaryConstants.WireType.FIXED32,4)},jspb.utils.countFixed64Fields=function(e,t,r,n){return jspb.utils.countFixedFields_(e,t,r,8*n+jspb.BinaryConstants.WireType.FIXED64,8)},jspb.utils.countDelimitedFields=function(e,t,r,n){var o=0;for(n=8*n+jspb.BinaryConstants.WireType.DELIMITED;t<r;){for(var l=n;128<l;){if(e[t++]!=(127&l|128))return o;l>>=7}if(e[t++]!=l)break;o++;for(var s=0,i=1;s+=(127&(l=e[t++]))*i,i*=128,(128&l)!=0;);t+=s}return o},jspb.utils.debugBytesToTextFormat=function(e){var t='"';if(e){e=jspb.utils.byteSourceToUint8Array(e);for(var r=0;r<e.length;r++)t+="\\x",16>e[r]&&(t+="0"),t+=e[r].toString(16)}return t+'"'},jspb.utils.debugScalarToTextFormat=function(e){return typeof e=="string"?goog.string.quote(e):e.toString()},jspb.utils.stringToByteArray=function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++){var n=e.charCodeAt(r);if(255<n)throw Error("Conversion error: string contains codepoint outside of byte range");t[r]=n}return t},jspb.utils.byteSourceToUint8Array=function(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||Buffer!==void 0&&e.constructor===Buffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Type not convertible to Uint8Array."),new Uint8Array(0))},jspb.BinaryDecoder=function(e,t,r){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1,e&&this.setBlock(e,t,r)},jspb.BinaryDecoder.instanceCache_=[],jspb.BinaryDecoder.alloc=function(e,t,r){if(jspb.BinaryDecoder.instanceCache_.length){var n=jspb.BinaryDecoder.instanceCache_.pop();return e&&n.setBlock(e,t,r),n}return new jspb.BinaryDecoder(e,t,r)},jspb.BinaryDecoder.prototype.free=function(){this.clear(),100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)},jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)},jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1},jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_},jspb.BinaryDecoder.prototype.setBlock=function(e,t,r){this.bytes_=jspb.utils.byteSourceToUint8Array(e),this.start_=t!==void 0?t:0,this.end_=r!==void 0?this.start_+r:this.bytes_.length,this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_},jspb.BinaryDecoder.prototype.setEnd=function(e){this.end_=e},jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_},jspb.BinaryDecoder.prototype.setCursor=function(e){this.cursor_=e},jspb.BinaryDecoder.prototype.advance=function(e){this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_)},jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_},jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_},jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_},jspb.BinaryDecoder.prototype.readSplitVarint64=function(e){for(var t=128,r=0,n=0,o=0;4>o&&128<=t;o++)r|=(127&(t=this.bytes_[this.cursor_++]))<<7*o;if(128<=t&&(r|=(127&(t=this.bytes_[this.cursor_++]))<<28,n|=(127&t)>>4),128<=t)for(o=0;5>o&&128<=t;o++)n|=(127&(t=this.bytes_[this.cursor_++]))<<7*o+3;if(128>t)return e(r>>>0,n>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid."),this.error_=!0},jspb.BinaryDecoder.prototype.readSplitZigzagVarint64=function(e){return this.readSplitVarint64(function(t,r){return jspb.utils.fromZigzag64(t,r,e)})},jspb.BinaryDecoder.prototype.readSplitFixed64=function(e){var t=this.bytes_,r=this.cursor_;this.cursor_+=8;for(var n=0,o=0,l=r+7;l>=r;l--)n=n<<8|t[l],o=o<<8|t[l+4];return e(n,o)},jspb.BinaryDecoder.prototype.skipVarint=function(){for(;128&this.bytes_[this.cursor_];)this.cursor_++;this.cursor_++},jspb.BinaryDecoder.prototype.unskipVarint=function(e){for(;128<e;)this.cursor_--,e>>>=7;this.cursor_--},jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var e=this.bytes_,t=e[this.cursor_+0],r=127&t;return 128>t?(this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+1]))<<7,128>t?(this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+2]))<<14,128>t?(this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(127&(t=e[this.cursor_+3]))<<21,128>t?(this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),r):(r|=(15&(t=e[this.cursor_+4]))<<28,128>t?(this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),r>>>0):(this.cursor_+=5,128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&goog.asserts.assert(!1),goog.asserts.assert(this.cursor_<=this.end_),r)))))},jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32,jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()},jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()},jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var e=this.readUnsignedVarint32();return e>>>1^-(1&e)},jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinUint64)},jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinUnsignedDecimalString)},jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinInt64)},jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64(jspb.utils.joinZigzag64)},jspb.BinaryDecoder.prototype.readZigzagVarintHash64=function(){return this.readSplitZigzagVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readSplitZigzagVarint64(jspb.utils.joinSignedDecimalString)},jspb.BinaryDecoder.prototype.readUint8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e},jspb.BinaryDecoder.prototype.readUint16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8},jspb.BinaryDecoder.prototype.readUint32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8|r<<16|n<<24)>>>0},jspb.BinaryDecoder.prototype.readUint64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUint64(e,t)},jspb.BinaryDecoder.prototype.readUint64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUnsignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readInt8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e<<24>>24},jspb.BinaryDecoder.prototype.readInt16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8)<<16>>16},jspb.BinaryDecoder.prototype.readInt32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],n=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8|r<<16|n<<24},jspb.BinaryDecoder.prototype.readInt64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinInt64(e,t)},jspb.BinaryDecoder.prototype.readInt64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinSignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readFloat=function(){var e=this.readUint32();return jspb.utils.joinFloat32(e,0)},jspb.BinaryDecoder.prototype.readDouble=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinFloat64(e,t)},jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]},jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()},jspb.BinaryDecoder.prototype.readString=function(e){var t=this.bytes_,r=this.cursor_;e=r+e;for(var n=[],o="";r<e;){var l=t[r++];if(128>l)n.push(l);else{if(192>l)continue;if(224>l){var s=t[r++];n.push((31&l)<<6|63&s)}else if(240>l){s=t[r++];var i=t[r++];n.push((15&l)<<12|(63&s)<<6|63&i)}else 248>l&&(l=(7&l)<<18|(63&(s=t[r++]))<<12|(63&(i=t[r++]))<<6|63&t[r++],l-=65536,n.push(55296+(l>>10&1023),56320+(1023&l)))}8192<=n.length&&(o+=String.fromCharCode.apply(null,n),n.length=0)}return o+=goog.crypt.byteArrayToString(n),this.cursor_=r,o},jspb.BinaryDecoder.prototype.readStringWithLength=function(){var e=this.readUnsignedVarint32();return this.readString(e)},jspb.BinaryDecoder.prototype.readBytes=function(e){if(0>e||this.cursor_+e>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var t=this.bytes_.subarray(this.cursor_,this.cursor_+e);return this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_),t},jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64(jspb.utils.joinHash64)},jspb.BinaryDecoder.prototype.readFixedHash64=function(){var e=this.bytes_,t=this.cursor_,r=e[t+0],n=e[t+1],o=e[t+2],l=e[t+3],s=e[t+4],i=e[t+5],c=e[t+6];return e=e[t+7],this.cursor_+=8,String.fromCharCode(r,n,o,l,s,i,c,e)},jspb.BinaryReader=function(e,t,r){this.decoder_=jspb.BinaryDecoder.alloc(e,t,r),this.fieldCursor_=this.decoder_.getCursor(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null},jspb.BinaryReader.instanceCache_=[],jspb.BinaryReader.alloc=function(e,t,r){if(jspb.BinaryReader.instanceCache_.length){var n=jspb.BinaryReader.instanceCache_.pop();return e&&n.decoder_.setBlock(e,t,r),n}return new jspb.BinaryReader(e,t,r)},jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc,jspb.BinaryReader.prototype.free=function(){this.decoder_.clear(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null,100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)},jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_},jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()},jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()},jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_},jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_},jspb.BinaryReader.prototype.isDelimited=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED},jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP},jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()},jspb.BinaryReader.prototype.setBlock=function(e,t,r){this.decoder_.setBlock(e,t,r),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.advance=function(e){this.decoder_.advance(e)},jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var e=this.decoder_.readUnsignedVarint32(),t=e>>>3;return(e&=7)!=jspb.BinaryConstants.WireType.VARINT&&e!=jspb.BinaryConstants.WireType.FIXED32&&e!=jspb.BinaryConstants.WireType.FIXED64&&e!=jspb.BinaryConstants.WireType.DELIMITED&&e!=jspb.BinaryConstants.WireType.START_GROUP&&e!=jspb.BinaryConstants.WireType.END_GROUP?(goog.asserts.fail("Invalid wire type: %s (at position %s)",e,this.fieldCursor_),this.error_=!0,!1):(this.nextField_=t,this.nextWireType_=e,!0)},jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)},jspb.BinaryReader.prototype.skipMatchingFields=function(){var e=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==e;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()},jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.VARINT?(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField()):this.decoder_.skipVarint()},jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var e=this.decoder_.readUnsignedVarint32();this.decoder_.advance(e)}},jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED32?(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField()):this.decoder_.advance(4)},jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED64?(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField()):this.decoder_.advance(8)},jspb.BinaryReader.prototype.skipGroup=function(){for(var e=this.nextField_;;){if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF"),this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP){this.nextField_!=e&&(goog.asserts.fail("Unmatched end-group tag"),this.error_=!0);break}this.skipField()}},jspb.BinaryReader.prototype.skipField=function(){switch(this.nextWireType_){case jspb.BinaryConstants.WireType.VARINT:this.skipVarintField();break;case jspb.BinaryConstants.WireType.FIXED64:this.skipFixed64Field();break;case jspb.BinaryConstants.WireType.DELIMITED:this.skipDelimitedField();break;case jspb.BinaryConstants.WireType.FIXED32:this.skipFixed32Field();break;case jspb.BinaryConstants.WireType.START_GROUP:this.skipGroup();break;default:goog.asserts.fail("Invalid wire encoding for field.")}},jspb.BinaryReader.prototype.registerReadCallback=function(e,t){this.readCallbacks_===null&&(this.readCallbacks_={}),goog.asserts.assert(!this.readCallbacks_[e]),this.readCallbacks_[e]=t},jspb.BinaryReader.prototype.runReadCallback=function(e){return goog.asserts.assert(this.readCallbacks_!==null),e=this.readCallbacks_[e],goog.asserts.assert(e),e(this)},jspb.BinaryReader.prototype.readAny=function(e){this.nextWireType_=jspb.BinaryConstants.FieldTypeToWireType(e);var t=jspb.BinaryConstants.FieldType;switch(e){case t.DOUBLE:return this.readDouble();case t.FLOAT:return this.readFloat();case t.INT64:return this.readInt64();case t.UINT64:return this.readUint64();case t.INT32:return this.readInt32();case t.FIXED64:return this.readFixed64();case t.FIXED32:return this.readFixed32();case t.BOOL:return this.readBool();case t.STRING:return this.readString();case t.GROUP:goog.asserts.fail("Group field type not supported in readAny()");case t.MESSAGE:goog.asserts.fail("Message field type not supported in readAny()");case t.BYTES:return this.readBytes();case t.UINT32:return this.readUint32();case t.ENUM:return this.readEnum();case t.SFIXED32:return this.readSfixed32();case t.SFIXED64:return this.readSfixed64();case t.SINT32:return this.readSint32();case t.SINT64:return this.readSint64();case t.FHASH64:return this.readFixedHash64();case t.VHASH64:return this.readVarintHash64();default:goog.asserts.fail("Invalid field type in readAny()")}return 0},jspb.BinaryReader.prototype.readMessage=function(e,t){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var r=this.decoder_.getEnd(),n=this.decoder_.readUnsignedVarint32();n=this.decoder_.getCursor()+n,this.decoder_.setEnd(n),t(e,this),this.decoder_.setCursor(n),this.decoder_.setEnd(r)},jspb.BinaryReader.prototype.readGroup=function(e,t,r){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP),goog.asserts.assert(this.nextField_==e),r(t,this),this.error_||this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP||(goog.asserts.fail("Group submessage did not end with an END_GROUP tag"),this.error_=!0)},jspb.BinaryReader.prototype.getFieldDecoder=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32(),t=this.decoder_.getCursor(),r=t+e;return e=jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(),t,e),this.decoder_.setCursor(r),e},jspb.BinaryReader.prototype.readInt32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32()},jspb.BinaryReader.prototype.readInt32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint32String()},jspb.BinaryReader.prototype.readInt64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readInt64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64String()},jspb.BinaryReader.prototype.readUint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readUint32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint32String()},jspb.BinaryReader.prototype.readUint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64()},jspb.BinaryReader.prototype.readUint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readUnsignedVarint64String()},jspb.BinaryReader.prototype.readSint32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint32()},jspb.BinaryReader.prototype.readSint64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64()},jspb.BinaryReader.prototype.readSint64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarint64String()},jspb.BinaryReader.prototype.readFixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readUint32()},jspb.BinaryReader.prototype.readFixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64()},jspb.BinaryReader.prototype.readFixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readUint64String()},jspb.BinaryReader.prototype.readSfixed32=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32()},jspb.BinaryReader.prototype.readSfixed32String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readInt32().toString()},jspb.BinaryReader.prototype.readSfixed64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64()},jspb.BinaryReader.prototype.readSfixed64String=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readInt64String()},jspb.BinaryReader.prototype.readFloat=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32),this.decoder_.readFloat()},jspb.BinaryReader.prototype.readDouble=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readDouble()},jspb.BinaryReader.prototype.readBool=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),!!this.decoder_.readUnsignedVarint32()},jspb.BinaryReader.prototype.readEnum=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSignedVarint64()},jspb.BinaryReader.prototype.readString=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readString(e)},jspb.BinaryReader.prototype.readBytes=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var e=this.decoder_.readUnsignedVarint32();return this.decoder_.readBytes(e)},jspb.BinaryReader.prototype.readVarintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readVarintHash64()},jspb.BinaryReader.prototype.readSintHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readZigzagVarintHash64()},jspb.BinaryReader.prototype.readSplitVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(e)},jspb.BinaryReader.prototype.readSplitZigzagVarint64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT),this.decoder_.readSplitVarint64(function(t,r){return jspb.utils.fromZigzag64(t,r,e)})},jspb.BinaryReader.prototype.readFixedHash64=function(){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readFixedHash64()},jspb.BinaryReader.prototype.readSplitFixed64=function(e){return goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64),this.decoder_.readSplitFixed64(e)},jspb.BinaryReader.prototype.readPackedField_=function(e){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var t=this.decoder_.readUnsignedVarint32();t=this.decoder_.getCursor()+t;for(var r=[];this.decoder_.getCursor()<t;)r.push(e.call(this.decoder_));return r},jspb.BinaryReader.prototype.readPackedInt32=function(){return this.readPackedField_(this.decoder_.readSignedVarint32)},jspb.BinaryReader.prototype.readPackedInt32String=function(){return this.readPackedField_(this.decoder_.readSignedVarint32String)},jspb.BinaryReader.prototype.readPackedInt64=function(){return this.readPackedField_(this.decoder_.readSignedVarint64)},jspb.BinaryReader.prototype.readPackedInt64String=function(){return this.readPackedField_(this.decoder_.readSignedVarint64String)},jspb.BinaryReader.prototype.readPackedUint32=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32)},jspb.BinaryReader.prototype.readPackedUint32String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32String)},jspb.BinaryReader.prototype.readPackedUint64=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64)},jspb.BinaryReader.prototype.readPackedUint64String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64String)},jspb.BinaryReader.prototype.readPackedSint32=function(){return this.readPackedField_(this.decoder_.readZigzagVarint32)},jspb.BinaryReader.prototype.readPackedSint64=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64)},jspb.BinaryReader.prototype.readPackedSint64String=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64String)},jspb.BinaryReader.prototype.readPackedFixed32=function(){return this.readPackedField_(this.decoder_.readUint32)},jspb.BinaryReader.prototype.readPackedFixed64=function(){return this.readPackedField_(this.decoder_.readUint64)},jspb.BinaryReader.prototype.readPackedFixed64String=function(){return this.readPackedField_(this.decoder_.readUint64String)},jspb.BinaryReader.prototype.readPackedSfixed32=function(){return this.readPackedField_(this.decoder_.readInt32)},jspb.BinaryReader.prototype.readPackedSfixed64=function(){return this.readPackedField_(this.decoder_.readInt64)},jspb.BinaryReader.prototype.readPackedSfixed64String=function(){return this.readPackedField_(this.decoder_.readInt64String)},jspb.BinaryReader.prototype.readPackedFloat=function(){return this.readPackedField_(this.decoder_.readFloat)},jspb.BinaryReader.prototype.readPackedDouble=function(){return this.readPackedField_(this.decoder_.readDouble)},jspb.BinaryReader.prototype.readPackedBool=function(){return this.readPackedField_(this.decoder_.readBool)},jspb.BinaryReader.prototype.readPackedEnum=function(){return this.readPackedField_(this.decoder_.readEnum)},jspb.BinaryReader.prototype.readPackedVarintHash64=function(){return this.readPackedField_(this.decoder_.readVarintHash64)},jspb.BinaryReader.prototype.readPackedFixedHash64=function(){return this.readPackedField_(this.decoder_.readFixedHash64)},jspb.Map=function(e,t){this.arr_=e,this.valueCtor_=t,this.map_={},this.arrClean=!0,0<this.arr_.length&&this.loadFromArray_()},jspb.Map.prototype.loadFromArray_=function(){for(var e=0;e<this.arr_.length;e++){var t=this.arr_[e],r=t[0];this.map_[r.toString()]=new jspb.Map.Entry_(r,t[1])}this.arrClean=!0},jspb.Map.prototype.toArray=function(){if(this.arrClean){if(this.valueCtor_){var e,t=this.map_;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e].valueWrapper;r&&r.toArray()}}}else{for(this.arr_.length=0,(t=this.stringKeys_()).sort(),e=0;e<t.length;e++){var n=this.map_[t[e]];(r=n.valueWrapper)&&r.toArray(),this.arr_.push([n.key,n.value])}this.arrClean=!0}return this.arr_},jspb.Map.prototype.toObject=function(e,t){for(var r=this.toArray(),n=[],o=0;o<r.length;o++){var l=this.map_[r[o][0].toString()];this.wrapEntry_(l);var s=l.valueWrapper;s?(goog.asserts.assert(t),n.push([l.key,t(e,s)])):n.push([l.key,l.value])}return n},jspb.Map.fromObject=function(e,t,r){t=new jspb.Map([],t);for(var n=0;n<e.length;n++){var o=e[n][0],l=r(e[n][1]);t.set(o,l)}return t},jspb.Map.ArrayIteratorIterable_=function(e){this.idx_=0,this.arr_=e},jspb.Map.ArrayIteratorIterable_.prototype.next=function(){return this.idx_<this.arr_.length?{done:!1,value:this.arr_[this.idx_++]}:{done:!0,value:void 0}},typeof Symbol!="undefined"&&(jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator]=function(){return this}),jspb.Map.prototype.getLength=function(){return this.stringKeys_().length},jspb.Map.prototype.clear=function(){this.map_={},this.arrClean=!1},jspb.Map.prototype.del=function(e){e=e.toString();var t=this.map_.hasOwnProperty(e);return delete this.map_[e],this.arrClean=!1,t},jspb.Map.prototype.getEntryList=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++){var n=this.map_[t[r]];e.push([n.key,n.value])}return e},jspb.Map.prototype.entries=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++){var n=this.map_[t[r]];e.push([n.key,this.wrapEntry_(n)])}return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.keys=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++)e.push(this.map_[t[r]].key);return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.values=function(){var e=[],t=this.stringKeys_();t.sort();for(var r=0;r<t.length;r++)e.push(this.wrapEntry_(this.map_[t[r]]));return new jspb.Map.ArrayIteratorIterable_(e)},jspb.Map.prototype.forEach=function(e,t){var r=this.stringKeys_();r.sort();for(var n=0;n<r.length;n++){var o=this.map_[r[n]];e.call(t,this.wrapEntry_(o),o.key,this)}},jspb.Map.prototype.set=function(e,t){var r=new jspb.Map.Entry_(e);return this.valueCtor_?(r.valueWrapper=t,r.value=t.toArray()):r.value=t,this.map_[e.toString()]=r,this.arrClean=!1,this},jspb.Map.prototype.wrapEntry_=function(e){return this.valueCtor_?(e.valueWrapper||(e.valueWrapper=new this.valueCtor_(e.value)),e.valueWrapper):e.value},jspb.Map.prototype.get=function(e){if(e=this.map_[e.toString()])return this.wrapEntry_(e)},jspb.Map.prototype.has=function(e){return e.toString()in this.map_},jspb.Map.prototype.serializeBinary=function(e,t,r,n,o){var l=this.stringKeys_();l.sort();for(var s=0;s<l.length;s++){var i=this.map_[l[s]];t.beginSubMessage(e),r.call(t,1,i.key),this.valueCtor_?n.call(t,2,this.wrapEntry_(i),o):n.call(t,2,i.value),t.endSubMessage()}},jspb.Map.deserializeBinary=function(e,t,r,n,o,l,s){for(;t.nextField()&&!t.isEndGroup();){var i=t.getFieldNumber();i==1?l=r.call(t):i==2&&(e.valueCtor_?(goog.asserts.assert(o),s||(s=new e.valueCtor_),n.call(t,s,o)):s=n.call(t))}goog.asserts.assert(l!=null),goog.asserts.assert(s!=null),e.set(l,s)},jspb.Map.prototype.stringKeys_=function(){var e,t=this.map_,r=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(e);return r},jspb.Map.Entry_=function(e,t){this.key=e,this.value=t,this.valueWrapper=void 0},jspb.ExtensionFieldInfo=function(e,t,r,n,o){this.fieldIndex=e,this.fieldName=t,this.ctor=r,this.toObjectFn=n,this.isRepeated=o},jspb.ExtensionFieldBinaryInfo=function(e,t,r,n,o,l){this.fieldInfo=e,this.binaryReaderFn=t,this.binaryWriterFn=r,this.binaryMessageSerializeFn=n,this.binaryMessageDeserializeFn=o,this.isPacked=l},jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor},jspb.Message=function(){},jspb.Message.GENERATE_TO_OBJECT=!0,jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE,jspb.Message.GENERATE_TO_STRING=!0,jspb.Message.ASSUME_LOCAL_ARRAYS=!1,jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0,jspb.Message.SUPPORTS_UINT8ARRAY_=typeof Uint8Array=="function",jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_},jspb.Message.getIndex_=function(e,t){return t+e.arrayIndexOffset_},jspb.Message.hiddenES6Property_=function(){},jspb.Message.getFieldNumber_=function(e,t){return t-e.arrayIndexOffset_},jspb.Message.initialize=function(e,t,r,n,o,l){if(e.wrappers_=null,t||(t=r?[r]:[]),e.messageId_=r?String(r):void 0,e.arrayIndexOffset_=r===0?-1:0,e.array=t,jspb.Message.initPivotAndExtensionObject_(e,n),e.convertedPrimitiveFields_={},jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(e.repeatedFields=o),o)for(t=0;t<o.length;t++)(r=o[t])<e.pivot_?(r=jspb.Message.getIndex_(e,r),e.array[r]=e.array[r]||jspb.Message.EMPTY_LIST_SENTINEL_):(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[r]=e.extensionObject_[r]||jspb.Message.EMPTY_LIST_SENTINEL_);if(l&&l.length)for(t=0;t<l.length;t++)jspb.Message.computeOneofCase(e,l[t])},jspb.Message.EMPTY_LIST_SENTINEL_=goog.DEBUG&&Object.freeze?Object.freeze([]):[],jspb.Message.isArray_=function(e){return jspb.Message.ASSUME_LOCAL_ARRAYS?e instanceof Array:Array.isArray(e)},jspb.Message.isExtensionObject_=function(e){return!(e===null||typeof e!="object"||jspb.Message.isArray_(e)||jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)},jspb.Message.initPivotAndExtensionObject_=function(e,t){var r=e.array.length,n=-1;if(r&&(n=r-1,r=e.array[n],jspb.Message.isExtensionObject_(r)))return e.pivot_=jspb.Message.getFieldNumber_(e,n),void(e.extensionObject_=r);-1<t?(e.pivot_=Math.max(t,jspb.Message.getFieldNumber_(e,n+1)),e.extensionObject_=null):e.pivot_=Number.MAX_VALUE},jspb.Message.maybeInitEmptyExtensionObject_=function(e){var t=jspb.Message.getIndex_(e,e.pivot_);e.array[t]||(e.extensionObject_=e.array[t]={})},jspb.Message.toObjectList=function(e,t,r){for(var n=[],o=0;o<e.length;o++)n[o]=t.call(e[o],r,e[o]);return n},jspb.Message.toObjectExtension=function(e,t,r,n,o){for(var l in r){var s=r[l],i=n.call(e,s);if(i!=null){for(var c in s.fieldName)if(s.fieldName.hasOwnProperty(c))break;t[c]=s.toObjectFn?s.isRepeated?jspb.Message.toObjectList(i,s.toObjectFn,o):s.toObjectFn(o,i):i}}},jspb.Message.serializeBinaryExtensions=function(e,t,r,n){for(var o in r){var l=r[o],s=l.fieldInfo;if(!l.binaryWriterFn)throw Error("Message extension present that was generated without binary serialization support");var i=n.call(e,s);if(i!=null)if(s.isMessageType()){if(!l.binaryMessageSerializeFn)throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");l.binaryWriterFn.call(t,s.fieldIndex,i,l.binaryMessageSerializeFn)}else l.binaryWriterFn.call(t,s.fieldIndex,i)}},jspb.Message.readBinaryExtension=function(e,t,r,n,o){var l=r[t.getFieldNumber()];if(l){if(r=l.fieldInfo,!l.binaryReaderFn)throw Error("Deserializing extension whose generated code does not support binary format");if(r.isMessageType()){var s=new r.ctor;l.binaryReaderFn.call(t,s,l.binaryMessageDeserializeFn)}else s=l.binaryReaderFn.call(t);r.isRepeated&&!l.isPacked?(t=n.call(e,r))?t.push(s):o.call(e,r,[s]):o.call(e,r,s)}else t.skipField()},jspb.Message.getField=function(e,t){if(t<e.pivot_){t=jspb.Message.getIndex_(e,t);var r=e.array[t];return r===jspb.Message.EMPTY_LIST_SENTINEL_?e.array[t]=[]:r}if(e.extensionObject_)return(r=e.extensionObject_[t])===jspb.Message.EMPTY_LIST_SENTINEL_?e.extensionObject_[t]=[]:r},jspb.Message.getRepeatedField=function(e,t){return jspb.Message.getField(e,t)},jspb.Message.getOptionalFloatingPointField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:+e},jspb.Message.getBooleanField=function(e,t){return(e=jspb.Message.getField(e,t))==null?e:!!e},jspb.Message.getRepeatedFloatingPointField=function(e,t){var r=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var n=0;n<r.length;n++)r[n]=+r[n];e.convertedPrimitiveFields_[t]=!0}return r},jspb.Message.getRepeatedBooleanField=function(e,t){var r=jspb.Message.getRepeatedField(e,t);if(e.convertedPrimitiveFields_||(e.convertedPrimitiveFields_={}),!e.convertedPrimitiveFields_[t]){for(var n=0;n<r.length;n++)r[n]=!!r[n];e.convertedPrimitiveFields_[t]=!0}return r},jspb.Message.bytesAsB64=function(e){return e==null||typeof e=="string"?e:jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array?goog.crypt.base64.encodeByteArray(e):(goog.asserts.fail("Cannot coerce to b64 string: "+goog.typeOf(e)),null)},jspb.Message.bytesAsU8=function(e){return e==null||e instanceof Uint8Array?e:typeof e=="string"?goog.crypt.base64.decodeStringToUint8Array(e):(goog.asserts.fail("Cannot coerce to Uint8Array: "+goog.typeOf(e)),null)},jspb.Message.bytesListAsB64=function(e){return jspb.Message.assertConsistentTypes_(e),e.length&&typeof e[0]!="string"?goog.array.map(e,jspb.Message.bytesAsB64):e},jspb.Message.bytesListAsU8=function(e){return jspb.Message.assertConsistentTypes_(e),!e.length||e[0]instanceof Uint8Array?e:goog.array.map(e,jspb.Message.bytesAsU8)},jspb.Message.assertConsistentTypes_=function(e){if(goog.DEBUG&&e&&1<e.length){var t=goog.typeOf(e[0]);goog.array.forEach(e,function(r){goog.typeOf(r)!=t&&goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got "+goog.typeOf(r)+" expected "+t)})}},jspb.Message.getFieldWithDefault=function(e,t,r){return(e=jspb.Message.getField(e,t))==null?r:e},jspb.Message.getBooleanFieldWithDefault=function(e,t,r){return(e=jspb.Message.getBooleanField(e,t))==null?r:e},jspb.Message.getFloatingPointFieldWithDefault=function(e,t,r){return(e=jspb.Message.getOptionalFloatingPointField(e,t))==null?r:e},jspb.Message.getFieldProto3=jspb.Message.getFieldWithDefault,jspb.Message.getMapField=function(e,t,r,n){if(e.wrappers_||(e.wrappers_={}),t in e.wrappers_)return e.wrappers_[t];var o=jspb.Message.getField(e,t);if(!o){if(r)return;o=[],jspb.Message.setField(e,t,o)}return e.wrappers_[t]=new jspb.Map(o,n)},jspb.Message.setField=function(e,t,r){return goog.asserts.assertInstanceof(e,jspb.Message),t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=r:(jspb.Message.maybeInitEmptyExtensionObject_(e),e.extensionObject_[t]=r),e},jspb.Message.setProto3IntField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3FloatField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3BooleanField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,!1)},jspb.Message.setProto3StringField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"")},jspb.Message.setProto3BytesField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"")},jspb.Message.setProto3EnumField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,0)},jspb.Message.setProto3StringIntField=function(e,t,r){return jspb.Message.setFieldIgnoringDefault_(e,t,r,"0")},jspb.Message.setFieldIgnoringDefault_=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),r!==n?jspb.Message.setField(e,t,r):t<e.pivot_?e.array[jspb.Message.getIndex_(e,t)]=null:(jspb.Message.maybeInitEmptyExtensionObject_(e),delete e.extensionObject_[t]),e},jspb.Message.addToRepeatedField=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),t=jspb.Message.getRepeatedField(e,t),n!=null?t.splice(n,0,r):t.push(r),e},jspb.Message.setOneofField=function(e,t,r,n){return goog.asserts.assertInstanceof(e,jspb.Message),(r=jspb.Message.computeOneofCase(e,r))&&r!==t&&n!==void 0&&(e.wrappers_&&r in e.wrappers_&&(e.wrappers_[r]=void 0),jspb.Message.setField(e,r,void 0)),jspb.Message.setField(e,t,n)},jspb.Message.computeOneofCase=function(e,t){for(var r,n,o=0;o<t.length;o++){var l=t[o],s=jspb.Message.getField(e,l);s!=null&&(r=l,n=s,jspb.Message.setField(e,l,void 0))}return r?(jspb.Message.setField(e,r,n),r):0},jspb.Message.getWrapperField=function(e,t,r,n){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[r]){var o=jspb.Message.getField(e,r);(n||o)&&(e.wrappers_[r]=new t(o))}return e.wrappers_[r]},jspb.Message.getRepeatedWrapperField=function(e,t,r){return jspb.Message.wrapRepeatedField_(e,t,r),(t=e.wrappers_[r])==jspb.Message.EMPTY_LIST_SENTINEL_&&(t=e.wrappers_[r]=[]),t},jspb.Message.wrapRepeatedField_=function(e,t,r){if(e.wrappers_||(e.wrappers_={}),!e.wrappers_[r]){for(var n=jspb.Message.getRepeatedField(e,r),o=[],l=0;l<n.length;l++)o[l]=new t(n[l]);e.wrappers_[r]=o}},jspb.Message.setWrapperField=function(e,t,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var n=r&&r.toArray();return e.wrappers_[t]=r,jspb.Message.setField(e,t,n)},jspb.Message.setOneofWrapperField=function(e,t,r,n){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={});var o=n&&n.toArray();return e.wrappers_[t]=n,jspb.Message.setOneofField(e,t,r,o)},jspb.Message.setRepeatedWrapperField=function(e,t,r){goog.asserts.assertInstanceof(e,jspb.Message),e.wrappers_||(e.wrappers_={}),r=r||[];for(var n=[],o=0;o<r.length;o++)n[o]=r[o].toArray();return e.wrappers_[t]=r,jspb.Message.setField(e,t,n)},jspb.Message.addToRepeatedWrapperField=function(e,t,r,n,o){jspb.Message.wrapRepeatedField_(e,n,t);var l=e.wrappers_[t];return l||(l=e.wrappers_[t]=[]),r=r||new n,e=jspb.Message.getRepeatedField(e,t),o!=null?(l.splice(o,0,r),e.splice(o,0,r.toArray())):(l.push(r),e.push(r.toArray())),r},jspb.Message.toMap=function(e,t,r,n){for(var o={},l=0;l<e.length;l++)o[t.call(e[l])]=r?r.call(e[l],n,e[l]):e[l];return o},jspb.Message.prototype.syncMapFields_=function(){if(this.wrappers_)for(var e in this.wrappers_){var t=this.wrappers_[e];if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&t[r].toArray();else t&&t.toArray()}},jspb.Message.prototype.toArray=function(){return this.syncMapFields_(),this.array},jspb.Message.GENERATE_TO_STRING&&(jspb.Message.prototype.toString=function(){return this.syncMapFields_(),this.array.toString()}),jspb.Message.prototype.getExtension=function(e){if(this.extensionObject_){this.wrappers_||(this.wrappers_={});var t=e.fieldIndex;if(e.isRepeated){if(e.isMessageType())return this.wrappers_[t]||(this.wrappers_[t]=goog.array.map(this.extensionObject_[t]||[],function(r){return new e.ctor(r)})),this.wrappers_[t]}else if(e.isMessageType())return!this.wrappers_[t]&&this.extensionObject_[t]&&(this.wrappers_[t]=new e.ctor(this.extensionObject_[t])),this.wrappers_[t];return this.extensionObject_[t]}},jspb.Message.prototype.setExtension=function(e,t){this.wrappers_||(this.wrappers_={}),jspb.Message.maybeInitEmptyExtensionObject_(this);var r=e.fieldIndex;return e.isRepeated?(t=t||[],e.isMessageType()?(this.wrappers_[r]=t,this.extensionObject_[r]=goog.array.map(t,function(n){return n.toArray()})):this.extensionObject_[r]=t):e.isMessageType()?(this.wrappers_[r]=t,this.extensionObject_[r]=t&&t.toArray()):this.extensionObject_[r]=t,this},jspb.Message.difference=function(e,t){if(!(e instanceof t.constructor))throw Error("Messages have different types.");var r=e.toArray();t=t.toArray();var n=[],o=0,l=r.length>t.length?r.length:t.length;for(e.getJsPbMessageId()&&(n[0]=e.getJsPbMessageId(),o=1);o<l;o++)jspb.Message.compareFields(r[o],t[o])||(n[o]=t[o]);return new e.constructor(n)},jspb.Message.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&jspb.Message.compareFields(e.toArray(),t.toArray())},jspb.Message.compareExtensions=function(e,t){e=e||{},t=t||{};var r,n={};for(r in e)n[r]=0;for(r in t)n[r]=0;for(r in n)if(!jspb.Message.compareFields(e[r],t[r]))return!1;return!0},jspb.Message.compareFields=function(e,t){if(e==t)return!0;if(!goog.isObject(e)||!goog.isObject(t))return!!(typeof e=="number"&&isNaN(e)||typeof t=="number"&&isNaN(t))&&String(e)==String(t);if(e.constructor!=t.constructor)return!1;if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}if(e.constructor===Array){var n=void 0,o=void 0,l=Math.max(e.length,t.length);for(r=0;r<l;r++){var s=e[r],i=t[r];if(s&&s.constructor==Object&&(goog.asserts.assert(n===void 0),goog.asserts.assert(r===e.length-1),n=s,s=void 0),i&&i.constructor==Object&&(goog.asserts.assert(o===void 0),goog.asserts.assert(r===t.length-1),o=i,i=void 0),!jspb.Message.compareFields(s,i))return!1}return!n&&!o||(n=n||{},o=o||{},jspb.Message.compareExtensions(n,o))}if(e.constructor===Object)return jspb.Message.compareExtensions(e,t);throw Error("Invalid type in JSPB array")},jspb.Message.prototype.cloneMessage=function(){return jspb.Message.cloneMessage(this)},jspb.Message.prototype.clone=function(){return jspb.Message.cloneMessage(this)},jspb.Message.clone=function(e){return jspb.Message.cloneMessage(e)},jspb.Message.cloneMessage=function(e){return new e.constructor(jspb.Message.clone_(e.toArray()))},jspb.Message.copyInto=function(e,t){goog.asserts.assertInstanceof(e,jspb.Message),goog.asserts.assertInstanceof(t,jspb.Message),goog.asserts.assert(e.constructor==t.constructor,"Copy source and target message should have the same type."),e=jspb.Message.clone(e);for(var r=t.toArray(),n=e.toArray(),o=r.length=0;o<n.length;o++)r[o]=n[o];t.wrappers_=e.wrappers_,t.extensionObject_=e.extensionObject_},jspb.Message.clone_=function(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<e.length;r++){var n=e[r];n!=null&&(t[r]=typeof n=="object"?jspb.Message.clone_(goog.asserts.assert(n)):n)}return t}if(jspb.Message.SUPPORTS_UINT8ARRAY_&&e instanceof Uint8Array)return new Uint8Array(e);for(r in t={},e)(n=e[r])!=null&&(t[r]=typeof n=="object"?jspb.Message.clone_(goog.asserts.assert(n)):n);return t},jspb.Message.registerMessageType=function(e,t){t.messageId=e},jspb.Message.messageSetExtensions={},jspb.Message.messageSetExtensionsBinary={},jspb.arith={},jspb.arith.UInt64=function(e,t){this.lo=e,this.hi=t},jspb.arith.UInt64.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1},jspb.arith.UInt64.prototype.rightShift=function(){return new jspb.arith.UInt64((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},jspb.arith.UInt64.prototype.msb=function(){return!!(2147483648&this.hi)},jspb.arith.UInt64.prototype.lsb=function(){return!!(1&this.lo)},jspb.arith.UInt64.prototype.zero=function(){return this.lo==0&&this.hi==0},jspb.arith.UInt64.prototype.add=function(e){return new jspb.arith.UInt64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.UInt64.prototype.sub=function(e){return new jspb.arith.UInt64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.UInt64.mul32x32=function(e,t){var r=65535&e,n=65535&t,o=t>>>16;for(t=r*n+65536*(r*o&65535)+65536*((e>>>=16)*n&65535),r=e*o+(r*o>>>16)+(e*n>>>16);4294967296<=t;)t-=4294967296,r+=1;return new jspb.arith.UInt64(t>>>0,r>>>0)},jspb.arith.UInt64.prototype.mul=function(e){var t=jspb.arith.UInt64.mul32x32(this.lo,e);return(e=jspb.arith.UInt64.mul32x32(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},jspb.arith.UInt64.prototype.div=function(e){if(e==0)return[];var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(this.lo,this.hi);e=new jspb.arith.UInt64(e,0);for(var n=new jspb.arith.UInt64(1,0);!e.msb();)e=e.leftShift(),n=n.leftShift();for(;!n.zero();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.rightShift(),n=n.rightShift();return[t,r]},jspb.arith.UInt64.prototype.toString=function(){for(var e="",t=this;!t.zero();){var r=(t=t.div(10))[0];e=t[1].lo+e,t=r}return e==""&&(e="0"),e},jspb.arith.UInt64.fromString=function(e){for(var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(0,0),n=0;n<e.length;n++){if("0">e[n]||"9"<e[n])return null;var o=parseInt(e[n],10);r.lo=o,t=t.mul(10).add(r)}return t},jspb.arith.UInt64.prototype.clone=function(){return new jspb.arith.UInt64(this.lo,this.hi)},jspb.arith.Int64=function(e,t){this.lo=e,this.hi=t},jspb.arith.Int64.prototype.add=function(e){return new jspb.arith.Int64((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.sub=function(e){return new jspb.arith.Int64((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)},jspb.arith.Int64.prototype.toString=function(){var e=(2147483648&this.hi)!=0,t=new jspb.arith.UInt64(this.lo,this.hi);return e&&(t=new jspb.arith.UInt64(0,0).sub(t)),(e?"-":"")+t.toString()},jspb.arith.Int64.fromString=function(e){var t=0<e.length&&e[0]=="-";return t&&(e=e.substring(1)),(e=jspb.arith.UInt64.fromString(e))===null?null:(t&&(e=new jspb.arith.UInt64(0,0).sub(e)),new jspb.arith.Int64(e.lo,e.hi))},jspb.BinaryEncoder=function(){this.buffer_=[]},jspb.BinaryEncoder.prototype.length=function(){return this.buffer_.length},jspb.BinaryEncoder.prototype.end=function(){var e=this.buffer_;return this.buffer_=[],e},jspb.BinaryEncoder.prototype.writeSplitVarint64=function(e,t){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32);0<t||127<e;)this.buffer_.push(127&e|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSplitFixed64=function(e,t){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(t==Math.floor(t)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUint32(e),this.writeUint32(t)},jspb.BinaryEncoder.prototype.writeUnsignedVarint32=function(e){for(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32);127<e;)this.buffer_.push(127&e|128),e>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSignedVarint32=function(e){if(goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),0<=e)this.writeUnsignedVarint32(e);else{for(var t=0;9>t;t++)this.buffer_.push(127&e|128),e>>=7;this.buffer_.push(1)}},jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeSignedVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeUnsignedVarint32((e<<1^e>>31)>>>0)},jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitZigzag64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeZigzagVarint64String=function(e){this.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(e))},jspb.BinaryEncoder.prototype.writeZigzagVarintHash64=function(e){var t=this;jspb.utils.splitHash64(e),jspb.utils.toZigzag64(jspb.utils.split64Low,jspb.utils.split64High,function(r,n){t.writeSplitVarint64(r>>>0,n>>>0)})},jspb.BinaryEncoder.prototype.writeUint8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&256>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeUint16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&65536>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeUint32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_32),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeUint64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(0<=e&&e<jspb.BinaryConstants.TWO_TO_64),jspb.utils.splitUint64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt8=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-128<=e&&128>e),this.buffer_.push(e>>>0&255)},jspb.BinaryEncoder.prototype.writeInt16=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(-32768<=e&&32768>e),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255)},jspb.BinaryEncoder.prototype.writeInt32=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.buffer_.push(e>>>0&255),this.buffer_.push(e>>>8&255),this.buffer_.push(e>>>16&255),this.buffer_.push(e>>>24&255)},jspb.BinaryEncoder.prototype.writeInt64=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitInt64(e),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeInt64String=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(+e>=-jspb.BinaryConstants.TWO_TO_63&&+e<jspb.BinaryConstants.TWO_TO_63),jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(e)),this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFloat=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT32_MAX&&e<=jspb.BinaryConstants.FLOAT32_MAX),jspb.utils.splitFloat32(e),this.writeUint32(jspb.utils.split64Low)},jspb.BinaryEncoder.prototype.writeDouble=function(e){goog.asserts.assert(1/0===e||-1/0===e||isNaN(e)||e>=-jspb.BinaryConstants.FLOAT64_MAX&&e<=jspb.BinaryConstants.FLOAT64_MAX),jspb.utils.splitFloat64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeBool=function(e){goog.asserts.assert(typeof e=="boolean"||typeof e=="number"),this.buffer_.push(e?1:0)},jspb.BinaryEncoder.prototype.writeEnum=function(e){goog.asserts.assert(e==Math.floor(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32(e)},jspb.BinaryEncoder.prototype.writeBytes=function(e){this.buffer_.push.apply(this.buffer_,e)},jspb.BinaryEncoder.prototype.writeVarintHash64=function(e){jspb.utils.splitHash64(e),this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeFixedHash64=function(e){jspb.utils.splitHash64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeString=function(e){for(var t=this.buffer_.length,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(128>n)this.buffer_.push(n);else if(2048>n)this.buffer_.push(n>>6|192),this.buffer_.push(63&n|128);else if(65536>n)if(55296<=n&&56319>=n&&r+1<e.length){var o=e.charCodeAt(r+1);56320<=o&&57343>=o&&(n=1024*(n-55296)+o-56320+65536,this.buffer_.push(n>>18|240),this.buffer_.push(n>>12&63|128),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128),r++)}else this.buffer_.push(n>>12|224),this.buffer_.push(n>>6&63|128),this.buffer_.push(63&n|128)}return this.buffer_.length-t},jspb.BinaryWriter=function(){this.blocks_=[],this.totalLength_=0,this.encoder_=new jspb.BinaryEncoder,this.bookmarks_=[]},jspb.BinaryWriter.prototype.appendUint8Array_=function(e){var t=this.encoder_.end();this.blocks_.push(t),this.blocks_.push(e),this.totalLength_+=t.length+e.length},jspb.BinaryWriter.prototype.beginDelimited_=function(e){return this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),e=this.encoder_.end(),this.blocks_.push(e),this.totalLength_+=e.length,e.push(this.totalLength_),e},jspb.BinaryWriter.prototype.endDelimited_=function(e){var t=e.pop();for(t=this.totalLength_+this.encoder_.length()-t,goog.asserts.assert(0<=t);127<t;)e.push(127&t|128),t>>>=7,this.totalLength_++;e.push(t),this.totalLength_++},jspb.BinaryWriter.prototype.writeSerializedMessage=function(e,t,r){this.appendUint8Array_(e.subarray(t,r))},jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(e,t,r){e!=null&&t!=null&&r!=null&&this.writeSerializedMessage(e,t,r)},jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[],this.encoder_.end(),this.totalLength_=0,this.bookmarks_=[]},jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(this.bookmarks_.length==0);for(var e=new Uint8Array(this.totalLength_+this.encoder_.length()),t=this.blocks_,r=t.length,n=0,o=0;o<r;o++){var l=t[o];e.set(l,n),n+=l.length}return t=this.encoder_.end(),e.set(t,n),n+=t.length,goog.asserts.assert(n==e.length),this.blocks_=[e],e},jspb.BinaryWriter.prototype.getResultBase64String=function(e){return goog.crypt.base64.encodeByteArray(this.getResultBuffer(),e)},jspb.BinaryWriter.prototype.beginSubMessage=function(e){this.bookmarks_.push(this.beginDelimited_(e))},jspb.BinaryWriter.prototype.endSubMessage=function(){goog.asserts.assert(0<=this.bookmarks_.length),this.endDelimited_(this.bookmarks_.pop())},jspb.BinaryWriter.prototype.writeFieldHeader_=function(e,t){goog.asserts.assert(1<=e&&e==Math.floor(e)),this.encoder_.writeUnsignedVarint32(8*e+t)},jspb.BinaryWriter.prototype.writeAny=function(e,t,r){var n=jspb.BinaryConstants.FieldType;switch(e){case n.DOUBLE:this.writeDouble(t,r);break;case n.FLOAT:this.writeFloat(t,r);break;case n.INT64:this.writeInt64(t,r);break;case n.UINT64:this.writeUint64(t,r);break;case n.INT32:this.writeInt32(t,r);break;case n.FIXED64:this.writeFixed64(t,r);break;case n.FIXED32:this.writeFixed32(t,r);break;case n.BOOL:this.writeBool(t,r);break;case n.STRING:this.writeString(t,r);break;case n.GROUP:goog.asserts.fail("Group field type not supported in writeAny()");break;case n.MESSAGE:goog.asserts.fail("Message field type not supported in writeAny()");break;case n.BYTES:this.writeBytes(t,r);break;case n.UINT32:this.writeUint32(t,r);break;case n.ENUM:this.writeEnum(t,r);break;case n.SFIXED32:this.writeSfixed32(t,r);break;case n.SFIXED64:this.writeSfixed64(t,r);break;case n.SINT32:this.writeSint32(t,r);break;case n.SINT64:this.writeSint64(t,r);break;case n.FHASH64:this.writeFixedHash64(t,r);break;case n.VHASH64:this.writeVarintHash64(t,r);break;default:goog.asserts.fail("Invalid field type in writeAny()")}},jspb.BinaryWriter.prototype.writeUnsignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint32(t))},jspb.BinaryWriter.prototype.writeSignedVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeUnsignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint64(t))},jspb.BinaryWriter.prototype.writeSignedVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint32_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint32(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64(t))},jspb.BinaryWriter.prototype.writeZigzagVarint64String_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64String(t))},jspb.BinaryWriter.prototype.writeZigzagVarintHash64_=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarintHash64(t))},jspb.BinaryWriter.prototype.writeInt32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeInt64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeSignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeInt64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeUint32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint32String=function(e,t){t!=null&&(t=parseInt(t,10),goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(e,t))},jspb.BinaryWriter.prototype.writeUint64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeUnsignedVarint64_(e,t))},jspb.BinaryWriter.prototype.writeUint64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSint32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeZigzagVarint32_(e,t))},jspb.BinaryWriter.prototype.writeSint64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeZigzagVarint64_(e,t))},jspb.BinaryWriter.prototype.writeSintHash64=function(e,t){t!=null&&this.writeZigzagVarintHash64_(e,t)},jspb.BinaryWriter.prototype.writeSint64String=function(e,t){t!=null&&this.writeZigzagVarint64String_(e,t)},jspb.BinaryWriter.prototype.writeFixed32=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_32),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeUint32(t))},jspb.BinaryWriter.prototype.writeFixed64=function(e,t){t!=null&&(goog.asserts.assert(0<=t&&t<jspb.BinaryConstants.TWO_TO_64),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeUint64(t))},jspb.BinaryWriter.prototype.writeFixed64String=function(e,t){t!=null&&(t=jspb.arith.UInt64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeSfixed32=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeInt32(t))},jspb.BinaryWriter.prototype.writeSfixed64=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_63&&t<jspb.BinaryConstants.TWO_TO_63),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeInt64(t))},jspb.BinaryWriter.prototype.writeSfixed64String=function(e,t){t!=null&&(t=jspb.arith.Int64.fromString(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t.lo,t.hi))},jspb.BinaryWriter.prototype.writeFloat=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeFloat(t))},jspb.BinaryWriter.prototype.writeDouble=function(e,t){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeDouble(t))},jspb.BinaryWriter.prototype.writeBool=function(e,t){t!=null&&(goog.asserts.assert(typeof t=="boolean"||typeof t=="number"),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeBool(t))},jspb.BinaryWriter.prototype.writeEnum=function(e,t){t!=null&&(goog.asserts.assert(t>=-jspb.BinaryConstants.TWO_TO_31&&t<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(t))},jspb.BinaryWriter.prototype.writeString=function(e,t){t!=null&&(e=this.beginDelimited_(e),this.encoder_.writeString(t),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeBytes=function(e,t){t!=null&&(t=jspb.utils.byteSourceToUint8Array(t),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),this.appendUint8Array_(t))},jspb.BinaryWriter.prototype.writeMessage=function(e,t,r){t!=null&&(e=this.beginDelimited_(e),r(t,this),this.endDelimited_(e))},jspb.BinaryWriter.prototype.writeMessageSet=function(e,t,r){t!=null&&(this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.START_GROUP),this.writeFieldHeader_(2,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(e),e=this.beginDelimited_(3),r(t,this),this.endDelimited_(e),this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeGroup=function(e,t,r){t!=null&&(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),r(t,this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP))},jspb.BinaryWriter.prototype.writeFixedHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeFixedHash64(t))},jspb.BinaryWriter.prototype.writeVarintHash64=function(e,t){t!=null&&(goog.asserts.assert(t.length==8),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeVarintHash64(t))},jspb.BinaryWriter.prototype.writeSplitFixed64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(t,r)},jspb.BinaryWriter.prototype.writeSplitVarint64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(t,r)},jspb.BinaryWriter.prototype.writeSplitZigzagVarint64=function(e,t,r){this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.VARINT);var n=this.encoder_;jspb.utils.toZigzag64(t,r,function(o,l){n.writeSplitVarint64(o>>>0,l>>>0)})},jspb.BinaryWriter.prototype.writeRepeatedInt32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSignedVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedInt32String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeInt32String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedInt64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSignedVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSplitFixed64=function(e,t,r,n){if(t!=null)for(var o=0;o<t.length;o++)this.writeSplitFixed64(e,r(t[o]),n(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedSplitVarint64=function(e,t,r,n){if(t!=null)for(var o=0;o<t.length;o++)this.writeSplitVarint64(e,r(t[o]),n(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64=function(e,t,r,n){if(t!=null)for(var o=0;o<t.length;o++)this.writeSplitZigzagVarint64(e,r(t[o]),n(t[o]))},jspb.BinaryWriter.prototype.writeRepeatedInt64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeInt64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUnsignedVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint32String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUint32String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUnsignedVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedUint64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeUint64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarint32_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarint64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSint64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarint64String_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSintHash64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeZigzagVarintHash64_(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixed32(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixed64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFixed64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixed64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed32=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSfixed32(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSfixed64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedSfixed64String=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeSfixed64String(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedFloat=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFloat(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedDouble=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeDouble(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedBool=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeBool(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedEnum=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeEnum(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedString=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeString(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedBytes=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeBytes(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedMessage=function(e,t,r){if(t!=null)for(var n=0;n<t.length;n++){var o=this.beginDelimited_(e);r(t[n],this),this.endDelimited_(o)}},jspb.BinaryWriter.prototype.writeRepeatedGroup=function(e,t,r){if(t!=null)for(var n=0;n<t.length;n++)this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.START_GROUP),r(t[n],this),this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.END_GROUP)},jspb.BinaryWriter.prototype.writeRepeatedFixedHash64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeFixedHash64(e,t[r])},jspb.BinaryWriter.prototype.writeRepeatedVarintHash64=function(e,t){if(t!=null)for(var r=0;r<t.length;r++)this.writeVarintHash64(e,t[r])},jspb.BinaryWriter.prototype.writePackedInt32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint32(parseInt(t[r],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeSignedVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitFixed64=function(e,t,r,n){if(t!=null){e=this.beginDelimited_(e);for(var o=0;o<t.length;o++)this.encoder_.writeSplitFixed64(r(t[o]),n(t[o]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitVarint64=function(e,t,r,n){if(t!=null){e=this.beginDelimited_(e);for(var o=0;o<t.length;o++)this.encoder_.writeSplitVarint64(r(t[o]),n(t[o]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSplitZigzagVarint64=function(e,t,r,n){if(t!=null){e=this.beginDelimited_(e);for(var o=this.encoder_,l=0;l<t.length;l++)jspb.utils.toZigzag64(r(t[l]),n(t[l]),function(s,i){o.writeSplitVarint64(s>>>0,i>>>0)});this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedInt64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++){var n=jspb.arith.Int64.fromString(t[r]);this.encoder_.writeSplitVarint64(n.lo,n.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint32String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint32(parseInt(t[r],10));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeUnsignedVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedUint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++){var n=jspb.arith.UInt64.fromString(t[r]);this.encoder_.writeSplitVarint64(n.lo,n.hi)}this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint32=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarint32(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarint64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSint64String=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(t[r]));this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedSintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeZigzagVarintHash64(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeUint32(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeUint64(t[e])},jspb.BinaryWriter.prototype.writePackedFixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++){var r=jspb.arith.UInt64.fromString(t[e]);this.encoder_.writeSplitFixed64(r.lo,r.hi)}},jspb.BinaryWriter.prototype.writePackedSfixed32=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeInt32(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64(t[e])},jspb.BinaryWriter.prototype.writePackedSfixed64String=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeInt64String(t[e])},jspb.BinaryWriter.prototype.writePackedFloat=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*t.length),e=0;e<t.length;e++)this.encoder_.writeFloat(t[e])},jspb.BinaryWriter.prototype.writePackedDouble=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeDouble(t[e])},jspb.BinaryWriter.prototype.writePackedBool=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(t.length),e=0;e<t.length;e++)this.encoder_.writeBool(t[e])},jspb.BinaryWriter.prototype.writePackedEnum=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeEnum(t[r]);this.endDelimited_(e)}},jspb.BinaryWriter.prototype.writePackedFixedHash64=function(e,t){if(t!=null&&t.length)for(this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*t.length),e=0;e<t.length;e++)this.encoder_.writeFixedHash64(t[e])},jspb.BinaryWriter.prototype.writePackedVarintHash64=function(e,t){if(t!=null&&t.length){e=this.beginDelimited_(e);for(var r=0;r<t.length;r++)this.encoder_.writeVarintHash64(t[r]);this.endDelimited_(e)}},jspb.Export={},exports.Map=jspb.Map,exports.Message=jspb.Message,exports.BinaryReader=jspb.BinaryReader,exports.BinaryWriter=jspb.BinaryWriter,exports.ExtensionFieldInfo=jspb.ExtensionFieldInfo,exports.ExtensionFieldBinaryInfo=jspb.ExtensionFieldBinaryInfo,exports.exportSymbol=goog.exportSymbol,exports.inherits=goog.inherits,exports.object={extend:goog.object.extend},exports.typeOf=goog.typeOf}).call(this,__webpack_require__(5),__webpack_require__(4).Buffer)},function(e,t){var r=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var o=new Array(16);e.exports=function(){for(var l,s=0;s<16;s++)(3&s)==0&&(l=4294967296*Math.random()),o[s]=l>>>((3&s)<<3)&255;return o}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(o,l){var s=l||0,i=r;return[i[o[s++]],i[o[s++]],i[o[s++]],i[o[s++]],"-",i[o[s++]],i[o[s++]],"-",i[o[s++]],i[o[s++]],"-",i[o[s++]],i[o[s++]],"-",i[o[s++]],i[o[s++]],i[o[s++]],i[o[s++]],i[o[s++]],i[o[s++]]].join("")}},function(e,t,r){(function(n){const o=r(210),l=r(49),s=(i,c)=>({from:s,EnvVarError:r(49),get:function(u){if(!u)return i;if(arguments.length>1)throw new l("It looks like you passed more than one argument to env.get(). Since env-var@6.0.0 this is no longer supported. To set a default value use env.get(TARGET).default(DEFAULT)");return o(i,u,c||{})}});e.exports=s(n.env)}).call(this,r(2))},function(e,t,r){var n=r(10),o=r(71),l=r(3).LEVEL,s=e.exports=function(){var i=this,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};o.call(this,{objectMode:!0,highWaterMark:c.highWaterMark}),this.format=c.format,this.level=c.level,this.handleExceptions=c.handleExceptions,this.silent=c.silent,c.log&&(this.log=c.log),c.logv&&(this.logv=c.logv),c.close&&(this.close=c.close),this.once("pipe",function(u){i.levels=u.levels,i.parent=u}),this.once("unpipe",function(u){u===i.parent&&(i.parent=null,i.close&&i.close())})};n.inherits(s,o),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);var b=this.level||this.parent&&this.parent.level;if(!b||this.levels[b]>=this.levels[i[l]]){if(i&&!this.format)return this.log(i,u);var A=void 0,_=void 0;try{_=this.format.transform(Object.assign({},i),this.format.options)}catch(v){A=v}if(A||!_){if(u(),A)throw A;return}return this.log(_,u)}return u(null)},s.prototype._writev=function(i,c){if(this.logv){var u=i.filter(this._accept,this);return u.length?this.logv(u,c):c(null)}for(var b=0;b<i.length;b++)if(this._accept(i[b]))if(!i[b].chunk||this.format){var A=void 0,_=void 0;try{_=this.format.transform(Object.assign({},i[b].chunk),this.format.options)}catch(v){A=v}if(A||!_){if(i[b].callback(),A)throw c(null),A}else this.log(_,i[b].callback)}else this.log(i[b].chunk,i[b].callback);return c(null)},s.prototype._accept=function(i){var c=i.chunk;if(this.silent)return!1;var u=this.level||this.parent&&this.parent.level;return!(c.exception!==!0&&u&&!(this.levels[u]>=this.levels[c[l]])||!this.handleExceptions&&c.exception===!0)},s.prototype._nop=function(){}},function(e,t,r){const{AbortController:n,AbortSignal:o}=typeof self!="undefined"?self:typeof window!="undefined"?window:void 0;e.exports=n,e.exports.AbortSignal=o,e.exports.default=n},function(e,t){var r=function(n){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}(typeof self!="undefined"?self:this);(function(n){(function(o){var l="URLSearchParams"in n,s="Symbol"in n&&"iterator"in Symbol,i="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),c="FormData"in n,u="ArrayBuffer"in n;if(u)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],A=ArrayBuffer.isView||function(j){return j&&b.indexOf(Object.prototype.toString.call(j))>-1};function _(j){if(typeof j!="string"&&(j=String(j)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(j))throw new TypeError("Invalid character in header field name");return j.toLowerCase()}function v(j){return typeof j!="string"&&(j=String(j)),j}function f(j){var m={next:function(){var x=j.shift();return{done:x===void 0,value:x}}};return s&&(m[Symbol.iterator]=function(){return m}),m}function S(j){this.map={},j instanceof S?j.forEach(function(m,x){this.append(x,m)},this):Array.isArray(j)?j.forEach(function(m){this.append(m[0],m[1])},this):j&&Object.getOwnPropertyNames(j).forEach(function(m){this.append(m,j[m])},this)}function w(j){if(j.bodyUsed)return Promise.reject(new TypeError("Already read"));j.bodyUsed=!0}function P(j){return new Promise(function(m,x){j.onload=function(){m(j.result)},j.onerror=function(){x(j.error)}})}function N(j){var m=new FileReader,x=P(m);return m.readAsArrayBuffer(j),x}function T(j){if(j.slice)return j.slice(0);var m=new Uint8Array(j.byteLength);return m.set(new Uint8Array(j)),m.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(j){var m;this._bodyInit=j,j?typeof j=="string"?this._bodyText=j:i&&Blob.prototype.isPrototypeOf(j)?this._bodyBlob=j:c&&FormData.prototype.isPrototypeOf(j)?this._bodyFormData=j:l&&URLSearchParams.prototype.isPrototypeOf(j)?this._bodyText=j.toString():u&&i&&(m=j)&&DataView.prototype.isPrototypeOf(m)?(this._bodyArrayBuffer=T(j.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(j)||A(j))?this._bodyArrayBuffer=T(j):this._bodyText=j=Object.prototype.toString.call(j):this._bodyText="",this.headers.get("content-type")||(typeof j=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l&&URLSearchParams.prototype.isPrototypeOf(j)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var j=w(this);if(j)return j;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?w(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(N)}),this.text=function(){var j,m,x,F=w(this);if(F)return F;if(this._bodyBlob)return j=this._bodyBlob,m=new FileReader,x=P(m),m.readAsText(j),x;if(this._bodyArrayBuffer)return Promise.resolve(function(D){for(var O=new Uint8Array(D),L=new Array(O.length),k=0;k<O.length;k++)L[k]=String.fromCharCode(O[k]);return L.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then(Q)}),this.json=function(){return this.text().then(JSON.parse)},this}S.prototype.append=function(j,m){j=_(j),m=v(m);var x=this.map[j];this.map[j]=x?x+", "+m:m},S.prototype.delete=function(j){delete this.map[_(j)]},S.prototype.get=function(j){return j=_(j),this.has(j)?this.map[j]:null},S.prototype.has=function(j){return this.map.hasOwnProperty(_(j))},S.prototype.set=function(j,m){this.map[_(j)]=v(m)},S.prototype.forEach=function(j,m){for(var x in this.map)this.map.hasOwnProperty(x)&&j.call(m,this.map[x],x,this)},S.prototype.keys=function(){var j=[];return this.forEach(function(m,x){j.push(x)}),f(j)},S.prototype.values=function(){var j=[];return this.forEach(function(m){j.push(m)}),f(j)},S.prototype.entries=function(){var j=[];return this.forEach(function(m,x){j.push([x,m])}),f(j)},s&&(S.prototype[Symbol.iterator]=S.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function I(j,m){var x,F,D=(m=m||{}).body;if(j instanceof I){if(j.bodyUsed)throw new TypeError("Already read");this.url=j.url,this.credentials=j.credentials,m.headers||(this.headers=new S(j.headers)),this.method=j.method,this.mode=j.mode,this.signal=j.signal,D||j._bodyInit==null||(D=j._bodyInit,j.bodyUsed=!0)}else this.url=String(j);if(this.credentials=m.credentials||this.credentials||"same-origin",!m.headers&&this.headers||(this.headers=new S(m.headers)),this.method=(x=m.method||this.method||"GET",F=x.toUpperCase(),d.indexOf(F)>-1?F:x),this.mode=m.mode||this.mode||null,this.signal=m.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&D)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(D)}function Q(j){var m=new FormData;return j.trim().split("&").forEach(function(x){if(x){var F=x.split("="),D=F.shift().replace(/\+/g," "),O=F.join("=").replace(/\+/g," ");m.append(decodeURIComponent(D),decodeURIComponent(O))}}),m}function Z(j,m){m||(m={}),this.type="default",this.status=m.status===void 0?200:m.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in m?m.statusText:"OK",this.headers=new S(m.headers),this.url=m.url||"",this._initBody(j)}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})},R.call(I.prototype),R.call(Z.prototype),Z.prototype.clone=function(){return new Z(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new S(this.headers),url:this.url})},Z.error=function(){var j=new Z(null,{status:0,statusText:""});return j.type="error",j};var h=[301,302,303,307,308];Z.redirect=function(j,m){if(h.indexOf(m)===-1)throw new RangeError("Invalid status code");return new Z(null,{status:m,headers:{location:j}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(m,x){this.message=m,this.name=x;var F=Error(m);this.stack=F.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function p(j,m){return new Promise(function(x,F){var D=new I(j,m);if(D.signal&&D.signal.aborted)return F(new o.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function L(){O.abort()}O.onload=function(){var k,E,g={status:O.status,statusText:O.statusText,headers:(k=O.getAllResponseHeaders()||"",E=new S,k.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(B){var G=B.split(":"),Y=G.shift().trim();if(Y){var K=G.join(":").trim();E.append(Y,K)}}),E)};g.url="responseURL"in O?O.responseURL:g.headers.get("X-Request-URL");var U="response"in O?O.response:O.responseText;x(new Z(U,g))},O.onerror=function(){F(new TypeError("Network request failed"))},O.ontimeout=function(){F(new TypeError("Network request failed"))},O.onabort=function(){F(new o.DOMException("Aborted","AbortError"))},O.open(D.method,D.url,!0),D.credentials==="include"?O.withCredentials=!0:D.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&i&&(O.responseType="blob"),D.headers.forEach(function(k,E){O.setRequestHeader(E,k)}),D.signal&&(D.signal.addEventListener("abort",L),O.onreadystatechange=function(){O.readyState===4&&D.signal.removeEventListener("abort",L)}),O.send(D._bodyInit===void 0?null:D._bodyInit)})}p.polyfill=!0,n.fetch||(n.fetch=p,n.Headers=S,n.Request=I,n.Response=Z),o.Headers=S,o.Request=I,o.Response=Z,o.fetch=p})({})})(r),delete r.fetch.polyfill,(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t},function(e,t,r){(function(n){const o=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,l=typeof AbortController=="function"?AbortController:Object.assign(class{constructor(){this.signal=new l.AbortSignal}abort(){this.signal.dispatchEvent("abort")}},{AbortSignal:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(P){if(P==="abort"){this.aborted=!0;const N={type:P,target:this};this.onabort(N),this._listeners.forEach(T=>T(N),this)}}onabort(){}addEventListener(P,N){P==="abort"&&this._listeners.push(N)}removeEventListener(P,N){P==="abort"&&(this._listeners=this._listeners.filter(T=>T!==N))}}}),s=new Set,i=(P,N)=>{const T=`LRU_CACHE_OPTION_${P}`;b(T)&&A(T,`${P} option`,`options.${N}`,w)},c=(P,N)=>{const T=`LRU_CACHE_METHOD_${P}`;if(b(T)){const{prototype:R}=w,{get:d}=Object.getOwnPropertyDescriptor(R,P);A(T,`${P} method`,`cache.${N}()`,d)}},u=(...P)=>{typeof n=="object"&&n&&typeof n.emitWarning=="function"?n.emitWarning(...P):console.error(...P)},b=P=>!s.has(P),A=(P,N,T,R)=>{s.add(P),u(`The ${N} is deprecated. Please use ${T} instead.`,"DeprecationWarning",P,R)},_=P=>P&&P===Math.floor(P)&&P>0&&isFinite(P),v=P=>_(P)?P<=Math.pow(2,8)?Uint8Array:P<=Math.pow(2,16)?Uint16Array:P<=Math.pow(2,32)?Uint32Array:P<=Number.MAX_SAFE_INTEGER?f:null:null;class f extends Array{constructor(N){super(N),this.fill(0)}}class S{constructor(N){if(N===0)return[];const T=v(N);this.heap=new T(N),this.length=0}push(N){this.heap[this.length++]=N}pop(){return this.heap[--this.length]}}class w{constructor(N={}){const{max:T=0,ttl:R,ttlResolution:d=1,ttlAutopurge:I,updateAgeOnGet:Q,updateAgeOnHas:Z,allowStale:h,dispose:p,disposeAfter:j,noDisposeOnSet:m,noUpdateTTL:x,maxSize:F=0,sizeCalculation:D,fetchMethod:O}=N,{length:L,maxAge:k,stale:E}=N instanceof w?{}:N;if(T!==0&&!_(T))throw new TypeError("max option must be a nonnegative integer");const g=T?v(T):Array;if(!g)throw new Error("invalid max value: "+T);if(this.max=T,this.maxSize=F,this.sizeCalculation=D||L,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=O||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.keyMap=new Map,this.keyList=new Array(T).fill(null),this.valList=new Array(T).fill(null),this.next=new g(T),this.prev=new g(T),this.head=0,this.tail=0,this.free=new S(T),this.initialFill=1,this.size=0,typeof p=="function"&&(this.dispose=p),typeof j=="function"?(this.disposeAfter=j,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!m,this.noUpdateTTL=!!x,this.maxSize!==0){if(!_(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!h||!!E,this.updateAgeOnGet=!!Q,this.updateAgeOnHas=!!Z,this.ttlResolution=_(d)||d===0?d:1,this.ttlAutopurge=!!I,this.ttl=R||k||0,this.ttl){if(!_(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const U="LRU_CACHE_UNBOUNDED";b(U)&&(s.add(U),u("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",U,w))}E&&i("stale","allowStale"),k&&i("maxAge","ttl"),L&&i("length","sizeCalculation")}getRemainingTTL(N){return this.has(N,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new f(this.max),this.starts=new f(this.max),this.setItemTTL=(R,d)=>{if(this.starts[R]=d!==0?o.now():0,this.ttls[R]=d,d!==0&&this.ttlAutopurge){const I=setTimeout(()=>{this.isStale(R)&&this.delete(this.keyList[R])},d+1);I.unref&&I.unref()}},this.updateItemAge=R=>{this.starts[R]=this.ttls[R]!==0?o.now():0};let N=0;const T=()=>{const R=o.now();if(this.ttlResolution>0){N=R;const d=setTimeout(()=>N=0,this.ttlResolution);d.unref&&d.unref()}return R};this.getRemainingTTL=R=>{const d=this.keyMap.get(R);return d===void 0?0:this.ttls[d]===0||this.starts[d]===0?1/0:this.starts[d]+this.ttls[d]-(N||T())},this.isStale=R=>this.ttls[R]!==0&&this.starts[R]!==0&&(N||T())-this.starts[R]>this.ttls[R]}updateItemAge(N){}setItemTTL(N,T){}isStale(N){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new f(this.max),this.removeItemSize=N=>this.calculatedSize-=this.sizes[N],this.requireSize=(N,T,R,d)=>{if(!_(R)){if(!d)throw new TypeError("invalid size value (must be positive integer)");if(typeof d!="function")throw new TypeError("sizeCalculation must be a function");if(R=d(T,N),!_(R))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return R},this.addItemSize=(N,T,R,d)=>{this.sizes[N]=d;const I=this.maxSize-this.sizes[N];for(;this.calculatedSize>I;)this.evict(!0);this.calculatedSize+=this.sizes[N]}}removeItemSize(N){}addItemSize(N,T,R,d){}requireSize(N,T,R,d){if(R||d)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:N=this.allowStale}={}){if(this.size)for(let T=this.tail;this.isValidIndex(T)&&(!N&&this.isStale(T)||(yield T),T!==this.head);)T=this.prev[T]}*rindexes({allowStale:N=this.allowStale}={}){if(this.size)for(let T=this.head;this.isValidIndex(T)&&(!N&&this.isStale(T)||(yield T),T!==this.tail);)T=this.next[T]}isValidIndex(N){return this.keyMap.get(this.keyList[N])===N}*entries(){for(const N of this.indexes())yield[this.keyList[N],this.valList[N]]}*rentries(){for(const N of this.rindexes())yield[this.keyList[N],this.valList[N]]}*keys(){for(const N of this.indexes())yield this.keyList[N]}*rkeys(){for(const N of this.rindexes())yield this.keyList[N]}*values(){for(const N of this.indexes())yield this.valList[N]}*rvalues(){for(const N of this.rindexes())yield this.valList[N]}[Symbol.iterator](){return this.entries()}find(N,T={}){for(const R of this.indexes())if(N(this.valList[R],this.keyList[R],this))return this.get(this.keyList[R],T)}forEach(N,T=this){for(const R of this.indexes())N.call(T,this.valList[R],this.keyList[R],this)}rforEach(N,T=this){for(const R of this.rindexes())N.call(T,this.valList[R],this.keyList[R],this)}get prune(){return c("prune","purgeStale"),this.purgeStale}purgeStale(){let N=!1;for(const T of this.rindexes({allowStale:!0}))this.isStale(T)&&(this.delete(this.keyList[T]),N=!0);return N}dump(){const N=[];for(const T of this.indexes()){const R=this.keyList[T],d={value:this.valList[T]};this.ttls&&(d.ttl=this.ttls[T]),this.sizes&&(d.size=this.sizes[T]),N.unshift([R,d])}return N}load(N){this.clear();for(const[T,R]of N)this.set(T,R.value,R)}dispose(N,T,R){}set(N,T,{ttl:R=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:I=0,sizeCalculation:Q=this.sizeCalculation,noUpdateTTL:Z=this.noUpdateTTL}={}){I=this.requireSize(N,T,I,Q);let h=this.size===0?void 0:this.keyMap.get(N);if(h===void 0)h=this.newIndex(),this.keyList[h]=N,this.valList[h]=T,this.keyMap.set(N,h),this.next[this.tail]=h,this.prev[h]=this.tail,this.tail=h,this.size++,this.addItemSize(h,T,N,I),Z=!1;else{const p=this.valList[h];T!==p&&(this.isBackgroundFetch(p)?p.__abortController.abort():d||(this.dispose(p,N,"set"),this.disposeAfter&&this.disposed.push([p,N,"set"])),this.removeItemSize(h),this.valList[h]=T,this.addItemSize(h,T,N,I)),this.moveToTail(h)}if(R===0||this.ttl!==0||this.ttls||this.initializeTTLTracking(),Z||this.setItemTTL(h,R),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const N=this.valList[this.head];return this.evict(!0),N}}evict(N){const T=this.head,R=this.keyList[T],d=this.valList[T];return this.isBackgroundFetch(d)?d.__abortController.abort():(this.dispose(d,R,"evict"),this.disposeAfter&&this.disposed.push([d,R,"evict"])),this.removeItemSize(T),N&&(this.keyList[T]=null,this.valList[T]=null,this.free.push(T)),this.head=this.next[T],this.keyMap.delete(R),this.size--,T}has(N,{updateAgeOnHas:T=this.updateAgeOnHas}={}){const R=this.keyMap.get(N);return R!==void 0&&!this.isStale(R)&&(T&&this.updateItemAge(R),!0)}peek(N,{allowStale:T=this.allowStale}={}){const R=this.keyMap.get(N);if(R!==void 0&&(T||!this.isStale(R)))return this.valList[R]}backgroundFetch(N,T,R){const d=T===void 0?void 0:this.valList[T];if(this.isBackgroundFetch(d))return d;const I=new l,Q={signal:I.signal,options:R},Z=Promise.resolve(this.fetchMethod(N,d,Q)).then(h=>(I.signal.aborted||this.set(N,h,Q.options),h));return Z.__abortController=I,Z.__staleWhileFetching=d,T===void 0?(this.set(N,Z,Q.options),T=this.keyMap.get(N)):this.valList[T]=Z,Z}isBackgroundFetch(N){return N&&typeof N=="object"&&typeof N.then=="function"&&Object.prototype.hasOwnProperty.call(N,"__staleWhileFetching")}async fetch(N,{allowStale:T=this.allowStale,updateAgeOnGet:R=this.updateAgeOnGet,ttl:d=this.ttl,noDisposeOnSet:I=this.noDisposeOnSet,size:Q=0,sizeCalculation:Z=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL}={}){if(!this.fetchMethod)return this.get(N,{allowStale:T,updateAgeOnGet:R});const p={allowStale:T,updateAgeOnGet:R,ttl:d,noDisposeOnSet:I,size:Q,sizeCalculation:Z,noUpdateTTL:h};let j=this.keyMap.get(N);if(j===void 0)return this.backgroundFetch(N,j,p);{const m=this.valList[j];if(this.isBackgroundFetch(m))return T&&m.__staleWhileFetching!==void 0?m.__staleWhileFetching:m;if(!this.isStale(j))return this.moveToTail(j),R&&this.updateItemAge(j),m;const x=this.backgroundFetch(N,j,p);return T&&x.__staleWhileFetching!==void 0?x.__staleWhileFetching:x}}get(N,{allowStale:T=this.allowStale,updateAgeOnGet:R=this.updateAgeOnGet}={}){const d=this.keyMap.get(N);if(d!==void 0){const I=this.valList[d],Q=this.isBackgroundFetch(I);return this.isStale(d)?Q?T?I.__staleWhileFetching:void 0:(this.delete(N),T?I:void 0):Q?void 0:(this.moveToTail(d),R&&this.updateItemAge(d),I)}}connect(N,T){this.prev[T]=N,this.next[N]=T}moveToTail(N){N!==this.tail&&(N===this.head?this.head=this.next[N]:this.connect(this.prev[N],this.next[N]),this.connect(this.tail,N),this.tail=N)}get del(){return c("del","delete"),this.delete}delete(N){let T=!1;if(this.size!==0){const R=this.keyMap.get(N);if(R!==void 0)if(T=!0,this.size===1)this.clear();else{this.removeItemSize(R);const d=this.valList[R];this.isBackgroundFetch(d)?d.__abortController.abort():(this.dispose(d,N,"delete"),this.disposeAfter&&this.disposed.push([d,N,"delete"])),this.keyMap.delete(N),this.keyList[R]=null,this.valList[R]=null,R===this.tail?this.tail=this.prev[R]:R===this.head?this.head=this.next[R]:(this.next[this.prev[R]]=this.next[R],this.prev[this.next[R]]=this.prev[R]),this.size--,this.free.push(R)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return T}clear(){for(const N of this.rindexes({allowStale:!0})){const T=this.valList[N];if(this.isBackgroundFetch(T))T.__abortController.abort();else{const R=this.keyList[N];this.dispose(T,R,"delete"),this.disposeAfter&&this.disposed.push([T,R,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return c("reset","clear"),this.clear}get length(){return((N,T)=>{const R=`LRU_CACHE_PROPERTY_${N}`;if(b(R)){const{prototype:d}=w,{get:I}=Object.getOwnPropertyDescriptor(d,N);A(R,`${N} property`,`cache.${T}`,I)}})("length","size"),this.size}static get AbortController(){return l}}e.exports=w}).call(this,r(2))},function(e,t,r){var n=r(223),o=r(224),l=o;l.v1=n,l.v4=o,e.exports=l},function(e,t,r){var n=r(37).Colorizer;e.exports=function(o){return n.addColors(o.colors||o),o}},function(e,t,r){var n={};e.exports=n,n.themes={};var o=r(10),l=n.styles=r(108),s=Object.defineProperties,i=new RegExp(/[\r\n]+/g);n.supportsColor=r(109).supportsColor,n.enabled===void 0&&(n.enabled=n.supportsColor()!==!1),n.enable=function(){n.enabled=!0},n.disable=function(){n.enabled=!1},n.stripColors=n.strip=function(w){return(""+w).replace(/\x1B\[\d+m/g,"")},n.stylize=function(w,P){return n.enabled?l[P].open+w+l[P].close:w+""};var c=/[|\\{}()[\]^$+*?.]/g;function u(w){var P=function N(){return v.apply(N,arguments)};return P._styles=w,P.__proto__=_,P}var b,A=(b={},l.grey=l.gray,Object.keys(l).forEach(function(w){l[w].closeRe=new RegExp(function(P){if(typeof P!="string")throw new TypeError("Expected a string");return P.replace(c,"\\$&")}(l[w].close),"g"),b[w]={get:function(){return u(this._styles.concat(w))}}}),b),_=s(function(){},A);function v(){var w=Array.prototype.slice.call(arguments),P=w.map(function(I){return I!==void 0&&I.constructor===String?I:o.inspect(I)}).join(" ");if(!n.enabled||!P)return P;for(var N=P.indexOf(`
|
|
35
35
|
`)!=-1,T=this._styles,R=T.length;R--;){var d=l[T[R]];P=d.open+P.replace(d.closeRe,d.open)+d.close,N&&(P=P.replace(i,function(I){return d.close+I+d.open}))}return P}n.setTheme=function(w){if(typeof w!="string")for(var P in w)(function(N){n[N]=function(T){if(typeof w[N]=="object"){var R=T;for(var d in w[N])R=n[w[N][d]](R);return R}return n[w[N]](T)}})(P);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var f=function(w,P){var N=P.split("");return(N=N.map(w)).join("")};for(var S in n.trap=r(111),n.zalgo=r(112),n.maps={},n.maps.america=r(113)(n),n.maps.zebra=r(114)(n),n.maps.rainbow=r(115)(n),n.maps.random=r(116)(n),n.maps)(function(w){n[w]=function(P){return f(n.maps[w],P)}})(S);s(n,function(){var w={};return Object.keys(A).forEach(function(P){w[P]={get:function(){return u([P])}}}),w}())},function(e,t){e.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}},function(e,t){typeof Object.create=="function"?e.exports=function(r,n){r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(r,n){r.super_=n;var o=function(){};o.prototype=n.prototype,r.prototype=new o,r.prototype.constructor=r}},function(e,t){var r={};e.exports=r;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],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],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach(function(o){var l=n[o],s=r[o]=[];s.open="\x1B["+l[0]+"m",s.close="\x1B["+l[1]+"m"})},function(e,t,r){(function(n){var o=r(15),l=r(110),s=n.env,i=void 0;function c(u){return function(b){return b!==0&&{level:b,hasBasic:!0,has256:b>=2,has16m:b>=3}}(function(b){if(i===!1)return 0;if(l("color=16m")||l("color=full")||l("color=truecolor"))return 3;if(l("color=256"))return 2;if(b&&!b.isTTY&&i!==!0)return 0;var A=i?1:0;if(n.platform==="win32"){var _=o.release().split(".");return Number(n.versions.node.split(".")[0])>=8&&Number(_[0])>=10&&Number(_[2])>=10586?Number(_[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(f){return f in s})||s.CI_NAME==="codeship"?1:A;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in s){var v=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return v>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test("xterm-256color")?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test("xterm-256color")||"COLORTERM"in s?1:A}(u))}l("no-color")||l("no-colors")||l("color=false")?i=!1:(l("color")||l("colors")||l("color=true")||l("color=always"))&&(i=!0),"FORCE_COLOR"in s&&(i=s.FORCE_COLOR.length===0||parseInt(s.FORCE_COLOR,10)!==0),e.exports={supportsColor:c,stdout:c(n.stdout),stderr:c(n.stderr)}}).call(this,r(2))},function(e,t,r){(function(n){e.exports=function(o,l){var s=(l=l||n.argv).indexOf("--"),i=/^-{1,2}/.test(o)?"":"--",c=l.indexOf(i+o);return c!==-1&&(s===-1||c<s)}}).call(this,r(2))},function(e,t){e.exports=function(r,n){var o="";r=(r=r||"Run the trap, drop the bass").split("");var l={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return r.forEach(function(s){s=s.toLowerCase();var i=l[s]||[" "],c=Math.floor(Math.random()*i.length);o+=l[s]!==void 0?l[s][c]:s}),o}},function(e,t){e.exports=function(r,n){r=r||" he is here ";var o={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},l=[].concat(o.up,o.down,o.mid);function s(c){return Math.floor(Math.random()*c)}function i(c){var u=!1;return l.filter(function(b){u=b===c}),u}return function(c,u){var b,A,_="";for(A in(u=u||{}).up=u.up===void 0||u.up,u.mid=u.mid===void 0||u.mid,u.down=u.down===void 0||u.down,u.size=u.size!==void 0?u.size:"maxi",c=c.split(""))if(!i(A)){switch(_+=c[A],b={up:0,down:0,mid:0},u.size){case"mini":b.up=s(8),b.mid=s(2),b.down=s(8);break;case"maxi":b.up=s(16)+3,b.mid=s(4)+1,b.down=s(64)+3;break;default:b.up=s(8)+1,b.mid=s(6)/2,b.down=s(8)+1}var v=["up","mid","down"];for(var f in v)for(var S=v[f],w=0;w<=b[S];w++)u[S]&&(_+=o[S][s(o[S].length)])}return _}(r,n)}},function(e,t){e.exports=function(r){return function(n,o,l){if(n===" ")return n;switch(o%3){case 0:return r.red(n);case 1:return r.white(n);case 2:return r.blue(n)}}}},function(e,t){e.exports=function(r){return function(n,o,l){return o%2==0?n:r.inverse(n)}}},function(e,t){e.exports=function(r){var n=["red","yellow","green","blue","magenta"];return function(o,l,s){return o===" "?o:r[n[l++%n.length]](o)}}},function(e,t){e.exports=function(r){var n=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(o,l,s){return o===" "?o:r[n[Math.round(Math.random()*(n.length-2))]](o)}}},function(e,t,r){Object.defineProperty(t,"cli",{value:r(118)}),Object.defineProperty(t,"npm",{value:r(119)}),Object.defineProperty(t,"syslog",{value:r(120)})},function(e,t,r){t.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},t.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}},function(e,t,r){t.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},t.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}},function(e,t,r){t.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},t.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}},function(e,t,r){var n=r(9);e.exports=n(function(o){return o.message=" ".concat(o.message),o})},function(e,t,r){function n(A,_){if(!(A instanceof _))throw new TypeError("Cannot call a class as a function")}function o(A,_){for(var v=0;v<_.length;v++){var f=_[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(A,f.key,f)}}var l=r(37).Colorizer,s=r(58).Padder,i=r(3),c=i.configs,u=i.MESSAGE,b=function(){function A(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(this,A),f.levels||(f.levels=c.npm.levels),this.colorizer=new l(f),this.padder=new s(f),this.options=f}var _,v;return _=A,(v=[{key:"transform",value:function(f,S){return this.colorizer.transform(this.padder.transform(f,S),S),f[u]="".concat(f.level,":").concat(f.message),f}}])&&o(_.prototype,v),A}();e.exports=function(A){return new b(A)},e.exports.Format=b},function(e,t,r){var n=r(9);function o(s){if(s.every(l))return function(i){for(var c=i,u=0;u<s.length;u++)if(!(c=s[u].transform(c,s[u].options)))return!1;return c}}function l(s){if(typeof s.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
|
|
36
36
|
`));return!0}e.exports=function(){for(var s=arguments.length,i=new Array(s),c=0;c<s;c++)i[c]=arguments[c];var u=n(o(i)),b=u();return b.Format=u.Format,b},e.exports.cascade=o},function(e,t,r){(function(n){var o=r(9),l=r(3).MESSAGE,s=r(30);function i(c,u){return u instanceof n?u.toString("base64"):typeof u=="bigint"?u.toString():u}e.exports=o(function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return c[l]=(u.stable?s.stableStringify:s)(c,u.replacer||i,u.space),c})}).call(this,r(4).Buffer)},function(e,t,r){t.byteLength=function(A){var _=u(A),v=_[0],f=_[1];return 3*(v+f)/4-f},t.toByteArray=function(A){for(var _,v=u(A),f=v[0],S=v[1],w=new l(function(R,d,I){return 3*(d+I)/4-I}(0,f,S)),P=0,N=S>0?f-4:f,T=0;T<N;T+=4)_=o[A.charCodeAt(T)]<<18|o[A.charCodeAt(T+1)]<<12|o[A.charCodeAt(T+2)]<<6|o[A.charCodeAt(T+3)],w[P++]=_>>16&255,w[P++]=_>>8&255,w[P++]=255&_;return S===2&&(_=o[A.charCodeAt(T)]<<2|o[A.charCodeAt(T+1)]>>4,w[P++]=255&_),S===1&&(_=o[A.charCodeAt(T)]<<10|o[A.charCodeAt(T+1)]<<4|o[A.charCodeAt(T+2)]>>2,w[P++]=_>>8&255,w[P++]=255&_),w},t.fromByteArray=function(A){for(var _,v=A.length,f=v%3,S=[],w=0,P=v-f;w<P;w+=16383)S.push(b(A,w,w+16383>P?P:w+16383));return f===1?(_=A[v-1],S.push(n[_>>2]+n[_<<4&63]+"==")):f===2&&(_=(A[v-2]<<8)+A[v-1],S.push(n[_>>10]+n[_>>4&63]+n[_<<2&63]+"=")),S.join("")};for(var n=[],o=[],l=typeof Uint8Array!="undefined"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,c=s.length;i<c;++i)n[i]=s[i],o[s.charCodeAt(i)]=i;function u(A){var _=A.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=A.indexOf("=");return v===-1&&(v=_),[v,v===_?0:4-v%4]}function b(A,_,v){for(var f,S,w=[],P=_;P<v;P+=3)f=(A[P]<<16&16711680)+(A[P+1]<<8&65280)+(255&A[P+2]),w.push(n[(S=f)>>18&63]+n[S>>12&63]+n[S>>6&63]+n[63&S]);return w.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(r,n,o,l,s){var i,c,u=8*s-l-1,b=(1<<u)-1,A=b>>1,_=-7,v=o?s-1:0,f=o?-1:1,S=r[n+v];for(v+=f,i=S&(1<<-_)-1,S>>=-_,_+=u;_>0;i=256*i+r[n+v],v+=f,_-=8);for(c=i&(1<<-_)-1,i>>=-_,_+=l;_>0;c=256*c+r[n+v],v+=f,_-=8);if(i===0)i=1-A;else{if(i===b)return c?NaN:1/0*(S?-1:1);c+=Math.pow(2,l),i-=A}return(S?-1:1)*c*Math.pow(2,i-l)},t.write=function(r,n,o,l,s,i){var c,u,b,A=8*i-s-1,_=(1<<A)-1,v=_>>1,f=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=l?0:i-1,w=l?1:-1,P=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,c=_):(c=Math.floor(Math.log(n)/Math.LN2),n*(b=Math.pow(2,-c))<1&&(c--,b*=2),(n+=c+v>=1?f/b:f*Math.pow(2,1-v))*b>=2&&(c++,b/=2),c+v>=_?(u=0,c=_):c+v>=1?(u=(n*b-1)*Math.pow(2,s),c+=v):(u=n*Math.pow(2,v-1)*Math.pow(2,s),c=0));s>=8;r[o+S]=255&u,S+=w,u/=256,s-=8);for(c=c<<s|u,A+=s;A>0;r[o+S]=255&c,S+=w,c/=256,A-=8);r[o+S-w]|=128*P}},function(e,t,r){var n=r(9);e.exports=n(function(o,l){return l.message?(o.message="[".concat(l.label,"] ").concat(o.message),o):(o.label=l.label,o)})},function(e,t,r){var n=r(9),o=r(3).MESSAGE,l=r(30);e.exports=n(function(s){var i={};return s.message&&(i["@message"]=s.message,delete s.message),s.timestamp&&(i["@timestamp"]=s.timestamp,delete s.timestamp),i["@fields"]=s,s[o]=l(i),s})},function(e,t,r){var n=r(9);function o(s,i,c){var u,b,A,_=i.reduce(function(f,S){return f[S]=s[S],delete s[S],f},{}),v=Object.keys(s).reduce(function(f,S){return f[S]=s[S],delete s[S],f},{});return Object.assign(s,_,(A=v,(b=c)in(u={})?Object.defineProperty(u,b,{value:A,enumerable:!0,configurable:!0,writable:!0}):u[b]=A,u)),s}function l(s,i,c){return s[c]=i.reduce(function(u,b){return u[b]=s[b],delete s[b],u},{}),s}e.exports=n(function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c="metadata";i.key&&(c=i.key);var u=[];return i.fillExcept||i.fillWith||(u.push("level"),u.push("message")),i.fillExcept&&(u=i.fillExcept),u.length>0?o(s,u,c):i.fillWith?l(s,i.fillWith,c):s})},function(e,t,r){var n=r(10).inspect,o=r(9),l=r(3),s=l.LEVEL,i=l.MESSAGE,c=l.SPLAT;e.exports=o(function(u){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=Object.assign({},u);return delete A[s],delete A[i],delete A[c],u[i]=n(A,!1,b.depth||null,b.colorize),u})},function(e,t,r){function n(s,i){for(var c=0;c<i.length;c++){var u=i[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}var o=r(3).MESSAGE,l=function(){function s(u){(function(b,A){if(!(b instanceof A))throw new TypeError("Cannot call a class as a function")})(this,s),this.template=u}var i,c;return i=s,(c=[{key:"transform",value:function(u){return u[o]=this.template(u),u}}])&&n(i.prototype,c),s}();e.exports=function(s){return new l(s)},e.exports.Printf=e.exports.Format=l},function(e,t,r){var n=r(9),o=r(3).MESSAGE,l=r(30);e.exports=n(function(s){var i=l(Object.assign({},s,{level:void 0,message:void 0,splat:void 0})),c=s.padding&&s.padding[s.level]||"";return s[o]=i!=="{}"?"".concat(s.level,":").concat(c," ").concat(s.message," ").concat(i):"".concat(s.level,":").concat(c," ").concat(s.message),s})},function(e,t,r){function n(A){return function(_){if(Array.isArray(_))return o(_)}(A)||function(_){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(_))return Array.from(_)}(A)||function(_,v){if(!!_){if(typeof _=="string")return o(_,v);var f=Object.prototype.toString.call(_).slice(8,-1);if(f==="Object"&&_.constructor&&(f=_.constructor.name),f==="Map"||f==="Set")return Array.from(_);if(f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return o(_,v)}}(A)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
37
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function o(A,_){(_==null||_>A.length)&&(_=A.length);for(var v=0,f=new Array(_);v<_;v++)f[v]=A[v];return f}function l(A,_){for(var v=0;v<_.length;v++){var f=_[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(A,f.key,f)}}var s=r(10),i=r(3).SPLAT,c=/%[scdjifoO%]/g,u=/%%/g,b=function(){function A(f){(function(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")})(this,A),this.options=f}var _,v;return _=A,(v=[{key:"_splat",value:function(f,S){var w=f.message,P=f[i]||f.splat||[],N=w.match(u),T=N&&N.length||0,R=S.length-T-P.length,d=R<0?P.splice(R,-1*R):[],I=d.length;if(I)for(var Q=0;Q<I;Q++)Object.assign(f,d[Q]);return f.message=s.format.apply(s,[w].concat(n(P))),f}},{key:"transform",value:function(f){var S=f.message,w=f[i]||f.splat;if(!w||!w.length)return f;var P=S&&S.match&&S.match(c);if(!P&&(w||w.length)){var N=w.length>1?w.splice(0):w,T=N.length;if(T)for(var R=0;R<T;R++)Object.assign(f,N[R]);return f}return P?this._splat(f,P):f}}])&&l(_.prototype,v),A}();e.exports=function(A){return new b(A)}},function(e,t,r){var n=r(135),o=r(9);e.exports=o(function(l){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.format&&(l.timestamp=typeof s.format=="function"?s.format():n.format(new Date,s.format)),l.timestamp||(l.timestamp=new Date().toISOString()),s.alias&&(l[s.alias]=l.timestamp),l})},function(e,t,r){r.r(t),r.d(t,"assign",function(){return c}),r.d(t,"format",function(){return p}),r.d(t,"parse",function(){return C}),r.d(t,"defaultI18n",function(){return _}),r.d(t,"setGlobalDateI18n",function(){return f}),r.d(t,"setGlobalDateMasks",function(){return h});var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[^\\s]+",l=/\[([^]*?)\]/gm;function s(x,F){for(var D=[],O=0,L=x.length;O<L;O++)D.push(x[O].substr(0,F));return D}var i=function(x){return function(F,D){var O=D[x].map(function(L){return L.toLowerCase()}).indexOf(F.toLowerCase());return O>-1?O:null}};function c(x){for(var F=[],D=1;D<arguments.length;D++)F[D-1]=arguments[D];for(var O=0,L=F;O<L.length;O++){var k=L[O];for(var E in k)x[E]=k[E]}return x}var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["January","February","March","April","May","June","July","August","September","October","November","December"],A=s(b,3),_={dayNamesShort:s(u,3),dayNames:u,monthNamesShort:A,monthNames:b,amPm:["am","pm"],DoFn:function(x){return x+["th","st","nd","rd"][x%10>3?0:(x-x%10!=10?1:0)*x%10]}},v=c({},_),f=function(x){return v=c(v,x)},S=function(x){return x.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},w=function(x,F){for(F===void 0&&(F=2),x=String(x);x.length<F;)x="0"+x;return x},P={D:function(x){return String(x.getDate())},DD:function(x){return w(x.getDate())},Do:function(x,F){return F.DoFn(x.getDate())},d:function(x){return String(x.getDay())},dd:function(x){return w(x.getDay())},ddd:function(x,F){return F.dayNamesShort[x.getDay()]},dddd:function(x,F){return F.dayNames[x.getDay()]},M:function(x){return String(x.getMonth()+1)},MM:function(x){return w(x.getMonth()+1)},MMM:function(x,F){return F.monthNamesShort[x.getMonth()]},MMMM:function(x,F){return F.monthNames[x.getMonth()]},YY:function(x){return w(String(x.getFullYear()),4).substr(2)},YYYY:function(x){return w(x.getFullYear(),4)},h:function(x){return String(x.getHours()%12||12)},hh:function(x){return w(x.getHours()%12||12)},H:function(x){return String(x.getHours())},HH:function(x){return w(x.getHours())},m:function(x){return String(x.getMinutes())},mm:function(x){return w(x.getMinutes())},s:function(x){return String(x.getSeconds())},ss:function(x){return w(x.getSeconds())},S:function(x){return String(Math.round(x.getMilliseconds()/100))},SS:function(x){return w(Math.round(x.getMilliseconds()/10),2)},SSS:function(x){return w(x.getMilliseconds(),3)},a:function(x,F){return x.getHours()<12?F.amPm[0]:F.amPm[1]},A:function(x,F){return x.getHours()<12?F.amPm[0].toUpperCase():F.amPm[1].toUpperCase()},ZZ:function(x){var F=x.getTimezoneOffset();return(F>0?"-":"+")+w(100*Math.floor(Math.abs(F)/60)+Math.abs(F)%60,4)},Z:function(x){var F=x.getTimezoneOffset();return(F>0?"-":"+")+w(Math.floor(Math.abs(F)/60),2)+":"+w(Math.abs(F)%60,2)}},N=function(x){return+x-1},T=[null,"[1-9]\\d?"],R=[null,o],d=["isPm",o,function(x,F){var D=x.toLowerCase();return D===F.amPm[0]?0:D===F.amPm[1]?1:null}],I=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(x){var F=(x+"").match(/([+-]|\d\d)/gi);if(F){var D=60*+F[1]+parseInt(F[2],10);return F[0]==="+"?D:-D}return 0}],Q={D:["day","[1-9]\\d?"],DD:["day","\\d\\d"],Do:["day","[1-9]\\d?"+o,function(x){return parseInt(x,10)}],M:["month","[1-9]\\d?",N],MM:["month","\\d\\d",N],YY:["year","\\d\\d",function(x){var F=+(""+new Date().getFullYear()).substr(0,2);return+(""+(+x>68?F-1:F)+x)}],h:["hour","[1-9]\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","[1-9]\\d?"],HH:["hour","\\d\\d"],m:["minute","[1-9]\\d?"],mm:["minute","\\d\\d"],s:["second","[1-9]\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(x){return 100*+x}],SS:["millisecond","\\d\\d",function(x){return 10*+x}],SSS:["millisecond","\\d{3}"],d:T,dd:T,ddd:R,dddd:R,MMM:["month",o,i("monthNamesShort")],MMMM:["month",o,i("monthNames")],a:d,A:d,ZZ:I,Z:I},Z={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},h=function(x){return c(Z,x)},p=function(x,F,D){if(F===void 0&&(F=Z.default),D===void 0&&(D={}),typeof x=="number"&&(x=new Date(x)),Object.prototype.toString.call(x)!=="[object Date]"||isNaN(x.getTime()))throw new Error("Invalid Date pass to format");var O=[];F=(F=Z[F]||F).replace(l,function(k,E){return O.push(E),"@@@"});var L=c(c({},v),D);return(F=F.replace(n,function(k){return P[k](x,L)})).replace(/@@@/g,function(){return O.shift()})};function C(x,F,D){if(D===void 0&&(D={}),typeof F!="string")throw new Error("Invalid format in fecha parse");if(F=Z[F]||F,x.length>1e3)return null;var O={year:new Date().getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},L=[],k=[],E=F.replace(l,function(X,ne){return k.push(S(ne)),"@@@"}),g={},U={};E=S(E).replace(n,function(X){var ne=Q[X],ie=ne[0],he=ne[1],Se=ne[3];if(g[ie])throw new Error("Invalid format. "+ie+" specified twice in format");return g[ie]=!0,Se&&(U[Se]=!0),L.push(ne),"("+he+")"}),Object.keys(U).forEach(function(X){if(!g[X])throw new Error("Invalid format. "+X+" is required in specified format")}),E=E.replace(/@@@/g,function(){return k.shift()});var B=x.match(new RegExp(E,"i"));if(!B)return null;for(var G=c(c({},v),D),Y=1;Y<B.length;Y++){var K=L[Y-1],H=K[0],V=K[2],y=V?V(B[Y],G):+B[Y];if(y==null)return null;O[H]=y}O.isPm===1&&O.hour!=null&&+O.hour!=12?O.hour=+O.hour+12:O.isPm===0&&+O.hour==12&&(O.hour=0);for(var j=new Date(O.year,O.month,O.day,O.hour,O.minute,O.second,O.millisecond),W=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],ee=(Y=0,W.length);Y<ee;Y++)if(g[W[Y][0]]&&O[W[Y][0]]!==j[W[Y][1]]())return null;return O.timezoneOffset==null?j:new Date(Date.UTC(O.year,O.month,O.day,O.hour,O.minute-O.timezoneOffset,O.second,O.millisecond))}var m={format:p,parse:C,defaultI18n:_,setGlobalDateI18n:f,setGlobalDateMasks:h};t.default=m},function(e,t,r){var n=r(57),o=r(9),l=r(3).MESSAGE;e.exports=o(function(s,i){return i.level!==!1&&(s.level=n.strip(s.level)),i.message!==!1&&(s.message=n.strip(s.message)),i.raw!==!1&&s[l]&&(s[l]=n.strip(s[l])),s})},function(e){e.exports=JSON.parse('{"name":"winston","description":"A logger for just about everything.","version":"3.3.3","author":"Charlie Robbins <charlie.robbins@gmail.com>","maintainers":["Jarrett Cruger <jcrugzz@gmail.com>","Chris Alderson <chrisalderson@protonmail.com>","David Hyde <dabh@stanford.edu>"],"repository":{"type":"git","url":"https://github.com/winstonjs/winston.git"},"keywords":["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"dependencies":{"async":"^3.1.0","@dabh/diagnostics":"^2.0.2","is-stream":"^2.0.0","logform":"^2.2.0","one-time":"^1.0.0","readable-stream":"^3.4.0","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.4.0"},"devDependencies":{"@babel/cli":"^7.10.3","@babel/core":"^7.10.3","@babel/preset-env":"^7.10.3","@types/node":"^14.0.13","abstract-winston-transport":"^0.5.1","assume":"^2.2.0","colors":"^1.4.0","cross-spawn-async":"^2.2.5","eslint-config-populist":"^4.2.0","hock":"^1.4.1","mocha":"^8.0.1","nyc":"^15.1.0","rimraf":"^3.0.2","split2":"^3.1.1","std-mocks":"^1.0.1","through2":"^3.0.1","winston-compat":"^0.1.5"},"main":"./lib/winston","browser":"./dist/winston","types":"./index.d.ts","scripts":{"lint":"populist lib/*.js lib/winston/*.js lib/winston/**/*.js","pretest":"npm run lint","test":"nyc --reporter=text --reporter lcov npm run test:mocha","test:mocha":"mocha test/*.test.js test/**/*.test.js --exit","build":"./node_modules/.bin/rimraf dist && babel lib -d dist","prepublishOnly":"npm run build"},"engines":{"node":">= 6.4.0"},"license":"MIT"}')},function(e,t,r){Object.defineProperty(t,"Console",{configurable:!0,enumerable:!0,get:function(){return r(139)}}),Object.defineProperty(t,"File",{configurable:!0,enumerable:!0,get:function(){return r(148)}}),Object.defineProperty(t,"Http",{configurable:!0,enumerable:!0,get:function(){return r(188)}}),Object.defineProperty(t,"Stream",{configurable:!0,enumerable:!0,get:function(){return r(200)}})},function(e,t,r){(function(n){function o(w){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P})(w)}function l(w,P){if(!(w instanceof P))throw new TypeError("Cannot call a class as a function")}function s(w,P){for(var N=0;N<P.length;N++){var T=P[N];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(w,T.key,T)}}function i(w,P){return(i=Object.setPrototypeOf||function(N,T){return N.__proto__=T,N})(w,P)}function c(w){var P=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var N,T=b(w);if(P){var R=b(this).constructor;N=Reflect.construct(T,arguments,R)}else N=T.apply(this,arguments);return u(this,N)}}function u(w,P){return!P||o(P)!=="object"&&typeof P!="function"?function(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}(w):P}function b(w){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)})(w)}var A=r(15),_=r(3),v=_.LEVEL,f=_.MESSAGE,S=r(17);e.exports=function(w){(function(d,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(I&&I.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),I&&i(d,I)})(R,w);var P,N,T=c(R);function R(){var d,I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return l(this,R),(d=T.call(this,I)).name=I.name||"console",d.stderrLevels=d._stringArrayToSet(I.stderrLevels),d.consoleWarnLevels=d._stringArrayToSet(I.consoleWarnLevels),d.eol=I.eol||A.EOL,d.setMaxListeners(30),d}return P=R,(N=[{key:"log",value:function(d,I){var Q=this;return n(function(){return Q.emit("logged",d)}),this.stderrLevels[d[v]]?(console._stderr?console._stderr.write("".concat(d[f]).concat(this.eol)):console.error(d[f]),void(I&&I())):this.consoleWarnLevels[d[v]]?(console._stderr?console._stderr.write("".concat(d[f]).concat(this.eol)):console.warn(d[f]),void(I&&I())):(console._stdout?console._stdout.write("".concat(d[f]).concat(this.eol)):console.log(d[f]),void(I&&I()))}},{key:"_stringArrayToSet",value:function(d,I){if(!d)return{};if(I=I||"Cannot make set from type other than Array of string elements",!Array.isArray(d))throw new Error(I);return d.reduce(function(Q,Z){if(typeof Z!="string")throw new Error(I);return Q[Z]=!0,Q},{})}}])&&s(P.prototype,N),R}(S)}).call(this,r(12).setImmediate)},function(e,t,r){(function(n,o){(function(l,s){if(!l.setImmediate){var i,c,u,b,A,_=1,v={},f=!1,S=l.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(l);w=w&&w.setTimeout?w:l,{}.toString.call(l.process)==="[object process]"?i=function(T){o.nextTick(function(){N(T)})}:function(){if(l.postMessage&&!l.importScripts){var T=!0,R=l.onmessage;return l.onmessage=function(){T=!1},l.postMessage("","*"),l.onmessage=R,T}}()?(b="setImmediate$"+Math.random()+"$",A=function(T){T.source===l&&typeof T.data=="string"&&T.data.indexOf(b)===0&&N(+T.data.slice(b.length))},l.addEventListener?l.addEventListener("message",A,!1):l.attachEvent("onmessage",A),i=function(T){l.postMessage(b+T,"*")}):l.MessageChannel?((u=new MessageChannel).port1.onmessage=function(T){N(T.data)},i=function(T){u.port2.postMessage(T)}):S&&"onreadystatechange"in S.createElement("script")?(c=S.documentElement,i=function(T){var R=S.createElement("script");R.onreadystatechange=function(){N(T),R.onreadystatechange=null,c.removeChild(R),R=null},c.appendChild(R)}):i=function(T){setTimeout(N,0,T)},w.setImmediate=function(T){typeof T!="function"&&(T=new Function(""+T));for(var R=new Array(arguments.length-1),d=0;d<R.length;d++)R[d]=arguments[d+1];var I={callback:T,args:R};return v[_]=I,i(_),_++},w.clearImmediate=P}function P(T){delete v[T]}function N(T){if(f)setTimeout(N,0,T);else{var R=v[T];if(R){f=!0;try{(function(d){var I=d.callback,Q=d.args;switch(Q.length){case 0:I();break;case 1:I(Q[0]);break;case 2:I(Q[0],Q[1]);break;case 3:I(Q[0],Q[1],Q[2]);break;default:I.apply(void 0,Q)}})(R)}finally{P(T),f=!1}}}}})(typeof self=="undefined"?n===void 0?this:n:self)}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(60)},function(e,t,r){(function(n,o){var l=r(13);e.exports=R;var s,i=r(38);R.ReadableState=T,r(18).EventEmitter;var c=function(E,g){return E.listeners(g).length},u=r(61),b=r(40).Buffer,A=n.Uint8Array||function(){},_=Object.create(r(14));_.inherits=r(7);var v=r(143),f=void 0;f=v&&v.debuglog?v.debuglog("stream"):function(){};var S,w=r(144),P=r(62);_.inherits(R,u);var N=["error","close","destroy","pause","resume"];function T(E,g){E=E||{};var U=g instanceof(s=s||r(31));this.objectMode=!!E.objectMode,U&&(this.objectMode=this.objectMode||!!E.readableObjectMode);var B=E.highWaterMark,G=E.readableHighWaterMark,Y=this.objectMode?16:16384;this.highWaterMark=B||B===0?B:U&&(G||G===0)?G:Y,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,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.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=E.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,E.encoding&&(S||(S=r(19).StringDecoder),this.decoder=new S(E.encoding),this.encoding=E.encoding)}function R(E){if(s=s||r(31),!(this instanceof R))return new R(E);this._readableState=new T(E,this),this.readable=!0,E&&(typeof E.read=="function"&&(this._read=E.read),typeof E.destroy=="function"&&(this._destroy=E.destroy)),u.call(this)}function d(E,g,U,B,G){var Y,K=E._readableState;return g===null?(K.reading=!1,function(H,V){if(!V.ended){if(V.decoder){var y=V.decoder.end();y&&y.length&&(V.buffer.push(y),V.length+=V.objectMode?1:y.length)}V.ended=!0,Z(H)}}(E,K)):(G||(Y=function(H,V){var y;j=V,b.isBuffer(j)||j instanceof A||typeof V=="string"||V===void 0||H.objectMode||(y=new TypeError("Invalid non-string/buffer chunk"));var j;return y}(K,g)),Y?E.emit("error",Y):K.objectMode||g&&g.length>0?(typeof g=="string"||K.objectMode||Object.getPrototypeOf(g)===b.prototype||(g=function(H){return b.from(H)}(g)),B?K.endEmitted?E.emit("error",new Error("stream.unshift() after end event")):I(E,K,g,!0):K.ended?E.emit("error",new Error("stream.push() after EOF")):(K.reading=!1,K.decoder&&!U?(g=K.decoder.write(g),K.objectMode||g.length!==0?I(E,K,g,!1):p(E,K)):I(E,K,g,!1))):B||(K.reading=!1)),function(H){return!H.ended&&(H.needReadable||H.length<H.highWaterMark||H.length===0)}(K)}function I(E,g,U,B){g.flowing&&g.length===0&&!g.sync?(E.emit("data",U),E.read(0)):(g.length+=g.objectMode?1:U.length,B?g.buffer.unshift(U):g.buffer.push(U),g.needReadable&&Z(E)),p(E,g)}Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(E){this._readableState&&(this._readableState.destroyed=E)}}),R.prototype.destroy=P.destroy,R.prototype._undestroy=P.undestroy,R.prototype._destroy=function(E,g){this.push(null),g(E)},R.prototype.push=function(E,g){var U,B=this._readableState;return B.objectMode?U=!0:typeof E=="string"&&((g=g||B.defaultEncoding)!==B.encoding&&(E=b.from(E,g),g=""),U=!0),d(this,E,g,!1,U)},R.prototype.unshift=function(E){return d(this,E,null,!0,!1)},R.prototype.isPaused=function(){return this._readableState.flowing===!1},R.prototype.setEncoding=function(E){return S||(S=r(19).StringDecoder),this._readableState.decoder=new S(E),this._readableState.encoding=E,this};function Q(E,g){return E<=0||g.length===0&&g.ended?0:g.objectMode?1:E!=E?g.flowing&&g.length?g.buffer.head.data.length:g.length:(E>g.highWaterMark&&(g.highWaterMark=function(U){return U>=8388608?U=8388608:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}(E)),E<=g.length?E:g.ended?g.length:(g.needReadable=!0,0))}function Z(E){var g=E._readableState;g.needReadable=!1,g.emittedReadable||(f("emitReadable",g.flowing),g.emittedReadable=!0,g.sync?l.nextTick(h,E):h(E))}function h(E){f("emit readable"),E.emit("readable"),F(E)}function p(E,g){g.readingMore||(g.readingMore=!0,l.nextTick(C,E,g))}function C(E,g){for(var U=g.length;!g.reading&&!g.flowing&&!g.ended&&g.length<g.highWaterMark&&(f("maybeReadMore read 0"),E.read(0),U!==g.length);)U=g.length;g.readingMore=!1}function m(E){f("readable nexttick read 0"),E.read(0)}function x(E,g){g.reading||(f("resume read 0"),E.read(0)),g.resumeScheduled=!1,g.awaitDrain=0,E.emit("resume"),F(E),g.flowing&&!g.reading&&E.read(0)}function F(E){var g=E._readableState;for(f("flow",g.flowing);g.flowing&&E.read()!==null;);}function D(E,g){return g.length===0?null:(g.objectMode?U=g.buffer.shift():!E||E>=g.length?(U=g.decoder?g.buffer.join(""):g.buffer.length===1?g.buffer.head.data:g.buffer.concat(g.length),g.buffer.clear()):U=function(B,G,Y){var K;return B<G.head.data.length?(K=G.head.data.slice(0,B),G.head.data=G.head.data.slice(B)):K=B===G.head.data.length?G.shift():Y?function(H,V){var y=V.head,j=1,W=y.data;for(H-=W.length;y=y.next;){var ee=y.data,X=H>ee.length?ee.length:H;if(X===ee.length?W+=ee:W+=ee.slice(0,H),(H-=X)===0){X===ee.length?(++j,y.next?V.head=y.next:V.head=V.tail=null):(V.head=y,y.data=ee.slice(X));break}++j}return V.length-=j,W}(B,G):function(H,V){var y=b.allocUnsafe(H),j=V.head,W=1;for(j.data.copy(y),H-=j.data.length;j=j.next;){var ee=j.data,X=H>ee.length?ee.length:H;if(ee.copy(y,y.length-H,0,X),(H-=X)===0){X===ee.length?(++W,j.next?V.head=j.next:V.head=V.tail=null):(V.head=j,j.data=ee.slice(X));break}++W}return V.length-=W,y}(B,G),K}(E,g.buffer,g.decoder),U);var U}function O(E){var g=E._readableState;if(g.length>0)throw new Error('"endReadable()" called on non-empty stream');g.endEmitted||(g.ended=!0,l.nextTick(L,g,E))}function L(E,g){E.endEmitted||E.length!==0||(E.endEmitted=!0,g.readable=!1,g.emit("end"))}function k(E,g){for(var U=0,B=E.length;U<B;U++)if(E[U]===g)return U;return-1}R.prototype.read=function(E){f("read",E),E=parseInt(E,10);var g=this._readableState,U=E;if(E!==0&&(g.emittedReadable=!1),E===0&&g.needReadable&&(g.length>=g.highWaterMark||g.ended))return f("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?O(this):Z(this),null;if((E=Q(E,g))===0&&g.ended)return g.length===0&&O(this),null;var B,G=g.needReadable;return f("need readable",G),(g.length===0||g.length-E<g.highWaterMark)&&f("length less than watermark",G=!0),g.ended||g.reading?f("reading or ended",G=!1):G&&(f("do read"),g.reading=!0,g.sync=!0,g.length===0&&(g.needReadable=!0),this._read(g.highWaterMark),g.sync=!1,g.reading||(E=Q(U,g))),(B=E>0?D(E,g):null)===null?(g.needReadable=!0,E=0):g.length-=E,g.length===0&&(g.ended||(g.needReadable=!0),U!==E&&g.ended&&O(this)),B!==null&&this.emit("data",B),B},R.prototype._read=function(E){this.emit("error",new Error("_read() is not implemented"))},R.prototype.pipe=function(E,g){var U=this,B=this._readableState;switch(B.pipesCount){case 0:B.pipes=E;break;case 1:B.pipes=[B.pipes,E];break;default:B.pipes.push(E)}B.pipesCount+=1,f("pipe count=%d opts=%j",B.pipesCount,g);var G=(!g||g.end!==!1)&&E!==o.stdout&&E!==o.stderr?K:ne;function Y(ie,he){f("onunpipe"),ie===U&&he&&he.hasUnpiped===!1&&(he.hasUnpiped=!0,f("cleanup"),E.removeListener("close",ee),E.removeListener("finish",X),E.removeListener("drain",H),E.removeListener("error",W),E.removeListener("unpipe",Y),U.removeListener("end",K),U.removeListener("end",ne),U.removeListener("data",j),V=!0,!B.awaitDrain||E._writableState&&!E._writableState.needDrain||H())}function K(){f("onend"),E.end()}B.endEmitted?l.nextTick(G):U.once("end",G),E.on("unpipe",Y);var H=function(ie){return function(){var he=ie._readableState;f("pipeOnDrain",he.awaitDrain),he.awaitDrain&&he.awaitDrain--,he.awaitDrain===0&&c(ie,"data")&&(he.flowing=!0,F(ie))}}(U);E.on("drain",H);var V=!1,y=!1;function j(ie){f("ondata"),y=!1,E.write(ie)!==!1||y||((B.pipesCount===1&&B.pipes===E||B.pipesCount>1&&k(B.pipes,E)!==-1)&&!V&&(f("false write response, pause",U._readableState.awaitDrain),U._readableState.awaitDrain++,y=!0),U.pause())}function W(ie){f("onerror",ie),ne(),E.removeListener("error",W),c(E,"error")===0&&E.emit("error",ie)}function ee(){E.removeListener("finish",X),ne()}function X(){f("onfinish"),E.removeListener("close",ee),ne()}function ne(){f("unpipe"),U.unpipe(E)}return U.on("data",j),function(ie,he,Se){if(typeof ie.prependListener=="function")return ie.prependListener(he,Se);ie._events&&ie._events[he]?i(ie._events[he])?ie._events[he].unshift(Se):ie._events[he]=[Se,ie._events[he]]:ie.on(he,Se)}(E,"error",W),E.once("close",ee),E.once("finish",X),E.emit("pipe",U),B.flowing||(f("pipe resume"),U.resume()),E},R.prototype.unpipe=function(E){var g=this._readableState,U={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return E&&E!==g.pipes||(E||(E=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,E&&E.emit("unpipe",this,U)),this;if(!E){var B=g.pipes,G=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var Y=0;Y<G;Y++)B[Y].emit("unpipe",this,U);return this}var K=k(g.pipes,E);return K===-1||(g.pipes.splice(K,1),g.pipesCount-=1,g.pipesCount===1&&(g.pipes=g.pipes[0]),E.emit("unpipe",this,U)),this},R.prototype.on=function(E,g){var U=u.prototype.on.call(this,E,g);if(E==="data")this._readableState.flowing!==!1&&this.resume();else if(E==="readable"){var B=this._readableState;B.endEmitted||B.readableListening||(B.readableListening=B.needReadable=!0,B.emittedReadable=!1,B.reading?B.length&&Z(this):l.nextTick(m,this))}return U},R.prototype.addListener=R.prototype.on,R.prototype.resume=function(){var E=this._readableState;return E.flowing||(f("resume"),E.flowing=!0,function(g,U){U.resumeScheduled||(U.resumeScheduled=!0,l.nextTick(x,g,U))}(this,E)),this},R.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},R.prototype.wrap=function(E){var g=this,U=this._readableState,B=!1;for(var G in E.on("end",function(){if(f("wrapped end"),U.decoder&&!U.ended){var K=U.decoder.end();K&&K.length&&g.push(K)}g.push(null)}),E.on("data",function(K){f("wrapped data"),U.decoder&&(K=U.decoder.write(K)),U.objectMode&&K==null||(U.objectMode||K&&K.length)&&(g.push(K)||(B=!0,E.pause()))}),E)this[G]===void 0&&typeof E[G]=="function"&&(this[G]=function(K){return function(){return E[K].apply(E,arguments)}}(G));for(var Y=0;Y<N.length;Y++)E.on(N[Y],this.emit.bind(this,N[Y]));return this._read=function(K){f("wrapped _read",K),B&&(B=!1,E.resume())},this},Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),R._fromList=D}).call(this,r(5),r(2))},function(e,t){},function(e,t,r){var n=r(40).Buffer,o=r(145);e.exports=function(){function l(){(function(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(s){var i={data:s,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},l.prototype.unshift=function(s){var i={data:s,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},l.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(s){if(this.length===0)return"";for(var i=this.head,c=""+i.data;i=i.next;)c+=s+i.data;return c},l.prototype.concat=function(s){if(this.length===0)return n.alloc(0);if(this.length===1)return this.head.data;for(var i,c,u,b=n.allocUnsafe(s>>>0),A=this.head,_=0;A;)i=A.data,c=b,u=_,i.copy(c,u),_+=A.data.length,A=A.next;return b},l}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var l=o.inspect({length:this.length});return this.constructor.name+" "+l})},function(e,t){},function(e,t,r){var n=r(4),o=n.Buffer;function l(i,c){for(var u in i)c[u]=i[u]}function s(i,c,u){return o(i,c,u)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(l(n,t),t.Buffer=s),l(o,s),s.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,c,u)},s.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var b=o(i);return c!==void 0?typeof u=="string"?b.fill(c,u):b.fill(c):b.fill(0),b},s.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},s.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(i)}},function(e,t,r){var n=r(10),o=r(3).LEVEL,l=r(17),s=e.exports=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(l.call(this,i),!i.transport||typeof i.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");function c(u){this.emit("error",u,this.transport)}this.transport=i.transport,this.level=this.level||i.transport.level,this.handleExceptions=this.handleExceptions||i.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=c.bind(this),this.transport.on("error",this.transport.__winstonError))};n.inherits(s,l),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);(!this.level||this.levels[this.level]>=this.levels[i[o]])&&this.transport.log(i[o],i.message,i,this._nop),u(null)},s.prototype._writev=function(i,c){for(var u=0;u<i.length;u++)this._accept(i[u])&&(this.transport.log(i[u].chunk[o],i[u].chunk.message,i[u].chunk,this._nop),i[u].callback());return c(null)},s.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
38
|
-
`))},s.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,r){(function(n,o){function l(h){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(h)}function s(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function i(h,p){for(var C=0;C<p.length;C++){var m=p[C];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(h,m.key,m)}}function c(h,p){return(c=Object.setPrototypeOf||function(C,m){return C.__proto__=m,C})(h,p)}function u(h){var p=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var C,m=_(h);if(p){var x=_(this).constructor;C=Reflect.construct(m,arguments,x)}else C=m.apply(this,arguments);return b(this,C)}}function b(h,p){return!p||l(p)!=="object"&&typeof p!="function"?A(h):p}function A(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function _(h){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)})(h)}var v=r(63),f=r(53),S=r(149),w=r(159),P=r(3).MESSAGE,N=r(28),T=N.Stream,R=N.PassThrough,d=r(17),I=r(33)("winston:file"),Q=r(15),Z=r(187);e.exports=function(h){(function(F,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function");F.prototype=Object.create(D&&D.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),D&&c(F,D)})(x,h);var p,C,m=u(x);function x(){var F,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};function O(L){for(var k=arguments.length,E=new Array(k>1?k-1:0),g=1;g<k;g++)E[g-1]=arguments[g];E.slice(1).forEach(function(U){if(D[U])throw new Error("Cannot set ".concat(U," and ").concat(L," together"))})}if(s(this,x),(F=m.call(this,D)).name=D.name||"file",F._stream=new R,F._stream.setMaxListeners(30),F._onError=F._onError.bind(A(F)),D.filename||D.dirname)O("filename or dirname","stream"),F._basename=F.filename=D.filename?f.basename(D.filename):"winston.log",F.dirname=D.dirname||f.dirname(D.filename),F.options=D.options||{flags:"a"};else{if(!D.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),O("stream","filename","maxsize"),F._dest=F._stream.pipe(F._setupStream(D.stream)),F.dirname=f.dirname(F._dest.path)}return F.maxsize=D.maxsize||null,F.rotationFormat=D.rotationFormat||!1,F.zippedArchive=D.zippedArchive||!1,F.maxFiles=D.maxFiles||null,F.eol=D.eol||Q.EOL,F.tailable=D.tailable||!1,F._size=0,F._pendingSize=0,F._created=0,F._drain=!1,F._opening=!1,F._ending=!1,F.dirname&&F._createLogDirIfNotExist(F.dirname),F.open(),F}return p=x,(C=[{key:"finishIfEnding",value:function(){var F=this;this._ending&&(this._opening?this.once("open",function(){F._stream.once("finish",function(){return F.emit("finish")}),n(function(){return F._stream.end()})}):(this._stream.once("finish",function(){return F.emit("finish")}),n(function(){return F._stream.end()})))}},{key:"log",value:function(F){var D=this,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};if(this.silent)return O(),!0;if(this._drain)this._stream.once("drain",function(){D._drain=!1,D.log(F,O)});else{if(!this._rotate){var L="".concat(F[P]).concat(this.eol),k=o.byteLength(L);this._pendingSize+=k,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var E=this._stream.write(L,g.bind(this));return E?O():(this._drain=!0,this._stream.once("drain",function(){D._drain=!1,O()})),I("written",E,this._drain),this.finishIfEnding(),E}this._stream.once("rotate",function(){D._rotate=!1,D.log(F,O)})}function g(){var U=this;this._size+=k,this._pendingSize-=k,I("logged %s %s",this._size,L),this.emit("logged",F),this._opening||this._needsNewFile()&&(this._rotate=!0,this._endStream(function(){return U._rotateFile()}))}}},{key:"query",value:function(F,D){typeof F=="function"&&(D=F,F={}),F=function(B){return(B=B||{}).rows=B.rows||B.limit||10,B.start=B.start||0,B.until=B.until||new Date,l(B.until)!=="object"&&(B.until=new Date(B.until)),B.from=B.from||B.until-864e5,l(B.from)!=="object"&&(B.from=new Date(B.from)),B.order=B.order||"desc",B}(F);var O=f.join(this.dirname,this.filename),L="",k=[],E=0,g=v.createReadStream(O,{encoding:"utf8"});function U(B,G){try{var Y=JSON.parse(B);(function(K){if(K&&l(K)==="object"){var H=new Date(K.timestamp);if(!(F.from&&H<F.from||F.until&&H>F.until||F.level&&F.level!==K.level))return!0}})(Y)&&function(K){F.rows&&k.length>=F.rows&&F.order!=="desc"?g.readable&&g.destroy():(F.fields&&(K=F.fields.reduce(function(H,V){return H[V]=K[V],H},{})),F.order==="desc"&&k.length>=F.rows&&k.shift(),k.push(K))}(Y)}catch(K){G||g.emit("error",K)}}g.on("error",function(B){if(g.readable&&g.destroy(),D)return B.code!=="ENOENT"?D(B):D(null,k)}),g.on("data",function(B){for(var G=(B=(L+B).split(/\n+/)).length-1,Y=0;Y<G;Y++)(!F.start||E>=F.start)&&U(B[Y]),E++;L=B[G]}),g.on("close",function(){L&&U(L,!0),F.order==="desc"&&(k=k.reverse()),D&&D(null,k)})}},{key:"stream",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=f.join(this.dirname,this.filename),O=new T,L={file:D,start:F.start};return O.destroy=Z(L,function(k,E){if(k)return O.emit("error",k);try{O.emit("data",E),E=JSON.parse(E),O.emit("log",E)}catch(g){O.emit("error",g)}}),O}},{key:"open",value:function(){var F=this;this.filename&&(this._opening||(this._opening=!0,this.stat(function(D,O){if(D)return F.emit("error",D);I("stat done: %s { size: %s }",F.filename,O),F._size=O,F._dest=F._createStream(F._stream),F._opening=!1,F.once("open",function(){F._stream.eventNames().includes("rotate")?F._stream.emit("rotate"):F._rotate=!1})})))}},{key:"stat",value:function(F){var D=this,O=this._getFile(),L=f.join(this.dirname,O);v.stat(L,function(k,E){return k&&k.code==="ENOENT"?(I("ENOENT\xA0ok",L),D.filename=O,F(null,0)):k?(I("err ".concat(k.code," ").concat(L)),F(k)):!E||D._needsNewFile(E.size)?D._incFile(function(){return D.stat(F)}):(D.filename=O,void F(null,E.size))})}},{key:"close",value:function(F){var D=this;this._stream&&this._stream.end(function(){F&&F(),D.emit("flush"),D.emit("closed")})}},{key:"_needsNewFile",value:function(F){return F=F||this._size,this.maxsize&&F>=this.maxsize}},{key:"_onError",value:function(F){this.emit("error",F)}},{key:"_setupStream",value:function(F){return F.on("error",this._onError),F}},{key:"_cleanupStream",value:function(F){return F.removeListener("error",this._onError),F}},{key:"_rotateFile",value:function(){var F=this;this._incFile(function(){return F.open()})}},{key:"_endStream",value:function(){var F=this,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end(function(){F._cleanupStream(F._dest),D()})):D()}},{key:"_createStream",value:function(F){var D=this,O=f.join(this.dirname,this.filename);I("create stream start",O,this.options);var L=v.createWriteStream(O,this.options).on("error",function(E){return I(E)}).on("close",function(){return I("close",L.path,L.bytesWritten)}).on("open",function(){I("file open ok",O),D.emit("open",O),F.pipe(L),D.rotatedWhileOpening&&(D._stream=new R,D._stream.setMaxListeners(30),D._rotateFile(),D.rotatedWhileOpening=!1,D._cleanupStream(L),F.end())});if(I("create stream ok",O),this.zippedArchive){var k=w.createGzip();return k.pipe(L),k}return L}},{key:"_incFile",value:function(F){I("_incFile",this.filename);var D=f.extname(this._basename),O=f.basename(this._basename,D);this.tailable?this._checkMaxFilesTailable(D,O,F):(this._created+=1,this._checkMaxFilesIncrementing(D,O,F))}},{key:"_getFile",value:function(){var F=f.extname(this._basename),D=f.basename(this._basename,F),O=this.rotationFormat?this.rotationFormat():this._created,L=!this.tailable&&this._created?"".concat(D).concat(O).concat(F):"".concat(D).concat(F);return this.zippedArchive&&!this.tailable?"".concat(L,".gz"):L}},{key:"_checkMaxFilesIncrementing",value:function(F,D,O){if(!this.maxFiles||this._created<this.maxFiles)return n(O);var L=this._created-this.maxFiles,k=L!==0?L:"",E=this.zippedArchive?".gz":"",g="".concat(D).concat(k).concat(F).concat(E),U=f.join(this.dirname,g);v.unlink(U,O)}},{key:"_checkMaxFilesTailable",value:function(F,D,O){var L=this,k=[];if(this.maxFiles){for(var E=this.zippedArchive?".gz":"",g=this.maxFiles-1;g>1;g--)k.push(function(U,B){var G=this,Y="".concat(D).concat(U-1).concat(F).concat(E),K=f.join(this.dirname,Y);v.exists(K,function(H){if(!H)return B(null);Y="".concat(D).concat(U).concat(F).concat(E),v.rename(K,f.join(G.dirname,Y),B)})}.bind(this,g));S(k,function(){v.rename(f.join(L.dirname,"".concat(D).concat(F)),f.join(L.dirname,"".concat(D,"1").concat(F).concat(E)),O)})}}},{key:"_createLogDirIfNotExist",value:function(F){v.existsSync(F)||v.mkdirSync(F,{recursive:!0})}}])&&i(p.prototype,C),x}(d)}).call(this,r(12).setImmediate,r(4).Buffer)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s,i){return(0,n.default)(o.default,s,i)};var n=l(r(150)),o=l(r(154));function l(s){return s&&s.__esModule?s:{default:s}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(41)),o=s(r(22)),l=s(r(26));function s(i){return i&&i.__esModule?i:{default:i}}t.default=(0,l.default)((i,c,u)=>{var b=(0,n.default)(c)?[]:{};i(c,(A,_,v)=>{(0,o.default)(A)((f,...S)=>{S.length<2&&([S]=S),b[_]=S,v(f)})},A=>u(A,b))},3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(u){return(0,l.isAsync)(u)?function(...b){const A=b.pop();return i(u.apply(this,b),A)}:(0,n.default)(function(b,A){var _;try{_=u.apply(this,b)}catch(v){return A(v)}if(_&&typeof _.then=="function")return i(_,A);A(null,_)})};var n=s(r(152)),o=s(r(153)),l=r(22);function s(u){return u&&u.__esModule?u:{default:u}}function i(u,b){return u.then(A=>{c(b,null,A)},A=>{c(b,A&&A.message?A:new Error(A))})}function c(u,b,A){try{u(b,A)}catch(_){(0,o.default)(v=>{throw v},_)}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return function(...o){var l=o.pop();return n.call(this,o,l)}},e.exports=t.default},function(e,t,r){(function(n,o){Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=c,t.wrap=u;var l,s=t.hasSetImmediate=typeof n=="function"&&n,i=t.hasNextTick=typeof o=="object"&&typeof o.nextTick=="function";function c(b){setTimeout(b,0)}function u(b){return(A,..._)=>b(()=>A(..._))}l=s?n:i?o.nextTick:c,t.default=u(l)}).call(this,r(12).setImmediate,r(2))},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(64)),o=l(r(26));function l(s){return s&&s.__esModule?s:{default:s}}t.default=(0,o.default)(function(s,i,c){return(0,n.default)(s,1,i,c)},3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(65)),o=u(r(156)),l=u(r(66)),s=r(22),i=u(r(158)),c=u(r(42));function u(b){return b&&b.__esModule?b:{default:b}}t.default=b=>(A,_,v)=>{if(v=(0,n.default)(v),b<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!A)return v(null);if((0,s.isAsyncGenerator)(A))return(0,i.default)(A,b,_,v);if((0,s.isAsyncIterable)(A))return(0,i.default)(A[Symbol.asyncIterator](),b,_,v);var f=(0,o.default)(A),S=!1,w=!1,P=0,N=!1;function T(d,I){if(!w)if(P-=1,d)S=!0,v(d);else if(d===!1)S=!0,w=!0;else{if(I===c.default||S&&P<=0)return S=!0,v(null);N||R()}}function R(){for(N=!0;P<b&&!S;){var d=f();if(d===null)return S=!0,void(P<=0&&v(null));P+=1,_(d.value,d.key,(0,l.default)(T))}N=!1}R()},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s){if((0,n.default)(s))return function(_){var v=-1,f=_.length;return function(){return++v<f?{value:_[v],key:v}:null}}(s);var i=(0,o.default)(s);return i?function(_){var v=-1;return function(){var f=_.next();return f.done?null:(v++,{value:f.value,key:v})}}(i):(c=s,u=c?Object.keys(c):[],b=-1,A=u.length,function(){var _=u[++b];return b<A?{value:c[_],key:_}:null});var c,u,b,A};var n=l(r(41)),o=l(r(157));function l(s){return s&&s.__esModule?s:{default:s}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return n[Symbol.iterator]&&n[Symbol.iterator]()},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s,i,c,u){let b=!1,A=!1,_=!1,v=0,f=0;function S(){v>=i||_||b||(_=!0,s.next().then(({value:N,done:T})=>{if(!A&&!b){if(_=!1,T)return b=!0,void(v<=0&&u(null));v++,c(N,f,w),f++,S()}}).catch(P))}function w(N,T){if(v-=1,!A)return N?P(N):N===!1?(b=!0,void(A=!0)):T===l.default||b&&v<=0?(b=!0,u(null)):void S()}function P(N){A||(_=!1,b=!0,u(N))}S()};var n,o=r(42),l=(n=o)&&n.__esModule?n:{default:n};e.exports=t.default},function(e,t,r){(function(n){var o=r(4).Buffer,l=r(160).Transform,s=r(168),i=r(10),c=r(72).ok,u=r(4).kMaxLength,b="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";s.Z_MIN_WINDOWBITS=8,s.Z_MAX_WINDOWBITS=15,s.Z_DEFAULT_WINDOWBITS=15,s.Z_MIN_CHUNK=64,s.Z_MAX_CHUNK=1/0,s.Z_DEFAULT_CHUNK=16384,s.Z_MIN_MEMLEVEL=1,s.Z_MAX_MEMLEVEL=9,s.Z_DEFAULT_MEMLEVEL=8,s.Z_MIN_LEVEL=-1,s.Z_MAX_LEVEL=9,s.Z_DEFAULT_LEVEL=s.Z_DEFAULT_COMPRESSION;for(var A=Object.keys(s),_=0;_<A.length;_++){var v=A[_];v.match(/^Z/)&&Object.defineProperty(t,v,{enumerable:!0,value:s[v],writable:!1})}for(var f={Z_OK:s.Z_OK,Z_STREAM_END:s.Z_STREAM_END,Z_NEED_DICT:s.Z_NEED_DICT,Z_ERRNO:s.Z_ERRNO,Z_STREAM_ERROR:s.Z_STREAM_ERROR,Z_DATA_ERROR:s.Z_DATA_ERROR,Z_MEM_ERROR:s.Z_MEM_ERROR,Z_BUF_ERROR:s.Z_BUF_ERROR,Z_VERSION_ERROR:s.Z_VERSION_ERROR},S=Object.keys(f),w=0;w<S.length;w++){var P=S[w];f[f[P]]=P}function N(D,O,L){var k=[],E=0;function g(){for(var B;(B=D.read())!==null;)k.push(B),E+=B.length;D.once("readable",g)}function U(){var B,G=null;E>=u?G=new RangeError(b):B=o.concat(k,E),k=[],D.close(),L(G,B)}D.on("error",function(B){D.removeListener("end",U),D.removeListener("readable",g),L(B)}),D.on("end",U),D.end(O),g()}function T(D,O){if(typeof O=="string"&&(O=o.from(O)),!o.isBuffer(O))throw new TypeError("Not a string or buffer");var L=D._finishFlushFlag;return D._processChunk(O,L)}function R(D){if(!(this instanceof R))return new R(D);m.call(this,D,s.DEFLATE)}function d(D){if(!(this instanceof d))return new d(D);m.call(this,D,s.INFLATE)}function I(D){if(!(this instanceof I))return new I(D);m.call(this,D,s.GZIP)}function Q(D){if(!(this instanceof Q))return new Q(D);m.call(this,D,s.GUNZIP)}function Z(D){if(!(this instanceof Z))return new Z(D);m.call(this,D,s.DEFLATERAW)}function h(D){if(!(this instanceof h))return new h(D);m.call(this,D,s.INFLATERAW)}function p(D){if(!(this instanceof p))return new p(D);m.call(this,D,s.UNZIP)}function C(D){return D===s.Z_NO_FLUSH||D===s.Z_PARTIAL_FLUSH||D===s.Z_SYNC_FLUSH||D===s.Z_FULL_FLUSH||D===s.Z_FINISH||D===s.Z_BLOCK}function m(D,O){var L=this;if(this._opts=D=D||{},this._chunkSize=D.chunkSize||t.Z_DEFAULT_CHUNK,l.call(this,D),D.flush&&!C(D.flush))throw new Error("Invalid flush flag: "+D.flush);if(D.finishFlush&&!C(D.finishFlush))throw new Error("Invalid flush flag: "+D.finishFlush);if(this._flushFlag=D.flush||s.Z_NO_FLUSH,this._finishFlushFlag=D.finishFlush!==void 0?D.finishFlush:s.Z_FINISH,D.chunkSize&&(D.chunkSize<t.Z_MIN_CHUNK||D.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+D.chunkSize);if(D.windowBits&&(D.windowBits<t.Z_MIN_WINDOWBITS||D.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+D.windowBits);if(D.level&&(D.level<t.Z_MIN_LEVEL||D.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+D.level);if(D.memLevel&&(D.memLevel<t.Z_MIN_MEMLEVEL||D.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+D.memLevel);if(D.strategy&&D.strategy!=t.Z_FILTERED&&D.strategy!=t.Z_HUFFMAN_ONLY&&D.strategy!=t.Z_RLE&&D.strategy!=t.Z_FIXED&&D.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+D.strategy);if(D.dictionary&&!o.isBuffer(D.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new s.Zlib(O);var k=this;this._hadError=!1,this._handle.onerror=function(U,B){x(k),k._hadError=!0;var G=new Error(U);G.errno=B,G.code=t.codes[B],k.emit("error",G)};var E=t.Z_DEFAULT_COMPRESSION;typeof D.level=="number"&&(E=D.level);var g=t.Z_DEFAULT_STRATEGY;typeof D.strategy=="number"&&(g=D.strategy),this._handle.init(D.windowBits||t.Z_DEFAULT_WINDOWBITS,E,D.memLevel||t.Z_DEFAULT_MEMLEVEL,g,D.dictionary),this._buffer=o.allocUnsafe(this._chunkSize),this._offset=0,this._level=E,this._strategy=g,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!L._handle},configurable:!0,enumerable:!0})}function x(D,O){O&&n.nextTick(O),D._handle&&(D._handle.close(),D._handle=null)}function F(D){D.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(f),writable:!1}),t.Deflate=R,t.Inflate=d,t.Gzip=I,t.Gunzip=Q,t.DeflateRaw=Z,t.InflateRaw=h,t.Unzip=p,t.createDeflate=function(D){return new R(D)},t.createInflate=function(D){return new d(D)},t.createDeflateRaw=function(D){return new Z(D)},t.createInflateRaw=function(D){return new h(D)},t.createGzip=function(D){return new I(D)},t.createGunzip=function(D){return new Q(D)},t.createUnzip=function(D){return new p(D)},t.deflate=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new R(O),D,L)},t.deflateSync=function(D,O){return T(new R(O),D)},t.gzip=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new I(O),D,L)},t.gzipSync=function(D,O){return T(new I(O),D)},t.deflateRaw=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new Z(O),D,L)},t.deflateRawSync=function(D,O){return T(new Z(O),D)},t.unzip=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new p(O),D,L)},t.unzipSync=function(D,O){return T(new p(O),D)},t.inflate=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new d(O),D,L)},t.inflateSync=function(D,O){return T(new d(O),D)},t.gunzip=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new Q(O),D,L)},t.gunzipSync=function(D,O){return T(new Q(O),D)},t.inflateRaw=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new h(O),D,L)},t.inflateRawSync=function(D,O){return T(new h(O),D)},i.inherits(m,l),m.prototype.params=function(D,O,L){if(D<t.Z_MIN_LEVEL||D>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+D);if(O!=t.Z_FILTERED&&O!=t.Z_HUFFMAN_ONLY&&O!=t.Z_RLE&&O!=t.Z_FIXED&&O!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+O);if(this._level!==D||this._strategy!==O){var k=this;this.flush(s.Z_SYNC_FLUSH,function(){c(k._handle,"zlib binding closed"),k._handle.params(D,O),k._hadError||(k._level=D,k._strategy=O,L&&L())})}else n.nextTick(L)},m.prototype.reset=function(){return c(this._handle,"zlib binding closed"),this._handle.reset()},m.prototype._flush=function(D){this._transform(o.alloc(0),"",D)},m.prototype.flush=function(D,O){var L=this,k=this._writableState;(typeof D=="function"||D===void 0&&!O)&&(O=D,D=s.Z_FULL_FLUSH),k.ended?O&&n.nextTick(O):k.ending?O&&this.once("end",O):k.needDrain?O&&this.once("drain",function(){return L.flush(D,O)}):(this._flushFlag=D,this.write(o.alloc(0),"",O))},m.prototype.close=function(D){x(this,D),n.nextTick(F,this)},m.prototype._transform=function(D,O,L){var k,E=this._writableState,g=(E.ending||E.ended)&&(!D||E.length===D.length);return D===null||o.isBuffer(D)?this._handle?(g?k=this._finishFlushFlag:(k=this._flushFlag,D.length>=E.length&&(this._flushFlag=this._opts.flush||s.Z_NO_FLUSH)),void this._processChunk(D,k,L)):L(new Error("zlib binding closed")):L(new Error("invalid input"))},m.prototype._processChunk=function(D,O,L){var k=D&&D.length,E=this._chunkSize-this._offset,g=0,U=this,B=typeof L=="function";if(!B){var G,Y=[],K=0;this.on("error",function(W){G=W}),c(this._handle,"zlib binding closed");do var H=this._handle.writeSync(O,D,g,k,this._buffer,this._offset,E);while(!this._hadError&&j(H[0],H[1]));if(this._hadError)throw G;if(K>=u)throw x(this),new RangeError(b);var V=o.concat(Y,K);return x(this),V}c(this._handle,"zlib binding closed");var y=this._handle.write(O,D,g,k,this._buffer,this._offset,E);function j(W,ee){if(this&&(this.buffer=null,this.callback=null),!U._hadError){var X=E-ee;if(c(X>=0,"have should not go down"),X>0){var ne=U._buffer.slice(U._offset,U._offset+X);U._offset+=X,B?U.push(ne):(Y.push(ne),K+=ne.length)}if((ee===0||U._offset>=U._chunkSize)&&(E=U._chunkSize,U._offset=0,U._buffer=o.allocUnsafe(U._chunkSize)),ee===0){if(g+=k-W,k=W,!B)return!0;var ie=U._handle.write(O,D,g,k,U._buffer,U._offset,U._chunkSize);return ie.callback=j,void(ie.buffer=D)}if(!B)return!1;L()}}y.buffer=D,y.callback=j},i.inherits(R,m),i.inherits(d,m),i.inherits(I,m),i.inherits(Q,m),i.inherits(Z,m),i.inherits(h,m),i.inherits(p,m)}).call(this,r(2))},function(e,t,r){e.exports=o;var n=r(18).EventEmitter;function o(){n.call(this)}r(7)(o,n),o.Readable=r(27),o.Writable=r(71),o.Duplex=r(165),o.Transform=r(166),o.PassThrough=r(167),o.Stream=o,o.prototype.pipe=function(l,s){var i=this;function c(S){l.writable&&l.write(S)===!1&&i.pause&&i.pause()}function u(){i.readable&&i.resume&&i.resume()}i.on("data",c),l.on("drain",u),l._isStdio||s&&s.end===!1||(i.on("end",A),i.on("close",_));var b=!1;function A(){b||(b=!0,l.end())}function _(){b||(b=!0,typeof l.destroy=="function"&&l.destroy())}function v(S){if(f(),n.listenerCount(this,"error")===0)throw S}function f(){i.removeListener("data",c),l.removeListener("drain",u),i.removeListener("end",A),i.removeListener("close",_),i.removeListener("error",v),l.removeListener("error",v),i.removeListener("end",f),i.removeListener("close",f),l.removeListener("close",f)}return i.on("error",v),l.on("error",v),i.on("end",f),i.on("close",f),l.on("close",f),l.emit("pipe",i),l}},function(e,t){},function(e,t,r){var n=r(43).Buffer,o=r(163);e.exports=function(){function l(){(function(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(s){var i={data:s,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},l.prototype.unshift=function(s){var i={data:s,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},l.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(s){if(this.length===0)return"";for(var i=this.head,c=""+i.data;i=i.next;)c+=s+i.data;return c},l.prototype.concat=function(s){if(this.length===0)return n.alloc(0);if(this.length===1)return this.head.data;for(var i,c,u,b=n.allocUnsafe(s>>>0),A=this.head,_=0;A;)i=A.data,c=b,u=_,i.copy(c,u),_+=A.data.length,A=A.next;return b},l}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var l=o.inspect({length:this.length});return this.constructor.name+" "+l})},function(e,t){},function(e,t,r){e.exports=l;var n=r(70),o=r(14);function l(s){if(!(this instanceof l))return new l(s);n.call(this,s)}o.inherits=r(7),o.inherits(l,n),l.prototype._transform=function(s,i,c){c(null,s)}},function(e,t,r){e.exports=r(20)},function(e,t,r){e.exports=r(27).Transform},function(e,t,r){e.exports=r(27).PassThrough},function(e,t,r){(function(n,o){var l=r(72),s=r(170),i=r(171),c=r(174),u=r(177);for(var b in u)t[b]=u[b];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function A(_){if(typeof _!="number"||_<t.DEFLATE||_>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=_,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}A.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,l(this.init_done,"close before init"),l(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?i.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||c.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},A.prototype.write=function(_,v,f,S,w,P,N){return this._write(!0,_,v,f,S,w,P,N)},A.prototype.writeSync=function(_,v,f,S,w,P,N){return this._write(!1,_,v,f,S,w,P,N)},A.prototype._write=function(_,v,f,S,w,P,N,T){if(l.equal(arguments.length,8),l(this.init_done,"write before init"),l(this.mode!==t.NONE,"already finalized"),l.equal(!1,this.write_in_progress,"write already in progress"),l.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,l.equal(!1,v===void 0,"must provide flush value"),this.write_in_progress=!0,v!==t.Z_NO_FLUSH&&v!==t.Z_PARTIAL_FLUSH&&v!==t.Z_SYNC_FLUSH&&v!==t.Z_FULL_FLUSH&&v!==t.Z_FINISH&&v!==t.Z_BLOCK)throw new Error("Invalid flush value");if(f==null&&(f=n.alloc(0),w=0,S=0),this.strm.avail_in=w,this.strm.input=f,this.strm.next_in=S,this.strm.avail_out=T,this.strm.output=P,this.strm.next_out=N,this.flush=v,!_)return this._process(),this._checkError()?this._afterSync():void 0;var R=this;return o.nextTick(function(){R._process(),R._after()}),this},A.prototype._afterSync=function(){var _=this.strm.avail_out,v=this.strm.avail_in;return this.write_in_progress=!1,[v,_]},A.prototype._process=function(){var _=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=i.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(_=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(_===null)break;if(this.strm.input[_]!==31){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,_++,this.strm.avail_in===1)break;case 1:if(_===null)break;this.strm.input[_]===139?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=c.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=c.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=c.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=c.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},A.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},A.prototype._after=function(){if(this._checkError()){var _=this.strm.avail_out,v=this.strm.avail_in;this.write_in_progress=!1,this.callback(v,_),this.pending_close&&this.close()}},A.prototype._error=function(_){this.strm.msg&&(_=this.strm.msg),this.onerror(_,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},A.prototype.init=function(_,v,f,S,w){l(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),l(_>=8&&_<=15,"invalid windowBits"),l(v>=-1&&v<=9,"invalid compression level"),l(f>=1&&f<=9,"invalid memlevel"),l(S===t.Z_FILTERED||S===t.Z_HUFFMAN_ONLY||S===t.Z_RLE||S===t.Z_FIXED||S===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(v,_,f,S,w),this._setDictionary()},A.prototype.params=function(){throw new Error("deflateParams Not supported")},A.prototype.reset=function(){this._reset(),this._setDictionary()},A.prototype._init=function(_,v,f,S,w){switch(this.level=_,this.windowBits=v,this.memLevel=f,this.strategy=S,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new s,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=i.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=c.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=w,this.write_in_progress=!1,this.init_done=!0},A.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=i.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},A.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=i.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=c.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=A}).call(this,r(4).Buffer,r(2))},function(e,t,r){var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function s(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}e.exports=function(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},u=0;u<10;u++)c["_"+String.fromCharCode(u)]=u;if(Object.getOwnPropertyNames(c).map(function(A){return c[A]}).join("")!=="0123456789")return!1;var b={};return"abcdefghijklmnopqrst".split("").forEach(function(A){b[A]=A}),Object.keys(Object.assign({},b)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(i,c){for(var u,b,A=s(i),_=1;_<arguments.length;_++){for(var v in u=Object(arguments[_]))o.call(u,v)&&(A[v]=u[v]);if(n){b=n(u);for(var f=0;f<b.length;f++)l.call(u,b[f])&&(A[b[f]]=u[b[f]])}}return A}},function(e,t,r){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,r){var n,o=r(32),l=r(172),s=r(73),i=r(74),c=r(173);function u(h,p){return h.msg=c[p],p}function b(h){return(h<<1)-(h>4?9:0)}function A(h){for(var p=h.length;--p>=0;)h[p]=0}function _(h){var p=h.state,C=p.pending;C>h.avail_out&&(C=h.avail_out),C!==0&&(o.arraySet(h.output,p.pending_buf,p.pending_out,C,h.next_out),h.next_out+=C,p.pending_out+=C,h.total_out+=C,h.avail_out-=C,p.pending-=C,p.pending===0&&(p.pending_out=0))}function v(h,p){l._tr_flush_block(h,h.block_start>=0?h.block_start:-1,h.strstart-h.block_start,p),h.block_start=h.strstart,_(h.strm)}function f(h,p){h.pending_buf[h.pending++]=p}function S(h,p){h.pending_buf[h.pending++]=p>>>8&255,h.pending_buf[h.pending++]=255&p}function w(h,p){var C,m,x=h.max_chain_length,F=h.strstart,D=h.prev_length,O=h.nice_match,L=h.strstart>h.w_size-262?h.strstart-(h.w_size-262):0,k=h.window,E=h.w_mask,g=h.prev,U=h.strstart+258,B=k[F+D-1],G=k[F+D];h.prev_length>=h.good_match&&(x>>=2),O>h.lookahead&&(O=h.lookahead);do if(k[(C=p)+D]===G&&k[C+D-1]===B&&k[C]===k[F]&&k[++C]===k[F+1]){F+=2,C++;do;while(k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&k[++F]===k[++C]&&F<U);if(m=258-(U-F),F=U-258,m>D){if(h.match_start=p,D=m,m>=O)break;B=k[F+D-1],G=k[F+D]}}while((p=g[p&E])>L&&--x!=0);return D<=h.lookahead?D:h.lookahead}function P(h){var p,C,m,x,F,D,O,L,k,E,g=h.w_size;do{if(x=h.window_size-h.lookahead-h.strstart,h.strstart>=g+(g-262)){o.arraySet(h.window,h.window,g,g,0),h.match_start-=g,h.strstart-=g,h.block_start-=g,p=C=h.hash_size;do m=h.head[--p],h.head[p]=m>=g?m-g:0;while(--C);p=C=g;do m=h.prev[--p],h.prev[p]=m>=g?m-g:0;while(--C);x+=g}if(h.strm.avail_in===0)break;if(D=h.strm,O=h.window,L=h.strstart+h.lookahead,k=x,E=void 0,(E=D.avail_in)>k&&(E=k),C=E===0?0:(D.avail_in-=E,o.arraySet(O,D.input,D.next_in,E,L),D.state.wrap===1?D.adler=s(D.adler,O,E,L):D.state.wrap===2&&(D.adler=i(D.adler,O,E,L)),D.next_in+=E,D.total_in+=E,E),h.lookahead+=C,h.lookahead+h.insert>=3)for(F=h.strstart-h.insert,h.ins_h=h.window[F],h.ins_h=(h.ins_h<<h.hash_shift^h.window[F+1])&h.hash_mask;h.insert&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[F+3-1])&h.hash_mask,h.prev[F&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=F,F++,h.insert--,!(h.lookahead+h.insert<3)););}while(h.lookahead<262&&h.strm.avail_in!==0)}function N(h,p){for(var C,m;;){if(h.lookahead<262){if(P(h),h.lookahead<262&&p===0)return 1;if(h.lookahead===0)break}if(C=0,h.lookahead>=3&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,C=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),C!==0&&h.strstart-C<=h.w_size-262&&(h.match_length=w(h,C)),h.match_length>=3)if(m=l._tr_tally(h,h.strstart-h.match_start,h.match_length-3),h.lookahead-=h.match_length,h.match_length<=h.max_lazy_match&&h.lookahead>=3){h.match_length--;do h.strstart++,h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,C=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart;while(--h.match_length!=0);h.strstart++}else h.strstart+=h.match_length,h.match_length=0,h.ins_h=h.window[h.strstart],h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+1])&h.hash_mask;else m=l._tr_tally(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++;if(m&&(v(h,!1),h.strm.avail_out===0))return 1}return h.insert=h.strstart<2?h.strstart:2,p===4?(v(h,!0),h.strm.avail_out===0?3:4):h.last_lit&&(v(h,!1),h.strm.avail_out===0)?1:2}function T(h,p){for(var C,m,x;;){if(h.lookahead<262){if(P(h),h.lookahead<262&&p===0)return 1;if(h.lookahead===0)break}if(C=0,h.lookahead>=3&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,C=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),h.prev_length=h.match_length,h.prev_match=h.match_start,h.match_length=2,C!==0&&h.prev_length<h.max_lazy_match&&h.strstart-C<=h.w_size-262&&(h.match_length=w(h,C),h.match_length<=5&&(h.strategy===1||h.match_length===3&&h.strstart-h.match_start>4096)&&(h.match_length=2)),h.prev_length>=3&&h.match_length<=h.prev_length){x=h.strstart+h.lookahead-3,m=l._tr_tally(h,h.strstart-1-h.prev_match,h.prev_length-3),h.lookahead-=h.prev_length-1,h.prev_length-=2;do++h.strstart<=x&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,C=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart);while(--h.prev_length!=0);if(h.match_available=0,h.match_length=2,h.strstart++,m&&(v(h,!1),h.strm.avail_out===0))return 1}else if(h.match_available){if((m=l._tr_tally(h,0,h.window[h.strstart-1]))&&v(h,!1),h.strstart++,h.lookahead--,h.strm.avail_out===0)return 1}else h.match_available=1,h.strstart++,h.lookahead--}return h.match_available&&(m=l._tr_tally(h,0,h.window[h.strstart-1]),h.match_available=0),h.insert=h.strstart<2?h.strstart:2,p===4?(v(h,!0),h.strm.avail_out===0?3:4):h.last_lit&&(v(h,!1),h.strm.avail_out===0)?1:2}function R(h,p,C,m,x){this.good_length=h,this.max_lazy=p,this.nice_length=C,this.max_chain=m,this.func=x}function d(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),A(this.dyn_ltree),A(this.dyn_dtree),A(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),A(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),A(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function I(h){var p;return h&&h.state?(h.total_in=h.total_out=0,h.data_type=2,(p=h.state).pending=0,p.pending_out=0,p.wrap<0&&(p.wrap=-p.wrap),p.status=p.wrap?42:113,h.adler=p.wrap===2?0:1,p.last_flush=0,l._tr_init(p),0):u(h,-2)}function Q(h){var p,C=I(h);return C===0&&((p=h.state).window_size=2*p.w_size,A(p.head),p.max_lazy_match=n[p.level].max_lazy,p.good_match=n[p.level].good_length,p.nice_match=n[p.level].nice_length,p.max_chain_length=n[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=2,p.match_available=0,p.ins_h=0),C}function Z(h,p,C,m,x,F){if(!h)return-2;var D=1;if(p===-1&&(p=6),m<0?(D=0,m=-m):m>15&&(D=2,m-=16),x<1||x>9||C!==8||m<8||m>15||p<0||p>9||F<0||F>4)return u(h,-2);m===8&&(m=9);var O=new d;return h.state=O,O.strm=h,O.wrap=D,O.gzhead=null,O.w_bits=m,O.w_size=1<<O.w_bits,O.w_mask=O.w_size-1,O.hash_bits=x+7,O.hash_size=1<<O.hash_bits,O.hash_mask=O.hash_size-1,O.hash_shift=~~((O.hash_bits+3-1)/3),O.window=new o.Buf8(2*O.w_size),O.head=new o.Buf16(O.hash_size),O.prev=new o.Buf16(O.w_size),O.lit_bufsize=1<<x+6,O.pending_buf_size=4*O.lit_bufsize,O.pending_buf=new o.Buf8(O.pending_buf_size),O.d_buf=1*O.lit_bufsize,O.l_buf=3*O.lit_bufsize,O.level=p,O.strategy=F,O.method=C,Q(h)}n=[new R(0,0,0,0,function(h,p){var C=65535;for(C>h.pending_buf_size-5&&(C=h.pending_buf_size-5);;){if(h.lookahead<=1){if(P(h),h.lookahead===0&&p===0)return 1;if(h.lookahead===0)break}h.strstart+=h.lookahead,h.lookahead=0;var m=h.block_start+C;if((h.strstart===0||h.strstart>=m)&&(h.lookahead=h.strstart-m,h.strstart=m,v(h,!1),h.strm.avail_out===0)||h.strstart-h.block_start>=h.w_size-262&&(v(h,!1),h.strm.avail_out===0))return 1}return h.insert=0,p===4?(v(h,!0),h.strm.avail_out===0?3:4):(h.strstart>h.block_start&&(v(h,!1),h.strm.avail_out),1)}),new R(4,4,8,4,N),new R(4,5,16,8,N),new R(4,6,32,32,N),new R(4,4,16,16,T),new R(8,16,32,32,T),new R(8,16,128,128,T),new R(8,32,128,256,T),new R(32,128,258,1024,T),new R(32,258,258,4096,T)],t.deflateInit=function(h,p){return Z(h,p,8,15,8,0)},t.deflateInit2=Z,t.deflateReset=Q,t.deflateResetKeep=I,t.deflateSetHeader=function(h,p){return h&&h.state?h.state.wrap!==2?-2:(h.state.gzhead=p,0):-2},t.deflate=function(h,p){var C,m,x,F;if(!h||!h.state||p>5||p<0)return h?u(h,-2):-2;if(m=h.state,!h.output||!h.input&&h.avail_in!==0||m.status===666&&p!==4)return u(h,h.avail_out===0?-5:-2);if(m.strm=h,C=m.last_flush,m.last_flush=p,m.status===42)if(m.wrap===2)h.adler=0,f(m,31),f(m,139),f(m,8),m.gzhead?(f(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),f(m,255&m.gzhead.time),f(m,m.gzhead.time>>8&255),f(m,m.gzhead.time>>16&255),f(m,m.gzhead.time>>24&255),f(m,m.level===9?2:m.strategy>=2||m.level<2?4:0),f(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(f(m,255&m.gzhead.extra.length),f(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(h.adler=i(h.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(f(m,0),f(m,0),f(m,0),f(m,0),f(m,0),f(m,m.level===9?2:m.strategy>=2||m.level<2?4:0),f(m,3),m.status=113);else{var D=8+(m.w_bits-8<<4)<<8;D|=(m.strategy>=2||m.level<2?0:m.level<6?1:m.level===6?2:3)<<6,m.strstart!==0&&(D|=32),D+=31-D%31,m.status=113,S(m,D),m.strstart!==0&&(S(m,h.adler>>>16),S(m,65535&h.adler)),h.adler=1}if(m.status===69)if(m.gzhead.extra){for(x=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),_(h),x=m.pending,m.pending!==m.pending_buf_size));)f(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(m.status===73)if(m.gzhead.name){x=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),_(h),x=m.pending,m.pending===m.pending_buf_size)){F=1;break}F=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0,f(m,F)}while(F!==0);m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),F===0&&(m.gzindex=0,m.status=91)}else m.status=91;if(m.status===91)if(m.gzhead.comment){x=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),_(h),x=m.pending,m.pending===m.pending_buf_size)){F=1;break}F=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0,f(m,F)}while(F!==0);m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),F===0&&(m.status=103)}else m.status=103;if(m.status===103&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&_(h),m.pending+2<=m.pending_buf_size&&(f(m,255&h.adler),f(m,h.adler>>8&255),h.adler=0,m.status=113)):m.status=113),m.pending!==0){if(_(h),h.avail_out===0)return m.last_flush=-1,0}else if(h.avail_in===0&&b(p)<=b(C)&&p!==4)return u(h,-5);if(m.status===666&&h.avail_in!==0)return u(h,-5);if(h.avail_in!==0||m.lookahead!==0||p!==0&&m.status!==666){var O=m.strategy===2?function(L,k){for(var E;;){if(L.lookahead===0&&(P(L),L.lookahead===0)){if(k===0)return 1;break}if(L.match_length=0,E=l._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++,E&&(v(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,k===4?(v(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(v(L,!1),L.strm.avail_out===0)?1:2}(m,p):m.strategy===3?function(L,k){for(var E,g,U,B,G=L.window;;){if(L.lookahead<=258){if(P(L),L.lookahead<=258&&k===0)return 1;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=3&&L.strstart>0&&(g=G[U=L.strstart-1])===G[++U]&&g===G[++U]&&g===G[++U]){B=L.strstart+258;do;while(g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&U<B);L.match_length=258-(B-U),L.match_length>L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=3?(E=l._tr_tally(L,1,L.match_length-3),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(E=l._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++),E&&(v(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,k===4?(v(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(v(L,!1),L.strm.avail_out===0)?1:2}(m,p):n[m.level].func(m,p);if(O!==3&&O!==4||(m.status=666),O===1||O===3)return h.avail_out===0&&(m.last_flush=-1),0;if(O===2&&(p===1?l._tr_align(m):p!==5&&(l._tr_stored_block(m,0,0,!1),p===3&&(A(m.head),m.lookahead===0&&(m.strstart=0,m.block_start=0,m.insert=0))),_(h),h.avail_out===0))return m.last_flush=-1,0}return p!==4?0:m.wrap<=0?1:(m.wrap===2?(f(m,255&h.adler),f(m,h.adler>>8&255),f(m,h.adler>>16&255),f(m,h.adler>>24&255),f(m,255&h.total_in),f(m,h.total_in>>8&255),f(m,h.total_in>>16&255),f(m,h.total_in>>24&255)):(S(m,h.adler>>>16),S(m,65535&h.adler)),_(h),m.wrap>0&&(m.wrap=-m.wrap),m.pending!==0?0:1)},t.deflateEnd=function(h){var p;return h&&h.state?(p=h.state.status)!==42&&p!==69&&p!==73&&p!==91&&p!==103&&p!==113&&p!==666?u(h,-2):(h.state=null,p===113?u(h,-3):0):-2},t.deflateSetDictionary=function(h,p){var C,m,x,F,D,O,L,k,E=p.length;if(!h||!h.state||(F=(C=h.state).wrap)===2||F===1&&C.status!==42||C.lookahead)return-2;for(F===1&&(h.adler=s(h.adler,p,E,0)),C.wrap=0,E>=C.w_size&&(F===0&&(A(C.head),C.strstart=0,C.block_start=0,C.insert=0),k=new o.Buf8(C.w_size),o.arraySet(k,p,E-C.w_size,C.w_size,0),p=k,E=C.w_size),D=h.avail_in,O=h.next_in,L=h.input,h.avail_in=E,h.next_in=0,h.input=p,P(C);C.lookahead>=3;){m=C.strstart,x=C.lookahead-2;do C.ins_h=(C.ins_h<<C.hash_shift^C.window[m+3-1])&C.hash_mask,C.prev[m&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=m,m++;while(--x);C.strstart=m,C.lookahead=2,P(C)}return C.strstart+=C.lookahead,C.block_start=C.strstart,C.insert=C.lookahead,C.lookahead=0,C.match_length=C.prev_length=2,C.match_available=0,h.next_in=O,h.input=L,h.avail_in=D,C.wrap=F,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,r){var n=r(32);function o(g){for(var U=g.length;--U>=0;)g[U]=0}var l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);o(u);var b=new Array(60);o(b);var A=new Array(512);o(A);var _=new Array(256);o(_);var v=new Array(29);o(v);var f,S,w,P=new Array(30);function N(g,U,B,G,Y){this.static_tree=g,this.extra_bits=U,this.extra_base=B,this.elems=G,this.max_length=Y,this.has_stree=g&&g.length}function T(g,U){this.dyn_tree=g,this.max_code=0,this.stat_desc=U}function R(g){return g<256?A[g]:A[256+(g>>>7)]}function d(g,U){g.pending_buf[g.pending++]=255&U,g.pending_buf[g.pending++]=U>>>8&255}function I(g,U,B){g.bi_valid>16-B?(g.bi_buf|=U<<g.bi_valid&65535,d(g,g.bi_buf),g.bi_buf=U>>16-g.bi_valid,g.bi_valid+=B-16):(g.bi_buf|=U<<g.bi_valid&65535,g.bi_valid+=B)}function Q(g,U,B){I(g,B[2*U],B[2*U+1])}function Z(g,U){var B=0;do B|=1&g,g>>>=1,B<<=1;while(--U>0);return B>>>1}function h(g,U,B){var G,Y,K=new Array(16),H=0;for(G=1;G<=15;G++)K[G]=H=H+B[G-1]<<1;for(Y=0;Y<=U;Y++){var V=g[2*Y+1];V!==0&&(g[2*Y]=Z(K[V]++,V))}}function p(g){var U;for(U=0;U<286;U++)g.dyn_ltree[2*U]=0;for(U=0;U<30;U++)g.dyn_dtree[2*U]=0;for(U=0;U<19;U++)g.bl_tree[2*U]=0;g.dyn_ltree[512]=1,g.opt_len=g.static_len=0,g.last_lit=g.matches=0}function C(g){g.bi_valid>8?d(g,g.bi_buf):g.bi_valid>0&&(g.pending_buf[g.pending++]=g.bi_buf),g.bi_buf=0,g.bi_valid=0}function m(g,U,B,G){var Y=2*U,K=2*B;return g[Y]<g[K]||g[Y]===g[K]&&G[U]<=G[B]}function x(g,U,B){for(var G=g.heap[B],Y=B<<1;Y<=g.heap_len&&(Y<g.heap_len&&m(U,g.heap[Y+1],g.heap[Y],g.depth)&&Y++,!m(U,G,g.heap[Y],g.depth));)g.heap[B]=g.heap[Y],B=Y,Y<<=1;g.heap[B]=G}function F(g,U,B){var G,Y,K,H,V=0;if(g.last_lit!==0)do G=g.pending_buf[g.d_buf+2*V]<<8|g.pending_buf[g.d_buf+2*V+1],Y=g.pending_buf[g.l_buf+V],V++,G===0?Q(g,Y,U):(Q(g,(K=_[Y])+256+1,U),(H=l[K])!==0&&I(g,Y-=v[K],H),Q(g,K=R(--G),B),(H=s[K])!==0&&I(g,G-=P[K],H));while(V<g.last_lit);Q(g,256,U)}function D(g,U){var B,G,Y,K=U.dyn_tree,H=U.stat_desc.static_tree,V=U.stat_desc.has_stree,y=U.stat_desc.elems,j=-1;for(g.heap_len=0,g.heap_max=573,B=0;B<y;B++)K[2*B]!==0?(g.heap[++g.heap_len]=j=B,g.depth[B]=0):K[2*B+1]=0;for(;g.heap_len<2;)K[2*(Y=g.heap[++g.heap_len]=j<2?++j:0)]=1,g.depth[Y]=0,g.opt_len--,V&&(g.static_len-=H[2*Y+1]);for(U.max_code=j,B=g.heap_len>>1;B>=1;B--)x(g,K,B);Y=y;do B=g.heap[1],g.heap[1]=g.heap[g.heap_len--],x(g,K,1),G=g.heap[1],g.heap[--g.heap_max]=B,g.heap[--g.heap_max]=G,K[2*Y]=K[2*B]+K[2*G],g.depth[Y]=(g.depth[B]>=g.depth[G]?g.depth[B]:g.depth[G])+1,K[2*B+1]=K[2*G+1]=Y,g.heap[1]=Y++,x(g,K,1);while(g.heap_len>=2);g.heap[--g.heap_max]=g.heap[1],function(W,ee){var X,ne,ie,he,Se,we,Ee=ee.dyn_tree,ye=ee.max_code,q=ee.stat_desc.static_tree,$=ee.stat_desc.has_stree,te=ee.stat_desc.extra_bits,ue=ee.stat_desc.extra_base,ae=ee.stat_desc.max_length,de=0;for(he=0;he<=15;he++)W.bl_count[he]=0;for(Ee[2*W.heap[W.heap_max]+1]=0,X=W.heap_max+1;X<573;X++)(he=Ee[2*Ee[2*(ne=W.heap[X])+1]+1]+1)>ae&&(he=ae,de++),Ee[2*ne+1]=he,ne>ye||(W.bl_count[he]++,Se=0,ne>=ue&&(Se=te[ne-ue]),we=Ee[2*ne],W.opt_len+=we*(he+Se),$&&(W.static_len+=we*(q[2*ne+1]+Se)));if(de!==0){do{for(he=ae-1;W.bl_count[he]===0;)he--;W.bl_count[he]--,W.bl_count[he+1]+=2,W.bl_count[ae]--,de-=2}while(de>0);for(he=ae;he!==0;he--)for(ne=W.bl_count[he];ne!==0;)(ie=W.heap[--X])>ye||(Ee[2*ie+1]!==he&&(W.opt_len+=(he-Ee[2*ie+1])*Ee[2*ie],Ee[2*ie+1]=he),ne--)}}(g,U),h(K,j,g.bl_count)}function O(g,U,B){var G,Y,K=-1,H=U[1],V=0,y=7,j=4;for(H===0&&(y=138,j=3),U[2*(B+1)+1]=65535,G=0;G<=B;G++)Y=H,H=U[2*(G+1)+1],++V<y&&Y===H||(V<j?g.bl_tree[2*Y]+=V:Y!==0?(Y!==K&&g.bl_tree[2*Y]++,g.bl_tree[32]++):V<=10?g.bl_tree[34]++:g.bl_tree[36]++,V=0,K=Y,H===0?(y=138,j=3):Y===H?(y=6,j=3):(y=7,j=4))}function L(g,U,B){var G,Y,K=-1,H=U[1],V=0,y=7,j=4;for(H===0&&(y=138,j=3),G=0;G<=B;G++)if(Y=H,H=U[2*(G+1)+1],!(++V<y&&Y===H)){if(V<j)do Q(g,Y,g.bl_tree);while(--V!=0);else Y!==0?(Y!==K&&(Q(g,Y,g.bl_tree),V--),Q(g,16,g.bl_tree),I(g,V-3,2)):V<=10?(Q(g,17,g.bl_tree),I(g,V-3,3)):(Q(g,18,g.bl_tree),I(g,V-11,7));V=0,K=Y,H===0?(y=138,j=3):Y===H?(y=6,j=3):(y=7,j=4)}}o(P);var k=!1;function E(g,U,B,G){I(g,0+(G?1:0),3),function(Y,K,H,V){C(Y),V&&(d(Y,H),d(Y,~H)),n.arraySet(Y.pending_buf,Y.window,K,H,Y.pending),Y.pending+=H}(g,U,B,!0)}t._tr_init=function(g){k||(function(){var U,B,G,Y,K,H=new Array(16);for(G=0,Y=0;Y<28;Y++)for(v[Y]=G,U=0;U<1<<l[Y];U++)_[G++]=Y;for(_[G-1]=Y,K=0,Y=0;Y<16;Y++)for(P[Y]=K,U=0;U<1<<s[Y];U++)A[K++]=Y;for(K>>=7;Y<30;Y++)for(P[Y]=K<<7,U=0;U<1<<s[Y]-7;U++)A[256+K++]=Y;for(B=0;B<=15;B++)H[B]=0;for(U=0;U<=143;)u[2*U+1]=8,U++,H[8]++;for(;U<=255;)u[2*U+1]=9,U++,H[9]++;for(;U<=279;)u[2*U+1]=7,U++,H[7]++;for(;U<=287;)u[2*U+1]=8,U++,H[8]++;for(h(u,287,H),U=0;U<30;U++)b[2*U+1]=5,b[2*U]=Z(U,5);f=new N(u,l,257,286,15),S=new N(b,s,0,30,15),w=new N(new Array(0),i,0,19,7)}(),k=!0),g.l_desc=new T(g.dyn_ltree,f),g.d_desc=new T(g.dyn_dtree,S),g.bl_desc=new T(g.bl_tree,w),g.bi_buf=0,g.bi_valid=0,p(g)},t._tr_stored_block=E,t._tr_flush_block=function(g,U,B,G){var Y,K,H=0;g.level>0?(g.strm.data_type===2&&(g.strm.data_type=function(V){var y,j=4093624447;for(y=0;y<=31;y++,j>>>=1)if(1&j&&V.dyn_ltree[2*y]!==0)return 0;if(V.dyn_ltree[18]!==0||V.dyn_ltree[20]!==0||V.dyn_ltree[26]!==0)return 1;for(y=32;y<256;y++)if(V.dyn_ltree[2*y]!==0)return 1;return 0}(g)),D(g,g.l_desc),D(g,g.d_desc),H=function(V){var y;for(O(V,V.dyn_ltree,V.l_desc.max_code),O(V,V.dyn_dtree,V.d_desc.max_code),D(V,V.bl_desc),y=18;y>=3&&V.bl_tree[2*c[y]+1]===0;y--);return V.opt_len+=3*(y+1)+5+5+4,y}(g),Y=g.opt_len+3+7>>>3,(K=g.static_len+3+7>>>3)<=Y&&(Y=K)):Y=K=B+5,B+4<=Y&&U!==-1?E(g,U,B,G):g.strategy===4||K===Y?(I(g,2+(G?1:0),3),F(g,u,b)):(I(g,4+(G?1:0),3),function(V,y,j,W){var ee;for(I(V,y-257,5),I(V,j-1,5),I(V,W-4,4),ee=0;ee<W;ee++)I(V,V.bl_tree[2*c[ee]+1],3);L(V,V.dyn_ltree,y-1),L(V,V.dyn_dtree,j-1)}(g,g.l_desc.max_code+1,g.d_desc.max_code+1,H+1),F(g,g.dyn_ltree,g.dyn_dtree)),p(g),G&&C(g)},t._tr_tally=function(g,U,B){return g.pending_buf[g.d_buf+2*g.last_lit]=U>>>8&255,g.pending_buf[g.d_buf+2*g.last_lit+1]=255&U,g.pending_buf[g.l_buf+g.last_lit]=255&B,g.last_lit++,U===0?g.dyn_ltree[2*B]++:(g.matches++,U--,g.dyn_ltree[2*(_[B]+256+1)]++,g.dyn_dtree[2*R(U)]++),g.last_lit===g.lit_bufsize-1},t._tr_align=function(g){I(g,2,3),Q(g,256,u),function(U){U.bi_valid===16?(d(U,U.bi_buf),U.bi_buf=0,U.bi_valid=0):U.bi_valid>=8&&(U.pending_buf[U.pending++]=255&U.bi_buf,U.bi_buf>>=8,U.bi_valid-=8)}(g)}},function(e,t,r){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){var n=r(32),o=r(73),l=r(74),s=r(175),i=r(176);function c(T){return(T>>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(T){var R;return T&&T.state?(R=T.state,T.total_in=T.total_out=R.total=0,T.msg="",R.wrap&&(T.adler=1&R.wrap),R.mode=1,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new n.Buf32(852),R.distcode=R.distdyn=new n.Buf32(592),R.sane=1,R.back=-1,0):-2}function A(T){var R;return T&&T.state?((R=T.state).wsize=0,R.whave=0,R.wnext=0,b(T)):-2}function _(T,R){var d,I;return T&&T.state?(I=T.state,R<0?(d=0,R=-R):(d=1+(R>>4),R<48&&(R&=15)),R&&(R<8||R>15)?-2:(I.window!==null&&I.wbits!==R&&(I.window=null),I.wrap=d,I.wbits=R,A(T))):-2}function v(T,R){var d,I;return T?(I=new u,T.state=I,I.window=null,(d=_(T,R))!==0&&(T.state=null),d):-2}var f,S,w=!0;function P(T){if(w){var R;for(f=new n.Buf32(512),S=new n.Buf32(32),R=0;R<144;)T.lens[R++]=8;for(;R<256;)T.lens[R++]=9;for(;R<280;)T.lens[R++]=7;for(;R<288;)T.lens[R++]=8;for(i(1,T.lens,0,288,f,0,T.work,{bits:9}),R=0;R<32;)T.lens[R++]=5;i(2,T.lens,0,32,S,0,T.work,{bits:5}),w=!1}T.lencode=f,T.lenbits=9,T.distcode=S,T.distbits=5}function N(T,R,d,I){var Q,Z=T.state;return Z.window===null&&(Z.wsize=1<<Z.wbits,Z.wnext=0,Z.whave=0,Z.window=new n.Buf8(Z.wsize)),I>=Z.wsize?(n.arraySet(Z.window,R,d-Z.wsize,Z.wsize,0),Z.wnext=0,Z.whave=Z.wsize):((Q=Z.wsize-Z.wnext)>I&&(Q=I),n.arraySet(Z.window,R,d-I,Q,Z.wnext),(I-=Q)?(n.arraySet(Z.window,R,d-I,I,0),Z.wnext=I,Z.whave=Z.wsize):(Z.wnext+=Q,Z.wnext===Z.wsize&&(Z.wnext=0),Z.whave<Z.wsize&&(Z.whave+=Q))),0}t.inflateReset=A,t.inflateReset2=_,t.inflateResetKeep=b,t.inflateInit=function(T){return v(T,15)},t.inflateInit2=v,t.inflate=function(T,R){var d,I,Q,Z,h,p,C,m,x,F,D,O,L,k,E,g,U,B,G,Y,K,H,V,y,j=0,W=new n.Buf8(4),ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!T||!T.state||!T.output||!T.input&&T.avail_in!==0)return-2;(d=T.state).mode===12&&(d.mode=13),h=T.next_out,Q=T.output,C=T.avail_out,Z=T.next_in,I=T.input,p=T.avail_in,m=d.hold,x=d.bits,F=p,D=C,H=0;e:for(;;)switch(d.mode){case 1:if(d.wrap===0){d.mode=13;break}for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(2&d.wrap&&m===35615){d.check=0,W[0]=255&m,W[1]=m>>>8&255,d.check=l(d.check,W,2,0),m=0,x=0,d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&m)<<8)+(m>>8))%31){T.msg="incorrect header check",d.mode=30;break}if((15&m)!=8){T.msg="unknown compression method",d.mode=30;break}if(x-=4,K=8+(15&(m>>>=4)),d.wbits===0)d.wbits=K;else if(K>d.wbits){T.msg="invalid window size",d.mode=30;break}d.dmax=1<<K,T.adler=d.check=1,d.mode=512&m?10:12,m=0,x=0;break;case 2:for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(d.flags=m,(255&d.flags)!=8){T.msg="unknown compression method",d.mode=30;break}if(57344&d.flags){T.msg="unknown header flags set",d.mode=30;break}d.head&&(d.head.text=m>>8&1),512&d.flags&&(W[0]=255&m,W[1]=m>>>8&255,d.check=l(d.check,W,2,0)),m=0,x=0,d.mode=3;case 3:for(;x<32;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.head&&(d.head.time=m),512&d.flags&&(W[0]=255&m,W[1]=m>>>8&255,W[2]=m>>>16&255,W[3]=m>>>24&255,d.check=l(d.check,W,4,0)),m=0,x=0,d.mode=4;case 4:for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.head&&(d.head.xflags=255&m,d.head.os=m>>8),512&d.flags&&(W[0]=255&m,W[1]=m>>>8&255,d.check=l(d.check,W,2,0)),m=0,x=0,d.mode=5;case 5:if(1024&d.flags){for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.length=m,d.head&&(d.head.extra_len=m),512&d.flags&&(W[0]=255&m,W[1]=m>>>8&255,d.check=l(d.check,W,2,0)),m=0,x=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&((O=d.length)>p&&(O=p),O&&(d.head&&(K=d.head.extra_len-d.length,d.head.extra||(d.head.extra=new Array(d.head.extra_len)),n.arraySet(d.head.extra,I,Z,O,K)),512&d.flags&&(d.check=l(d.check,I,O,Z)),p-=O,Z+=O,d.length-=O),d.length))break e;d.length=0,d.mode=7;case 7:if(2048&d.flags){if(p===0)break e;O=0;do K=I[Z+O++],d.head&&K&&d.length<65536&&(d.head.name+=String.fromCharCode(K));while(K&&O<p);if(512&d.flags&&(d.check=l(d.check,I,O,Z)),p-=O,Z+=O,K)break e}else d.head&&(d.head.name=null);d.length=0,d.mode=8;case 8:if(4096&d.flags){if(p===0)break e;O=0;do K=I[Z+O++],d.head&&K&&d.length<65536&&(d.head.comment+=String.fromCharCode(K));while(K&&O<p);if(512&d.flags&&(d.check=l(d.check,I,O,Z)),p-=O,Z+=O,K)break e}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(m!==(65535&d.check)){T.msg="header crc mismatch",d.mode=30;break}m=0,x=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0),T.adler=d.check=0,d.mode=12;break;case 10:for(;x<32;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}T.adler=d.check=c(m),m=0,x=0,d.mode=11;case 11:if(d.havedict===0)return T.next_out=h,T.avail_out=C,T.next_in=Z,T.avail_in=p,d.hold=m,d.bits=x,2;T.adler=d.check=1,d.mode=12;case 12:if(R===5||R===6)break e;case 13:if(d.last){m>>>=7&x,x-=7&x,d.mode=27;break}for(;x<3;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}switch(d.last=1&m,x-=1,3&(m>>>=1)){case 0:d.mode=14;break;case 1:if(P(d),d.mode=20,R===6){m>>>=2,x-=2;break e}break;case 2:d.mode=17;break;case 3:T.msg="invalid block type",d.mode=30}m>>>=2,x-=2;break;case 14:for(m>>>=7&x,x-=7&x;x<32;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if((65535&m)!=(m>>>16^65535)){T.msg="invalid stored block lengths",d.mode=30;break}if(d.length=65535&m,m=0,x=0,d.mode=15,R===6)break e;case 15:d.mode=16;case 16:if(O=d.length){if(O>p&&(O=p),O>C&&(O=C),O===0)break e;n.arraySet(Q,I,Z,O,h),p-=O,Z+=O,C-=O,h+=O,d.length-=O;break}d.mode=12;break;case 17:for(;x<14;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(d.nlen=257+(31&m),m>>>=5,x-=5,d.ndist=1+(31&m),m>>>=5,x-=5,d.ncode=4+(15&m),m>>>=4,x-=4,d.nlen>286||d.ndist>30){T.msg="too many length or distance symbols",d.mode=30;break}d.have=0,d.mode=18;case 18:for(;d.have<d.ncode;){for(;x<3;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.lens[ee[d.have++]]=7&m,m>>>=3,x-=3}for(;d.have<19;)d.lens[ee[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,V={bits:d.lenbits},H=i(0,d.lens,0,19,d.lencode,0,d.work,V),d.lenbits=V.bits,H){T.msg="invalid code lengths set",d.mode=30;break}d.have=0,d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;g=(j=d.lencode[m&(1<<d.lenbits)-1])>>>16&255,U=65535&j,!((E=j>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(U<16)m>>>=E,x-=E,d.lens[d.have++]=U;else{if(U===16){for(y=E+2;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(m>>>=E,x-=E,d.have===0){T.msg="invalid bit length repeat",d.mode=30;break}K=d.lens[d.have-1],O=3+(3&m),m>>>=2,x-=2}else if(U===17){for(y=E+3;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}x-=E,K=0,O=3+(7&(m>>>=E)),m>>>=3,x-=3}else{for(y=E+7;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}x-=E,K=0,O=11+(127&(m>>>=E)),m>>>=7,x-=7}if(d.have+O>d.nlen+d.ndist){T.msg="invalid bit length repeat",d.mode=30;break}for(;O--;)d.lens[d.have++]=K}}if(d.mode===30)break;if(d.lens[256]===0){T.msg="invalid code -- missing end-of-block",d.mode=30;break}if(d.lenbits=9,V={bits:d.lenbits},H=i(1,d.lens,0,d.nlen,d.lencode,0,d.work,V),d.lenbits=V.bits,H){T.msg="invalid literal/lengths set",d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,V={bits:d.distbits},H=i(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,V),d.distbits=V.bits,H){T.msg="invalid distances set",d.mode=30;break}if(d.mode=20,R===6)break e;case 20:d.mode=21;case 21:if(p>=6&&C>=258){T.next_out=h,T.avail_out=C,T.next_in=Z,T.avail_in=p,d.hold=m,d.bits=x,s(T,D),h=T.next_out,Q=T.output,C=T.avail_out,Z=T.next_in,I=T.input,p=T.avail_in,m=d.hold,x=d.bits,d.mode===12&&(d.back=-1);break}for(d.back=0;g=(j=d.lencode[m&(1<<d.lenbits)-1])>>>16&255,U=65535&j,!((E=j>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(g&&(240&g)==0){for(B=E,G=g,Y=U;g=(j=d.lencode[Y+((m&(1<<B+G)-1)>>B)])>>>16&255,U=65535&j,!(B+(E=j>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}m>>>=B,x-=B,d.back+=B}if(m>>>=E,x-=E,d.back+=E,d.length=U,g===0){d.mode=26;break}if(32&g){d.back=-1,d.mode=12;break}if(64&g){T.msg="invalid literal/length code",d.mode=30;break}d.extra=15&g,d.mode=22;case 22:if(d.extra){for(y=d.extra;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.length+=m&(1<<d.extra)-1,m>>>=d.extra,x-=d.extra,d.back+=d.extra}d.was=d.length,d.mode=23;case 23:for(;g=(j=d.distcode[m&(1<<d.distbits)-1])>>>16&255,U=65535&j,!((E=j>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if((240&g)==0){for(B=E,G=g,Y=U;g=(j=d.distcode[Y+((m&(1<<B+G)-1)>>B)])>>>16&255,U=65535&j,!(B+(E=j>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}m>>>=B,x-=B,d.back+=B}if(m>>>=E,x-=E,d.back+=E,64&g){T.msg="invalid distance code",d.mode=30;break}d.offset=U,d.extra=15&g,d.mode=24;case 24:if(d.extra){for(y=d.extra;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.offset+=m&(1<<d.extra)-1,m>>>=d.extra,x-=d.extra,d.back+=d.extra}if(d.offset>d.dmax){T.msg="invalid distance too far back",d.mode=30;break}d.mode=25;case 25:if(C===0)break e;if(O=D-C,d.offset>O){if((O=d.offset-O)>d.whave&&d.sane){T.msg="invalid distance too far back",d.mode=30;break}O>d.wnext?(O-=d.wnext,L=d.wsize-O):L=d.wnext-O,O>d.length&&(O=d.length),k=d.window}else k=Q,L=h-d.offset,O=d.length;O>C&&(O=C),C-=O,d.length-=O;do Q[h++]=k[L++];while(--O);d.length===0&&(d.mode=21);break;case 26:if(C===0)break e;Q[h++]=d.length,C--,d.mode=21;break;case 27:if(d.wrap){for(;x<32;){if(p===0)break e;p--,m|=I[Z++]<<x,x+=8}if(D-=C,T.total_out+=D,d.total+=D,D&&(T.adler=d.check=d.flags?l(d.check,Q,D,h-D):o(d.check,Q,D,h-D)),D=C,(d.flags?m:c(m))!==d.check){T.msg="incorrect data check",d.mode=30;break}m=0,x=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;x<32;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(m!==(4294967295&d.total)){T.msg="incorrect length check",d.mode=30;break}m=0,x=0}d.mode=29;case 29:H=1;break e;case 30:H=-3;break e;case 31:return-4;case 32:default:return-2}return T.next_out=h,T.avail_out=C,T.next_in=Z,T.avail_in=p,d.hold=m,d.bits=x,(d.wsize||D!==T.avail_out&&d.mode<30&&(d.mode<27||R!==4))&&N(T,T.output,T.next_out,D-T.avail_out)?(d.mode=31,-4):(F-=T.avail_in,D-=T.avail_out,T.total_in+=F,T.total_out+=D,d.total+=D,d.wrap&&D&&(T.adler=d.check=d.flags?l(d.check,Q,D,T.next_out-D):o(d.check,Q,D,T.next_out-D)),T.data_type=d.bits+(d.last?64:0)+(d.mode===12?128:0)+(d.mode===20||d.mode===15?256:0),(F===0&&D===0||R===4)&&H===0&&(H=-5),H)},t.inflateEnd=function(T){if(!T||!T.state)return-2;var R=T.state;return R.window&&(R.window=null),T.state=null,0},t.inflateGetHeader=function(T,R){var d;return T&&T.state?(2&(d=T.state).wrap)==0?-2:(d.head=R,R.done=!1,0):-2},t.inflateSetDictionary=function(T,R){var d,I=R.length;return T&&T.state?(d=T.state).wrap!==0&&d.mode!==11?-2:d.mode===11&&o(1,R,I,0)!==d.check?-3:N(T,R,I,I)?(d.mode=31,-4):(d.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,r){e.exports=function(n,o){var l,s,i,c,u,b,A,_,v,f,S,w,P,N,T,R,d,I,Q,Z,h,p,C,m,x;l=n.state,s=n.next_in,m=n.input,i=s+(n.avail_in-5),c=n.next_out,x=n.output,u=c-(o-n.avail_out),b=c+(n.avail_out-257),A=l.dmax,_=l.wsize,v=l.whave,f=l.wnext,S=l.window,w=l.hold,P=l.bits,N=l.lencode,T=l.distcode,R=(1<<l.lenbits)-1,d=(1<<l.distbits)-1;e:do{P<15&&(w+=m[s++]<<P,P+=8,w+=m[s++]<<P,P+=8),I=N[w&R];t:for(;;){if(w>>>=Q=I>>>24,P-=Q,(Q=I>>>16&255)===0)x[c++]=65535&I;else{if(!(16&Q)){if((64&Q)==0){I=N[(65535&I)+(w&(1<<Q)-1)];continue t}if(32&Q){l.mode=12;break e}n.msg="invalid literal/length code",l.mode=30;break e}Z=65535&I,(Q&=15)&&(P<Q&&(w+=m[s++]<<P,P+=8),Z+=w&(1<<Q)-1,w>>>=Q,P-=Q),P<15&&(w+=m[s++]<<P,P+=8,w+=m[s++]<<P,P+=8),I=T[w&d];r:for(;;){if(w>>>=Q=I>>>24,P-=Q,!(16&(Q=I>>>16&255))){if((64&Q)==0){I=T[(65535&I)+(w&(1<<Q)-1)];continue r}n.msg="invalid distance code",l.mode=30;break e}if(h=65535&I,P<(Q&=15)&&(w+=m[s++]<<P,(P+=8)<Q&&(w+=m[s++]<<P,P+=8)),(h+=w&(1<<Q)-1)>A){n.msg="invalid distance too far back",l.mode=30;break e}if(w>>>=Q,P-=Q,h>(Q=c-u)){if((Q=h-Q)>v&&l.sane){n.msg="invalid distance too far back",l.mode=30;break e}if(p=0,C=S,f===0){if(p+=_-Q,Q<Z){Z-=Q;do x[c++]=S[p++];while(--Q);p=c-h,C=x}}else if(f<Q){if(p+=_+f-Q,(Q-=f)<Z){Z-=Q;do x[c++]=S[p++];while(--Q);if(p=0,f<Z){Z-=Q=f;do x[c++]=S[p++];while(--Q);p=c-h,C=x}}}else if(p+=f-Q,Q<Z){Z-=Q;do x[c++]=S[p++];while(--Q);p=c-h,C=x}for(;Z>2;)x[c++]=C[p++],x[c++]=C[p++],x[c++]=C[p++],Z-=3;Z&&(x[c++]=C[p++],Z>1&&(x[c++]=C[p++]))}else{p=c-h;do x[c++]=x[p++],x[c++]=x[p++],x[c++]=x[p++],Z-=3;while(Z>2);Z&&(x[c++]=x[p++],Z>1&&(x[c++]=x[p++]))}break}}break}}while(s<i&&c<b);s-=Z=P>>3,w&=(1<<(P-=Z<<3))-1,n.next_in=s,n.next_out=c,n.avail_in=s<i?i-s+5:5-(s-i),n.avail_out=c<b?b-c+257:257-(c-b),l.hold=w,l.bits=P}},function(e,t,r){var n=r(32),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],i=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(c,u,b,A,_,v,f,S){var w,P,N,T,R,d,I,Q,Z,h=S.bits,p=0,C=0,m=0,x=0,F=0,D=0,O=0,L=0,k=0,E=0,g=null,U=0,B=new n.Buf16(16),G=new n.Buf16(16),Y=null,K=0;for(p=0;p<=15;p++)B[p]=0;for(C=0;C<A;C++)B[u[b+C]]++;for(F=h,x=15;x>=1&&B[x]===0;x--);if(F>x&&(F=x),x===0)return _[v++]=20971520,_[v++]=20971520,S.bits=1,0;for(m=1;m<x&&B[m]===0;m++);for(F<m&&(F=m),L=1,p=1;p<=15;p++)if(L<<=1,(L-=B[p])<0)return-1;if(L>0&&(c===0||x!==1))return-1;for(G[1]=0,p=1;p<15;p++)G[p+1]=G[p]+B[p];for(C=0;C<A;C++)u[b+C]!==0&&(f[G[u[b+C]]++]=C);if(c===0?(g=Y=f,d=19):c===1?(g=o,U-=257,Y=l,K-=257,d=256):(g=s,Y=i,d=-1),E=0,C=0,p=m,R=v,D=F,O=0,N=-1,T=(k=1<<F)-1,c===1&&k>852||c===2&&k>592)return 1;for(;;){I=p-O,f[C]<d?(Q=0,Z=f[C]):f[C]>d?(Q=Y[K+f[C]],Z=g[U+f[C]]):(Q=96,Z=0),w=1<<p-O,m=P=1<<D;do _[R+(E>>O)+(P-=w)]=I<<24|Q<<16|Z|0;while(P!==0);for(w=1<<p-1;E&w;)w>>=1;if(w!==0?(E&=w-1,E+=w):E=0,C++,--B[p]==0){if(p===x)break;p=u[b+f[C]]}if(p>F&&(E&T)!==N){for(O===0&&(O=F),R+=m,L=1<<(D=p-O);D+O<x&&!((L-=B[D+O])<=0);)D++,L<<=1;if(k+=1<<D,c===1&&k>852||c===2&&k>592)return 1;_[N=E&T]=F<<24|D<<16|R-v|0}}return E!==0&&(_[R+E]=p-O<<24|64<<16|0),S.bits=F,0}},function(e,t,r){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t){},function(e,t,r){function n(u,b){var A=Object.keys(u);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(u);b&&(_=_.filter(function(v){return Object.getOwnPropertyDescriptor(u,v).enumerable})),A.push.apply(A,_)}return A}function o(u,b,A){return b in u?Object.defineProperty(u,b,{value:A,enumerable:!0,configurable:!0,writable:!0}):u[b]=A,u}function l(u,b){for(var A=0;A<b.length;A++){var _=b[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(u,_.key,_)}}var s=r(4).Buffer,i=r(180).inspect,c=i&&i.custom||"inspect";e.exports=function(){function u(){(function(_,v){if(!(_ instanceof v))throw new TypeError("Cannot call a class as a function")})(this,u),this.head=null,this.tail=null,this.length=0}var b,A;return b=u,(A=[{key:"push",value:function(_){var v={data:_,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(_){var v={data:_,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(_){if(this.length===0)return"";for(var v=this.head,f=""+v.data;v=v.next;)f+=_+v.data;return f}},{key:"concat",value:function(_){if(this.length===0)return s.alloc(0);for(var v,f,S,w=s.allocUnsafe(_>>>0),P=this.head,N=0;P;)v=P.data,f=w,S=N,s.prototype.copy.call(v,f,S),N+=P.data.length,P=P.next;return w}},{key:"consume",value:function(_,v){var f;return _<this.head.data.length?(f=this.head.data.slice(0,_),this.head.data=this.head.data.slice(_)):f=_===this.head.data.length?this.shift():v?this._getString(_):this._getBuffer(_),f}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(_){var v=this.head,f=1,S=v.data;for(_-=S.length;v=v.next;){var w=v.data,P=_>w.length?w.length:_;if(P===w.length?S+=w:S+=w.slice(0,_),(_-=P)==0){P===w.length?(++f,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=w.slice(P));break}++f}return this.length-=f,S}},{key:"_getBuffer",value:function(_){var v=s.allocUnsafe(_),f=this.head,S=1;for(f.data.copy(v),_-=f.data.length;f=f.next;){var w=f.data,P=_>w.length?w.length:_;if(w.copy(v,v.length-_,0,P),(_-=P)==0){P===w.length?(++S,f.next?this.head=f.next:this.head=this.tail=null):(this.head=f,f.data=w.slice(P));break}++S}return this.length-=S,v}},{key:c,value:function(_,v){return i(this,function(f){for(var S=1;S<arguments.length;S++){var w=arguments[S]!=null?arguments[S]:{};S%2?n(Object(w),!0).forEach(function(P){o(f,P,w[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(w)):n(Object(w)).forEach(function(P){Object.defineProperty(f,P,Object.getOwnPropertyDescriptor(w,P))})}return f}({},v,{depth:0,customInspect:!1}))}}])&&l(b.prototype,A),u}()},function(e,t){},function(e,t,r){(function(n){var o;function l(T,R,d){return R in T?Object.defineProperty(T,R,{value:d,enumerable:!0,configurable:!0,writable:!0}):T[R]=d,T}var s=r(45),i=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),b=Symbol("ended"),A=Symbol("lastPromise"),_=Symbol("handlePromise"),v=Symbol("stream");function f(T,R){return{value:T,done:R}}function S(T){var R=T[i];if(R!==null){var d=T[v].read();d!==null&&(T[A]=null,T[i]=null,T[c]=null,R(f(d,!1)))}}function w(T){n.nextTick(S,T)}var P=Object.getPrototypeOf(function(){}),N=Object.setPrototypeOf((l(o={get stream(){return this[v]},next:function(){var T=this,R=this[u];if(R!==null)return Promise.reject(R);if(this[b])return Promise.resolve(f(void 0,!0));if(this[v].destroyed)return new Promise(function(Z,h){n.nextTick(function(){T[u]?h(T[u]):Z(f(void 0,!0))})});var d,I=this[A];if(I)d=new Promise(function(Z,h){return function(p,C){Z.then(function(){h[b]?p(f(void 0,!0)):h[_](p,C)},C)}}(I,this));else{var Q=this[v].read();if(Q!==null)return Promise.resolve(f(Q,!1));d=new Promise(this[_])}return this[A]=d,d}},Symbol.asyncIterator,function(){return this}),l(o,"return",function(){var T=this;return new Promise(function(R,d){T[v].destroy(null,function(I){I?d(I):R(f(void 0,!0))})})}),o),P);e.exports=function(T){var R,d=Object.create(N,(l(R={},v,{value:T,writable:!0}),l(R,i,{value:null,writable:!0}),l(R,c,{value:null,writable:!0}),l(R,u,{value:null,writable:!0}),l(R,b,{value:T._readableState.endEmitted,writable:!0}),l(R,_,{value:function(I,Q){var Z=d[v].read();Z?(d[A]=null,d[i]=null,d[c]=null,I(f(Z,!1))):(d[i]=I,d[c]=Q)},writable:!0}),R));return d[A]=null,s(T,function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q=d[c];return Q!==null&&(d[A]=null,d[i]=null,d[c]=null,Q(I)),void(d[u]=I)}var Z=d[i];Z!==null&&(d[A]=null,d[i]=null,d[c]=null,Z(f(void 0,!0))),d[b]=!0}),T.on("readable",w.bind(null,d)),d}}).call(this,r(2))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,r){e.exports=o;var n=r(80);function o(l){if(!(this instanceof o))return new o(l);n.call(this,l)}r(7)(o,n),o.prototype._transform=function(l,s,i){i(null,l)}},function(e,t,r){var n,o=r(23).codes,l=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function i(_){if(_)throw _}function c(_,v,f,S){S=function(N){var T=!1;return function(){T||(T=!0,N.apply(void 0,arguments))}}(S);var w=!1;_.on("close",function(){w=!0}),n===void 0&&(n=r(45)),n(_,{readable:v,writable:f},function(N){if(N)return S(N);w=!0,S()});var P=!1;return function(N){if(!w&&!P)return P=!0,function(T){return T.setHeader&&typeof T.abort=="function"}(_)?_.abort():typeof _.destroy=="function"?_.destroy():void S(N||new s("pipe"))}}function u(_){_()}function b(_,v){return _.pipe(v)}function A(_){return _.length?typeof _[_.length-1]!="function"?i:_.pop():i}e.exports=function(){for(var _=arguments.length,v=new Array(_),f=0;f<_;f++)v[f]=arguments[f];var S,w=A(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new l("streams");var P=v.map(function(N,T){var R=T<v.length-1;return c(N,R,T>0,function(d){S||(S=d),d&&P.forEach(u),R||(P.forEach(u),w(S))})});return v.reduce(b)}},function(e,t,r){var n=r(186)(function o(l,s){return(s=s||{}).namespace=l,s.prod=!0,s.dev=!1,s.force||o.force?o.yep(s):o.nope(s)});e.exports=n},function(e,t){var r=[],n=[],o=function(){};function l(f){return!~r.indexOf(f)&&(r.push(f),!0)}function s(f){o=f}function i(f){for(var S=[],w=0;w<r.length;w++)if(r[w].async)S.push(r[w]);else if(r[w](f))return!0;return!!S.length&&new Promise(function(P){Promise.all(S.map(function(N){return N(f)})).then(function(N){P(N.some(Boolean))})})}function c(f){return!~n.indexOf(f)&&(n.push(f),!0)}function u(){o.apply(o,arguments)}function b(f){for(var S=0;S<n.length;S++)f=n[S].apply(n[S],arguments);return f}function A(f,S){var w=Object.prototype.hasOwnProperty;for(var P in S)w.call(S,P)&&(f[P]=S[P]);return f}function _(f){return f.enabled=!1,f.modify=c,f.set=s,f.use=l,A(function(){return!1},f)}function v(f){return f.enabled=!0,f.modify=c,f.set=s,f.use=l,A(function(){var S=Array.prototype.slice.call(arguments,0);return u.call(u,f,b(S,f)),!0},f)}e.exports=function(f){return f.introduce=A,f.enabled=i,f.process=b,f.modify=c,f.write=u,f.nope=_,f.yep=v,f.set=s,f.use=l,f}},function(e,t,r){(function(n){var o=r(63),l=r(19).StringDecoder,s=r(28).Stream;function i(){}e.exports=function(c,u){var b=n.alloc(65536),A=new l("utf8"),_=new s,v="",f=0,S=0;return c.start===-1&&delete c.start,_.readable=!0,_.destroy=function(){_.destroyed=!0,_.emit("end"),_.emit("close")},o.open(c.file,"a+","0644",function(w,P){if(w)return u?u(w):_.emit("error",w),void _.destroy();(function N(){if(!_.destroyed)return o.read(P,b,0,b.length,f,function(T,R){if(T)return u?u(T):_.emit("error",T),void _.destroy();if(!R)return v&&((c.start==null||S>c.start)&&(u?u(null,v):_.emit("line",v)),S++,v=""),setTimeout(N,1e3);var d=A.write(b.slice(0,R));u||_.emit("data",d);for(var I=(d=(v+d).split(/\n+/)).length-1,Q=0;Q<I;Q++)(c.start==null||S>c.start)&&(u?u(null,d[Q]):_.emit("line",d[Q])),S++;return v=d[I],f+=R,N()});o.close(P,i)})()}),u?_.destroy:_}}).call(this,r(4).Buffer)},function(e,t,r){(function(n,o){function l(T){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(T)}function s(T,R){var d=Object.keys(T);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(T);R&&(I=I.filter(function(Q){return Object.getOwnPropertyDescriptor(T,Q).enumerable})),d.push.apply(d,I)}return d}function i(T){for(var R=1;R<arguments.length;R++){var d=arguments[R]!=null?arguments[R]:{};R%2?s(Object(d),!0).forEach(function(I){c(T,I,d[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(d)):s(Object(d)).forEach(function(I){Object.defineProperty(T,I,Object.getOwnPropertyDescriptor(d,I))})}return T}function c(T,R,d){return R in T?Object.defineProperty(T,R,{value:d,enumerable:!0,configurable:!0,writable:!0}):T[R]=d,T}function u(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")}function b(T,R){for(var d=0;d<R.length;d++){var I=R[d];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(T,I.key,I)}}function A(T,R){return(A=Object.setPrototypeOf||function(d,I){return d.__proto__=I,d})(T,R)}function _(T){var R=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var d,I=f(T);if(R){var Q=f(this).constructor;d=Reflect.construct(I,arguments,Q)}else d=I.apply(this,arguments);return v(this,d)}}function v(T,R){return!R||l(R)!=="object"&&typeof R!="function"?function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(T):R}function f(T){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(T)}var S=r(81),w=r(199),P=r(28).Stream,N=r(17);e.exports=function(T){(function(Z,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");Z.prototype=Object.create(h&&h.prototype,{constructor:{value:Z,writable:!0,configurable:!0}}),h&&A(Z,h)})(Q,T);var R,d,I=_(Q);function Q(){var Z,h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return u(this,Q),(Z=I.call(this,h)).options=h,Z.name=h.name||"http",Z.ssl=!!h.ssl,Z.host=h.host||"localhost",Z.port=h.port,Z.auth=h.auth,Z.path=h.path||"",Z.agent=h.agent,Z.headers=h.headers||{},Z.headers["content-type"]="application/json",Z.port||(Z.port=Z.ssl?443:80),Z}return R=Q,(d=[{key:"log",value:function(Z,h){var p=this;this._request(Z,function(C,m){m&&m.statusCode!==200&&(C=new Error("Invalid HTTP Status Code: ".concat(m.statusCode))),C?p.emit("warn",C):p.emit("logged",Z)}),h&&n(h)}},{key:"query",value:function(Z,h){typeof Z=="function"&&(h=Z,Z={}),(Z={method:"query",params:this.normalizeQuery(Z)}).params.path&&(Z.path=Z.params.path,delete Z.params.path),Z.params.auth&&(Z.auth=Z.params.auth,delete Z.params.auth),this._request(Z,function(p,C,m){if(C&&C.statusCode!==200&&(p=new Error("Invalid HTTP Status Code: ".concat(C.statusCode))),p)return h(p);if(typeof m=="string")try{m=JSON.parse(m)}catch(x){return h(x)}h(null,m)})}},{key:"stream",value:function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=new P;(Z={method:"stream",params:Z}).params.path&&(Z.path=Z.params.path,delete Z.params.path),Z.params.auth&&(Z.auth=Z.params.auth,delete Z.params.auth);var p="",C=this._request(Z);return h.destroy=function(){return C.destroy()},C.on("data",function(m){for(var x=(m=(p+m).split(/\n+/)).length-1,F=0;F<x;F++)try{h.emit("log",JSON.parse(m[F]))}catch(D){h.emit("error",D)}p=m[x]}),C.on("error",function(m){return h.emit("error",m)}),h}},{key:"_request",value:function(Z,h){var p=(Z=Z||{}).auth||this.auth,C=Z.path||this.path||"";delete Z.auth,delete Z.path;var m=Object.assign({},this.headers);p&&p.bearer&&(m.Authorization="Bearer ".concat(p.bearer));var x=(this.ssl?w:S).request(i(i({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(C.replace(/^\//,"")),headers:m,auth:p&&p.username&&p.password?"".concat(p.username,":").concat(p.password):"",agent:this.agent}));x.on("error",h),x.on("response",function(F){return F.on("end",function(){return h(null,F)}).resume()}),x.end(o.from(JSON.stringify(Z),"utf8"))}}])&&b(R.prototype,d),Q}(N)}).call(this,r(12).setImmediate,r(4).Buffer)},function(e,t,r){(function(n,o,l){var s=r(82),i=r(7),c=r(83),u=r(27),b=r(190),A=c.IncomingMessage,_=c.readyStates,v=e.exports=function(S){var w,P=this;u.Writable.call(P),P._opts=S,P._body=[],P._headers={},S.auth&&P.setHeader("Authorization","Basic "+new n(S.auth).toString("base64")),Object.keys(S.headers).forEach(function(T){P.setHeader(T,S.headers[T])});var N=!0;if(S.mode==="disable-fetch"||"requestTimeout"in S&&!s.abortController)N=!1,w=!0;else if(S.mode==="prefer-streaming")w=!1;else if(S.mode==="allow-wrong-content-type")w=!s.overrideMimeType;else{if(S.mode&&S.mode!=="default"&&S.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");w=!0}P._mode=function(T,R){return s.fetch&&R?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&T?"arraybuffer":s.vbArray&&T?"text:vbarray":"text"}(w,N),P._fetchTimer=null,P.on("finish",function(){P._onFinish()})};i(v,u.Writable),v.prototype.setHeader=function(S,w){var P=S.toLowerCase();f.indexOf(P)===-1&&(this._headers[P]={name:S,value:w})},v.prototype.getHeader=function(S){var w=this._headers[S.toLowerCase()];return w?w.value:null},v.prototype.removeHeader=function(S){delete this._headers[S.toLowerCase()]},v.prototype._onFinish=function(){var S=this;if(!S._destroyed){var w=S._opts,P=S._headers,N=null;w.method!=="GET"&&w.method!=="HEAD"&&(N=s.arraybuffer?b(n.concat(S._body)):s.blobConstructor?new o.Blob(S._body.map(function(Q){return b(Q)}),{type:(P["content-type"]||{}).value||""}):n.concat(S._body).toString());var T=[];if(Object.keys(P).forEach(function(Q){var Z=P[Q].name,h=P[Q].value;Array.isArray(h)?h.forEach(function(p){T.push([Z,p])}):T.push([Z,h])}),S._mode==="fetch"){var R=null;if(s.abortController){var d=new AbortController;R=d.signal,S._fetchAbortController=d,"requestTimeout"in w&&w.requestTimeout!==0&&(S._fetchTimer=o.setTimeout(function(){S.emit("requestTimeout"),S._fetchAbortController&&S._fetchAbortController.abort()},w.requestTimeout))}o.fetch(S._opts.url,{method:S._opts.method,headers:T,body:N||void 0,mode:"cors",credentials:w.withCredentials?"include":"same-origin",signal:R}).then(function(Q){S._fetchResponse=Q,S._connect()},function(Q){o.clearTimeout(S._fetchTimer),S._destroyed||S.emit("error",Q)})}else{var I=S._xhr=new o.XMLHttpRequest;try{I.open(S._opts.method,S._opts.url,!0)}catch(Q){return void l.nextTick(function(){S.emit("error",Q)})}"responseType"in I&&(I.responseType=S._mode.split(":")[0]),"withCredentials"in I&&(I.withCredentials=!!w.withCredentials),S._mode==="text"&&"overrideMimeType"in I&&I.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in w&&(I.timeout=w.requestTimeout,I.ontimeout=function(){S.emit("requestTimeout")}),T.forEach(function(Q){I.setRequestHeader(Q[0],Q[1])}),S._response=null,I.onreadystatechange=function(){switch(I.readyState){case _.LOADING:case _.DONE:S._onXHRProgress()}},S._mode==="moz-chunked-arraybuffer"&&(I.onprogress=function(){S._onXHRProgress()}),I.onerror=function(){S._destroyed||S.emit("error",new Error("XHR error"))};try{I.send(N)}catch(Q){return void l.nextTick(function(){S.emit("error",Q)})}}}},v.prototype._onXHRProgress=function(){(function(S){try{var w=S.status;return w!==null&&w!==0}catch{return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},v.prototype._connect=function(){var S=this;S._destroyed||(S._response=new A(S._xhr,S._fetchResponse,S._mode,S._fetchTimer),S._response.on("error",function(w){S.emit("error",w)}),S.emit("response",S._response))},v.prototype._write=function(S,w,P){this._body.push(S),P()},v.prototype.abort=v.prototype.destroy=function(){this._destroyed=!0,o.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},v.prototype.end=function(S,w,P){typeof S=="function"&&(P=S,S=void 0),u.Writable.prototype.end.call(this,S,w,P)},v.prototype.flushHeaders=function(){},v.prototype.setTimeout=function(){},v.prototype.setNoDelay=function(){},v.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(4).Buffer,r(5),r(2))},function(e,t,r){var n=r(4).Buffer;e.exports=function(o){if(o instanceof Uint8Array){if(o.byteOffset===0&&o.byteLength===o.buffer.byteLength)return o.buffer;if(typeof o.buffer.slice=="function")return o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength)}if(n.isBuffer(o)){for(var l=new Uint8Array(o.length),s=o.length,i=0;i<s;i++)l[i]=o[i];return l.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var n={},o=0;o<arguments.length;o++){var l=arguments[o];for(var s in l)r.call(l,s)&&(n[s]=l[s])}return n};var r=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,r){(function(n,o){var l;(function(s){t&&t.nodeType,n&&n.nodeType;var i=typeof o=="object"&&o;i.global!==i&&i.window!==i&&i.self;var c,u=2147483647,b=/^xn--/,A=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,S=String.fromCharCode;function w(h){throw new RangeError(v[h])}function P(h,p){for(var C=h.length,m=[];C--;)m[C]=p(h[C]);return m}function N(h,p){var C=h.split("@"),m="";return C.length>1&&(m=C[0]+"@",h=C[1]),m+P((h=h.replace(_,".")).split("."),p).join(".")}function T(h){for(var p,C,m=[],x=0,F=h.length;x<F;)(p=h.charCodeAt(x++))>=55296&&p<=56319&&x<F?(64512&(C=h.charCodeAt(x++)))==56320?m.push(((1023&p)<<10)+(1023&C)+65536):(m.push(p),x--):m.push(p);return m}function R(h){return P(h,function(p){var C="";return p>65535&&(C+=S((p-=65536)>>>10&1023|55296),p=56320|1023&p),C+=S(p)}).join("")}function d(h,p){return h+22+75*(h<26)-((p!=0)<<5)}function I(h,p,C){var m=0;for(h=C?f(h/700):h>>1,h+=f(h/p);h>455;m+=36)h=f(h/35);return f(m+36*h/(h+38))}function Q(h){var p,C,m,x,F,D,O,L,k,E,g,U=[],B=h.length,G=0,Y=128,K=72;for((C=h.lastIndexOf("-"))<0&&(C=0),m=0;m<C;++m)h.charCodeAt(m)>=128&&w("not-basic"),U.push(h.charCodeAt(m));for(x=C>0?C+1:0;x<B;){for(F=G,D=1,O=36;x>=B&&w("invalid-input"),((L=(g=h.charCodeAt(x++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:36)>=36||L>f((u-G)/D))&&w("overflow"),G+=L*D,!(L<(k=O<=K?1:O>=K+26?26:O-K));O+=36)D>f(u/(E=36-k))&&w("overflow"),D*=E;K=I(G-F,p=U.length+1,F==0),f(G/p)>u-Y&&w("overflow"),Y+=f(G/p),G%=p,U.splice(G++,0,Y)}return R(U)}function Z(h){var p,C,m,x,F,D,O,L,k,E,g,U,B,G,Y,K=[];for(U=(h=T(h)).length,p=128,C=0,F=72,D=0;D<U;++D)(g=h[D])<128&&K.push(S(g));for(m=x=K.length,x&&K.push("-");m<U;){for(O=u,D=0;D<U;++D)(g=h[D])>=p&&g<O&&(O=g);for(O-p>f((u-C)/(B=m+1))&&w("overflow"),C+=(O-p)*B,p=O,D=0;D<U;++D)if((g=h[D])<p&&++C>u&&w("overflow"),g==p){for(L=C,k=36;!(L<(E=k<=F?1:k>=F+26?26:k-F));k+=36)Y=L-E,G=36-E,K.push(S(d(E+Y%G,0))),L=f(Y/G);K.push(S(d(L,0))),F=I(C,B,m==x),C=0,++m}++C,++p}return K.join("")}c={version:"1.4.1",ucs2:{decode:T,encode:R},decode:Q,encode:Z,toASCII:function(h){return N(h,function(p){return A.test(p)?"xn--"+Z(p):p})},toUnicode:function(h){return N(h,function(p){return b.test(p)?Q(p.slice(4).toLowerCase()):p})}},(l=function(){return c}.call(t,r,t,n))===void 0||(n.exports=l)})()}).call(this,r(194)(e),r(5))},function(e,t){e.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(e,t,r){e.exports={isString:function(n){return typeof n=="string"},isObject:function(n){return typeof n=="object"&&n!==null},isNull:function(n){return n===null},isNullOrUndefined:function(n){return n==null}}},function(e,t,r){t.decode=t.parse=r(197),t.encode=t.stringify=r(198)},function(e,t,r){function n(l,s){return Object.prototype.hasOwnProperty.call(l,s)}e.exports=function(l,s,i,c){s=s||"&",i=i||"=";var u={};if(typeof l!="string"||l.length===0)return u;var b=/\+/g;l=l.split(s);var A=1e3;c&&typeof c.maxKeys=="number"&&(A=c.maxKeys);var _=l.length;A>0&&_>A&&(_=A);for(var v=0;v<_;++v){var f,S,w,P,N=l[v].replace(b,"%20"),T=N.indexOf(i);T>=0?(f=N.substr(0,T),S=N.substr(T+1)):(f=N,S=""),w=decodeURIComponent(f),P=decodeURIComponent(S),n(u,w)?o(u[w])?u[w].push(P):u[w]=[u[w],P]:u[w]=P}return u};var o=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"}},function(e,t,r){var n=function(i){switch(typeof i){case"string":return i;case"boolean":return i?"true":"false";case"number":return isFinite(i)?i:"";default:return""}};e.exports=function(i,c,u,b){return c=c||"&",u=u||"=",i===null&&(i=void 0),typeof i=="object"?l(s(i),function(A){var _=encodeURIComponent(n(A))+u;return o(i[A])?l(i[A],function(v){return _+encodeURIComponent(n(v))}).join(c):_+encodeURIComponent(n(i[A]))}).join(c):b?encodeURIComponent(n(b))+u+encodeURIComponent(n(i)):""};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"};function l(i,c){if(i.map)return i.map(c);for(var u=[],b=0;b<i.length;b++)u.push(c(i[b],b));return u}var s=Object.keys||function(i){var c=[];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&c.push(u);return c}},function(e,t,r){var n=r(81),o=r(46),l=e.exports;for(var s in n)n.hasOwnProperty(s)&&(l[s]=n[s]);function i(c){if(typeof c=="string"&&(c=o.parse(c)),c.protocol||(c.protocol="https:"),c.protocol!=="https:")throw new Error('Protocol "'+c.protocol+'" not supported. Expected "https:"');return c}l.request=function(c,u){return c=i(c),n.request.call(this,c,u)},l.get=function(c,u){return c=i(c),n.get.call(this,c,u)}},function(e,t,r){(function(n){function o(S){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(S)}function l(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function s(S,w){for(var P=0;P<w.length;P++){var N=w[P];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(S,N.key,N)}}function i(S,w){return(i=Object.setPrototypeOf||function(P,N){return P.__proto__=N,P})(S,w)}function c(S){var w=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var P,N=b(S);if(w){var T=b(this).constructor;P=Reflect.construct(N,arguments,T)}else P=N.apply(this,arguments);return u(this,P)}}function u(S,w){return!w||o(w)!=="object"&&typeof w!="function"?function(P){if(P===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P}(S):w}function b(S){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)})(S)}var A=r(84),_=r(3).MESSAGE,v=r(15),f=r(17);e.exports=function(S){(function(R,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(d&&d.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),d&&i(R,d)})(T,S);var w,P,N=c(T);function T(){var R,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(l(this,T),R=N.call(this,d),!d.stream||!A(d.stream))throw new Error("options.stream is required.");return R._stream=d.stream,R._stream.setMaxListeners(1/0),R.isObjectMode=d.stream._writableState.objectMode,R.eol=d.eol||v.EOL,R}return w=T,(P=[{key:"log",value:function(R,d){var I=this;if(n(function(){return I.emit("logged",R)}),this.isObjectMode)return this._stream.write(R),void(d&&d());this._stream.write("".concat(R[_]).concat(this.eol)),d&&d()}}])&&s(w.prototype,P),T}(f)}).call(this,r(12).setImmediate)},function(e,t,r){(function(n){function o(m,x,F){return x in m?Object.defineProperty(m,x,{value:F,enumerable:!0,configurable:!0,writable:!0}):m[x]=F,m}function l(m){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x})(m)}function s(m,x){for(var F=0;F<x.length;F++){var D=x[F];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(m,D.key,D)}}function i(m,x){return(i=Object.setPrototypeOf||function(F,D){return F.__proto__=D,F})(m,x)}function c(m){var x=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var F,D=b(m);if(x){var O=b(this).constructor;F=Reflect.construct(D,arguments,O)}else F=D.apply(this,arguments);return u(this,F)}}function u(m,x){return!x||l(x)!=="object"&&typeof x!="function"?function(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}(m):x}function b(m){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)})(m)}var A=r(28),_=A.Stream,v=A.Transform,f=r(48),S=r(3),w=S.LEVEL,P=S.SPLAT,N=r(84),T=r(86),R=r(90),d=r(205),I=r(206),Q=r(59).warn,Z=r(47),h=/%[scdjifoO%]/g,p=function(m){(function(L,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(k&&k.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),k&&i(L,k)})(O,m);var x,F,D=c(O);function O(L){var k;return function(E,g){if(!(E instanceof g))throw new TypeError("Cannot call a class as a function")}(this,O),(k=D.call(this,{objectMode:!0})).configure(L),k}return x=O,(F=[{key:"child",value:function(L){var k=this;return Object.create(k,{write:{value:function(E){var g=Object.assign({},L,E);E instanceof Error&&(g.stack=E.stack,g.message=E.message),k.write(g)}}})}},{key:"configure",value:function(){var L=this,k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=k.silent,g=k.format,U=k.defaultMeta,B=k.levels,G=k.level,Y=G===void 0?"info":G,K=k.exitOnError,H=K===void 0||K,V=k.transports,y=k.colors,j=k.emitErrs,W=k.formatters,ee=k.padLevels,X=k.rewriters,ne=k.stripColors,ie=k.exceptionHandlers,he=k.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=E,this.format=g||this.format||r(207)(),this.defaultMeta=U||null,this.levels=B||this.levels||Z.npm.levels,this.level=Y,this.exceptions=new T(this),this.rejections=new R(this),this.profilers={},this.exitOnError=H,V&&(V=Array.isArray(V)?V:[V]).forEach(function(Se){return L.add(Se)}),y||j||W||ee||X||ne)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
39
|
-
`));ie&&this.exceptions.handle(ie),he&&this.rejections.handle(he)}},{key:"isLevelEnabled",value:function(L){var k=this,E=
|
|
40
|
-
`))}},{key:"_onEvent",value:function(L,k){k["__winston"+L]||(k["__winston"+L]=function(E){L!=="error"||this.transports.includes(k)||this.add(k),this.emit(L,E,k)}.bind(this),k.on(L,k["__winston"+L]))}},{key:"_addDefaultMeta",value:function(L){this.defaultMeta&&Object.assign(L,this.defaultMeta)}}])&&s(x.prototype,F),O}(v);function
|
|
37
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function o(A,_){(_==null||_>A.length)&&(_=A.length);for(var v=0,f=new Array(_);v<_;v++)f[v]=A[v];return f}function l(A,_){for(var v=0;v<_.length;v++){var f=_[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(A,f.key,f)}}var s=r(10),i=r(3).SPLAT,c=/%[scdjifoO%]/g,u=/%%/g,b=function(){function A(f){(function(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")})(this,A),this.options=f}var _,v;return _=A,(v=[{key:"_splat",value:function(f,S){var w=f.message,P=f[i]||f.splat||[],N=w.match(u),T=N&&N.length||0,R=S.length-T-P.length,d=R<0?P.splice(R,-1*R):[],I=d.length;if(I)for(var Q=0;Q<I;Q++)Object.assign(f,d[Q]);return f.message=s.format.apply(s,[w].concat(n(P))),f}},{key:"transform",value:function(f){var S=f.message,w=f[i]||f.splat;if(!w||!w.length)return f;var P=S&&S.match&&S.match(c);if(!P&&(w||w.length)){var N=w.length>1?w.splice(0):w,T=N.length;if(T)for(var R=0;R<T;R++)Object.assign(f,N[R]);return f}return P?this._splat(f,P):f}}])&&l(_.prototype,v),A}();e.exports=function(A){return new b(A)}},function(e,t,r){var n=r(135),o=r(9);e.exports=o(function(l){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.format&&(l.timestamp=typeof s.format=="function"?s.format():n.format(new Date,s.format)),l.timestamp||(l.timestamp=new Date().toISOString()),s.alias&&(l[s.alias]=l.timestamp),l})},function(e,t,r){r.r(t),r.d(t,"assign",function(){return c}),r.d(t,"format",function(){return p}),r.d(t,"parse",function(){return j}),r.d(t,"defaultI18n",function(){return _}),r.d(t,"setGlobalDateI18n",function(){return f}),r.d(t,"setGlobalDateMasks",function(){return h});var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[^\\s]+",l=/\[([^]*?)\]/gm;function s(x,F){for(var D=[],O=0,L=x.length;O<L;O++)D.push(x[O].substr(0,F));return D}var i=function(x){return function(F,D){var O=D[x].map(function(L){return L.toLowerCase()}).indexOf(F.toLowerCase());return O>-1?O:null}};function c(x){for(var F=[],D=1;D<arguments.length;D++)F[D-1]=arguments[D];for(var O=0,L=F;O<L.length;O++){var k=L[O];for(var E in k)x[E]=k[E]}return x}var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b=["January","February","March","April","May","June","July","August","September","October","November","December"],A=s(b,3),_={dayNamesShort:s(u,3),dayNames:u,monthNamesShort:A,monthNames:b,amPm:["am","pm"],DoFn:function(x){return x+["th","st","nd","rd"][x%10>3?0:(x-x%10!=10?1:0)*x%10]}},v=c({},_),f=function(x){return v=c(v,x)},S=function(x){return x.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},w=function(x,F){for(F===void 0&&(F=2),x=String(x);x.length<F;)x="0"+x;return x},P={D:function(x){return String(x.getDate())},DD:function(x){return w(x.getDate())},Do:function(x,F){return F.DoFn(x.getDate())},d:function(x){return String(x.getDay())},dd:function(x){return w(x.getDay())},ddd:function(x,F){return F.dayNamesShort[x.getDay()]},dddd:function(x,F){return F.dayNames[x.getDay()]},M:function(x){return String(x.getMonth()+1)},MM:function(x){return w(x.getMonth()+1)},MMM:function(x,F){return F.monthNamesShort[x.getMonth()]},MMMM:function(x,F){return F.monthNames[x.getMonth()]},YY:function(x){return w(String(x.getFullYear()),4).substr(2)},YYYY:function(x){return w(x.getFullYear(),4)},h:function(x){return String(x.getHours()%12||12)},hh:function(x){return w(x.getHours()%12||12)},H:function(x){return String(x.getHours())},HH:function(x){return w(x.getHours())},m:function(x){return String(x.getMinutes())},mm:function(x){return w(x.getMinutes())},s:function(x){return String(x.getSeconds())},ss:function(x){return w(x.getSeconds())},S:function(x){return String(Math.round(x.getMilliseconds()/100))},SS:function(x){return w(Math.round(x.getMilliseconds()/10),2)},SSS:function(x){return w(x.getMilliseconds(),3)},a:function(x,F){return x.getHours()<12?F.amPm[0]:F.amPm[1]},A:function(x,F){return x.getHours()<12?F.amPm[0].toUpperCase():F.amPm[1].toUpperCase()},ZZ:function(x){var F=x.getTimezoneOffset();return(F>0?"-":"+")+w(100*Math.floor(Math.abs(F)/60)+Math.abs(F)%60,4)},Z:function(x){var F=x.getTimezoneOffset();return(F>0?"-":"+")+w(Math.floor(Math.abs(F)/60),2)+":"+w(Math.abs(F)%60,2)}},N=function(x){return+x-1},T=[null,"[1-9]\\d?"],R=[null,o],d=["isPm",o,function(x,F){var D=x.toLowerCase();return D===F.amPm[0]?0:D===F.amPm[1]?1:null}],I=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(x){var F=(x+"").match(/([+-]|\d\d)/gi);if(F){var D=60*+F[1]+parseInt(F[2],10);return F[0]==="+"?D:-D}return 0}],Q={D:["day","[1-9]\\d?"],DD:["day","\\d\\d"],Do:["day","[1-9]\\d?"+o,function(x){return parseInt(x,10)}],M:["month","[1-9]\\d?",N],MM:["month","\\d\\d",N],YY:["year","\\d\\d",function(x){var F=+(""+new Date().getFullYear()).substr(0,2);return+(""+(+x>68?F-1:F)+x)}],h:["hour","[1-9]\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","[1-9]\\d?"],HH:["hour","\\d\\d"],m:["minute","[1-9]\\d?"],mm:["minute","\\d\\d"],s:["second","[1-9]\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(x){return 100*+x}],SS:["millisecond","\\d\\d",function(x){return 10*+x}],SSS:["millisecond","\\d{3}"],d:T,dd:T,ddd:R,dddd:R,MMM:["month",o,i("monthNamesShort")],MMMM:["month",o,i("monthNames")],a:d,A:d,ZZ:I,Z:I},Z={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},h=function(x){return c(Z,x)},p=function(x,F,D){if(F===void 0&&(F=Z.default),D===void 0&&(D={}),typeof x=="number"&&(x=new Date(x)),Object.prototype.toString.call(x)!=="[object Date]"||isNaN(x.getTime()))throw new Error("Invalid Date pass to format");var O=[];F=(F=Z[F]||F).replace(l,function(k,E){return O.push(E),"@@@"});var L=c(c({},v),D);return(F=F.replace(n,function(k){return P[k](x,L)})).replace(/@@@/g,function(){return O.shift()})};function j(x,F,D){if(D===void 0&&(D={}),typeof F!="string")throw new Error("Invalid format in fecha parse");if(F=Z[F]||F,x.length>1e3)return null;var O={year:new Date().getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},L=[],k=[],E=F.replace(l,function(X,ne){return k.push(S(ne)),"@@@"}),g={},U={};E=S(E).replace(n,function(X){var ne=Q[X],ie=ne[0],he=ne[1],Se=ne[3];if(g[ie])throw new Error("Invalid format. "+ie+" specified twice in format");return g[ie]=!0,Se&&(U[Se]=!0),L.push(ne),"("+he+")"}),Object.keys(U).forEach(function(X){if(!g[X])throw new Error("Invalid format. "+X+" is required in specified format")}),E=E.replace(/@@@/g,function(){return k.shift()});var B=x.match(new RegExp(E,"i"));if(!B)return null;for(var G=c(c({},v),D),Y=1;Y<B.length;Y++){var K=L[Y-1],H=K[0],V=K[2],y=V?V(B[Y],G):+B[Y];if(y==null)return null;O[H]=y}O.isPm===1&&O.hour!=null&&+O.hour!=12?O.hour=+O.hour+12:O.isPm===0&&+O.hour==12&&(O.hour=0);for(var C=new Date(O.year,O.month,O.day,O.hour,O.minute,O.second,O.millisecond),W=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],ee=(Y=0,W.length);Y<ee;Y++)if(g[W[Y][0]]&&O[W[Y][0]]!==C[W[Y][1]]())return null;return O.timezoneOffset==null?C:new Date(Date.UTC(O.year,O.month,O.day,O.hour,O.minute-O.timezoneOffset,O.second,O.millisecond))}var m={format:p,parse:j,defaultI18n:_,setGlobalDateI18n:f,setGlobalDateMasks:h};t.default=m},function(e,t,r){var n=r(57),o=r(9),l=r(3).MESSAGE;e.exports=o(function(s,i){return i.level!==!1&&(s.level=n.strip(s.level)),i.message!==!1&&(s.message=n.strip(s.message)),i.raw!==!1&&s[l]&&(s[l]=n.strip(s[l])),s})},function(e){e.exports=JSON.parse('{"name":"winston","description":"A logger for just about everything.","version":"3.3.3","author":"Charlie Robbins <charlie.robbins@gmail.com>","maintainers":["Jarrett Cruger <jcrugzz@gmail.com>","Chris Alderson <chrisalderson@protonmail.com>","David Hyde <dabh@stanford.edu>"],"repository":{"type":"git","url":"https://github.com/winstonjs/winston.git"},"keywords":["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],"dependencies":{"async":"^3.1.0","@dabh/diagnostics":"^2.0.2","is-stream":"^2.0.0","logform":"^2.2.0","one-time":"^1.0.0","readable-stream":"^3.4.0","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.4.0"},"devDependencies":{"@babel/cli":"^7.10.3","@babel/core":"^7.10.3","@babel/preset-env":"^7.10.3","@types/node":"^14.0.13","abstract-winston-transport":"^0.5.1","assume":"^2.2.0","colors":"^1.4.0","cross-spawn-async":"^2.2.5","eslint-config-populist":"^4.2.0","hock":"^1.4.1","mocha":"^8.0.1","nyc":"^15.1.0","rimraf":"^3.0.2","split2":"^3.1.1","std-mocks":"^1.0.1","through2":"^3.0.1","winston-compat":"^0.1.5"},"main":"./lib/winston","browser":"./dist/winston","types":"./index.d.ts","scripts":{"lint":"populist lib/*.js lib/winston/*.js lib/winston/**/*.js","pretest":"npm run lint","test":"nyc --reporter=text --reporter lcov npm run test:mocha","test:mocha":"mocha test/*.test.js test/**/*.test.js --exit","build":"./node_modules/.bin/rimraf dist && babel lib -d dist","prepublishOnly":"npm run build"},"engines":{"node":">= 6.4.0"},"license":"MIT"}')},function(e,t,r){Object.defineProperty(t,"Console",{configurable:!0,enumerable:!0,get:function(){return r(139)}}),Object.defineProperty(t,"File",{configurable:!0,enumerable:!0,get:function(){return r(148)}}),Object.defineProperty(t,"Http",{configurable:!0,enumerable:!0,get:function(){return r(188)}}),Object.defineProperty(t,"Stream",{configurable:!0,enumerable:!0,get:function(){return r(200)}})},function(e,t,r){(function(n){function o(w){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P})(w)}function l(w,P){if(!(w instanceof P))throw new TypeError("Cannot call a class as a function")}function s(w,P){for(var N=0;N<P.length;N++){var T=P[N];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(w,T.key,T)}}function i(w,P){return(i=Object.setPrototypeOf||function(N,T){return N.__proto__=T,N})(w,P)}function c(w){var P=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var N,T=b(w);if(P){var R=b(this).constructor;N=Reflect.construct(T,arguments,R)}else N=T.apply(this,arguments);return u(this,N)}}function u(w,P){return!P||o(P)!=="object"&&typeof P!="function"?function(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}(w):P}function b(w){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)})(w)}var A=r(15),_=r(3),v=_.LEVEL,f=_.MESSAGE,S=r(17);e.exports=function(w){(function(d,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(I&&I.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),I&&i(d,I)})(R,w);var P,N,T=c(R);function R(){var d,I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return l(this,R),(d=T.call(this,I)).name=I.name||"console",d.stderrLevels=d._stringArrayToSet(I.stderrLevels),d.consoleWarnLevels=d._stringArrayToSet(I.consoleWarnLevels),d.eol=I.eol||A.EOL,d.setMaxListeners(30),d}return P=R,(N=[{key:"log",value:function(d,I){var Q=this;return n(function(){return Q.emit("logged",d)}),this.stderrLevels[d[v]]?(console._stderr?console._stderr.write("".concat(d[f]).concat(this.eol)):console.error(d[f]),void(I&&I())):this.consoleWarnLevels[d[v]]?(console._stderr?console._stderr.write("".concat(d[f]).concat(this.eol)):console.warn(d[f]),void(I&&I())):(console._stdout?console._stdout.write("".concat(d[f]).concat(this.eol)):console.log(d[f]),void(I&&I()))}},{key:"_stringArrayToSet",value:function(d,I){if(!d)return{};if(I=I||"Cannot make set from type other than Array of string elements",!Array.isArray(d))throw new Error(I);return d.reduce(function(Q,Z){if(typeof Z!="string")throw new Error(I);return Q[Z]=!0,Q},{})}}])&&s(P.prototype,N),R}(S)}).call(this,r(12).setImmediate)},function(e,t,r){(function(n,o){(function(l,s){if(!l.setImmediate){var i,c,u,b,A,_=1,v={},f=!1,S=l.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(l);w=w&&w.setTimeout?w:l,{}.toString.call(l.process)==="[object process]"?i=function(T){o.nextTick(function(){N(T)})}:function(){if(l.postMessage&&!l.importScripts){var T=!0,R=l.onmessage;return l.onmessage=function(){T=!1},l.postMessage("","*"),l.onmessage=R,T}}()?(b="setImmediate$"+Math.random()+"$",A=function(T){T.source===l&&typeof T.data=="string"&&T.data.indexOf(b)===0&&N(+T.data.slice(b.length))},l.addEventListener?l.addEventListener("message",A,!1):l.attachEvent("onmessage",A),i=function(T){l.postMessage(b+T,"*")}):l.MessageChannel?((u=new MessageChannel).port1.onmessage=function(T){N(T.data)},i=function(T){u.port2.postMessage(T)}):S&&"onreadystatechange"in S.createElement("script")?(c=S.documentElement,i=function(T){var R=S.createElement("script");R.onreadystatechange=function(){N(T),R.onreadystatechange=null,c.removeChild(R),R=null},c.appendChild(R)}):i=function(T){setTimeout(N,0,T)},w.setImmediate=function(T){typeof T!="function"&&(T=new Function(""+T));for(var R=new Array(arguments.length-1),d=0;d<R.length;d++)R[d]=arguments[d+1];var I={callback:T,args:R};return v[_]=I,i(_),_++},w.clearImmediate=P}function P(T){delete v[T]}function N(T){if(f)setTimeout(N,0,T);else{var R=v[T];if(R){f=!0;try{(function(d){var I=d.callback,Q=d.args;switch(Q.length){case 0:I();break;case 1:I(Q[0]);break;case 2:I(Q[0],Q[1]);break;case 3:I(Q[0],Q[1],Q[2]);break;default:I.apply(void 0,Q)}})(R)}finally{P(T),f=!1}}}}})(typeof self=="undefined"?n===void 0?this:n:self)}).call(this,r(5),r(2))},function(e,t,r){e.exports=r(60)},function(e,t,r){(function(n,o){var l=r(13);e.exports=R;var s,i=r(38);R.ReadableState=T,r(18).EventEmitter;var c=function(E,g){return E.listeners(g).length},u=r(61),b=r(40).Buffer,A=n.Uint8Array||function(){},_=Object.create(r(14));_.inherits=r(7);var v=r(143),f=void 0;f=v&&v.debuglog?v.debuglog("stream"):function(){};var S,w=r(144),P=r(62);_.inherits(R,u);var N=["error","close","destroy","pause","resume"];function T(E,g){E=E||{};var U=g instanceof(s=s||r(31));this.objectMode=!!E.objectMode,U&&(this.objectMode=this.objectMode||!!E.readableObjectMode);var B=E.highWaterMark,G=E.readableHighWaterMark,Y=this.objectMode?16:16384;this.highWaterMark=B||B===0?B:U&&(G||G===0)?G:Y,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,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.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=E.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,E.encoding&&(S||(S=r(19).StringDecoder),this.decoder=new S(E.encoding),this.encoding=E.encoding)}function R(E){if(s=s||r(31),!(this instanceof R))return new R(E);this._readableState=new T(E,this),this.readable=!0,E&&(typeof E.read=="function"&&(this._read=E.read),typeof E.destroy=="function"&&(this._destroy=E.destroy)),u.call(this)}function d(E,g,U,B,G){var Y,K=E._readableState;return g===null?(K.reading=!1,function(H,V){if(!V.ended){if(V.decoder){var y=V.decoder.end();y&&y.length&&(V.buffer.push(y),V.length+=V.objectMode?1:y.length)}V.ended=!0,Z(H)}}(E,K)):(G||(Y=function(H,V){var y;C=V,b.isBuffer(C)||C instanceof A||typeof V=="string"||V===void 0||H.objectMode||(y=new TypeError("Invalid non-string/buffer chunk"));var C;return y}(K,g)),Y?E.emit("error",Y):K.objectMode||g&&g.length>0?(typeof g=="string"||K.objectMode||Object.getPrototypeOf(g)===b.prototype||(g=function(H){return b.from(H)}(g)),B?K.endEmitted?E.emit("error",new Error("stream.unshift() after end event")):I(E,K,g,!0):K.ended?E.emit("error",new Error("stream.push() after EOF")):(K.reading=!1,K.decoder&&!U?(g=K.decoder.write(g),K.objectMode||g.length!==0?I(E,K,g,!1):p(E,K)):I(E,K,g,!1))):B||(K.reading=!1)),function(H){return!H.ended&&(H.needReadable||H.length<H.highWaterMark||H.length===0)}(K)}function I(E,g,U,B){g.flowing&&g.length===0&&!g.sync?(E.emit("data",U),E.read(0)):(g.length+=g.objectMode?1:U.length,B?g.buffer.unshift(U):g.buffer.push(U),g.needReadable&&Z(E)),p(E,g)}Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(E){this._readableState&&(this._readableState.destroyed=E)}}),R.prototype.destroy=P.destroy,R.prototype._undestroy=P.undestroy,R.prototype._destroy=function(E,g){this.push(null),g(E)},R.prototype.push=function(E,g){var U,B=this._readableState;return B.objectMode?U=!0:typeof E=="string"&&((g=g||B.defaultEncoding)!==B.encoding&&(E=b.from(E,g),g=""),U=!0),d(this,E,g,!1,U)},R.prototype.unshift=function(E){return d(this,E,null,!0,!1)},R.prototype.isPaused=function(){return this._readableState.flowing===!1},R.prototype.setEncoding=function(E){return S||(S=r(19).StringDecoder),this._readableState.decoder=new S(E),this._readableState.encoding=E,this};function Q(E,g){return E<=0||g.length===0&&g.ended?0:g.objectMode?1:E!=E?g.flowing&&g.length?g.buffer.head.data.length:g.length:(E>g.highWaterMark&&(g.highWaterMark=function(U){return U>=8388608?U=8388608:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U}(E)),E<=g.length?E:g.ended?g.length:(g.needReadable=!0,0))}function Z(E){var g=E._readableState;g.needReadable=!1,g.emittedReadable||(f("emitReadable",g.flowing),g.emittedReadable=!0,g.sync?l.nextTick(h,E):h(E))}function h(E){f("emit readable"),E.emit("readable"),F(E)}function p(E,g){g.readingMore||(g.readingMore=!0,l.nextTick(j,E,g))}function j(E,g){for(var U=g.length;!g.reading&&!g.flowing&&!g.ended&&g.length<g.highWaterMark&&(f("maybeReadMore read 0"),E.read(0),U!==g.length);)U=g.length;g.readingMore=!1}function m(E){f("readable nexttick read 0"),E.read(0)}function x(E,g){g.reading||(f("resume read 0"),E.read(0)),g.resumeScheduled=!1,g.awaitDrain=0,E.emit("resume"),F(E),g.flowing&&!g.reading&&E.read(0)}function F(E){var g=E._readableState;for(f("flow",g.flowing);g.flowing&&E.read()!==null;);}function D(E,g){return g.length===0?null:(g.objectMode?U=g.buffer.shift():!E||E>=g.length?(U=g.decoder?g.buffer.join(""):g.buffer.length===1?g.buffer.head.data:g.buffer.concat(g.length),g.buffer.clear()):U=function(B,G,Y){var K;return B<G.head.data.length?(K=G.head.data.slice(0,B),G.head.data=G.head.data.slice(B)):K=B===G.head.data.length?G.shift():Y?function(H,V){var y=V.head,C=1,W=y.data;for(H-=W.length;y=y.next;){var ee=y.data,X=H>ee.length?ee.length:H;if(X===ee.length?W+=ee:W+=ee.slice(0,H),(H-=X)===0){X===ee.length?(++C,y.next?V.head=y.next:V.head=V.tail=null):(V.head=y,y.data=ee.slice(X));break}++C}return V.length-=C,W}(B,G):function(H,V){var y=b.allocUnsafe(H),C=V.head,W=1;for(C.data.copy(y),H-=C.data.length;C=C.next;){var ee=C.data,X=H>ee.length?ee.length:H;if(ee.copy(y,y.length-H,0,X),(H-=X)===0){X===ee.length?(++W,C.next?V.head=C.next:V.head=V.tail=null):(V.head=C,C.data=ee.slice(X));break}++W}return V.length-=W,y}(B,G),K}(E,g.buffer,g.decoder),U);var U}function O(E){var g=E._readableState;if(g.length>0)throw new Error('"endReadable()" called on non-empty stream');g.endEmitted||(g.ended=!0,l.nextTick(L,g,E))}function L(E,g){E.endEmitted||E.length!==0||(E.endEmitted=!0,g.readable=!1,g.emit("end"))}function k(E,g){for(var U=0,B=E.length;U<B;U++)if(E[U]===g)return U;return-1}R.prototype.read=function(E){f("read",E),E=parseInt(E,10);var g=this._readableState,U=E;if(E!==0&&(g.emittedReadable=!1),E===0&&g.needReadable&&(g.length>=g.highWaterMark||g.ended))return f("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?O(this):Z(this),null;if((E=Q(E,g))===0&&g.ended)return g.length===0&&O(this),null;var B,G=g.needReadable;return f("need readable",G),(g.length===0||g.length-E<g.highWaterMark)&&f("length less than watermark",G=!0),g.ended||g.reading?f("reading or ended",G=!1):G&&(f("do read"),g.reading=!0,g.sync=!0,g.length===0&&(g.needReadable=!0),this._read(g.highWaterMark),g.sync=!1,g.reading||(E=Q(U,g))),(B=E>0?D(E,g):null)===null?(g.needReadable=!0,E=0):g.length-=E,g.length===0&&(g.ended||(g.needReadable=!0),U!==E&&g.ended&&O(this)),B!==null&&this.emit("data",B),B},R.prototype._read=function(E){this.emit("error",new Error("_read() is not implemented"))},R.prototype.pipe=function(E,g){var U=this,B=this._readableState;switch(B.pipesCount){case 0:B.pipes=E;break;case 1:B.pipes=[B.pipes,E];break;default:B.pipes.push(E)}B.pipesCount+=1,f("pipe count=%d opts=%j",B.pipesCount,g);var G=(!g||g.end!==!1)&&E!==o.stdout&&E!==o.stderr?K:ne;function Y(ie,he){f("onunpipe"),ie===U&&he&&he.hasUnpiped===!1&&(he.hasUnpiped=!0,f("cleanup"),E.removeListener("close",ee),E.removeListener("finish",X),E.removeListener("drain",H),E.removeListener("error",W),E.removeListener("unpipe",Y),U.removeListener("end",K),U.removeListener("end",ne),U.removeListener("data",C),V=!0,!B.awaitDrain||E._writableState&&!E._writableState.needDrain||H())}function K(){f("onend"),E.end()}B.endEmitted?l.nextTick(G):U.once("end",G),E.on("unpipe",Y);var H=function(ie){return function(){var he=ie._readableState;f("pipeOnDrain",he.awaitDrain),he.awaitDrain&&he.awaitDrain--,he.awaitDrain===0&&c(ie,"data")&&(he.flowing=!0,F(ie))}}(U);E.on("drain",H);var V=!1,y=!1;function C(ie){f("ondata"),y=!1,E.write(ie)!==!1||y||((B.pipesCount===1&&B.pipes===E||B.pipesCount>1&&k(B.pipes,E)!==-1)&&!V&&(f("false write response, pause",U._readableState.awaitDrain),U._readableState.awaitDrain++,y=!0),U.pause())}function W(ie){f("onerror",ie),ne(),E.removeListener("error",W),c(E,"error")===0&&E.emit("error",ie)}function ee(){E.removeListener("finish",X),ne()}function X(){f("onfinish"),E.removeListener("close",ee),ne()}function ne(){f("unpipe"),U.unpipe(E)}return U.on("data",C),function(ie,he,Se){if(typeof ie.prependListener=="function")return ie.prependListener(he,Se);ie._events&&ie._events[he]?i(ie._events[he])?ie._events[he].unshift(Se):ie._events[he]=[Se,ie._events[he]]:ie.on(he,Se)}(E,"error",W),E.once("close",ee),E.once("finish",X),E.emit("pipe",U),B.flowing||(f("pipe resume"),U.resume()),E},R.prototype.unpipe=function(E){var g=this._readableState,U={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return E&&E!==g.pipes||(E||(E=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,E&&E.emit("unpipe",this,U)),this;if(!E){var B=g.pipes,G=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var Y=0;Y<G;Y++)B[Y].emit("unpipe",this,U);return this}var K=k(g.pipes,E);return K===-1||(g.pipes.splice(K,1),g.pipesCount-=1,g.pipesCount===1&&(g.pipes=g.pipes[0]),E.emit("unpipe",this,U)),this},R.prototype.on=function(E,g){var U=u.prototype.on.call(this,E,g);if(E==="data")this._readableState.flowing!==!1&&this.resume();else if(E==="readable"){var B=this._readableState;B.endEmitted||B.readableListening||(B.readableListening=B.needReadable=!0,B.emittedReadable=!1,B.reading?B.length&&Z(this):l.nextTick(m,this))}return U},R.prototype.addListener=R.prototype.on,R.prototype.resume=function(){var E=this._readableState;return E.flowing||(f("resume"),E.flowing=!0,function(g,U){U.resumeScheduled||(U.resumeScheduled=!0,l.nextTick(x,g,U))}(this,E)),this},R.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},R.prototype.wrap=function(E){var g=this,U=this._readableState,B=!1;for(var G in E.on("end",function(){if(f("wrapped end"),U.decoder&&!U.ended){var K=U.decoder.end();K&&K.length&&g.push(K)}g.push(null)}),E.on("data",function(K){f("wrapped data"),U.decoder&&(K=U.decoder.write(K)),U.objectMode&&K==null||(U.objectMode||K&&K.length)&&(g.push(K)||(B=!0,E.pause()))}),E)this[G]===void 0&&typeof E[G]=="function"&&(this[G]=function(K){return function(){return E[K].apply(E,arguments)}}(G));for(var Y=0;Y<N.length;Y++)E.on(N[Y],this.emit.bind(this,N[Y]));return this._read=function(K){f("wrapped _read",K),B&&(B=!1,E.resume())},this},Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),R._fromList=D}).call(this,r(5),r(2))},function(e,t){},function(e,t,r){var n=r(40).Buffer,o=r(145);e.exports=function(){function l(){(function(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(s){var i={data:s,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},l.prototype.unshift=function(s){var i={data:s,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},l.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(s){if(this.length===0)return"";for(var i=this.head,c=""+i.data;i=i.next;)c+=s+i.data;return c},l.prototype.concat=function(s){if(this.length===0)return n.alloc(0);if(this.length===1)return this.head.data;for(var i,c,u,b=n.allocUnsafe(s>>>0),A=this.head,_=0;A;)i=A.data,c=b,u=_,i.copy(c,u),_+=A.data.length,A=A.next;return b},l}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var l=o.inspect({length:this.length});return this.constructor.name+" "+l})},function(e,t){},function(e,t,r){var n=r(4),o=n.Buffer;function l(i,c){for(var u in i)c[u]=i[u]}function s(i,c,u){return o(i,c,u)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(l(n,t),t.Buffer=s),l(o,s),s.from=function(i,c,u){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,c,u)},s.alloc=function(i,c,u){if(typeof i!="number")throw new TypeError("Argument must be a number");var b=o(i);return c!==void 0?typeof u=="string"?b.fill(c,u):b.fill(c):b.fill(0),b},s.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},s.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(i)}},function(e,t,r){var n=r(10),o=r(3).LEVEL,l=r(17),s=e.exports=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(l.call(this,i),!i.transport||typeof i.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");function c(u){this.emit("error",u,this.transport)}this.transport=i.transport,this.level=this.level||i.transport.level,this.handleExceptions=this.handleExceptions||i.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=c.bind(this),this.transport.on("error",this.transport.__winstonError))};n.inherits(s,l),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);(!this.level||this.levels[this.level]>=this.levels[i[o]])&&this.transport.log(i[o],i.message,i,this._nop),u(null)},s.prototype._writev=function(i,c){for(var u=0;u<i.length;u++)this._accept(i[u])&&(this.transport.log(i[u].chunk[o],i[u].chunk.message,i[u].chunk,this._nop),i[u].callback());return c(null)},s.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
38
|
+
`))},s.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,r){(function(n,o){function l(h){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(h)}function s(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function i(h,p){for(var j=0;j<p.length;j++){var m=p[j];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(h,m.key,m)}}function c(h,p){return(c=Object.setPrototypeOf||function(j,m){return j.__proto__=m,j})(h,p)}function u(h){var p=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var j,m=_(h);if(p){var x=_(this).constructor;j=Reflect.construct(m,arguments,x)}else j=m.apply(this,arguments);return b(this,j)}}function b(h,p){return!p||l(p)!=="object"&&typeof p!="function"?A(h):p}function A(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function _(h){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)})(h)}var v=r(63),f=r(53),S=r(149),w=r(159),P=r(3).MESSAGE,N=r(28),T=N.Stream,R=N.PassThrough,d=r(17),I=r(33)("winston:file"),Q=r(15),Z=r(187);e.exports=function(h){(function(F,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function");F.prototype=Object.create(D&&D.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),D&&c(F,D)})(x,h);var p,j,m=u(x);function x(){var F,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};function O(L){for(var k=arguments.length,E=new Array(k>1?k-1:0),g=1;g<k;g++)E[g-1]=arguments[g];E.slice(1).forEach(function(U){if(D[U])throw new Error("Cannot set ".concat(U," and ").concat(L," together"))})}if(s(this,x),(F=m.call(this,D)).name=D.name||"file",F._stream=new R,F._stream.setMaxListeners(30),F._onError=F._onError.bind(A(F)),D.filename||D.dirname)O("filename or dirname","stream"),F._basename=F.filename=D.filename?f.basename(D.filename):"winston.log",F.dirname=D.dirname||f.dirname(D.filename),F.options=D.options||{flags:"a"};else{if(!D.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),O("stream","filename","maxsize"),F._dest=F._stream.pipe(F._setupStream(D.stream)),F.dirname=f.dirname(F._dest.path)}return F.maxsize=D.maxsize||null,F.rotationFormat=D.rotationFormat||!1,F.zippedArchive=D.zippedArchive||!1,F.maxFiles=D.maxFiles||null,F.eol=D.eol||Q.EOL,F.tailable=D.tailable||!1,F._size=0,F._pendingSize=0,F._created=0,F._drain=!1,F._opening=!1,F._ending=!1,F.dirname&&F._createLogDirIfNotExist(F.dirname),F.open(),F}return p=x,(j=[{key:"finishIfEnding",value:function(){var F=this;this._ending&&(this._opening?this.once("open",function(){F._stream.once("finish",function(){return F.emit("finish")}),n(function(){return F._stream.end()})}):(this._stream.once("finish",function(){return F.emit("finish")}),n(function(){return F._stream.end()})))}},{key:"log",value:function(F){var D=this,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};if(this.silent)return O(),!0;if(this._drain)this._stream.once("drain",function(){D._drain=!1,D.log(F,O)});else{if(!this._rotate){var L="".concat(F[P]).concat(this.eol),k=o.byteLength(L);this._pendingSize+=k,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var E=this._stream.write(L,g.bind(this));return E?O():(this._drain=!0,this._stream.once("drain",function(){D._drain=!1,O()})),I("written",E,this._drain),this.finishIfEnding(),E}this._stream.once("rotate",function(){D._rotate=!1,D.log(F,O)})}function g(){var U=this;this._size+=k,this._pendingSize-=k,I("logged %s %s",this._size,L),this.emit("logged",F),this._opening||this._needsNewFile()&&(this._rotate=!0,this._endStream(function(){return U._rotateFile()}))}}},{key:"query",value:function(F,D){typeof F=="function"&&(D=F,F={}),F=function(B){return(B=B||{}).rows=B.rows||B.limit||10,B.start=B.start||0,B.until=B.until||new Date,l(B.until)!=="object"&&(B.until=new Date(B.until)),B.from=B.from||B.until-864e5,l(B.from)!=="object"&&(B.from=new Date(B.from)),B.order=B.order||"desc",B}(F);var O=f.join(this.dirname,this.filename),L="",k=[],E=0,g=v.createReadStream(O,{encoding:"utf8"});function U(B,G){try{var Y=JSON.parse(B);(function(K){if(K&&l(K)==="object"){var H=new Date(K.timestamp);if(!(F.from&&H<F.from||F.until&&H>F.until||F.level&&F.level!==K.level))return!0}})(Y)&&function(K){F.rows&&k.length>=F.rows&&F.order!=="desc"?g.readable&&g.destroy():(F.fields&&(K=F.fields.reduce(function(H,V){return H[V]=K[V],H},{})),F.order==="desc"&&k.length>=F.rows&&k.shift(),k.push(K))}(Y)}catch(K){G||g.emit("error",K)}}g.on("error",function(B){if(g.readable&&g.destroy(),D)return B.code!=="ENOENT"?D(B):D(null,k)}),g.on("data",function(B){for(var G=(B=(L+B).split(/\n+/)).length-1,Y=0;Y<G;Y++)(!F.start||E>=F.start)&&U(B[Y]),E++;L=B[G]}),g.on("close",function(){L&&U(L,!0),F.order==="desc"&&(k=k.reverse()),D&&D(null,k)})}},{key:"stream",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=f.join(this.dirname,this.filename),O=new T,L={file:D,start:F.start};return O.destroy=Z(L,function(k,E){if(k)return O.emit("error",k);try{O.emit("data",E),E=JSON.parse(E),O.emit("log",E)}catch(g){O.emit("error",g)}}),O}},{key:"open",value:function(){var F=this;this.filename&&(this._opening||(this._opening=!0,this.stat(function(D,O){if(D)return F.emit("error",D);I("stat done: %s { size: %s }",F.filename,O),F._size=O,F._dest=F._createStream(F._stream),F._opening=!1,F.once("open",function(){F._stream.eventNames().includes("rotate")?F._stream.emit("rotate"):F._rotate=!1})})))}},{key:"stat",value:function(F){var D=this,O=this._getFile(),L=f.join(this.dirname,O);v.stat(L,function(k,E){return k&&k.code==="ENOENT"?(I("ENOENT\xA0ok",L),D.filename=O,F(null,0)):k?(I("err ".concat(k.code," ").concat(L)),F(k)):!E||D._needsNewFile(E.size)?D._incFile(function(){return D.stat(F)}):(D.filename=O,void F(null,E.size))})}},{key:"close",value:function(F){var D=this;this._stream&&this._stream.end(function(){F&&F(),D.emit("flush"),D.emit("closed")})}},{key:"_needsNewFile",value:function(F){return F=F||this._size,this.maxsize&&F>=this.maxsize}},{key:"_onError",value:function(F){this.emit("error",F)}},{key:"_setupStream",value:function(F){return F.on("error",this._onError),F}},{key:"_cleanupStream",value:function(F){return F.removeListener("error",this._onError),F}},{key:"_rotateFile",value:function(){var F=this;this._incFile(function(){return F.open()})}},{key:"_endStream",value:function(){var F=this,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end(function(){F._cleanupStream(F._dest),D()})):D()}},{key:"_createStream",value:function(F){var D=this,O=f.join(this.dirname,this.filename);I("create stream start",O,this.options);var L=v.createWriteStream(O,this.options).on("error",function(E){return I(E)}).on("close",function(){return I("close",L.path,L.bytesWritten)}).on("open",function(){I("file open ok",O),D.emit("open",O),F.pipe(L),D.rotatedWhileOpening&&(D._stream=new R,D._stream.setMaxListeners(30),D._rotateFile(),D.rotatedWhileOpening=!1,D._cleanupStream(L),F.end())});if(I("create stream ok",O),this.zippedArchive){var k=w.createGzip();return k.pipe(L),k}return L}},{key:"_incFile",value:function(F){I("_incFile",this.filename);var D=f.extname(this._basename),O=f.basename(this._basename,D);this.tailable?this._checkMaxFilesTailable(D,O,F):(this._created+=1,this._checkMaxFilesIncrementing(D,O,F))}},{key:"_getFile",value:function(){var F=f.extname(this._basename),D=f.basename(this._basename,F),O=this.rotationFormat?this.rotationFormat():this._created,L=!this.tailable&&this._created?"".concat(D).concat(O).concat(F):"".concat(D).concat(F);return this.zippedArchive&&!this.tailable?"".concat(L,".gz"):L}},{key:"_checkMaxFilesIncrementing",value:function(F,D,O){if(!this.maxFiles||this._created<this.maxFiles)return n(O);var L=this._created-this.maxFiles,k=L!==0?L:"",E=this.zippedArchive?".gz":"",g="".concat(D).concat(k).concat(F).concat(E),U=f.join(this.dirname,g);v.unlink(U,O)}},{key:"_checkMaxFilesTailable",value:function(F,D,O){var L=this,k=[];if(this.maxFiles){for(var E=this.zippedArchive?".gz":"",g=this.maxFiles-1;g>1;g--)k.push(function(U,B){var G=this,Y="".concat(D).concat(U-1).concat(F).concat(E),K=f.join(this.dirname,Y);v.exists(K,function(H){if(!H)return B(null);Y="".concat(D).concat(U).concat(F).concat(E),v.rename(K,f.join(G.dirname,Y),B)})}.bind(this,g));S(k,function(){v.rename(f.join(L.dirname,"".concat(D).concat(F)),f.join(L.dirname,"".concat(D,"1").concat(F).concat(E)),O)})}}},{key:"_createLogDirIfNotExist",value:function(F){v.existsSync(F)||v.mkdirSync(F,{recursive:!0})}}])&&i(p.prototype,j),x}(d)}).call(this,r(12).setImmediate,r(4).Buffer)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s,i){return(0,n.default)(o.default,s,i)};var n=l(r(150)),o=l(r(154));function l(s){return s&&s.__esModule?s:{default:s}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(41)),o=s(r(22)),l=s(r(26));function s(i){return i&&i.__esModule?i:{default:i}}t.default=(0,l.default)((i,c,u)=>{var b=(0,n.default)(c)?[]:{};i(c,(A,_,v)=>{(0,o.default)(A)((f,...S)=>{S.length<2&&([S]=S),b[_]=S,v(f)})},A=>u(A,b))},3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(u){return(0,l.isAsync)(u)?function(...b){const A=b.pop();return i(u.apply(this,b),A)}:(0,n.default)(function(b,A){var _;try{_=u.apply(this,b)}catch(v){return A(v)}if(_&&typeof _.then=="function")return i(_,A);A(null,_)})};var n=s(r(152)),o=s(r(153)),l=r(22);function s(u){return u&&u.__esModule?u:{default:u}}function i(u,b){return u.then(A=>{c(b,null,A)},A=>{c(b,A&&A.message?A:new Error(A))})}function c(u,b,A){try{u(b,A)}catch(_){(0,o.default)(v=>{throw v},_)}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return function(...o){var l=o.pop();return n.call(this,o,l)}},e.exports=t.default},function(e,t,r){(function(n,o){Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=c,t.wrap=u;var l,s=t.hasSetImmediate=typeof n=="function"&&n,i=t.hasNextTick=typeof o=="object"&&typeof o.nextTick=="function";function c(b){setTimeout(b,0)}function u(b){return(A,..._)=>b(()=>A(..._))}l=s?n:i?o.nextTick:c,t.default=u(l)}).call(this,r(12).setImmediate,r(2))},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(64)),o=l(r(26));function l(s){return s&&s.__esModule?s:{default:s}}t.default=(0,o.default)(function(s,i,c){return(0,n.default)(s,1,i,c)},3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(65)),o=u(r(156)),l=u(r(66)),s=r(22),i=u(r(158)),c=u(r(42));function u(b){return b&&b.__esModule?b:{default:b}}t.default=b=>(A,_,v)=>{if(v=(0,n.default)(v),b<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!A)return v(null);if((0,s.isAsyncGenerator)(A))return(0,i.default)(A,b,_,v);if((0,s.isAsyncIterable)(A))return(0,i.default)(A[Symbol.asyncIterator](),b,_,v);var f=(0,o.default)(A),S=!1,w=!1,P=0,N=!1;function T(d,I){if(!w)if(P-=1,d)S=!0,v(d);else if(d===!1)S=!0,w=!0;else{if(I===c.default||S&&P<=0)return S=!0,v(null);N||R()}}function R(){for(N=!0;P<b&&!S;){var d=f();if(d===null)return S=!0,void(P<=0&&v(null));P+=1,_(d.value,d.key,(0,l.default)(T))}N=!1}R()},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s){if((0,n.default)(s))return function(_){var v=-1,f=_.length;return function(){return++v<f?{value:_[v],key:v}:null}}(s);var i=(0,o.default)(s);return i?function(_){var v=-1;return function(){var f=_.next();return f.done?null:(v++,{value:f.value,key:v})}}(i):(c=s,u=c?Object.keys(c):[],b=-1,A=u.length,function(){var _=u[++b];return b<A?{value:c[_],key:_}:null});var c,u,b,A};var n=l(r(41)),o=l(r(157));function l(s){return s&&s.__esModule?s:{default:s}}e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return n[Symbol.iterator]&&n[Symbol.iterator]()},e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(s,i,c,u){let b=!1,A=!1,_=!1,v=0,f=0;function S(){v>=i||_||b||(_=!0,s.next().then(({value:N,done:T})=>{if(!A&&!b){if(_=!1,T)return b=!0,void(v<=0&&u(null));v++,c(N,f,w),f++,S()}}).catch(P))}function w(N,T){if(v-=1,!A)return N?P(N):N===!1?(b=!0,void(A=!0)):T===l.default||b&&v<=0?(b=!0,u(null)):void S()}function P(N){A||(_=!1,b=!0,u(N))}S()};var n,o=r(42),l=(n=o)&&n.__esModule?n:{default:n};e.exports=t.default},function(e,t,r){(function(n){var o=r(4).Buffer,l=r(160).Transform,s=r(168),i=r(10),c=r(72).ok,u=r(4).kMaxLength,b="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";s.Z_MIN_WINDOWBITS=8,s.Z_MAX_WINDOWBITS=15,s.Z_DEFAULT_WINDOWBITS=15,s.Z_MIN_CHUNK=64,s.Z_MAX_CHUNK=1/0,s.Z_DEFAULT_CHUNK=16384,s.Z_MIN_MEMLEVEL=1,s.Z_MAX_MEMLEVEL=9,s.Z_DEFAULT_MEMLEVEL=8,s.Z_MIN_LEVEL=-1,s.Z_MAX_LEVEL=9,s.Z_DEFAULT_LEVEL=s.Z_DEFAULT_COMPRESSION;for(var A=Object.keys(s),_=0;_<A.length;_++){var v=A[_];v.match(/^Z/)&&Object.defineProperty(t,v,{enumerable:!0,value:s[v],writable:!1})}for(var f={Z_OK:s.Z_OK,Z_STREAM_END:s.Z_STREAM_END,Z_NEED_DICT:s.Z_NEED_DICT,Z_ERRNO:s.Z_ERRNO,Z_STREAM_ERROR:s.Z_STREAM_ERROR,Z_DATA_ERROR:s.Z_DATA_ERROR,Z_MEM_ERROR:s.Z_MEM_ERROR,Z_BUF_ERROR:s.Z_BUF_ERROR,Z_VERSION_ERROR:s.Z_VERSION_ERROR},S=Object.keys(f),w=0;w<S.length;w++){var P=S[w];f[f[P]]=P}function N(D,O,L){var k=[],E=0;function g(){for(var B;(B=D.read())!==null;)k.push(B),E+=B.length;D.once("readable",g)}function U(){var B,G=null;E>=u?G=new RangeError(b):B=o.concat(k,E),k=[],D.close(),L(G,B)}D.on("error",function(B){D.removeListener("end",U),D.removeListener("readable",g),L(B)}),D.on("end",U),D.end(O),g()}function T(D,O){if(typeof O=="string"&&(O=o.from(O)),!o.isBuffer(O))throw new TypeError("Not a string or buffer");var L=D._finishFlushFlag;return D._processChunk(O,L)}function R(D){if(!(this instanceof R))return new R(D);m.call(this,D,s.DEFLATE)}function d(D){if(!(this instanceof d))return new d(D);m.call(this,D,s.INFLATE)}function I(D){if(!(this instanceof I))return new I(D);m.call(this,D,s.GZIP)}function Q(D){if(!(this instanceof Q))return new Q(D);m.call(this,D,s.GUNZIP)}function Z(D){if(!(this instanceof Z))return new Z(D);m.call(this,D,s.DEFLATERAW)}function h(D){if(!(this instanceof h))return new h(D);m.call(this,D,s.INFLATERAW)}function p(D){if(!(this instanceof p))return new p(D);m.call(this,D,s.UNZIP)}function j(D){return D===s.Z_NO_FLUSH||D===s.Z_PARTIAL_FLUSH||D===s.Z_SYNC_FLUSH||D===s.Z_FULL_FLUSH||D===s.Z_FINISH||D===s.Z_BLOCK}function m(D,O){var L=this;if(this._opts=D=D||{},this._chunkSize=D.chunkSize||t.Z_DEFAULT_CHUNK,l.call(this,D),D.flush&&!j(D.flush))throw new Error("Invalid flush flag: "+D.flush);if(D.finishFlush&&!j(D.finishFlush))throw new Error("Invalid flush flag: "+D.finishFlush);if(this._flushFlag=D.flush||s.Z_NO_FLUSH,this._finishFlushFlag=D.finishFlush!==void 0?D.finishFlush:s.Z_FINISH,D.chunkSize&&(D.chunkSize<t.Z_MIN_CHUNK||D.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+D.chunkSize);if(D.windowBits&&(D.windowBits<t.Z_MIN_WINDOWBITS||D.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+D.windowBits);if(D.level&&(D.level<t.Z_MIN_LEVEL||D.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+D.level);if(D.memLevel&&(D.memLevel<t.Z_MIN_MEMLEVEL||D.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+D.memLevel);if(D.strategy&&D.strategy!=t.Z_FILTERED&&D.strategy!=t.Z_HUFFMAN_ONLY&&D.strategy!=t.Z_RLE&&D.strategy!=t.Z_FIXED&&D.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+D.strategy);if(D.dictionary&&!o.isBuffer(D.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new s.Zlib(O);var k=this;this._hadError=!1,this._handle.onerror=function(U,B){x(k),k._hadError=!0;var G=new Error(U);G.errno=B,G.code=t.codes[B],k.emit("error",G)};var E=t.Z_DEFAULT_COMPRESSION;typeof D.level=="number"&&(E=D.level);var g=t.Z_DEFAULT_STRATEGY;typeof D.strategy=="number"&&(g=D.strategy),this._handle.init(D.windowBits||t.Z_DEFAULT_WINDOWBITS,E,D.memLevel||t.Z_DEFAULT_MEMLEVEL,g,D.dictionary),this._buffer=o.allocUnsafe(this._chunkSize),this._offset=0,this._level=E,this._strategy=g,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!L._handle},configurable:!0,enumerable:!0})}function x(D,O){O&&n.nextTick(O),D._handle&&(D._handle.close(),D._handle=null)}function F(D){D.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(f),writable:!1}),t.Deflate=R,t.Inflate=d,t.Gzip=I,t.Gunzip=Q,t.DeflateRaw=Z,t.InflateRaw=h,t.Unzip=p,t.createDeflate=function(D){return new R(D)},t.createInflate=function(D){return new d(D)},t.createDeflateRaw=function(D){return new Z(D)},t.createInflateRaw=function(D){return new h(D)},t.createGzip=function(D){return new I(D)},t.createGunzip=function(D){return new Q(D)},t.createUnzip=function(D){return new p(D)},t.deflate=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new R(O),D,L)},t.deflateSync=function(D,O){return T(new R(O),D)},t.gzip=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new I(O),D,L)},t.gzipSync=function(D,O){return T(new I(O),D)},t.deflateRaw=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new Z(O),D,L)},t.deflateRawSync=function(D,O){return T(new Z(O),D)},t.unzip=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new p(O),D,L)},t.unzipSync=function(D,O){return T(new p(O),D)},t.inflate=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new d(O),D,L)},t.inflateSync=function(D,O){return T(new d(O),D)},t.gunzip=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new Q(O),D,L)},t.gunzipSync=function(D,O){return T(new Q(O),D)},t.inflateRaw=function(D,O,L){return typeof O=="function"&&(L=O,O={}),N(new h(O),D,L)},t.inflateRawSync=function(D,O){return T(new h(O),D)},i.inherits(m,l),m.prototype.params=function(D,O,L){if(D<t.Z_MIN_LEVEL||D>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+D);if(O!=t.Z_FILTERED&&O!=t.Z_HUFFMAN_ONLY&&O!=t.Z_RLE&&O!=t.Z_FIXED&&O!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+O);if(this._level!==D||this._strategy!==O){var k=this;this.flush(s.Z_SYNC_FLUSH,function(){c(k._handle,"zlib binding closed"),k._handle.params(D,O),k._hadError||(k._level=D,k._strategy=O,L&&L())})}else n.nextTick(L)},m.prototype.reset=function(){return c(this._handle,"zlib binding closed"),this._handle.reset()},m.prototype._flush=function(D){this._transform(o.alloc(0),"",D)},m.prototype.flush=function(D,O){var L=this,k=this._writableState;(typeof D=="function"||D===void 0&&!O)&&(O=D,D=s.Z_FULL_FLUSH),k.ended?O&&n.nextTick(O):k.ending?O&&this.once("end",O):k.needDrain?O&&this.once("drain",function(){return L.flush(D,O)}):(this._flushFlag=D,this.write(o.alloc(0),"",O))},m.prototype.close=function(D){x(this,D),n.nextTick(F,this)},m.prototype._transform=function(D,O,L){var k,E=this._writableState,g=(E.ending||E.ended)&&(!D||E.length===D.length);return D===null||o.isBuffer(D)?this._handle?(g?k=this._finishFlushFlag:(k=this._flushFlag,D.length>=E.length&&(this._flushFlag=this._opts.flush||s.Z_NO_FLUSH)),void this._processChunk(D,k,L)):L(new Error("zlib binding closed")):L(new Error("invalid input"))},m.prototype._processChunk=function(D,O,L){var k=D&&D.length,E=this._chunkSize-this._offset,g=0,U=this,B=typeof L=="function";if(!B){var G,Y=[],K=0;this.on("error",function(W){G=W}),c(this._handle,"zlib binding closed");do var H=this._handle.writeSync(O,D,g,k,this._buffer,this._offset,E);while(!this._hadError&&C(H[0],H[1]));if(this._hadError)throw G;if(K>=u)throw x(this),new RangeError(b);var V=o.concat(Y,K);return x(this),V}c(this._handle,"zlib binding closed");var y=this._handle.write(O,D,g,k,this._buffer,this._offset,E);function C(W,ee){if(this&&(this.buffer=null,this.callback=null),!U._hadError){var X=E-ee;if(c(X>=0,"have should not go down"),X>0){var ne=U._buffer.slice(U._offset,U._offset+X);U._offset+=X,B?U.push(ne):(Y.push(ne),K+=ne.length)}if((ee===0||U._offset>=U._chunkSize)&&(E=U._chunkSize,U._offset=0,U._buffer=o.allocUnsafe(U._chunkSize)),ee===0){if(g+=k-W,k=W,!B)return!0;var ie=U._handle.write(O,D,g,k,U._buffer,U._offset,U._chunkSize);return ie.callback=C,void(ie.buffer=D)}if(!B)return!1;L()}}y.buffer=D,y.callback=C},i.inherits(R,m),i.inherits(d,m),i.inherits(I,m),i.inherits(Q,m),i.inherits(Z,m),i.inherits(h,m),i.inherits(p,m)}).call(this,r(2))},function(e,t,r){e.exports=o;var n=r(18).EventEmitter;function o(){n.call(this)}r(7)(o,n),o.Readable=r(27),o.Writable=r(71),o.Duplex=r(165),o.Transform=r(166),o.PassThrough=r(167),o.Stream=o,o.prototype.pipe=function(l,s){var i=this;function c(S){l.writable&&l.write(S)===!1&&i.pause&&i.pause()}function u(){i.readable&&i.resume&&i.resume()}i.on("data",c),l.on("drain",u),l._isStdio||s&&s.end===!1||(i.on("end",A),i.on("close",_));var b=!1;function A(){b||(b=!0,l.end())}function _(){b||(b=!0,typeof l.destroy=="function"&&l.destroy())}function v(S){if(f(),n.listenerCount(this,"error")===0)throw S}function f(){i.removeListener("data",c),l.removeListener("drain",u),i.removeListener("end",A),i.removeListener("close",_),i.removeListener("error",v),l.removeListener("error",v),i.removeListener("end",f),i.removeListener("close",f),l.removeListener("close",f)}return i.on("error",v),l.on("error",v),i.on("end",f),i.on("close",f),l.on("close",f),l.emit("pipe",i),l}},function(e,t){},function(e,t,r){var n=r(43).Buffer,o=r(163);e.exports=function(){function l(){(function(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(s){var i={data:s,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},l.prototype.unshift=function(s){var i={data:s,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},l.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(s){if(this.length===0)return"";for(var i=this.head,c=""+i.data;i=i.next;)c+=s+i.data;return c},l.prototype.concat=function(s){if(this.length===0)return n.alloc(0);if(this.length===1)return this.head.data;for(var i,c,u,b=n.allocUnsafe(s>>>0),A=this.head,_=0;A;)i=A.data,c=b,u=_,i.copy(c,u),_+=A.data.length,A=A.next;return b},l}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var l=o.inspect({length:this.length});return this.constructor.name+" "+l})},function(e,t){},function(e,t,r){e.exports=l;var n=r(70),o=r(14);function l(s){if(!(this instanceof l))return new l(s);n.call(this,s)}o.inherits=r(7),o.inherits(l,n),l.prototype._transform=function(s,i,c){c(null,s)}},function(e,t,r){e.exports=r(20)},function(e,t,r){e.exports=r(27).Transform},function(e,t,r){e.exports=r(27).PassThrough},function(e,t,r){(function(n,o){var l=r(72),s=r(170),i=r(171),c=r(174),u=r(177);for(var b in u)t[b]=u[b];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function A(_){if(typeof _!="number"||_<t.DEFLATE||_>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=_,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}A.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,l(this.init_done,"close before init"),l(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?i.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||c.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},A.prototype.write=function(_,v,f,S,w,P,N){return this._write(!0,_,v,f,S,w,P,N)},A.prototype.writeSync=function(_,v,f,S,w,P,N){return this._write(!1,_,v,f,S,w,P,N)},A.prototype._write=function(_,v,f,S,w,P,N,T){if(l.equal(arguments.length,8),l(this.init_done,"write before init"),l(this.mode!==t.NONE,"already finalized"),l.equal(!1,this.write_in_progress,"write already in progress"),l.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,l.equal(!1,v===void 0,"must provide flush value"),this.write_in_progress=!0,v!==t.Z_NO_FLUSH&&v!==t.Z_PARTIAL_FLUSH&&v!==t.Z_SYNC_FLUSH&&v!==t.Z_FULL_FLUSH&&v!==t.Z_FINISH&&v!==t.Z_BLOCK)throw new Error("Invalid flush value");if(f==null&&(f=n.alloc(0),w=0,S=0),this.strm.avail_in=w,this.strm.input=f,this.strm.next_in=S,this.strm.avail_out=T,this.strm.output=P,this.strm.next_out=N,this.flush=v,!_)return this._process(),this._checkError()?this._afterSync():void 0;var R=this;return o.nextTick(function(){R._process(),R._after()}),this},A.prototype._afterSync=function(){var _=this.strm.avail_out,v=this.strm.avail_in;return this.write_in_progress=!1,[v,_]},A.prototype._process=function(){var _=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=i.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(_=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(_===null)break;if(this.strm.input[_]!==31){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,_++,this.strm.avail_in===1)break;case 1:if(_===null)break;this.strm.input[_]===139?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=c.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=c.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=c.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=c.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},A.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},A.prototype._after=function(){if(this._checkError()){var _=this.strm.avail_out,v=this.strm.avail_in;this.write_in_progress=!1,this.callback(v,_),this.pending_close&&this.close()}},A.prototype._error=function(_){this.strm.msg&&(_=this.strm.msg),this.onerror(_,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},A.prototype.init=function(_,v,f,S,w){l(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),l(_>=8&&_<=15,"invalid windowBits"),l(v>=-1&&v<=9,"invalid compression level"),l(f>=1&&f<=9,"invalid memlevel"),l(S===t.Z_FILTERED||S===t.Z_HUFFMAN_ONLY||S===t.Z_RLE||S===t.Z_FIXED||S===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(v,_,f,S,w),this._setDictionary()},A.prototype.params=function(){throw new Error("deflateParams Not supported")},A.prototype.reset=function(){this._reset(),this._setDictionary()},A.prototype._init=function(_,v,f,S,w){switch(this.level=_,this.windowBits=v,this.memLevel=f,this.strategy=S,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new s,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=i.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=c.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=w,this.write_in_progress=!1,this.init_done=!0},A.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=i.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},A.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=i.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=c.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=A}).call(this,r(4).Buffer,r(2))},function(e,t,r){var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function s(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}e.exports=function(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},u=0;u<10;u++)c["_"+String.fromCharCode(u)]=u;if(Object.getOwnPropertyNames(c).map(function(A){return c[A]}).join("")!=="0123456789")return!1;var b={};return"abcdefghijklmnopqrst".split("").forEach(function(A){b[A]=A}),Object.keys(Object.assign({},b)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(i,c){for(var u,b,A=s(i),_=1;_<arguments.length;_++){for(var v in u=Object(arguments[_]))o.call(u,v)&&(A[v]=u[v]);if(n){b=n(u);for(var f=0;f<b.length;f++)l.call(u,b[f])&&(A[b[f]]=u[b[f]])}}return A}},function(e,t,r){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,r){var n,o=r(32),l=r(172),s=r(73),i=r(74),c=r(173);function u(h,p){return h.msg=c[p],p}function b(h){return(h<<1)-(h>4?9:0)}function A(h){for(var p=h.length;--p>=0;)h[p]=0}function _(h){var p=h.state,j=p.pending;j>h.avail_out&&(j=h.avail_out),j!==0&&(o.arraySet(h.output,p.pending_buf,p.pending_out,j,h.next_out),h.next_out+=j,p.pending_out+=j,h.total_out+=j,h.avail_out-=j,p.pending-=j,p.pending===0&&(p.pending_out=0))}function v(h,p){l._tr_flush_block(h,h.block_start>=0?h.block_start:-1,h.strstart-h.block_start,p),h.block_start=h.strstart,_(h.strm)}function f(h,p){h.pending_buf[h.pending++]=p}function S(h,p){h.pending_buf[h.pending++]=p>>>8&255,h.pending_buf[h.pending++]=255&p}function w(h,p){var j,m,x=h.max_chain_length,F=h.strstart,D=h.prev_length,O=h.nice_match,L=h.strstart>h.w_size-262?h.strstart-(h.w_size-262):0,k=h.window,E=h.w_mask,g=h.prev,U=h.strstart+258,B=k[F+D-1],G=k[F+D];h.prev_length>=h.good_match&&(x>>=2),O>h.lookahead&&(O=h.lookahead);do if(k[(j=p)+D]===G&&k[j+D-1]===B&&k[j]===k[F]&&k[++j]===k[F+1]){F+=2,j++;do;while(k[++F]===k[++j]&&k[++F]===k[++j]&&k[++F]===k[++j]&&k[++F]===k[++j]&&k[++F]===k[++j]&&k[++F]===k[++j]&&k[++F]===k[++j]&&k[++F]===k[++j]&&F<U);if(m=258-(U-F),F=U-258,m>D){if(h.match_start=p,D=m,m>=O)break;B=k[F+D-1],G=k[F+D]}}while((p=g[p&E])>L&&--x!=0);return D<=h.lookahead?D:h.lookahead}function P(h){var p,j,m,x,F,D,O,L,k,E,g=h.w_size;do{if(x=h.window_size-h.lookahead-h.strstart,h.strstart>=g+(g-262)){o.arraySet(h.window,h.window,g,g,0),h.match_start-=g,h.strstart-=g,h.block_start-=g,p=j=h.hash_size;do m=h.head[--p],h.head[p]=m>=g?m-g:0;while(--j);p=j=g;do m=h.prev[--p],h.prev[p]=m>=g?m-g:0;while(--j);x+=g}if(h.strm.avail_in===0)break;if(D=h.strm,O=h.window,L=h.strstart+h.lookahead,k=x,E=void 0,(E=D.avail_in)>k&&(E=k),j=E===0?0:(D.avail_in-=E,o.arraySet(O,D.input,D.next_in,E,L),D.state.wrap===1?D.adler=s(D.adler,O,E,L):D.state.wrap===2&&(D.adler=i(D.adler,O,E,L)),D.next_in+=E,D.total_in+=E,E),h.lookahead+=j,h.lookahead+h.insert>=3)for(F=h.strstart-h.insert,h.ins_h=h.window[F],h.ins_h=(h.ins_h<<h.hash_shift^h.window[F+1])&h.hash_mask;h.insert&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[F+3-1])&h.hash_mask,h.prev[F&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=F,F++,h.insert--,!(h.lookahead+h.insert<3)););}while(h.lookahead<262&&h.strm.avail_in!==0)}function N(h,p){for(var j,m;;){if(h.lookahead<262){if(P(h),h.lookahead<262&&p===0)return 1;if(h.lookahead===0)break}if(j=0,h.lookahead>=3&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,j=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),j!==0&&h.strstart-j<=h.w_size-262&&(h.match_length=w(h,j)),h.match_length>=3)if(m=l._tr_tally(h,h.strstart-h.match_start,h.match_length-3),h.lookahead-=h.match_length,h.match_length<=h.max_lazy_match&&h.lookahead>=3){h.match_length--;do h.strstart++,h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,j=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart;while(--h.match_length!=0);h.strstart++}else h.strstart+=h.match_length,h.match_length=0,h.ins_h=h.window[h.strstart],h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+1])&h.hash_mask;else m=l._tr_tally(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++;if(m&&(v(h,!1),h.strm.avail_out===0))return 1}return h.insert=h.strstart<2?h.strstart:2,p===4?(v(h,!0),h.strm.avail_out===0?3:4):h.last_lit&&(v(h,!1),h.strm.avail_out===0)?1:2}function T(h,p){for(var j,m,x;;){if(h.lookahead<262){if(P(h),h.lookahead<262&&p===0)return 1;if(h.lookahead===0)break}if(j=0,h.lookahead>=3&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,j=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),h.prev_length=h.match_length,h.prev_match=h.match_start,h.match_length=2,j!==0&&h.prev_length<h.max_lazy_match&&h.strstart-j<=h.w_size-262&&(h.match_length=w(h,j),h.match_length<=5&&(h.strategy===1||h.match_length===3&&h.strstart-h.match_start>4096)&&(h.match_length=2)),h.prev_length>=3&&h.match_length<=h.prev_length){x=h.strstart+h.lookahead-3,m=l._tr_tally(h,h.strstart-1-h.prev_match,h.prev_length-3),h.lookahead-=h.prev_length-1,h.prev_length-=2;do++h.strstart<=x&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+3-1])&h.hash_mask,j=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart);while(--h.prev_length!=0);if(h.match_available=0,h.match_length=2,h.strstart++,m&&(v(h,!1),h.strm.avail_out===0))return 1}else if(h.match_available){if((m=l._tr_tally(h,0,h.window[h.strstart-1]))&&v(h,!1),h.strstart++,h.lookahead--,h.strm.avail_out===0)return 1}else h.match_available=1,h.strstart++,h.lookahead--}return h.match_available&&(m=l._tr_tally(h,0,h.window[h.strstart-1]),h.match_available=0),h.insert=h.strstart<2?h.strstart:2,p===4?(v(h,!0),h.strm.avail_out===0?3:4):h.last_lit&&(v(h,!1),h.strm.avail_out===0)?1:2}function R(h,p,j,m,x){this.good_length=h,this.max_lazy=p,this.nice_length=j,this.max_chain=m,this.func=x}function d(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(1146),this.dyn_dtree=new o.Buf16(122),this.bl_tree=new o.Buf16(78),A(this.dyn_ltree),A(this.dyn_dtree),A(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(16),this.heap=new o.Buf16(573),A(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(573),A(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function I(h){var p;return h&&h.state?(h.total_in=h.total_out=0,h.data_type=2,(p=h.state).pending=0,p.pending_out=0,p.wrap<0&&(p.wrap=-p.wrap),p.status=p.wrap?42:113,h.adler=p.wrap===2?0:1,p.last_flush=0,l._tr_init(p),0):u(h,-2)}function Q(h){var p,j=I(h);return j===0&&((p=h.state).window_size=2*p.w_size,A(p.head),p.max_lazy_match=n[p.level].max_lazy,p.good_match=n[p.level].good_length,p.nice_match=n[p.level].nice_length,p.max_chain_length=n[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=2,p.match_available=0,p.ins_h=0),j}function Z(h,p,j,m,x,F){if(!h)return-2;var D=1;if(p===-1&&(p=6),m<0?(D=0,m=-m):m>15&&(D=2,m-=16),x<1||x>9||j!==8||m<8||m>15||p<0||p>9||F<0||F>4)return u(h,-2);m===8&&(m=9);var O=new d;return h.state=O,O.strm=h,O.wrap=D,O.gzhead=null,O.w_bits=m,O.w_size=1<<O.w_bits,O.w_mask=O.w_size-1,O.hash_bits=x+7,O.hash_size=1<<O.hash_bits,O.hash_mask=O.hash_size-1,O.hash_shift=~~((O.hash_bits+3-1)/3),O.window=new o.Buf8(2*O.w_size),O.head=new o.Buf16(O.hash_size),O.prev=new o.Buf16(O.w_size),O.lit_bufsize=1<<x+6,O.pending_buf_size=4*O.lit_bufsize,O.pending_buf=new o.Buf8(O.pending_buf_size),O.d_buf=1*O.lit_bufsize,O.l_buf=3*O.lit_bufsize,O.level=p,O.strategy=F,O.method=j,Q(h)}n=[new R(0,0,0,0,function(h,p){var j=65535;for(j>h.pending_buf_size-5&&(j=h.pending_buf_size-5);;){if(h.lookahead<=1){if(P(h),h.lookahead===0&&p===0)return 1;if(h.lookahead===0)break}h.strstart+=h.lookahead,h.lookahead=0;var m=h.block_start+j;if((h.strstart===0||h.strstart>=m)&&(h.lookahead=h.strstart-m,h.strstart=m,v(h,!1),h.strm.avail_out===0)||h.strstart-h.block_start>=h.w_size-262&&(v(h,!1),h.strm.avail_out===0))return 1}return h.insert=0,p===4?(v(h,!0),h.strm.avail_out===0?3:4):(h.strstart>h.block_start&&(v(h,!1),h.strm.avail_out),1)}),new R(4,4,8,4,N),new R(4,5,16,8,N),new R(4,6,32,32,N),new R(4,4,16,16,T),new R(8,16,32,32,T),new R(8,16,128,128,T),new R(8,32,128,256,T),new R(32,128,258,1024,T),new R(32,258,258,4096,T)],t.deflateInit=function(h,p){return Z(h,p,8,15,8,0)},t.deflateInit2=Z,t.deflateReset=Q,t.deflateResetKeep=I,t.deflateSetHeader=function(h,p){return h&&h.state?h.state.wrap!==2?-2:(h.state.gzhead=p,0):-2},t.deflate=function(h,p){var j,m,x,F;if(!h||!h.state||p>5||p<0)return h?u(h,-2):-2;if(m=h.state,!h.output||!h.input&&h.avail_in!==0||m.status===666&&p!==4)return u(h,h.avail_out===0?-5:-2);if(m.strm=h,j=m.last_flush,m.last_flush=p,m.status===42)if(m.wrap===2)h.adler=0,f(m,31),f(m,139),f(m,8),m.gzhead?(f(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),f(m,255&m.gzhead.time),f(m,m.gzhead.time>>8&255),f(m,m.gzhead.time>>16&255),f(m,m.gzhead.time>>24&255),f(m,m.level===9?2:m.strategy>=2||m.level<2?4:0),f(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(f(m,255&m.gzhead.extra.length),f(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(h.adler=i(h.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(f(m,0),f(m,0),f(m,0),f(m,0),f(m,0),f(m,m.level===9?2:m.strategy>=2||m.level<2?4:0),f(m,3),m.status=113);else{var D=8+(m.w_bits-8<<4)<<8;D|=(m.strategy>=2||m.level<2?0:m.level<6?1:m.level===6?2:3)<<6,m.strstart!==0&&(D|=32),D+=31-D%31,m.status=113,S(m,D),m.strstart!==0&&(S(m,h.adler>>>16),S(m,65535&h.adler)),h.adler=1}if(m.status===69)if(m.gzhead.extra){for(x=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),_(h),x=m.pending,m.pending!==m.pending_buf_size));)f(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(m.status===73)if(m.gzhead.name){x=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),_(h),x=m.pending,m.pending===m.pending_buf_size)){F=1;break}F=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0,f(m,F)}while(F!==0);m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),F===0&&(m.gzindex=0,m.status=91)}else m.status=91;if(m.status===91)if(m.gzhead.comment){x=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),_(h),x=m.pending,m.pending===m.pending_buf_size)){F=1;break}F=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0,f(m,F)}while(F!==0);m.gzhead.hcrc&&m.pending>x&&(h.adler=i(h.adler,m.pending_buf,m.pending-x,x)),F===0&&(m.status=103)}else m.status=103;if(m.status===103&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&_(h),m.pending+2<=m.pending_buf_size&&(f(m,255&h.adler),f(m,h.adler>>8&255),h.adler=0,m.status=113)):m.status=113),m.pending!==0){if(_(h),h.avail_out===0)return m.last_flush=-1,0}else if(h.avail_in===0&&b(p)<=b(j)&&p!==4)return u(h,-5);if(m.status===666&&h.avail_in!==0)return u(h,-5);if(h.avail_in!==0||m.lookahead!==0||p!==0&&m.status!==666){var O=m.strategy===2?function(L,k){for(var E;;){if(L.lookahead===0&&(P(L),L.lookahead===0)){if(k===0)return 1;break}if(L.match_length=0,E=l._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++,E&&(v(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,k===4?(v(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(v(L,!1),L.strm.avail_out===0)?1:2}(m,p):m.strategy===3?function(L,k){for(var E,g,U,B,G=L.window;;){if(L.lookahead<=258){if(P(L),L.lookahead<=258&&k===0)return 1;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=3&&L.strstart>0&&(g=G[U=L.strstart-1])===G[++U]&&g===G[++U]&&g===G[++U]){B=L.strstart+258;do;while(g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&g===G[++U]&&U<B);L.match_length=258-(B-U),L.match_length>L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=3?(E=l._tr_tally(L,1,L.match_length-3),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(E=l._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++),E&&(v(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,k===4?(v(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(v(L,!1),L.strm.avail_out===0)?1:2}(m,p):n[m.level].func(m,p);if(O!==3&&O!==4||(m.status=666),O===1||O===3)return h.avail_out===0&&(m.last_flush=-1),0;if(O===2&&(p===1?l._tr_align(m):p!==5&&(l._tr_stored_block(m,0,0,!1),p===3&&(A(m.head),m.lookahead===0&&(m.strstart=0,m.block_start=0,m.insert=0))),_(h),h.avail_out===0))return m.last_flush=-1,0}return p!==4?0:m.wrap<=0?1:(m.wrap===2?(f(m,255&h.adler),f(m,h.adler>>8&255),f(m,h.adler>>16&255),f(m,h.adler>>24&255),f(m,255&h.total_in),f(m,h.total_in>>8&255),f(m,h.total_in>>16&255),f(m,h.total_in>>24&255)):(S(m,h.adler>>>16),S(m,65535&h.adler)),_(h),m.wrap>0&&(m.wrap=-m.wrap),m.pending!==0?0:1)},t.deflateEnd=function(h){var p;return h&&h.state?(p=h.state.status)!==42&&p!==69&&p!==73&&p!==91&&p!==103&&p!==113&&p!==666?u(h,-2):(h.state=null,p===113?u(h,-3):0):-2},t.deflateSetDictionary=function(h,p){var j,m,x,F,D,O,L,k,E=p.length;if(!h||!h.state||(F=(j=h.state).wrap)===2||F===1&&j.status!==42||j.lookahead)return-2;for(F===1&&(h.adler=s(h.adler,p,E,0)),j.wrap=0,E>=j.w_size&&(F===0&&(A(j.head),j.strstart=0,j.block_start=0,j.insert=0),k=new o.Buf8(j.w_size),o.arraySet(k,p,E-j.w_size,j.w_size,0),p=k,E=j.w_size),D=h.avail_in,O=h.next_in,L=h.input,h.avail_in=E,h.next_in=0,h.input=p,P(j);j.lookahead>=3;){m=j.strstart,x=j.lookahead-2;do j.ins_h=(j.ins_h<<j.hash_shift^j.window[m+3-1])&j.hash_mask,j.prev[m&j.w_mask]=j.head[j.ins_h],j.head[j.ins_h]=m,m++;while(--x);j.strstart=m,j.lookahead=2,P(j)}return j.strstart+=j.lookahead,j.block_start=j.strstart,j.insert=j.lookahead,j.lookahead=0,j.match_length=j.prev_length=2,j.match_available=0,h.next_in=O,h.input=L,h.avail_in=D,j.wrap=F,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,r){var n=r(32);function o(g){for(var U=g.length;--U>=0;)g[U]=0}var l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);o(u);var b=new Array(60);o(b);var A=new Array(512);o(A);var _=new Array(256);o(_);var v=new Array(29);o(v);var f,S,w,P=new Array(30);function N(g,U,B,G,Y){this.static_tree=g,this.extra_bits=U,this.extra_base=B,this.elems=G,this.max_length=Y,this.has_stree=g&&g.length}function T(g,U){this.dyn_tree=g,this.max_code=0,this.stat_desc=U}function R(g){return g<256?A[g]:A[256+(g>>>7)]}function d(g,U){g.pending_buf[g.pending++]=255&U,g.pending_buf[g.pending++]=U>>>8&255}function I(g,U,B){g.bi_valid>16-B?(g.bi_buf|=U<<g.bi_valid&65535,d(g,g.bi_buf),g.bi_buf=U>>16-g.bi_valid,g.bi_valid+=B-16):(g.bi_buf|=U<<g.bi_valid&65535,g.bi_valid+=B)}function Q(g,U,B){I(g,B[2*U],B[2*U+1])}function Z(g,U){var B=0;do B|=1&g,g>>>=1,B<<=1;while(--U>0);return B>>>1}function h(g,U,B){var G,Y,K=new Array(16),H=0;for(G=1;G<=15;G++)K[G]=H=H+B[G-1]<<1;for(Y=0;Y<=U;Y++){var V=g[2*Y+1];V!==0&&(g[2*Y]=Z(K[V]++,V))}}function p(g){var U;for(U=0;U<286;U++)g.dyn_ltree[2*U]=0;for(U=0;U<30;U++)g.dyn_dtree[2*U]=0;for(U=0;U<19;U++)g.bl_tree[2*U]=0;g.dyn_ltree[512]=1,g.opt_len=g.static_len=0,g.last_lit=g.matches=0}function j(g){g.bi_valid>8?d(g,g.bi_buf):g.bi_valid>0&&(g.pending_buf[g.pending++]=g.bi_buf),g.bi_buf=0,g.bi_valid=0}function m(g,U,B,G){var Y=2*U,K=2*B;return g[Y]<g[K]||g[Y]===g[K]&&G[U]<=G[B]}function x(g,U,B){for(var G=g.heap[B],Y=B<<1;Y<=g.heap_len&&(Y<g.heap_len&&m(U,g.heap[Y+1],g.heap[Y],g.depth)&&Y++,!m(U,G,g.heap[Y],g.depth));)g.heap[B]=g.heap[Y],B=Y,Y<<=1;g.heap[B]=G}function F(g,U,B){var G,Y,K,H,V=0;if(g.last_lit!==0)do G=g.pending_buf[g.d_buf+2*V]<<8|g.pending_buf[g.d_buf+2*V+1],Y=g.pending_buf[g.l_buf+V],V++,G===0?Q(g,Y,U):(Q(g,(K=_[Y])+256+1,U),(H=l[K])!==0&&I(g,Y-=v[K],H),Q(g,K=R(--G),B),(H=s[K])!==0&&I(g,G-=P[K],H));while(V<g.last_lit);Q(g,256,U)}function D(g,U){var B,G,Y,K=U.dyn_tree,H=U.stat_desc.static_tree,V=U.stat_desc.has_stree,y=U.stat_desc.elems,C=-1;for(g.heap_len=0,g.heap_max=573,B=0;B<y;B++)K[2*B]!==0?(g.heap[++g.heap_len]=C=B,g.depth[B]=0):K[2*B+1]=0;for(;g.heap_len<2;)K[2*(Y=g.heap[++g.heap_len]=C<2?++C:0)]=1,g.depth[Y]=0,g.opt_len--,V&&(g.static_len-=H[2*Y+1]);for(U.max_code=C,B=g.heap_len>>1;B>=1;B--)x(g,K,B);Y=y;do B=g.heap[1],g.heap[1]=g.heap[g.heap_len--],x(g,K,1),G=g.heap[1],g.heap[--g.heap_max]=B,g.heap[--g.heap_max]=G,K[2*Y]=K[2*B]+K[2*G],g.depth[Y]=(g.depth[B]>=g.depth[G]?g.depth[B]:g.depth[G])+1,K[2*B+1]=K[2*G+1]=Y,g.heap[1]=Y++,x(g,K,1);while(g.heap_len>=2);g.heap[--g.heap_max]=g.heap[1],function(W,ee){var X,ne,ie,he,Se,we,Ee=ee.dyn_tree,ye=ee.max_code,q=ee.stat_desc.static_tree,$=ee.stat_desc.has_stree,te=ee.stat_desc.extra_bits,ue=ee.stat_desc.extra_base,ae=ee.stat_desc.max_length,de=0;for(he=0;he<=15;he++)W.bl_count[he]=0;for(Ee[2*W.heap[W.heap_max]+1]=0,X=W.heap_max+1;X<573;X++)(he=Ee[2*Ee[2*(ne=W.heap[X])+1]+1]+1)>ae&&(he=ae,de++),Ee[2*ne+1]=he,ne>ye||(W.bl_count[he]++,Se=0,ne>=ue&&(Se=te[ne-ue]),we=Ee[2*ne],W.opt_len+=we*(he+Se),$&&(W.static_len+=we*(q[2*ne+1]+Se)));if(de!==0){do{for(he=ae-1;W.bl_count[he]===0;)he--;W.bl_count[he]--,W.bl_count[he+1]+=2,W.bl_count[ae]--,de-=2}while(de>0);for(he=ae;he!==0;he--)for(ne=W.bl_count[he];ne!==0;)(ie=W.heap[--X])>ye||(Ee[2*ie+1]!==he&&(W.opt_len+=(he-Ee[2*ie+1])*Ee[2*ie],Ee[2*ie+1]=he),ne--)}}(g,U),h(K,C,g.bl_count)}function O(g,U,B){var G,Y,K=-1,H=U[1],V=0,y=7,C=4;for(H===0&&(y=138,C=3),U[2*(B+1)+1]=65535,G=0;G<=B;G++)Y=H,H=U[2*(G+1)+1],++V<y&&Y===H||(V<C?g.bl_tree[2*Y]+=V:Y!==0?(Y!==K&&g.bl_tree[2*Y]++,g.bl_tree[32]++):V<=10?g.bl_tree[34]++:g.bl_tree[36]++,V=0,K=Y,H===0?(y=138,C=3):Y===H?(y=6,C=3):(y=7,C=4))}function L(g,U,B){var G,Y,K=-1,H=U[1],V=0,y=7,C=4;for(H===0&&(y=138,C=3),G=0;G<=B;G++)if(Y=H,H=U[2*(G+1)+1],!(++V<y&&Y===H)){if(V<C)do Q(g,Y,g.bl_tree);while(--V!=0);else Y!==0?(Y!==K&&(Q(g,Y,g.bl_tree),V--),Q(g,16,g.bl_tree),I(g,V-3,2)):V<=10?(Q(g,17,g.bl_tree),I(g,V-3,3)):(Q(g,18,g.bl_tree),I(g,V-11,7));V=0,K=Y,H===0?(y=138,C=3):Y===H?(y=6,C=3):(y=7,C=4)}}o(P);var k=!1;function E(g,U,B,G){I(g,0+(G?1:0),3),function(Y,K,H,V){j(Y),V&&(d(Y,H),d(Y,~H)),n.arraySet(Y.pending_buf,Y.window,K,H,Y.pending),Y.pending+=H}(g,U,B,!0)}t._tr_init=function(g){k||(function(){var U,B,G,Y,K,H=new Array(16);for(G=0,Y=0;Y<28;Y++)for(v[Y]=G,U=0;U<1<<l[Y];U++)_[G++]=Y;for(_[G-1]=Y,K=0,Y=0;Y<16;Y++)for(P[Y]=K,U=0;U<1<<s[Y];U++)A[K++]=Y;for(K>>=7;Y<30;Y++)for(P[Y]=K<<7,U=0;U<1<<s[Y]-7;U++)A[256+K++]=Y;for(B=0;B<=15;B++)H[B]=0;for(U=0;U<=143;)u[2*U+1]=8,U++,H[8]++;for(;U<=255;)u[2*U+1]=9,U++,H[9]++;for(;U<=279;)u[2*U+1]=7,U++,H[7]++;for(;U<=287;)u[2*U+1]=8,U++,H[8]++;for(h(u,287,H),U=0;U<30;U++)b[2*U+1]=5,b[2*U]=Z(U,5);f=new N(u,l,257,286,15),S=new N(b,s,0,30,15),w=new N(new Array(0),i,0,19,7)}(),k=!0),g.l_desc=new T(g.dyn_ltree,f),g.d_desc=new T(g.dyn_dtree,S),g.bl_desc=new T(g.bl_tree,w),g.bi_buf=0,g.bi_valid=0,p(g)},t._tr_stored_block=E,t._tr_flush_block=function(g,U,B,G){var Y,K,H=0;g.level>0?(g.strm.data_type===2&&(g.strm.data_type=function(V){var y,C=4093624447;for(y=0;y<=31;y++,C>>>=1)if(1&C&&V.dyn_ltree[2*y]!==0)return 0;if(V.dyn_ltree[18]!==0||V.dyn_ltree[20]!==0||V.dyn_ltree[26]!==0)return 1;for(y=32;y<256;y++)if(V.dyn_ltree[2*y]!==0)return 1;return 0}(g)),D(g,g.l_desc),D(g,g.d_desc),H=function(V){var y;for(O(V,V.dyn_ltree,V.l_desc.max_code),O(V,V.dyn_dtree,V.d_desc.max_code),D(V,V.bl_desc),y=18;y>=3&&V.bl_tree[2*c[y]+1]===0;y--);return V.opt_len+=3*(y+1)+5+5+4,y}(g),Y=g.opt_len+3+7>>>3,(K=g.static_len+3+7>>>3)<=Y&&(Y=K)):Y=K=B+5,B+4<=Y&&U!==-1?E(g,U,B,G):g.strategy===4||K===Y?(I(g,2+(G?1:0),3),F(g,u,b)):(I(g,4+(G?1:0),3),function(V,y,C,W){var ee;for(I(V,y-257,5),I(V,C-1,5),I(V,W-4,4),ee=0;ee<W;ee++)I(V,V.bl_tree[2*c[ee]+1],3);L(V,V.dyn_ltree,y-1),L(V,V.dyn_dtree,C-1)}(g,g.l_desc.max_code+1,g.d_desc.max_code+1,H+1),F(g,g.dyn_ltree,g.dyn_dtree)),p(g),G&&j(g)},t._tr_tally=function(g,U,B){return g.pending_buf[g.d_buf+2*g.last_lit]=U>>>8&255,g.pending_buf[g.d_buf+2*g.last_lit+1]=255&U,g.pending_buf[g.l_buf+g.last_lit]=255&B,g.last_lit++,U===0?g.dyn_ltree[2*B]++:(g.matches++,U--,g.dyn_ltree[2*(_[B]+256+1)]++,g.dyn_dtree[2*R(U)]++),g.last_lit===g.lit_bufsize-1},t._tr_align=function(g){I(g,2,3),Q(g,256,u),function(U){U.bi_valid===16?(d(U,U.bi_buf),U.bi_buf=0,U.bi_valid=0):U.bi_valid>=8&&(U.pending_buf[U.pending++]=255&U.bi_buf,U.bi_buf>>=8,U.bi_valid-=8)}(g)}},function(e,t,r){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){var n=r(32),o=r(73),l=r(74),s=r(175),i=r(176);function c(T){return(T>>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(T){var R;return T&&T.state?(R=T.state,T.total_in=T.total_out=R.total=0,T.msg="",R.wrap&&(T.adler=1&R.wrap),R.mode=1,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new n.Buf32(852),R.distcode=R.distdyn=new n.Buf32(592),R.sane=1,R.back=-1,0):-2}function A(T){var R;return T&&T.state?((R=T.state).wsize=0,R.whave=0,R.wnext=0,b(T)):-2}function _(T,R){var d,I;return T&&T.state?(I=T.state,R<0?(d=0,R=-R):(d=1+(R>>4),R<48&&(R&=15)),R&&(R<8||R>15)?-2:(I.window!==null&&I.wbits!==R&&(I.window=null),I.wrap=d,I.wbits=R,A(T))):-2}function v(T,R){var d,I;return T?(I=new u,T.state=I,I.window=null,(d=_(T,R))!==0&&(T.state=null),d):-2}var f,S,w=!0;function P(T){if(w){var R;for(f=new n.Buf32(512),S=new n.Buf32(32),R=0;R<144;)T.lens[R++]=8;for(;R<256;)T.lens[R++]=9;for(;R<280;)T.lens[R++]=7;for(;R<288;)T.lens[R++]=8;for(i(1,T.lens,0,288,f,0,T.work,{bits:9}),R=0;R<32;)T.lens[R++]=5;i(2,T.lens,0,32,S,0,T.work,{bits:5}),w=!1}T.lencode=f,T.lenbits=9,T.distcode=S,T.distbits=5}function N(T,R,d,I){var Q,Z=T.state;return Z.window===null&&(Z.wsize=1<<Z.wbits,Z.wnext=0,Z.whave=0,Z.window=new n.Buf8(Z.wsize)),I>=Z.wsize?(n.arraySet(Z.window,R,d-Z.wsize,Z.wsize,0),Z.wnext=0,Z.whave=Z.wsize):((Q=Z.wsize-Z.wnext)>I&&(Q=I),n.arraySet(Z.window,R,d-I,Q,Z.wnext),(I-=Q)?(n.arraySet(Z.window,R,d-I,I,0),Z.wnext=I,Z.whave=Z.wsize):(Z.wnext+=Q,Z.wnext===Z.wsize&&(Z.wnext=0),Z.whave<Z.wsize&&(Z.whave+=Q))),0}t.inflateReset=A,t.inflateReset2=_,t.inflateResetKeep=b,t.inflateInit=function(T){return v(T,15)},t.inflateInit2=v,t.inflate=function(T,R){var d,I,Q,Z,h,p,j,m,x,F,D,O,L,k,E,g,U,B,G,Y,K,H,V,y,C=0,W=new n.Buf8(4),ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!T||!T.state||!T.output||!T.input&&T.avail_in!==0)return-2;(d=T.state).mode===12&&(d.mode=13),h=T.next_out,Q=T.output,j=T.avail_out,Z=T.next_in,I=T.input,p=T.avail_in,m=d.hold,x=d.bits,F=p,D=j,H=0;e:for(;;)switch(d.mode){case 1:if(d.wrap===0){d.mode=13;break}for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(2&d.wrap&&m===35615){d.check=0,W[0]=255&m,W[1]=m>>>8&255,d.check=l(d.check,W,2,0),m=0,x=0,d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&m)<<8)+(m>>8))%31){T.msg="incorrect header check",d.mode=30;break}if((15&m)!=8){T.msg="unknown compression method",d.mode=30;break}if(x-=4,K=8+(15&(m>>>=4)),d.wbits===0)d.wbits=K;else if(K>d.wbits){T.msg="invalid window size",d.mode=30;break}d.dmax=1<<K,T.adler=d.check=1,d.mode=512&m?10:12,m=0,x=0;break;case 2:for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(d.flags=m,(255&d.flags)!=8){T.msg="unknown compression method",d.mode=30;break}if(57344&d.flags){T.msg="unknown header flags set",d.mode=30;break}d.head&&(d.head.text=m>>8&1),512&d.flags&&(W[0]=255&m,W[1]=m>>>8&255,d.check=l(d.check,W,2,0)),m=0,x=0,d.mode=3;case 3:for(;x<32;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.head&&(d.head.time=m),512&d.flags&&(W[0]=255&m,W[1]=m>>>8&255,W[2]=m>>>16&255,W[3]=m>>>24&255,d.check=l(d.check,W,4,0)),m=0,x=0,d.mode=4;case 4:for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.head&&(d.head.xflags=255&m,d.head.os=m>>8),512&d.flags&&(W[0]=255&m,W[1]=m>>>8&255,d.check=l(d.check,W,2,0)),m=0,x=0,d.mode=5;case 5:if(1024&d.flags){for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.length=m,d.head&&(d.head.extra_len=m),512&d.flags&&(W[0]=255&m,W[1]=m>>>8&255,d.check=l(d.check,W,2,0)),m=0,x=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&((O=d.length)>p&&(O=p),O&&(d.head&&(K=d.head.extra_len-d.length,d.head.extra||(d.head.extra=new Array(d.head.extra_len)),n.arraySet(d.head.extra,I,Z,O,K)),512&d.flags&&(d.check=l(d.check,I,O,Z)),p-=O,Z+=O,d.length-=O),d.length))break e;d.length=0,d.mode=7;case 7:if(2048&d.flags){if(p===0)break e;O=0;do K=I[Z+O++],d.head&&K&&d.length<65536&&(d.head.name+=String.fromCharCode(K));while(K&&O<p);if(512&d.flags&&(d.check=l(d.check,I,O,Z)),p-=O,Z+=O,K)break e}else d.head&&(d.head.name=null);d.length=0,d.mode=8;case 8:if(4096&d.flags){if(p===0)break e;O=0;do K=I[Z+O++],d.head&&K&&d.length<65536&&(d.head.comment+=String.fromCharCode(K));while(K&&O<p);if(512&d.flags&&(d.check=l(d.check,I,O,Z)),p-=O,Z+=O,K)break e}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;x<16;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(m!==(65535&d.check)){T.msg="header crc mismatch",d.mode=30;break}m=0,x=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0),T.adler=d.check=0,d.mode=12;break;case 10:for(;x<32;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}T.adler=d.check=c(m),m=0,x=0,d.mode=11;case 11:if(d.havedict===0)return T.next_out=h,T.avail_out=j,T.next_in=Z,T.avail_in=p,d.hold=m,d.bits=x,2;T.adler=d.check=1,d.mode=12;case 12:if(R===5||R===6)break e;case 13:if(d.last){m>>>=7&x,x-=7&x,d.mode=27;break}for(;x<3;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}switch(d.last=1&m,x-=1,3&(m>>>=1)){case 0:d.mode=14;break;case 1:if(P(d),d.mode=20,R===6){m>>>=2,x-=2;break e}break;case 2:d.mode=17;break;case 3:T.msg="invalid block type",d.mode=30}m>>>=2,x-=2;break;case 14:for(m>>>=7&x,x-=7&x;x<32;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if((65535&m)!=(m>>>16^65535)){T.msg="invalid stored block lengths",d.mode=30;break}if(d.length=65535&m,m=0,x=0,d.mode=15,R===6)break e;case 15:d.mode=16;case 16:if(O=d.length){if(O>p&&(O=p),O>j&&(O=j),O===0)break e;n.arraySet(Q,I,Z,O,h),p-=O,Z+=O,j-=O,h+=O,d.length-=O;break}d.mode=12;break;case 17:for(;x<14;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(d.nlen=257+(31&m),m>>>=5,x-=5,d.ndist=1+(31&m),m>>>=5,x-=5,d.ncode=4+(15&m),m>>>=4,x-=4,d.nlen>286||d.ndist>30){T.msg="too many length or distance symbols",d.mode=30;break}d.have=0,d.mode=18;case 18:for(;d.have<d.ncode;){for(;x<3;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.lens[ee[d.have++]]=7&m,m>>>=3,x-=3}for(;d.have<19;)d.lens[ee[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,V={bits:d.lenbits},H=i(0,d.lens,0,19,d.lencode,0,d.work,V),d.lenbits=V.bits,H){T.msg="invalid code lengths set",d.mode=30;break}d.have=0,d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;g=(C=d.lencode[m&(1<<d.lenbits)-1])>>>16&255,U=65535&C,!((E=C>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(U<16)m>>>=E,x-=E,d.lens[d.have++]=U;else{if(U===16){for(y=E+2;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(m>>>=E,x-=E,d.have===0){T.msg="invalid bit length repeat",d.mode=30;break}K=d.lens[d.have-1],O=3+(3&m),m>>>=2,x-=2}else if(U===17){for(y=E+3;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}x-=E,K=0,O=3+(7&(m>>>=E)),m>>>=3,x-=3}else{for(y=E+7;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}x-=E,K=0,O=11+(127&(m>>>=E)),m>>>=7,x-=7}if(d.have+O>d.nlen+d.ndist){T.msg="invalid bit length repeat",d.mode=30;break}for(;O--;)d.lens[d.have++]=K}}if(d.mode===30)break;if(d.lens[256]===0){T.msg="invalid code -- missing end-of-block",d.mode=30;break}if(d.lenbits=9,V={bits:d.lenbits},H=i(1,d.lens,0,d.nlen,d.lencode,0,d.work,V),d.lenbits=V.bits,H){T.msg="invalid literal/lengths set",d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,V={bits:d.distbits},H=i(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,V),d.distbits=V.bits,H){T.msg="invalid distances set",d.mode=30;break}if(d.mode=20,R===6)break e;case 20:d.mode=21;case 21:if(p>=6&&j>=258){T.next_out=h,T.avail_out=j,T.next_in=Z,T.avail_in=p,d.hold=m,d.bits=x,s(T,D),h=T.next_out,Q=T.output,j=T.avail_out,Z=T.next_in,I=T.input,p=T.avail_in,m=d.hold,x=d.bits,d.mode===12&&(d.back=-1);break}for(d.back=0;g=(C=d.lencode[m&(1<<d.lenbits)-1])>>>16&255,U=65535&C,!((E=C>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(g&&(240&g)==0){for(B=E,G=g,Y=U;g=(C=d.lencode[Y+((m&(1<<B+G)-1)>>B)])>>>16&255,U=65535&C,!(B+(E=C>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}m>>>=B,x-=B,d.back+=B}if(m>>>=E,x-=E,d.back+=E,d.length=U,g===0){d.mode=26;break}if(32&g){d.back=-1,d.mode=12;break}if(64&g){T.msg="invalid literal/length code",d.mode=30;break}d.extra=15&g,d.mode=22;case 22:if(d.extra){for(y=d.extra;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.length+=m&(1<<d.extra)-1,m>>>=d.extra,x-=d.extra,d.back+=d.extra}d.was=d.length,d.mode=23;case 23:for(;g=(C=d.distcode[m&(1<<d.distbits)-1])>>>16&255,U=65535&C,!((E=C>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if((240&g)==0){for(B=E,G=g,Y=U;g=(C=d.distcode[Y+((m&(1<<B+G)-1)>>B)])>>>16&255,U=65535&C,!(B+(E=C>>>24)<=x);){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}m>>>=B,x-=B,d.back+=B}if(m>>>=E,x-=E,d.back+=E,64&g){T.msg="invalid distance code",d.mode=30;break}d.offset=U,d.extra=15&g,d.mode=24;case 24:if(d.extra){for(y=d.extra;x<y;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}d.offset+=m&(1<<d.extra)-1,m>>>=d.extra,x-=d.extra,d.back+=d.extra}if(d.offset>d.dmax){T.msg="invalid distance too far back",d.mode=30;break}d.mode=25;case 25:if(j===0)break e;if(O=D-j,d.offset>O){if((O=d.offset-O)>d.whave&&d.sane){T.msg="invalid distance too far back",d.mode=30;break}O>d.wnext?(O-=d.wnext,L=d.wsize-O):L=d.wnext-O,O>d.length&&(O=d.length),k=d.window}else k=Q,L=h-d.offset,O=d.length;O>j&&(O=j),j-=O,d.length-=O;do Q[h++]=k[L++];while(--O);d.length===0&&(d.mode=21);break;case 26:if(j===0)break e;Q[h++]=d.length,j--,d.mode=21;break;case 27:if(d.wrap){for(;x<32;){if(p===0)break e;p--,m|=I[Z++]<<x,x+=8}if(D-=j,T.total_out+=D,d.total+=D,D&&(T.adler=d.check=d.flags?l(d.check,Q,D,h-D):o(d.check,Q,D,h-D)),D=j,(d.flags?m:c(m))!==d.check){T.msg="incorrect data check",d.mode=30;break}m=0,x=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;x<32;){if(p===0)break e;p--,m+=I[Z++]<<x,x+=8}if(m!==(4294967295&d.total)){T.msg="incorrect length check",d.mode=30;break}m=0,x=0}d.mode=29;case 29:H=1;break e;case 30:H=-3;break e;case 31:return-4;case 32:default:return-2}return T.next_out=h,T.avail_out=j,T.next_in=Z,T.avail_in=p,d.hold=m,d.bits=x,(d.wsize||D!==T.avail_out&&d.mode<30&&(d.mode<27||R!==4))&&N(T,T.output,T.next_out,D-T.avail_out)?(d.mode=31,-4):(F-=T.avail_in,D-=T.avail_out,T.total_in+=F,T.total_out+=D,d.total+=D,d.wrap&&D&&(T.adler=d.check=d.flags?l(d.check,Q,D,T.next_out-D):o(d.check,Q,D,T.next_out-D)),T.data_type=d.bits+(d.last?64:0)+(d.mode===12?128:0)+(d.mode===20||d.mode===15?256:0),(F===0&&D===0||R===4)&&H===0&&(H=-5),H)},t.inflateEnd=function(T){if(!T||!T.state)return-2;var R=T.state;return R.window&&(R.window=null),T.state=null,0},t.inflateGetHeader=function(T,R){var d;return T&&T.state?(2&(d=T.state).wrap)==0?-2:(d.head=R,R.done=!1,0):-2},t.inflateSetDictionary=function(T,R){var d,I=R.length;return T&&T.state?(d=T.state).wrap!==0&&d.mode!==11?-2:d.mode===11&&o(1,R,I,0)!==d.check?-3:N(T,R,I,I)?(d.mode=31,-4):(d.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,r){e.exports=function(n,o){var l,s,i,c,u,b,A,_,v,f,S,w,P,N,T,R,d,I,Q,Z,h,p,j,m,x;l=n.state,s=n.next_in,m=n.input,i=s+(n.avail_in-5),c=n.next_out,x=n.output,u=c-(o-n.avail_out),b=c+(n.avail_out-257),A=l.dmax,_=l.wsize,v=l.whave,f=l.wnext,S=l.window,w=l.hold,P=l.bits,N=l.lencode,T=l.distcode,R=(1<<l.lenbits)-1,d=(1<<l.distbits)-1;e:do{P<15&&(w+=m[s++]<<P,P+=8,w+=m[s++]<<P,P+=8),I=N[w&R];t:for(;;){if(w>>>=Q=I>>>24,P-=Q,(Q=I>>>16&255)===0)x[c++]=65535&I;else{if(!(16&Q)){if((64&Q)==0){I=N[(65535&I)+(w&(1<<Q)-1)];continue t}if(32&Q){l.mode=12;break e}n.msg="invalid literal/length code",l.mode=30;break e}Z=65535&I,(Q&=15)&&(P<Q&&(w+=m[s++]<<P,P+=8),Z+=w&(1<<Q)-1,w>>>=Q,P-=Q),P<15&&(w+=m[s++]<<P,P+=8,w+=m[s++]<<P,P+=8),I=T[w&d];r:for(;;){if(w>>>=Q=I>>>24,P-=Q,!(16&(Q=I>>>16&255))){if((64&Q)==0){I=T[(65535&I)+(w&(1<<Q)-1)];continue r}n.msg="invalid distance code",l.mode=30;break e}if(h=65535&I,P<(Q&=15)&&(w+=m[s++]<<P,(P+=8)<Q&&(w+=m[s++]<<P,P+=8)),(h+=w&(1<<Q)-1)>A){n.msg="invalid distance too far back",l.mode=30;break e}if(w>>>=Q,P-=Q,h>(Q=c-u)){if((Q=h-Q)>v&&l.sane){n.msg="invalid distance too far back",l.mode=30;break e}if(p=0,j=S,f===0){if(p+=_-Q,Q<Z){Z-=Q;do x[c++]=S[p++];while(--Q);p=c-h,j=x}}else if(f<Q){if(p+=_+f-Q,(Q-=f)<Z){Z-=Q;do x[c++]=S[p++];while(--Q);if(p=0,f<Z){Z-=Q=f;do x[c++]=S[p++];while(--Q);p=c-h,j=x}}}else if(p+=f-Q,Q<Z){Z-=Q;do x[c++]=S[p++];while(--Q);p=c-h,j=x}for(;Z>2;)x[c++]=j[p++],x[c++]=j[p++],x[c++]=j[p++],Z-=3;Z&&(x[c++]=j[p++],Z>1&&(x[c++]=j[p++]))}else{p=c-h;do x[c++]=x[p++],x[c++]=x[p++],x[c++]=x[p++],Z-=3;while(Z>2);Z&&(x[c++]=x[p++],Z>1&&(x[c++]=x[p++]))}break}}break}}while(s<i&&c<b);s-=Z=P>>3,w&=(1<<(P-=Z<<3))-1,n.next_in=s,n.next_out=c,n.avail_in=s<i?i-s+5:5-(s-i),n.avail_out=c<b?b-c+257:257-(c-b),l.hold=w,l.bits=P}},function(e,t,r){var n=r(32),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],i=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(c,u,b,A,_,v,f,S){var w,P,N,T,R,d,I,Q,Z,h=S.bits,p=0,j=0,m=0,x=0,F=0,D=0,O=0,L=0,k=0,E=0,g=null,U=0,B=new n.Buf16(16),G=new n.Buf16(16),Y=null,K=0;for(p=0;p<=15;p++)B[p]=0;for(j=0;j<A;j++)B[u[b+j]]++;for(F=h,x=15;x>=1&&B[x]===0;x--);if(F>x&&(F=x),x===0)return _[v++]=20971520,_[v++]=20971520,S.bits=1,0;for(m=1;m<x&&B[m]===0;m++);for(F<m&&(F=m),L=1,p=1;p<=15;p++)if(L<<=1,(L-=B[p])<0)return-1;if(L>0&&(c===0||x!==1))return-1;for(G[1]=0,p=1;p<15;p++)G[p+1]=G[p]+B[p];for(j=0;j<A;j++)u[b+j]!==0&&(f[G[u[b+j]]++]=j);if(c===0?(g=Y=f,d=19):c===1?(g=o,U-=257,Y=l,K-=257,d=256):(g=s,Y=i,d=-1),E=0,j=0,p=m,R=v,D=F,O=0,N=-1,T=(k=1<<F)-1,c===1&&k>852||c===2&&k>592)return 1;for(;;){I=p-O,f[j]<d?(Q=0,Z=f[j]):f[j]>d?(Q=Y[K+f[j]],Z=g[U+f[j]]):(Q=96,Z=0),w=1<<p-O,m=P=1<<D;do _[R+(E>>O)+(P-=w)]=I<<24|Q<<16|Z|0;while(P!==0);for(w=1<<p-1;E&w;)w>>=1;if(w!==0?(E&=w-1,E+=w):E=0,j++,--B[p]==0){if(p===x)break;p=u[b+f[j]]}if(p>F&&(E&T)!==N){for(O===0&&(O=F),R+=m,L=1<<(D=p-O);D+O<x&&!((L-=B[D+O])<=0);)D++,L<<=1;if(k+=1<<D,c===1&&k>852||c===2&&k>592)return 1;_[N=E&T]=F<<24|D<<16|R-v|0}}return E!==0&&(_[R+E]=p-O<<24|64<<16|0),S.bits=F,0}},function(e,t,r){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t){},function(e,t,r){function n(u,b){var A=Object.keys(u);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(u);b&&(_=_.filter(function(v){return Object.getOwnPropertyDescriptor(u,v).enumerable})),A.push.apply(A,_)}return A}function o(u,b,A){return b in u?Object.defineProperty(u,b,{value:A,enumerable:!0,configurable:!0,writable:!0}):u[b]=A,u}function l(u,b){for(var A=0;A<b.length;A++){var _=b[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(u,_.key,_)}}var s=r(4).Buffer,i=r(180).inspect,c=i&&i.custom||"inspect";e.exports=function(){function u(){(function(_,v){if(!(_ instanceof v))throw new TypeError("Cannot call a class as a function")})(this,u),this.head=null,this.tail=null,this.length=0}var b,A;return b=u,(A=[{key:"push",value:function(_){var v={data:_,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(_){var v={data:_,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var _=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,_}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(_){if(this.length===0)return"";for(var v=this.head,f=""+v.data;v=v.next;)f+=_+v.data;return f}},{key:"concat",value:function(_){if(this.length===0)return s.alloc(0);for(var v,f,S,w=s.allocUnsafe(_>>>0),P=this.head,N=0;P;)v=P.data,f=w,S=N,s.prototype.copy.call(v,f,S),N+=P.data.length,P=P.next;return w}},{key:"consume",value:function(_,v){var f;return _<this.head.data.length?(f=this.head.data.slice(0,_),this.head.data=this.head.data.slice(_)):f=_===this.head.data.length?this.shift():v?this._getString(_):this._getBuffer(_),f}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(_){var v=this.head,f=1,S=v.data;for(_-=S.length;v=v.next;){var w=v.data,P=_>w.length?w.length:_;if(P===w.length?S+=w:S+=w.slice(0,_),(_-=P)==0){P===w.length?(++f,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=w.slice(P));break}++f}return this.length-=f,S}},{key:"_getBuffer",value:function(_){var v=s.allocUnsafe(_),f=this.head,S=1;for(f.data.copy(v),_-=f.data.length;f=f.next;){var w=f.data,P=_>w.length?w.length:_;if(w.copy(v,v.length-_,0,P),(_-=P)==0){P===w.length?(++S,f.next?this.head=f.next:this.head=this.tail=null):(this.head=f,f.data=w.slice(P));break}++S}return this.length-=S,v}},{key:c,value:function(_,v){return i(this,function(f){for(var S=1;S<arguments.length;S++){var w=arguments[S]!=null?arguments[S]:{};S%2?n(Object(w),!0).forEach(function(P){o(f,P,w[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(w)):n(Object(w)).forEach(function(P){Object.defineProperty(f,P,Object.getOwnPropertyDescriptor(w,P))})}return f}({},v,{depth:0,customInspect:!1}))}}])&&l(b.prototype,A),u}()},function(e,t){},function(e,t,r){(function(n){var o;function l(T,R,d){return R in T?Object.defineProperty(T,R,{value:d,enumerable:!0,configurable:!0,writable:!0}):T[R]=d,T}var s=r(45),i=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),b=Symbol("ended"),A=Symbol("lastPromise"),_=Symbol("handlePromise"),v=Symbol("stream");function f(T,R){return{value:T,done:R}}function S(T){var R=T[i];if(R!==null){var d=T[v].read();d!==null&&(T[A]=null,T[i]=null,T[c]=null,R(f(d,!1)))}}function w(T){n.nextTick(S,T)}var P=Object.getPrototypeOf(function(){}),N=Object.setPrototypeOf((l(o={get stream(){return this[v]},next:function(){var T=this,R=this[u];if(R!==null)return Promise.reject(R);if(this[b])return Promise.resolve(f(void 0,!0));if(this[v].destroyed)return new Promise(function(Z,h){n.nextTick(function(){T[u]?h(T[u]):Z(f(void 0,!0))})});var d,I=this[A];if(I)d=new Promise(function(Z,h){return function(p,j){Z.then(function(){h[b]?p(f(void 0,!0)):h[_](p,j)},j)}}(I,this));else{var Q=this[v].read();if(Q!==null)return Promise.resolve(f(Q,!1));d=new Promise(this[_])}return this[A]=d,d}},Symbol.asyncIterator,function(){return this}),l(o,"return",function(){var T=this;return new Promise(function(R,d){T[v].destroy(null,function(I){I?d(I):R(f(void 0,!0))})})}),o),P);e.exports=function(T){var R,d=Object.create(N,(l(R={},v,{value:T,writable:!0}),l(R,i,{value:null,writable:!0}),l(R,c,{value:null,writable:!0}),l(R,u,{value:null,writable:!0}),l(R,b,{value:T._readableState.endEmitted,writable:!0}),l(R,_,{value:function(I,Q){var Z=d[v].read();Z?(d[A]=null,d[i]=null,d[c]=null,I(f(Z,!1))):(d[i]=I,d[c]=Q)},writable:!0}),R));return d[A]=null,s(T,function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q=d[c];return Q!==null&&(d[A]=null,d[i]=null,d[c]=null,Q(I)),void(d[u]=I)}var Z=d[i];Z!==null&&(d[A]=null,d[i]=null,d[c]=null,Z(f(void 0,!0))),d[b]=!0}),T.on("readable",w.bind(null,d)),d}}).call(this,r(2))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,r){e.exports=o;var n=r(80);function o(l){if(!(this instanceof o))return new o(l);n.call(this,l)}r(7)(o,n),o.prototype._transform=function(l,s,i){i(null,l)}},function(e,t,r){var n,o=r(23).codes,l=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function i(_){if(_)throw _}function c(_,v,f,S){S=function(N){var T=!1;return function(){T||(T=!0,N.apply(void 0,arguments))}}(S);var w=!1;_.on("close",function(){w=!0}),n===void 0&&(n=r(45)),n(_,{readable:v,writable:f},function(N){if(N)return S(N);w=!0,S()});var P=!1;return function(N){if(!w&&!P)return P=!0,function(T){return T.setHeader&&typeof T.abort=="function"}(_)?_.abort():typeof _.destroy=="function"?_.destroy():void S(N||new s("pipe"))}}function u(_){_()}function b(_,v){return _.pipe(v)}function A(_){return _.length?typeof _[_.length-1]!="function"?i:_.pop():i}e.exports=function(){for(var _=arguments.length,v=new Array(_),f=0;f<_;f++)v[f]=arguments[f];var S,w=A(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new l("streams");var P=v.map(function(N,T){var R=T<v.length-1;return c(N,R,T>0,function(d){S||(S=d),d&&P.forEach(u),R||(P.forEach(u),w(S))})});return v.reduce(b)}},function(e,t,r){var n=r(186)(function o(l,s){return(s=s||{}).namespace=l,s.prod=!0,s.dev=!1,s.force||o.force?o.yep(s):o.nope(s)});e.exports=n},function(e,t){var r=[],n=[],o=function(){};function l(f){return!~r.indexOf(f)&&(r.push(f),!0)}function s(f){o=f}function i(f){for(var S=[],w=0;w<r.length;w++)if(r[w].async)S.push(r[w]);else if(r[w](f))return!0;return!!S.length&&new Promise(function(P){Promise.all(S.map(function(N){return N(f)})).then(function(N){P(N.some(Boolean))})})}function c(f){return!~n.indexOf(f)&&(n.push(f),!0)}function u(){o.apply(o,arguments)}function b(f){for(var S=0;S<n.length;S++)f=n[S].apply(n[S],arguments);return f}function A(f,S){var w=Object.prototype.hasOwnProperty;for(var P in S)w.call(S,P)&&(f[P]=S[P]);return f}function _(f){return f.enabled=!1,f.modify=c,f.set=s,f.use=l,A(function(){return!1},f)}function v(f){return f.enabled=!0,f.modify=c,f.set=s,f.use=l,A(function(){var S=Array.prototype.slice.call(arguments,0);return u.call(u,f,b(S,f)),!0},f)}e.exports=function(f){return f.introduce=A,f.enabled=i,f.process=b,f.modify=c,f.write=u,f.nope=_,f.yep=v,f.set=s,f.use=l,f}},function(e,t,r){(function(n){var o=r(63),l=r(19).StringDecoder,s=r(28).Stream;function i(){}e.exports=function(c,u){var b=n.alloc(65536),A=new l("utf8"),_=new s,v="",f=0,S=0;return c.start===-1&&delete c.start,_.readable=!0,_.destroy=function(){_.destroyed=!0,_.emit("end"),_.emit("close")},o.open(c.file,"a+","0644",function(w,P){if(w)return u?u(w):_.emit("error",w),void _.destroy();(function N(){if(!_.destroyed)return o.read(P,b,0,b.length,f,function(T,R){if(T)return u?u(T):_.emit("error",T),void _.destroy();if(!R)return v&&((c.start==null||S>c.start)&&(u?u(null,v):_.emit("line",v)),S++,v=""),setTimeout(N,1e3);var d=A.write(b.slice(0,R));u||_.emit("data",d);for(var I=(d=(v+d).split(/\n+/)).length-1,Q=0;Q<I;Q++)(c.start==null||S>c.start)&&(u?u(null,d[Q]):_.emit("line",d[Q])),S++;return v=d[I],f+=R,N()});o.close(P,i)})()}),u?_.destroy:_}}).call(this,r(4).Buffer)},function(e,t,r){(function(n,o){function l(T){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(T)}function s(T,R){var d=Object.keys(T);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(T);R&&(I=I.filter(function(Q){return Object.getOwnPropertyDescriptor(T,Q).enumerable})),d.push.apply(d,I)}return d}function i(T){for(var R=1;R<arguments.length;R++){var d=arguments[R]!=null?arguments[R]:{};R%2?s(Object(d),!0).forEach(function(I){c(T,I,d[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(d)):s(Object(d)).forEach(function(I){Object.defineProperty(T,I,Object.getOwnPropertyDescriptor(d,I))})}return T}function c(T,R,d){return R in T?Object.defineProperty(T,R,{value:d,enumerable:!0,configurable:!0,writable:!0}):T[R]=d,T}function u(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")}function b(T,R){for(var d=0;d<R.length;d++){var I=R[d];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(T,I.key,I)}}function A(T,R){return(A=Object.setPrototypeOf||function(d,I){return d.__proto__=I,d})(T,R)}function _(T){var R=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var d,I=f(T);if(R){var Q=f(this).constructor;d=Reflect.construct(I,arguments,Q)}else d=I.apply(this,arguments);return v(this,d)}}function v(T,R){return!R||l(R)!=="object"&&typeof R!="function"?function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(T):R}function f(T){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(T)}var S=r(81),w=r(199),P=r(28).Stream,N=r(17);e.exports=function(T){(function(Z,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");Z.prototype=Object.create(h&&h.prototype,{constructor:{value:Z,writable:!0,configurable:!0}}),h&&A(Z,h)})(Q,T);var R,d,I=_(Q);function Q(){var Z,h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return u(this,Q),(Z=I.call(this,h)).options=h,Z.name=h.name||"http",Z.ssl=!!h.ssl,Z.host=h.host||"localhost",Z.port=h.port,Z.auth=h.auth,Z.path=h.path||"",Z.agent=h.agent,Z.headers=h.headers||{},Z.headers["content-type"]="application/json",Z.port||(Z.port=Z.ssl?443:80),Z}return R=Q,(d=[{key:"log",value:function(Z,h){var p=this;this._request(Z,function(j,m){m&&m.statusCode!==200&&(j=new Error("Invalid HTTP Status Code: ".concat(m.statusCode))),j?p.emit("warn",j):p.emit("logged",Z)}),h&&n(h)}},{key:"query",value:function(Z,h){typeof Z=="function"&&(h=Z,Z={}),(Z={method:"query",params:this.normalizeQuery(Z)}).params.path&&(Z.path=Z.params.path,delete Z.params.path),Z.params.auth&&(Z.auth=Z.params.auth,delete Z.params.auth),this._request(Z,function(p,j,m){if(j&&j.statusCode!==200&&(p=new Error("Invalid HTTP Status Code: ".concat(j.statusCode))),p)return h(p);if(typeof m=="string")try{m=JSON.parse(m)}catch(x){return h(x)}h(null,m)})}},{key:"stream",value:function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=new P;(Z={method:"stream",params:Z}).params.path&&(Z.path=Z.params.path,delete Z.params.path),Z.params.auth&&(Z.auth=Z.params.auth,delete Z.params.auth);var p="",j=this._request(Z);return h.destroy=function(){return j.destroy()},j.on("data",function(m){for(var x=(m=(p+m).split(/\n+/)).length-1,F=0;F<x;F++)try{h.emit("log",JSON.parse(m[F]))}catch(D){h.emit("error",D)}p=m[x]}),j.on("error",function(m){return h.emit("error",m)}),h}},{key:"_request",value:function(Z,h){var p=(Z=Z||{}).auth||this.auth,j=Z.path||this.path||"";delete Z.auth,delete Z.path;var m=Object.assign({},this.headers);p&&p.bearer&&(m.Authorization="Bearer ".concat(p.bearer));var x=(this.ssl?w:S).request(i(i({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(j.replace(/^\//,"")),headers:m,auth:p&&p.username&&p.password?"".concat(p.username,":").concat(p.password):"",agent:this.agent}));x.on("error",h),x.on("response",function(F){return F.on("end",function(){return h(null,F)}).resume()}),x.end(o.from(JSON.stringify(Z),"utf8"))}}])&&b(R.prototype,d),Q}(N)}).call(this,r(12).setImmediate,r(4).Buffer)},function(e,t,r){(function(n,o,l){var s=r(82),i=r(7),c=r(83),u=r(27),b=r(190),A=c.IncomingMessage,_=c.readyStates,v=e.exports=function(S){var w,P=this;u.Writable.call(P),P._opts=S,P._body=[],P._headers={},S.auth&&P.setHeader("Authorization","Basic "+new n(S.auth).toString("base64")),Object.keys(S.headers).forEach(function(T){P.setHeader(T,S.headers[T])});var N=!0;if(S.mode==="disable-fetch"||"requestTimeout"in S&&!s.abortController)N=!1,w=!0;else if(S.mode==="prefer-streaming")w=!1;else if(S.mode==="allow-wrong-content-type")w=!s.overrideMimeType;else{if(S.mode&&S.mode!=="default"&&S.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");w=!0}P._mode=function(T,R){return s.fetch&&R?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&T?"arraybuffer":s.vbArray&&T?"text:vbarray":"text"}(w,N),P._fetchTimer=null,P.on("finish",function(){P._onFinish()})};i(v,u.Writable),v.prototype.setHeader=function(S,w){var P=S.toLowerCase();f.indexOf(P)===-1&&(this._headers[P]={name:S,value:w})},v.prototype.getHeader=function(S){var w=this._headers[S.toLowerCase()];return w?w.value:null},v.prototype.removeHeader=function(S){delete this._headers[S.toLowerCase()]},v.prototype._onFinish=function(){var S=this;if(!S._destroyed){var w=S._opts,P=S._headers,N=null;w.method!=="GET"&&w.method!=="HEAD"&&(N=s.arraybuffer?b(n.concat(S._body)):s.blobConstructor?new o.Blob(S._body.map(function(Q){return b(Q)}),{type:(P["content-type"]||{}).value||""}):n.concat(S._body).toString());var T=[];if(Object.keys(P).forEach(function(Q){var Z=P[Q].name,h=P[Q].value;Array.isArray(h)?h.forEach(function(p){T.push([Z,p])}):T.push([Z,h])}),S._mode==="fetch"){var R=null;if(s.abortController){var d=new AbortController;R=d.signal,S._fetchAbortController=d,"requestTimeout"in w&&w.requestTimeout!==0&&(S._fetchTimer=o.setTimeout(function(){S.emit("requestTimeout"),S._fetchAbortController&&S._fetchAbortController.abort()},w.requestTimeout))}o.fetch(S._opts.url,{method:S._opts.method,headers:T,body:N||void 0,mode:"cors",credentials:w.withCredentials?"include":"same-origin",signal:R}).then(function(Q){S._fetchResponse=Q,S._connect()},function(Q){o.clearTimeout(S._fetchTimer),S._destroyed||S.emit("error",Q)})}else{var I=S._xhr=new o.XMLHttpRequest;try{I.open(S._opts.method,S._opts.url,!0)}catch(Q){return void l.nextTick(function(){S.emit("error",Q)})}"responseType"in I&&(I.responseType=S._mode.split(":")[0]),"withCredentials"in I&&(I.withCredentials=!!w.withCredentials),S._mode==="text"&&"overrideMimeType"in I&&I.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in w&&(I.timeout=w.requestTimeout,I.ontimeout=function(){S.emit("requestTimeout")}),T.forEach(function(Q){I.setRequestHeader(Q[0],Q[1])}),S._response=null,I.onreadystatechange=function(){switch(I.readyState){case _.LOADING:case _.DONE:S._onXHRProgress()}},S._mode==="moz-chunked-arraybuffer"&&(I.onprogress=function(){S._onXHRProgress()}),I.onerror=function(){S._destroyed||S.emit("error",new Error("XHR error"))};try{I.send(N)}catch(Q){return void l.nextTick(function(){S.emit("error",Q)})}}}},v.prototype._onXHRProgress=function(){(function(S){try{var w=S.status;return w!==null&&w!==0}catch{return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},v.prototype._connect=function(){var S=this;S._destroyed||(S._response=new A(S._xhr,S._fetchResponse,S._mode,S._fetchTimer),S._response.on("error",function(w){S.emit("error",w)}),S.emit("response",S._response))},v.prototype._write=function(S,w,P){this._body.push(S),P()},v.prototype.abort=v.prototype.destroy=function(){this._destroyed=!0,o.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},v.prototype.end=function(S,w,P){typeof S=="function"&&(P=S,S=void 0),u.Writable.prototype.end.call(this,S,w,P)},v.prototype.flushHeaders=function(){},v.prototype.setTimeout=function(){},v.prototype.setNoDelay=function(){},v.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(4).Buffer,r(5),r(2))},function(e,t,r){var n=r(4).Buffer;e.exports=function(o){if(o instanceof Uint8Array){if(o.byteOffset===0&&o.byteLength===o.buffer.byteLength)return o.buffer;if(typeof o.buffer.slice=="function")return o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength)}if(n.isBuffer(o)){for(var l=new Uint8Array(o.length),s=o.length,i=0;i<s;i++)l[i]=o[i];return l.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var n={},o=0;o<arguments.length;o++){var l=arguments[o];for(var s in l)r.call(l,s)&&(n[s]=l[s])}return n};var r=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,r){(function(n,o){var l;(function(s){t&&t.nodeType,n&&n.nodeType;var i=typeof o=="object"&&o;i.global!==i&&i.window!==i&&i.self;var c,u=2147483647,b=/^xn--/,A=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,S=String.fromCharCode;function w(h){throw new RangeError(v[h])}function P(h,p){for(var j=h.length,m=[];j--;)m[j]=p(h[j]);return m}function N(h,p){var j=h.split("@"),m="";return j.length>1&&(m=j[0]+"@",h=j[1]),m+P((h=h.replace(_,".")).split("."),p).join(".")}function T(h){for(var p,j,m=[],x=0,F=h.length;x<F;)(p=h.charCodeAt(x++))>=55296&&p<=56319&&x<F?(64512&(j=h.charCodeAt(x++)))==56320?m.push(((1023&p)<<10)+(1023&j)+65536):(m.push(p),x--):m.push(p);return m}function R(h){return P(h,function(p){var j="";return p>65535&&(j+=S((p-=65536)>>>10&1023|55296),p=56320|1023&p),j+=S(p)}).join("")}function d(h,p){return h+22+75*(h<26)-((p!=0)<<5)}function I(h,p,j){var m=0;for(h=j?f(h/700):h>>1,h+=f(h/p);h>455;m+=36)h=f(h/35);return f(m+36*h/(h+38))}function Q(h){var p,j,m,x,F,D,O,L,k,E,g,U=[],B=h.length,G=0,Y=128,K=72;for((j=h.lastIndexOf("-"))<0&&(j=0),m=0;m<j;++m)h.charCodeAt(m)>=128&&w("not-basic"),U.push(h.charCodeAt(m));for(x=j>0?j+1:0;x<B;){for(F=G,D=1,O=36;x>=B&&w("invalid-input"),((L=(g=h.charCodeAt(x++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:36)>=36||L>f((u-G)/D))&&w("overflow"),G+=L*D,!(L<(k=O<=K?1:O>=K+26?26:O-K));O+=36)D>f(u/(E=36-k))&&w("overflow"),D*=E;K=I(G-F,p=U.length+1,F==0),f(G/p)>u-Y&&w("overflow"),Y+=f(G/p),G%=p,U.splice(G++,0,Y)}return R(U)}function Z(h){var p,j,m,x,F,D,O,L,k,E,g,U,B,G,Y,K=[];for(U=(h=T(h)).length,p=128,j=0,F=72,D=0;D<U;++D)(g=h[D])<128&&K.push(S(g));for(m=x=K.length,x&&K.push("-");m<U;){for(O=u,D=0;D<U;++D)(g=h[D])>=p&&g<O&&(O=g);for(O-p>f((u-j)/(B=m+1))&&w("overflow"),j+=(O-p)*B,p=O,D=0;D<U;++D)if((g=h[D])<p&&++j>u&&w("overflow"),g==p){for(L=j,k=36;!(L<(E=k<=F?1:k>=F+26?26:k-F));k+=36)Y=L-E,G=36-E,K.push(S(d(E+Y%G,0))),L=f(Y/G);K.push(S(d(L,0))),F=I(j,B,m==x),j=0,++m}++j,++p}return K.join("")}c={version:"1.4.1",ucs2:{decode:T,encode:R},decode:Q,encode:Z,toASCII:function(h){return N(h,function(p){return A.test(p)?"xn--"+Z(p):p})},toUnicode:function(h){return N(h,function(p){return b.test(p)?Q(p.slice(4).toLowerCase()):p})}},(l=function(){return c}.call(t,r,t,n))===void 0||(n.exports=l)})()}).call(this,r(194)(e),r(5))},function(e,t){e.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(e,t,r){e.exports={isString:function(n){return typeof n=="string"},isObject:function(n){return typeof n=="object"&&n!==null},isNull:function(n){return n===null},isNullOrUndefined:function(n){return n==null}}},function(e,t,r){t.decode=t.parse=r(197),t.encode=t.stringify=r(198)},function(e,t,r){function n(l,s){return Object.prototype.hasOwnProperty.call(l,s)}e.exports=function(l,s,i,c){s=s||"&",i=i||"=";var u={};if(typeof l!="string"||l.length===0)return u;var b=/\+/g;l=l.split(s);var A=1e3;c&&typeof c.maxKeys=="number"&&(A=c.maxKeys);var _=l.length;A>0&&_>A&&(_=A);for(var v=0;v<_;++v){var f,S,w,P,N=l[v].replace(b,"%20"),T=N.indexOf(i);T>=0?(f=N.substr(0,T),S=N.substr(T+1)):(f=N,S=""),w=decodeURIComponent(f),P=decodeURIComponent(S),n(u,w)?o(u[w])?u[w].push(P):u[w]=[u[w],P]:u[w]=P}return u};var o=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"}},function(e,t,r){var n=function(i){switch(typeof i){case"string":return i;case"boolean":return i?"true":"false";case"number":return isFinite(i)?i:"";default:return""}};e.exports=function(i,c,u,b){return c=c||"&",u=u||"=",i===null&&(i=void 0),typeof i=="object"?l(s(i),function(A){var _=encodeURIComponent(n(A))+u;return o(i[A])?l(i[A],function(v){return _+encodeURIComponent(n(v))}).join(c):_+encodeURIComponent(n(i[A]))}).join(c):b?encodeURIComponent(n(b))+u+encodeURIComponent(n(i)):""};var o=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"};function l(i,c){if(i.map)return i.map(c);for(var u=[],b=0;b<i.length;b++)u.push(c(i[b],b));return u}var s=Object.keys||function(i){var c=[];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&c.push(u);return c}},function(e,t,r){var n=r(81),o=r(46),l=e.exports;for(var s in n)n.hasOwnProperty(s)&&(l[s]=n[s]);function i(c){if(typeof c=="string"&&(c=o.parse(c)),c.protocol||(c.protocol="https:"),c.protocol!=="https:")throw new Error('Protocol "'+c.protocol+'" not supported. Expected "https:"');return c}l.request=function(c,u){return c=i(c),n.request.call(this,c,u)},l.get=function(c,u){return c=i(c),n.get.call(this,c,u)}},function(e,t,r){(function(n){function o(S){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(S)}function l(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function s(S,w){for(var P=0;P<w.length;P++){var N=w[P];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(S,N.key,N)}}function i(S,w){return(i=Object.setPrototypeOf||function(P,N){return P.__proto__=N,P})(S,w)}function c(S){var w=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var P,N=b(S);if(w){var T=b(this).constructor;P=Reflect.construct(N,arguments,T)}else P=N.apply(this,arguments);return u(this,P)}}function u(S,w){return!w||o(w)!=="object"&&typeof w!="function"?function(P){if(P===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P}(S):w}function b(S){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)})(S)}var A=r(84),_=r(3).MESSAGE,v=r(15),f=r(17);e.exports=function(S){(function(R,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(d&&d.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),d&&i(R,d)})(T,S);var w,P,N=c(T);function T(){var R,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(l(this,T),R=N.call(this,d),!d.stream||!A(d.stream))throw new Error("options.stream is required.");return R._stream=d.stream,R._stream.setMaxListeners(1/0),R.isObjectMode=d.stream._writableState.objectMode,R.eol=d.eol||v.EOL,R}return w=T,(P=[{key:"log",value:function(R,d){var I=this;if(n(function(){return I.emit("logged",R)}),this.isObjectMode)return this._stream.write(R),void(d&&d());this._stream.write("".concat(R[_]).concat(this.eol)),d&&d()}}])&&s(w.prototype,P),T}(f)}).call(this,r(12).setImmediate)},function(e,t,r){(function(n){function o(m,x,F){return x in m?Object.defineProperty(m,x,{value:F,enumerable:!0,configurable:!0,writable:!0}):m[x]=F,m}function l(m){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x})(m)}function s(m,x){for(var F=0;F<x.length;F++){var D=x[F];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(m,D.key,D)}}function i(m,x){return(i=Object.setPrototypeOf||function(F,D){return F.__proto__=D,F})(m,x)}function c(m){var x=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var F,D=b(m);if(x){var O=b(this).constructor;F=Reflect.construct(D,arguments,O)}else F=D.apply(this,arguments);return u(this,F)}}function u(m,x){return!x||l(x)!=="object"&&typeof x!="function"?function(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}(m):x}function b(m){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)})(m)}var A=r(28),_=A.Stream,v=A.Transform,f=r(48),S=r(3),w=S.LEVEL,P=S.SPLAT,N=r(84),T=r(86),R=r(90),d=r(205),I=r(206),Q=r(59).warn,Z=r(47),h=/%[scdjifoO%]/g,p=function(m){(function(L,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(k&&k.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),k&&i(L,k)})(O,m);var x,F,D=c(O);function O(L){var k;return function(E,g){if(!(E instanceof g))throw new TypeError("Cannot call a class as a function")}(this,O),(k=D.call(this,{objectMode:!0})).configure(L),k}return x=O,(F=[{key:"child",value:function(L){var k=this;return Object.create(k,{write:{value:function(E){var g=Object.assign({},L,E);E instanceof Error&&(g.stack=E.stack,g.message=E.message),k.write(g)}}})}},{key:"configure",value:function(){var L=this,k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=k.silent,g=k.format,U=k.defaultMeta,B=k.levels,G=k.level,Y=G===void 0?"info":G,K=k.exitOnError,H=K===void 0||K,V=k.transports,y=k.colors,C=k.emitErrs,W=k.formatters,ee=k.padLevels,X=k.rewriters,ne=k.stripColors,ie=k.exceptionHandlers,he=k.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=E,this.format=g||this.format||r(207)(),this.defaultMeta=U||null,this.levels=B||this.levels||Z.npm.levels,this.level=Y,this.exceptions=new T(this),this.rejections=new R(this),this.profilers={},this.exitOnError=H,V&&(V=Array.isArray(V)?V:[V]).forEach(function(Se){return L.add(Se)}),y||C||W||ee||X||ne)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
39
|
+
`));ie&&this.exceptions.handle(ie),he&&this.rejections.handle(he)}},{key:"isLevelEnabled",value:function(L){var k=this,E=j(this.levels,L);if(E===null)return!1;var g=j(this.levels,this.level);return g!==null&&(this.transports&&this.transports.length!==0?this.transports.findIndex(function(U){var B=j(k.levels,U.level);return B===null&&(B=g),B>=E})!==-1:g>=E)}},{key:"log",value:function(L,k){for(var E,g,U=arguments.length,B=new Array(U>2?U-2:0),G=2;G<U;G++)B[G-2]=arguments[G];if(arguments.length===1)return L[w]=L.level,this._addDefaultMeta(L),this.write(L),this;if(arguments.length===2)return k&&l(k)==="object"?(k[w]=k.level=L,this._addDefaultMeta(k),this.write(k),this):(this.write((o(g={},w,L),o(g,"level",L),o(g,"message",k),g)),this);var Y=B[0];if(l(Y)==="object"&&Y!==null){var K=k&&k.match&&k.match(h);if(!K){var H,V=Object.assign({},this.defaultMeta,Y,(o(H={},w,L),o(H,P,B),o(H,"level",L),o(H,"message",k),H));return Y.message&&(V.message="".concat(V.message," ").concat(Y.message)),Y.stack&&(V.stack=Y.stack),this.write(V),this}}return this.write(Object.assign({},this.defaultMeta,(o(E={},w,L),o(E,P,B),o(E,"level",L),o(E,"message",k),E))),this}},{key:"_transform",value:function(L,k,E){if(this.silent)return E();L[w]||(L[w]=L.level),this.levels[L[w]]||this.levels[L[w]]===0||console.error("[winston] Unknown logger level: %s",L[w]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports %j",L);try{this.push(this.format.transform(L,this.format.options))}catch(g){throw g}finally{E()}}},{key:"_final",value:function(L){var k=this.transports.slice();f(k,function(E,g){if(!E||E.finished)return n(g);E.once("finish",g),E.end()},L)}},{key:"add",value:function(L){var k=!N(L)||L.log.length>2?new d({transport:L}):L;if(!k._writableState||!k._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",k),this._onEvent("warn",k),this.pipe(k),L.handleExceptions&&this.exceptions.handle(),L.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(L){if(!L)return this;var k=L;return(!N(L)||L.log.length>2)&&(k=this.transports.filter(function(E){return E.transport===L})[0]),k&&this.unpipe(k),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){Q.deprecated("setLevels")}},{key:"query",value:function(L,k){typeof L=="function"&&(k=L,L={}),L=L||{};var E={},g=Object.assign({},L.query||{});f(this.transports.filter(function(U){return!!U.query}),function(U,B){(function(G,Y){L.query&&typeof G.formatQuery=="function"&&(L.query=G.formatQuery(g)),G.query(L,function(K,H){if(K)return Y(K);typeof G.formatResults=="function"&&(H=G.formatResults(H,L.format)),Y(null,H)})})(U,function(G,Y){B&&((Y=G||Y)&&(E[U.name]=Y),B()),B=null})},function(){return k(null,E)})}},{key:"stream",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k=new _,E=[];return k._streams=E,k.destroy=function(){for(var g=E.length;g--;)E[g].destroy()},this.transports.filter(function(g){return!!g.stream}).forEach(function(g){var U=g.stream(L);U&&(E.push(U),U.on("log",function(B){B.transport=B.transport||[],B.transport.push(g.name),k.emit("log",B)}),U.on("error",function(B){B.transport=B.transport||[],B.transport.push(g.name),k.emit("error",B)}))}),k}},{key:"startTimer",value:function(){return new I(this)}},{key:"profile",value:function(L){var k=Date.now();if(this.profilers[L]){var E=this.profilers[L];delete this.profilers[L];for(var g=arguments.length,U=new Array(g>1?g-1:0),B=1;B<g;B++)U[B-1]=arguments[B];typeof U[U.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),U.pop());var G=l(U[U.length-1])==="object"?U.pop():{};return G.level=G.level||"info",G.durationMs=k-E,G.message=G.message||L,this.write(G)}return this.profilers[L]=k,this}},{key:"handleExceptions",value:function(){var L;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(L=this.exceptions).handle.apply(L,arguments)}},{key:"unhandleExceptions",value:function(){var L;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(L=this.exceptions).unhandle.apply(L,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
40
|
+
`))}},{key:"_onEvent",value:function(L,k){k["__winston"+L]||(k["__winston"+L]=function(E){L!=="error"||this.transports.includes(k)||this.add(k),this.emit(L,E,k)}.bind(this),k.on(L,k["__winston"+L]))}},{key:"_addDefaultMeta",value:function(L){this.defaultMeta&&Object.assign(L,this.defaultMeta)}}])&&s(x.prototype,F),O}(v);function j(m,x){var F=m[x];return F||F===0?F:null}Object.defineProperty(p.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var m=this._readableState.pipes;return Array.isArray(m)?m:[m].filter(Boolean)}}),e.exports=p}).call(this,r(12).setImmediate)},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=b(r(41)),o=b(r(42)),l=b(r(64)),s=b(r(65)),i=b(r(66)),c=b(r(22)),u=b(r(26));function b(v){return v&&v.__esModule?v:{default:v}}function A(v,f,S){S=(0,s.default)(S);var w=0,P=0,{length:N}=v,T=!1;function R(d,I){d===!1&&(T=!0),T!==!0&&(d?S(d):++P!==N&&I!==o.default||S(null))}for(N===0&&S(null);w<N;w++)f(v[w],w,(0,i.default)(R))}function _(v,f,S){return(0,l.default)(v,1/0,f,S)}t.default=(0,u.default)(function(v,f,S){return((0,n.default)(v)?A:_)(v,(0,c.default)(f),S)},3),e.exports=t.default},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return(o,l,s)=>n(o,s)},e.exports=t.default},function(e,t,r){var n=Object.prototype.toString;e.exports=function(o){if(typeof o.displayName=="string"&&o.constructor.name)return o.displayName;if(typeof o.name=="string"&&o.name)return o.name;if(typeof o=="object"&&o.constructor&&typeof o.constructor.name=="string")return o.constructor.name;var l=o.toString(),s=n.call(o).slice(8,-1);return(l=s==="Function"?l.substring(l.indexOf("(")+1,l.indexOf(")")):s)||"anonymous"}},function(e,t,r){const n=r(10),{LEVEL:o}=r(3),l=r(17),s=e.exports=function(i={}){if(l.call(this,i),!i.transport||typeof i.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=i.transport,this.level=this.level||i.transport.level,this.handleExceptions=this.handleExceptions||i.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(c){this.emit("error",c,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};n.inherits(s,l),s.prototype._write=function(i,c,u){if(this.silent||i.exception===!0&&!this.handleExceptions)return u(null);(!this.level||this.levels[this.level]>=this.levels[i[o]])&&this.transport.log(i[o],i.message,i,this._nop),u(null)},s.prototype._writev=function(i,c){for(let u=0;u<i.length;u++)this._accept(i[u])&&(this.transport.log(i[u].chunk[o],i[u].chunk.message,i[u].chunk,this._nop),i[u].callback());return c(null)},s.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
41
41
|
`))},s.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}},function(e,t,r){function n(l){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(l)}function o(l,s){for(var i=0;i<s.length;i++){var c=s[i];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,c.key,c)}}e.exports=function(){function l(c){if(function(u,b){if(!(u instanceof b))throw new TypeError("Cannot call a class as a function")}(this,l),!c)throw new Error("Logger is required for profiling.");this.logger=c,this.start=Date.now()}var s,i;return s=l,(i=[{key:"done",value:function(){for(var c=arguments.length,u=new Array(c),b=0;b<c;b++)u[b]=arguments[b];typeof u[u.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),u.pop());var A=n(u[u.length-1])==="object"?u.pop():{};return A.level=A.level||"info",A.durationMs=Date.now()-this.start,this.logger.write(A)}}])&&o(s.prototype,i),l}()},function(e,t,r){(function(n){const o=r(208),{MESSAGE:l}=r(3),s=r(30);function i(c,u){return u instanceof n?u.toString("base64"):typeof u=="bigint"?u.toString():u}e.exports=o((c,u={})=>(c[l]=(u.stable?s.stableStringify:s)(c,u.replacer||i,u.space),c))}).call(this,r(4).Buffer)},function(e,t,r){class n extends Error{constructor(l){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
42
42
|
Found: ${l.toString().split(`
|
|
43
43
|
`)[0]}
|
|
44
|
-
`),Error.captureStackTrace(this,n)}}e.exports=o=>{if(o.length>2)throw new n(o);function l(i={}){this.options=i}function s(i){return new l(i)}return l.prototype.transform=o,s.Format=l,s}},function(e,t,r){function n(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function o(s,i){for(var c=0;c<i.length;c++){var u=i[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}var l=r(85);e.exports=function(){function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(this,s),this.loggers=new Map,this.options=u}var i,c;return i=s,(c=[{key:"add",value:function(u,b){var A=this;if(!this.loggers.has(u)){var _=(b=Object.assign({},b||this.options)).transports||this.options.transports;b.transports=_?_.slice():[];var v=l(b);v.on("close",function(){return A._delete(u)}),this.loggers.set(u,v)}return this.loggers.get(u)}},{key:"get",value:function(u,b){return this.add(u,b)}},{key:"has",value:function(u){return!!this.loggers.has(u)}},{key:"close",value:function(u){var b=this;if(u)return this._removeLogger(u);this.loggers.forEach(function(A,_){return b._removeLogger(_)})}},{key:"_removeLogger",value:function(u){this.loggers.has(u)&&(this.loggers.get(u).close(),this._delete(u))}},{key:"_delete",value:function(u){this.loggers.delete(u)}}])&&o(i.prototype,c),s}()},function(e,t,r){(function(n){const o=r(49),l=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/;e.exports=function(s,i,c){let u,b,A=!1,_=!1;function v(w,P){let N=`"${i}" ${P}`;throw w&&(N=`${N}, but is set to "${w}"`),b&&(N=`${N}. An example of a valid value would be: ${b}`),new o(N)}function f(w){return function(){let P=s[i];if(P===void 0)if(u===void 0&&_)v(void 0,"is a required variable, but it was not set");else{if(u===void 0)return;P=u}_&&P.trim().length===0&&v(void 0,"is a required variable, but its value was empty"),A&&(P.match(l)||v(P,"should be a valid base64 string if using convertFromBase64"),P=n.from(P,"base64").toString());const N=[P].concat(Array.prototype.slice.call(arguments));try{return w.apply(w,N)}catch(T){v(P,T.message)}}}const S={asArray:f(r(211)),asBoolStrict:f(r(212)),asBool:f(r(213)),asPortNumber:f(r(214)),asEnum:f(r(215)),asFloatNegative:f(r(216)),asFloatPositive:f(r(217)),asFloat:f(r(51)),asIntNegative:f(r(218)),asIntPositive:f(r(91)),asInt:f(r(50)),asJsonArray:f(r(219)),asJsonObject:f(r(220)),asJson:f(r(52)),asString:f(r(34)),asUrlObject:f(r(92)),asUrlString:f(r(221)),convertFromBase64:function(){return A=!0,S},default:function(w){if(typeof w=="number")u=w.toString();else if(Array.isArray(w)||typeof w=="object"&&w!==null)u=JSON.stringify(w);else{if(typeof w!="string")throw new o("values passed to default() must be of Number, String, Array, or Object type");u=w}return S},required:function(w){return _=w===void 0||w,S},example:function(w){return b=w,S}};return Object.entries(c).forEach(([w,P])=>{S[w]=f(P)}),S}}).call(this,r(4).Buffer)},function(e,t,r){const n=r(34);e.exports=function(o,l){return l=l||",",o.length?n(o).split(l).filter(Boolean):[]}},function(e,t,r){e.exports=function(n){const o=n.toLowerCase();if(o!=="false"&&o!=="true")throw new Error('should be either "true", "false", "TRUE", or "FALSE"');return o!=="false"}},function(e,t,r){e.exports=function(n){const o=n.toLowerCase();if(["false","0","true","1"].indexOf(o)===-1)throw new Error('should be either "true", "false", "TRUE", "FALSE", 1, or 0');return!(o==="0"||o==="false")}},function(e,t,r){const n=r(91);e.exports=function(o){var l=n(o);if(l>65535)throw new Error("cannot assign a port number greater than 65535");return l}},function(e,t,r){const n=r(34);e.exports=function(o,l){const s=n(o);if(l.indexOf(s)<0)throw new Error(`should be one of [${l.join(", ")}]`);return s}},function(e,t,r){const n=r(51);e.exports=function(o){const l=n(o);if(l>0)throw new Error("should be a negative float");return l}},function(e,t,r){const n=r(51);e.exports=function(o){const l=n(o);if(l<0)throw new Error("should be a positive float");return l}},function(e,t,r){const n=r(50);e.exports=function(o){const l=n(o);if(l>0)throw new Error("should be a negative integer");return l}},function(e,t,r){const n=r(52);e.exports=function(o){var l=n(o);if(!Array.isArray(l))throw new Error("should be a parseable JSON Array");return l}},function(e,t,r){const n=r(52);e.exports=function(o){var l=n(o);if(Array.isArray(l))throw new Error("should be a parseable JSON Object");return l}},function(e,t,r){const n=r(92);e.exports=function(o){return n(o).toString()}},function(e,t,r){(function(n){(function(){var o,l,s,i,c,u;typeof performance!="undefined"&&performance!==null&&performance.now?e.exports=function(){return performance.now()}:n!=null&&n.hrtime?(e.exports=function(){return(o()-c)/1e6},l=n.hrtime,i=(o=function(){var b;return 1e9*(b=l())[0]+b[1]})(),u=1e9*n.uptime(),c=i-u):Date.now?(e.exports=function(){return Date.now()-s},s=Date.now()):(e.exports=function(){return new Date().getTime()-s},s=new Date().getTime())}).call(this)}).call(this,r(2))},function(e,t,r){var n,o,l=r(96),s=r(97),i=0,c=0;e.exports=function(u,b,A){var _=b&&A||0,v=b||[],f=(u=u||{}).node||n,S=u.clockseq!==void 0?u.clockseq:o;if(f==null||S==null){var w=l();f==null&&(f=n=[1|w[0],w[1],w[2],w[3],w[4],w[5]]),S==null&&(S=o=16383&(w[6]<<8|w[7]))}var P=u.msecs!==void 0?u.msecs:new Date().getTime(),N=u.nsecs!==void 0?u.nsecs:c+1,T=P-i+(N-c)/1e4;if(T<0&&u.clockseq===void 0&&(S=S+1&16383),(T<0||P>i)&&u.nsecs===void 0&&(N=0),N>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=P,c=N,o=S;var R=(1e4*(268435455&(P+=122192928e5))+N)%4294967296;v[_++]=R>>>24&255,v[_++]=R>>>16&255,v[_++]=R>>>8&255,v[_++]=255&R;var d=P/4294967296*1e4&268435455;v[_++]=d>>>8&255,v[_++]=255&d,v[_++]=d>>>24&15|16,v[_++]=d>>>16&255,v[_++]=S>>>8|128,v[_++]=255&S;for(var I=0;I<6;++I)v[_+I]=f[I];return b||s(v)}},function(e,t,r){var n=r(96),o=r(97);e.exports=function(l,s,i){var c=s&&i||0;typeof l=="string"&&(s=l==="binary"?new Array(16):null,l=null);var u=(l=l||{}).random||(l.rng||n)();if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,s)for(var b=0;b<16;++b)s[c+b]=u[b];return s||o(u)}},function(e,t,r){(function(n){(function(o){function l(i){if((i=i===void 0?"utf-8":i)!=="utf-8")throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+i+"') is invalid.")}function s(i,c){if(c=c===void 0?{fatal:!1}:c,(i=i===void 0?"utf-8":i)!=="utf-8")throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+i+"') is invalid.");if(c.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(o.TextEncoder&&o.TextDecoder)return!1;Object.defineProperty(l.prototype,"encoding",{value:"utf-8"}),l.prototype.encode=function(i,c){if((c=c===void 0?{stream:!1}:c).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");c=0;for(var u=i.length,b=0,A=Math.max(32,u+(u>>1)+7),_=new Uint8Array(A>>3<<3);c<u;){var v=i.charCodeAt(c++);if(55296<=v&&56319>=v){if(c<u){var f=i.charCodeAt(c);(64512&f)==56320&&(++c,v=((1023&v)<<10)+(1023&f)+65536)}if(55296<=v&&56319>=v)continue}if(b+4>_.length&&(A+=8,A=(A*=1+c/i.length*2)>>3<<3,(f=new Uint8Array(A)).set(_),_=f),(4294967168&v)==0)_[b++]=v;else{if((4294965248&v)==0)_[b++]=v>>6&31|192;else if((4294901760&v)==0)_[b++]=v>>12&15|224,_[b++]=v>>6&63|128;else{if((4292870144&v)!=0)continue;_[b++]=v>>18&7|240,_[b++]=v>>12&63|128,_[b++]=v>>6&63|128}_[b++]=63&v|128}}return _.slice(0,b)},Object.defineProperty(s.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(s.prototype,"fatal",{value:!1}),Object.defineProperty(s.prototype,"ignoreBOM",{value:!1}),s.prototype.decode=function(i,c){if((c=c===void 0?{stream:!1}:c).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");c=0;for(var u=(i=new Uint8Array(i)).length,b=[];c<u;){var A=i[c++];if(A===0)break;if((128&A)==0)b.push(A);else if((224&A)==192){var _=63&i[c++];b.push((31&A)<<6|_)}else if((240&A)==224){_=63&i[c++];var v=63&i[c++];b.push((31&A)<<12|_<<6|v)}else(248&A)==240&&(65535<(A=(7&A)<<18|(_=63&i[c++])<<12|(v=63&i[c++])<<6|63&i[c++])&&(A-=65536,b.push(A>>>10&1023|55296),A=56320|1023&A),b.push(A))}return String.fromCharCode.apply(null,b)},o.TextEncoder=l,o.TextDecoder=s})(typeof window!="undefined"?window:n!==void 0?n:this)}).call(this,r(5))},function(e,t,r){r.r(t),r.d(t,"AuthClient",function(){return l}),r.d(t,"RtcSignalingClient",function(){return i}),r.d(t,"Credentials",function(){return P}),r.d(t,"SignalingPromiseClient",function(){return N.SignalingPromiseClient}),r.d(t,"IRtcClientConfiguration",function(){}),r.d(t,"IRtcConnectConfiguration",function(){}),r.d(t,"IRtcConnectionStatsInfo",function(){}),r.d(t,"IRtcSendConfiguration",function(){}),r.d(t,"IRtcSessionMetricsMessageCounts",function(){}),r.d(t,"IRtcStreamMessage",function(){}),r.d(t,"IStreamControl",function(){}),r.d(t,"RtcClient",function(){return Ee}),r.d(t,"createRtcStreamMessage",function(){return X}),r.d(t,"IRtcStream",function(){}),r.d(t,"IRtcStreamPayload",function(){});var n=r(25),o=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class l extends n.a{adminSignup(q,$){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/admin-signup",{token:$,method:"POST",body:JSON.stringify(q)})})}login(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/login",{method:"POST",body:JSON.stringify(q),allowUnsafeRetries:!0})})}loginWithGoogleToken(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/login-google",{method:"POST",body:JSON.stringify(q),allowUnsafeRetries:!0})})}refresh(q,$){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/refresh",{method:"POST",body:JSON.stringify({refreshToken:q,tokenExpirationSeconds:$}),allowUnsafeRetries:!0})})}respondToNewPasswordRequiredChallenge(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/respond-to-new-password-required-challenge",{method:"POST",body:JSON.stringify(q)})})}forgotPassword(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/forgot-password",{method:"POST",body:JSON.stringify({email:q})})})}confirmForgotPassword(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/confirm-forgot-password",{method:"POST",body:JSON.stringify(q)})})}resendInvitation(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/resend-invitation",{method:"POST",body:JSON.stringify({email:q})})})}changePassword({token:q,refreshToken:$,currentPassword:te,newPassword:ue}){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/change-password",{token:q,method:"POST",body:JSON.stringify({refreshToken:$,currentPassword:te,newPassword:ue})})})}getDeviceCredentials(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/device-credentials",{token:q,method:"POST",allowUnsafeRetries:!0})})}impersonate(q,$){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/impersonate",{token:q,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({userId:$})})})}createServiceAccount(q,$,te,ue){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/service-account",{token:q,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({name:$,roleId:te,tags:ue})})})}getFeatures(q){return o(this,void 0,void 0,function*(){return(yield this.fetch("auth/features",{token:q})).features})}}var s=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class i extends n.a{createPeer(q,$){return s(this,void 0,void 0,function*(){return yield this.fetch("peers",{token:q,method:"POST",body:JSON.stringify($)})})}getPeers(q){return s(this,void 0,void 0,function*(){return(yield this.fetch("peers",{token:q})).items})}refreshPeer(q,$){return s(this,void 0,void 0,function*(){yield this.fetch(`peers/${$}/refresh`,{token:q,method:"POST",allowUnsafeRetries:!0})})}createSession(q,$){return s(this,void 0,void 0,function*(){return yield this.fetch("sessions",{token:q,method:"POST",body:JSON.stringify($)})})}refreshSession(q,$){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${$}/refresh`,{token:q,method:"POST",allowUnsafeRetries:!0})})}deleteSession(q,$){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${$}`,{token:q,method:"DELETE",allowUnsafeRetries:!0})})}getSessions(q){return s(this,void 0,void 0,function*(){return(yield this.fetch("sessions",{token:q})).items})}getIceServers(q){return s(this,void 0,void 0,function*(){return(yield this.fetch("ice-servers",{token:q})).items})}addSignals(q,$,te){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${$}/add-signals`,{token:q,method:"POST",body:JSON.stringify(te)})})}takeSignals(q,$){return s(this,void 0,void 0,function*(){return(yield this.fetch(`sessions/${$}/take-signals`,{token:q,method:"POST"})).items})}}var c=r(1),u=r(11),b=r(35),A=r.n(b),_=r(102),v=r.n(_),f=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class S extends class{constructor(q){this.cache=new v.a(Object.assign(Object.assign({},q.dispose||q.disposeAfter?{ttlAutopurge:!0}:{}),q)),this.stringify=q.fastStringify?JSON.stringify:A.a}set(q,$,te){const ue=this.stringify(q);if(!this.cache.set(ue,$,{ttl:te})){const ae=this.cache.sizeCalculation?this.cache.sizeCalculation($,ue):"unknown";throw Error(`Value too large (${ae} > ${this.cache.max})`)}}get(q){return this.cache.get(this.stringify(q))}delete(q){this.cache.delete(this.stringify(q))}size(){return this.cache.size}clear(){this.cache.clear()}forEach(q){return this.cache.forEach(q)}}{constructor(q){if(super(q),this.expireRejectedPromiseValues=q.expireRejectedPromiseValues===void 0||q.expireRejectedPromiseValues,this.rejectedPromiseValueTtl=q.rejectedPromiseValueTtl!==void 0?q.rejectedPromiseValueTtl:c.a.second,this.rejectedPromiseValueTtl<0)throw new Error("rejectedPromiseValueTtl must not be negative")}set(q,$,te){const ue=this.stringify(q);this.cache.set(ue,$,{ttl:te}),this.expireRejectedPromiseValues&&Promise.resolve($).catch(()=>f(this,void 0,void 0,function*(){yield Object(u.a)(this.rejectedPromiseValueTtl),this.cache.peek(ue)===$&&this.cache.delete(ue)}))}}var w=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class P{constructor(q,$,te){this.authClient=q,this.email=$,this.password=te,this.tokenTtlMs=1*c.a.hour,this.tokenCache=new S({max:100,ttl:this.tokenTtlMs-5*c.a.minute,fastStringify:!0})}getToken(){return w(this,void 0,void 0,function*(){let q=this.tokenCache.get(this.email);return q||(q=(()=>w(this,void 0,void 0,function*(){const{authentication:$}=yield this.authClient.login({email:this.email,password:this.password,tokenExpirationSeconds:this.tokenTtlMs/c.a.second});if(!$)throw new Error("User account not verified.");return $.accessToken}))(),this.tokenCache.set(this.email,q)),q})}}var N=r(93),T=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};function R(ye){return T(this,void 0,void 0,function*(){return(yield Promise.all(ye.map(q=>q.catch($=>$)))).filter(q=>q instanceof Error)})}function d(ye){if(ye!==void 0)return ye;throw new Error("Value is undefined")}var I=r(0),Q=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};function Z({func:ye,delay:q,immediate:$}){let te=!1,ue=setTimeout(function de(){return Q(this,void 0,void 0,function*(){if(te)return;const me=new Date().getTime();try{ae=ye(),yield ae}finally{if(!te){const pe=new Date().getTime();ue=setTimeout(de,Math.max(q-(pe-me),0))}}})},$?0:q),ae=Promise.resolve();return{stop(){return Q(this,void 0,void 0,function*(){te=!0,clearTimeout(ue),yield ae})}}}function h(ye,q){return Object.keys(ye).reduce(($,te)=>Object.assign(Object.assign({},$),{[te]:q(ye[te])}),{})}var p=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class C{constructor(q){this.message=q}send(q){return p(this,void 0,void 0,function*(){I.a.info(this.message,h(q,$=>{const{sum:te,count:ue}=$,ae=te/ue;return Object.assign(Object.assign({},$),{average:ae})}))})}}var m=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};const x=r(222);var F=r(6);const D=!!F.c,O=new class{constructor(ye=60){this.buffer={},this.metrics={},this.reporters=[],this.flushInterval=Z({func:()=>this.flushStats(),delay:ye*c.a.second})}shutdown(){return m(this,void 0,void 0,function*(){yield this.flushInterval.stop(),yield this.flushStats(),yield Object(u.a)(2*c.a.second)})}aggregate(ye,q){if(this.buffer[ye]){const{min:$,max:te,sum:ue,count:ae}=this.buffer[ye];this.buffer[ye]={min:Math.min($,q),max:Math.max(te,q),sum:ue+q,count:ae+1}}else this.buffer[ye]={min:q,max:q,sum:q,count:1}}increment(ye){this.aggregate(ye,1)}timer(ye,q){return m(this,void 0,void 0,function*(){const $=x(),te=yield q(),ue=x();return this.aggregate(ye,ue-$),te})}metric(ye,q){this.metrics[ye]=q}registerStatsReporter(ye){this.reporters.push(ye)}write(ye){return m(this,void 0,void 0,function*(){if(Object.values(ye).length===0)return;const q=yield R(this.reporters.map($=>$.send(ye)));for(const $ of q)I.a.warn("Failed to write stats",{error:$})})}flushStats(){return m(this,void 0,void 0,function*(){const ye=Object.assign(Object.assign({},this.buffer),h(this.metrics,q=>{const $=q();return{min:$,max:$,sum:$,count:1}}));Object.keys(ye).length>0&&(yield this.write(ye),this.buffer={})})}};D||["local","on-prem"].includes(F.i)||O.registerStatsReporter(new C("stats"));var L=r(8),k=r(21),E=r(103),g=r(36),U=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class B extends g.a{constructor(q){super(q)}postLanRtcOffer(q){return U(this,void 0,void 0,function*(){return yield this.fetch("v1/lan-rtc-offer",{method:"POST",body:JSON.stringify(q)})})}}var G=r(55);const Y={ordered:!1,maxPacketLifeTime:300*c.a.millisecond},K={ordered:!0},H={ordered:!0},V={ordered:!1,maxRetransmits:0},y={ordered:!1,maxRetransmits:0};function j({entityId:ye,streamName:q,streamType:$}){return`${ye}.${q}.${$}`}var W=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class ee{constructor(q,$){this.sessionId=q,this.connection=$,this.counts={localSent:new Map,localReceived:new Map,remoteSent:new Map,remoteReceived:new Map},this.sessionId=q,this.connection=$}updateRemoteMessagesCounts(q){if(q.payload.streamsInfo){this.counts.remoteSent=new Map,this.counts.remoteReceived=new Map;for(const $ of q.payload.streamsInfo.items)this.counts.remoteSent.set($.streamId,$.sentCount),this.counts.remoteReceived.set($.streamId,$.receivedCount)}}getLocalStreamsInfo(q){const{localSent:$,localReceived:te}=this.counts;return{items:[...new Set([...$.keys(),...te.keys()])].map(ue=>{var ae,de;return{streamId:ue,sentCount:(ae=$.get(ue))!==null&&ae!==void 0?ae:0,receivedCount:(de=te.get(ue))!==null&&de!==void 0?de:0}}),timestamp:q}}incrementLocalSent(q){const{localSent:$}=this.counts,te=j(q.header.stream);$.set(te,($.get(te)||0)+1)}incrementLocalReceived(q){const{localReceived:$}=this.counts,te=j(q.header.stream),ue=$.get(te)||0;if(ue===0){const{streamName:ae,streamType:de}=q.header.stream;I.a.debug("RTC client received first message for stream",{streamName:ae,streamType:de})}$.set(te,ue+1)}uploadMetrics(){return W(this,void 0,void 0,function*(){const{sessionId:q}=this,$=yield this.connection.peerConnection.getStats(),te={};$.forEach(ge=>te[ge.id]=ge),I.a.debug("rtc-stats",Object.assign(Object.assign({},te),{sessionId:q}));const{localSent:ue,localReceived:ae,remoteSent:de,remoteReceived:me}=this.counts,pe=[...new Set([...ue.keys(),...ae.keys()])].reduce((ge,ce)=>{const Te=ue.get(ce),Re=ae.get(ce),Pe=de.get(ce),Le=me.get(ce);return Object.assign(Object.assign({},ge),{[`local-${ce}-sent`]:Te,[`local-${ce}-received`]:Re,[`remote-${ce}-sent`]:Pe,[`remote-${ce}-received`]:Le})},{sessionId:q});I.a.debug("rtc-message-report",Object.assign({deviceId:this.connection.getRemoteDeviceId()},pe))})}}function X(ye,q){return{header:{stream:ye,created:Date.now(),frameId:""},payload:q}}function ne(ye){return new Set(["disconnected","failed","closed"]).has(ye.iceConnectionState)}var ie=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class he{constructor(q,$,te){this.peerConnection=q,this.config=$,this.dataChannelNotifier=te,this.connectTimeoutMs=20*c.a.second,this.iceGatheringTimeoutMs=15*c.a.second,this.pingUpdateTimeoutMs=1*c.a.second,this.streamsInfoUpdateTimeoutMs=2*c.a.second,this.reassemblyTimeoutMs=500*c.a.millisecond,this.reassemblyTableCleanupMs=1*c.a.second,this.heartbeatTimeoutMs=20*c.a.millisecond,this.streamLatestTimestamp=new Map,this.reassemblyTable=new Map,this.reassemblyTableLastTimestamp=new Map,this.closeCalled=!1,this.gotOffer=!1,this.hasIceCandidate=!1;const{isOffer:ue}=$.baseConfig;ue?this.initializeChannels(q):q.ondatachannel=ae=>{switch(ae.channel.label){case"stream.latest-ttl":this.latestTtlStreamChannel=ae.channel;break;case"stream.reliable":this.reliableStreamChannel=ae.channel;break;case"stream.latest-reliable":this.latestReliableStreamChannel=ae.channel;break;case"stream.latest-try-once":this.latestTryOnceStreamChannel=ae.channel;break;case"heartbeat":return void(this.heartbeatChannel=ae.channel);default:return void this.dataChannelNotifier(ae.channel)}this.setupChannel(ae.channel)},this.pingUpdateTimeout=setInterval(()=>{const{reliableStreamChannel:ae}=this;ae&&this.sendSystemMessage(ae,{type:"ping"})},this.pingUpdateTimeoutMs),this.streamsInfoUpdateTimeout=setInterval(()=>{const{latestTtlStreamChannel:ae}=this;ae&&this.sendSystemMessage(ae,{type:"streams-info"})},this.streamsInfoUpdateTimeoutMs),this.reassemblyTableCleanupTimeout=setInterval(()=>{const ae=new Date().getTime();this.reassemblyTableLastTimestamp.forEach((de,me,pe)=>{ae>me+this.reassemblyTimeoutMs&&this.reassemblyTable.delete(de)})},this.reassemblyTableCleanupMs),this.heartbeatTimeout=setInterval(()=>{const{heartbeatChannel:ae}=this;ae&&ae.readyState==="open"&&ae.send(new Uint8Array([1]))},this.heartbeatTimeoutMs)}handleSignal(q){return ie(this,void 0,void 0,function*(){const{peerConnection:$}=this,{track:te}=this.config.baseConfig,ue=(()=>{try{return JSON.parse(q.getPayload())}catch{return}})();if(!ue)return void I.a.error("Received unparseable signal.");I.a.debug("Handling signal",{description:ue});const{sdp:ae,type:de}=ue;if(!ae||!de)return void I.a.warn("Received non-SDP signal");const{signalingState:me,connectionState:pe}=$;if(me!=="stable"||pe!=="connected")if($.remoteDescription)I.a.warn(`Received SDP after remote description was set: ${ae}`);else{if(de==="offer"){if(me!=="stable")return void I.a.warn("Received offer SDP when signaling is ongoing.");yield $.setRemoteDescription(ue);const ge=yield $.createAnswer();yield $.setLocalDescription(ge);const ce=q.clone();return te==null||te("Answer Received",ce),ce.setPayload(JSON.stringify(ge)),ce.setReceiverId(q.getSenderId()),ce.setSenderId(q.getReceiverId()),ce}if(de==="answer"){if(me==="stable")return void I.a.warn("Received answer SDP when signaling hasn't started.");yield $.setRemoteDescription(ue)}}else I.a.warn(`Received SDP when already connected: ${ae}`)})}send(q,$){const te=this.getChannelFromLabel($.channelLabel);te?this.sendOnChannel(te,q):I.a.warn("Send called with unexpected channel label",{channelLabel:$.channelLabel})}controlRemoteStream(q){this.sendSystemMessage(d(this.reliableStreamChannel),{type:"stream-control",streamControl:q})}isActive(){return new Set(["new","checking","connected","completed"]).has(this.peerConnection.iceConnectionState)||this.isReady()}isReady(){const{reliableStreamChannel:q,latestTtlStreamChannel:$,latestTryOnceStreamChannel:te,latestReliableStreamChannel:ue}=this;return(q==null?void 0:q.readyState)==="open"&&($==null?void 0:$.readyState)==="open"&&(te==null?void 0:te.readyState)==="open"&&(ue==null?void 0:ue.readyState)==="open"}close(){return ie(this,void 0,void 0,function*(){if(this.closeCalled)return;this.closeCalled=!0,this.sessionMetrics&&(yield this.sessionMetrics.uploadMetrics()),this.pingUpdateTimeout&&clearInterval(this.pingUpdateTimeout),this.reassemblyTableCleanupTimeout&&clearInterval(this.reassemblyTableCleanupTimeout),this.streamsInfoUpdateTimeout&&clearInterval(this.streamsInfoUpdateTimeout),this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout);const{peerConnection:q,reliableStreamChannel:$,latestTtlStreamChannel:te,latestTryOnceStreamChannel:ue,latestReliableStreamChannel:ae}=this;q.close(),$==null||$.close(),te==null||te.close(),ue==null||ue.close(),ae==null||ae.close()})}getPing(){return this.pingTimeMs}getLastMessageTimestamp(){return this.lastMessageTimestamp}getSessionCreatedTimestamp(){var q;return(q=this.config.remoteConfig)===null||q===void 0?void 0:q.sessionCreatedTimestamp}setSessionCreatedTimestamp(q){this.config.remoteConfig&&(this.config.remoteConfig.sessionCreatedTimestamp=q)}getSessionId(){var q;return(q=this.config.remoteConfig)===null||q===void 0?void 0:q.sessionId}setSessionId(q){this.config.remoteConfig&&(this.config.remoteConfig.sessionId=q,this.sessionMetrics=new ee(q,this))}getRemotePeerId(){return this.config.baseConfig.remotePeerId}getRemoteDeviceId(){var q;return(q=this.config.baseConfig)===null||q===void 0?void 0:q.remoteDeviceId}setRemoteDeviceId(q){this.config.baseConfig.remoteDeviceId=q}getSessionMetricsMessageCounts(){var q;return(q=this.sessionMetrics)===null||q===void 0?void 0:q.counts}getConnectionStatsInfo(){return ie(this,void 0,void 0,function*(){const{peerConnection:q}=this;if(!q)return;const $=yield q.getStats(null),te=[];$.forEach(pe=>{te.push(pe)});const ue=te.find(pe=>pe.type==="transport");if(!ue)return;const ae=te.find(pe=>(pe.type==="candidate-pair"||pe.type==="candidatepair")&&pe.id===ue.selectedCandidatePairId);if(!ae)return;const de=te.find(pe=>pe.id===ae.localCandidateId),me=te.find(pe=>pe.id===ae.remoteCandidateId);return de&&me&&(de.address=de.address||de.ip,me.address=me.address||me.ip,de.address!==void 0&&me.address!==void 0)?{transport:ue,localCandidate:de,remoteCandidate:me}:void 0})}initializeChannels(q){this.heartbeatChannel=q.createDataChannel("heartbeat",y),this.heartbeatChannel.binaryType="arraybuffer",this.latestTtlStreamChannel=q.createDataChannel("stream.latest-ttl",Y),this.latestTtlStreamChannel.binaryType="arraybuffer",this.reliableStreamChannel=q.createDataChannel("stream.reliable",K),this.reliableStreamChannel.binaryType="arraybuffer",this.latestReliableStreamChannel=q.createDataChannel("stream.latest-reliable",H),this.latestReliableStreamChannel.binaryType="arraybuffer",this.latestTryOnceStreamChannel=q.createDataChannel("stream.latest-try-once",V),this.latestTryOnceStreamChannel.binaryType="arraybuffer",this.setupChannel(this.latestTtlStreamChannel),this.setupChannel(this.reliableStreamChannel),this.setupChannel(this.latestReliableStreamChannel),this.setupChannel(this.latestTryOnceStreamChannel)}getOffer(){var q,$,te;return ie(this,void 0,void 0,function*(){const{gotOffer:ue}=this,{peerConnection:ae,config:de}=this;if(this.config.baseConfig.isLan)throw new Error('"getOffer" method can only be called with internet connections. LAN connections should call the "getLanOffer" method.');const me=(q=this.config.remoteConfig)===null||q===void 0?void 0:q.sessionId;if(ue)return void I.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,ne(this.peerConnection))return void I.a.debug("Failed to generate offer because the peer connection was inactive.");const pe=de.baseConfig.track;ae.onicecandidate=()=>{this.hasIceCandidate=!0},ae.oniceconnectionstatechange=()=>ie(this,void 0,void 0,function*(){const Pe=ae.iceConnectionState;if(Pe==="connected"||Pe==="completed"){const Le=yield this.getConnectionStatsInfo(),Fe=Le?function(ze){const De=ze.localCandidate.candidateType,We=ze.remoteCandidate.candidateType;return De==="host"&&We==="host"?"local":De==="relay"||We==="relay"?"TURN":"STUN"}(Le):void 0;I.a.info(`ICE connection state changed to ${Pe}`,{sessionId:me,connectionStatsInfo:Le,iceMode:Fe}),pe==null||pe("ICE connection state change",{iceConnectionState:Pe,sessionId:me,connectionStatsInfo:Le,iceMode:Fe})}}),yield ae.setLocalDescription(yield ae.createOffer());const ge=new Date().getTime();for(;;){const Pe=new Date().getTime()-ge;if(Pe>this.connectTimeoutMs)return void I.a.debug("Failed to generate offer because ICE gathering timed out.");if(Pe>this.iceGatheringTimeoutMs&&this.hasIceCandidate){I.a.debug("ICE gathering partially completed; proceeding",{iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Pe}),pe==null||pe("ICE gathering partially completed",{sessionId:me,iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Pe});break}if(ae.iceGatheringState==="complete"){I.a.debug("ICE gathering complete",{iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Pe}),pe==null||pe("ICE gathering completed",{sessionId:me,iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Pe});break}yield Object(u.a)(.1*c.a.second)}const ce=($=this.peerConnection.getConfiguration().iceServers)!==null&&$!==void 0?$:[];for(const Pe of ce)Pe.credentialType=void 0;const Te=JSON.stringify(ce),Re=new L.Signal;return Re.setPayload(JSON.stringify(ae.localDescription)),Re.setSenderId(this.config.baseConfig.localPeerId),Re.setReceiverId(this.config.baseConfig.remotePeerId),Re.setIceServers(Te),Re.setIceTransportPolicy((te=this.peerConnection.getConfiguration().iceTransportPolicy)!==null&&te!==void 0?te:"all"),this.config.baseConfig.sessionType!==void 0?Re.setSessionType(this.config.baseConfig.sessionType):Re.setSessionType(L.SessionType.TELEOP),I.a.debug("Sending offer signal with description",{description:Re.getPayload()}),Re})}getLanOffer(){return ie(this,void 0,void 0,function*(){const{peerConnection:q,gotOffer:$}=this;if(!this.config.baseConfig.isLan)throw new Error('"getLanOffer" method can only be used with LAN connections. Internet connections should call the "getOffer" method.');if($)return void I.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,ne(this.peerConnection))return void I.a.debug("Failed to generate offer because the peer connection was inactive.");yield q.setLocalDescription(yield q.createOffer());const te=new Date().getTime();for(;;){if(new Date().getTime()-te>this.iceGatheringTimeoutMs)return void I.a.debug("Failed to generate offer because ICE gathering timed out.");if(q.iceGatheringState==="complete")break;yield Object(u.a)(.1*c.a.second)}const ue=q.localDescription;if(ue)return I.a.debug("Sending LAN offer signal with description",{description:ue}),ue;I.a.error("Failed to generate LAN offer description")})}handleLanAnswer(q){return ie(this,void 0,void 0,function*(){const{peerConnection:$}=this;if(!this.config.baseConfig.isLan)throw new Error('"handleLanAnswer" method can only be used with LAN connections. Internet connections should call the "handleSignal" method.');yield $.setRemoteDescription(q)})}getChannelFromLabel(q){switch(q){case"stream.latest-ttl":return this.latestTtlStreamChannel;case"stream.reliable":return this.reliableStreamChannel;case"stream.latest-reliable":return this.latestReliableStreamChannel;case"stream.latest-try-once":return this.latestTryOnceStreamChannel}}sendOnChannel(q,$){let te;try{te=Object(G.encode)(JSON.stringify($))}catch(ue){return void I.a.warn("Failed to encode RTC message",{error:ue})}try{q.send(te),this.sessionMetrics&&this.sessionMetrics.incrementLocalSent($)}catch(ue){I.a.warn("Failed to send message to channel",{error:ue,channel:q.label})}}channelNotRecognized(q){return q!==this.latestTtlStreamChannel&&q!==this.latestReliableStreamChannel&&q!==this.latestTryOnceStreamChannel&&q!==this.reliableStreamChannel}setupChannel(q){q.onmessage=$=>{if(this.channelNotRecognized(q))return void I.a.warn("Received message on unrecognized data channel.");let te;try{te=JSON.parse(Object(G.decode)($.data))}catch(ue){return void I.a.warn("Received unparseable message on RTC stream data channel",{error:ue,channel:q.label})}te.communicationType==="message-chunk"?this.receiveChannelMessageChunk(q,te):this.receiveChannelMessage(q,te)},q.onerror=$=>{I.a.warn(`Channel error: ${$.error}`,{error:$.error,sessionId:this.getSessionId(),channelLabel:q.label})},q.onopen=()=>{I.a.debug("Channel opened",{sessionId:this.getSessionId(),channelLabel:q.label})},q.onclose=()=>{const $={bufferedAmount:q.bufferedAmount,sessionId:this.getSessionId(),channelLabel:q.label};this.closeCalled===!1?I.a.debug("Unexpected channel closed",$):I.a.debug("Channel closed",$)}}receiveChannelMessage(q,$){const{config:te}=this,{remotePeerId:ue}=this.config.baseConfig;this.lastMessageTimestamp=new Date().getTime(),$=function(ae){switch(ae.header.stream.streamType){case"twist":{const{twist:de}=ae.payload;if(!de)throw Error("twist not in payload of RTC message with type twist");return{header:ae.header,payload:{twist:{linear:Object.assign({x:0,y:0,z:0},de.linear),angular:Object.assign({x:0,y:0,z:0},de.angular)}}}}case"pose":{const{pose:de}=ae.payload;if(!de)throw Error("pose not in payload of RTC message with type pose");return{header:ae.header,payload:{pose:{translation:Object.assign({x:0,y:0,z:0},de.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},de.rotation)}}}}case"pose-with-covariance":{const{poseWithCovariance:de}=ae.payload;if(!de)throw Error("poseWithCovariance not in payload of RTC message with type pose-with-covariance");const me=new Array(36).fill(0);return de.covariance.forEach((pe,ge)=>{if(ge>=36)throw Error("covariance contains more than 36 elements");me[ge]=pe}),{header:ae.header,payload:{poseWithCovariance:{pose:{translation:Object.assign({x:0,y:0,z:0},de.pose.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},de.pose.rotation)},covariance:me}}}}case"point":{const{point:de}=ae.payload;if(!de)throw Error("point not in payload of RTC message with type point");return{header:ae.header,payload:{point:Object.assign({x:0,y:0,z:0},de)}}}default:return ae}}($),this.sessionMetrics&&this.sessionMetrics.incrementLocalReceived($),this.handleSystemMessage(q,$)||(q===this.latestTryOnceStreamChannel||q===this.latestTtlStreamChannel||q===this.latestReliableStreamChannel)&&!this.isLatestMessage($)||te.baseConfig.receive(ue,$)}receiveChannelMessageChunk(q,$){const te=this.reassemblyTable.get($.id)||[];if(te.push($),te.length===$.total){const ue=function(ae){const de=ae.sort((me,pe)=>me.seq<pe.seq?-1:1).map(me=>me.part).reduce((me,pe)=>me+pe);try{return JSON.parse(de)}catch{return void I.a.warn("Could not reassemble RTC message chunks")}}(te);return ue&&this.receiveChannelMessage(q,ue),void this.reassemblyTable.delete($.id)}this.reassemblyTable.set($.id,te),this.reassemblyTableLastTimestamp.set($.id,new Date().getTime())}handleSystemMessage(q,$){var te,ue;const{config:ae}=this,{baseConfig:de}=ae,{remotePeerId:me}=de;switch($.header.stream.streamType){case"ping":return this.sendSystemMessage(q,{type:"pong",timestamp:d($.payload.ping)}),!0;case"pong":{const pe=new Date().getTime()-d($.payload.pong);return this.pingTimeMs=pe,O.aggregate("rtc-ping-time",pe),!0}case"streams-info":{const{sessionMetrics:pe}=this,ge=(te=$.payload.streamsInfo)===null||te===void 0?void 0:te.timestamp;return!!ge&&(pe==null||pe.updateRemoteMessagesCounts($),(ue=de.onStreamsInfoUpdate)===null||ue===void 0||ue.call(de,me,ge),!0)}case"stream-control":return!0;default:return!1}}sendSystemMessage(q,$){var te;const{localUserId:ue,localPeerId:ae}=this.config.baseConfig;if(q.readyState!=="open")return;const de={entityId:ue!=null?ue:ae,streamName:`$.${$.type}`,streamType:$.type};let me;switch($.type){case"ping":me={ping:new Date().getTime()};break;case"pong":me={pong:$.timestamp};break;case"stream-control":me={streamControl:$.streamControl};break;case"streams-info":me={streamsInfo:(te=this.sessionMetrics)===null||te===void 0?void 0:te.getLocalStreamsInfo(new Date().getTime())}}this.sendOnChannel(q,X(de,me))}isLatestMessage(q){const $=j(q.header.stream),te=(this.streamLatestTimestamp.get($)||0)<=q.header.created;return te&&this.streamLatestTimestamp.set($,q.header.created),te}}function Se(ye){var q,$;return{userId:(q=ye.getUserId())===null||q===void 0?void 0:q.getValue(),deviceId:($=ye.getDeviceId())===null||$===void 0?void 0:$.getValue(),organizationId:ye.getOrganizationId(),id:ye.getPeerId(),capabilities:[],capabilitySet:{}}}var we=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class Ee{constructor(q){this.config=q,this.grpcCallDeadline=5*c.a.second,this.refreshIntervalDelayMs=2*c.a.second,this.iceServersTtl=30*c.a.minute,this.connections=[],this.localConnections=[],this.isConnectionInitiator=new Map,this.isOutgoingConnection=new Map,this.peerDataChannelListeners=[];const{refreshIntervalDelayMs:$}=this;this.refreshInterval=Z({func:()=>we(this,void 0,void 0,function*(){try{yield this.update()}catch(te){I.a.warn("RTC refresh failed",{error:te})}}),delay:$,immediate:!0})}send(q,$,te){const ue=this.getActiveConnection(q);ue?ue.isReady()?ue.send($,te):I.a.warn("Send called with unready connection."):I.a.warn("Send called with no connection.")}controlRemoteStream(q,$){const te=this.getActiveConnection(q);te?te.isReady()?te.controlRemoteStream($):I.a.warn("controlRemoteStream called with unready connection."):I.a.warn("controlRemoteStream called with no connection.")}getLocalPeer(){return we(this,void 0,void 0,function*(){for(;!this.localPeer;)yield Object(u.a)(.1*c.a.second);return Se(this.localPeer)})}connect(q,$){var te,ue,ae;return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode===!0)throw new Error("connect method called in local only mode.");const{track:de,signalingClient:me}=this.config,{localPeer:pe,receiveSignalStream:ge,iceServers:ce}=this;if(!pe||!ge||!ce)return void I.a.warn("Connect called prior to local peer, receiveSignalStream, and ICE servers ready");if(this.getActiveConnection(q))return void I.a.warn("Connect called for peer with existing connection.");if(this.isOutgoingConnection.get(q))return void I.a.warn("Connect called for peer with an existing outgoing connection offer.");this.isOutgoingConnection.set(q,!0);const Te=new he(yield this.createRTCPeerConnection(ce,$),{baseConfig:{isOffer:!0,isLan:!1,receive:(De,We)=>this.config.receive(De,We),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(De,We)=>{var Be,ke;return(ke=(Be=this.config).onStreamsInfoUpdate)===null||ke===void 0?void 0:ke.call(Be,De,We)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(te=pe.getUserId())===null||te===void 0?void 0:te.getValue(),localPeerId:pe.getPeerId(),remotePeerId:q,sessionType:$==null?void 0:$.sessionType},remoteConfig:{}},De=>this.onCustomDataChannel(q,De)),Re=yield Te.getOffer();if(!Re)return I.a.error("Failed to generate offer."),void this.isOutgoingConnection.delete(q);I.a.debug("Sending offer."),de==null||de("Sending offer",Re);const Pe=new L.SendSignalRequest;Pe.setSignal(Re);const Le=yield(()=>we(this,void 0,void 0,function*(){try{return yield me.sendSignal(Pe,yield this.getMetadata({}))}catch(De){I.a.warn("Error when sending signal",{error:De})}}))();if(!this.isOutgoingConnection.get(q))return void I.a.debug("No offer set after receiving offer signal response.");I.a.debug("Offer sent.");const Fe=(ue=Le==null?void 0:Le.getSessionId())===null||ue===void 0?void 0:ue.getValue(),ze=(ae=Le==null?void 0:Le.getSessionCreatedTimestamp())===null||ae===void 0?void 0:ae.getValue();return Fe&&ze?(Te.setSessionId(Fe),Te.setSessionCreatedTimestamp(ze),this.isOutgoingConnection.delete(q),this.connections.push(Te),this.isConnectionInitiator.set(Te,!0),this.setupHandlers(Te),Fe):(I.a.warn("No session ID or no session created timestamp on send signal response."),void this.isOutgoingConnection.delete(q))})}connectLan(q){var $,te;return we(this,void 0,void 0,function*(){const ue=new B(q),ae=new he(yield this.createRTCPeerConnection([]),{baseConfig:{isOffer:!0,isLan:!0,receive:(ge,ce)=>this.config.receive(ge,ce),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(ge,ce)=>{var Te,Re;return(Re=(Te=this.config).onStreamsInfoUpdate)===null||Re===void 0?void 0:Re.call(Te,ge,ce)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(te=($=this.localPeer)===null||$===void 0?void 0:$.getUserId())===null||te===void 0?void 0:te.getValue(),localPeerId:"lan_client",remotePeerId:q}},ge=>this.onCustomDataChannel(q,ge)),de=yield ae.getLanOffer();if(!de)return I.a.warn("Could not generate LAN offer"),!1;const me=yield ue.postLanRtcOffer({offer:JSON.stringify(de)}),pe=new RTCSessionDescription(JSON.parse(me.answer));return yield ae.handleLanAnswer(pe),this.localConnections.push(ae),this.isConnectionInitiator.set(ae,!0),Object(E.v4)()})}getConnections(){return[...this.connections,...this.localConnections]}createCustomDataChannel(q,$,te,ue,ae){const de=this.getActiveConnection(q);if(de&&this.isConnectionInitiator.has(de)){const pe=de.peerConnection.createDataChannel("custom."+$,te);return ue&&(pe.binaryType="arraybuffer"),ae(q,pe),()=>{}}const me=(pe,ge)=>{q===pe&&ge.label==="custom."+$&&ae(q,ge)};return this.peerDataChannelListeners.push(me),()=>{this.peerDataChannelListeners=this.peerDataChannelListeners.filter(pe=>pe!==me)}}onCustomDataChannel(q,$){this.peerDataChannelListeners.forEach(te=>te(q,$))}getConnectionStatus(q){if(this.isOutgoingConnection.get(q))return"connecting";const $=this.getActiveConnection(q);return $?$.isReady()?"connected":"connecting":"disconnected"}getConnectionStatsInfo(q){return we(this,void 0,void 0,function*(){const $=this.getActiveConnection(q);if($)return yield $.getConnectionStatsInfo()})}disconnect(q){return we(this,void 0,void 0,function*(){const $=this.getActiveConnection(q);$&&(yield $.close())})}getPeers(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:q}=this.config,$=yield(()=>we(this,void 0,void 0,function*(){try{return yield q.getPeers(new L.GetPeersRequest,yield this.getMetadata({}))}catch(ae){I.a.warn("Error when getting peers",{error:ae})}}))();if(!$)return[];const te=$.getPeersList();if(!te)return[];const ue=ae=>{var de,me;return(me=(de=ae.getPeerCreatedTimestamp())===null||de===void 0?void 0:de.getValue())!==null&&me!==void 0?me:0};return te.sort((ae,de)=>ue(de)-ue(ae)).map(ae=>Se(ae))})}getSessions(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:q}=this.config,$=yield(()=>we(this,void 0,void 0,function*(){try{return yield q.getPeers(new L.GetPeersRequest,yield this.getMetadata({}))}catch(ae){I.a.warn("Error when getting peers",{error:ae})}}))();if(!$)return{};const te=$.getPeersList(),ue={};for(const ae of te)ue[ae.getPeerId()]=ae.getSessionIdsList();return ue})}getPing(q){const $=this.getActiveConnection(q);if($)return $.getPing();I.a.warn("Attempted to get ping time from inactive peer.")}getLastMessageTimestamp(q){const $=this.getActiveConnection(q);if($)return $.getLastMessageTimestamp();I.a.warn("Attempted to get last message time from inactive peer.")}getSessionMetricsMessageCounts(q){const $=this.getActiveConnection(q);if($)return $.getSessionMetricsMessageCounts();I.a.warn("Attempted to get session metrics counts from inactive peer.")}isReady(){if(this.config.lanOnlyMode)return!0;const{localPeer:q,receiveSignalStream:$,iceServers:te}=this;return!!(q&&$&&te)}shutdown(){return we(this,void 0,void 0,function*(){I.a.info("Shutdown called on RTC client"),yield this.refreshInterval.stop(),this.receiveSignalStream&&this.receiveSignalStream.cancel();const q=this.connections;this.connections=[],yield this.closeConnections(q);const{localPeer:$}=this;if(!$||this.config.lanOnlyMode)return;const{signalingClient:te}=this.config;yield(()=>we(this,void 0,void 0,function*(){try{const ue=new L.DeletePeerRequest;ue.setPeerId($.getPeerId()),yield te.deletePeer(ue,yield this.getMetadata({}))}catch(ue){return void I.a.warn("Error deleting local peer",{error:ue})}}))()})}createPeer(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createPeer method cannot be used in local-only mode.");const{signalingClient:q}=this.config,$=yield(()=>we(this,void 0,void 0,function*(){try{return yield q.createPeer(new L.CreatePeerRequest,yield this.getMetadata({}))}catch(ue){throw new Error(`Was not able to create peer: ${JSON.stringify(ue)}`)}}))(),te=$==null?void 0:$.getPeer();if(!te)throw new Error("Response did not provide peer.");return this.localPeer=te})}createReceiveSignalStream(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createReceiveSignalStream method cannot be used in local-only mode.");const{signalingClient:q}=this.config,{localPeer:$,iceServers:te}=this;if(!$||!te)return;const{receiveSignalStream:ue}=this;ue&&ue.cancel();const ae=new L.ReceiveSignalStreamRequest;ae.setPeerId($.getPeerId());const de=yield(()=>we(this,void 0,void 0,function*(){try{return q.receiveSignalStream(ae,yield this.getMetadata({hasDeadline:!1}))}catch(me){throw new Error(`Unable to create receive signal stream: ${JSON.stringify(me)}`)}}))();if(!de)throw new Error("Response did not provide stream.");return de.on("data",me=>we(this,void 0,void 0,function*(){var pe,ge,ce,Te;const Re=me.getSignal(),Pe=(pe=Re==null?void 0:Re.getSessionId())===null||pe===void 0?void 0:pe.getValue(),Le=Re==null?void 0:Re.getSenderId(),Fe=Re==null?void 0:Re.getReceiverId(),ze=(ge=Re==null?void 0:Re.getSessionCreatedTimestamp())===null||ge===void 0?void 0:ge.getValue();if(!(Re&&Pe&&Le&&Fe&&ze))return void I.a.warn("Received signal with missing information.");const De=this.getActiveConnection(Le);if(De)if(De.getSessionId()!==Pe){if(I.a.debug("Received signal: different session for a peer we're already connected to."),(De.getSessionCreatedTimestamp()||0)>ze)return;const We=new he(yield this.createRTCPeerConnection(te),{baseConfig:{isOffer:!1,isLan:!1,receive:(Be,ke)=>this.config.receive(Be,ke),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Be,ke)=>{var qe,Ge;return(Ge=(qe=this.config).onStreamsInfoUpdate)===null||Ge===void 0?void 0:Ge.call(qe,Be,ke)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:$.getPeerId(),localUserId:(Te=$.getUserId())===null||Te===void 0?void 0:Te.getValue(),remotePeerId:Le},remoteConfig:{sessionId:Pe,sessionCreatedTimestamp:ze}},Be=>this.onCustomDataChannel(Le,Be));yield We.handleSignal(Re),this.connections.push(We)}else I.a.debug("Received signal: for an existing connection."),yield De.handleSignal(Re);else{I.a.debug("Received signal: new connection.");const We=new he(yield this.createRTCPeerConnection(te),{baseConfig:{isOffer:!1,isLan:!1,receive:(Be,ke)=>this.config.receive(Be,ke),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Be,ke)=>{var qe,Ge;return(Ge=(qe=this.config).onStreamsInfoUpdate)===null||Ge===void 0?void 0:Ge.call(qe,Be,ke)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:$.getPeerId(),localUserId:(ce=$.getUserId())===null||ce===void 0?void 0:ce.getValue(),remotePeerId:Le},remoteConfig:{sessionId:Pe,sessionCreatedTimestamp:ze}},Be=>this.onCustomDataChannel(Le,Be));yield We.handleSignal(Re),this.connections.push(We)}})),de.on("end",()=>{de.cancel(),this.receiveSignalStream=void 0}),de.on("error",me=>{switch(me.code){case k.StatusCode.CANCELLED:case k.StatusCode.UNAVAILABLE:case k.StatusCode.UNKNOWN:I.a.debug("Receive signal stream error",{error:me});break;case k.StatusCode.UNAUTHENTICATED:I.a.warn("Receive signal stream error",{error:me});break;default:I.a.error("Receive signal stream error",{error:me})}de.cancel(),this.receiveSignalStream=void 0}),this.receiveSignalStream=de})}createRTCPeerConnection(q,$){var te;return we(this,void 0,void 0,function*(){const ue=$==null?void 0:$.rtcIceTransportPolicies,ae=$!=null&&$.rtcIceServerProtocol?[$==null?void 0:$.rtcIceServerProtocol]:void 0,de=q.map(pe=>Object.assign(Object.assign({},pe),{urls:typeof pe.urls=="string"?[pe.urls]:pe.urls})).map(pe=>Object.assign(Object.assign({},pe),{urls:pe.urls.filter(ge=>{const ce=(ue===void 0||ue.some(Te=>((Re,Pe)=>{switch(Pe){case"stun":return/^stuns?:/.test(Re);case"turn":return/^turns?:/.test(Re)}})(ge,Te)))&&(ae===void 0||ae.some(Te=>((Re,Pe)=>Re.endsWith(`transport=${Pe}`))(ge,Te)));return ce||I.a.debug(`Ignoring ICE server: ${ge}`),ce})})).filter(({urls:pe})=>pe.filter(ge=>ge).length>0),me=(te=this.config.alternateRTCPeerConnection)!==null&&te!==void 0?te:window.RTCPeerConnection;if(!me)throw new Error("RTCPeerConnection class not found. WebRTC must be enabled.");return new me(Object.assign({iceServers:de,iceTransportPolicy:(ue==null?void 0:ue.length)===1&&ue[0]==="turn"?"relay":"all"},$))})}closeConnections(q){return we(this,void 0,void 0,function*(){const $=yield R(q.map(te=>we(this,void 0,void 0,function*(){yield te.close()})));for(const te of $)I.a.warn("Request to close session failed",{error:te})})}getActiveConnection(q){return this.getConnections().find($=>$.getRemotePeerId()===q&&$.isActive())}update(){var q;return we(this,void 0,void 0,function*(){if(this.localConnections=this.localConnections.filter(me=>me.isActive()),this.config.lanOnlyMode)return;const{signalingClient:$}=this.config;if(!this.localPeer||!this.receiveSignalStream||!this.iceServers)return this.localPeer||(yield this.createPeer()),this.iceServers||(yield this.updateIceServers()),void(this.receiveSignalStream||(yield this.createReceiveSignalStream()));yield this.closeConnections(this.connections.filter(me=>!me.isActive())),this.connections=this.connections.filter(me=>me.isActive());const{localPeer:te}=this,ue=this.connections.filter(me=>me.getSessionId).map(me=>d(me.getSessionId()));te.setSessionIdsList(ue);const ae=new L.RefreshPeerRequest;ae.setPeer(te);try{yield $.refreshPeer(ae,yield this.getMetadata({}))}catch(me){me.code===k.StatusCode.NOT_FOUND?(I.a.warn("Peer expired, creating new peer",{peerId:te.getPeerId()}),yield this.reset()):I.a.warn("Error calling RefreshPeer",{error:me})}const de=yield this.getPeers();for(const me of this.connections)me.setRemoteDeviceId((q=de.find(pe=>pe.id===me.getRemotePeerId()))===null||q===void 0?void 0:q.deviceId)})}reset(){return we(this,void 0,void 0,function*(){yield this.closeConnections(this.connections),this.connections=[],this.isOutgoingConnection=new Map,yield this.createPeer(),yield this.createReceiveSignalStream()})}updateIceServers(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)return;const{iceServersLastUpdate:q,iceServersTtl:$}=this,te=new Date().getTime();if(!q||te-q>$)try{const ue=(yield this.config.signalingClient.getIceServers(new L.GetIceServersRequest,yield this.getMetadata({}))).getIceServers();this.iceServers=JSON.parse(ue),this.iceServersLastUpdate=te}catch(ue){I.a.warn("Error in updateIceServers",{error:ue})}})}setupHandlers(q){const{peerConnection:$}=q,te=q.getSessionCreatedTimestamp();$.onconnectionstatechange=()=>we(this,void 0,void 0,function*(){const ue=$.connectionState;if(te)switch(ue){case"connected":O.aggregate("rtc-connect-time",new Date().getTime()-te);break;case"failed":O.increment("rtc-connect-failed")}})}getMetadata(q){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getMetadata method cannot be called in local-only mode");const{getToken:$}=this.config,{grpcCallDeadline:te}=this,{hasDeadline:ue}=q,ae=ue===!1?void 0:new Date().getTime()+te;return{authorization:yield $(),deadline:ae}})}}},,function(e,t,r){r.r(t),r.d(t,"LogClient",function(){return l});var n=r(25),o=function(s,i,c,u){return new(c||(c=Promise))(function(b,A){function _(S){try{f(u.next(S))}catch(w){A(w)}}function v(S){try{f(u.throw(S))}catch(w){A(w)}}function f(S){var w;S.done?b(S.value):(w=S.value,w instanceof c?w:new c(function(P){P(w)})).then(_,v)}f((u=u.apply(s,i||[])).next())})};class l extends n.a{log(i){return o(this,void 0,void 0,function*(){yield this.fetch("logs",{method:"POST",body:JSON.stringify({logs:i}),allowUnsafeRetries:!0})})}}}])})})(dist);function defined(e,t){if(e!==void 0)return e;throw new Error(t||"Value is undefined")}let FORMANT_API_URL="https://api.formant.io";typeof window!="undefined"&&(FORMANT_API_URL=window.FORMANT_API_URL||FORMANT_API_URL);let urlParams$1=new URLSearchParams("");typeof window!="undefined"&&(urlParams$1=new URLSearchParams(window.location.search));const envDev=urlParams$1.get("formant_dev");envDev&&(FORMANT_API_URL="https://api-dev.formant.io");const envStage=urlParams$1.get("formant_stage");envStage&&(FORMANT_API_URL="https://api-stage.formant.io");class App{static sendAppMessage(t){window.parent.postMessage(t,"*")}static getCurrentModuleContext(){let t=new URLSearchParams("");return typeof window!="undefined"&&(t=new URLSearchParams(window.location.search)),t.get("module")}static isModule(){return this.getCurrentModuleContext()!==null}static goToTime(t){this.sendAppMessage({type:"go_to_time",time:t.getTime()})}static goToDevice(t){this.sendAppMessage({type:"go_to_device",deviceId:t})}static showMessage(t){this.sendAppMessage({type:"show_message",message:t})}static requestModuleData(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"request_module_data",module:t})}static setModuleDateTimeRange(t,r){const n=this.getCurrentModuleContext();if(!n)throw new Error("No module context");this.sendAppMessage({type:"set_module_data_time_range",module:n,before:t,after:r||0})}static refreshAuthToken(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"refresh_auth_token",module:t})}static sendChannelData(t,r){const n=this.getCurrentModuleContext();if(!n)throw new Error("No module context");this.sendAppMessage({type:"send_channel_data",source:n,channel:t,data:r})}static setupModuleMenus(t){const r=this.getCurrentModuleContext();if(!r)throw new Error("No module context");this.sendAppMessage({type:"setup_module_menus",module:r,menus:t})}static addMenuListener(t){window.addEventListener("message",r=>{const n=r.data;n.type==="module_menu_item_clicked"&&t(n.menu)})}static addAccessTokenRefreshListener(t){window.addEventListener("message",r=>{const n=r.data;n.type==="auth_token"&&t(n.token)})}static addModuleDataListener(t){window.addEventListener("message",r=>{const n=r.data;n.type==="module_data"&&t({streams:n.streams,time:n.time,queryRange:n.queryRange})})}static addChannelDataListener(t,r){window.addEventListener("message",n=>{const o=n.data;o.type==="channel_data"&&o.channel===t&&r({source:o.source,data:o.data})})}}const Oe=class{static async login(t,r){try{const n=await fetch(`${FORMANT_API_URL}/v1/admin/auth/login`,{method:"POST",body:JSON.stringify({email:t,password:r}),headers:{"Content-Type":"application/json"}}),o=await n.json();if(n.status!==200)throw new Error(o.message);return await Oe.loginWithToken(o.authentication.accessToken,o.authentication.refreshToken),o.authentication}catch(n){return Oe.waitingForAuth.forEach(o=>o(!1)),Oe.waitingForAuth=[],Promise.reject(n)}}static async loginWithToken(t,r){const n=JSON.parse(atob(t.split(".")[1]));try{let o;if(Oe.isShareToken=n["formant:claims"]&&n["formant:claims"].type=="share",n["formant:claims"]&&(Oe.currentOrganization=n["formant:claims"].organizationId),n["custom:organization_id"]&&(Oe.currentOrganization=n["custom:organization_id"]),Oe.isShareToken||(o=n.sub),n["formant:claims"]&&n["formant:claims"].userId&&(o=n["formant:claims"].userId),o){const l=await fetch(`${FORMANT_API_URL}/v1/admin/users/${o}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t}}),s=await l.json();if(l.status!==200)throw new Error(s.message);Oe.currentUser=s}Oe.token=t,Oe.waitingForAuth.forEach(l=>l(!0))}catch(o){console.error(o),Oe.waitingForAuth.forEach(l=>l(!1))}Oe.waitingForAuth=[],r&&(Oe.refreshToken=r,setInterval(async()=>{if(Oe.refreshToken){const l=await(await fetch(`${FORMANT_API_URL}/v1/admin/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:Oe.refreshToken})})).json();Oe.token=l.authentication.accessToken}},1e3*60*60))}static isAuthenticated(){return Oe.token!==void 0}static getCurrentUser(){return Oe.currentUser}static async waitTilAuthenticated(){return Oe.token!==void 0?!0:new Promise(t=>{Oe.waitingForAuth.push(function(r){t(r)})})}static async listenForRefresh(){App.addAccessTokenRefreshListener(t=>{this.loginWithToken(t)}),setInterval(async()=>{App.refreshAuthToken()},1e3*60*60)}};let Authentication=Oe;je(Authentication,"token"),je(Authentication,"refreshToken"),je(Authentication,"currentUser"),je(Authentication,"currentOrganization"),je(Authentication,"isShareToken",!1),je(Authentication,"defaultDeviceId"),je(Authentication,"waitingForAuth",[]);function delay(e){return new Promise(t=>setTimeout(t,e))}class DataChannel{constructor(t){je(this,"ready",!1);je(this,"listeners",[]);je(this,"openListeners",[]);je(this,"closeListeners",[]);je(this,"errorListeners",[]);je(this,"binaryListeners",[]);je(this,"error");je(this,"decoder",new TextDecoder);this.dataChannel=t,this.dataChannel.binaryType="arraybuffer",this.dataChannel.onopen=()=>{this.ready=!0,this.openListeners.forEach(r=>r())},this.dataChannel.onclose=()=>{this.ready=!1,this.closeListeners.forEach(r=>r())},this.dataChannel.onerror=r=>{console.error(r),this.error="An error occurred in DataChannel",this.errorListeners.forEach(n=>n(r))},this.dataChannel.onmessage=r=>{this.listeners.forEach(n=>{const o=new Uint8Array(r.data),l=this.decoder.decode(o);n(l)}),this.binaryListeners.forEach(n=>{n(new Uint8Array(r.data))})}}addOpenListener(t){this.openListeners.push(t)}removeOpenListener(t){this.openListeners=this.openListeners.filter(r=>r!==t)}addCloseListener(t){this.closeListeners.push(t)}removeCloseListener(t){this.closeListeners=this.closeListeners.filter(r=>r!==t)}addErrorListener(t){this.errorListeners.push(t)}removeErrorListener(t){this.errorListeners=this.errorListeners.filter(r=>r!==t)}async waitTilReady(){return this.ready?!0:new Promise((r,n)=>{let o=window.setInterval(()=>{this.ready&&(window.clearInterval(o),r(!0)),this.error&&n(this.error)},10)})}send(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}sendBinary(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}addListener(t){this.listeners.push(t)}removeListener(t){const r=this.listeners.indexOf(t);if(r===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.listeners.splice(r,1)}addBinaryListener(t){this.binaryListeners.push(t)}removeBinaryListener(t){const r=this.binaryListeners.indexOf(t);if(r===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.binaryListeners.splice(r,1)}}class CaptureStream{constructor(t){je(this,"token");this.captureSession=t}async ingestJSON(t){if(!this.token){const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions/${this.captureSession.code}/authenticate`,{method:"POST"})).json();this.token=n.token}await fetch(`${FORMANT_API_URL}/v1/ingest`,{method:"POST",body:JSON.stringify({deviceId:this.captureSession.deviceId,name:this.captureSession.streamName,type:"json",points:[[Date.now(),JSON.stringify(t)]]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+this.token}})}}class Manipulator{constructor(t,r){je(this,"currentListeners",[]);je(this,"onRealtimeMessage",(t,r)=>{r.payload.jointState&&this.currentListeners.forEach(n=>{r.payload.jointState&&n(r.payload.jointState)})});this.device=t,this.config=r}async synchronize(){this.device.addRealtimeListener(this.onRealtimeMessage),this.device.startListeningToRealtimeDataStream(this.config.currentJointStateStream)}async desynchronize(){this.device.removeRealtimeListener(this.onRealtimeMessage),this.device.stopListeningToRealtimeDataStream(this.config.currentJointStateStream)}async addCurrentJointStateListener(t){this.currentListeners.push(t)}}class RequestDataChannel{constructor(t,r,n){je(this,"channel");je(this,"requestIdToResponseMap",new Map);this.device=t,this.channel_name=r,this.timeout=n}addOpenListener(t){defined(this.channel,"channel not initalized").addOpenListener(t)}removeOpenListener(t){defined(this.channel,"channel not initalized").removeOpenListener(t)}addCloseListener(t){defined(this.channel,"channel not initalized").addCloseListener(t)}removeCloseListener(t){defined(this.channel,"channel not initalized").removeCloseListener(t)}addErrorListener(t){defined(this.channel,"channel not initalized").addErrorListener(t)}removeErrorListener(t){defined(this.channel,"channel not initalized").removeErrorListener(t)}}class BinaryRequestDataChannel extends RequestDataChannel{constructor(){super(...arguments);je(this,"RESPONSE_SUCCESS_BYTE",0);je(this,"decoder",new TextDecoder)}generateBinaryId(){const r=new Uint8Array(16);for(let n=0;n<r.length;n++)r[n]=Math.floor(Math.random()*256);return r}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addBinaryListener(r=>{const o=r.slice(0,16).toString();if(o.length===0)throw new Error("Invalid response");const l=r.slice(16);if(l.length===0)throw new Error("Invalid response");this.requestIdToResponseMap.has(o)&&this.requestIdToResponseMap.set(o,l)})}async request(r){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:n,requestIdToResponseMap:o,timeout:l}=this;await n.waitTilReady();const s=this.generateBinaryId(),i=s.toString();o.set(i,!0),n.sendBinary(new Uint8Array([...s,...r]));const c=new Date().getTime();for(;new Date().getTime()<c+l;)if(await delay(50),o.has(i)){const u=o.get(i);if(u!==!0){o.delete(i);const b=u[0]===this.RESPONSE_SUCCESS_BYTE,A=u.slice(1);if(b)return A;throw console.error({name:"AdapterError",message:this.decoder.decode(A)}),new Error("Binary request datachannel adapter error")}}throw o.delete(i),console.error({name:"TimeoutError",message:`Request timed out after ${l/1e3} seconds`}),new Error("Binary request data channel request timed out")}}class TextRequestDataChannel extends RequestDataChannel{generateTextId(){return Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2)}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addListener(t=>{const r=JSON.parse(t),{id:n,data:o,error:l}=r;if(!n)throw new Error("Invalid response");if(!o&&!l)throw new Error("Invalid response");this.requestIdToResponseMap.has(n)&&this.requestIdToResponseMap.set(n,r)})}async request(t){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:r,requestIdToResponseMap:n,timeout:o}=this;await r.waitTilReady();const l=this.generateTextId();n.set(l,!0),r.send(JSON.stringify({id:l,data:t}));const s=new Date().getTime();for(;new Date().getTime()<s+o;)if(await delay(50),n.has(l)){const i=n.get(l);if(i!==!0){n.delete(l);const{data:c,error:u}=i;if(c)return c;if(u)throw console.error({name:"AdapterError",message:u}),new Error("Text request datachannel adapter error")}}throw n.delete(l),console.error({name:"TimeoutError",message:`Request timed out after ${o/1e3} seconds`}),new Error("Text request datachannel request timed out")}}const SessionType={Teleop:1,Observe:3};class Device{constructor(t,r,n){je(this,"rtcClient");je(this,"remoteDevicePeerId");je(this,"realtimeListeners",[]);je(this,"handleMessage",(t,r)=>{this.realtimeListeners.forEach(n=>n(t,r))});this.id=t,this.name=r,this.organizationId=n}async getLatestTelemetry(){return(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}async getConfiguration(){let t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});const r=await t.json();if(!r.state.reportedConfiguration)throw new Error("Device has no configuration, has it ever been turned on?");const n=r.state.reportedConfiguration.version;return t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}/configurations/${n}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),(await t.json()).document}async getFileUrl(t){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileId:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).fileUrls}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async startRealtimeConnection(t){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{const r=new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:this.handleMessage});for(;!r.isReady();)await delay(100);const o=(await r.getPeers()).find(l=>l.deviceId===this.id);if(!o)throw new Error("Cannot find peer, is the robot offline?");for(this.remoteDevicePeerId=o.id,await r.connect(this.remoteDevicePeerId,t||{sessionType:SessionType.Teleop});r.getConnectionStatus(this.remoteDevicePeerId)!=="connected";)await delay(100);this.rtcClient=r}}async sendRealtimeMessage(t,r={channelLabel:"stream.reliable"}){const n=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer();n.send(defined(o).id,t,r)}addRealtimeListener(t){this.realtimeListeners.push(t)}removeRealtimeListener(t){const r=this.realtimeListeners.indexOf(t);if(r===-1)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(r,1)}async getRealtimeAudioStreams(){var n,o,l,s,i,c;const t=await this.getConfiguration(),r=[];for(const u of(o=(n=t.teleop)==null?void 0:n.hardwareStreams)!=null?o:[])u.rtcStreamType==="audio-chunk"&&r.push({name:u.name});for(const u of(s=(l=t.teleop)==null?void 0:l.rosStreams)!=null?s:[])u.topicType=="audio_common_msgs/AudioData"&&r.push({name:u.topicName});for(const u of(c=(i=t.teleop)==null?void 0:i.customStreams)!=null?c:[])u.rtcStreamType==="audio-chunk"&&r.push({name:u.name});return r}async getRealtimeVideoStreams(){var n,o,l,s,i,c;const t=await this.getConfiguration(),r=[];for(const u of(o=(n=t.teleop)==null?void 0:n.hardwareStreams)!=null?o:[])u.rtcStreamType==="h264-video-frame"&&r.push({name:u.name});for(const u of(s=(l=t.teleop)==null?void 0:l.rosStreams)!=null?s:[])u.topicType=="formant/H264VideoFrame"&&r.push({name:u.topicName});for(const u of(c=(i=t.teleop)==null?void 0:i.customStreams)!=null?c:[])u.rtcStreamType==="h264-video-frame"&&r.push({name:u.name});return r}async getRealtimeManipulators(){var n;const t=await this.getConfiguration(),r=[];for(const o of(n=t.teleop.rosStreams)!=null?n:[])o.topicType=="sensor_msgs/JointState"&&r.push(new Manipulator(this,{currentJointStateStream:{name:o.topicName},plannedJointStateStream:o.plannedTopic?{name:o.plannedTopic}:void 0,planValidStream:o.planValidTopic?{name:o.planValidTopic}:void 0,endEffectorStream:o.endEffectorTopic?{name:o.endEffectorTopic}:void 0,endEffectorLinkName:o.endEffectorLinkName,baseReferenceFrame:o.baseReferenceFrame,localFrame:o.localFrame}));return r}async startListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!0,pipeline:"telemetry"})}async changeStreamAudioType(t,r){const n=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer();n.controlRemoteStream(defined(o).id,{streamName:t,setAudioFormat:r})}async disableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){const r=(await defined(this.rtcClient,"Realtime connection has not been started").getPeers()).find(n=>n.deviceId===this.id);return defined(r,"Could not find remote peer for device "+this.id)}async stopRealtimeConnection(){if(this.rtcClient)await this.rtcClient.disconnect(this.id);else throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async isInRealtimeSession(){let t=await Fleet.getPeers(),r=await Fleet.getRealtimeSessions(),n=t.find(o=>o.deviceId===this.id);return n?r[n.id].length>0:!1}async getAvailableCommands(){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/command-templates/`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(n=>({name:n.name,id:n.id,command:n.command,description:n.description,parameterEnabled:n.parameterEnabled,parameterValue:n.parameterValue,parameterMeta:n.parameterMeta,enabled:n.enabled}))}async sendCommand(t,r,n,o){var u;const s=(await this.getAvailableCommands()).find(b=>b.name===t);if(!s)throw new Error(`Could not find command with name "${t}"`);let i;if(r===void 0)if(s.parameterEnabled&&s.parameterValue)i=s.parameterValue;else throw new Error("Command has no default parameter value, you must provide one");else i=r;let c={value:i,scrubberTime:(n||new Date).toISOString(),meta:st(st({},s.parameterMeta),o)};await fetch(`${FORMANT_API_URL}/v1/admin/commands`,{method:"POST",body:JSON.stringify({commandTemplateId:s.id,organizationId:this.organizationId,deviceId:this.id,command:s.command,parameter:c,userId:(u=Authentication.currentUser)==null?void 0:u.id}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})}async createCustomDataChannel(t,r){const n=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer(),l=await new Promise(s=>{n.createCustomDataChannel(defined(o).id,t,st({ordered:!0},r),!1,(i,c)=>{const u=new DataChannel(c);s(u)})});return await l.waitTilReady(),l}createCustomRequestDataChannel(t,r=3e3){return new TextRequestDataChannel(this,t,r)}createCustomBinaryRequestDataChannel(t,r=3e3){return new BinaryRequestDataChannel(this,t,r)}async createCaptureStream(t){const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions`,{method:"POST",body:JSON.stringify({deviceId:this.id,streamName:t,tags:{}}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return new CaptureStream(n)}async getTelemetry(t,r,n,o){return await Fleet.getTelemetry(this.id,t,r,n,o)}async getTelemetryStreams(){var i,c;const t=await this.getConfiguration(),r=await fetch(`${FORMANT_API_URL}/v1/queries/metadata/stream-names`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),n=[],o=[];return(c=(i=t.telemetry)==null?void 0:i.streams)==null||c.forEach(u=>{u.disabled!==!0&&n.push(u.name),u.onDemand===!0&&o.push(u.name)}),console.log(o),(await r.json()).items.filter(u=>!n.includes(u)).map(u=>({name:u,onDemand:o.includes(u)}))}async createInterventionRequest(t,r,n,o){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"POST",body:JSON.stringify({message:t,interventionType:r,time:new Date().toISOString(),deviceId:this.id,tags:o,data:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}async addInterventionResponse(t,r,n){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-responses`,{method:"POST",body:JSON.stringify({interventionId:t,interventionType:r,data:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}}class PeerDevice{constructor(t){je(this,"rtcClient");je(this,"remoteDevicePeerId");je(this,"realtimeListeners",[]);je(this,"id");je(this,"handleMessage",(t,r)=>{this.realtimeListeners.forEach(n=>n(t,r))});this.peerUrl=t}async getLatestTelemetry(){const r=await(await fetch(`${this.peerUrl}/telemetry`)).json();return Object.entries(r).map(([o,l])=>({deviceId:this.id,streamName:o,streamType:"json",currentValue:l,currentValueTime:l.timestamp,tags:{}}))}async getDeviceId(){return(await(await fetch(`${this.peerUrl}/configuration`)).json()).agent_config.id}async getConfiguration(){return(await(await fetch(`${this.peerUrl}/configuration`)).json()).agent_config.document}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error("Realtime connection hasn't been started")}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error("Realtime connection hasn't been started")}async startRealtimeConnection(t){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{const r=new dist.exports.RtcClient({lanOnlyMode:!0,receive:this.handleMessage});for(await r.connectLan(this.peerUrl);r.getConnectionStatus(this.peerUrl)!=="connected";)await delay(100);this.rtcClient=r}}addRealtimeListener(t){this.realtimeListeners.push(t)}removeRealtimeListener(t){const r=this.realtimeListeners.indexOf(t);if(r===-1)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(r,1)}async getRealtimeVideoStreams(){var n,o,l;const t=await this.getConfiguration(),r=[];for(const s of(n=t.teleop.hardwareStreams)!=null?n:[])s.rtcStreamType==="h264-video-frame"&&r.push({name:s.name});for(const s of(o=t.teleop.rosStreams)!=null?o:[])s.topicType=="formant/H264VideoFrame"&&r.push({name:s.topicName});for(const s of(l=t.teleop.customStreams)!=null?l:[])s.rtcStreamType==="h264-video-frame"&&r.push({name:s.name});return r}async getRealtimeManipulators(){var n;const t=await this.getConfiguration(),r=[];for(const o of(n=t.teleop.rosStreams)!=null?n:[])o.topicType=="sensor_msgs/JointState"&&r.push(new Manipulator(this,{currentJointStateStream:{name:o.topicName},plannedJointStateStream:o.plannedTopic?{name:o.plannedTopic}:void 0,planValidStream:o.planValidTopic?{name:o.planValidTopic}:void 0,endEffectorStream:o.endEffectorTopic?{name:o.endEffectorTopic}:void 0,endEffectorLinkName:o.endEffectorLinkName,baseReferenceFrame:o.baseReferenceFrame,localFrame:o.localFrame}));return r}async startListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!0,pipeline:"telemetry"})}async disableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){return{id:this.peerUrl,organizationId:"",deviceId:this.id,capabilities:[],capabilitySet:{}}}async stopRealtimeConnection(){if(this.rtcClient)await this.rtcClient.disconnect(this.id);else throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async createCustomDataChannel(t,r){const n=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer(),l=await new Promise(s=>{n.createCustomDataChannel(defined(o).id,t,st({ordered:!0},r),!1,(i,c)=>{const u=new DataChannel(c);s(u)})});return await l.waitTilReady(),l}createCustomRequestDataChannel(t,r=3e3){return new TextRequestDataChannel(this,t,r)}createCustomBinaryRequestDataChannel(t,r=3e3){return new BinaryRequestDataChannel(this,t,r)}}const Me=class{static async setDefaultDevice(t){Me.defaultDeviceId=t}static async getCurrentDevice(){if(!Authentication.token)throw new Error("Not authenticated");if(!Me.defaultDeviceId)throw new Error("No known default device");const o=(await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.find(s=>s.id===Me.defaultDeviceId).name,l=new Device(Me.defaultDeviceId,o,defined(Authentication.currentOrganization));return Me.knownContext.push(new WeakRef(l)),l}static async getPeerDevice(t){const r=new PeerDevice(t);return r.id=await r.getDeviceId(),r}static async getDevice(t){if(!Authentication.token)throw new Error("Not authenticated");const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/devices/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json(),o=n.name,l=new Device(t,o,n.organizationId);return Me.knownContext.push(new WeakRef(l)),l}static async getDevices(){if(!Authentication.token)throw new Error("Not authenticated");const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",body:JSON.stringify({enabled:!0,type:"default"}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return r.items,r.items.map(n=>new Device(n.id,n.name,n.organizationId))}static async getOnlineDevices(){if(!Authentication.token)throw new Error("Not authenticated");const n=(await(await fetch(`${FORMANT_API_URL}/v1/queries/online-devices`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items;return(await Me.getDevices()).filter(l=>n.includes(l.id))}static async getPeers(){if(!Authentication.token)throw new Error("Not authenticated");return await new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getPeers()}static async getRealtimeSessions(){if(!Authentication.token)throw new Error("Not authenticated");return await new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getSessions()}static async getRealtimeDevices(){if(!Authentication.token)throw new Error("Not authenticated");const n=(await(await fetch(`${FORMANT_API_URL}/v1/signaling/peers`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(l=>l.deviceId);return(await Me.getDevices()).filter(l=>n.includes(l.id))}static async getLatestTelemetry(t){let r=t;return t&&!Array.isArray(t)&&(t=[t]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getTelemetry(t,r,n,o,l){let s=t;Array.isArray(t)||(s=[t]);let i=r;return Array.isArray(r)||(i=[r]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify({deviceIds:s,end:o.toISOString(),names:i,start:n.toISOString(),tags:l}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getFileUrl(t){const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileIds:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();if(n.fileUrls.length===0)throw new Error("File not found");return n.fileUrls[0]}static async queryTelemetry(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async aggregateTelemetry(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).aggregates}static async queryEvents(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/events/query`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getEvent(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/events/query/id=${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getInterventions(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}};let Fleet=Me;je(Fleet,"defaultDeviceId"),je(Fleet,"knownContext",[]);class KeyValue{static async set(t,r){try{const n=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"POST",body:JSON.stringify({organizationId:defined(Authentication.currentUser).organizationId,key:t,value:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),o=await n.json();if(n.status!==200)throw new Error(o.message)}catch(n){throw n}}static async get(t){try{const r=await fetch(FORMANT_API_URL+`/v1/admin/key-value/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),n=await r.json();if(r.status!==200)throw new Error(n.message);return n.value}catch(r){throw r}}static async list(){try{const t=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=await t.json();if(t.status!==200)throw new Error(r.message);return r.items}catch(t){throw t}}static async delete(t){try{if(!(await fetch(FORMANT_API_URL+`/v1/admin/key-value/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).ok)throw new Error("Unable to handle request");return}catch(r){throw r}}}const accessLevels=["viewer","operator","administrator"],viewer="viewer",operator="operator",administrator="administrator",aggregateLevels=["year","month","week","day","hour","minute"],annotationTypes=["tag","sheet","user"],eventTypes=["triggered-event","intervention-request","teleop-session-record","port-forwarding-session-record","command-request","command-response","command-delivery","custom","comment","system","annotation"],healthStatuses=["unknown","operational","offline","error"],interventionTypes=["selection","labeling","teleop"],severities=["info","warning","error","critical"],videoMimeTypes=["video/mp4"];let urlParams=new URLSearchParams("");typeof window!="undefined"&&(urlParams=new URLSearchParams(window.location.search));const urlDevice=urlParams.get("device");urlDevice&&Fleet.setDefaultDevice(urlDevice);const urlAuth=urlParams.get("auth");urlAuth&&Authentication.loginWithToken(urlAuth);const moduleName=urlParams.get("module");moduleName&&Authentication.listenForRefresh(),exports.App=App,exports.Authentication=Authentication,exports.BinaryRequestDataChannel=BinaryRequestDataChannel,exports.CaptureStream=CaptureStream,exports.DataChannel=DataChannel,exports.Device=Device,exports.Fleet=Fleet,exports.IRtcSendConfiguration=dist.exports.IRtcSendConfiguration,exports.IRtcStreamMessage=dist.exports.IRtcStreamMessage,exports.IRtcStreamPayload=dist.exports.IRtcStreamPayload,exports.KeyValue=KeyValue,exports.Manipulator=Manipulator,exports.PeerDevice=PeerDevice,exports.SessionType=SessionType,exports.TextRequestDataChannel=TextRequestDataChannel,exports.accessLevels=accessLevels,exports.administrator=administrator,exports.aggregateLevels=aggregateLevels,exports.annotationTypes=annotationTypes,exports.eventTypes=eventTypes,exports.healthStatuses=healthStatuses,exports.interventionTypes=interventionTypes,exports.operator=operator,exports.severities=severities,exports.videoMimeTypes=videoMimeTypes,exports.viewer=viewer,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
44
|
+
`),Error.captureStackTrace(this,n)}}e.exports=o=>{if(o.length>2)throw new n(o);function l(i={}){this.options=i}function s(i){return new l(i)}return l.prototype.transform=o,s.Format=l,s}},function(e,t,r){function n(s,i){if(!(s instanceof i))throw new TypeError("Cannot call a class as a function")}function o(s,i){for(var c=0;c<i.length;c++){var u=i[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}var l=r(85);e.exports=function(){function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(this,s),this.loggers=new Map,this.options=u}var i,c;return i=s,(c=[{key:"add",value:function(u,b){var A=this;if(!this.loggers.has(u)){var _=(b=Object.assign({},b||this.options)).transports||this.options.transports;b.transports=_?_.slice():[];var v=l(b);v.on("close",function(){return A._delete(u)}),this.loggers.set(u,v)}return this.loggers.get(u)}},{key:"get",value:function(u,b){return this.add(u,b)}},{key:"has",value:function(u){return!!this.loggers.has(u)}},{key:"close",value:function(u){var b=this;if(u)return this._removeLogger(u);this.loggers.forEach(function(A,_){return b._removeLogger(_)})}},{key:"_removeLogger",value:function(u){this.loggers.has(u)&&(this.loggers.get(u).close(),this._delete(u))}},{key:"_delete",value:function(u){this.loggers.delete(u)}}])&&o(i.prototype,c),s}()},function(e,t,r){(function(n){const o=r(49),l=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/;e.exports=function(s,i,c){let u,b,A=!1,_=!1;function v(w,P){let N=`"${i}" ${P}`;throw w&&(N=`${N}, but is set to "${w}"`),b&&(N=`${N}. An example of a valid value would be: ${b}`),new o(N)}function f(w){return function(){let P=s[i];if(P===void 0)if(u===void 0&&_)v(void 0,"is a required variable, but it was not set");else{if(u===void 0)return;P=u}_&&P.trim().length===0&&v(void 0,"is a required variable, but its value was empty"),A&&(P.match(l)||v(P,"should be a valid base64 string if using convertFromBase64"),P=n.from(P,"base64").toString());const N=[P].concat(Array.prototype.slice.call(arguments));try{return w.apply(w,N)}catch(T){v(P,T.message)}}}const S={asArray:f(r(211)),asBoolStrict:f(r(212)),asBool:f(r(213)),asPortNumber:f(r(214)),asEnum:f(r(215)),asFloatNegative:f(r(216)),asFloatPositive:f(r(217)),asFloat:f(r(51)),asIntNegative:f(r(218)),asIntPositive:f(r(91)),asInt:f(r(50)),asJsonArray:f(r(219)),asJsonObject:f(r(220)),asJson:f(r(52)),asString:f(r(34)),asUrlObject:f(r(92)),asUrlString:f(r(221)),convertFromBase64:function(){return A=!0,S},default:function(w){if(typeof w=="number")u=w.toString();else if(Array.isArray(w)||typeof w=="object"&&w!==null)u=JSON.stringify(w);else{if(typeof w!="string")throw new o("values passed to default() must be of Number, String, Array, or Object type");u=w}return S},required:function(w){return _=w===void 0||w,S},example:function(w){return b=w,S}};return Object.entries(c).forEach(([w,P])=>{S[w]=f(P)}),S}}).call(this,r(4).Buffer)},function(e,t,r){const n=r(34);e.exports=function(o,l){return l=l||",",o.length?n(o).split(l).filter(Boolean):[]}},function(e,t,r){e.exports=function(n){const o=n.toLowerCase();if(o!=="false"&&o!=="true")throw new Error('should be either "true", "false", "TRUE", or "FALSE"');return o!=="false"}},function(e,t,r){e.exports=function(n){const o=n.toLowerCase();if(["false","0","true","1"].indexOf(o)===-1)throw new Error('should be either "true", "false", "TRUE", "FALSE", 1, or 0');return!(o==="0"||o==="false")}},function(e,t,r){const n=r(91);e.exports=function(o){var l=n(o);if(l>65535)throw new Error("cannot assign a port number greater than 65535");return l}},function(e,t,r){const n=r(34);e.exports=function(o,l){const s=n(o);if(l.indexOf(s)<0)throw new Error(`should be one of [${l.join(", ")}]`);return s}},function(e,t,r){const n=r(51);e.exports=function(o){const l=n(o);if(l>0)throw new Error("should be a negative float");return l}},function(e,t,r){const n=r(51);e.exports=function(o){const l=n(o);if(l<0)throw new Error("should be a positive float");return l}},function(e,t,r){const n=r(50);e.exports=function(o){const l=n(o);if(l>0)throw new Error("should be a negative integer");return l}},function(e,t,r){const n=r(52);e.exports=function(o){var l=n(o);if(!Array.isArray(l))throw new Error("should be a parseable JSON Array");return l}},function(e,t,r){const n=r(52);e.exports=function(o){var l=n(o);if(Array.isArray(l))throw new Error("should be a parseable JSON Object");return l}},function(e,t,r){const n=r(92);e.exports=function(o){return n(o).toString()}},function(e,t,r){(function(n){(function(){var o,l,s,i,c,u;typeof performance!="undefined"&&performance!==null&&performance.now?e.exports=function(){return performance.now()}:n!=null&&n.hrtime?(e.exports=function(){return(o()-c)/1e6},l=n.hrtime,i=(o=function(){var b;return 1e9*(b=l())[0]+b[1]})(),u=1e9*n.uptime(),c=i-u):Date.now?(e.exports=function(){return Date.now()-s},s=Date.now()):(e.exports=function(){return new Date().getTime()-s},s=new Date().getTime())}).call(this)}).call(this,r(2))},function(e,t,r){var n,o,l=r(96),s=r(97),i=0,c=0;e.exports=function(u,b,A){var _=b&&A||0,v=b||[],f=(u=u||{}).node||n,S=u.clockseq!==void 0?u.clockseq:o;if(f==null||S==null){var w=l();f==null&&(f=n=[1|w[0],w[1],w[2],w[3],w[4],w[5]]),S==null&&(S=o=16383&(w[6]<<8|w[7]))}var P=u.msecs!==void 0?u.msecs:new Date().getTime(),N=u.nsecs!==void 0?u.nsecs:c+1,T=P-i+(N-c)/1e4;if(T<0&&u.clockseq===void 0&&(S=S+1&16383),(T<0||P>i)&&u.nsecs===void 0&&(N=0),N>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=P,c=N,o=S;var R=(1e4*(268435455&(P+=122192928e5))+N)%4294967296;v[_++]=R>>>24&255,v[_++]=R>>>16&255,v[_++]=R>>>8&255,v[_++]=255&R;var d=P/4294967296*1e4&268435455;v[_++]=d>>>8&255,v[_++]=255&d,v[_++]=d>>>24&15|16,v[_++]=d>>>16&255,v[_++]=S>>>8|128,v[_++]=255&S;for(var I=0;I<6;++I)v[_+I]=f[I];return b||s(v)}},function(e,t,r){var n=r(96),o=r(97);e.exports=function(l,s,i){var c=s&&i||0;typeof l=="string"&&(s=l==="binary"?new Array(16):null,l=null);var u=(l=l||{}).random||(l.rng||n)();if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,s)for(var b=0;b<16;++b)s[c+b]=u[b];return s||o(u)}},function(e,t,r){(function(n){(function(o){function l(i){if((i=i===void 0?"utf-8":i)!=="utf-8")throw new RangeError("Failed to construct 'TextEncoder': The encoding label provided ('"+i+"') is invalid.")}function s(i,c){if(c=c===void 0?{fatal:!1}:c,(i=i===void 0?"utf-8":i)!=="utf-8")throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+i+"') is invalid.");if(c.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}if(o.TextEncoder&&o.TextDecoder)return!1;Object.defineProperty(l.prototype,"encoding",{value:"utf-8"}),l.prototype.encode=function(i,c){if((c=c===void 0?{stream:!1}:c).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");c=0;for(var u=i.length,b=0,A=Math.max(32,u+(u>>1)+7),_=new Uint8Array(A>>3<<3);c<u;){var v=i.charCodeAt(c++);if(55296<=v&&56319>=v){if(c<u){var f=i.charCodeAt(c);(64512&f)==56320&&(++c,v=((1023&v)<<10)+(1023&f)+65536)}if(55296<=v&&56319>=v)continue}if(b+4>_.length&&(A+=8,A=(A*=1+c/i.length*2)>>3<<3,(f=new Uint8Array(A)).set(_),_=f),(4294967168&v)==0)_[b++]=v;else{if((4294965248&v)==0)_[b++]=v>>6&31|192;else if((4294901760&v)==0)_[b++]=v>>12&15|224,_[b++]=v>>6&63|128;else{if((4292870144&v)!=0)continue;_[b++]=v>>18&7|240,_[b++]=v>>12&63|128,_[b++]=v>>6&63|128}_[b++]=63&v|128}}return _.slice(0,b)},Object.defineProperty(s.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(s.prototype,"fatal",{value:!1}),Object.defineProperty(s.prototype,"ignoreBOM",{value:!1}),s.prototype.decode=function(i,c){if((c=c===void 0?{stream:!1}:c).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");c=0;for(var u=(i=new Uint8Array(i)).length,b=[];c<u;){var A=i[c++];if(A===0)break;if((128&A)==0)b.push(A);else if((224&A)==192){var _=63&i[c++];b.push((31&A)<<6|_)}else if((240&A)==224){_=63&i[c++];var v=63&i[c++];b.push((31&A)<<12|_<<6|v)}else(248&A)==240&&(65535<(A=(7&A)<<18|(_=63&i[c++])<<12|(v=63&i[c++])<<6|63&i[c++])&&(A-=65536,b.push(A>>>10&1023|55296),A=56320|1023&A),b.push(A))}return String.fromCharCode.apply(null,b)},o.TextEncoder=l,o.TextDecoder=s})(typeof window!="undefined"?window:n!==void 0?n:this)}).call(this,r(5))},function(e,t,r){r.r(t),r.d(t,"AuthClient",function(){return l}),r.d(t,"RtcSignalingClient",function(){return i}),r.d(t,"Credentials",function(){return P}),r.d(t,"SignalingPromiseClient",function(){return N.SignalingPromiseClient}),r.d(t,"IRtcClientConfiguration",function(){}),r.d(t,"IRtcConnectConfiguration",function(){}),r.d(t,"IRtcConnectionStatsInfo",function(){}),r.d(t,"IRtcSendConfiguration",function(){}),r.d(t,"IRtcSessionMetricsMessageCounts",function(){}),r.d(t,"IRtcStreamMessage",function(){}),r.d(t,"IStreamControl",function(){}),r.d(t,"RtcClient",function(){return Ee}),r.d(t,"createRtcStreamMessage",function(){return X}),r.d(t,"IRtcStream",function(){}),r.d(t,"IRtcStreamPayload",function(){});var n=r(25),o=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class l extends n.a{adminSignup(q,$){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/admin-signup",{token:$,method:"POST",body:JSON.stringify(q)})})}login(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/login",{method:"POST",body:JSON.stringify(q),allowUnsafeRetries:!0})})}loginWithGoogleToken(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/login-google",{method:"POST",body:JSON.stringify(q),allowUnsafeRetries:!0})})}refresh(q,$){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/refresh",{method:"POST",body:JSON.stringify({refreshToken:q,tokenExpirationSeconds:$}),allowUnsafeRetries:!0})})}respondToNewPasswordRequiredChallenge(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/respond-to-new-password-required-challenge",{method:"POST",body:JSON.stringify(q)})})}forgotPassword(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/forgot-password",{method:"POST",body:JSON.stringify({email:q})})})}confirmForgotPassword(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/confirm-forgot-password",{method:"POST",body:JSON.stringify(q)})})}resendInvitation(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/resend-invitation",{method:"POST",body:JSON.stringify({email:q})})})}changePassword({token:q,refreshToken:$,currentPassword:te,newPassword:ue}){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/change-password",{token:q,method:"POST",body:JSON.stringify({refreshToken:$,currentPassword:te,newPassword:ue})})})}getDeviceCredentials(q){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/device-credentials",{token:q,method:"POST",allowUnsafeRetries:!0})})}impersonate(q,$){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/impersonate",{token:q,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({userId:$})})})}createServiceAccount(q,$,te,ue){return o(this,void 0,void 0,function*(){return yield this.fetch("auth/service-account",{token:q,method:"POST",allowUnsafeRetries:!0,body:JSON.stringify({name:$,roleId:te,tags:ue})})})}getFeatures(q){return o(this,void 0,void 0,function*(){return(yield this.fetch("auth/features",{token:q})).features})}}var s=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class i extends n.a{createPeer(q,$){return s(this,void 0,void 0,function*(){return yield this.fetch("peers",{token:q,method:"POST",body:JSON.stringify($)})})}getPeers(q){return s(this,void 0,void 0,function*(){return(yield this.fetch("peers",{token:q})).items})}refreshPeer(q,$){return s(this,void 0,void 0,function*(){yield this.fetch(`peers/${$}/refresh`,{token:q,method:"POST",allowUnsafeRetries:!0})})}createSession(q,$){return s(this,void 0,void 0,function*(){return yield this.fetch("sessions",{token:q,method:"POST",body:JSON.stringify($)})})}refreshSession(q,$){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${$}/refresh`,{token:q,method:"POST",allowUnsafeRetries:!0})})}deleteSession(q,$){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${$}`,{token:q,method:"DELETE",allowUnsafeRetries:!0})})}getSessions(q){return s(this,void 0,void 0,function*(){return(yield this.fetch("sessions",{token:q})).items})}getIceServers(q){return s(this,void 0,void 0,function*(){return(yield this.fetch("ice-servers",{token:q})).items})}addSignals(q,$,te){return s(this,void 0,void 0,function*(){yield this.fetch(`sessions/${$}/add-signals`,{token:q,method:"POST",body:JSON.stringify(te)})})}takeSignals(q,$){return s(this,void 0,void 0,function*(){return(yield this.fetch(`sessions/${$}/take-signals`,{token:q,method:"POST"})).items})}}var c=r(1),u=r(11),b=r(35),A=r.n(b),_=r(102),v=r.n(_),f=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class S extends class{constructor(q){this.cache=new v.a(Object.assign(Object.assign({},q.dispose||q.disposeAfter?{ttlAutopurge:!0}:{}),q)),this.stringify=q.fastStringify?JSON.stringify:A.a}set(q,$,te){const ue=this.stringify(q);if(!this.cache.set(ue,$,{ttl:te})){const ae=this.cache.sizeCalculation?this.cache.sizeCalculation($,ue):"unknown";throw Error(`Value too large (${ae} > ${this.cache.max})`)}}get(q){return this.cache.get(this.stringify(q))}delete(q){this.cache.delete(this.stringify(q))}size(){return this.cache.size}clear(){this.cache.clear()}forEach(q){return this.cache.forEach(q)}}{constructor(q){if(super(q),this.expireRejectedPromiseValues=q.expireRejectedPromiseValues===void 0||q.expireRejectedPromiseValues,this.rejectedPromiseValueTtl=q.rejectedPromiseValueTtl!==void 0?q.rejectedPromiseValueTtl:c.a.second,this.rejectedPromiseValueTtl<0)throw new Error("rejectedPromiseValueTtl must not be negative")}set(q,$,te){const ue=this.stringify(q);this.cache.set(ue,$,{ttl:te}),this.expireRejectedPromiseValues&&Promise.resolve($).catch(()=>f(this,void 0,void 0,function*(){yield Object(u.a)(this.rejectedPromiseValueTtl),this.cache.peek(ue)===$&&this.cache.delete(ue)}))}}var w=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class P{constructor(q,$,te){this.authClient=q,this.email=$,this.password=te,this.tokenTtlMs=1*c.a.hour,this.tokenCache=new S({max:100,ttl:this.tokenTtlMs-5*c.a.minute,fastStringify:!0})}getToken(){return w(this,void 0,void 0,function*(){let q=this.tokenCache.get(this.email);return q||(q=(()=>w(this,void 0,void 0,function*(){const{authentication:$}=yield this.authClient.login({email:this.email,password:this.password,tokenExpirationSeconds:this.tokenTtlMs/c.a.second});if(!$)throw new Error("User account not verified.");return $.accessToken}))(),this.tokenCache.set(this.email,q)),q})}}var N=r(93),T=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};function R(ye){return T(this,void 0,void 0,function*(){return(yield Promise.all(ye.map(q=>q.catch($=>$)))).filter(q=>q instanceof Error)})}function d(ye){if(ye!==void 0)return ye;throw new Error("Value is undefined")}var I=r(0),Q=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};function Z({func:ye,delay:q,immediate:$}){let te=!1,ue=setTimeout(function de(){return Q(this,void 0,void 0,function*(){if(te)return;const me=new Date().getTime();try{ae=ye(),yield ae}finally{if(!te){const pe=new Date().getTime();ue=setTimeout(de,Math.max(q-(pe-me),0))}}})},$?0:q),ae=Promise.resolve();return{stop(){return Q(this,void 0,void 0,function*(){te=!0,clearTimeout(ue),yield ae})}}}function h(ye,q){return Object.keys(ye).reduce(($,te)=>Object.assign(Object.assign({},$),{[te]:q(ye[te])}),{})}var p=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class j{constructor(q){this.message=q}send(q){return p(this,void 0,void 0,function*(){I.a.info(this.message,h(q,$=>{const{sum:te,count:ue}=$,ae=te/ue;return Object.assign(Object.assign({},$),{average:ae})}))})}}var m=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};const x=r(222);var F=r(6);const D=!!F.c,O=new class{constructor(ye=60){this.buffer={},this.metrics={},this.reporters=[],this.flushInterval=Z({func:()=>this.flushStats(),delay:ye*c.a.second})}shutdown(){return m(this,void 0,void 0,function*(){yield this.flushInterval.stop(),yield this.flushStats(),yield Object(u.a)(2*c.a.second)})}aggregate(ye,q){if(this.buffer[ye]){const{min:$,max:te,sum:ue,count:ae}=this.buffer[ye];this.buffer[ye]={min:Math.min($,q),max:Math.max(te,q),sum:ue+q,count:ae+1}}else this.buffer[ye]={min:q,max:q,sum:q,count:1}}increment(ye){this.aggregate(ye,1)}timer(ye,q){return m(this,void 0,void 0,function*(){const $=x(),te=yield q(),ue=x();return this.aggregate(ye,ue-$),te})}metric(ye,q){this.metrics[ye]=q}registerStatsReporter(ye){this.reporters.push(ye)}write(ye){return m(this,void 0,void 0,function*(){if(Object.values(ye).length===0)return;const q=yield R(this.reporters.map($=>$.send(ye)));for(const $ of q)I.a.warn("Failed to write stats",{error:$})})}flushStats(){return m(this,void 0,void 0,function*(){const ye=Object.assign(Object.assign({},this.buffer),h(this.metrics,q=>{const $=q();return{min:$,max:$,sum:$,count:1}}));Object.keys(ye).length>0&&(yield this.write(ye),this.buffer={})})}};D||["local","on-prem"].includes(F.i)||O.registerStatsReporter(new j("stats"));var L=r(8),k=r(21),E=r(103),g=r(36),U=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class B extends g.a{constructor(q){super(q)}postLanRtcOffer(q){return U(this,void 0,void 0,function*(){return yield this.fetch("v1/lan-rtc-offer",{method:"POST",body:JSON.stringify(q)})})}}var G=r(55);const Y={ordered:!1,maxPacketLifeTime:300*c.a.millisecond},K={ordered:!0},H={ordered:!0},V={ordered:!1,maxRetransmits:0},y={ordered:!1,maxRetransmits:0};function C({entityId:ye,streamName:q,streamType:$}){return`${ye}.${q}.${$}`}var W=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class ee{constructor(q,$){this.sessionId=q,this.connection=$,this.counts={localSent:new Map,localReceived:new Map,remoteSent:new Map,remoteReceived:new Map},this.sessionId=q,this.connection=$}updateRemoteMessagesCounts(q){if(q.payload.streamsInfo){this.counts.remoteSent=new Map,this.counts.remoteReceived=new Map;for(const $ of q.payload.streamsInfo.items)this.counts.remoteSent.set($.streamId,$.sentCount),this.counts.remoteReceived.set($.streamId,$.receivedCount)}}getLocalStreamsInfo(q){const{localSent:$,localReceived:te}=this.counts;return{items:[...new Set([...$.keys(),...te.keys()])].map(ue=>{var ae,de;return{streamId:ue,sentCount:(ae=$.get(ue))!==null&&ae!==void 0?ae:0,receivedCount:(de=te.get(ue))!==null&&de!==void 0?de:0}}),timestamp:q}}incrementLocalSent(q){const{localSent:$}=this.counts,te=C(q.header.stream);$.set(te,($.get(te)||0)+1)}incrementLocalReceived(q){const{localReceived:$}=this.counts,te=C(q.header.stream),ue=$.get(te)||0;if(ue===0){const{streamName:ae,streamType:de}=q.header.stream;I.a.debug("RTC client received first message for stream",{streamName:ae,streamType:de})}$.set(te,ue+1)}uploadMetrics(){return W(this,void 0,void 0,function*(){const{sessionId:q}=this,$=yield this.connection.peerConnection.getStats(),te={};$.forEach(ge=>te[ge.id]=ge),I.a.debug("rtc-stats",Object.assign(Object.assign({},te),{sessionId:q}));const{localSent:ue,localReceived:ae,remoteSent:de,remoteReceived:me}=this.counts,pe=[...new Set([...ue.keys(),...ae.keys()])].reduce((ge,ce)=>{const Te=ue.get(ce),Ae=ae.get(ce),Pe=de.get(ce),Le=me.get(ce);return Object.assign(Object.assign({},ge),{[`local-${ce}-sent`]:Te,[`local-${ce}-received`]:Ae,[`remote-${ce}-sent`]:Pe,[`remote-${ce}-received`]:Le})},{sessionId:q});I.a.debug("rtc-message-report",Object.assign({deviceId:this.connection.getRemoteDeviceId()},pe))})}}function X(ye,q){return{header:{stream:ye,created:Date.now(),frameId:""},payload:q}}function ne(ye){return new Set(["disconnected","failed","closed"]).has(ye.iceConnectionState)}var ie=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class he{constructor(q,$,te){this.peerConnection=q,this.config=$,this.dataChannelNotifier=te,this.connectTimeoutMs=20*c.a.second,this.iceGatheringTimeoutMs=15*c.a.second,this.pingUpdateTimeoutMs=1*c.a.second,this.streamsInfoUpdateTimeoutMs=2*c.a.second,this.reassemblyTimeoutMs=500*c.a.millisecond,this.reassemblyTableCleanupMs=1*c.a.second,this.heartbeatTimeoutMs=20*c.a.millisecond,this.streamLatestTimestamp=new Map,this.reassemblyTable=new Map,this.reassemblyTableLastTimestamp=new Map,this.closeCalled=!1,this.gotOffer=!1,this.hasIceCandidate=!1;const{isOffer:ue}=$.baseConfig;ue?this.initializeChannels(q):q.ondatachannel=ae=>{switch(ae.channel.label){case"stream.latest-ttl":this.latestTtlStreamChannel=ae.channel;break;case"stream.reliable":this.reliableStreamChannel=ae.channel;break;case"stream.latest-reliable":this.latestReliableStreamChannel=ae.channel;break;case"stream.latest-try-once":this.latestTryOnceStreamChannel=ae.channel;break;case"heartbeat":return void(this.heartbeatChannel=ae.channel);default:return void this.dataChannelNotifier(ae.channel)}this.setupChannel(ae.channel)},this.pingUpdateTimeout=setInterval(()=>{const{reliableStreamChannel:ae}=this;ae&&this.sendSystemMessage(ae,{type:"ping"})},this.pingUpdateTimeoutMs),this.streamsInfoUpdateTimeout=setInterval(()=>{const{latestTtlStreamChannel:ae}=this;ae&&this.sendSystemMessage(ae,{type:"streams-info"})},this.streamsInfoUpdateTimeoutMs),this.reassemblyTableCleanupTimeout=setInterval(()=>{const ae=new Date().getTime();this.reassemblyTableLastTimestamp.forEach((de,me,pe)=>{ae>me+this.reassemblyTimeoutMs&&this.reassemblyTable.delete(de)})},this.reassemblyTableCleanupMs),this.heartbeatTimeout=setInterval(()=>{const{heartbeatChannel:ae}=this;ae&&ae.readyState==="open"&&ae.send(new Uint8Array([1]))},this.heartbeatTimeoutMs)}handleSignal(q){return ie(this,void 0,void 0,function*(){const{peerConnection:$}=this,{track:te}=this.config.baseConfig,ue=(()=>{try{return JSON.parse(q.getPayload())}catch{return}})();if(!ue)return void I.a.error("Received unparseable signal.");I.a.debug("Handling signal",{description:ue});const{sdp:ae,type:de}=ue;if(!ae||!de)return void I.a.warn("Received non-SDP signal");const{signalingState:me,connectionState:pe}=$;if(me!=="stable"||pe!=="connected")if($.remoteDescription)I.a.warn(`Received SDP after remote description was set: ${ae}`);else{if(de==="offer"){if(me!=="stable")return void I.a.warn("Received offer SDP when signaling is ongoing.");yield $.setRemoteDescription(ue);const ge=yield $.createAnswer();yield $.setLocalDescription(ge);const ce=q.clone();return te==null||te("Answer Received",ce),ce.setPayload(JSON.stringify(ge)),ce.setReceiverId(q.getSenderId()),ce.setSenderId(q.getReceiverId()),ce}if(de==="answer"){if(me==="stable")return void I.a.warn("Received answer SDP when signaling hasn't started.");yield $.setRemoteDescription(ue)}}else I.a.warn(`Received SDP when already connected: ${ae}`)})}send(q,$){const te=this.getChannelFromLabel($.channelLabel);te?this.sendOnChannel(te,q):I.a.warn("Send called with unexpected channel label",{channelLabel:$.channelLabel})}controlRemoteStream(q){this.sendSystemMessage(d(this.reliableStreamChannel),{type:"stream-control",streamControl:q})}isActive(){return new Set(["new","checking","connected","completed"]).has(this.peerConnection.iceConnectionState)||this.isReady()}isReady(){const{reliableStreamChannel:q,latestTtlStreamChannel:$,latestTryOnceStreamChannel:te,latestReliableStreamChannel:ue}=this;return(q==null?void 0:q.readyState)==="open"&&($==null?void 0:$.readyState)==="open"&&(te==null?void 0:te.readyState)==="open"&&(ue==null?void 0:ue.readyState)==="open"}close(){return ie(this,void 0,void 0,function*(){if(this.closeCalled)return;this.closeCalled=!0,this.sessionMetrics&&(yield this.sessionMetrics.uploadMetrics()),this.pingUpdateTimeout&&clearInterval(this.pingUpdateTimeout),this.reassemblyTableCleanupTimeout&&clearInterval(this.reassemblyTableCleanupTimeout),this.streamsInfoUpdateTimeout&&clearInterval(this.streamsInfoUpdateTimeout),this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout);const{peerConnection:q,reliableStreamChannel:$,latestTtlStreamChannel:te,latestTryOnceStreamChannel:ue,latestReliableStreamChannel:ae}=this;q.close(),$==null||$.close(),te==null||te.close(),ue==null||ue.close(),ae==null||ae.close()})}getPing(){return this.pingTimeMs}getLastMessageTimestamp(){return this.lastMessageTimestamp}getSessionCreatedTimestamp(){var q;return(q=this.config.remoteConfig)===null||q===void 0?void 0:q.sessionCreatedTimestamp}setSessionCreatedTimestamp(q){this.config.remoteConfig&&(this.config.remoteConfig.sessionCreatedTimestamp=q)}getSessionId(){var q;return(q=this.config.remoteConfig)===null||q===void 0?void 0:q.sessionId}setSessionId(q){this.config.remoteConfig&&(this.config.remoteConfig.sessionId=q,this.sessionMetrics=new ee(q,this))}getRemotePeerId(){return this.config.baseConfig.remotePeerId}getRemoteDeviceId(){var q;return(q=this.config.baseConfig)===null||q===void 0?void 0:q.remoteDeviceId}setRemoteDeviceId(q){this.config.baseConfig.remoteDeviceId=q}getSessionMetricsMessageCounts(){var q;return(q=this.sessionMetrics)===null||q===void 0?void 0:q.counts}getConnectionStatsInfo(){return ie(this,void 0,void 0,function*(){const{peerConnection:q}=this;if(!q)return;const $=yield q.getStats(null),te=[];$.forEach(pe=>{te.push(pe)});const ue=te.find(pe=>pe.type==="transport");if(!ue)return;const ae=te.find(pe=>(pe.type==="candidate-pair"||pe.type==="candidatepair")&&pe.id===ue.selectedCandidatePairId);if(!ae)return;const de=te.find(pe=>pe.id===ae.localCandidateId),me=te.find(pe=>pe.id===ae.remoteCandidateId);return de&&me&&(de.address=de.address||de.ip,me.address=me.address||me.ip,de.address!==void 0&&me.address!==void 0)?{transport:ue,localCandidate:de,remoteCandidate:me}:void 0})}initializeChannels(q){this.heartbeatChannel=q.createDataChannel("heartbeat",y),this.heartbeatChannel.binaryType="arraybuffer",this.latestTtlStreamChannel=q.createDataChannel("stream.latest-ttl",Y),this.latestTtlStreamChannel.binaryType="arraybuffer",this.reliableStreamChannel=q.createDataChannel("stream.reliable",K),this.reliableStreamChannel.binaryType="arraybuffer",this.latestReliableStreamChannel=q.createDataChannel("stream.latest-reliable",H),this.latestReliableStreamChannel.binaryType="arraybuffer",this.latestTryOnceStreamChannel=q.createDataChannel("stream.latest-try-once",V),this.latestTryOnceStreamChannel.binaryType="arraybuffer",this.setupChannel(this.latestTtlStreamChannel),this.setupChannel(this.reliableStreamChannel),this.setupChannel(this.latestReliableStreamChannel),this.setupChannel(this.latestTryOnceStreamChannel)}getOffer(){var q,$,te;return ie(this,void 0,void 0,function*(){const{gotOffer:ue}=this,{peerConnection:ae,config:de}=this;if(this.config.baseConfig.isLan)throw new Error('"getOffer" method can only be called with internet connections. LAN connections should call the "getLanOffer" method.');const me=(q=this.config.remoteConfig)===null||q===void 0?void 0:q.sessionId;if(ue)return void I.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,ne(this.peerConnection))return void I.a.debug("Failed to generate offer because the peer connection was inactive.");const pe=de.baseConfig.track;ae.onicecandidate=()=>{this.hasIceCandidate=!0},ae.oniceconnectionstatechange=()=>ie(this,void 0,void 0,function*(){const Pe=ae.iceConnectionState;if(Pe==="connected"||Pe==="completed"){const Le=yield this.getConnectionStatsInfo(),Fe=Le?function(ze){const De=ze.localCandidate.candidateType,We=ze.remoteCandidate.candidateType;return De==="host"&&We==="host"?"local":De==="relay"||We==="relay"?"TURN":"STUN"}(Le):void 0;I.a.info(`ICE connection state changed to ${Pe}`,{sessionId:me,connectionStatsInfo:Le,iceMode:Fe}),pe==null||pe("ICE connection state change",{iceConnectionState:Pe,sessionId:me,connectionStatsInfo:Le,iceMode:Fe})}}),yield ae.setLocalDescription(yield ae.createOffer());const ge=new Date().getTime();for(;;){const Pe=new Date().getTime()-ge;if(Pe>this.connectTimeoutMs)return void I.a.debug("Failed to generate offer because ICE gathering timed out.");if(Pe>this.iceGatheringTimeoutMs&&this.hasIceCandidate){I.a.debug("ICE gathering partially completed; proceeding",{iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Pe}),pe==null||pe("ICE gathering partially completed",{sessionId:me,iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Pe});break}if(ae.iceGatheringState==="complete"){I.a.debug("ICE gathering complete",{iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Pe}),pe==null||pe("ICE gathering completed",{sessionId:me,iceTransportPolicy:ae.getConfiguration().iceTransportPolicy,waitTime:Pe});break}yield Object(u.a)(.1*c.a.second)}const ce=($=this.peerConnection.getConfiguration().iceServers)!==null&&$!==void 0?$:[];for(const Pe of ce)Pe.credentialType=void 0;const Te=JSON.stringify(ce),Ae=new L.Signal;return Ae.setPayload(JSON.stringify(ae.localDescription)),Ae.setSenderId(this.config.baseConfig.localPeerId),Ae.setReceiverId(this.config.baseConfig.remotePeerId),Ae.setIceServers(Te),Ae.setIceTransportPolicy((te=this.peerConnection.getConfiguration().iceTransportPolicy)!==null&&te!==void 0?te:"all"),this.config.baseConfig.sessionType!==void 0?Ae.setSessionType(this.config.baseConfig.sessionType):Ae.setSessionType(L.SessionType.TELEOP),I.a.debug("Sending offer signal with description",{description:Ae.getPayload()}),Ae})}getLanOffer(){return ie(this,void 0,void 0,function*(){const{peerConnection:q,gotOffer:$}=this;if(!this.config.baseConfig.isLan)throw new Error('"getLanOffer" method can only be used with LAN connections. Internet connections should call the "getOffer" method.');if($)return void I.a.debug("Failed to generate offer because gotOffer was already called.");if(this.gotOffer=!0,ne(this.peerConnection))return void I.a.debug("Failed to generate offer because the peer connection was inactive.");yield q.setLocalDescription(yield q.createOffer());const te=new Date().getTime();for(;;){if(new Date().getTime()-te>this.iceGatheringTimeoutMs)return void I.a.debug("Failed to generate offer because ICE gathering timed out.");if(q.iceGatheringState==="complete")break;yield Object(u.a)(.1*c.a.second)}const ue=q.localDescription;if(ue)return I.a.debug("Sending LAN offer signal with description",{description:ue}),ue;I.a.error("Failed to generate LAN offer description")})}handleLanAnswer(q){return ie(this,void 0,void 0,function*(){const{peerConnection:$}=this;if(!this.config.baseConfig.isLan)throw new Error('"handleLanAnswer" method can only be used with LAN connections. Internet connections should call the "handleSignal" method.');yield $.setRemoteDescription(q)})}getChannelFromLabel(q){switch(q){case"stream.latest-ttl":return this.latestTtlStreamChannel;case"stream.reliable":return this.reliableStreamChannel;case"stream.latest-reliable":return this.latestReliableStreamChannel;case"stream.latest-try-once":return this.latestTryOnceStreamChannel}}sendOnChannel(q,$){let te;try{te=Object(G.encode)(JSON.stringify($))}catch(ue){return void I.a.warn("Failed to encode RTC message",{error:ue})}try{q.send(te),this.sessionMetrics&&this.sessionMetrics.incrementLocalSent($)}catch(ue){I.a.warn("Failed to send message to channel",{error:ue,channel:q.label})}}channelNotRecognized(q){return q!==this.latestTtlStreamChannel&&q!==this.latestReliableStreamChannel&&q!==this.latestTryOnceStreamChannel&&q!==this.reliableStreamChannel}setupChannel(q){q.onmessage=$=>{if(this.channelNotRecognized(q))return void I.a.warn("Received message on unrecognized data channel.");let te;try{te=JSON.parse(Object(G.decode)($.data))}catch(ue){return void I.a.warn("Received unparseable message on RTC stream data channel",{error:ue,channel:q.label})}te.communicationType==="message-chunk"?this.receiveChannelMessageChunk(q,te):this.receiveChannelMessage(q,te)},q.onerror=$=>{I.a.warn(`Channel error: ${$.error}`,{error:$.error,sessionId:this.getSessionId(),channelLabel:q.label})},q.onopen=()=>{I.a.debug("Channel opened",{sessionId:this.getSessionId(),channelLabel:q.label})},q.onclose=()=>{const $={bufferedAmount:q.bufferedAmount,sessionId:this.getSessionId(),channelLabel:q.label};this.closeCalled===!1?I.a.debug("Unexpected channel closed",$):I.a.debug("Channel closed",$)}}receiveChannelMessage(q,$){const{config:te}=this,{remotePeerId:ue}=this.config.baseConfig;this.lastMessageTimestamp=new Date().getTime(),$=function(ae){switch(ae.header.stream.streamType){case"twist":{const{twist:de}=ae.payload;if(!de)throw Error("twist not in payload of RTC message with type twist");return{header:ae.header,payload:{twist:{linear:Object.assign({x:0,y:0,z:0},de.linear),angular:Object.assign({x:0,y:0,z:0},de.angular)}}}}case"pose":{const{pose:de}=ae.payload;if(!de)throw Error("pose not in payload of RTC message with type pose");return{header:ae.header,payload:{pose:{translation:Object.assign({x:0,y:0,z:0},de.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},de.rotation)}}}}case"pose-with-covariance":{const{poseWithCovariance:de}=ae.payload;if(!de)throw Error("poseWithCovariance not in payload of RTC message with type pose-with-covariance");const me=new Array(36).fill(0);return de.covariance.forEach((pe,ge)=>{if(ge>=36)throw Error("covariance contains more than 36 elements");me[ge]=pe}),{header:ae.header,payload:{poseWithCovariance:{pose:{translation:Object.assign({x:0,y:0,z:0},de.pose.translation),rotation:Object.assign({x:0,y:0,z:0,w:0},de.pose.rotation)},covariance:me}}}}case"point":{const{point:de}=ae.payload;if(!de)throw Error("point not in payload of RTC message with type point");return{header:ae.header,payload:{point:Object.assign({x:0,y:0,z:0},de)}}}default:return ae}}($),this.sessionMetrics&&this.sessionMetrics.incrementLocalReceived($),this.handleSystemMessage(q,$)||(q===this.latestTryOnceStreamChannel||q===this.latestTtlStreamChannel||q===this.latestReliableStreamChannel)&&!this.isLatestMessage($)||te.baseConfig.receive(ue,$)}receiveChannelMessageChunk(q,$){const te=this.reassemblyTable.get($.id)||[];if(te.push($),te.length===$.total){const ue=function(ae){const de=ae.sort((me,pe)=>me.seq<pe.seq?-1:1).map(me=>me.part).reduce((me,pe)=>me+pe);try{return JSON.parse(de)}catch{return void I.a.warn("Could not reassemble RTC message chunks")}}(te);return ue&&this.receiveChannelMessage(q,ue),void this.reassemblyTable.delete($.id)}this.reassemblyTable.set($.id,te),this.reassemblyTableLastTimestamp.set($.id,new Date().getTime())}handleSystemMessage(q,$){var te,ue;const{config:ae}=this,{baseConfig:de}=ae,{remotePeerId:me}=de;switch($.header.stream.streamType){case"ping":return this.sendSystemMessage(q,{type:"pong",timestamp:d($.payload.ping)}),!0;case"pong":{const pe=new Date().getTime()-d($.payload.pong);return this.pingTimeMs=pe,O.aggregate("rtc-ping-time",pe),!0}case"streams-info":{const{sessionMetrics:pe}=this,ge=(te=$.payload.streamsInfo)===null||te===void 0?void 0:te.timestamp;return!!ge&&(pe==null||pe.updateRemoteMessagesCounts($),(ue=de.onStreamsInfoUpdate)===null||ue===void 0||ue.call(de,me,ge),!0)}case"stream-control":return!0;default:return!1}}sendSystemMessage(q,$){var te;const{localUserId:ue,localPeerId:ae}=this.config.baseConfig;if(q.readyState!=="open")return;const de={entityId:ue!=null?ue:ae,streamName:`$.${$.type}`,streamType:$.type};let me;switch($.type){case"ping":me={ping:new Date().getTime()};break;case"pong":me={pong:$.timestamp};break;case"stream-control":me={streamControl:$.streamControl};break;case"streams-info":me={streamsInfo:(te=this.sessionMetrics)===null||te===void 0?void 0:te.getLocalStreamsInfo(new Date().getTime())}}this.sendOnChannel(q,X(de,me))}isLatestMessage(q){const $=C(q.header.stream),te=(this.streamLatestTimestamp.get($)||0)<=q.header.created;return te&&this.streamLatestTimestamp.set($,q.header.created),te}}function Se(ye){var q,$;return{userId:(q=ye.getUserId())===null||q===void 0?void 0:q.getValue(),deviceId:($=ye.getDeviceId())===null||$===void 0?void 0:$.getValue(),organizationId:ye.getOrganizationId(),id:ye.getPeerId(),capabilities:[],capabilitySet:{}}}var we=function(ye,q,$,te){return new($||($=Promise))(function(ue,ae){function de(ge){try{pe(te.next(ge))}catch(ce){ae(ce)}}function me(ge){try{pe(te.throw(ge))}catch(ce){ae(ce)}}function pe(ge){var ce;ge.done?ue(ge.value):(ce=ge.value,ce instanceof $?ce:new $(function(Te){Te(ce)})).then(de,me)}pe((te=te.apply(ye,q||[])).next())})};class Ee{constructor(q){this.config=q,this.grpcCallDeadline=5*c.a.second,this.refreshIntervalDelayMs=2*c.a.second,this.iceServersTtl=30*c.a.minute,this.connections=[],this.localConnections=[],this.isConnectionInitiator=new Map,this.isOutgoingConnection=new Map,this.peerDataChannelListeners=[];const{refreshIntervalDelayMs:$}=this;this.refreshInterval=Z({func:()=>we(this,void 0,void 0,function*(){try{yield this.update()}catch(te){I.a.warn("RTC refresh failed",{error:te})}}),delay:$,immediate:!0})}send(q,$,te){const ue=this.getActiveConnection(q);ue?ue.isReady()?ue.send($,te):I.a.warn("Send called with unready connection."):I.a.warn("Send called with no connection.")}controlRemoteStream(q,$){const te=this.getActiveConnection(q);te?te.isReady()?te.controlRemoteStream($):I.a.warn("controlRemoteStream called with unready connection."):I.a.warn("controlRemoteStream called with no connection.")}getLocalPeer(){return we(this,void 0,void 0,function*(){for(;!this.localPeer;)yield Object(u.a)(.1*c.a.second);return Se(this.localPeer)})}connect(q,$){var te,ue,ae;return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode===!0)throw new Error("connect method called in local only mode.");const{track:de,signalingClient:me}=this.config,{localPeer:pe,receiveSignalStream:ge,iceServers:ce}=this;if(!pe||!ge||!ce)return void I.a.warn("Connect called prior to local peer, receiveSignalStream, and ICE servers ready");if(this.getActiveConnection(q))return void I.a.warn("Connect called for peer with existing connection.");if(this.isOutgoingConnection.get(q))return void I.a.warn("Connect called for peer with an existing outgoing connection offer.");this.isOutgoingConnection.set(q,!0);const Te=new he(yield this.createRTCPeerConnection(ce,$),{baseConfig:{isOffer:!0,isLan:!1,receive:(De,We)=>this.config.receive(De,We),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(De,We)=>{var Be,ke;return(ke=(Be=this.config).onStreamsInfoUpdate)===null||ke===void 0?void 0:ke.call(Be,De,We)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(te=pe.getUserId())===null||te===void 0?void 0:te.getValue(),localPeerId:pe.getPeerId(),remotePeerId:q,sessionType:$==null?void 0:$.sessionType},remoteConfig:{}},De=>this.onCustomDataChannel(q,De)),Ae=yield Te.getOffer();if(!Ae)return I.a.error("Failed to generate offer."),void this.isOutgoingConnection.delete(q);I.a.debug("Sending offer."),de==null||de("Sending offer",Ae);const Pe=new L.SendSignalRequest;Pe.setSignal(Ae);const Le=yield(()=>we(this,void 0,void 0,function*(){try{return yield me.sendSignal(Pe,yield this.getMetadata({}))}catch(De){I.a.warn("Error when sending signal",{error:De})}}))();if(!this.isOutgoingConnection.get(q))return void I.a.debug("No offer set after receiving offer signal response.");I.a.debug("Offer sent.");const Fe=(ue=Le==null?void 0:Le.getSessionId())===null||ue===void 0?void 0:ue.getValue(),ze=(ae=Le==null?void 0:Le.getSessionCreatedTimestamp())===null||ae===void 0?void 0:ae.getValue();return Fe&&ze?(Te.setSessionId(Fe),Te.setSessionCreatedTimestamp(ze),this.isOutgoingConnection.delete(q),this.connections.push(Te),this.isConnectionInitiator.set(Te,!0),this.setupHandlers(Te),Fe):(I.a.warn("No session ID or no session created timestamp on send signal response."),void this.isOutgoingConnection.delete(q))})}connectLan(q){var $,te;return we(this,void 0,void 0,function*(){const ue=new B(q),ae=new he(yield this.createRTCPeerConnection([]),{baseConfig:{isOffer:!0,isLan:!0,receive:(ge,ce)=>this.config.receive(ge,ce),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(ge,ce)=>{var Te,Ae;return(Ae=(Te=this.config).onStreamsInfoUpdate)===null||Ae===void 0?void 0:Ae.call(Te,ge,ce)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localUserId:(te=($=this.localPeer)===null||$===void 0?void 0:$.getUserId())===null||te===void 0?void 0:te.getValue(),localPeerId:"lan_client",remotePeerId:q}},ge=>this.onCustomDataChannel(q,ge)),de=yield ae.getLanOffer();if(!de)return I.a.warn("Could not generate LAN offer"),!1;const me=yield ue.postLanRtcOffer({offer:JSON.stringify(de)}),pe=new RTCSessionDescription(JSON.parse(me.answer));return yield ae.handleLanAnswer(pe),this.localConnections.push(ae),this.isConnectionInitiator.set(ae,!0),Object(E.v4)()})}getConnections(){return[...this.connections,...this.localConnections]}createCustomDataChannel(q,$,te,ue,ae){const de=this.getActiveConnection(q);if(de&&this.isConnectionInitiator.has(de)){const pe=de.peerConnection.createDataChannel("custom."+$,te);return ue&&(pe.binaryType="arraybuffer"),ae(q,pe),()=>{}}const me=(pe,ge)=>{q===pe&&ge.label==="custom."+$&&ae(q,ge)};return this.peerDataChannelListeners.push(me),()=>{this.peerDataChannelListeners=this.peerDataChannelListeners.filter(pe=>pe!==me)}}onCustomDataChannel(q,$){this.peerDataChannelListeners.forEach(te=>te(q,$))}getConnectionStatus(q){if(this.isOutgoingConnection.get(q))return"connecting";const $=this.getActiveConnection(q);return $?$.isReady()?"connected":"connecting":"disconnected"}getConnectionStatsInfo(q){return we(this,void 0,void 0,function*(){const $=this.getActiveConnection(q);if($)return yield $.getConnectionStatsInfo()})}disconnect(q){return we(this,void 0,void 0,function*(){const $=this.getActiveConnection(q);$&&(yield $.close())})}getPeers(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:q}=this.config,$=yield(()=>we(this,void 0,void 0,function*(){try{return yield q.getPeers(new L.GetPeersRequest,yield this.getMetadata({}))}catch(ae){I.a.warn("Error when getting peers",{error:ae})}}))();if(!$)return[];const te=$.getPeersList();if(!te)return[];const ue=ae=>{var de,me;return(me=(de=ae.getPeerCreatedTimestamp())===null||de===void 0?void 0:de.getValue())!==null&&me!==void 0?me:0};return te.sort((ae,de)=>ue(de)-ue(ae)).map(ae=>Se(ae))})}getSessions(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getPeers method cannot be used in local-only mode.");const{signalingClient:q}=this.config,$=yield(()=>we(this,void 0,void 0,function*(){try{return yield q.getPeers(new L.GetPeersRequest,yield this.getMetadata({}))}catch(ae){I.a.warn("Error when getting peers",{error:ae})}}))();if(!$)return{};const te=$.getPeersList(),ue={};for(const ae of te)ue[ae.getPeerId()]=ae.getSessionIdsList();return ue})}getPing(q){const $=this.getActiveConnection(q);if($)return $.getPing();I.a.warn("Attempted to get ping time from inactive peer.")}getLastMessageTimestamp(q){const $=this.getActiveConnection(q);if($)return $.getLastMessageTimestamp();I.a.warn("Attempted to get last message time from inactive peer.")}getSessionMetricsMessageCounts(q){const $=this.getActiveConnection(q);if($)return $.getSessionMetricsMessageCounts();I.a.warn("Attempted to get session metrics counts from inactive peer.")}isReady(){if(this.config.lanOnlyMode)return!0;const{localPeer:q,receiveSignalStream:$,iceServers:te}=this;return!!(q&&$&&te)}shutdown(){return we(this,void 0,void 0,function*(){I.a.info("Shutdown called on RTC client"),yield this.refreshInterval.stop(),this.receiveSignalStream&&this.receiveSignalStream.cancel();const q=this.connections;this.connections=[],yield this.closeConnections(q);const{localPeer:$}=this;if(!$||this.config.lanOnlyMode)return;const{signalingClient:te}=this.config;yield(()=>we(this,void 0,void 0,function*(){try{const ue=new L.DeletePeerRequest;ue.setPeerId($.getPeerId()),yield te.deletePeer(ue,yield this.getMetadata({}))}catch(ue){return void I.a.warn("Error deleting local peer",{error:ue})}}))()})}createPeer(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createPeer method cannot be used in local-only mode.");const{signalingClient:q}=this.config,$=yield(()=>we(this,void 0,void 0,function*(){try{return yield q.createPeer(new L.CreatePeerRequest,yield this.getMetadata({}))}catch(ue){throw new Error(`Was not able to create peer: ${JSON.stringify(ue)}`)}}))(),te=$==null?void 0:$.getPeer();if(!te)throw new Error("Response did not provide peer.");return this.localPeer=te})}createReceiveSignalStream(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("createReceiveSignalStream method cannot be used in local-only mode.");const{signalingClient:q}=this.config,{localPeer:$,iceServers:te}=this;if(!$||!te)return;const{receiveSignalStream:ue}=this;ue&&ue.cancel();const ae=new L.ReceiveSignalStreamRequest;ae.setPeerId($.getPeerId());const de=yield(()=>we(this,void 0,void 0,function*(){try{return q.receiveSignalStream(ae,yield this.getMetadata({hasDeadline:!1}))}catch(me){throw new Error(`Unable to create receive signal stream: ${JSON.stringify(me)}`)}}))();if(!de)throw new Error("Response did not provide stream.");return de.on("data",me=>we(this,void 0,void 0,function*(){var pe,ge,ce,Te;const Ae=me.getSignal(),Pe=(pe=Ae==null?void 0:Ae.getSessionId())===null||pe===void 0?void 0:pe.getValue(),Le=Ae==null?void 0:Ae.getSenderId(),Fe=Ae==null?void 0:Ae.getReceiverId(),ze=(ge=Ae==null?void 0:Ae.getSessionCreatedTimestamp())===null||ge===void 0?void 0:ge.getValue();if(!(Ae&&Pe&&Le&&Fe&&ze))return void I.a.warn("Received signal with missing information.");const De=this.getActiveConnection(Le);if(De)if(De.getSessionId()!==Pe){if(I.a.debug("Received signal: different session for a peer we're already connected to."),(De.getSessionCreatedTimestamp()||0)>ze)return;const We=new he(yield this.createRTCPeerConnection(te),{baseConfig:{isOffer:!1,isLan:!1,receive:(Be,ke)=>this.config.receive(Be,ke),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Be,ke)=>{var qe,Ge;return(Ge=(qe=this.config).onStreamsInfoUpdate)===null||Ge===void 0?void 0:Ge.call(qe,Be,ke)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:$.getPeerId(),localUserId:(Te=$.getUserId())===null||Te===void 0?void 0:Te.getValue(),remotePeerId:Le},remoteConfig:{sessionId:Pe,sessionCreatedTimestamp:ze}},Be=>this.onCustomDataChannel(Le,Be));yield We.handleSignal(Ae),this.connections.push(We)}else I.a.debug("Received signal: for an existing connection."),yield De.handleSignal(Ae);else{I.a.debug("Received signal: new connection.");const We=new he(yield this.createRTCPeerConnection(te),{baseConfig:{isOffer:!1,isLan:!1,receive:(Be,ke)=>this.config.receive(Be,ke),onStreamsInfoUpdate:this.config.onStreamsInfoUpdate?(Be,ke)=>{var qe,Ge;return(Ge=(qe=this.config).onStreamsInfoUpdate)===null||Ge===void 0?void 0:Ge.call(qe,Be,ke)}:void 0,track:this.config.lanOnlyMode?void 0:this.config.track,localPeerId:$.getPeerId(),localUserId:(ce=$.getUserId())===null||ce===void 0?void 0:ce.getValue(),remotePeerId:Le},remoteConfig:{sessionId:Pe,sessionCreatedTimestamp:ze}},Be=>this.onCustomDataChannel(Le,Be));yield We.handleSignal(Ae),this.connections.push(We)}})),de.on("end",()=>{de.cancel(),this.receiveSignalStream=void 0}),de.on("error",me=>{switch(me.code){case k.StatusCode.CANCELLED:case k.StatusCode.UNAVAILABLE:case k.StatusCode.UNKNOWN:I.a.debug("Receive signal stream error",{error:me});break;case k.StatusCode.UNAUTHENTICATED:I.a.warn("Receive signal stream error",{error:me});break;default:I.a.error("Receive signal stream error",{error:me})}de.cancel(),this.receiveSignalStream=void 0}),this.receiveSignalStream=de})}createRTCPeerConnection(q,$){var te;return we(this,void 0,void 0,function*(){const ue=$==null?void 0:$.rtcIceTransportPolicies,ae=$!=null&&$.rtcIceServerProtocol?[$==null?void 0:$.rtcIceServerProtocol]:void 0,de=q.map(pe=>Object.assign(Object.assign({},pe),{urls:typeof pe.urls=="string"?[pe.urls]:pe.urls})).map(pe=>Object.assign(Object.assign({},pe),{urls:pe.urls.filter(ge=>{const ce=(ue===void 0||ue.some(Te=>((Ae,Pe)=>{switch(Pe){case"stun":return/^stuns?:/.test(Ae);case"turn":return/^turns?:/.test(Ae)}})(ge,Te)))&&(ae===void 0||ae.some(Te=>((Ae,Pe)=>Ae.endsWith(`transport=${Pe}`))(ge,Te)));return ce||I.a.debug(`Ignoring ICE server: ${ge}`),ce})})).filter(({urls:pe})=>pe.filter(ge=>ge).length>0),me=(te=this.config.alternateRTCPeerConnection)!==null&&te!==void 0?te:window.RTCPeerConnection;if(!me)throw new Error("RTCPeerConnection class not found. WebRTC must be enabled.");return new me(Object.assign({iceServers:de,iceTransportPolicy:(ue==null?void 0:ue.length)===1&&ue[0]==="turn"?"relay":"all"},$))})}closeConnections(q){return we(this,void 0,void 0,function*(){const $=yield R(q.map(te=>we(this,void 0,void 0,function*(){yield te.close()})));for(const te of $)I.a.warn("Request to close session failed",{error:te})})}getActiveConnection(q){return this.getConnections().find($=>$.getRemotePeerId()===q&&$.isActive())}update(){var q;return we(this,void 0,void 0,function*(){if(this.localConnections=this.localConnections.filter(me=>me.isActive()),this.config.lanOnlyMode)return;const{signalingClient:$}=this.config;if(!this.localPeer||!this.receiveSignalStream||!this.iceServers)return this.localPeer||(yield this.createPeer()),this.iceServers||(yield this.updateIceServers()),void(this.receiveSignalStream||(yield this.createReceiveSignalStream()));yield this.closeConnections(this.connections.filter(me=>!me.isActive())),this.connections=this.connections.filter(me=>me.isActive());const{localPeer:te}=this,ue=this.connections.filter(me=>me.getSessionId).map(me=>d(me.getSessionId()));te.setSessionIdsList(ue);const ae=new L.RefreshPeerRequest;ae.setPeer(te);try{yield $.refreshPeer(ae,yield this.getMetadata({}))}catch(me){me.code===k.StatusCode.NOT_FOUND?(I.a.warn("Peer expired, creating new peer",{peerId:te.getPeerId()}),yield this.reset()):I.a.warn("Error calling RefreshPeer",{error:me})}const de=yield this.getPeers();for(const me of this.connections)me.setRemoteDeviceId((q=de.find(pe=>pe.id===me.getRemotePeerId()))===null||q===void 0?void 0:q.deviceId)})}reset(){return we(this,void 0,void 0,function*(){yield this.closeConnections(this.connections),this.connections=[],this.isOutgoingConnection=new Map,yield this.createPeer(),yield this.createReceiveSignalStream()})}updateIceServers(){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)return;const{iceServersLastUpdate:q,iceServersTtl:$}=this,te=new Date().getTime();if(!q||te-q>$)try{const ue=(yield this.config.signalingClient.getIceServers(new L.GetIceServersRequest,yield this.getMetadata({}))).getIceServers();this.iceServers=JSON.parse(ue),this.iceServersLastUpdate=te}catch(ue){I.a.warn("Error in updateIceServers",{error:ue})}})}setupHandlers(q){const{peerConnection:$}=q,te=q.getSessionCreatedTimestamp();$.onconnectionstatechange=()=>we(this,void 0,void 0,function*(){const ue=$.connectionState;if(te)switch(ue){case"connected":O.aggregate("rtc-connect-time",new Date().getTime()-te);break;case"failed":O.increment("rtc-connect-failed")}})}getMetadata(q){return we(this,void 0,void 0,function*(){if(this.config.lanOnlyMode)throw new Error("getMetadata method cannot be called in local-only mode");const{getToken:$}=this.config,{grpcCallDeadline:te}=this,{hasDeadline:ue}=q,ae=ue===!1?void 0:new Date().getTime()+te;return{authorization:yield $(),deadline:ae}})}}},,function(e,t,r){r.r(t),r.d(t,"LogClient",function(){return l});var n=r(25),o=function(s,i,c,u){return new(c||(c=Promise))(function(b,A){function _(S){try{f(u.next(S))}catch(w){A(w)}}function v(S){try{f(u.throw(S))}catch(w){A(w)}}function f(S){var w;S.done?b(S.value):(w=S.value,w instanceof c?w:new c(function(P){P(w)})).then(_,v)}f((u=u.apply(s,i||[])).next())})};class l extends n.a{log(i){return o(this,void 0,void 0,function*(){yield this.fetch("logs",{method:"POST",body:JSON.stringify({logs:i}),allowUnsafeRetries:!0})})}}}])})})(dist);function defined(e,t){if(e!==void 0)return e;throw new Error(t||"Value is undefined")}let FORMANT_API_URL="https://api.formant.io";typeof window!="undefined"&&(FORMANT_API_URL=window.FORMANT_API_URL||FORMANT_API_URL);let urlParams$1=new URLSearchParams("");typeof window!="undefined"&&(urlParams$1=new URLSearchParams(window.location.search));const envDev=urlParams$1.get("formant_dev");envDev&&(FORMANT_API_URL="https://api-dev.formant.io");const envStage=urlParams$1.get("formant_stage");envStage&&(FORMANT_API_URL="https://api-stage.formant.io");class App{static sendAppMessage(t){window.parent.postMessage(t,"*")}static getCurrentModuleContext(){let t=new URLSearchParams("");return typeof window!="undefined"&&(t=new URLSearchParams(window.location.search)),t.get("module")}static isModule(){return this.getCurrentModuleContext()!==null}static goToTime(t){this.sendAppMessage({type:"go_to_time",time:t.getTime()})}static goToDevice(t){this.sendAppMessage({type:"go_to_device",deviceId:t})}static showMessage(t){this.sendAppMessage({type:"show_message",message:t})}static requestModuleData(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"request_module_data",module:t})}static setModuleDateTimeRange(t,r){const n=this.getCurrentModuleContext();if(!n)throw new Error("No module context");this.sendAppMessage({type:"set_module_data_time_range",module:n,before:t,after:r||0})}static refreshAuthToken(){const t=this.getCurrentModuleContext();if(!t)throw new Error("No module context");this.sendAppMessage({type:"refresh_auth_token",module:t})}static sendChannelData(t,r){const n=this.getCurrentModuleContext();if(!n)throw new Error("No module context");this.sendAppMessage({type:"send_channel_data",source:n,channel:t,data:r})}static setupModuleMenus(t){const r=this.getCurrentModuleContext();if(!r)throw new Error("No module context");this.sendAppMessage({type:"setup_module_menus",module:r,menus:t})}static addMenuListener(t){window.addEventListener("message",r=>{const n=r.data;n.type==="module_menu_item_clicked"&&t(n.menu)})}static addAccessTokenRefreshListener(t){window.addEventListener("message",r=>{const n=r.data;n.type==="auth_token"&&t(n.token)})}static addModuleDataListener(t){window.addEventListener("message",r=>{const n=r.data;n.type==="module_data"&&t({streams:n.streams,time:n.time,queryRange:n.queryRange})})}static addChannelDataListener(t,r){window.addEventListener("message",n=>{const o=n.data;o.type==="channel_data"&&o.channel===t&&r({source:o.source,data:o.data})})}}const Ce=class{static async login(t,r){try{const n=await fetch(`${FORMANT_API_URL}/v1/admin/auth/login`,{method:"POST",body:JSON.stringify({email:t,password:r}),headers:{"Content-Type":"application/json"}}),o=await n.json();if(n.status!==200)throw new Error(o.message);return await Ce.loginWithToken(o.authentication.accessToken,o.authentication.refreshToken),o.authentication}catch(n){return Ce.waitingForAuth.forEach(o=>o(!1)),Ce.waitingForAuth=[],Promise.reject(n)}}static async loginWithToken(t,r){const n=JSON.parse(atob(t.split(".")[1]));try{let o;if(Ce.isShareToken=n["formant:claims"]&&n["formant:claims"].type=="share",n["formant:claims"]&&(Ce.currentOrganization=n["formant:claims"].organizationId),n["custom:organization_id"]&&(Ce.currentOrganization=n["custom:organization_id"]),Ce.isShareToken||(o=n.sub),n["formant:claims"]&&n["formant:claims"].userId&&(o=n["formant:claims"].userId),o){const l=await fetch(`${FORMANT_API_URL}/v1/admin/users/${o}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t}}),s=await l.json();if(l.status!==200)throw new Error(s.message);Ce.currentUser=s}Ce.token=t,Ce.waitingForAuth.forEach(l=>l(!0))}catch(o){console.error(o),Ce.waitingForAuth.forEach(l=>l(!1))}Ce.waitingForAuth=[],r&&(Ce.refreshToken=r,setInterval(async()=>{if(Ce.refreshToken){const l=await(await fetch(`${FORMANT_API_URL}/v1/admin/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:Ce.refreshToken})})).json();Ce.token=l.authentication.accessToken}},1e3*60*60))}static isAuthenticated(){return Ce.token!==void 0}static getCurrentUser(){return Ce.currentUser}static async waitTilAuthenticated(){return Ce.token!==void 0?!0:new Promise(t=>{Ce.waitingForAuth.push(function(r){t(r)})})}static async listenForRefresh(){App.addAccessTokenRefreshListener(t=>{this.loginWithToken(t)}),setInterval(async()=>{App.refreshAuthToken()},1e3*60*60)}};let Authentication=Ce;Re(Authentication,"token"),Re(Authentication,"refreshToken"),Re(Authentication,"currentUser"),Re(Authentication,"currentOrganization"),Re(Authentication,"isShareToken",!1),Re(Authentication,"defaultDeviceId"),Re(Authentication,"waitingForAuth",[]);function delay(e){return new Promise(t=>setTimeout(t,e))}class DataChannel{constructor(t){Re(this,"ready",!1);Re(this,"listeners",[]);Re(this,"openListeners",[]);Re(this,"closeListeners",[]);Re(this,"errorListeners",[]);Re(this,"binaryListeners",[]);Re(this,"error");Re(this,"decoder",new TextDecoder);this.dataChannel=t,this.dataChannel.binaryType="arraybuffer",this.dataChannel.onopen=()=>{this.ready=!0,this.openListeners.forEach(r=>r())},this.dataChannel.onclose=()=>{this.ready=!1,this.closeListeners.forEach(r=>r())},this.dataChannel.onerror=r=>{console.error(r),this.error="An error occurred in DataChannel",this.errorListeners.forEach(n=>n(r))},this.dataChannel.onmessage=r=>{this.listeners.forEach(n=>{const o=new Uint8Array(r.data),l=this.decoder.decode(o);n(l)}),this.binaryListeners.forEach(n=>{n(new Uint8Array(r.data))})}}addOpenListener(t){this.openListeners.push(t)}removeOpenListener(t){this.openListeners=this.openListeners.filter(r=>r!==t)}addCloseListener(t){this.closeListeners.push(t)}removeCloseListener(t){this.closeListeners=this.closeListeners.filter(r=>r!==t)}addErrorListener(t){this.errorListeners.push(t)}removeErrorListener(t){this.errorListeners=this.errorListeners.filter(r=>r!==t)}async waitTilReady(){return this.ready?!0:new Promise((r,n)=>{let o=window.setInterval(()=>{this.ready&&(window.clearInterval(o),r(!0)),this.error&&n(this.error)},10)})}send(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}sendBinary(t){if(!this.ready)throw new Error("Connection has been closed");this.dataChannel.send(t)}addListener(t){this.listeners.push(t)}removeListener(t){const r=this.listeners.indexOf(t);if(r===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.listeners.splice(r,1)}addBinaryListener(t){this.binaryListeners.push(t)}removeBinaryListener(t){const r=this.binaryListeners.indexOf(t);if(r===-1)throw new Error("Could not find data channel listener to remove");if(this.error)throw new Error(this.error);this.binaryListeners.splice(r,1)}}class CaptureStream{constructor(t){Re(this,"token");this.captureSession=t}async ingestJSON(t){if(!this.token){const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions/${this.captureSession.code}/authenticate`,{method:"POST"})).json();this.token=n.token}await fetch(`${FORMANT_API_URL}/v1/ingest`,{method:"POST",body:JSON.stringify({deviceId:this.captureSession.deviceId,name:this.captureSession.streamName,type:"json",points:[[Date.now(),JSON.stringify(t)]]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+this.token}})}}class Manipulator{constructor(t,r){Re(this,"currentListeners",[]);Re(this,"onRealtimeMessage",(t,r)=>{r.payload.jointState&&this.currentListeners.forEach(n=>{r.payload.jointState&&n(r.payload.jointState)})});this.device=t,this.config=r}async synchronize(){this.device.addRealtimeListener(this.onRealtimeMessage),this.device.startListeningToRealtimeDataStream(this.config.currentJointStateStream)}async desynchronize(){this.device.removeRealtimeListener(this.onRealtimeMessage),this.device.stopListeningToRealtimeDataStream(this.config.currentJointStateStream)}async addCurrentJointStateListener(t){this.currentListeners.push(t)}}class RequestDataChannel{constructor(t,r,n){Re(this,"channel");Re(this,"requestIdToResponseMap",new Map);this.device=t,this.channel_name=r,this.timeout=n}addOpenListener(t){defined(this.channel,"channel not initalized").addOpenListener(t)}removeOpenListener(t){defined(this.channel,"channel not initalized").removeOpenListener(t)}addCloseListener(t){defined(this.channel,"channel not initalized").addCloseListener(t)}removeCloseListener(t){defined(this.channel,"channel not initalized").removeCloseListener(t)}addErrorListener(t){defined(this.channel,"channel not initalized").addErrorListener(t)}removeErrorListener(t){defined(this.channel,"channel not initalized").removeErrorListener(t)}}class BinaryRequestDataChannel extends RequestDataChannel{constructor(){super(...arguments);Re(this,"RESPONSE_SUCCESS_BYTE",0);Re(this,"decoder",new TextDecoder)}generateBinaryId(){const r=new Uint8Array(16);for(let n=0;n<r.length;n++)r[n]=Math.floor(Math.random()*256);return r}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addBinaryListener(r=>{const o=r.slice(0,16).toString();if(o.length===0)throw new Error("Invalid response");const l=r.slice(16);if(l.length===0)throw new Error("Invalid response");this.requestIdToResponseMap.has(o)&&this.requestIdToResponseMap.set(o,l)})}async request(r){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:n,requestIdToResponseMap:o,timeout:l}=this;await n.waitTilReady();const s=this.generateBinaryId(),i=s.toString();o.set(i,!0),n.sendBinary(new Uint8Array([...s,...r]));const c=new Date().getTime();for(;new Date().getTime()<c+l;)if(await delay(50),o.has(i)){const u=o.get(i);if(u!==!0){o.delete(i);const b=u[0]===this.RESPONSE_SUCCESS_BYTE,A=u.slice(1);if(b)return A;throw console.error({name:"AdapterError",message:this.decoder.decode(A)}),new Error("Binary request datachannel adapter error")}}throw o.delete(i),console.error({name:"TimeoutError",message:`Request timed out after ${l/1e3} seconds`}),new Error("Binary request data channel request timed out")}}class TextRequestDataChannel extends RequestDataChannel{generateTextId(){return Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2)}async initialize(){this.channel=await this.device.createCustomDataChannel(this.channel_name),this.channel.addListener(t=>{const r=JSON.parse(t),{id:n,data:o,error:l}=r;if(!n)throw new Error("Invalid response");if(!o&&!l)throw new Error("Invalid response");this.requestIdToResponseMap.has(n)&&this.requestIdToResponseMap.set(n,r)})}async request(t){if(this.channel||await this.initialize(),!this.channel)throw new Error("Failed to create channel");const{channel:r,requestIdToResponseMap:n,timeout:o}=this;await r.waitTilReady();const l=this.generateTextId();n.set(l,!0),r.send(JSON.stringify({id:l,data:t}));const s=new Date().getTime();for(;new Date().getTime()<s+o;)if(await delay(50),n.has(l)){const i=n.get(l);if(i!==!0){n.delete(l);const{data:c,error:u}=i;if(c)return c;if(u)throw console.error({name:"AdapterError",message:u}),new Error("Text request datachannel adapter error")}}throw n.delete(l),console.error({name:"TimeoutError",message:`Request timed out after ${o/1e3} seconds`}),new Error("Text request datachannel request timed out")}}const SessionType={Teleop:1,Observe:3};class Device{constructor(t,r,n){Re(this,"rtcClient");Re(this,"remoteDevicePeerId");Re(this,"realtimeListeners",[]);Re(this,"handleMessage",(t,r)=>{this.realtimeListeners.forEach(n=>n(t,r))});this.id=t,this.name=r,this.organizationId=n}async getLatestTelemetry(){return(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}async getConfiguration(){let t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}});const r=await t.json();if(!r.state.reportedConfiguration)throw new Error("Device has no configuration, has it ever been turned on?");const n=r.state.reportedConfiguration.version;return t=await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}/configurations/${n}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),(await t.json()).document}async getFileUrl(t){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileId:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).fileUrls}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async startRealtimeConnection(t){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{const r=new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:this.handleMessage});for(;!r.isReady();)await delay(100);const o=(await r.getPeers()).find(l=>l.deviceId===this.id);if(!o)throw new Error("Cannot find peer, is the robot offline?");for(this.remoteDevicePeerId=o.id,await r.connect(this.remoteDevicePeerId,t||{sessionType:SessionType.Teleop});r.getConnectionStatus(this.remoteDevicePeerId)!=="connected";)await delay(100);this.rtcClient=r}}async sendRealtimeMessage(t,r={channelLabel:"stream.reliable"}){const n=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer();n.send(defined(o).id,t,r)}addRealtimeListener(t){this.realtimeListeners.push(t)}removeRealtimeListener(t){const r=this.realtimeListeners.indexOf(t);if(r===-1)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(r,1)}async getRealtimeAudioStreams(){var n,o,l,s,i,c;const t=await this.getConfiguration(),r=[];for(const u of(o=(n=t.teleop)==null?void 0:n.hardwareStreams)!=null?o:[])u.rtcStreamType==="audio-chunk"&&r.push({name:u.name});for(const u of(s=(l=t.teleop)==null?void 0:l.rosStreams)!=null?s:[])u.topicType=="audio_common_msgs/AudioData"&&r.push({name:u.topicName});for(const u of(c=(i=t.teleop)==null?void 0:i.customStreams)!=null?c:[])u.rtcStreamType==="audio-chunk"&&r.push({name:u.name});return r}async getRealtimeVideoStreams(){var n,o,l,s,i,c;const t=await this.getConfiguration(),r=[];for(const u of(o=(n=t.teleop)==null?void 0:n.hardwareStreams)!=null?o:[])u.rtcStreamType==="h264-video-frame"&&r.push({name:u.name});for(const u of(s=(l=t.teleop)==null?void 0:l.rosStreams)!=null?s:[])u.topicType=="formant/H264VideoFrame"&&r.push({name:u.topicName});for(const u of(c=(i=t.teleop)==null?void 0:i.customStreams)!=null?c:[])u.rtcStreamType==="h264-video-frame"&&r.push({name:u.name});return r}async getRealtimeManipulators(){var n;const t=await this.getConfiguration(),r=[];for(const o of(n=t.teleop.rosStreams)!=null?n:[])o.topicType=="sensor_msgs/JointState"&&r.push(new Manipulator(this,{currentJointStateStream:{name:o.topicName},plannedJointStateStream:o.plannedTopic?{name:o.plannedTopic}:void 0,planValidStream:o.planValidTopic?{name:o.planValidTopic}:void 0,endEffectorStream:o.endEffectorTopic?{name:o.endEffectorTopic}:void 0,endEffectorLinkName:o.endEffectorLinkName,baseReferenceFrame:o.baseReferenceFrame,localFrame:o.localFrame}));return r}async startListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!0,pipeline:"telemetry"})}async changeStreamAudioType(t,r){const n=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer();n.controlRemoteStream(defined(o).id,{streamName:t,setAudioFormat:r})}async disableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){const r=(await defined(this.rtcClient,"Realtime connection has not been started").getPeers()).find(n=>n.deviceId===this.id);return defined(r,"Could not find remote peer for device "+this.id)}async stopRealtimeConnection(){if(this.rtcClient)await this.rtcClient.disconnect(this.id);else throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async isInRealtimeSession(){let t=await Fleet.getPeers(),r=await Fleet.getRealtimeSessions(),n=t.find(o=>o.deviceId===this.id);return n?r[n.id].length>0:!1}async getAvailableCommands(){return(await(await fetch(`${FORMANT_API_URL}/v1/admin/command-templates/`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(n=>({name:n.name,id:n.id,command:n.command,description:n.description,parameterEnabled:n.parameterEnabled,parameterValue:n.parameterValue,parameterMeta:n.parameterMeta,enabled:n.enabled}))}async sendCommand(t,r,n,o){var u;const s=(await this.getAvailableCommands()).find(b=>b.name===t);if(!s)throw new Error(`Could not find command with name "${t}"`);let i;if(r===void 0)if(s.parameterEnabled&&s.parameterValue)i=s.parameterValue;else throw new Error("Command has no default parameter value, you must provide one");else i=r;let c={value:i,scrubberTime:(n||new Date).toISOString(),meta:st(st({},s.parameterMeta),o)};await fetch(`${FORMANT_API_URL}/v1/admin/commands`,{method:"POST",body:JSON.stringify({commandTemplateId:s.id,organizationId:this.organizationId,deviceId:this.id,command:s.command,parameter:c,userId:(u=Authentication.currentUser)==null?void 0:u.id}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})}async createCustomDataChannel(t,r){const n=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer(),l=await new Promise(s=>{n.createCustomDataChannel(defined(o).id,t,st({ordered:!0},r),!1,(i,c)=>{const u=new DataChannel(c);s(u)})});return await l.waitTilReady(),l}createCustomRequestDataChannel(t,r=3e3){return new TextRequestDataChannel(this,t,r)}createCustomBinaryRequestDataChannel(t,r=3e3){return new BinaryRequestDataChannel(this,t,r)}async createCaptureStream(t){const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/capture-sessions`,{method:"POST",body:JSON.stringify({deviceId:this.id,streamName:t,tags:{}}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return new CaptureStream(n)}async getTelemetry(t,r,n,o){return await Fleet.getTelemetry(this.id,t,r,n,o)}async getTelemetryStreams(){var i,c;const t=await this.getConfiguration(),r=await fetch(`${FORMANT_API_URL}/v1/queries/metadata/stream-names`,{method:"POST",body:JSON.stringify({deviceIds:[this.id]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),n=[],o=[];return(c=(i=t.telemetry)==null?void 0:i.streams)==null||c.forEach(u=>{u.disabled!==!0&&n.push(u.name),u.onDemand===!0&&o.push(u.name)}),console.log(o),(await r.json()).items.filter(u=>!n.includes(u)).map(u=>({name:u,onDemand:o.includes(u)}))}async createInterventionRequest(t,r,n,o){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"POST",body:JSON.stringify({message:t,interventionType:r,time:new Date().toISOString(),deviceId:this.id,tags:o,data:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}async addInterventionResponse(t,r,n){return await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-responses`,{method:"POST",body:JSON.stringify({interventionId:t,interventionType:r,data:n}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()}}class PeerDevice{constructor(t){Re(this,"rtcClient");Re(this,"remoteDevicePeerId");Re(this,"realtimeListeners",[]);Re(this,"id");Re(this,"handleMessage",(t,r)=>{this.realtimeListeners.forEach(n=>n(t,r))});this.peerUrl=t}async getLatestTelemetry(){const r=await(await fetch(`${this.peerUrl}/telemetry`)).json();return Object.entries(r).map(([o,l])=>({deviceId:this.id,streamName:o,streamType:"json",currentValue:l,currentValueTime:l.timestamp,tags:{}}))}async getDeviceId(){return(await(await fetch(`${this.peerUrl}/configuration`)).json()).agent_config.id}async getConfiguration(){return(await(await fetch(`${this.peerUrl}/configuration`)).json()).agent_config.document}getRealtimeStatus(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getConnectionStatus(this.remoteDevicePeerId);throw new Error("Realtime connection hasn't been started")}getRealtimePing(){if(this.rtcClient&&this.remoteDevicePeerId)return this.rtcClient.getPing(this.remoteDevicePeerId);throw new Error("Realtime connection hasn't been started")}async startRealtimeConnection(t){if(this.rtcClient)throw new Error(`Already created realtime connection to device ${this.id}`);{const r=new dist.exports.RtcClient({lanOnlyMode:!0,receive:this.handleMessage});for(await r.connectLan(this.peerUrl);r.getConnectionStatus(this.peerUrl)!=="connected";)await delay(100);this.rtcClient=r}}addRealtimeListener(t){this.realtimeListeners.push(t)}removeRealtimeListener(t){const r=this.realtimeListeners.indexOf(t);if(r===-1)throw new Error("Could not find realtime listener to remove");this.realtimeListeners.splice(r,1)}async getRealtimeVideoStreams(){var n,o,l;const t=await this.getConfiguration(),r=[];for(const s of(n=t.teleop.hardwareStreams)!=null?n:[])s.rtcStreamType==="h264-video-frame"&&r.push({name:s.name});for(const s of(o=t.teleop.rosStreams)!=null?o:[])s.topicType=="formant/H264VideoFrame"&&r.push({name:s.topicName});for(const s of(l=t.teleop.customStreams)!=null?l:[])s.rtcStreamType==="h264-video-frame"&&r.push({name:s.name});return r}async getRealtimeManipulators(){var n;const t=await this.getConfiguration(),r=[];for(const o of(n=t.teleop.rosStreams)!=null?n:[])o.topicType=="sensor_msgs/JointState"&&r.push(new Manipulator(this,{currentJointStateStream:{name:o.topicName},plannedJointStateStream:o.plannedTopic?{name:o.plannedTopic}:void 0,planValidStream:o.planValidTopic?{name:o.planValidTopic}:void 0,endEffectorStream:o.endEffectorTopic?{name:o.endEffectorTopic}:void 0,endEffectorLinkName:o.endEffectorLinkName,baseReferenceFrame:o.baseReferenceFrame,localFrame:o.localFrame}));return r}async startListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeVideo(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async startListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!0,pipeline:"rtc"})}async stopListeningToRealtimeDataStream(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t.name,enable:!1,pipeline:"rtc"})}async enableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!0,pipeline:"telemetry"})}async disableRealtimeTelemetryPriorityIngestion(t){const r=defined(this.rtcClient,"Realtime connection has not been started"),n=await this.getRemotePeer();r.controlRemoteStream(defined(n).id,{streamName:t,enablePriorityUpload:!1,pipeline:"telemetry"})}async getRemotePeer(){return{id:this.peerUrl,organizationId:"",deviceId:this.id,capabilities:[],capabilitySet:{}}}async stopRealtimeConnection(){if(this.rtcClient)await this.rtcClient.disconnect(this.id);else throw new Error(`Realtime connection hasn't been started for ${this.id}`)}async createCustomDataChannel(t,r){const n=defined(this.rtcClient,"Realtime connection has not been started"),o=await this.getRemotePeer(),l=await new Promise(s=>{n.createCustomDataChannel(defined(o).id,t,st({ordered:!0},r),!1,(i,c)=>{const u=new DataChannel(c);s(u)})});return await l.waitTilReady(),l}createCustomRequestDataChannel(t,r=3e3){return new TextRequestDataChannel(this,t,r)}createCustomBinaryRequestDataChannel(t,r=3e3){return new BinaryRequestDataChannel(this,t,r)}}const Me=class{static async setDefaultDevice(t){Me.defaultDeviceId=t}static async getCurrentDevice(){if(!Authentication.token)throw new Error("Not authenticated");if(!Me.defaultDeviceId)throw new Error("No known default device");const o=(await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.find(s=>s.id===Me.defaultDeviceId).name,l=new Device(Me.defaultDeviceId,o,defined(Authentication.currentOrganization));return Me.knownContext.push(new WeakRef(l)),l}static async getPeerDevice(t){const r=new PeerDevice(t);return r.id=await r.getDeviceId(),r}static async getDevice(t){if(!Authentication.token)throw new Error("Not authenticated");const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/devices/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json(),o=n.name,l=new Device(t,o,n.organizationId);return Me.knownContext.push(new WeakRef(l)),l}static async getDevices(){if(!Authentication.token)throw new Error("Not authenticated");const r=await(await fetch(`${FORMANT_API_URL}/v1/admin/device-details/query`,{method:"POST",body:JSON.stringify({enabled:!0,type:"default"}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();return r.items,r.items.map(n=>new Device(n.id,n.name,n.organizationId))}static async getOnlineDevices(){if(!Authentication.token)throw new Error("Not authenticated");const n=(await(await fetch(`${FORMANT_API_URL}/v1/queries/online-devices`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items;return(await Me.getDevices()).filter(l=>n.includes(l.id))}static async getPeers(){if(!Authentication.token)throw new Error("Not authenticated");return await new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getPeers()}static async getRealtimeSessions(){if(!Authentication.token)throw new Error("Not authenticated");return await new dist.exports.RtcClient({signalingClient:new dist.exports.SignalingPromiseClient(FORMANT_API_URL,null,null),getToken:async()=>defined(Authentication.token,"Realtime when user isn't authorized"),receive:()=>{}}).getSessions()}static async getRealtimeDevices(){if(!Authentication.token)throw new Error("Not authenticated");const n=(await(await fetch(`${FORMANT_API_URL}/v1/signaling/peers`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items.map(l=>l.deviceId);return(await Me.getDevices()).filter(l=>n.includes(l.id))}static async getLatestTelemetry(t){let r=t;return t&&!Array.isArray(t)&&(t=[t]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/stream-current-value`,{method:"POST",body:JSON.stringify({deviceIds:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getTelemetry(t,r,n,o,l){let s=t;Array.isArray(t)||(s=[t]);let i=r;return Array.isArray(r)||(i=[r]),(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify({deviceIds:s,end:o.toISOString(),names:i,start:n.toISOString(),tags:l}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getFileUrl(t){const n=await(await fetch(`${FORMANT_API_URL}/v1/admin/files/query`,{method:"POST",body:JSON.stringify({fileIds:[t]}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json();if(n.fileUrls.length===0)throw new Error("File not found");return n.fileUrls[0]}static async queryTelemetry(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async aggregateTelemetry(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/queries/queries`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).aggregates}static async queryEvents(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/events/query`,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getEvent(t){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/events/query/id=${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}static async getInterventions(){if(!Authentication.token)throw new Error("Not authenticated");return(await(await fetch(`${FORMANT_API_URL}/v1/admin/intervention-requests`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).json()).items}};let Fleet=Me;Re(Fleet,"defaultDeviceId"),Re(Fleet,"knownContext",[]);class KeyValue{static async set(t,r){try{const n=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"POST",body:JSON.stringify({organizationId:defined(Authentication.currentUser).organizationId,key:t,value:r}),headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),o=await n.json();if(n.status!==200)throw new Error(o.message)}catch(n){throw n}}static async get(t){try{const r=await fetch(FORMANT_API_URL+`/v1/admin/key-value/${t}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),n=await r.json();if(r.status!==200)throw new Error(n.message);return n.value}catch(r){throw r}}static async list(){try{const t=await fetch(FORMANT_API_URL+"/v1/admin/key-value",{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}}),r=await t.json();if(t.status!==200)throw new Error(r.message);return r.items}catch(t){throw t}}static async delete(t){try{if(!(await fetch(FORMANT_API_URL+`/v1/admin/key-value/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Authentication.token}})).ok)throw new Error("Unable to handle request");return}catch(r){throw r}}}function stringToArrayBuffer(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))}function fork(e){}function browser(){const{userAgent:e}=navigator;return e.includes("Firefox/")?"Firefox":e.includes("Edg/")?"Edge":e.includes("Chrome/")?"Chrome":e.includes("Safari/")?"Safari":e.includes("MSIE/")||e.includes("Trident/")?"IE":"Other"}const rtcAudioChunkStreamType="audio-chunk";class AudioPlayer{constructor(t,r){Re(this,"muted",!1);Re(this,"hasReceivedData",!1);Re(this,"audioContext");Re(this,"chunks",[]);Re(this,"isPlaying",!1);Re(this,"startTime",0);Re(this,"lastChunkOffset",0);Re(this,"bufferSize",3);Re(this,"receive",async t=>{var s;const r=(s=t.payload.audioChunk)==null?void 0:s.chunk_data;if(!r)return;this.hasReceivedData||(this.hasReceivedData=!0);const{audioContext:n,muted:o}=this;if(!n||t.header.stream.streamType!==rtcAudioChunkStreamType||o!==!1)return;const l=stringToArrayBuffer(r);try{await n.decodeAudioData(l.buffer,this.scheduleChunk)}catch(i){console.warn("Error decoding audio buffer, changing audioWireFormat on agent",{error:i}),this.changeAudioWireFormat("wav")}});Re(this,"scheduleChunk",t=>{const{audioContext:r}=this;if(!r)return;(this.chunks.length>this.bufferSize||this.isPlaying===!1)&&(this.chunks.forEach(o=>{o.stop()}),this.isPlaying=!1,this.chunks=[]);const n=this.createChunk(t);!n||!n.buffer||(this.isPlaying===!1&&(this.startTime=r.currentTime,this.lastChunkOffset=0,this.isPlaying=!0),n.start(this.startTime+this.lastChunkOffset,0,t.duration),this.lastChunkOffset+=n.buffer.duration,this.chunks.push(n))});this.device=t,this.stream=r,this.device.startListeningToRealtimeDataStream(r),this.device.addRealtimeListener((o,l)=>{this.receive(l)}),browser()==="Safari"||browser()==="IE"?this.changeAudioWireFormat("wav"):this.changeAudioWireFormat("opus");const n=window.AudioContext||window.webkitAudioContext;this.audioContext=new n}async play(){var t,r;((t=this.audioContext)==null?void 0:t.state)==="suspended"&&await((r=this.audioContext)==null?void 0:r.resume()),this.muted=!1}async pause(){await this.audioContext.suspend(),this.muted=!0}destroy(){this.device.stopListeningToRealtimeDataStream(this.stream)}createChunk(t){const{audioContext:r}=this;if(!r)return;const n=r.createBufferSource();return n.buffer=t,n.connect(r.destination),n.loop=!1,n.onended=o=>{this.chunks.splice(this.chunks.indexOf(n),1),this.chunks.length===0&&(this.isPlaying=!1)},n}changeAudioWireFormat(t){const{stream:r}=this;(async()=>await this.device.changeStreamAudioType(r.name,t))()}}const accessLevels=["viewer","operator","administrator"],viewer="viewer",operator="operator",administrator="administrator",aggregateLevels=["year","month","week","day","hour","minute"],annotationTypes=["tag","sheet","user"],eventTypes=["triggered-event","intervention-request","teleop-session-record","port-forwarding-session-record","command-request","command-response","command-delivery","custom","comment","system","annotation"],healthStatuses=["unknown","operational","offline","error"],interventionTypes=["selection","labeling","teleop"],severities=["info","warning","error","critical"],videoMimeTypes=["video/mp4"];let urlParams=new URLSearchParams("");typeof window!="undefined"&&(urlParams=new URLSearchParams(window.location.search));const urlDevice=urlParams.get("device");urlDevice&&Fleet.setDefaultDevice(urlDevice);const urlAuth=urlParams.get("auth");urlAuth&&Authentication.loginWithToken(urlAuth);const moduleName=urlParams.get("module");moduleName&&Authentication.listenForRefresh(),exports.App=App,exports.AudioPlayer=AudioPlayer,exports.Authentication=Authentication,exports.BinaryRequestDataChannel=BinaryRequestDataChannel,exports.CaptureStream=CaptureStream,exports.DataChannel=DataChannel,exports.Device=Device,exports.Fleet=Fleet,exports.IRtcSendConfiguration=dist.exports.IRtcSendConfiguration,exports.IRtcStreamMessage=dist.exports.IRtcStreamMessage,exports.IRtcStreamPayload=dist.exports.IRtcStreamPayload,exports.KeyValue=KeyValue,exports.Manipulator=Manipulator,exports.PeerDevice=PeerDevice,exports.SessionType=SessionType,exports.TextRequestDataChannel=TextRequestDataChannel,exports.accessLevels=accessLevels,exports.administrator=administrator,exports.aggregateLevels=aggregateLevels,exports.annotationTypes=annotationTypes,exports.eventTypes=eventTypes,exports.healthStatuses=healthStatuses,exports.interventionTypes=interventionTypes,exports.operator=operator,exports.severities=severities,exports.videoMimeTypes=videoMimeTypes,exports.viewer=viewer,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|