/*! For license information please see Diff.js.LICENSE.txt */ (()=>{var e={67526(e,t){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=u(e),a=o[0],s=o[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[l++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,u=0,s=r-i;us?s:u+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function s(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function c(e,t,n){for(var r,i=[],o=t;oa)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=u(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);const i=function(e){if(s.isBuffer(e)){const t=0|d(e.length),n=u(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?u(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),u(e<0?0:0|d(e))}function p(e){const t=e.length<0?0:0|d(e.length),n=u(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function v(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return S(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){let o,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;ou&&(n=u-s),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,u,s;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(s=(31&t)<<6|63&n,s>127&&(o=s));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(s=(15&t)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=e[i+1],r=e[i+2],u=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&u)&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&u,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},s.byteLength=m,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const u=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return B(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function I(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function D(e,t,n,r,i){G(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function N(e,t,n,r,i){G(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function U(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function _(e,t,n,r,o){return t=+t,n>>>=0,o||U(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,o){return t=+t,n>>>=0,o||U(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=K(function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=K(function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||z(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||L(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||R(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||R(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=K(function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=K(function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i>>=0,!r){const r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=K(function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=K(function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,n){return _(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return _(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function G(e,t,n,r,i,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new M.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||z(t,e.length-(n+1))}(r,i,o)}function H(e,t){if("number"!=typeof e)throw new M.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,n){if(Math.floor(e)!==e)throw H(e,n),new M.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),j("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=$(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r},RangeError);const W=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},251(e,t){t.read=function(e,t,n,r,i){var o,a,u=8*i-r-1,s=(1<>1,l=-7,f=n?i-1:0,p=n?-1:1,h=e[t+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=u;l>0;o=256*o+e[t+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,u,s,c=8*o-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+f>=1?p/s:p*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(t*s-1)*Math.pow(2,i),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&u,h+=d,u/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=d,a/=256,c-=8);e[n+h-d]|=128*m}},73065(e,t,n){var r,i;!function(){"use strict";r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],i={},o=null;function a(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function u(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(){for(var n=this.getLevel(),i=0;i=0&&t<=f.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?p+=":"+e:"symbol"==typeof e&&(p=void 0),f.name=e,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=n||l,f.getLevel=function(){return null!=c?c:null!=u?u:a},f.setLevel=function(e,n){return c=d(e),!1!==n&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&p){try{return void(window.localStorage[p]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"="+n+";"}catch(e){}}}(c),s.call(f)},f.setDefaultLevel=function(e){u=d(e),h()||f.setLevel(e,!1)},f.resetLevel=function(){c=null,function(){if(typeof window!==t&&p){try{window.localStorage.removeItem(p)}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),s.call(f)},f.enableAll=function(e){f.setLevel(f.levels.TRACE,e)},f.disableAll=function(e){f.setLevel(f.levels.SILENT,e)},f.rebuild=function(){if(o!==f&&(a=d(o.getLevel())),s.call(f),o===f)for(var e in i)i[e].rebuild()},a=d(o?o.getLevel():"WARN");var m=h();null!=m&&(c=d(m)),s.call(f)}(o=new f).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new f(e,o.methodFactory)),t};var p=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=p),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=r.call(t,n,t,e))||(e.exports=i)}()},65606(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var u,s=[],c=!1,l=-1;function f(){c&&u&&(c=!1,u.length?s=u.concat(s):l=-1,s.length&&p())}function p(){if(!c){var e=a(f);c=!0;for(var t=s.length;t;){for(u=s,s=[];++l1)for(var n=1;n=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function u(e,t){return i(e>>t&63|128)}function s(e){if(!(4294967168&e))return i(e);var t="";return 4294965248&e?4294901760&e?4292870144&e||(t=i(e>>18&7|240),t+=u(e,12),t+=u(e,6)):(a(e),t=i(e>>12&15|224),t+=u(e,6)):t=i(e>>6&31|192),t+i(63&e|128)}function c(){if(r>=n)throw Error("Invalid byte index");var e=255&t[r];if(r++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(){var e,i;if(r>n)throw Error("Invalid byte index");if(r==n)return!1;if(e=255&t[r],r++,!(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|c())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|c()<<6|c())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|c()<<12|c()<<6|c())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),n=t.length,r=-1,i="";++r65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(u)}}(t)},25172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},16993(e,t,n){var r=n(75546);function i(){var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function s(e,i,o,a){var u=i&&i.prototype instanceof l?i:l,s=Object.create(u.prototype);return r(s,"_invoke",function(e,r,i){var o,a,u,s=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,u=t,p.n=n,c}};function h(e,r){for(a=e,u=r,n=0;!f&&s&&!i&&n3?(i=d===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=e<2&&hr||r>d)&&(o[4]=e,o[5]=r,p.n=d,a=0))}if(i||e>1)return c;throw f=!0,r}return function(i,l,d){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,d),a=l,u=d;(n=a<2?t:u)||!f;){o||(a?a<3?(a>1&&(p.n=-1),h(a,u)):p.n=u:p.v=u);try{if(s=2,o){if(a||(i="next"),n=o[i]){if(!(n=n.call(o,u)))throw TypeError("iterator result is not an object");if(!n.done)return n;u=n.value,a<2&&(a=0)}else 1===a&&(n=o.return)&&n.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((n=(f=p.n<0)?u:e.call(r,p))!==c)break}catch(e){o=t,a=1,u=e}finally{s=1}}return{value:n,done:f}}}(e,o,a),!0),s}var c={};function l(){}function f(){}function p(){}n=Object.getPrototypeOf;var h=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),d=p.prototype=l.prototype=Object.create(h);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,r(e,u,"GeneratorFunction")),e.prototype=Object.create(d),e}return f.prototype=p,r(d,"constructor",p),r(p,"constructor",f),f.displayName="GeneratorFunction",r(p,u,"GeneratorFunction"),r(d),r(d,u,"Generator"),r(d,a,function(){return this}),r(d,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:s,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},55869(e,t,n){var r=n(887);e.exports=function(e,t,n,i,o){var a=r(e,t,n,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,n){var r=n(16993),i=n(11791);e.exports=function(e,t,n,o,a){return new i(r().w(e,t,n,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},11791(e,t,n){var r=n(25172),i=n(75546);e.exports=function e(t,n){function o(e,i,a,u){try{var s=t[e](i),c=s.value;return c instanceof r?n.resolve(c.v).then(function(e){o("next",e,a,u)},function(e){o("throw",e,a,u)}):n.resolve(c).then(function(e){s.value=e,a(s)},function(e){return o("throw",e,a,u)})}catch(e){u(e)}}var a;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,r){function i(){return new n(function(t,n){o(e,r,t,n)})}return a=a?a.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},75546(e){function t(n,r,i,o){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,i){function o(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,n){var r=n(25172),i=n(16993),o=n(55869),a=n(887),u=n(11791),s=n(4373),c=n(30579);function l(){"use strict";var t=i(),n=t.m(l),f=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var h={throw:1,return:2,break:3,continue:3};function d(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,h[e],t)},delegateYield:function(e,i,o){return t.resultName=i,n(r.d,c(e),o)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,i){return t.w(d(e),n,r,i&&i.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:u,async:function(e,t,n,r,i){return(p(t)?a:o)(d(e),t,n,r,i)},keys:s,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},30579(e,t,n){var r=n(73738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},73738(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},54756(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nJe,applyPatch:()=>Et,applyPatches:()=>kt,canonicalize:()=>bt,convertChangesToDMP:()=>Zt,convertChangesToXML:()=>Xt,createPatch:()=>Tt,createTwoFilesPatch:()=>St,diffArrays:()=>Bt,diffChars:()=>Xe,diffCss:()=>lt,diffJson:()=>wt,diffLines:()=>ot,diffSentences:()=>st,diffTrimmedLines:()=>at,diffWords:()=>nt,diffWordsWithSpace:()=>rt,formatPatch:()=>It,merge:()=>Rt,parsePatch:()=>At,reversePatch:()=>qt,structuredPatch:()=>Ct});var v=n(54756),g=n.n(v);function y(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||r(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var w=n(73065),b=n.n(w),x=n(90031),B=n.n(x);function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(A=function(){return!!e})()}function F(e){var t="function"==typeof Map?new Map:void 0;return F=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(A())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&p(i,n.prototype),i}(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),p(n,e)},F(e)}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(E=function(){return!!e})()}const k=function(e){function t(){var e,n,r,i;o(this,t);for(var a=arguments.length,u=new Array(a),s=0;s1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";if("string"==typeof e&&(e=P.strToArrayBuffer(e)),e instanceof ArrayBuffer&&(e=new Uint8Array(e)),64!==(t=P.expandAlphRange(t).join("")).length&&65!==t.length)throw new k(`Invalid Base64 alphabet length (${t.length}): ${t}`);for(var n,r,i,o,a,u,s,c="",l=0;l>2,a=(3&n)<<4|(r=e[l++])>>4,u=(15&r)<<2|(i=e[l++])>>6,s=63&i,isNaN(r)?u=s=64:isNaN(i)&&(s=64),c+=t.charAt(o)+t.charAt(a)+t.charAt(u)+t.charAt(s);return c}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!e)return"string"===n?"":[];if(t=t||"A-Za-z0-9+/=",64!==(t=P.expandAlphRange(t).join("")).length&&65!==t.length)throw new k(`Error: Base64 alphabet should be 64 characters long, or 65 with a padding character. Found ${t.length}: ${t}`);if(r){var o=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(o,"")}if(i){if(e.length%4==1)throw new k(`Error: Invalid Base64 input length (${e.length}). Cannot be 4n+1, even without padding chars.`);if(65===t.length){var a=t.charAt(64),u=e.indexOf(a);if(u>=0){if(u>2,l=(3&h)<<6|d,(s=f<<2|p>>4)>=0&&s<256&&m.push(s),c>=0&&c<256&&64!==h&&m.push(c),l>=0&&l<256&&64!==d&&m.push(l)}return"string"===n?P.byteArrayToUtf8(m):m}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(n<1||Math.round(n)!==n)throw new k("Byte length must be a positive integer");if("None"!==t){var r="Auto"===t?/[^a-f\d]|0x/gi:P.regexRep(t);e=e.split(r)}else e=[e];for(var i=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:"Auto";t=P.charRep(t);var n=[],r=e.split(t);""===r[r.length-1]&&(r=r.slice(0,r.length-1));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"Space",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(n<1||Math.round(n)!==n)throw new k("Byte length must be a positive integer");var r=P.regexRep(t);e=e.replace(r,"");for(var i=[],o=0;o65535){e-=65536;var t=String.fromCharCode(e>>>10&1023|55296);return e=56320|1023&e,t+String.fromCharCode(e)}return String.fromCharCode(e)}},{key:"ord",value:function(e){if(2===e.length){var t=e.charCodeAt(0),n=e.charCodeAt(1);if(t>=55296&&t<56320&&n>=56320&&n<57344)return 1024*(t-55296)+n-56320+65536}return e.charCodeAt(0)}},{key:"padBytesRight",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=new Array(t);return r.fill(n),y(e).forEach(function(e,t){r[t]=e}),r}},{key:"truncate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length>t&&(e=e.slice(0,t-n.length)+n),e}},{key:"hex",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(t="string"==typeof t?e.ord(t):t).toString(16).padStart(n,"0")}},{key:"bin",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(t="string"==typeof t?e.ord(t):t).toString(2).padStart(n,"0")}},{key:"printable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e.replace(/[^\x20-\x7e]/g,"."):(e=e.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),t||(e=e.replace(/[\x09-\x10\u2028\u2029]/g,".")),e)}},{key:"escapeWhitespace",value:function(e){return e.replace(/[\x09-\x10]/g,function(e){return String.fromCharCode(57344+e.charCodeAt(0))})}},{key:"parseEscapedChars",value:function(e){return e.replace(/\\([abfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,function(e,t){switch(t[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(t,8));case"a":return String.fromCharCode(7);case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(t.substr(1),16));case"u":return"{"===t[1]?String.fromCodePoint(parseInt(t.slice(2,-1),16)):String.fromCharCode(parseInt(t.substr(1),16))}})}},{key:"escapeRegex",value:function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(t){for(var n=[],r=0;r=0;i--)n=256*n+e[i];return n}},{key:"intToByteArray",value:function(e,t,n){var r=new Array(t);if("little"===n)for(var i=0;i>>=8;else for(var o=t-1;o>=0;o--)r[o]=255&e,e>>>=8;return r}},{key:"strToArrayBuffer",value:function(t){if(b().debug(`Converting string[${null==t?void 0:t.length}] to array buffer`),!t)return new ArrayBuffer;for(var n,r=new Uint8Array(t.length),i=t.length;i--;)if(n=t.charCodeAt(i),r[i]=n,n>255)return e.strToUtf8ArrayBuffer(t);return r.buffer}},{key:"strToUtf8ArrayBuffer",value:function(e){if(b().debug(`Converting string[${null==e?void 0:e.length}] to UTF8 array buffer`),!e)return new ArrayBuffer;var t=new TextEncoder("utf-8").encode(e);return e.length!==t.length&&(_()&&self&&"function"==typeof self.setOption?self.setOption("attemptHighlight",!1):U()&&(window.app.options.attemptHighlight=!1)),t.buffer}},{key:"strToByteArray",value:function(t){if(b().debug(`Converting string[${null==t?void 0:t.length}] to byte array`),!t)return[];for(var n,r=new Array(t.length),i=t.length;i--;)if(n=t.charCodeAt(i),r[i]=n,n>255)return e.strToUtf8ByteArray(t);return r}},{key:"strToUtf8ByteArray",value:function(t){if(b().debug(`Converting string[${null==t?void 0:t.length}] to UTF8 byte array`),!t)return[];var n=B().encode(t);return t.length!==n.length&&(_()?self.setOption("attemptHighlight",!1):U()&&(window.app.options.attemptHighlight=!1)),e.strToByteArray(n)}},{key:"strToCharcode",value:function(t){if(b().debug(`Converting string[${null==t?void 0:t.length}] to charcode`),!t)return[];for(var n=[],r=0;r=55296&&i<56320){var o=t[r+1].charCodeAt(0);o>=56320&&o<57344&&(i=e.ord(t[r]+t[++r]))}n.push(i)}return n}},{key:"byteArrayToUtf8",value:function(t){var n;if(b().debug(`Converting byte array[${null===(n=t)||void 0===n?void 0:n.length}] to UTF8`),!t||!t.length)return"";t instanceof Uint8Array||(t=new Uint8Array(t));try{var r=new TextDecoder("utf-8",{fatal:!0}).decode(t);return r.length!==t.length&&(_()?self.setOption("attemptHighlight",!1):U()&&(window.app.options.attemptHighlight=!1)),r}catch(n){return e.byteArrayToChars(t)}}},{key:"byteArrayToChars",value:function(e){if(b().debug(`Converting byte array[${null==e?void 0:e.length}] to chars`),!e||!e.length)return"";for(var t="",n=0;n1&&void 0!==arguments[1])||arguments[1];if(b().debug(`Converting array buffer[${null==t?void 0:t.byteLength}] to str`),!t||!t.byteLength)return"";var r=new Uint8Array(t);return n?e.byteArrayToUtf8(r):e.byteArrayToChars(r)}},{key:"calculateShannonEntropy",value:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t,n=[],r=new Array(256).fill(0);for(t=0;t0&&n.push(r[t]/e.length);var i,o=0;for(t=0;t1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],o=!1,a=!1,u="",s=[],c=[];e.length&&"\ufeff"===e[0]&&(e=e.substr(1));for(var l=0;l=0?(s.push(u),u=""):!a&&i.indexOf(t)>=0?(s.push(u),u="",c.push(s),s=[],i.indexOf(n)>=0&&n!==t&&l++):u+=t:a=!0;return s.length&&(s.push(u),c.push(s)),c}},{key:"stripHtmlTags",value:function(e){function t(e,n){var r=n.replace(e,"");return r.length===n.length?r:t(e,r)}return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e=t(/]*>(\s|\S)*?<\/script[^>]*>/gi,e),e=t(/]*>(\s|\S)*?<\/style[^>]*>/gi,e)),t(/<[^>]+>/g,e)}},{key:"escapeHtml",value:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","\0":""};return e?e.replace(/[&<>"'`\u0000]/g,function(e){return t[e]}):e}},{key:"unescapeHtml",value:function(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/","`":"`","":"\0"};return e.replace(/(&#?x?[a-z0-9]{2,4};|\ue000)/gi,function(e){return t[e]||e})}},{key:"toTitleCase",value:function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})}},{key:"encodeURIFragment",value:function(e){var t={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(e=encodeURIComponent(e)).replace(/%[0-9A-F]{2}/g,function(e){return t[e]||e})}},{key:"generatePrettyRecipe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="",r="",i="",o="",a="";return e.forEach(function(e){r=e.op.replace(/ /g,"_"),i=JSON.stringify(e.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),o=e.disabled?"/disabled":"",a=e.breakpoint?"/breakpoint":"",n+=`${r}(${i}${o}${a})`,t&&(n+="\n")}),n}},{key:"parseRecipeConfig",value:function(e){if(0===(e=e.trim()).length)return[];if("["===e[0])return JSON.parse(e);var t,n;e=e.replace(/\n/g,"");for(var r=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];t=r.exec(e);){n="["+(n=t[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var o={op:t[1].replace(/_/g," "),args:JSON.parse(n)};t[3]&&t[3].indexOf("disabled")>0&&(o.disabled=!0),t[3]&&t[3].indexOf("breakpoint")>0&&(o.breakpoint=!0),i.push(o)}return i}},{key:"displayFilesAsHTML",value:(t=m(g().mark(function t(n){var r,i,o,a,u,s;return g().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=function(t){return`
\n
\n
\n ${e.escapeHtml(t.name)}\n
\n
\n
`},i=function(t,n){if(n.startsWith("image")){var r="data:";return r+=n+";",""}return`
${e.escapeHtml(e.arrayBufferToStr(t.buffer))}
`},o=function(){var t=m(g().mark(function t(n,r){var o,a,u,s;return g().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.readFile(n);case 1:return o=t.sent,a=new Blob([o],{type:n.type||"octet/stream"}),u=URL.createObjectURL(a),s=`
\n
\n
\n \n \n ${n.size.toLocaleString()} bytes\n \n save\n \n \n open_in_browser\n \n \n
\n
\n
\n
\n ${i(o,n.type)}\n
\n
\n
`,t.abrupt("return",s);case 2:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}(),a=`
\n ${n.length} file(s) found\n
`,u=0;case 1:if(!(u=e.size)t(i);else{var n=e.slice(o,o+a);r.readAsArrayBuffer(n)}};r.onload=function(e){i.set(new Uint8Array(r.result),o),o+=a,u()},r.onerror=function(e){n(r.error.message)},u()})}},{key:"readFileSync",value:function(e){if(!N())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(e.data).buffer}},{key:"mod",value:function(e,t){return(e%t+t)%t}},{key:"gcd",value:function(t,n){return n?e.gcd(n,t%n):t}},{key:"modInv",value:function(e,t){e%=t;for(var n=1;ne?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e|=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))});const j=function(e){function t(){var e,n,r,i;o(this,t);for(var a=arguments.length,u=new Array(a),s=0;s0||e===t?t:t-1}function Q(e){for(var t,n,r=1,i=e.length,o=e[0]+"";rc^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,a=0;ao[a]^n?1:-1;return s==c?0:s>c^n?1:-1}function te(e,t,n,r){if(en||e!==H(e))throw Error(z+(r||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ne(e){var t=e.c.length-1;return K(e.e/Y)==t&&e.c[t]%2!=0}function re(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function ie(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else tw?p.c=p.e=null:e.e=10;s/=10,u++);return void(u>w?p.c=p.e=null:(p.e=u,p.c=[e]))}f=String(e)}else{if(!$.test(f=String(e)))return i(p,f,c);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(u=f.indexOf("."))>-1&&(f=f.replace(".","")),(s=f.search(/e/i))>0?(u<0&&(u=s),u+=+f.slice(s+1),f=f.substring(0,s)):u<0&&(u=f.length)}else{if(te(t,2,F.length,"Base"),10==t&&E)return T(p=new k(e),d+p.e+1,m);if(f=String(e),c="number"==typeof e){if(0*e!=0)return i(p,f,c,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,k.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(W+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(n=F.slice(0,t),u=s=0,l=f.length;su){u=l;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,s=-1,u=0;continue}return i(p,String(e),c,t)}c=!1,(u=(f=r(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):u=f.length}for(s=0;48===f.charCodeAt(s);s++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(s,++l)){if(l-=s,c&&k.DEBUG&&l>15&&(e>J||e!==H(e)))throw Error(W+p.s*e);if((u=u-s-1)>w)p.c=p.e=null;else if(u=g)?re(s,a):ie(s,a,"0");else if(o=(e=T(new k(e),t,n)).e,u=(s=Q(e.c)).length,1==r||2==r&&(t<=o||o<=v)){for(;ua),s=ie(s,o,"0"),o+1>u){if(--t>0)for(s+=".";t--;s+="0");}else if((t+=o-u)>0)for(o+1==u&&(s+=".");t--;s+="0");return e.s<0&&i?"-"+s:s}function I(e,t){for(var n,r,i=1,o=new k(e[0]);i=10;i/=10,r++);return(n=r+n*Y-1)>w?e.c=e.e=null:n=10;u/=10,i++);if((o=t-i)<0)o+=Y,a=t,s=f[c=0],l=H(s/p[i-a-1]%10);else if((c=G((o+1)/Y))>=f.length){if(!r)break e;for(;f.length<=c;f.push(0));s=l=0,i=1,a=(o%=Y)-Y+1}else{for(s=u=f[c],i=1;u>=10;u/=10,i++);l=(a=(o%=Y)-Y+i)<0?0:H(s/p[i-a-1]%10)}if(r=r||t<0||null!=f[c+1]||(a<0?s:s%p[i-a-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?s/p[i-a]:0:f[c-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=p[(Y-t%Y)%Y],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=c,u=1,c--):(f.length=c+1,u=p[Y-o],f[c]=a>0?H(s/p[i-a]%p[a])*u:0),r)for(;;){if(0==c){for(o=1,a=f[0];a>=10;a/=10,o++);for(a=f[0]+=u,u=1;a>=10;a/=10,u++);o!=u&&(e.e++,f[0]==V&&(f[0]=1));break}if(f[c]+=u,f[c]!=V)break;f[c--]=0,u=1}for(o=f.length;0===f[--o];f.pop());}e.e>w?e.c=e.e=null:e.e=g?re(t,n):ie(t,n,"0"),e.s<0?"-"+t:t)}return k.clone=e,k.ROUND_UP=0,k.ROUND_DOWN=1,k.ROUND_CEIL=2,k.ROUND_FLOOR=3,k.ROUND_HALF_UP=4,k.ROUND_HALF_DOWN=5,k.ROUND_HALF_EVEN=6,k.ROUND_HALF_CEIL=7,k.ROUND_HALF_FLOOR=8,k.EUCLID=9,k.config=k.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(z+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(te(n=e[t],0,X,t),d=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(te(n=e[t],0,8,t),m=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(te(n[0],-X,0,t),te(n[1],0,X,t),v=n[0],g=n[1]):(te(n,-X,X,t),v=-(g=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)te(n[0],-X,-1,t),te(n[1],1,X,t),y=n[0],w=n[1];else{if(te(n,-X,X,t),!n)throw Error(z+t+" cannot be zero: "+n);y=-(w=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(z+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw b=!n,Error(z+"crypto unavailable");b=n}else b=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(te(n=e[t],0,9,t),x=n),e.hasOwnProperty(t="POW_PRECISION")&&(te(n=e[t],0,X,t),B=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(z+t+" not an object: "+n);A=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(z+t+" invalid: "+n);E="0123456789"==n.slice(0,10),F=n}}return{DECIMAL_PLACES:d,ROUNDING_MODE:m,EXPONENTIAL_AT:[v,g],RANGE:[y,w],CRYPTO:b,MODULO_MODE:x,POW_PRECISION:B,FORMAT:A,ALPHABET:F}},k.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!k.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-X&&i<=X&&i===H(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%Y)<1&&(t+=Y),String(r[0]).length==t){for(t=0;t=V||n!==H(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(z+"Invalid BigNumber: "+e)},k.maximum=k.max=function(){return I(arguments,-1)},k.minimum=k.min=function(){return I(arguments,1)},k.random=(o=9007199254740992,a=Math.random()*o&2097151?function(){return H(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,o,u=0,s=[],c=new k(h);if(null==e?e=d:te(e,0,X),i=G(e/Y),b)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));u>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(s.push(o%1e14),u+=2);u=i/2}else{if(!crypto.randomBytes)throw b=!1,Error(z+"crypto unavailable");for(t=crypto.randomBytes(i*=7);u=9e15?crypto.randomBytes(7).copy(t,u):(s.push(o%1e14),u+=7);u=i/7}if(!b)for(;u=10;o/=10,u++);un-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,o,a,u){var s,c,l,f,p,h,v,g,y=r.indexOf("."),w=d,b=m;for(y>=0&&(f=B,B=0,r=r.replace(".",""),h=(g=new k(i)).pow(r.length-y),B=f,g.c=t(ie(Q(h.c),h.e,"0"),10,o,e),g.e=g.c.length),l=f=(v=t(r,i,o,u?(s=F,e):(s=e,F))).length;0==v[--f];v.pop());if(!v[0])return s.charAt(0);if(y<0?--l:(h.c=v,h.e=l,h.s=a,v=(h=n(h,g,w,b,o)).c,p=h.r,l=h.e),y=v[c=l+w+1],f=o/2,p=p||c<0||null!=v[c+1],p=b<4?(null!=y||p)&&(0==b||b==(h.s<0?3:2)):y>f||y==f&&(4==b||p||6==b&&1&v[c-1]||b==(h.s<0?8:7)),c<1||!v[0])r=p?ie(s.charAt(1),-w,s.charAt(0)):s.charAt(0);else{if(v.length=c,p)for(--o;++v[--c]>o;)v[c]=0,c||(++l,v=[1].concat(v));for(f=v.length;!v[--f];);for(y=0,r="";y<=f;r+=s.charAt(v[y++]));r=ie(r,l,s.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,o,a,u=0,s=e.length,c=t%Z,l=t/Z|0;for(e=e.slice();s--;)u=((i=c*(o=e[s]%Z)+(r=l*o+(a=e[s]/Z|0)*c)%Z*Z+u)/n|0)+(r/Z|0)+l*a,e[s]=i%n;return u&&(e=[u].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.splice(0,1));}return function(r,i,o,a,u){var s,c,l,f,p,h,d,m,v,g,y,w,b,x,B,A,F,E=r.s==i.s?1:-1,C=r.c,I=i.c;if(!(C&&C[0]&&I&&I[0]))return new k(r.s&&i.s&&(C?!I||C[0]!=I[0]:I)?C&&0==C[0]||!I?0*E:E/0:NaN);for(v=(m=new k(E)).c=[],E=o+(c=r.e-i.e)+1,u||(u=V,c=K(r.e/Y)-K(i.e/Y),E=E/Y|0),l=0;I[l]==(C[l]||0);l++);if(I[l]>(C[l]||0)&&c--,E<0)v.push(1),f=!0;else{for(x=C.length,A=I.length,l=0,E+=2,(p=H(u/(I[0]+1)))>1&&(I=e(I,p,u),C=e(C,p,u),A=I.length,x=C.length),b=A,y=(g=C.slice(0,A)).length;y=u/2&&B++;do{if(p=0,(s=t(I,g,A,y))<0){if(w=g[0],A!=y&&(w=w*u+(g[1]||0)),(p=H(w/B))>1)for(p>=u&&(p=u-1),d=(h=e(I,p,u)).length,y=g.length;1==t(h,g,d,y);)p--,n(h,A=10;E/=10,l++);T(m,o+(m.e=l+c*Y-1)+1,a,f)}else m.e=c,m.r=+f;return m}}(),u=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,f=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,o=n?t:t.replace(f,"");if(l.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(u,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,o=o.replace(s,"$1").replace(c,"0.$1")),t!=o))return new k(o,i);if(k.DEBUG)throw Error(z+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},p.absoluteValue=p.abs=function(){var e=new k(this);return e.s<0&&(e.s=1),e},p.comparedTo=function(e,t){return ee(this,new k(e,t))},p.decimalPlaces=p.dp=function(e,t){var n,r,i,o=this;if(null!=e)return te(e,0,X),null==t?t=m:te(t,0,8),T(new k(o),e+o.e+1,t);if(!(n=o.c))return null;if(r=((i=n.length-1)-K(this.e/Y))*Y,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},p.dividedBy=p.div=function(e,t){return n(this,new k(e,t),d,m)},p.dividedToIntegerBy=p.idiv=function(e,t){return n(this,new k(e,t),0,1)},p.exponentiatedBy=p.pow=function(e,t){var n,r,i,o,a,u,s,c,l=this;if((e=new k(e)).c&&!e.isInteger())throw Error(z+"Exponent not an integer: "+O(e));if(null!=t&&(t=new k(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return c=new k(Math.pow(+O(l),a?e.s*(2-ne(e)):+O(e))),t?c.mod(t):c;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new k(NaN);(r=!u&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]<8e13||a&&l.c[0]<=9999975e7)))return o=l.s<0&&ne(e)?-0:0,l.e>-1&&(o=1/o),new k(u?1/o:o);B&&(o=G(B/Y+2))}for(a?(n=new k(.5),u&&(e.s=1),s=ne(e)):s=(i=Math.abs(+O(e)))%2,c=new k(h);;){if(s){if(!(c=c.times(l)).c)break;o?c.c.length>o&&(c.c.length=o):r&&(c=c.mod(t))}if(i){if(0===(i=H(i/2)))break;s=i%2}else if(T(e=e.times(n),e.e+1,1),e.e>14)s=ne(e);else{if(0===(i=+O(e)))break;s=i%2}l=l.times(l),o?l.c&&l.c.length>o&&(l.c.length=o):r&&(l=l.mod(t))}return r?c:(u&&(c=h.div(c)),t?c.mod(t):o?T(c,B,m,void 0):c)},p.integerValue=function(e){var t=new k(this);return null==e?e=m:te(e,0,8),T(t,t.e+1,e)},p.isEqualTo=p.eq=function(e,t){return 0===ee(this,new k(e,t))},p.isFinite=function(){return!!this.c},p.isGreaterThan=p.gt=function(e,t){return ee(this,new k(e,t))>0},p.isGreaterThanOrEqualTo=p.gte=function(e,t){return 1===(t=ee(this,new k(e,t)))||0===t},p.isInteger=function(){return!!this.c&&K(this.e/Y)>this.c.length-2},p.isLessThan=p.lt=function(e,t){return ee(this,new k(e,t))<0},p.isLessThanOrEqualTo=p.lte=function(e,t){return-1===(t=ee(this,new k(e,t)))||0===t},p.isNaN=function(){return!this.s},p.isNegative=function(){return this.s<0},p.isPositive=function(){return this.s>0},p.isZero=function(){return!!this.c&&0==this.c[0]},p.minus=function(e,t){var n,r,i,o,a=this,u=a.s;if(t=(e=new k(e,t)).s,!u||!t)return new k(NaN);if(u!=t)return e.s=-t,a.plus(e);var s=a.e/Y,c=e.e/Y,l=a.c,f=e.c;if(!s||!c){if(!l||!f)return l?(e.s=-t,e):new k(f?a:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new k(l[0]?a:3==m?-0:0)}if(s=K(s),c=K(c),l=l.slice(),u=s-c){for((o=u<0)?(u=-u,i=l):(c=s,i=f),i.reverse(),t=u;t--;i.push(0));i.reverse()}else for(r=(o=(u=l.length)<(t=f.length))?u:t,u=t=0;t0)for(;t--;l[n++]=0);for(t=V-1;r>u;){if(l[--r]=0;){for(n=0,p=w[i]%v,h=w[i]/v|0,o=i+(a=s);o>i;)n=((c=p*(c=y[--a]%v)+(u=h*c+(l=y[a]/v|0)*p)%v*v+d[o]+n)/m|0)+(u/v|0)+h*l,d[o--]=c%m;d[o]=n}return n?++r:d.splice(0,1),S(e,d,r)},p.negated=function(){var e=new k(this);return e.s=-e.s||null,e},p.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new k(e,t)).s,!i||!t)return new k(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/Y,a=e.e/Y,u=r.c,s=e.c;if(!o||!a){if(!u||!s)return new k(i/0);if(!u[0]||!s[0])return s[0]?e:new k(u[0]?r:0*i)}if(o=K(o),a=K(a),u=u.slice(),i=o-a){for(i>0?(a=o,n=s):(i=-i,n=u),n.reverse();i--;n.push(0));n.reverse()}for((i=u.length)-(t=s.length)<0&&(n=s,s=u,u=n,t=i),i=0;t;)i=(u[--t]=u[t]+s[t]+i)/V|0,u[t]=V===u[t]?0:u[t]%V;return i&&(u=[i].concat(u),++a),S(e,u,a)},p.precision=p.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return te(e,1,X),null==t?t=m:te(t,0,8),T(new k(o),e,t);if(!(n=o.c))return null;if(r=(i=n.length-1)*Y+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},p.shiftedBy=function(e){return te(e,-9007199254740991,J),this.times("1e"+e)},p.squareRoot=p.sqrt=function(){var e,t,r,i,o,a=this,u=a.c,s=a.s,c=a.e,l=d+4,f=new k("0.5");if(1!==s||!u||!u[0])return new k(!s||s<0&&(!u||u[0])?NaN:u?a:1/0);if(0==(s=Math.sqrt(+O(a)))||s==1/0?(((t=Q(u)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=K((c+1)/2)-(c<0||c%2),r=new k(t=s==1/0?"5e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):r=new k(s+""),r.c[0])for((s=(c=r.e)+l)<3&&(s=0);;)if(o=r,r=f.times(o.plus(n(a,o,l,1))),Q(o.c).slice(0,s)===(t=Q(r.c)).slice(0,s)){if(r.e0&&d>0){for(o=d%u||u,l=h.substr(0,o);o0&&(l+=c+h.slice(o)),p&&(l="-"+l)}r=f?l+(n.decimalSeparator||"")+((s=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):l}return(n.prefix||"")+r+(n.suffix||"")},p.toFraction=function(e){var t,r,i,o,a,u,s,c,l,f,p,d,v=this,g=v.c;if(null!=e&&(!(s=new k(e)).isInteger()&&(s.c||1!==s.s)||s.lt(h)))throw Error(z+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+O(s));if(!g)return new k(v);for(t=new k(h),l=r=new k(h),i=c=new k(h),d=Q(g),a=t.e=d.length-v.e-1,t.c[0]=q[(u=a%Y)<0?Y+u:u],e=!e||s.comparedTo(t)>0?a>0?t:l:s,u=w,w=1/0,s=new k(d),c.c[0]=0;f=n(s,t,0,1),1!=(o=r.plus(f.times(i))).comparedTo(e);)r=i,i=o,l=c.plus(f.times(o=l)),c=o,t=s.minus(f.times(o=t)),s=o;return o=n(e.minus(r),i,0,1),c=c.plus(o.times(l)),r=r.plus(o.times(i)),c.s=l.s=v.s,p=n(l,i,a*=2,m).minus(v).abs().comparedTo(n(c,r,a,m).minus(v).abs())<1?[l,i]:[c,r],w=u,p},p.toNumber=function(){return+O(this)},p.toPrecision=function(e,t){return null!=e&&te(e,1,X),C(this,e,t,2)},p.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=v||o>=g?re(Q(n.c),o):ie(Q(n.c),o,"0"):10===e&&E?t=ie(Q((n=T(new k(n),d+o+1,m)).c),n.e,"0"):(te(e,2,F.length,"Base"),t=r(ie(Q(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},p.valueOf=p.toJSON=function(){return O(this)},p._isBigNumber=!0,p[Symbol.toStringTag]="BigNumber",p[Symbol.for("nodejs.util.inspect.custom")]=p.valueOf,null!=t&&k.set(t),k}();const ae=oe;var ue=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;o(this,e),this.bytes=t,this.length=this.bytes.length,this.position=n,this.bitPos=r}return c(e,[{key:"clone",value:function(){return new e(this.bytes,this.position,this.bitPos)}},{key:"getBytes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.position>this.length)){var t=null!==e?this.position+e:this.length,n=this.bytes.slice(this.position,t);return this.position=t,this.bitPos=0,n}}},{key:"readString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(this.position>this.length)){-1===e&&(e=this.length-this.position);for(var t="",n=this.position;n1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var n=0;if("be"===t)for(var r=this.position;r=this.position;i--)n<<=8,n|=this.bytes[i];return this.position+=e,this.bitPos=0,n}}},{key:"readBits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var n,r=0,i=0;for(r=this.bytes[this.position++]&(n=this.bitPos,"be"===t?(1<<8-n)-1:256-(1<>>=this.bitPos),i=8-this.bitPos,this.bitPos=0;ie){var o=i-e;"be"===t?r>>>=o:r&=(1<this.length))if(this.bitPos=0,"number"!=typeof e){var t=e.length,n=e[t-1];this.position=t;for(var r,i=function(e,t){var n=new Array;return e.forEach(function(e,r){n[e]=t-r}),n}(e,t);this.position=0;o--)if(this.bytes[this.position-t+o]!==e[o]){r=!1,this.position+=i[e[o]];break}if(r){this.position-=t;break}}}else for(;++this.positionthis.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsBy",value:function(e){var t=this.position-e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(e){if(e<=this.bitPos)this.bitPos-=e;else for(this.bitPos>0&&(e-=this.bitPos,this.bitPos=0);e>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(e),e-=8}},{key:"moveTo",value:function(e){if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"hasMore",value:function(){return this.position0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position;return this.bitPos>0&&t++,this.bytes.slice(e,t)}}])}();function se(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ce(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n>4],s=i[(15&a)>>2],c=(2&a)>>1;if("free"===u||"bad"===u||"reserved"===s){n.moveBackwardsBy(1);break}var l=Math.floor(144*u/s+c);if(n.position+l>n.length){n.moveTo(n.length);break}n.moveForwardsBy(l-3)}return n.carve()}},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(e,t){var n=new ue(e.slice(t));return n.continueUntil([37,37,69,79,70]),n.moveForwardsBy(5),n.consumeIf(13),n.consumeIf(10),n.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(e,t){var n=new ue(e.slice(t)),r=0;if(123!==n.readInt(1))throw new Error("Not a valid RTF file");for(r++;r>0&&n.hasMore();)switch(n.readInt(1)){case 123:r++;break;case 125:r--;break;case 92:n.consumeIf(92),n.position++}return n.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:fe},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:fe}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(e,t){var n=new ue(e.slice(t));n.moveTo(60);var r=n.readInt(4,"le");n.moveTo(r),n.moveForwardsBy(6);var i=n.readInt(2,"le");n.moveForwardsBy(16);var o=523===n.readInt(2,"le")?112:96;n.moveForwardsBy(o-2),n.moveForwardsBy(32);var a=n.readInt(4,"le"),u=n.readInt(4,"le");if(a>0)return n.moveTo(a+u),n.carve();n.moveForwardsBy(88),n.moveForwardsBy(40*(i-1)),n.moveForwardsBy(16);var s=n.readInt(4,"le"),c=n.readInt(4,"le");return n.moveTo(c+s),n.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(e,t){var n=new ue(e.slice(t));n.moveForwardsBy(4);var r=1===n.readInt(1),i=1===n.readInt(1)?"le":"be";n.moveForwardsBy(r?26:34);var o=r?n.readInt(4,i):n.readInt(8,i);n.moveForwardsBy(10);var a=n.readInt(2,i),u=n.readInt(2,i);return n.moveTo(o),n.moveForwardsBy(a*u),n.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:pe},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:pe},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:fe},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(e,t){for(var n=new ue(e.slice(t)),r=function(){if(n.moveForwardsBy(257),n.getBytes(5).join("")!==[117,115,116,97,114].join(""))return n.moveBackwardsBy(262),1;n.moveBackwardsBy(138);var e=0;n.getBytes(11).forEach(function(t,n){e+=(t-48).toString()}),e=512*Math.ceil(parseInt(e,8)/512),n.moveForwardsBy(e+377)};n.hasMore()&&!r(););return n.consumeWhile(0),n.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(e,t){var n=new ue(e.slice(t));n.moveForwardsBy(3);var r=n.readInt(1);if(n.moveForwardsBy(4),n.readInt(1),n.moveForwardsBy(1),4&r){var i=n.readInt(2,"le");n.moveForwardsby(i)}return 8&r&&(n.continueUntil(0),n.moveForwardsBy(1)),16&r&&(n.continueUntil(0),n.moveForwardsBy(1)),2&r&&n.moveForwardsBy(2),ye(n),n.moveForwardsBy(8),n.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(e,t){for(var n=new ue(e.slice(t)),r=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i=2368&&n.moveForwardsBy(4);var u=n.readInt(1,"be");if(n.moveForwardsBy(u),64&a){var s=n.readInt(4,"be");n.moveForwardsBy(s)}for(n.moveForwardsBy(4);n.hasMore();){var c=n.readInt(4,"be");if(0===c)break;var l=n.readInt(4,"be"),f=c===l?i:i+r;n.moveForwardsBy(l+4*f)}return n.carve()}},{name:"Linux deb package",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:function(e,t){var n=new ue(e.slice(t));for(n.moveForwardsBy(8);n.hasMore();){n.moveForwardsBy(48);var r,i="",o=se(n.getBytes(10));try{for(o.s();!(r=o.n()).done;){var a=r.value;i+=String.fromCharCode(a)}}catch(e){o.e(e)}finally{o.f()}i=parseInt(i.trim(),10),n.moveForwardsBy(2),n.moveForwardsBy(i)}return n.carve()}},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(e,t){var n=new ue(e.slice(t));n.moveTo(16);var r=n.readInt(2);n.moveTo(28);var i=n.readInt(4);return n.moveTo(r*i),n.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(e,t){var n=new ue(e.slice(t));n.moveTo(20);var r=n.readInt(4,"le");n.moveTo(r);var i=n.readInt(4,"le");return n.moveForwardsBy(i-4),n.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(e,t){var n=new ue(e.slice(t));n.moveTo(40);var r=n.readInt(4,"le")-44;for(n.moveForwardsBy(r);n.hasMore()&&n.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)n.moveForwardsBy(65529);return n.consumeWhile(0),n.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:function(e,t){var n=new ue(e.slice(t));return n.moveTo(112),n.moveTo(4096*(n.readInt(4,"le")+1)),n.carve()}},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:function(e,t){var n=new ue(e.slice(t));return n.moveTo(12),n.moveTo(n.readInt(4,"be")),n.carve()}},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:function(e,t){var n=new ue(e.slice(t));return n.moveTo(n.readInt(4,"be")),n.carve()}},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(e,t){var n=new ue(e.slice(t)),r=0;for(n.continueUntil([60,112,108,105,115,116]),n.moveForwardsBy(6),r++;r>0&&n.hasMore();)60===n.readInt(1)&&(n.getBytes(5).join("")===[112,108,105,115,116].join("")?r++:n.moveBackwardsBy(5),n.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?r--:n.moveBackwardsBy(7));return n.consumeIf(10),n.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:function(e,t){var n=new ue(e.slice(t));return n.moveTo(20),n.moveForwardsBy(n.readInt(4)),n.carve()}},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(e){return e>=1&&e<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(e){return e>=1&&e<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(e){return 0!==e},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4},{0:149,1:5,2:134,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:function(e,t){var n=new ue(e.slice(t));return n.moveTo(52),n.moveTo(n.readInt(4,"le")),n.carve()}},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function fe(e,t){var n=new ue(e.slice(t));n.continueUntil([80,75,5,6]),n.moveForwardsBy(20);var r=n.readInt(2,"le");return n.moveForwardsBy(r),n.carve()}function pe(e,t){var n="207250237254",r=new ue(e.slice(t)),i=r.getBytes(4).join("");return r.moveTo(function(e,t,n){var r=28;t&&(r+=4),e.moveTo(16);var i=e.readInt(4,n);return function(e,t,n,r){for(var i=0,o=0;o0&&e.moveForwardsBy(1)}var we=[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,0,0],be=[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];function xe(e,t,n){for(var r,i=0;(r=Ae(e,t))&&256!==r;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");r<256||(e.readBits(we[r-257],"le"),r=Ae(e,n),e.readBits(be[r],"le"))}}function Be(e){for(var t=Math.max.apply(Math,e),n=Math.min.apply(Math,e),r=1<>=1;for(var p=o<<16|s,h=c;h>>16;if(u>o)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${e.position}: ${u}`);return e.moveBackwardsByBits(o-u),65535&a}function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.length){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0;for(var r in e){var i=parseInt(r,10)+n;switch(typeof e[r]){case"number":if(t[i]!==e[r])return!1;break;case"object":if(e[r].indexOf(t[i])<0)return!1;break;case"function":if(!e[r](t[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${r}`)}}return!0}const ke=function(){return c(function e(){o(this,e)},null,[{key:"checkForValue",value:function(e){if(void 0===e)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){throw new Error("fromArrayBuffer has not been implemented")}}])}();function Ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ce=function(){return!!e})()}const Ie=function(e){function t(){return o(this,t),e=this,r=arguments,n=f(n=t),l(e,Ce()?Reflect.construct(n,r||[],f(e).constructor):n.apply(e,r));var e,n,r}return h(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}])}(ke);function Se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Se=function(){return!!e})()}const Te=function(e){function t(){return o(this,t),e=this,r=arguments,n=f(n=t),l(e,Se()?Reflect.construct(n,r||[],f(e).constructor):n.apply(e,r));var e,n,r}return h(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=ae.isBigNumber(this.value)?P.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value);try{this.value=new ae(P.arrayBufferToStr(this.value))}catch(e){this.value=new ae(NaN)}}}])}(ke);function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oe=function(){return!!e})()}const Le=function(e){function t(){return o(this,t),e=this,r=arguments,n=f(n=t),l(e,Oe()?Reflect.construct(n,r||[],f(e).constructor):n.apply(e,r));var e,n,r}return h(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){var e=this;if(t.checkForValue(this.value),!N())return new Promise(function(t,n){P.readFile(e.value).then(function(t){return e.value=t.buffer}).then(t).catch(n)});this.value=P.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new File(this.value,"unknown")}}])}(ke);function Re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Re=function(){return!!e})()}const De=function(e){function t(){return o(this,t),e=this,r=arguments,n=f(n=t),l(e,Re()?Reflect.construct(n,r||[],f(e).constructor):n.apply(e,r));var e,n,r}return h(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?P.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?P.arrayBufferToStr(this.value):""}}])}(ke);function Ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ne=function(){return!!e})()}const Ue=function(e){function t(){return o(this,t),e=this,r=arguments,n=f(n=t),l(e,Ne()?Reflect.construct(n,r||[],f(e).constructor):n.apply(e,r));var e,n,r}return h(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?P.strToArrayBuffer(P.unescapeHtml(P.stripHtmlTags(this.value,!0))):new ArrayBuffer}}])}(De);function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_e=function(){return!!e})()}const Pe=function(e){function t(){return o(this,t),e=this,r=arguments,n=f(n=t),l(e,_e()?Reflect.construct(n,r||[],f(e).constructor):n.apply(e,r));var e,n,r}return h(t,e),c(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=void 0!==this.value?P.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=JSON.parse(P.arrayBufferToStr(this.value))}}])}(ke);function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Me=function(){return!!e})()}const je=function(e){function t(){return o(this,t),e=this,r=arguments,n=f(n=t),l(e,Me()?Reflect.construct(n,r||[],f(e).constructor):n.apply(e,r));var e,n,r}return h(t,e),c(t,null,[{key:"toArrayBuffer",value:(r=m(g().mark(function e(){return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.checkForValue(this.value),!N()){e.next=1;break}this.value=this.value.map(function(e){return Uint8Array.from(e.data)}),e.next=3;break;case 1:return e.next=2,t.concatenateTypedArraysWithTypedElements.apply(t,y(this.value));case 2:this.value=e.sent;case 3:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:(n=m(g().mark(function e(){var t,n,r,i,o,a,u,s,c,l,f,p,h,d=arguments;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=0,n=d.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(o(this,e),this.value=new ArrayBuffer(0),this.type=e.ARRAY_BUFFER,t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"type"))this.set(t.value,t.type);else if(t&&null!==n)this.set(t,n);else if(t){var r=e.typeEnum(t.constructor.name);this.set(t,r)}}return c(e,[{key:"get",value:function(t){var n=this;return"string"==typeof t&&(t=e.typeEnum(t)),this.type!==t?N()?(this._translate(t),this.value):new Promise(function(e,r){n._translate(t).then(function(){e(n.value)}).catch(r)}):this.value}},{key:"set",value:function(t,n){if("string"==typeof n&&(n=e.typeEnum(n)),b().debug("Dish type: "+e.enumLookup(n)),this.value=t,this.type=n,!this.valid()){var r=P.truncate(JSON.stringify(this.value),25);throw new j(`Data is not a valid ${e.enumLookup(n)}: ${r}`)}}},{key:"presentAs",value:function(e){return this.clone().get(e)}},{key:"detectDishType",value:function(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(le);if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e&&e.length>1))return[];var n=[],r={};for(var i in le)t.includes(i)&&(r[i]=le[i]);for(var o in r)r[o].forEach(function(t){Fe(t.signature,e)&&n.push(t)});return n}(new Uint8Array(this.value.slice(0,2048)));return e.length&&e[0].mime&&"text/plain"===e[0].mime?e[0].mime:null}},{key:"getTitle",value:(t=m(g().mark(function t(n){var r,i,o,a;return g().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r="",o=this.type,t.next=o===e.FILE?1:o===e.LIST_FILE?2:o===e.JSON?3:o===e.NUMBER||o===e.BIG_NUMBER?4:o===e.ARRAY_BUFFER||o===e.BYTE_ARRAY?5:6;break;case 1:return r=this.value.name,t.abrupt("continue",9);case 2:return r=`${this.value.length} file(s)`,t.abrupt("continue",9);case 3:return r="application/json",t.abrupt("continue",9);case 4:return r=this.value.toString(),t.abrupt("continue",9);case 5:if(null===(r=this.detectDishType())){t.next=6;break}return t.abrupt("continue",9);case 6:return t.prev=6,(i=this.clone()).value=i.value.slice(0,256),t.next=7,i.get(e.STRING);case 7:r=t.sent,t.next=9;break;case 8:t.prev=8,a=t.catch(6),b().error(`${e.enumLookup(this.type)} cannot be sliced. ${a}`);case 9:return t.abrupt("return",r.slice(0,n));case 10:case"end":return t.stop()}},t,this,[[6,8]])})),function(e){return t.apply(this,arguments)})},{key:"valid",value:function(){switch(this.type){case e.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var t=0;t255)return!1;return!0;case e.STRING:case e.HTML:return"string"==typeof this.value;case e.NUMBER:return"number"==typeof this.value;case e.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case e.BIG_NUMBER:if(ae.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var n=new ae;return n.c=this.value.c,n.e=this.value.e,n.s=this.value.s,this.value=n,!0}return!1;case e.JSON:return!0;case e.FILE:return this.value instanceof File;case e.LIST_FILE:return this.value instanceof Array&&this.value.reduce(function(e,t){return e&&t instanceof File},!0);default:return!1}}},{key:"size",get:function(){switch(this.type){case e.BYTE_ARRAY:case e.STRING:case e.HTML:return this.value.length;case e.NUMBER:case e.BIG_NUMBER:return this.value.toString().length;case e.ARRAY_BUFFER:return this.value.byteLength;case e.JSON:return JSON.stringify(this.value).length;case e.FILE:return this.value.size;case e.LIST_FILE:return this.value.reduce(function(e,t){return e+t.size},0);default:return-1}}},{key:"clone",value:function(){var t=new e;switch(this.type){case e.STRING:case e.HTML:case e.NUMBER:case e.BIG_NUMBER:t.set(this.value,this.type);break;case e.BYTE_ARRAY:case e.JSON:t.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case e.ARRAY_BUFFER:t.set(this.value.slice(0),this.type);break;case e.FILE:t.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case e.LIST_FILE:t.set(this.value.map(function(e){return new File([e],e.name,{type:e.type,lastModified:e.lastModified})}),this.type);break;default:throw new j("Cannot clone Dish, unknown type")}return t}},{key:"_translate",value:function(t){var n=this;if(b().debug(`Translating Dish from ${e.enumLookup(this.type)} to ${e.enumLookup(t)}`),!N())return new Promise(function(r,i){n._toArrayBuffer().then(function(){return n.type=e.ARRAY_BUFFER}).then(function(){n._fromArrayBuffer(t),r()}).catch(i)});this._toArrayBuffer(),this.type=e.ARRAY_BUFFER,this._fromArrayBuffer(t)}},{key:"_toArrayBuffer",value:function(){var t=this,n={browser:{[e.STRING]:function(){return Promise.resolve(De.toArrayBuffer.bind(t)())},[e.NUMBER]:function(){return Promise.resolve(Ge.toArrayBuffer.bind(t)())},[e.HTML]:function(){return Promise.resolve(Ue.toArrayBuffer.bind(t)())},[e.ARRAY_BUFFER]:function(){return Promise.resolve()},[e.BIG_NUMBER]:function(){return Promise.resolve(Te.toArrayBuffer.bind(t)())},[e.JSON]:function(){return Promise.resolve(Pe.toArrayBuffer.bind(t)())},[e.FILE]:function(){return Le.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return Promise.resolve(je.toArrayBuffer.bind(t)())},[e.BYTE_ARRAY]:function(){return Promise.resolve(Ie.toArrayBuffer.bind(t)())}},node:{[e.STRING]:function(){return De.toArrayBuffer.bind(t)()},[e.NUMBER]:function(){return Ge.toArrayBuffer.bind(t)()},[e.HTML]:function(){return Ue.toArrayBuffer.bind(t)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return Te.toArrayBuffer.bind(t)()},[e.JSON]:function(){return Pe.toArrayBuffer.bind(t)()},[e.FILE]:function(){return Le.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return je.toArrayBuffer.bind(t)()},[e.BYTE_ARRAY]:function(){return Ie.toArrayBuffer.bind(t)()}}};try{return n[N()?"node":"browser"][this.type]()}catch(t){throw new j(`Error translating from ${e.enumLookup(this.type)} to ArrayBuffer: ${t}`)}}},{key:"_fromArrayBuffer",value:function(t){var n=this,r={[e.STRING]:function(){return De.fromArrayBuffer.bind(n)()},[e.NUMBER]:function(){return Ge.fromArrayBuffer.bind(n)()},[e.HTML]:function(){return Ue.fromArrayBuffer.bind(n)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return Te.fromArrayBuffer.bind(n)()},[e.JSON]:function(){return Pe.fromArrayBuffer.bind(n)()},[e.FILE]:function(){return Le.fromArrayBuffer.bind(n)()},[e.LIST_FILE]:function(){return je.fromArrayBuffer.bind(n)()},[e.BYTE_ARRAY]:function(){return Ie.fromArrayBuffer.bind(n)()}};try{r[t](),this.type=t}catch(n){throw new j(`Error translating from ArrayBuffer to ${e.enumLookup(t)}: ${n}`)}}}],[{key:"typeEnum",value:function(t){switch(t.toLowerCase()){case"bytearray":case"byte array":return e.BYTE_ARRAY;case"string":return e.STRING;case"number":return e.NUMBER;case"html":return e.HTML;case"arraybuffer":case"array buffer":return e.ARRAY_BUFFER;case"bignumber":case"big number":return e.BIG_NUMBER;case"json":case"object":return e.JSON;case"file":return e.FILE;case"list":return e.LIST_FILE;default:throw new j("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(t){switch(t){case e.BYTE_ARRAY:return"byteArray";case e.STRING:return"string";case e.NUMBER:return"number";case e.HTML:return"html";case e.ARRAY_BUFFER:return"ArrayBuffer";case e.BIG_NUMBER:return"BigNumber";case e.JSON:return"JSON";case e.FILE:return"File";case e.LIST_FILE:return"List";default:throw new j("Invalid data type enum. No matching type.")}}}]);var t}();He.BYTE_ARRAY=0,He.STRING=1,He.NUMBER=2,He.HTML=3,He.ARRAY_BUFFER=4,He.BIG_NUMBER=5,He.JSON=6,He.FILE=7,He.LIST_FILE=8;const ze=He,We=function(){function e(t){o(this,e),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,this.maxLength=null,this.min=null,this.max=null,this.step=1,t&&this._parseConfig(t)}return c(e,[{key:"_parseConfig",value:function(e){this.name=e.name,this.type=e.type,this.defaultValue=e.value,this.disabled=!!e.disabled,this.hint=e.hint||!1,this.rows=e.rows||!1,this.toggleValues=e.toggleValues,this.target=void 0!==e.target?e.target:null,this.defaultIndex=void 0!==e.defaultIndex?e.defaultIndex:0,this.maxLength=e.maxLength||null,this.min=e.min,this.max=e.max,this.step=e.step}},{key:"config",get:function(){return this._value}},{key:"value",get:function(){return this._value},set:function(t){this._value=e.prepare(t,this.type)}}],[{key:"prepare",value:function(e,t){var n;switch(t){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return P.parseEscapedChars(e);case"byteArray":return"string"==typeof e?S(e=e.replace(/\s+/g,"")):e;case"number":if(null===e)return e;if(n=parseFloat(e),isNaN(n))throw"Invalid ingredient value. Not a number: "+P.truncate(e.toString(),10);return n;default:return e}}}])}();var Ve=function(){return c(function e(){o(this,e),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null},[{key:"run",value:function(e,t){return e}},{key:"highlight",value:function(e,t){return!1}},{key:"highlightReverse",value:function(e,t){return!1}},{key:"present",value:function(e,t){return e}},{key:"inputType",get:function(){return ze.enumLookup(this._inputType)},set:function(e){this._inputType=ze.typeEnum(e)}},{key:"outputType",get:function(){return ze.enumLookup(this._outputType)},set:function(e){this._outputType=ze.typeEnum(e),this._presentType<0&&(this._presentType=this._outputType)}},{key:"presentType",get:function(){return ze.enumLookup(this._presentType)},set:function(e){this._presentType=ze.typeEnum(e)}},{key:"args",get:function(){return this._ingList.map(function(e){var t={name:e.name,type:e.type,value:e.defaultValue};return e.toggleValues&&(t.toggleValues=e.toggleValues),e.hint&&(t.hint=e.hint),e.rows&&(t.rows=e.rows),e.disabled&&(t.disabled=e.disabled),e.target&&(t.target=e.target),e.defaultIndex&&(t.defaultIndex=e.defaultIndex),e.maxLength&&(t.maxLength=e.maxLength),"number"==typeof e.min&&(t.min=e.min),"number"==typeof e.max&&(t.max=e.max),e.step&&(t.step=e.step),t})},set:function(e){var t=this;e.forEach(function(e){var n=new We(e);t.addIngredient(n)})}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map(function(e){return e.config})}}},{key:"addIngredient",value:function(e){this._ingList.push(e)}},{key:"ingValues",get:function(){return this._ingList.map(function(e){return e.value})},set:function(e){var t=this;e.forEach(function(e,n){t._ingList[n].value=e})}},{key:"breakpoint",get:function(){return this._breakpoint},set:function(e){this._breakpoint=!!e}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=!!e}},{key:"flowControl",get:function(){return this._flowControl},set:function(e){this._flowControl=!!e}},{key:"manualBake",get:function(){return this._manualBake},set:function(e){this._manualBake=!!e}}])}();const Ye=Ve;function Je(){}function qe(e,t,n,r,i){for(var o,a=[];t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var u=0,s=a.length,c=0,l=0;ue.length?n:e}),f.value=e.join(h)}else f.value=e.join(n.slice(c,c+f.count));c+=f.count,f.added||(l+=f.count)}}var d=a[s-1];return s>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(a[s-2].value+=d.value,a.pop()),a}Je.prototype={diff:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.callback;"function"==typeof r&&(i=r,r={}),this.options=r;var o=this;function a(e){return i?(setTimeout(function(){i(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var u=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,c=1,l=u+s;r.maxEditLength&&(l=Math.min(l,r.maxEditLength));var f=null!==(n=r.timeout)&&void 0!==n?n:1/0,p=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}],d=this.extractCommon(h[0],t,e,0);if(h[0].oldPos+1>=s&&d+1>=u)return a([{value:this.join(t),count:t.length}]);var m=-1/0,v=1/0;function g(){for(var n=Math.max(m,-c);n<=Math.min(v,c);n+=2){var r=void 0,i=h[n-1],l=h[n+1];i&&(h[n-1]=void 0);var f=!1;if(l){var p=l.oldPos-n;f=l&&0<=p&&p=s&&d+1>=u)return a(qe(o,r.lastComponent,t,e,o.useLongestToken));h[n]=r,r.oldPos+1>=s&&(v=Math.min(v,n-1)),d+1>=u&&(m=Math.max(m,n+1))}else h[n]=void 0}c++}if(i)!function e(){setTimeout(function(){if(c>l||Date.now()>p)return i();g()||e()},0)}();else for(;c<=l&&Date.now()<=p;){var y=g();if(y)return y}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,o=n.length,a=e.oldPos,u=a-r,s=0;u+1e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],o=0;function a(){var e={};for(i.push(e);o2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=At(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var r,i,o=e.split(/\r\n|[\n\v\f\r\x85]/),a=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],u=t.hunks,s=n.compareLine||function(e,t,n,r){return t===r},c=0,l=n.fuzzFactor||0,f=0,p=0;function h(e,t){for(var n=0;n0?r[0]:" ",a=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!s(t+1,o[t],i,a)&&++c>l)return!1;t++}}return!0}for(var d=0;d0?E[0]:" ",C=E.length>0?E.substr(1):E,I=B.linedelimiters&&B.linedelimiters[F]||"\n";if(" "===k)A++;else if("-"===k)o.splice(A,1),a.splice(A,1);else if("+"===k)o.splice(A,0,C),a.splice(A,0,I),A++;else if("\\"===k){var S=B.lines[F-1]?B.lines[F-1][0]:null;"+"===S?r=!0:"-"===S&&(i=!0)}}}if(r)for(;!o[o.length-1];)o.pop(),a.pop();else i&&(o.push(""),a.push("\n"));for(var T=0;T0?v(d.lines.slice(-a.context)):[],c-=f.length,l-=f.length)}(o=f).push.apply(o,mt(i.map(function(e){return(t.added?"+":"-")+e}))),t.added?h+=i.length:p+=i.length}else{if(c)if(i.length<=2*a.context&&e=u.length-2&&i.length<=a.context){var b=/\n$/.test(n),x=/\n$/.test(r),B=0==i.length&&f.length>w.oldLines;!b&&B&&n.length>0&&f.splice(w.oldLines,0,"\\ No newline at end of file"),(b||B)&&x||f.push("\\ No newline at end of file")}s.push(w),c=0,l=0,f=[]}p+=i.length,h+=i.length}},m=0;me.length)return!1;for(var n=0;n"):r.removed&&t.push(""),t.push(Kt(r.value)),r.added?t.push(""):r.removed&&t.push("")}return t.join("")}function Kt(e){var t=e;return(t=(t=(t=t.replace(/&/g,"&")).replace(//g,">")).replace(/"/g,""")}function Qt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qt=function(){return!!e})()}xt.tokenize=function(e){return e.slice()},xt.join=xt.removeEmpty=function(e){return e};var en=function(t){function n(){var e,t,r,i;return o(this,n),t=this,r=f(r=n),(e=l(t,Qt()?Reflect.construct(r,[],f(t).constructor):r.apply(t,i))).name="Diff",e.module="Diff",e.description="Compares two inputs (separated by the specified delimiter) and highlights the differences between them.",e.infoURL="https://wikipedia.org/wiki/File_comparison",e.inputType="string",e.outputType="html",e.args=[{name:"Sample delimiter",type:"binaryString",value:"\\n\\n"},{name:"Diff by",type:"option",value:["Character","Word","Line","Sentence","CSS","JSON"]},{name:"Show added",type:"boolean",value:!0},{name:"Show removed",type:"boolean",value:!0},{name:"Show subtraction",type:"boolean",value:!1},{name:"Ignore whitespace",type:"boolean",value:!1,hint:"Relevant for word and line"}],e}return h(n,t),c(n,[{key:"run",value:function(t,n){var r,o=i(n,6),a=o[0],u=o[1],s=o[2],c=o[3],l=o[4],f=o[5],p=t.split(a),h="",d=e.default?e.default:e;if(!p||2!==p.length)throw new k("Incorrect number of samples, perhaps you need to modify the sample delimiter or add more samples?");switch(u){case"Character":r=d.diffChars(p[0],p[1]);break;case"Word":r=f?d.diffWords(p[0],p[1]):d.diffWordsWithSpace(p[0],p[1]);break;case"Line":r=f?d.diffTrimmedLines(p[0],p[1]):d.diffLines(p[0],p[1]);break;case"Sentence":r=d.diffSentences(p[0],p[1]);break;case"CSS":r=d.diffCss(p[0],p[1]);break;case"JSON":r=d.diffJson(p[0],p[1]);break;default:throw new k("Invalid 'Diff by' option.")}for(var m=0;m"+P.escapeHtml(r[m].value)+""):r[m].removed?c&&(h+=""+P.escapeHtml(r[m].value)+""):l||(h+=P.escapeHtml(r[m].value));return h}}])}(Ye);const tn=en;("undefined"==typeof self?{}:self.OpModules||{}).Diff={Diff:tn}})()})();