// PouchDB localStorage plugin 7.3.0 // Based on localstorage-down: https://github.com/No9/localstorage-down // // (c) 2012-2022 Dale Harvey and the PouchDB team // PouchDB may be freely distributed under the Apache license, version 2.0. // For all details and documentation: // http://pouchdb.com !function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a * @license MIT */function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i=0;f--)if(c[f]!==l[f])return!1;for(f=c.length-1;f>=0;f--)if(s=c[f],!_(e[s],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function w(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function m(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&b(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!e&&i&&!n;if((!e&&a.isError(i)&&o&&m(i,n)||s)&&b(i,n,"Got unwanted exception"+r),e&&i&&n&&!m(i,n)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return y(g(e.actual),128)+" "+e.operator+" "+y(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=p(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(h.AssertionError,Error),h.fail=b,h.ok=v,h.equal=function(e,t,n){e!=t&&b(e,t,n,"==",h.equal)},h.notEqual=function(e,t,n){e==t&&b(e,t,n,"!=",h.notEqual)},h.deepEqual=function(e,t,n){_(e,t,!1)||b(e,t,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,n){_(e,t,!0)||b(e,t,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,n){_(e,t,!1)&&b(e,t,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,n,r){_(t,n,!0)&&b(t,n,r,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,n){e!==t&&b(e,t,n,"===",h.strictEqual)},h.notStrictEqual=function(e,t,n){e===t&&b(e,t,n,"!==",h.notStrictEqual)},h.throws=function(e,t,n){E(!0,e,t,n)},h.doesNotThrow=function(e,t,n){E(!1,e,t,n)},h.ifError=function(e){if(e)throw e},h.strict=r((function e(t,n){t||b(t,!0,n,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var S=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{71:71,9:9}],7:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],8:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],9:[function(e,t,n){(function(t,r){(function(){var i=/%[sdj%]/g;n.format=function(e){if(!b(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(t)?r.showHidden=t:t&&n._extend(r,t),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,e,r.depth)}function u(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function f(e,t){return e}function c(e,t,r){if(e.customInspect&&t&&S(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return b(i)||(i=c(e,i,r)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(g(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,t);if(o)return o;var a=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),E(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(t);if(0===a.length){if(S(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(_(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(m(t))return e.stylize(Date.prototype.toString.call(t),"date");if(E(t))return l(t)}var f,w="",k=!1,x=["{","}"];(d(t)&&(k=!0,x=["[","]"]),S(t))&&(w=" [Function"+(t.name?": "+t.name:"")+"]");return _(t)&&(w=" "+RegExp.prototype.toString.call(t)),m(t)&&(w=" "+Date.prototype.toUTCString.call(t)),E(t)&&(w=" "+l(t)),0!==a.length||k&&0!=t.length?r<0?_(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),f=k?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(f,w,x)):x[0]+w+x[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),A(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=y(n)?c(e,u.value,null):c(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function v(e){return void 0===e}function _(e){return w(e)&&"[object RegExp]"===k(e)}function w(e){return"object"==typeof e&&null!==e}function m(e){return w(e)&&"[object Date]"===k(e)}function E(e){return w(e)&&("[object Error]"===k(e)||e instanceof Error)}function S(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(v(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=t.pid;a[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else a[e]=function(){};return a[e]},n.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=d,n.isBoolean=p,n.isNull=y,n.isNullOrUndefined=function(e){return null==e},n.isNumber=g,n.isString=b,n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=v,n.isRegExp=_,n.isObject=w,n.isDate=m,n.isError=E,n.isFunction=S,n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e(8);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){console.log("%s - %s",R(),n.format.apply(n,arguments))},n.inherits=e(7),n._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{7:7,73:73,8:8}],10:[function(e,t,n){"use strict";n.byteLength=function(e){var t=f(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=f(e),a=r[0],s=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,l=s>0?a-4:a;for(n=0;n>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)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 c(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],11:[function(e,t,n){},{}],12:[function(e,t,n){(function(e){(function(){var n=Object.prototype.toString,r=void 0!==e&&"function"==typeof e.alloc&&"function"==typeof e.allocUnsafe&&"function"==typeof e.from;t.exports=function(t,i,o){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return a=t,"ArrayBuffer"===n.call(a).slice(8,-1)?function(t,n,i){n>>>=0;var o=t.byteLength-n;if(o<0)throw new RangeError("'offset' is out of bounds");if(void 0===i)i=o;else if((i>>>=0)>o)throw new RangeError("'length' is out of bounds");return r?e.from(t.slice(n,n+i)):new e(new Uint8Array(t.slice(n,n+i)))}(t,i,o):"string"==typeof t?function(t,n){if("string"==typeof n&&""!==n||(n="utf8"),!e.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return r?e.from(t,n):new e(t,n)}(t,i):r?e.from(t):new e(t);var a}}).call(this)}).call(this,e(13).Buffer)},{13:13}],13:[function(e,t,n){(function(t){(function(){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ "use strict";var t=e(10),r=e(30),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=a,n.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},n.INSPECT_MAX_BYTES=50;function o(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(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 s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|d(e,t),r=o(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return c(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 l(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return l(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);var i=function(e){if(a.isBuffer(e)){var t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||D(e.length)?o(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.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 u(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 u(e),o(e<0?0:0|h(e))}function c(e){for(var t=e.length<0?0:0|h(e.length),n=o(t),r=0;r=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function d(e,t){if(a.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);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(i)return r?-1:I(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var 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 R(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(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),D(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=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:b(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):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var o,a=1,s=e.length,u=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,s/=2,u/=2,n/=2}function f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var l=!0,h=0;hi&&(r=i):r=i;var o=t.length;r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:f>223?3:f>191?2:1;if(i+l<=n)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rr.length?a.from(o).copy(r,i):Uint8Array.prototype.set.call(r,o,i);else{if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,i){if(q(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.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;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),u=Math.min(o,s),f=this.slice(r,i),c=e.slice(t,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var 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");for(var o=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":case"latin1":case"binary":return w(this,e,t,n);case"base64":return m(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,n,r,i,o){if(!a.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 M(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 B(e,t,n,i,o){return t=+t,n>>>=0,o||M(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function L(e,t,n,i,o){return t=+t,n>>>=0,o||M(e,0,n,8),r.write(e,t,n,i,52,8),n+8}a.prototype.slice=function(e,t){var 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||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||j(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||T(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r)||T(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||T(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},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||T(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},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);T(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);T(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||T(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},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||T(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},a.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.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(o=t;o55295&&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 N(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function P(e,t,n,r){for(var 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 D(e){return e!=e}var U=function(){for(var e=new Array(256),t=0;t<16;++t)for(var n=16*t,r=0;r<16;++r)e[n+r]="0123456789abcdef"[t]+"0123456789abcdef"[r];return e}()}).call(this)}).call(this,e(13).Buffer)},{10:10,13:13,30:30}],14:[function(e,t,n){function r(e){return Object.prototype.toString.call(e)}n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},n.isBoolean=function(e){return"boolean"==typeof e},n.isNull=function(e){return null===e},n.isNullOrUndefined=function(e){return null==e},n.isNumber=function(e){return"number"==typeof e},n.isString=function(e){return"string"==typeof e},n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=function(e){return void 0===e},n.isRegExp=function(e){return"[object RegExp]"===r(e)},n.isObject=function(e){return"object"==typeof e&&null!==e},n.isDate=function(e){return"[object Date]"===r(e)},n.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},n.isFunction=function(e){return"function"==typeof e},n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e(13).Buffer.isBuffer},{13:13}],15:[function(e,t,n){var r=e(13).Buffer,i=".PYFGCRLAOEUIDHTNSQJKXBMWVZ_pyfgcrlaoeuidhtnsqjkxbmwvz1234567890".split("").sort().join("");t.exports=function(e,t){if(t=t||{},64!==(e=e||i).length)throw new Error("a base 64 encoding requires 64 chars");var n=new r(128);n.fill();for(var o=0;o<64;o++){var a=e.charCodeAt(o);n[a]=o}return t.encode=function(t){for(var n="",r=t.length,i=0,o=0;o>2],i=(3&a)<<4;break;case 1:n+=e[i|a>>4],i=(15&a)<<2;break;case 2:n+=e[i|a>>6],n+=e[63&a],i=0}}return r%3&&(n+=e[i]),n},t.decode=function(e){for(var t=e.length,i=0,o=new r(~~(t/4*3)),a=0,s=0;s>4,a=u<<4&255;break;case 2:o[i++]=a|u>>2,a=u<<6&255;break;case 3:o[i++]=a|u}}return o},t},t.exports(i,t.exports)},{13:13}],16:[function(e,t,n){var r=e(21).AbstractIterator;function i(e,t){r.call(this,e),this._options=t,this._iterator=null,this._operations=[]}e(37)(i,r),i.prototype.setDb=function(e){var t=this._iterator=e.iterator(this._options);this._operations.forEach((function(e){t[e.method].apply(t,e.args)}))},i.prototype._operation=function(e,t){if(this._iterator)return this._iterator[e].apply(this._iterator,t);this._operations.push({method:e,args:t})},"next end".split(" ").forEach((function(e){i.prototype["_"+e]=function(){this._operation(e,arguments)}})),i.prototype.seek=function(){this._operation("seek",arguments)},t.exports=i},{21:21,37:37}],17:[function(e,t,n){var r=e(21).AbstractLevelDOWN,i=e(37),o=e(16),a="put get del batch clear".split(" "),s="approximateSize compactRange".split(" ");function u(e){r.call(this,e.supports||{}),s.forEach((function(t){"function"!=typeof e[t]||this.supports.additionalMethods[t]||(this.supports.additionalMethods[t]=!0)}),this),this._db=e,this._operations=[],f(this)}function f(e){a.forEach((function(t){e["_"+t]=function(){this._operations.push({method:t,args:arguments})}})),Object.keys(e.supports.additionalMethods).forEach((function(t){e[t]=function(){this._operations.push({method:t,args:arguments})}})),e._iterator=function(t){var n=new o(e,t);return this._operations.push({iterator:n}),n}}i(u,r),u.prototype.type="deferred-leveldown",u.prototype._open=function(e,t){var n=this;this._db.open(e,(function(e){if(e)return t(e);n._operations.forEach((function(e){e.iterator?e.iterator.setDb(n._db):n._db[e.method].apply(n._db,e.args)})),n._operations=[],function(e){a.concat("iterator").forEach((function(t){e["_"+t]=function(){return this._db[t].apply(this._db,arguments)}})),Object.keys(e.supports.additionalMethods).forEach((function(t){e[t]=function(){return this._db[t].apply(this._db,arguments)}}))}(n),t()}))},u.prototype._close=function(e){var t=this;this._db.close((function(n){if(n)return e(n);f(t),e()}))},u.prototype._serializeKey=function(e){return e},u.prototype._serializeValue=function(e){return e},t.exports=u,t.exports.DeferredIterator=o},{16:16,21:21,37:37}],18:[function(e,t,n){var r=e(22);function i(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._operations=[],this._written=!1}i.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},i.prototype.put=function(e,t){this._checkWritten();var n=this.db._checkKey(e)||this.db._checkValue(t);if(n)throw n;return e=this.db._serializeKey(e),t=this.db._serializeValue(t),this._put(e,t),this},i.prototype._put=function(e,t){this._operations.push({type:"put",key:e,value:t})},i.prototype.del=function(e){this._checkWritten();var t=this.db._checkKey(e);if(t)throw t;return e=this.db._serializeKey(e),this._del(e),this},i.prototype._del=function(e){this._operations.push({type:"del",key:e})},i.prototype.clear=function(){return this._checkWritten(),this._clear(),this},i.prototype._clear=function(){this._operations=[]},i.prototype.write=function(e,t){if(this._checkWritten(),"function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("write() requires a callback argument");"object"==typeof e&&null!==e||(e={}),this._written=!0,this._write(e,t)},i.prototype._write=function(e,t){this.db._batch(this._operations,e,t)},i.prototype._nextTick=r,t.exports=i},{22:22}],19:[function(e,t,n){var r=e(22);function i(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._ended=!1,this._nexting=!1}i.prototype.next=function(e){var t=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return t._ended?(r(e,new Error("cannot call next() after end()")),t):t._nexting?(r(e,new Error("cannot call next() before previous next() has completed")),t):(t._nexting=!0,t._next((function(){t._nexting=!1,e.apply(null,arguments)})),t)},i.prototype._next=function(e){r(e)},i.prototype.seek=function(e){if(this._ended)throw new Error("cannot call seek() after end()");if(this._nexting)throw new Error("cannot call seek() before next() has completed");e=this.db._serializeKey(e),this._seek(e)},i.prototype._seek=function(e){},i.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");if(this._ended)return r(e,new Error("end() already called on iterator"));this._ended=!0,this._end(e)},i.prototype._end=function(e){r(e)},i.prototype._nextTick=r,t.exports=i},{22:22}],20:[function(e,t,n){var r=e(141),i=e(58),o=e(13).Buffer,a=e(19),s=e(18),u=e(22),f=Object.prototype.hasOwnProperty,c="start end gt gte lt lte".split(" ");function l(e){this.status="new",this.supports=i(e,{status:!0})}function h(e,t){var n={};for(var r in t)if(f.call(t,r)){var i=t[r];d(r)&&(i=e._serializeKey(i)),n[r]=i}return n}function d(e){return-1!==c.indexOf(e)}l.prototype.open=function(e,t){var n=this,r=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"==typeof e&&null!==e||(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,(function(e){if(e)return n.status=r,t(e);n.status="open",t()}))},l.prototype._open=function(e,t){u(t)},l.prototype.close=function(e){var t=this,n=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close((function(r){if(r)return t.status=n,e(r);t.status="closed",e()}))},l.prototype._close=function(e){u(e)},l.prototype.get=function(e,t,n){if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("get() requires a callback argument");var r=this._checkKey(e);if(r)return u(n,r);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),t.asBuffer=!1!==t.asBuffer,this._get(e,t,n)},l.prototype._get=function(e,t,n){u((function(){n(new Error("NotFound"))}))},l.prototype.put=function(e,t,n,r){if("function"==typeof n&&(r=n),"function"!=typeof r)throw new Error("put() requires a callback argument");var i=this._checkKey(e)||this._checkValue(t);if(i)return u(r,i);e=this._serializeKey(e),t=this._serializeValue(t),"object"==typeof n&&null!==n||(n={}),this._put(e,t,n,r)},l.prototype._put=function(e,t,n,r){u(r)},l.prototype.del=function(e,t,n){if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("del() requires a callback argument");var r=this._checkKey(e);if(r)return u(n,r);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),this._del(e,t,n)},l.prototype._del=function(e,t,n){u(n)},l.prototype.batch=function(e,t,n){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(n=t),"function"==typeof e&&(n=e),"function"!=typeof n)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return u(n,new Error("batch(array) requires an array argument"));if(0===e.length)return u(n);"object"==typeof t&&null!==t||(t={});for(var i=new Array(e.length),o=0;o1){var r=this._capacity;if(n+t>r){for(var i=0;i1){if(t+n>(i=this._capacity)){for(var r=n-1;r>=0;r--){this._checkCapacity(t+1);var i=this._capacity;this[a=(this._front-1&i-1^i)-i]=arguments[r],t++,this._length=t,this._front=a}return t}var o=this._front;for(r=n-1;r>=0;r--){var a;this[a=(o-1&i-1^i)-i]=arguments[r],o=a}return this._front=o,this._length=t+n,t+n}if(0===n)return t;this._checkCapacity(t+1);i=this._capacity;return this[r=(this._front-1&i-1^i)-i]=e,this._length=t+1,this._front=r,t+1},r.prototype.peekBack=function(){var e=this._length;if(0!==e)return this[this._front+e-1&this._capacity-1]},r.prototype.peekFront=function(){if(0!==this._length)return this[this._front]},r.prototype.get=function(e){var t=e;if(t===(0|t)){var n=this._length;if(t<0&&(t+=n),!(t<0||t>=n))return this[this._front+t&this._capacity-1]}},r.prototype.isEmpty=function(){return 0===this._length},r.prototype.clear=function(){for(var e=this._length,t=this._front,n=this._capacity,r=0;rt&&function(e,t,n,r,i){for(var o=0;o>>=0,t-=1,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,1+(t|=t>>16);var t}t.exports=r},{}],24:[function(e,t,n){var r=e(74);function i(e,t,n){t&&"string"!=typeof t&&(t=t.message||t.name),r(this,{type:e,name:e,cause:"string"!=typeof t?t:n,message:t},"ewr")}function o(e,t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),i.call(this,"CustomError",e,t)}o.prototype=new Error,t.exports=function(e){var t=function(t,n){return function(e,t,n){var r=function(n,o){i.call(this,t,n,o),"FilesystemError"==t&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(e.errno[this.cause.errno]?e.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,r)};return r.prototype=n?new n:new o,r}(e,t,n)};return{CustomError:o,FilesystemError:t("FilesystemError"),createError:t}}},{74:74}],25:[function(e,t,n){var r=t.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];t.exports.errno={},t.exports.code={},r.forEach((function(e){t.exports.errno[e.errno]=e,t.exports.code[e.code]=e})),t.exports.custom=e(24)(t.exports),t.exports.create=t.exports.custom.createError},{24:24}],26:[function(e,t,n){var r=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return n},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var s,u=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),s=0===f.x}catch(e){s=!1}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n){if(t)e.call(n);else for(var r=e.length,i=m(e,r),o=0;o0&&s.length>o){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else s=a[t]=n,++e._eventsCount;return e}function b(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(n=a[e]))return!1;var f="function"==typeof n;switch(r=arguments.length){case 1:l(n,f,this);break;case 2:h(n,f,this,arguments[1]);break;case 3:d(n,f,this,arguments[1],arguments[2]);break;case 4:p(n,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(var n=t,r=n+1,i=e.length;r=0;o--)this.removeListener(e,t[o]);return this},a.prototype.listeners=function(e){return _(this,e,!0)},a.prototype.rawListeners=function(e){return _(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):w.call(e,t)},a.prototype.listenerCount=w,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],27:[function(e,t,n){"object"==typeof n&&(t.exports=function(){try{if("undefined"==typeof localStorage)return!1;if(localStorage.setItem("Storage-Test","1"),"1"!==localStorage.getItem("Storage-Test"))return!1;localStorage.removeItem("Storage-Test")}catch(e){return!1}return!0})},{}],28:[function(e,t,n){(function(n){(function(){var r=t.exports={},i=e(69);r.hasLocalStorage=e(27),r.create=function(){var e;return r.hasLocalStorage()?(e=n.localStorage,(e={get length(){return n.localStorage.length},getItem:n.localStorage.getItem.bind(n.localStorage),setItem:n.localStorage.setItem.bind(n.localStorage),removeItem:n.localStorage.removeItem.bind(n.localStorage),key:n.localStorage.key.bind(n.localStorage),clear:n.localStorage.clear.bind(n.localStorage)}).isPersistent=!0):(e=i).isPersistent=!1,e.getObject=r.getObject.bind(null,e),e.setObject=r.setObject.bind(null,e),e},r.setObject=function(e,t,n){return"object"!=typeof n?e.setItem(t,n):e.setItem(t,JSON.stringify(n))},r.getObject=function(e,t){var n=e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch(e){return n}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{27:27,69:69}],29:[function(e,t,n){var r=e(28);t.exports=r.create()},{28:28}],30:[function(e,t,n){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<>1,c=-7,l=n?i-1:0,h=n?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+l],l+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=f}return(d?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,u,f=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=c?(s=0,a=c):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[n+d]=255&a,d+=p,a/=256,f-=8);e[n+d-p]|=128*y}},{}],31:[function(e,t,n){"use strict";var r,i,o,a=[e(11),e(34),e(33),e(32),e(35),e(36)],s=-1,u=[],f=!1;function c(){r&&i&&(r=!1,i.length?u=i.concat(u):s=-1,u.length&&l())}function l(){if(!r){f=!1,r=!0;for(var e=u.length,t=setTimeout(c);e;){for(i=u,u=[];i&&++s1)for(var n=1;n * @license MIT */ t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],39:[function(e,t,n){var r=e(40);function i(e){if(!(this instanceof i))return new i(e);this.opts=e||{},this.encodings=r}t.exports=i,i.prototype._encoding=function(e){return"string"==typeof e&&(e=r[e]),e||(e=r.id),e},i.prototype._keyEncoding=function(e,t){return this._encoding(t&&t.keyEncoding||e&&e.keyEncoding||this.opts.keyEncoding)},i.prototype._valueEncoding=function(e,t){return this._encoding(t&&(t.valueEncoding||t.encoding)||e&&(e.valueEncoding||e.encoding)||this.opts.valueEncoding||this.opts.encoding)},i.prototype.encodeKey=function(e,t,n){return this._keyEncoding(t,n).encode(e)},i.prototype.encodeValue=function(e,t,n){return this._valueEncoding(t,n).encode(e)},i.prototype.decodeKey=function(e,t){return this._keyEncoding(t).decode(e)},i.prototype.decodeValue=function(e,t){return this._valueEncoding(t).decode(e)},i.prototype.encodeBatch=function(e,t){var n=this;return e.map((function(e){var r={type:e.type,key:n.encodeKey(e.key,t,e)};return n.keyAsBuffer(t,e)&&(r.keyEncoding="binary"),e.prefix&&(r.prefix=e.prefix),"value"in e&&(r.value=n.encodeValue(e.value,t,e),n.valueAsBuffer(t,e)&&(r.valueEncoding="binary")),r}))};var o=["lt","gt","lte","gte","start","end"];i.prototype.encodeLtgt=function(e){var t=this,n={};return Object.keys(e).forEach((function(r){n[r]=o.indexOf(r)>-1?t.encodeKey(e[r],e):e[r]})),n},i.prototype.createStreamDecoder=function(e){var t=this;return e.keys&&e.values?function(n,r){return{key:t.decodeKey(n,e),value:t.decodeValue(r,e)}}:e.keys?function(n){return t.decodeKey(n,e)}:e.values?function(n,r){return t.decodeValue(r,e)}:function(){}},i.prototype.keyAsBuffer=function(e){return this._keyEncoding(e).buffer},i.prototype.valueAsBuffer=function(e){return this._valueEncoding(e).buffer}},{40:40}],40:[function(e,t,n){var r=e(13).Buffer;n.utf8=n["utf-8"]={encode:function(e){return o(e)?e:String(e)},decode:i,buffer:!1,type:"utf8"},n.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},n.binary={encode:function(e){return o(e)?e:r.from(e)},decode:i,buffer:!0,type:"binary"},n.none={encode:i,decode:i,buffer:!1,type:"id"},n.id=n.none;function i(e){return e}function o(e){return null==e||r.isBuffer(e)}["hex","ascii","base64","ucs2","ucs-2","utf16le","utf-16le"].forEach((function(e){n[e]={encode:function(t){return o(t)?t:r.from(t,e)},decode:function(t){return t.toString(e)},buffer:!0,type:e}}))},{13:13}],41:[function(e,t,n){var r=e(25).create,i=r("LevelUPError"),o=r("NotFoundError",i);o.prototype.notFound=!0,o.prototype.status=404,t.exports={LevelUPError:i,InitializationError:r("InitializationError",i),OpenError:r("OpenError",i),ReadError:r("ReadError",i),WriteError:r("WriteError",i),NotFoundError:o,EncodingError:r("EncodingError",i)}},{25:25}],42:[function(e,t,n){var r=e(37),i=e(57).Readable,o=e(141);function a(e,t){if(!(this instanceof a))return new a(e,t);t=t||{},i.call(this,o(t,{objectMode:!0})),this._iterator=e,this._options=t,this.on("end",this.destroy.bind(this,null,null))}t.exports=a,r(a,i),a.prototype._read=function(){var e=this,t=this._options;this.destroyed||this._iterator.next((function(n,r,i){if(!e.destroyed)return n?e.destroy(n):void(void 0===r&&void 0===i?e.push(null):!1!==t.keys&&!1===t.values?e.push(r):!1===t.keys&&!1!==t.values?e.push(i):e.push({key:r,value:i}))}))},a.prototype._destroy=function(e,t){this._iterator.end((function(n){t(e||n)}))}},{141:141,37:37,57:57}],43:[function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function o(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,a,s;if("string"==typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var u=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(r," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},{}],44:[function(e,t,n){(function(n){(function(){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=f;var i=e(46),o=e(48);e(37)(f,i);for(var a=r(o.prototype),s=0;s0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)a.endEmitted?E(e,new m):R(e,a,t,!0);else if(a.ended)E(e,new _);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?R(e,a,t,!1):M(e,a)):R(e,a,t,!1)}else r||(a.reading=!1,M(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(B,e,t))}function B(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){f("readable nexttick read 0"),e.read(0)}function I(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function P(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function q(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(D,t,e))}function D(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?q(this):j(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&q(this),null;var r,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e0?P(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&q(this)),null!==r&&this.emit("data",r),r},x.prototype._read=function(e){E(this,new w("_read()"))},x.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:g;function s(t,n){f("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",h),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){f("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,N(e))}}(r);e.on("drain",c);var l=!1;function h(t){f("ondata");var n=e.write(t);f("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!l&&(f("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(t){f("onerror",t),g(),e.removeListener("error",d),0===o(e,"error")&&E(e,t)}function p(){e.removeListener("finish",y),g()}function y(){f("onfinish"),e.removeListener("close",p),g()}function g(){f("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",p),e.once("finish",y),e.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,f("on readable",i.length,i.reading),i.length?j(this):i.reading||n.nextTick(C,this))),r},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(L,this),r},x.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(L,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(I,e,t))}(this,e)),e.paused=!1,this},x.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new m(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,n){n(new y("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=l.destroy,x.prototype._undestroy=l.undestroy,x.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{121:121,13:13,37:37,43:43,44:44,51:51,55:55,56:56,73:73}],49:[function(e,t,n){(function(n){(function(){"use strict";var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=e(52),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),c=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var n=e[h].read();null!==n&&(e[c]=null,e[a]=null,e[s]=null,t(d(n,!1)))}}function y(e){n.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((i(r={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){n.nextTick((function(){e[u]?r(e[u]):t(d(void 0,!0))}))}));var r,i=this[c];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[f]?n(d(void 0,!0)):t[l](n,r)}),r)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(d(o,!1));r=new Promise(this[l])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[h].destroy(null,(function(e){e?n(e):t(d(void 0,!0))}))}))})),r),g);t.exports=function(e){var t,n=Object.create(b,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,f,{value:e._readableState.endEmitted,writable:!0}),i(t,l,{value:function(e,t){var r=n[h].read();r?(n[c]=null,n[a]=null,n[s]=null,e(d(r,!1))):(n[a]=e,n[s]=t)},writable:!0}),t));return n[c]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[c]=null,n[a]=null,n[s]=null,t(e)),void(n[u]=e)}var r=n[a];null!==r&&(n[c]=null,n[a]=null,n[s]=null,r(d(void 0,!0))),n[f]=!0})),e.on("readable",y.bind(null,n)),n}}).call(this)}).call(this,e(73))},{52:52,73:73}],50:[function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,n,r,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,n=i,r=s,a.prototype.copy.call(t,n,r),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var n;return ei.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&a.forEach(f),o||(a.forEach(f),i(r))}))}));return t.reduce(c)}},{43:43,52:52}],55:[function(e,t,n){"use strict";var r=e(43).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},{43:43}],56:[function(e,t,n){t.exports=e(26).EventEmitter},{26:26}],57:[function(e,t,n){(n=t.exports=e(46)).Stream=n,n.Readable=n,n.Writable=e(48),n.Duplex=e(44),n.Transform=e(47),n.PassThrough=e(45),n.finished=e(52),n.pipeline=e(54)},{44:44,45:45,46:46,47:47,48:48,52:52,54:54}],58:[function(e,t,n){"use strict";var r=e(141),i=e(142);t.exports=function(){var e=r.apply(null,arguments);return i(e,{bufferKeys:e.bufferKeys||!1,snapshots:e.snapshots||!1,permanence:e.permanence||!1,seek:e.seek||!1,clear:e.clear||!1,status:e.status||!1,createIfMissing:e.createIfMissing||!1,errorIfExists:e.errorIfExists||!1,deferredOpen:e.deferredOpen||!1,openCallback:e.openCallback||!1,promises:e.promises||!1,streams:e.streams||!1,encodings:e.encodings||!1,additionalMethods:r(e.additionalMethods)})}},{141:141,142:142}],59:[function(e,t,n){var r=e(41).WriteError,i=e(62),o=e(60).getCallback,a=e(60).getOptions;function s(e){this.db=this._levelup=e,this.batch=e.db.batch(),this.ops=[],this.length=0}s.prototype.put=function(e,t){try{this.batch.put(e,t)}catch(e){throw new r(e)}return this.ops.push({type:"put",key:e,value:t}),this.length++,this},s.prototype.del=function(e){try{this.batch.del(e)}catch(e){throw new r(e)}return this.ops.push({type:"del",key:e}),this.length++,this},s.prototype.clear=function(){try{this.batch.clear()}catch(e){throw new r(e)}return this.ops=[],this.length=0,this},s.prototype.write=function(e,t){var n,s=this._levelup,u=this.ops;(t=o(e,t))||(n=(t=i()).promise),e=a(e);try{this.batch.write(e,(function(e){if(e)return t(new r(e));s.emit("batch",u),t()}))}catch(e){throw new r(e)}return n},t.exports=s},{41:41,60:60,62:62}],60:[function(e,t,n){n.getCallback=function(e,t){return"function"==typeof e?e:t},n.getOptions=function(e){return"object"==typeof e&&null!==e?e:{}}},{}],61:[function(e,t,n){(function(n){(function(){var r=e(26).EventEmitter,i=e(124).inherits,o=e(141),a=e(17),s=e(42),u=e(59),f=e(41),c=e(58),l=e(6),h=e(62),d=e(60).getCallback,p=e(60).getOptions,y=f.WriteError,g=f.ReadError,b=f.NotFoundError,v=f.OpenError,_=f.InitializationError;function w(e,t,i){if(!(this instanceof w))return new w(e,t,i);var o,s=this;if(r.call(this),this.setMaxListeners(1/0),"function"==typeof t&&(i=t,t={}),t=t||{},!e||"object"!=typeof e){if(o=new _("First argument must be an abstract-leveldown compliant store"),"function"==typeof i)return n.nextTick(i,o);throw o}l.strictEqual(typeof e.status,"string",".status required, old abstract-leveldown"),this.options=p(t),this._db=e,this.db=new a(e),this.open(i||function(e){e&&s.emit("error",e)}),this.supports=c(this.db.supports,{status:!1,deferredOpen:!0,openCallback:!0,promises:!0,streams:!0}),Object.keys(this.supports.additionalMethods).forEach((function(e){null==this[e]&&(this[e]=function(){return this.db[e].apply(this.db,arguments)})}),this)}function m(e,t){if(!e._isOpening()&&!e.isOpen())return n.nextTick(t,new g("Database is not open")),!0}w.prototype.emit=r.prototype.emit,w.prototype.once=r.prototype.once,i(w,r),w.prototype.open=function(e,t){var r,i=this;return"function"==typeof e&&(t=e,e=null),t||(r=(t=h()).promise),e||(e=this.options),this.isOpen()?(n.nextTick(t,null,i),r):this._isOpening()?(this.once("open",(function(){t(null,i)})),r):(this.emit("opening"),this.db.open(e,(function(e){if(e)return t(new v(e));i.db=i._db,t(null,i),i.emit("open"),i.emit("ready")})),r)},w.prototype.close=function(e){var t,r=this;return e||(t=(e=h()).promise),this.isOpen()?(this.db.close((function(){r.emit("closed"),e.apply(null,arguments)})),this.emit("closing"),this.db=new a(this._db)):this.isClosed()?n.nextTick(e):"closing"===this.db.status?this.once("closed",e):this._isOpening()&&this.once("open",(function(){r.close(e)})),t},w.prototype.isOpen=function(){return"open"===this.db.status},w.prototype._isOpening=function(){return"opening"===this.db.status},w.prototype.isClosed=function(){return/^clos|new/.test(this.db.status)},w.prototype.get=function(e,t,n){var r;return(n=d(t,n))||(r=(n=h()).promise),m(this,n)||(t=p(t),this.db.get(e,t,(function(t,r){if(t)return t=/notfound/i.test(t)||t.notFound?new b("Key not found in database ["+e+"]",t):new g(t),n(t);n(null,r)}))),r},w.prototype.put=function(e,t,n,r){var i,o=this;return(r=d(n,r))||(i=(r=h()).promise),m(this,r)||(n=p(n),this.db.put(e,t,n,(function(n){if(n)return r(new y(n));o.emit("put",e,t),r()}))),i},w.prototype.del=function(e,t,n){var r,i=this;return(n=d(t,n))||(r=(n=h()).promise),m(this,n)||(t=p(t),this.db.del(e,t,(function(t){if(t)return n(new y(t));i.emit("del",e),n()}))),r},w.prototype.batch=function(e,t,n){if(!arguments.length)return new u(this);var r,i=this;return(n="function"==typeof e?e:d(t,n))||(r=(n=h()).promise),m(this,n)||(t=p(t),this.db.batch(e,t,(function(t){if(t)return n(new y(t));i.emit("batch",e),n()}))),r},w.prototype.iterator=function(e){return this.db.iterator(e)},w.prototype.clear=function(e,t){var n,r=this;return t=d(e,t),e=p(e),t||(n=(t=h()).promise),m(this,t)||this.db.clear(e,(function(n){if(n)return t(new y(n));r.emit("clear",e),t()})),n},w.prototype.readStream=w.prototype.createReadStream=function(e){return"number"!=typeof(e=o({keys:!0,values:!0},e)).limit&&(e.limit=-1),new s(this.db.iterator(e),e)},w.prototype.keyStream=w.prototype.createKeyStream=function(e){return this.createReadStream(o(e,{keys:!0,values:!1}))},w.prototype.valueStream=w.prototype.createValueStream=function(e){return this.createReadStream(o(e,{keys:!1,values:!0}))},w.prototype.toString=function(){return"LevelUP"},w.prototype.type="levelup",w.errors=f,t.exports=w.default=w}).call(this)}).call(this,e(73))},{124:124,141:141,17:17,26:26,41:41,42:42,58:58,59:59,6:6,60:60,62:62,73:73}],62:[function(e,t,n){t.exports=function(){var e,t=new Promise((function(t,n){e=function(e,r){e?n(e):t(r)}}));return e.promise=t,e}},{}],63:[function(e,t,n){(function(n,r,i){(function(){"use strict";var o=e(37),a=e(68),s=e(3).AbstractLevelDOWN,u=e(3).AbstractIterator,f=e(65).LocalStorage,c=e(64),l=e(67),h=i.setImmediate||r.nextTick;function d(e,t){u.call(this,e),this._reverse=!!t.reverse,this._endkey=t.end,this._startkey=t.start,this._gt=t.gt,this._gte=t.gte,this._lt=t.lt,this._lte=t.lte,this._exclusiveStart=t.exclusiveStart,this._keysOnly=!1===t.values,this._limit=t.limit,this._count=0,this.onInitCompleteListeners=[]}function p(e){if(!(this instanceof p))return new p(e);s.call(this,e),this.container=new f(e)}function y(e,t){if(null==e)return new Error(t+" cannot be `null` or `undefined`");if(null==e)return new Error(t+" cannot be `null` or `undefined`");if("key"===t){if(e instanceof Boolean)return new Error(t+" cannot be `null` or `undefined`");if(""===e)return new Error(t+" cannot be empty")}if(0===e.toString().indexOf("[object ArrayBuffer]")&&(0===e.byteLength||void 0===e.byteLength))return new Error(t+" cannot be an empty Buffer");if(n.isBuffer(e)){if(0===e.length)return new Error(t+" cannot be an empty Buffer")}else if(""===String(e))return new Error(t+" cannot be an empty String")}o(d,u),d.prototype._init=function(e){h((function(){e()}))},d.prototype._next=function(e){var t=this;function n(){if(t._pos===t._keys.length||t._pos<0)return e();var n=t._keys[t._pos];return t._endkey&&(t._reverse?nt._endkey)||t._limit&&t._limit>0&&t._count++>=t._limit||t._lt&&n>=t._lt||t._lte&&n>t._lte||t._gt&&n<=t._gt||t._gte&&n=t._keys.length||o<0?void 0:t._keys[o];t._pos=o,t._reverse?(t._exclusiveStart||a!==t._startkey)&&t._pos--:t._exclusiveStart&&a===t._startkey&&t._pos++}else t._pos=t._reverse?t._keys.length-1:0;n(),t.initCompleted=!0;for(var s=-1;++s-1&&(i=JSON.parse(i).data));r(null,i)}))},p.prototype._del=function(e,t,r){var i=y(e,"key");if(i)return h((function(){r(i)}));n.isBuffer(e)||(e=String(e)),this.container.removeItem(e,r)},p.prototype._batch=function(e,t,r){var i=this;h((function(){var o,a,s,u,f=0;function c(){++f===e.length&&r(u)}if(Array.isArray(e)&&e.length)for(var l=0;l>>1]>>=0;var o=t.byteLength-n;if(o<0)throw new RangeError("'offset' is out of bounds");if(void 0===i)i=o;else if((i>>>=0)>o)throw new RangeError("'length' is out of bounds");return r?e.from(t.slice(n,n+i)):new e(new Uint8Array(t.slice(n,n+i)))}(t,i,o):"string"==typeof t?function(t,n){if("string"==typeof n&&""!==n||(n="utf8"),!e.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return r?e.from(t,n):new e(t,n)}(t,i):r?e.from(t):new e(t);var a}}).call(this)}).call(this,e(13).Buffer)},{13:13}],69:[function(e,t,n){var r,i,o;r=this,o={},(i={}).length=0,i.getItem=function(e){return e in o?o[e]:null},i.setItem=function(e,t){void 0===t?i.removeItem(e):(o.hasOwnProperty(e)||i.length++,o[e]=""+t)},i.removeItem=function(e){o.hasOwnProperty(e)&&(delete o[e],i.length--)},i.key=function(e){return Object.keys(o)[e]||null},i.clear=function(){o={},i.length=0},"object"==typeof n?t.exports=i:r.localStorageMemory=i},{}],70:[function(e,t,n){(function(e){(function(){function t(e){return void 0!==e&&""!==e}function r(e,t){return Object.hasOwnProperty.call(e,t)}function i(e,t){return Object.hasOwnProperty.call(e,t)&&t}n.compare=function(t,n){if(e.isBuffer(t)){for(var r=Math.min(t.length,n.length),i=0;in?1:0};var o=n.lowerBoundKey=function(e){return i(e,"gt")||i(e,"gte")||i(e,"min")||(e.reverse?i(e,"end"):i(e,"start"))||void 0},a=n.lowerBound=function(e,t){var n=o(e);return n?e[n]:t},s=n.lowerBoundInclusive=function(e){return!r(e,"gt")},u=n.upperBoundInclusive=function(e){return!r(e,"lt")},f=n.lowerBoundExclusive=function(e){return!s(e)},c=n.upperBoundExclusive=function(e){return!u(e)},l=n.upperBoundKey=function(e){return i(e,"lt")||i(e,"lte")||i(e,"max")||(e.reverse?i(e,"start"):i(e,"end"))||void 0},h=n.upperBound=function(e,t){var n=l(e);return n?e[n]:t};function d(e){return e}n.start=function(e,t){return e.reverse?h(e,t):a(e,t)},n.end=function(e,t){return e.reverse?a(e,t):h(e,t)},n.startInclusive=function(e){return e.reverse?u(e):s(e)},n.endInclusive=function(e){return e.reverse?s(e):u(e)},n.toLtgt=function(e,t,i,o,a){t=t||{},i=i||d;var s=arguments.length>3,u=n.lowerBoundKey(e),f=n.upperBoundKey(e);return u?"gt"===u?t.gt=i(e.gt,!1):t.gte=i(e[u],!1):s&&(t.gte=i(o,!1)),f?"lt"===f?t.lt=i(e.lt,!0):t.lte=i(e[f],!0):s&&(t.lte=i(a,!0)),null!=e.reverse&&(t.reverse=!!e.reverse),r(t,"max")&&delete t.max,r(t,"min")&&delete t.min,r(t,"start")&&delete t.start,r(t,"end")&&delete t.end,t},n.contains=function(e,r,i){i=i||n.compare;var o=a(e);if(t(o)&&((s=i(r,o))<0||0===s&&f(e)))return!1;var s,u=h(e);if(t(u)&&((s=i(r,u))>0||0===s&&c(e)))return!1;return!0},n.filter=function(e,t){return function(r){return n.contains(e,r,t)}}}).call(this)}).call(this,{isBuffer:e(38)})},{38:38}],71:[function(e,t,n){ /* object-assign (c) Sindre Sorhus @license MIT */ "use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),f=1;f1)for(var n=1;n * https://github.com/rvagg/prr * License: MIT */ var r,i;r=this,i=function(){var e="function"==typeof Object.defineProperty?function(e,t,n){return Object.defineProperty(e,t,n),e}:function(e,t,n){return e[t]=n.value,e};return function(t,n,r,i){var o;if(i=function(e,t){var n="object"==typeof t,r=!n&&"string"==typeof t,i=function(e){return n?!!t[e]:!!r&&t.indexOf(e[0])>-1};return{enumerable:i("enumerable"),configurable:i("configurable"),writable:i("writable"),value:e}}(r,i),"object"==typeof n){for(o in n)Object.hasOwnProperty.call(n,o)&&(i.value=n[o],e(t,o,i));return t}return e(t,n,i)}},void 0!==t&&t.exports?t.exports=i():r.prr=i()},{}],75:[function(e,t,n){(function(n){(function(){t.exports=s;var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},i=e(14);i.inherits=e(37);var o=e(77),a=e(79);function s(e){if(!(this instanceof s))return new s(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||n.nextTick(this.end.bind(this))}i.inherits(s,o),function(e,t){for(var n=0,r=e.length;n0)if(t.ended&&!o){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&o){s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||o||i||(r=t.decoder.write(r)),o||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,o?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&p(e)),function(e,t){t.readingMore||(t.readingMore=!0,n.nextTick((function(){!function(e,t){var n=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.lengtht.highWaterMark&&(t.highWaterMark=function(e){if(e>=8388608)e=8388608;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function p(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick((function(){y(e)})):y(e))}function y(e){f("emit readable"),e.emit("readable"),g(e)}function g(e){var t=e._readableState;if(f("flow",t.flowing),t.flowing)do{var n=e.read()}while(null!==n&&t.flowing)}function b(e,t){var n,r=t.buffer,o=t.length,a=!!t.decoder,s=!!t.objectMode;if(0===r.length)return null;if(0===o)n=null;else if(s)n=r.shift();else if(!e||e>=o)n=a?r.join(""):i.concat(r,o),r.length=0;else{if(e0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,n.nextTick((function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))})))}l.prototype.read=function(e){f("read",e);var t=this._readableState,n=e;if((!u.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?v(this):p(this),null;if(0===(e=d(e,t))&&t.ended)return 0===t.length&&v(this),null;var r,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e0?b(e,t):null,u.isNull(r)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&v(this),u.isNull(r)||this.emit("data",r),r},l.prototype._read=function(e){this.emit("error",new Error("not implemented"))},l.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,f("pipe count=%d opts=%j",a.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:h;function u(e){f("onunpipe"),e===i&&h()}function c(){f("onend"),e.end()}a.endEmitted?n.nextTick(s):i.once("end",s),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o.listenerCount(e,"data")&&(t.flowing=!0,g(e))}}(i);function h(){f("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",u),i.removeListener("end",c),i.removeListener("end",h),i.removeListener("data",d),!a.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}function d(t){f("ondata"),!1===e.write(t)&&(f("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,i.pause())}function p(t){f("onerror",t),v(),e.removeListener("error",p),0===o.listenerCount(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),v()}function b(){f("onfinish"),e.removeListener("close",y),v()}function v(){f("unpipe"),i.unpipe(e)}return e.on("drain",l),i.on("data",d),e._events&&e._events.error?r(e._events.error)?e._events.error.unshift(p):e._events.error=[p,e._events.error]:e.on("error",p),e.once("close",y),e.once("finish",b),e.emit("pipe",i),a.flowing||(f("pipe resume"),i.resume()),e},l.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i1){for(var n=[],r=0;r=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var i;r=(t+=e.toString(this.encoding,0,r)).length-1;if((i=t.charCodeAt(r))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{13:13}],82:[function(e,t,n){(function(r){(function(){(n=t.exports=e(77)).Stream=e(85),n.Readable=n,n.Writable=e(79),n.Duplex=e(75),n.Transform=e(78),n.PassThrough=e(76),r.browser||"disable"!==r.env.READABLE_STREAM||(t.exports=e(85))}).call(this)}).call(this,e(73))},{73:73,75:75,76:76,77:77,78:78,79:79,85:85}],83:[function(e,t,n){ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var r=e(13),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{13:13}],84:[function(e,t,n){!function(e){if("object"==typeof n)t.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var r;try{r=window}catch(e){r=self}r.SparkMD5=e()}}((function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,a,s,u,f=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=f;t+=64)n(c,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(c,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*f).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(c,o),c}function a(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function s(e){var t;for(t=0;t>16)+(t>>16)+(n>>16)<<16|65535&n},"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,s,u=this.byteLength,f=t(n,u),c=u;return r!==e&&(c=t(r,u)),f>c?new ArrayBuffer(0):(i=c-f,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,f,i),a.set(s),o)}}(),c.prototype.append=function(e){return this.appendBinary(u(e)),this},c.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},c.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=s(this._hash),e&&(n=f(n)),this.reset(),n},c.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},c.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},c.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},c.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},c.prototype._finish=function(e,t){var r,i,o,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,e),a=0;a<16;a+=1)e[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},c.hash=function(e,t){return c.hashBinary(u(e),t)},c.hashBinary=function(e,t){var n=s(o(e));return t?f(n):n},c.ArrayBuffer=function(){this.reset()},c.ArrayBuffer.prototype.append=function(e){var t,r,o,a,s,u=(r=this._buff.buffer,o=e,a=!0,(s=new Uint8Array(r.byteLength+o.byteLength)).set(new Uint8Array(r)),s.set(new Uint8Array(o),r.byteLength),a?s:s.buffer),f=u.length;for(this._length+=e.byteLength,t=64;t<=f;t+=64)n(this._hash,i(u.subarray(t-64,t)));return this._buff=t-64>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=s(this._hash),e&&(n=f(n)),this.reset(),n},c.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},c.ArrayBuffer.prototype.getState=function(){var e,t=c.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},c.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(c,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*f).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(c,o),c}(new Uint8Array(e)));return t?f(r):r},c}))},{}],85:[function(e,t,n){t.exports=i;var r=e(26).EventEmitter;function i(){r.call(this)}e(37)(i,r),i.Readable=e(97),i.Writable=e(99),i.Duplex=e(87),i.Transform=e(98),i.PassThrough=e(96),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",f),e.removeListener("error",f),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",f),e.on("error",f),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},{26:26,37:37,87:87,96:96,97:97,98:98,99:99}],86:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],87:[function(e,t,n){t.exports=e(88)},{88:88}],88:[function(e,t,n){"use strict";var r=e(72),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=l;var o=Object.create(e(14));o.inherits=e(37);var a=e(90),s=e(92);o.inherits(l,a);for(var u=i(s.prototype),f=0;f0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):m(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?m(e,a,t,!1):x(e,a)):m(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){d("emit readable"),e.emit("readable"),j(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=f.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(B,t,e))}function B(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):S(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&M(this),null;var r,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&M(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:_;function f(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",g),e.removeListener("unpipe",f),r.removeListener("end",c),r.removeListener("end",_),r.removeListener("data",y),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",f);var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",l);var h=!1;var p=!1;function y(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==L(o.pipes,e))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(t){d("onerror",t),_(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),_()}function v(){d("onfinish"),e.removeListener("close",b),_()}function _(){d("unpipe"),r.unpipe(e)}return r.on("data",y),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",g),e.once("close",b),e.once("finish",v),e.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?i:o.nextTick;v.WritableState=b;var f=Object.create(e(14));f.inherits=e(37);var c={deprecate:e(121)},l=e(95),h=e(100).Buffer,d=r.Uint8Array||function(){};var p,y=e(94);function g(){}function b(t,n){s=s||e(88),t=t||{};var r=n instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,f=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),k(e,t))}(e,n,r,t,i);else{var a=E(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||m(e,n),r?u(w,e,n,a,i):w(e,n,a,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(t){if(s=s||e(88),!(p.call(v,this)||this instanceof s))return new v(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function _(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),k(e,t)}function m(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,_(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,c=n.encoding,l=n.callback;if(_(e,t,!1,t.objectMode?1:f.length,f,c,l),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var n=E(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}f.inherits(v,l),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===v&&(e&&e._writableState instanceof b)}})):p=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,h.isBuffer(r)||r instanceof d);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=g),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,k(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e(119).setImmediate)},{100:100,119:119,121:121,14:14,37:37,72:72,73:73,88:88,94:94,95:95}],93:[function(e,t,n){"use strict";var r=e(100).Buffer,i=e(11);t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i,o=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=o,i=s,t.copy(n,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{100:100,11:11}],94:[function(e,t,n){"use strict";var r=e(72);function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{72:72}],95:[function(e,t,n){arguments[4][56][0].apply(n,arguments)},{26:26,56:56}],96:[function(e,t,n){t.exports=e(97).PassThrough},{97:97}],97:[function(e,t,n){(n=t.exports=e(90)).Stream=n,n.Readable=n,n.Writable=e(92),n.Duplex=e(88),n.Transform=e(91),n.PassThrough=e(89)},{88:88,89:89,90:90,91:91,92:92}],98:[function(e,t,n){t.exports=e(97).Transform},{97:97}],99:[function(e,t,n){t.exports=e(92)},{92:92}],100:[function(e,t,n){var r=e(13),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{13:13}],101:[function(e,t,n){"use strict";var r=e(100).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=f,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}n.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(e.lastNeed=i-1),i;if(--r=0)return i>0&&(e.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{100:100}],102:[function(e,t,n){arguments[4][101][0].apply(n,arguments)},{101:101,83:83}],103:[function(e,t,n){arguments[4][43][0].apply(n,arguments)},{43:43}],104:[function(e,t,n){arguments[4][44][0].apply(n,arguments)},{106:106,108:108,37:37,44:44,73:73}],105:[function(e,t,n){arguments[4][45][0].apply(n,arguments)},{107:107,37:37,45:45}],106:[function(e,t,n){arguments[4][46][0].apply(n,arguments)},{102:102,103:103,104:104,109:109,11:11,110:110,111:111,113:113,115:115,116:116,13:13,26:26,37:37,46:46,73:73}],107:[function(e,t,n){arguments[4][47][0].apply(n,arguments)},{103:103,104:104,37:37,47:47}],108:[function(e,t,n){arguments[4][48][0].apply(n,arguments)},{103:103,104:104,111:111,115:115,116:116,121:121,13:13,37:37,48:48,73:73}],109:[function(e,t,n){arguments[4][49][0].apply(n,arguments)},{112:112,49:49,73:73}],110:[function(e,t,n){arguments[4][50][0].apply(n,arguments)},{11:11,13:13,50:50}],111:[function(e,t,n){arguments[4][51][0].apply(n,arguments)},{51:51,73:73}],112:[function(e,t,n){arguments[4][52][0].apply(n,arguments)},{103:103,52:52}],113:[function(e,t,n){arguments[4][53][0].apply(n,arguments)},{53:53}],114:[function(e,t,n){arguments[4][54][0].apply(n,arguments)},{103:103,112:112,54:54}],115:[function(e,t,n){arguments[4][55][0].apply(n,arguments)},{103:103,55:55}],116:[function(e,t,n){arguments[4][56][0].apply(n,arguments)},{26:26,56:56}],117:[function(e,t,n){arguments[4][57][0].apply(n,arguments)},{104:104,105:105,106:106,107:107,108:108,112:112,114:114,57:57}],118:[function(e,t,n){(function(n){(function(){var r=e(117).Transform,i=e(37);function o(e){r.call(this,e),this._destroyed=!1}function a(e,t,n){n(null,e)}function s(e){return function(t,n,r){return"function"==typeof t&&(r=n,n=t,t={}),"function"!=typeof n&&(n=a),"function"!=typeof r&&(r=null),e(t,n,r)}}i(o,r),o.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;n.nextTick((function(){e&&t.emit("error",e),t.emit("close")}))}},t.exports=s((function(e,t,n){var r=new o(e);return r._transform=t,n&&(r._flush=n),r})),t.exports.ctor=s((function(e,t,n){function r(t){if(!(this instanceof r))return new r(t);this.options=Object.assign({},e,t),o.call(this,this.options)}return i(r,o),r.prototype._transform=t,n&&(r.prototype._flush=n),r})),t.exports.obj=s((function(e,t,n){var r=new o(Object.assign({objectMode:!0,highWaterMark:16},e));return r._transform=t,n&&(r._flush=n),r}))}).call(this)}).call(this,e(73))},{117:117,37:37,73:73}],119:[function(e,t,n){(function(t,r){(function(){var i=e(73).nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function f(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new f(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new f(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=u++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this)}).call(this,e(119).setImmediate,e(119).clearImmediate)},{119:119,73:73}],120:[function(e,t,n){"use strict";function r(){this.length=0}r.prototype.push=function(e){var t={item:e};this.last?this.last=this.last.next=t:this.last=this.first=t,this.length++},r.prototype.shift=function(){var e=this.first;if(e)return this.first=e.next,--this.length||(this.last=void 0),e.item},r.prototype.slice=function(e,t){e=void 0===e?0:e,t=void 0===t?1/0:t;for(var n=[],r=0,i=this.first;i&&!(--t<0);i=i.next)++r>e&&n.push(i.item);return n},t.exports=r},{}],121:[function(e,t,n){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],122:[function(e,t,n){arguments[4][7][0].apply(n,arguments)},{7:7}],123:[function(e,t,n){arguments[4][8][0].apply(n,arguments)},{8:8}],124:[function(e,t,n){arguments[4][9][0].apply(n,arguments)},{122:122,123:123,73:73,9:9}],125:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"version",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return l.default}});var r=h(e(133)),i=h(e(134)),o=h(e(136)),a=h(e(137)),s=h(e(127)),u=h(e(139)),f=h(e(138)),c=h(e(132)),l=h(e(128));function h(e){return e&&e.__esModule?e:{default:e}}},{127:127,128:128,132:132,133:133,134:134,136:136,137:137,138:138,139:139}],126:[function(e,t,n){"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function i(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,r,o,a){return i((s=i(i(t,e),i(r,a)))<<(u=o)|s>>>32-u,n);var s,u}function a(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function u(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function f(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var c=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>r%32&255,i=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};n.default=o},{138:138}],129:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],130:[function(e,t,n){"use strict";let r;Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)};const i=new Uint8Array(16)},{}],131:[function(e,t,n){"use strict";function r(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function i(e,t){return e<>>32-t}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;l=c,c=f,f=i(u,30)>>>0,u=a,a=s}n[0]=n[0]+a>>>0,n[1]=n[1]+u>>>0,n[2]=n[2]+f>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+l>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};n.default=o},{}],132:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,i=(r=e(138))&&r.__esModule?r:{default:r};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).substr(1));var a=function(e,t=0){const n=(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase();if(!(0,i.default)(n))throw TypeError("Stringified UUID is invalid");return n};n.default=a},{138:138}],133:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e(130)),i=o(e(132));function o(e){return e&&e.__esModule?e:{default:e}}let a,s,u=0,f=0;var c=function(e,t,n){let o=t&&n||0;const c=t||new Array(16);let l=(e=e||{}).node||a,h=void 0!==e.clockseq?e.clockseq:s;if(null==l||null==h){const t=e.random||(e.rng||r.default)();null==l&&(l=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==h&&(h=s=16383&(t[6]<<8|t[7]))}let d=void 0!==e.msecs?e.msecs:Date.now(),p=void 0!==e.nsecs?e.nsecs:f+1;const y=d-u+(p-f)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||d>u)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,f=p,s=h,d+=122192928e5;const g=(1e4*(268435455&d)+p)%4294967296;c[o++]=g>>>24&255,c[o++]=g>>>16&255,c[o++]=g>>>8&255,c[o++]=255&g;const b=d/4294967296*1e4&268435455;c[o++]=b>>>8&255,c[o++]=255&b,c[o++]=b>>>24&15|16,c[o++]=b>>>16&255,c[o++]=h>>>8|128,c[o++]=255&h;for(let e=0;e<6;++e)c[o+e]=l[e];return t||(0,i.default)(c)};n.default=c},{130:130,132:132}],134:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e(135)),i=o(e(126));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v3",48,i.default);n.default=a},{126:126,135:135}],135:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t,n){function o(e,o,a,s){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n=0;o--)a=0===o?"":",",t.push({obj:r[o],prefix:a});t.push({val:"["})}else{for(u in s=[],r)r.hasOwnProperty(u)&&s.push(u);for(t.push({val:"}"}),o=s.length-1;o>=0;o--)c=r[f=s[o]],l=o>0?",":"",l+=JSON.stringify(f)+":",t.push({obj:c,prefix:l});t.push({val:"{"})}return h},n.parse=function(e){for(var t,n,i,o,a,s,u,f,c,l=[],h=[],d=0;;)if("}"!==(t=e[d++])&&"]"!==t&&void 0!==t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":d+=3,r(null,l,h);break;case"t":d+=3,r(!0,l,h);break;case"f":d+=4,r(!1,l,h);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",d--;;){if(i=e[d++],!/[\d\.\-e\+]/.test(i)){d--;break}n+=i}r(parseFloat(n),l,h);break;case'"':for(o="",a=void 0,s=0;'"'!==(u=e[d++])||"\\"===a&&s%2==1;)o+=u,"\\"===(a=u)?s++:s=0;r(JSON.parse('"'+o+'"'),l,h);break;case"[":f={element:[],index:l.length},l.push(f.element),h.push(f);break;case"{":c={element:{},index:l.length},l.push(c.element),h.push(c);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===l.length)return l.pop();r(l.pop(),l,h)}}},{}],141:[function(e,t,n){t.exports=function(){for(var e={},t=0;tR(e))},A.prototype.delete=function(e){var t=O(e),n=t in this._store;return delete this._store[t],n},A.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,r=t.length;nr.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))})).on("complete",(function(){"waiting"===a&&i(s),a=!1})).on("error",(function(){a=!1}))}}},M.prototype.removeListener=function(e,t){t in this._listeners&&(f.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},M.prototype.notifyLocalWindows=function(e){T()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},M.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var B="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n0||r0||r>>1],t)<0?i=r+1:o=r;return i}(e,t,n);e.splice(r,0,t)}function ke(e,t){for(var n,r,i=t,o=e.length;i0;){var i=n.pop(),o=i.tree1,a=i.tree2;(o[1].status||a[1].status)&&(o[1].status="available"===o[1].status||"available"===a[1].status?"available":"missing");for(var s=0;s0;){var y=p.pop();if(0!==y.diff)for(var g=y.ids[2],b=0,v=g.length;bt){n||(n={});var c=f.length-t;s={pos:u.pos+c,ids:ke(f,c)};for(var l=0;l=0;i--){var o=this._batch[i],a=o.prefix.prefix()[0]+"ÿ"+o.key;n.has(a)||(n.add(a),r.push(o))}e.batch(r,t)};var Pe=new m,qe={encode:function(e){try{return JSON.stringify(e)}catch(t){return b.stringify(e)}},decode:function(e){try{return JSON.parse(e)}catch(t){return b.parse(e)}},buffer:!1,type:"cheap-json"},De=new M;function Ue(e){return"winningRev"in e?e.winningRev:ve(e)}function We(e,t){return"deleted"in e?e.deleted:Te(e,t)}function Fe(e,t,n){var r=e.content_type;return new Promise((function(i,o){t.binaryStore.get(e.digest,(function(t,a){var s;if(t){if("NotFoundError"!==t.name)return o(t);s=n.binary?function(e,t){return Y([G(e)],{type:t})}("",r):""}else s=n.binary?Ce(a,r):a.toString("base64");delete e.stub,delete e.length,e.data=s,i()}))}))}function ze(e,t,n){var r=[];return e.forEach((function(e){e.doc&&e.doc._attachments&&Object.keys(e.doc._attachments).forEach((function(t){var n=e.doc._attachments[t];"data"in n||r.push(n)}))})),Promise.all(r.map((function(e){return Fe(e,t,n)})))}function Ke(e,t){e=x(e);var n,r,o=this,u={},f=e.revs_limit,c=e.name;void 0===e.createIfMissing&&(e.createIfMissing=!0);var l,h=e.db,b=J(h);function v(){u.docStore=r.sublevel("document-store",{valueEncoding:qe}),u.bySeqStore=r.sublevel("by-sequence",{valueEncoding:"json"}),u.attachmentStore=r.sublevel("attach-store",{valueEncoding:"json"}),u.binaryStore=r.sublevel("attach-binary-store",{valueEncoding:"binary"}),u.localStore=r.sublevel("local-store",{valueEncoding:"json"}),u.metaStore=r.sublevel("meta-store",{valueEncoding:"json"}),"object"==typeof e.migrate?e.migrate.doMigrationTwo(r,u,_):_()}function _(){u.metaStore.get("_local_last_update_seq",(function(e,a){void 0===r._updateSeq&&(r._updateSeq=a||0),u.metaStore.get("_local_doc_count",(function(e,a){r._docCount=e?0:a,u.metaStore.get("_local_uuid",(function(e,r){n=e?ne():r,u.metaStore.put("_local_uuid",n,(function(){i((function(){t(null,o)}))}))}))}))}))}function E(e,t){try{e.apply(null,t)}catch(e){t[t.length-1](e)}}function S(){var e=r._queue.peekFront();"read"===e.type?function(e){var t=[e],n=1,o=r._queue.get(n);for(;void 0!==o&&"read"===o.type;)t.push(o),n++,o=r._queue.get(n);var a=0;t.forEach((function(e){var n=e.args,o=n[n.length-1];n[n.length-1]=p((function(e){o.apply(null,e),++a===t.length&&i((function(){t.forEach((function(){r._queue.shift()})),r._queue.length&&S()}))})),E(e.fun,n)}))}(e):function(e){var t=e.args,n=t[t.length-1];t[t.length-1]=p((function(e){n.apply(null,e),i((function(){r._queue.shift(),r._queue.length&&S()}))})),E(e.fun,t)}(e)}function k(e){return p((function(t){r._queue.push({fun:e,args:t,type:"write"}),1===r._queue.length&&i(S)}))}function O(e){return p((function(t){r._queue.push({fun:e,args:t,type:"read"}),1===r._queue.length&&i(S)}))}function R(e){return("0000000000000000"+e).slice(-16)}function A(e,t){"destroy"in h?h.destroy(e,t):t(null)}Pe.has(b)?l=Pe.get(b):(l=new m,Pe.set(b,l)),l.has(c)?(r=l.get(c),v()):l.set(c,he(s(h(c),e,(function(n){if(n)return l.delete(c),t(n);(r=l.get(c))._docCount=-1,r._queue=new y,"object"==typeof e.migrate?e.migrate.doMigrationOne(c,r,v):v()})))),o._remote=!1,o.type=function(){return"leveldb"},o._id=function(e){e(null,n)},o._info=function(e){var t={doc_count:r._docCount,update_seq:r._updateSeq,backend_adapter:J(h)};return i((function(){e(null,t)}))},o._get=O((function(e,t,n){t=x(t),u.docStore.get(e,(function(e,r){if(e||!r)return n(V(C,"missing"));var i;if(t.rev)i=t.latest?function(e,t){for(var n,r=t.rev_tree.slice();n=r.pop();){var i=n.pos,o=n.ids,a=o[0],s=o[1],u=o[2],f=0===u.length,c=n.history?n.history.slice():[];if(c.push({id:a,pos:i,opts:s}),f)for(var l=0,h=c.length;la.lte){var c={total_rows:i,offset:e.skip,rows:[]};return e.update_seq&&(c.update_seq=r._updateSeq),t(null,c)}var l=[],h=u.docStore.readStream(a),p=d.obj((function(t,n,r){var i=t.value,a=Ue(i),f=We(i,a);if(f){if("ok"!==e.deleted)return void r()}else{if(s-- >0)return void r();if("number"==typeof o&&o--<=0)return h.unpipe(),h.destroy(),void r()}function c(t){var n={id:i.id,key:i.id,value:{rev:a}};if(e.include_docs){if(n.doc=t,n.doc._rev=n.value.rev,e.conflicts){var o=me(i);o.length&&(n.doc._conflicts=o)}for(var s in n.doc._attachments)Object.prototype.hasOwnProperty.call(n.doc._attachments,s)&&(n.doc._attachments[s].stub=!0)}if(!1===e.inclusive_end&&i.id===e.endkey)return r();if(f){if("ok"!==e.deleted)return r();n.value.deleted=!0,n.doc=null}l.push(n),r()}if(e.include_docs){var d=i.rev_map[a];u.bySeqStore.get(R(d),(function(e,t){c(t)}))}else c()}),(function(n){Promise.resolve().then((function(){if(e.include_docs&&e.attachments)return ze(l,u,e)})).then((function(){var n={total_rows:i,offset:e.skip,rows:l};e.update_seq&&(n.update_seq=r._updateSeq),t(null,n)}),t),n()})).on("unpipe",(function(){p.end()}));h.on("error",t),h.pipe(p)}))}))(e,t)},o._changes=function(e){if((e=x(e)).continuous){var t=c+":"+ne();return De.addListener(c,t,o,e),De.notify(c),{cancel:function(){De.removeListener(c,t)}}}var n,i=e.descending,a=[],s=e.since||0,f=0,l={reverse:i};"limit"in e&&e.limit>0&&(n=e.limit),l.reverse||(l.start=R(e.since||0));var h=e.doc_ids&&new w(e.doc_ids),p=H(e),y=new m;function g(){e.done=!0,e.return_docs&&e.limit&&e.limit=n)return g(),c();if(e.cancelled||e.done)return c();var l,d,b=(l=t.key,parseInt(l,10)),v=t.value;if(b===e.since&&!i)return c();if(h&&!h.has(v._id))return c();function _(t){var n=Ue(t);function r(n){var r=e.processChange(n,t,e);r.seq=t.seq;var i=p(r);if("object"==typeof i)return e.complete(i);i&&(f++,e.attachments&&e.include_docs?ze([r],u,e).then((function(){e.onChange(r)})):e.onChange(r),e.return_docs&&a.push(r)),c()}if(t.seq!==b)return c();if(s=b,n===v._rev)return r(v);var i=t.rev_map[n];u.bySeqStore.get(R(i),(function(e,t){r(t)}))}if(d=y.get(v._id))return _(d);u.docStore.get(v._id,(function(t,n){if(e.cancelled||e.done||r.isClosed()||Me(n.id))return c();y.set(v._id,n),_(n)}))}),(function(t){if(e.cancelled)return t();e.return_docs&&e.limit&&e.limite.includes("-mrview-")).forEach(e=>{var t=r.get(e);t.removeAllListeners(),t.close(),r.delete(e)}),e()}}))},o._getRevisionTree=function(e,t){u.docStore.get(e,(function(e,n){e?t(V(C)):t(null,n.rev_tree)}))},o._doCompaction=k((function(e,t,n,r){o._doCompactionNoLock(e,t,n,r)})),o._doCompactionNoLock=function(e,t,n,i){if("function"==typeof n&&(i=n,n={}),!t.length)return i();var o=n.ctx||new Ne;o.get(u.docStore,e,(function(a,s){if(a)return i(a);var f=t.map((function(e){var t=s.rev_map[e];return delete s.rev_map[e],t}));_e(s.rev_tree,(function(e,n,r,i,o){var a=n+"-"+r;-1!==t.indexOf(a)&&(o.status="missing")}));var c=[];c.push({key:s.id,value:s,type:"put",prefix:u.docStore});var l,h={},d=0;function p(n){if(n&&(l=n),++d===t.length){if(l)return i(l);!function(){var n=Object.keys(h);if(!n.length)return y();var r,i=0;function a(e){e&&(r=e),++i===n.length&&y(r)}var s=new m;t.forEach((function(t){s.set(e+"@"+t,!0)})),n.forEach((function(e){o.get(u.attachmentStore,e,(function(t,n){if(t)return"NotFoundError"===t.name?a():a(t);var r=Object.keys(n.refs||{}).filter((function(e){return!s.has(e)})),i={};r.forEach((function(e){i[e]=!0})),r.length?c.push({key:e,type:"put",value:{refs:i},prefix:u.attachmentStore}):c=c.concat([{key:e,type:"del",prefix:u.attachmentStore},{key:e,type:"del",prefix:u.binaryStore}]),a()}))}))}()}}function y(e){return e?i(e):(o.batch(c),n.ctx?i():void o.execute(r,i))}f.forEach((function(e){c.push({key:R(e),type:"del",prefix:u.bySeqStore}),o.get(u.bySeqStore,R(e),(function(e,t){if(e)return"NotFoundError"===e.name?p():p(e);Object.keys(t._attachments||{}).forEach((function(e){var n=t._attachments[e].digest;h[n]=!0})),p()}))}))}))},o._getLocal=function(e,t){u.localStore.get(e,(function(e,n){e?t(V(C)):t(null,n)}))},o._putLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),t.ctx?o._putLocalNoLock(e,t,n):o._putLocalWithLock(e,t,n)},o._putLocalWithLock=k((function(e,t,n){o._putLocalNoLock(e,t,n)})),o._putLocalNoLock=function(e,t,n){delete e._revisions;var i=e._rev,o=e._id,a=t.ctx||new Ne;a.get(u.localStore,o,(function(s,f){if(s&&i)return n(V(I));if(f&&f._rev!==i)return n(V(I));e._rev=i?"0-"+(parseInt(i.split("-")[1],10)+1):"0-1";var c=[{type:"put",prefix:u.localStore,key:o,value:e}];a.batch(c);var l={ok:!0,id:e._id,rev:e._rev};if(t.ctx)return n(null,l);a.execute(r,(function(e){if(e)return n(e);n(null,l)}))}))},o._removeLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),t.ctx?o._removeLocalNoLock(e,t,n):o._removeLocalWithLock(e,t,n)},o._removeLocalWithLock=k((function(e,t,n){o._removeLocalNoLock(e,t,n)})),o._removeLocalNoLock=function(e,t,n){var i=t.ctx||new Ne;i.get(u.localStore,e._id,(function(o,a){if(o)return"NotFoundError"!==o.name?n(o):n(V(C));if(a._rev!==e._rev)return n(V(I));i.batch([{prefix:u.localStore,type:"del",key:e._id}]);var s={ok:!0,id:e._id,rev:"0-0"};if(t.ctx)return n(null,s);i.execute(r,(function(e){if(e)return n(e);n(null,s)}))}))},o._destroy=function(e,t){var n,r=J(h);if(!Pe.has(r))return A(c,t);(n=Pe.get(r)).has(c)?(De.removeAllListeners(c),n.get(c).close((function(){n.delete(c),A(c,t)}))):A(c,t)}}function Ve(e,t){var n=B({db:v},e);Ke.call(this,n,t)}Ve.valid=function(){return"undefined"!=typeof localStorage},Ve.use_prefix=!0,"undefined"==typeof PouchDB?function(e){if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}("error",'localstorage adapter plugin error: Cannot find global "PouchDB" object! Did you remember to include pouchdb.js?'):PouchDB.plugin((function(e){e.adapter("localstorage",Ve,!0)}))},{118:118,12:12,125:125,140:140,23:23,26:26,31:31,37:37,39:39,5:5,61:61,63:63,70:70,82:82,84:84}]},{},[143]);