$/.test(e.current())){r=/^([\S]+) (.*)/.exec(t.inTag),t.inTag=null,e=">"==e.current()&&function(e,t){for(var n=0;n","i"),o=new RegExp("","i");t.token=function(e,t){if(e.match(a,!1))return t.token=s,t.localState=t.localMode=null;t=t.localMode.token(e,t.localState);var n=e.current(),i=n.search(o);return-1e.length-n)break;(!i||a>i.index+i[0].length)&&(i=r),r=r.index+1}return i}function p(e,t,n){t=c(t,"g");var i=n.line,r=n.ch;for(n=e.firstLine();n<=i;i--,r=-1){var a=e.getLine(i);if(r=d(a,t,r<0?0:a.length-r))return{from:f(i,r.index),to:f(i,r.index+r[0].length),match:r}}}function h(e,t,n,i){if(e.length==t.length)return n;var r=0;for(t=n+Math.max(0,e.length-t.length);;){if(r==t)return r;var a=r+t>>1,o=i(e.slice(0,a)).length;if(o==n)return a;nr.cursorCoords(t,"window").top&&((p=n).style.opacity=.4)}))}var p=null;o=b(a=r),l=u,s=d,c=function(e,t){var n=h.keyName(e),i=r.getOption("extraKeys");"findNext"==(n=i&&i[n]||h.keyMap[r.getOption("keyMap")][n])||"findPrev"==n||"findPersistentNext"==n||"findPersistentPrev"==n?(h.e_stop(e),y(r,f(r),t),r.execCommand(n)):"find"!=n&&"findPersistent"!=n||(h.e_stop(e),d(t,e))},a.openDialog(o,s,{value:l,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){v(a)},onKeyDown:c}),n&&u&&(y(r,i,u),$(r,t))}else m(r,b(r),"Search for:",u,function(e){e&&!i.query&&r.operation(function(){y(r,i,e),i.posFrom=i.posTo=r.getCursor(),$(r,t)})})}function $(n,i,r){n.operation(function(){var e=f(n),t=g(n,e.query,i?e.posFrom:e.posTo);(t.find(i)||(t=g(n,e.query,i?h.Pos(n.lastLine()):h.Pos(n.firstLine(),0))).find(i))&&(n.setSelection(t.from(),t.to()),n.scrollIntoView({from:t.from(),to:t.to()},20),e.posFrom=t.from(),e.posTo=t.to(),r&&r(t.from(),t.to()))})}function v(t){t.operation(function(){var e=f(t);(e.lastQuery=e.query)&&(e.query=e.queryText=null,t.removeOverlay(e.overlay),e.annotate&&(e.annotate.clear(),e.annotate=null))})}function b(e){return''+e.phrase("Search:")+' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function w(t,i,r){t.operation(function(){for(var e=g(t,i);e.findNext();)if("string"!=typeof i){var n=t.getRange(e.from(),e.to()).match(i);e.replace(r.replace(/\$(\d)/g,function(e,t){return n[t]}))}else e.replace(r)})}function r(p,e){if(!p.getOption("readOnly")){var t=p.getSelection()||f(p).lastQuery,n=''+(e?p.phrase("Replace all:"):p.phrase("Replace:"))+"";m(p,n+' '+p.phrase("(Use /re/ syntax for regexp search)")+"",n,t,function(d){d&&(d=o(d),m(p,''+p.phrase("With:")+' ',p.phrase("Replace with:"),"",function(l){if(l=i(l),e)w(p,d,l);else{v(p);var s=g(p,d,p.getCursor("from")),c=function(){var e,t,n,i,r,a,o=s.from();!(e=s.findNext())&&(s=g(p,d),!(e=s.findNext())||o&&s.from().line==o.line&&s.from().ch==o.ch)||(p.setSelection(s.from(),s.to()),p.scrollIntoView({from:s.from(),to:s.to()}),n=''+(a=t=p).phrase("Replace?")+" ",i=p.phrase("Replace?"),r=[function(){u(e)},c,function(){w(p,d,l)}],t.openConfirm?t.openConfirm(n,r):confirm(i)&&r[0]())},u=function(n){s.replace("string"==typeof d?l:l.replace(/\$(\d)/g,function(e,t){return n[t]})),c()};c()}}))})}}h.commands.find=function(e){v(e),n(e)},h.commands.findPersistent=function(e){v(e),n(e,!1,!0)},h.commands.findPersistentNext=function(e){n(e,!1,!0,!0)},h.commands.findPersistentPrev=function(e){n(e,!0,!0,!0)},h.commands.findNext=n,h.commands.findPrev=function(e){n(e,!0)},h.commands.clearSearch=v,h.commands.replace=r,h.commands.replaceAll=function(e){r(e,!0)}},"object"==typeof i&&"object"==typeof n?r(t(102),t(107),t(108)):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],r):r(CodeMirror)},(L=L||{}).scope={},L.arrayIteratorImpl=function(e){var t=0;return function(){return t '+o.phrase("(Use line:column or scroll% syntax)")+"",i=n.phrase("Jump to line:"),r=l.line+1+":"+l.ch,a=function(e){var t;e&&((t=/^\s*([\+\-]?\d+)\s*:\s*(\d+)\s*$/.exec(e))?n.setCursor(s(n,t[1]),Number(t[2])):(t=/^\s*([\+\-]?\d+(\.\d+)?)%\s*/.exec(e))?(e=Math.round(n.lineCount()*Number(t[1])/100),/^[-+]/.test(t[1])&&(e=l.line+e+1),n.setCursor(e-1,l.ch)):(t=/^\s*:?\s*([\+\-]?\d+)\s*/.exec(e))&&n.setCursor(s(n,t[1]),l.ch))},e.openDialog?e.openDialog(t,a,{value:r,selectValueOnOpen:!0}):a(prompt(i,r))},e.keyMap.default["Alt-G"]="jumpToLine"},"object"==typeof i&&"object"==typeof n?r(t(102),t(108)):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],r):r(CodeMirror)},shadow$provide[111]=function(e,t,n,i){var g=this||{};try{!function(e){if("+"!==new e("q=%2B").get("q")||"+"!==new e({q:"+"}).get("q")||"+"!==new e([["q","+"]]).get("q")||"q=%0A"!==new e("q=\n").toString()||"q=+%26"!==new e({q:" &"}).toString()||"q=%25zx"!==new e({q:"%zx"}).toString())throw e;g.URLSearchParams=e}(URLSearchParams)}catch(e){!function(e,a,o){function t(e){var t=d(null);switch(p(this,"_ungap",{value:t}),!0){case!e:break;case"string"==typeof e:"?"===e.charAt(0)&&(e=e.slice(1));for(var n=0,i=(e=e.split("&")).length;n=this.size;)e=r.concat(this._buffered),this._bufferedBytes-=this.size,this.push(e.slice(0,this.size)),this._buffered=[e.slice(this.size,e.length)];n()},e.prototype._flush=function(){if(this._bufferedBytes&&this._zeroPadding){var e=r.alloc(this.size-this._bufferedBytes);this._buffered.push(e),this.push(r.concat(this._buffered)),this._buffered=null}else this._bufferedBytes&&(this.push(r.concat(this._buffered)),this._buffered=null);this.push(null)},n.exports=e},shadow$provide[120]=function(e,t,n,i){n.exports=function(e){return Math.max(16384,1<this._size&&(t=this._size),e===this._size?(this.destroy(),this.push(null)):(this.reader.readAsArrayBuffer(this._file.slice(e,t)),this._offset=t)}else this.once("_ready",this._read.bind(this))},e.prototype.destroy=function(){if(this._file=null,this.reader){this.reader.onload=null,this.reader.onerror=null;try{this.reader.abort()}catch(e){}}this.reader=null},n.exports=e},shadow$provide[124]=function(e,t,n,i){function r(e){return a.existsSync(e)&&a.statSync(e).isFile()}var a=t(27);n.exports=function(e,n){if(!n)return r(e);a.stat(e,function(e,t){return e?n(e):n(null,t.isFile())})},n.exports.sync=r},shadow$provide[125]=function(e,t,n,i){i.re=function(){throw Error("`junk.re` was renamed to `junk.regex`")},i.regex=/^npm-debug\.log$|^\..*\.swp$|^\.DS_Store$|^\.AppleDouble$|^\.LSOverride$|^Icon\r$|^\._.*|^\.Spotlight-V100(?:$|\/)|\.Trashes|^__MACOSX$|~$|^Thumbs\.db$|^ehthumbs\.db$|^Desktop\.ini$|@eaDir$/,i.is=function(e){return i.regex.test(e)},i.not=function(e){return!i.is(e)},i.default=n.exports},shadow$provide[126]=function(e,t,n,i){function r(e){return o(e,{objectMode:!0,highWaterMark:16})}function a(e){return o(e)}function o(e,t){return!e||"function"==typeof e||e._readableState?e:(t=new s.Readable(t).wrap(e),e.destroy&&(t.destroy=e.destroy.bind(e)),t)}function l(e,t){var n=s.Readable.call(this,t)||this;return n.destroyed=!1,n._drained=!1,n._forwarding=!1,n._current=null,n._toStreams2=t&&t.objectMode?r:a,"function"==typeof e?n._queue=e:(n._queue=e.map(n._toStreams2),n._queue.forEach(function(e){"function"!=typeof e&&n._attachErrorListener(e)})),n._next(),n}var s=t(37);L.inherits(l,s.Readable),l.prototype._read=function(){this._drained=!0,this._forward()},l.prototype._forward=function(){if(!this._forwarding&&this._drained&&this._current){this._forwarding=!0;for(var e;null!==(e=this._current.read())&&this._drained;)this._drained=this.push(e);this._forwarding=!1}},l.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,this._current&&this._current.destroy&&this._current.destroy(),"function"!=typeof this._queue&&this._queue.forEach(function(e){e.destroy&&e.destroy()}),e&&this.emit("error",e),this.emit("close"))},l.prototype._next=function(){var n=this;if(this._current=null,"function"==typeof this._queue)this._queue(function(e,t){if(e)return n.destroy(e);t=n._toStreams2(t),n._attachErrorListener(t),n._gotNextStream(t)});else{var e=this._queue.shift();"function"==typeof e&&(e=this._toStreams2(e()),this._attachErrorListener(e)),this._gotNextStream(e)}},l.prototype._gotNextStream=function(e){var t=this;if(e){this._current=e,this._forward();function n(){t._forward()}function i(){e._readableState.ended||t.destroy()}var r=function(){t._current=null,e.removeListener("readable",n),e.removeListener("end",r),e.removeListener("close",i),t._next()};e.on("readable",n),e.once("end",r),e.once("close",i)}else this.push(null),this.destroy()},l.prototype._attachErrorListener=function(t){var n=this;if(t){var i=function(e){t.removeListener("error",i),n.destroy(e)};t.once("error",i)}},l.obj=function(e){return new l(e,{objectMode:!0,highWaterMark:16})},n.exports=l},shadow$provide[127]=function(e,t,n,i){n.exports=function e(r,t){function n(){for(var e=Array(arguments.length),t=0;t>2),r=new Uint8Array(i.buffer),a=e%4,o=e-a;switch(a){case 0:r[3+o]=0;case 1:r[2+o]=0;case 2:r[1+o]=0;case 3:r[0+o]=0}for(r=1+(e>>2);r>2]|=128<<24-(e%4<<3),i[14+(2+(e>>2)&-16)]=t/536870912|0,i[15+(2+(e>>2)&-16)]=t<<3,n},c.prototype._write=function(e,t,n,i){s(e,this._h8,this._h32,t,n,i||0)},c.prototype._coreCall=function(e,t,n,i,r){var a=n;this._write(e,t,n),r&&(a=this._padChunk(n,i)),this._core.hash(a,this._padMaxChunkLen)},c.prototype.rawDigest=function(e){var t=e.byteLength||e.length||e.size||0;this._initState(this._heap,this._padMaxChunkLen);var n,i=this._maxChunkLen;for(n=0;n+i>2]|0;var a=m[t+324>>2]|0;var o=m[t+328>>2]|0;var l=m[t+332>>2]|0;var s=m[t+336>>2]|0;for(n=0;(n|0)<(e|0);n=n+64|0){var c=r;var u=a;var d=o;var p=l;var h=s;for(i=0;64>(i|0);i=i+4|0){var f=m[n+i>>2]|0;var g=((r<<5|r>>>27)+(a&o|~a&l)|0)+((f+s|0)+1518500249|0)|0;s=l;l=o;o=a<<30|a>>>2;a=r;r=g;m[e+i>>2]=f}for(i=e+64|0;(i|0)<(e+80|0);i=i+4|0)f=(m[i-12>>2]^m[i-32>>2]^m[i-56>>2]^m[i-64>>2])<<1|(m[i-12>>2]^m[i-32>>2]^m[i-56>>2]^m[i-64>>2])>>>31,g=((r<<5|r>>>27)+(a&o|~a&l)|0)+((f+s|0)+1518500249|0)|0,s=l,l=o,o=a<<30|a>>>2,a=r,r=g,m[i>>2]=f;for(i=e+80|0;(i|0)<(e+160|0);i=i+4|0)f=(m[i-12>>2]^m[i-32>>2]^m[i-56>>2]^m[i-64>>2])<<1|(m[i-12>>2]^m[i-32>>2]^m[i-56>>2]^m[i-64>>2])>>>31,g=((r<<5|r>>>27)+(a^o^l)|0)+((f+s|0)+1859775393|0)|0,s=l,l=o,o=a<<30|a>>>2,a=r,r=g,m[i>>2]=f;for(i=e+160|0;(i|0)<(e+240|0);i=i+4|0)f=(m[i-12>>2]^m[i-32>>2]^m[i-56>>2]^m[i-64>>2])<<1|(m[i-12>>2]^m[i-32>>2]^m[i-56>>2]^m[i-64>>2])>>>31,g=((r<<5|r>>>27)+(a&o|a&l|o&l)|0)+((f+s|0)-1894007588|0)|0,s=l,l=o,o=a<<30|a>>>2,a=r,r=g,m[i>>2]=f;for(i=e+240|0;(i|0)<(e+320|0);i=i+4|0)f=(m[i-12>>2]^m[i-32>>2]^m[i-56>>2]^m[i-64>>2])<<1|(m[i-12>>2]^m[i-32>>2]^m[i-56>>2]^m[i-64>>2])>>>31,g=((r<<5|r>>>27)+(a^o^l)|0)+((f+s|0)-899497514|0)|0,s=l,l=o,o=a<<30|a>>>2,a=r,r=g,m[i>>2]=f;r=r+c|0;a=a+u|0;o=o+d|0;l=l+p|0;s=s+h|0}m[t+320>>2]=r;m[t+324>>2]=a;m[t+328>>2]=o;m[t+332>>2]=l;m[t+336>>2]=s}}}},function(e,t){var c=this,u=void 0;"undefined"!=typeof self&&void 0!==self.FileReaderSync&&(u=new self.FileReaderSync);function d(e,t,n,i,r,a){var o=a%4,l=(r+o)%4,s=r-l;switch(o){case 0:t[a]=e[i+3];case 1:t[a+1-(o<<1)|0]=e[i+2];case 2:t[a+2-(o<<1)|0]=e[i+1];case 3:t[a+3-(o<<1)|0]=e[i]}if(!(r<4-o+l)){for(r=4-o;r>2|0]=e[i+r]<<24|e[i+r+1]<<16|e[i+r+2]<<8|e[i+r+3];switch(l){case 3:t[a+s+1|0]=e[i+s+2];case 2:t[a+s+2|0]=e[i+s+1];case 1:t[a+s+3|0]=e[i+s]}}}e.exports=function(e,t,n,i,r,a){if("string"==typeof e){var o=a%4,l=(r+o)%4,s=r-l;switch(o){case 0:t[a]=e.charCodeAt(i+3);case 1:t[a+1-(o<<1)|0]=e.charCodeAt(i+2);case 2:t[a+2-(o<<1)|0]=e.charCodeAt(i+1);case 3:t[a+3-(o<<1)|0]=e.charCodeAt(i)}if(!(r>2]=e.charCodeAt(i+r)<<24|e.charCodeAt(i+r+1)<<16|e.charCodeAt(i+r+2)<<8|e.charCodeAt(i+r+3);switch(l){case 3:t[a+s+1|0]=e.charCodeAt(i+s+2);case 2:t[a+s+2|0]=e.charCodeAt(i+s+1);case 1:t[a+s+3|0]=e.charCodeAt(i+s)}}}else{if(e instanceof Array||c&&c.Buffer&&c.Buffer.isBuffer(e))return d(e,t,n,i,r,a);if(e instanceof ArrayBuffer)return d(new Uint8Array(e),t,n,i,r,a);if(e.buffer instanceof ArrayBuffer)return d(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t,n,i,r,a);if(!(e instanceof Blob))throw Error("Unsupported data type.");switch(s=r-(l=(r+(o=a%4))%4),e=new Uint8Array(u.readAsArrayBuffer(e.slice(i,i+r))),o){case 0:t[a]=e[3];case 1:t[a+1-(o<<1)|0]=e[2];case 2:t[a+2-(o<<1)|0]=e[1];case 3:t[a+3-(o<<1)|0]=e[0]}if(!(r>2|0]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3];switch(l){case 3:t[a+s+1|0]=e[s+2];case 2:t[a+s+2|0]=e[s+1];case 1:t[a+s+3|0]=e[s]}}}}},function(e,t,n){var i=n(0),r=n(1).toHex,a=(o.prototype.update=function(e){return this._rusha.append(e),this},o.prototype.digest=function(e){var t=this._rusha.rawEnd().buffer;if(!e)return t;if("hex"===e)return r(t);throw Error("unsupported digest encoding")},o);function o(){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this._rusha=new i,this._rusha.resetState()}e.exports=function(){return new a}}],i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=3);function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,r},"object"==typeof i&&"object"==typeof n?n.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof i?i.Rusha=a():r.Rusha=a()},shadow$provide[131]=function(e,t,n,i){var r,a,o,l=t(130);n.exports=function(e,t){r||(r=l.createWorker(),a=1,o={},r.onmessage=function(e){var t=e.data.id,n=o[t];delete o[t],null!=e.data.error?n(Error("Rusha worker error: "+e.data.error)):n(null,e.data.hash)}),o[a]=t,r.postMessage({id:a,data:e}),a+=1}},shadow$provide[132]=function(e,t,n,i){function r(e){return a.digest(e)}e=t(130);var o=t(131),a=new e,l=(t=(t="undefined"!=typeof window?window:self).crypto||t.msCrypto||{}).subtle||t.webkitSubtle;try{l.digest({name:"sha-1"},new Uint8Array).catch(function(){l=!1})}catch(e){l=!1}n.exports=function(n,a){l?("string"==typeof n&&(n=function(e){for(var t=e.length,n=new Uint8Array(t),i=0;i>>4).toString(16)),n.push((15&r).toString(16))}e=n.join(""),a(e)},function(){a(r(n))})):"undefined"!=typeof window?o(n,function(e,t){a(e?r(n):t)}):queueMicrotask(function(){return a(r(n))})},n.exports.sync=r},shadow$provide[133]=function(t,e,n,i){function p(e){return e.reduce(function(e,t){return Array.isArray(t)?e.concat(p(t)):e.concat(t)},[])}function a(i,t,n){function r(){A(i.map(function(c){return function(e){var n,i,r,t,a,o,l,s={};if(g(c))s.getStream=(l=c,function(){return new b(l)}),s.length=c.size;else if(y.isBuffer(c))s.getStream=(o=c,function(){var e=new E.PassThrough;return e.end(o),e}),s.length=c.length;else{if(!m(c)){if("string"!=typeof c)throw Error("invalid input type");if("function"!=typeof w.stat)throw Error("filesystem paths do not work in the browser");return i=1t._pos){if(e=n.substr(t._pos),"x-user-defined"===t._charset){for(var i=new c(e.length),r=0;rt._pos&&(t.push(new c(new Uint8Array(a.result.slice(t._pos)))),t._pos=a.result.byteLength)},a.onload=function(){t.push(null)},a.readAsArrayBuffer(n)}}t._xhr.readyState===o.DONE&&"ms-stream"!==t._mode&&t.push(null)}},shadow$provide[137]=function(e,t,n,i){var r=t(23).Buffer;n.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,i=0;i>>10&1023|55296),e=56320|1023&e),t+v(e)}).join("")}function m(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function y(e,t,n){var i=0;for(e=n?$(e/700):e>>1,e+=$(e/t);455$((2147483647-a)/c))&&f("overflow"),a+=u*c;var d=n<=l?1:l+26<=n?26:n-l;if(u$(2147483647/(u=36-d))&&f("overflow"),c*=u}l=y(a-t,c=i.length+1,0==t),$(a/c)>2147483647-o&&f("overflow"),o+=$(a/c),a%=c,i.splice(a++,0,o)}return p(i)}function i(e){var t,n,i,r=[],a=(e=g(e)).length,o=128,l=0,s=72;for(i=0;i$((2147483647-l)/d)&&f("overflow"),l+=(u-o)*d,o=u,i=0;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,v=String.fromCharCode,b={version:"1.4.1",ucs2:{decode:g,encode:p},decode:n,encode:i,toASCII:function(e){return t(e,function(e){return u.test(e)?"xn--"+i(e):e})},toUnicode:function(e){return t(e,function(e){return c.test(e)?n(e.slice(4).toLowerCase()):e})}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return b});else if(a&&o)if(k.exports==a)o.exports=b;else for(s in b)b.hasOwnProperty(s)&&(a[s]=b[s]);else e.punycode=b}(this)},shadow$provide[142]=function(e,t,n,i){n.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},shadow$provide[143]=function(e,t,n,i){n.exports=function(e,t,n,i){n=n||"=";var r={};if("string"!=typeof e||0===e.length)return r;var a=/\+/g;for(e=e.split(t||"&"),t=1e3,i&&"number"==typeof i.maxKeys&&(t=i.maxKeys),i=e.length,0"` \r\n\t'.split(""));var g=["'"].concat(e),m=["%","/","?",";","#"].concat(g),y=["/","?","#"],$=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},k={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=t(145);u.prototype.parse=function(e,t,n){if(!p.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?");if(i=-1!==i&&i>i)<<(i=(i+5)%8)|(t+1>8-i,t++):(a=a>>8-(i+5)&31,0===(i=(i+5)%8)&&t++),r[n]="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".charCodeAt(a),n++}for(t=n;t>>(t=(t+5)%8),i[n]=o,n++,o=255&a<<8-t}return i.slice(0,n)}},shadow$provide[151]=function(e,t,n,i){e=t(150),i.encode=e.encode,i.decode=e.decode},shadow$provide[152]=function(e,t,n,i){n.exports=function(e,t,n){if(0===e.length)return e;if(t){n||e.sort(t),n=1;for(var i,r=e.length,a=e[0],o=1;o>3;return 0!=e%8&&t++,t}(e=function(e,t){e=void 0===e?0:e,this.grow=(t=null!=t&&t.grow)&&isFinite(t)&&r(t)||t||0,this.buffer="number"==typeof e?new Uint8Array(r(e)):e}).prototype.get=function(e){var t=e>>3;return t>e%8)},e.prototype.set=function(e,t){var n=e>>3;void 0===t||t?(this.buffer.length<1+n&&((t=Math.max(1+n,Math.min(2*this.buffer.length,this.grow)))<=this.grow&&((t=new Uint8Array(t)).set(this.buffer),this.buffer=t)),this.buffer[n]|=128>>e%8):n>e%8))},void 0!==n&&(n.exports=e)},shadow$provide[162]=function(e,t,n,i){var a=t(119),o=t(37);e=function(t,e,n){n=void 0===n?{}:n;var i=o.Writable.call(this,n)||this;if(!t||!t.put||!t.get)throw Error("First argument must be an abstract-chunk-store compliant store");if(!(e=Number(e)))throw Error("Second argument must be a chunk length");i._blockstream=new a(e,{zeroPadding:!1});var r=i._outstandingPuts=0;return i._blockstream.on("data",function(e){i.destroyed||(i._outstandingPuts+=1,t.put(r,e,function(){--i._outstandingPuts,0===i._outstandingPuts&&"function"==typeof i._finalCb&&(i._finalCb(null),i._finalCb=null)}),r+=1)}).on("error",function(e){i.destroy(e)}),i},L.inherits(e,o.Writable),e.prototype._write=function(e,t,n){this._blockstream.write(e,t,n)},e.prototype._final=function(e){var t=this;this._blockstream.end(),this._blockstream.once("end",function(){0===t._outstandingPuts?e(null):t._finalCb=e})},e.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))},n.exports=e},shadow$provide[163]=function(e,t,n,i){var r=t(23).Buffer;i.DEFAULT_ANNOUNCE_PEERS=50,i.MAX_ANNOUNCE_PEERS=82,i.binaryToHex=function(e){return"string"!=typeof e&&(e=String(e)),r.from(e,"binary").toString("hex")},i.hexToBinary=function(e){return"string"!=typeof e&&(e=String(e)),r.from(e,"hex").toString("binary")},e=t(27),Object.assign(i,e)},shadow$provide[164]=function(e,t,n,i){var r=t(23).Buffer,a=t(114)("simple-websocket"),o=t(156),l=t(37),s=t(157),c=t(27),u="function"!=typeof c?WebSocket:c;e=function(e){"string"==typeof(e=void 0===e?{}:e)&&(e={url:e}),e=Object.assign({allowHalfOpen:!1},e);var t=l.Duplex.call(this,e)||this;if(null==e.url&&null==e.socket)throw Error("Missing required `url` or `socket` option");if(null!=e.url&&null!=e.socket)throw Error("Must specify either `url` or `socket` option, not both");if(t._id=o(4).toString("hex").slice(0,7),t._debug("new websocket: %o",e),t.connected=!1,t.destroyed=!1,t._chunk=null,t._cb=null,t._interval=null,e.socket)t.url=e.socket.url,t._ws=e.socket,t.connected=e.socket.readyState===u.OPEN;else{t.url=e.url;try{t._ws="function"==typeof c?new u(e.url,e):new u(e.url)}catch(e){return s(function(){return t.destroy(e)}),t}}return t._ws.binaryType="arraybuffer",t._ws.onopen=function(){t._onOpen()},t._ws.onmessage=function(e){t._onMessage(e)},t._ws.onclose=function(){t._onClose()},t._ws.onerror=function(){t.destroy(Error("connection error to "+t.url))},t._onFinishBound=function(){t._onFinish()},t.once("finish",t._onFinishBound),t},L.inherits(e,l.Duplex),e.prototype.send=function(e){this._ws.send(e)},e.prototype.destroy=function(e){this._destroy(e,function(){})},e.prototype._destroy=function(e,t){if(!this.destroyed){if(this._debug("destroy (error: %s)",e&&(e.message||e)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this.connected=!1,this.destroyed=!0,clearInterval(this._interval),this._cb=this._chunk=this._interval=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._ws){var n=this._ws,i=function(){n.onclose=null};if(n.readyState===u.CLOSED)i();else try{n.onclose=i,n.close()}catch(e){i()}n.onopen=null,n.onmessage=null,n.onerror=function(){}}this._ws=null,e&&("undefined"!=typeof DOMException&&e instanceof DOMException&&(i=e.code,(e=Error(e.message)).code=i),this.emit("error",e)),this.emit("close"),t()}},e.prototype._read=function(){},e.prototype._write=function(e,t,n){if(this.destroyed)return n(Error("cannot write after socket is destroyed"));if(this.connected){try{this.send(e)}catch(e){return this.destroy(e)}"function"!=typeof c&&65536this._metadataSize&&(n=this._metadataSize),t=this.metadata.slice(t,n),this._data(e,t,this._metadataSize)}else this._reject(e)},e.prototype._onData=function(e,t,n){16384this._bufferDuration)&&this._cb){var e=this._cb;this._cb=null,e()}},a.prototype._getBufferDuration=function(){for(var e=this._sourceBuffer.buffered,t=this._elem.currentTime,n=-1,i=0;i=e.length)throw new RangeError("invalid lower bound");if(void 0===r)r=e.length-1;else if((r|=0)=e.length)throw new RangeError("invalid upper bound");for(;i<=r;){var a=i+(r-i>>>1),o=+n(e[a],t,a,e);if(o<0)i=a+1;else{if(!(0e.length)throw new RangeError("Out of range index");return(n>>>=0)<(i=void 0===i?e.length:i>>>0)&&e.fill(t,n,i),e}var o=t(23).Buffer,l=function(){try{if(!o.isEncoding("latin1"))return!1;var e=o.alloc?o.alloc(4):new o(4);return e.fill("ab","ucs2"),"61006200"===e.toString("hex")}catch(e){return!1}}();n.exports=function(e,t,n,i,r){if(l)return e.fill(t,n,i,r);if("number"==typeof t)return a(e,t,n,i);if("string"==typeof t){if("string"==typeof n?(r=n,n=0,i=e.length):"string"==typeof i&&(r=i,i=e.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("latin1"===r&&(r="binary"),"string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(""===t)return a(e,0,n,i);if(1===t.length&&t.charCodeAt(0)<256)return a(e,t.charCodeAt(0),n,i);t=new o(t,r)}if(o.isBuffer(t)){if(n<0||i>e.length)throw new RangeError("Out of range index");if(!(i<=n)){for(i=void 0===i?e.length:i>>>0,n>>>=0,r=t.length;n<=i-r;)t.copy(e,n),n+=r;n!==i&&t.copy(e,n,0,i-n)}return e}return a(e,0,n,i)}},shadow$provide[186]=function(e,t,n,i){var r=t(23).Buffer;n.exports=function(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');return r.allocUnsafe?r.allocUnsafe(e):new r(e)}},shadow$provide[187]=function(e,t,n,i){var r=t(23).Buffer,a=t(185),o=t(186);n.exports=function(e,t,n){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');if(r.alloc)return r.alloc(e,t,n);var i=o(e);return 0===e?i:void 0===t?a(i,0):("string"!=typeof n&&(n=void 0),a(i,t,n))}},shadow$provide[188]=function(e,t,n,i){var r=t(187),a=Math.pow(2,32);i.encodingLength=function(){return 8},i.encode=function(e,t,n){t=t||r(8),n=n||0;var i=Math.floor(e/a);return e-=i*a,t.writeUInt32BE(i,n),t.writeUInt32BE(e,n+4),t},i.decode=function(e,t){t=t||0;var n=e.readUInt32BE(t);return e=e.readUInt32BE(t+4),n*a+e},i.encode.bytes=8,i.decode.bytes=8},shadow$provide[189]=function(e,t,n,l){var s=t(23).Buffer,c={3:"ESDescriptor",4:"DecoderConfigDescriptor",5:"DecoderSpecificInfo",6:"SLConfigDescriptor"};l.Descriptor={},l.Descriptor.decode=function(e,t,n){var i=e.readUInt8(t),r=t+1,a=0;do{var o=e.readUInt8(r++);a=a<<7|127&o}while(128&o);return(e=l[o=c[i]]?l[o].decode(e,r,n):{buffer:s.from(e.slice(r,r+a))}).tag=i,e.tagName=o,e.length=r-t+a,e.contentsLen=a,e},l.DescriptorArray={},l.DescriptorArray.decode=function(e,t,n){for(var i={};t+2<=n;){var r=l.Descriptor.decode(e,t,n);t+=r.length,i[c[r.tag]||"Descriptor"+r.tag]=r}return i},l.ESDescriptor={},l.ESDescriptor.decode=function(e,t,n){var i=e.readUInt8(t+2);t+=3,128&i&&(t+=2),64&i&&(t+=e.readUInt8(t)+1);return 32&i&&(t+=2),l.DescriptorArray.decode(e,t,n)},l.DecoderConfigDescriptor={},l.DecoderConfigDescriptor.decode=function(e,t,n){var i=e.readUInt8(t);return(e=l.DescriptorArray.decode(e,t+13,n)).oti=i,e}},shadow$provide[190]=function(e,t,n,a){function o(e,t,n){for(;t>3:0;var i=null;return t&&(i=t.toString(16),n&&(i+="."+n)),{mimeCodec:i,buffer:d.from(e.slice(0))}},a.esds.encodingLength=function(e){return e.buffer.length},a.stsz={},a.stsz.encode=function(e,t,n){var i=e.entries||[];for((t=t?t.slice(n):d.alloc(a.stsz.encodingLength(e))).writeUInt32BE(0,0),t.writeUInt32BE(i.length,4),e=0;en-t)throw Error("Data too short");return s.decodeWithoutHeaders(i,e,t+i.headersLen,t+i.length)},s.decodeWithoutHeaders=function(e,t,n,i){n=n||0,i=i||t.length;var r=e.type,a={};if(p[r])for(a.otherBoxes=[],r=p[r];8<=i-n;){var o=s.decode(t,n,i);if(n+=o.length,0<=r.indexOf(o.type))a[o.type]=o;else if(0<=r.indexOf(o.type+"s")){var l=o.type+"s";(a[l]=a[l]||[]).push(o)}else a.otherBoxes.push(o)}else d[r]?a=(a=d[r].decode)(t,n,i):a.buffer=c.from(t.slice(n,i));return a.length=e.length,a.contentLen=e.contentLen,a.type=e.type,a.version=e.version,a.flags=e.flags,a},s.encodingLength=function(n){var e=n.type,i=8;if(d.fullBoxes[e]&&(i+=4),p[e])p[e].forEach(function(t){if(5===t.length){var e=n[t]||[];t=t.substr(0,4),e.forEach(function(e){e.type=t,i+=s.encodingLength(e)})}else n[t]&&((e=n[t]).type=t,i+=s.encodingLength(e))}),n.otherBoxes&&n.otherBoxes.forEach(function(e){i+=s.encodingLength(e)});else if(d[e])i+=d[e].encodingLength(n);else{if(!n.buffer)throw Error("Either `type` must be set to a known type (not'"+e+"') or `buffer` must be set");i+=n.buffer.length}return 4294967295=e.length)return this._position+=e.length,n(null);if(a>e.length){this._position+=e.length,r=0===r?e:e.slice(r),t=i.stream.write(r)&&t;break}this._position+=a,r=0===r&&a===e.length?e:e.slice(r,a),t=i.stream.write(r)&&t,i.last&&i.stream.end(),e=e.slice(a),this._queue.shift()}t?n(null):i.stream.once("drain",n.bind(null,null))},e.prototype.slice=function(n){var i=this;if(this.destroyed)return null;Array.isArray(n)||(n=[n]);var r=new a;return n.forEach(function(e,t){i._queue.push({start:e.start,end:e.end,stream:r,last:t===n.length-1})}),this._buffer&&this._write(this._buffer,null,this._cb),r},e.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e))},n.exports=e},shadow$provide[196]=function(e,t,n,i){function k(){return{version:0,flags:0,entries:[]}}var _=t(23).Buffer,r=t(183),a=t(15),s=t(194),x=t(191),c=t(195);e=function(e){var t=a.call(this)||this;return t._tracks=[],t._file=e,t._decoder=null,t._findMoov(0),t},L.inherits(e,a),e.prototype._findMoov=function(t){var n=this;this._decoder&&this._decoder.destroy();var i=0;this._decoder=s.decode();var r=this._file.createReadStream({start:t});r.pipe(this._decoder);var a=function(e){"moov"===e.type?(n._decoder.removeListener("box",a),n._decoder.decode(function(e){r.destroy();try{n._processMoov(e)}catch(e){e.message="Cannot parse mp4 file: "+e.message,n.emit("error",e)}})):e.length<4096?(i+=e.length,n._decoder.ignore()):(n._decoder.removeListener("box",a),i+=e.length,r.destroy(),n._decoder.destroy(),n._findMoov(t+i))};this._decoder.on("box",a)},e.prototype._processMoov=function(e){var t=e.traks;this._tracks=[],this._hasAudio=this._hasVideo=!1;for(var n=0;n=r.stsz.entries.length)break;u+=y,++s>=m.samplesPerChunk&&(u=s=0,c++,(m=r.stsc.entries[d+1])&&c+1>=m.firstChunk&&d++),p+=$,h.inc(),f&&f.inc(),b&&g++}i.mdia.mdhd.duration=0,i.tkhd.duration=0,o=m.sampleDescriptionId,r={type:"moov",mvhd:e.mvhd,traks:[{tkhd:i.tkhd,mdia:{mdhd:i.mdia.mdhd,hdlr:i.mdia.hdlr,elng:i.mdia.elng,minf:{vmhd:i.mdia.minf.vmhd,smhd:i.mdia.minf.smhd,dinf:i.mdia.minf.dinf,stbl:{stsd:r.stsd,stts:k(),ctts:k(),stsc:k(),stsz:k(),stco:k(),stss:k()}}}}],mvex:{mehd:{fragmentDuration:e.mvhd.duration},trexs:[{trackId:i.tkhd.trackId,defaultSampleDescriptionIndex:o,defaultSampleDuration:0,defaultSampleSize:0,defaultSampleFlags:0}]}},this._tracks.push({fragmentSequence:1,trackId:i.tkhd.trackId,timeScale:i.mdia.mdhd.timeScale,samples:a,currSample:null,currTime:null,moov:r,mime:l})}if(0===this._tracks.length)this.emit("error",Error("no playable tracks"));else{e.mvhd.duration=0,this._ftyp={type:"ftyp",brand:"iso5",brandVersion:0,compatibleBrands:["iso5"]};var w=x.encode(this._ftyp);e=this._tracks.map(function(e){var t=x.encode(e.moov);return{mime:e.mime,init:_.concat([w,t])}}),this.emit("ready",e)}},e.prototype.seek=function(t){var o=this;if(!this._tracks)throw Error("Not ready yet; wait for 'ready' event");this._fileStream&&(this._fileStream.destroy(),this._fileStream=null);var l=-1;if(this._tracks.map(function(n,i){n.outStream&&n.outStream.destroy(),n.inStream&&(n.inStream.destroy(),n.inStream=null);var r=n.outStream=s.encode(),e=o._generateFragment(i,t);if(!e)return r.finalize();(-1===l||e.ranges[0].start=n.samples.length)return null;for(var i=n.samples[t].dts,r=0,a=[],o=t;o=+n.timeScale)break;r+=l.size;var s=a.length-1;s<0||a[s].end!==l.offset?a.push({start:l.offset,end:l.offset+l.size}):a[s].end+=l.size}return n.currSample=o,{moof:this._generateMoof(e,t,o),ranges:a,length:r}},e.prototype._generateMoof=function(e,t,n){e=this._tracks[e];for(var i=[],r=0,a=t;a=this._entries[this._index][this._countName]&&(this._index++,this._offset=0),this.value=this._entries[this._index]},n.exports=e},shadow$provide[197]=function(e,t,n,i){function r(e,t,n){var i=this;if(n=void 0===n?{}:n,!(this instanceof r))return console.warn("don't invoked VideoStream without 'new'"),new r(e,t,n);this.detailedError=null,this._elem=t,this._elemWrapper=new a(t),this._waitingFired=!1,this._trackMeta=null,this._file=e,this._tracks=null,"none"!==this._elem.preload&&this._createMuxer(),this._onError=function(){i.detailedError=i._elemWrapper.detailedError,i.destroy()},this._onWaiting=function(){i._waitingFired=!0,i._muxer?i._tracks&&i._pump():i._createMuxer()},t.autoplay&&(t.preload="auto"),t.addEventListener("waiting",this._onWaiting),t.addEventListener("error",this._onError)}var a=t(180),o=t(174),l=t(196);r.prototype={_createMuxer:function(){var i=this;this._muxer=new l(this._file),this._muxer.on("ready",function(e){i._tracks=e.map(function(e){var t=i._elemWrapper.createWriteStream(e.mime);t.on("error",function(e){i._elemWrapper.error(e)});var n={muxed:null,mediaSource:t,initFlushed:!1,onInitFlushed:null};return t.write(e.init,function(e){n.initFlushed=!0,n.onInitFlushed&&n.onInitFlushed(e)}),n}),!i._waitingFired&&"auto"!==i._elem.preload||i._pump()}),this._muxer.on("error",function(e){i._elemWrapper.error(e)})},_pump:function(){var i=this,r=this._muxer.seek(this._elem.currentTime,!this._tracks);this._tracks.forEach(function(e,t){function n(){e.muxed&&(e.muxed.destroy(),e.mediaSource=i._elemWrapper.createWriteStream(e.mediaSource),e.mediaSource.on("error",function(e){i._elemWrapper.error(e)})),e.muxed=r[t],o(e.muxed,e.mediaSource)}e.initFlushed?n():e.onInitFlushed=function(e){e?i._elemWrapper.error(e):n()}})},destroy:function(){this.destroyed||(this.destroyed=!0,this._elem.removeEventListener("waiting",this._onWaiting),this._elem.removeEventListener("error",this._onError),this._tracks&&this._tracks.forEach(function(e){e.muxed&&e.muxed.destroy()}),this._elem.src="")}},n.exports=r},shadow$provide[198]=function(e,t,n,i){function a(n,i,e,r){function t(){return!("number"==typeof n.length&&n.length>e.maxBlobLength)||(v("File length too large for Blob URL approach: %d (max: %d)",n.length,e.maxBlobLength),c(Error("File length too large for Blob URL approach: "+n.length+" (max: "+e.maxBlobLength+")")),0)}function a(e){t()&&(u=i(e),$(n,function(e,t){if(e)return c(e);u.addEventListener("error",c),u.addEventListener("loadstart",o),u.addEventListener("canplay",l),u.src=t}))}function o(){u.removeEventListener("loadstart",o),e.autoplay&&u.play()}function l(){u.removeEventListener("canplay",l),r(null,u)}function s(){$(n,function(e,t){if(e)return c(e);".pdf"!==p?((u=i("iframe")).sandbox="allow-forms allow-scripts",u.src=t):((u=i("object")).setAttribute("typemustmatch",!0),u.setAttribute("type","application/pdf"),u.setAttribute("data",t)),r(null,u)})}function c(e){e.message='Error rendering file "'+n.name+'": '+e.message,v(e.message),r(e)}var u,d,p=k.extname(n.name).toLowerCase(),h=0;function f(){v("Use MediaSource API for "+n.name),y(),u.addEventListener("error",m),u.addEventListener("loadstart",o),u.addEventListener("canplay",l);var e=new w(u).createWriteStream({".m4a":'audio/mp4; codecs="mp4a.40.5"',".m4b":'audio/mp4; codecs="mp4a.40.5"',".m4p":'audio/mp4; codecs="mp4a.40.5"',".m4v":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".mkv":'video/webm; codecs="avc1.640029, mp4a.40.5"',".mp3":"audio/mpeg",".mp4":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".webm":'video/webm; codecs="vorbis, vp8"'}[k.extname(n.name).toLowerCase()]);n.createReadStream().pipe(e),h&&(u.currentTime=h)}function g(){v("Use Blob URL for "+n.name),y(),u.addEventListener("error",c),u.addEventListener("loadstart",o),u.addEventListener("canplay",l),$(n,function(e,t){if(e)return c(e);u.src=t,h&&(u.currentTime=h)})}function m(e){v("MediaSource API error: fallback to Blob URL: %o",e.message||e),t()&&(u.removeEventListener("error",m),u.removeEventListener("canplay",l),g())}function y(){u||(u=i(d)).addEventListener("progress",function(){h=u.currentTime})}0<=A.indexOf(p)?(d=0<=I.indexOf(p)?"video":"audio",z?0<=x.indexOf(p)?(v("Use `videostream` package for "+n.name),y(),u.addEventListener("error",function e(t){v("videostream error: fallback to MediaSource API: %o",t.message||t),u.removeEventListener("error",e),u.removeEventListener("canplay",l),f()}),u.addEventListener("loadstart",o),u.addEventListener("canplay",l),_(n,u)):f():g()):0<=j.indexOf(p)?a("video"):0<=E.indexOf(p)?a("audio"):0<=C.indexOf(p)?(u=i("img"),$(n,function(e,t){if(e)return c(e);u.src=t,u.alt=n.name,r(null,u)})):(0<=S.indexOf(p)?s:function(){v('Unknown file extension "%s" - will attempt to render into iframe',p);var t="";n.createReadStream({start:0,end:1e3}).setEncoding("utf8").on("data",function(e){t+=e}).on("end",function(){b(t)?(v('File extension "%s" appears ascii, so will render.',p),s()):(v('File extension "%s" appears non-ascii, will not render.',p),r(Error('Unsupported file type "'+p+'": Cannot append to DOM')))}).on("error",r)})()}function $(e,t){var n=k.extname(e.name).toLowerCase();r(e.createReadStream(),i.mime[n]).then(function(e){return t(null,e)},function(e){return t(e)})}function o(e){if(null==e)throw Error("file cannot be null or undefined");if("string"!=typeof e.name)throw Error("missing or invalid file.name property");if("function"!=typeof e.createReadStream)throw Error("missing or invalid file.createReadStream property")}function l(e){null==e.autoplay&&(e.autoplay=!1),null==e.muted&&(e.muted=!1),null==e.controls&&(e.controls=!0),null==e.maxBlobLength&&(e.maxBlobLength=c)}function s(e,t){e.autoplay=!!t.autoplay,e.muted=!!t.muted,e.controls=!!t.controls}i.render=function(n,i,r,e){"function"==typeof r&&(e=r,r={}),r=r||{},e=e||function(){},o(n),l(r),"string"==typeof i&&(i=document.querySelector(i)),a(n,function(e){if(i.nodeName===e.toUpperCase())return"video"!==e&&"audio"!==e||s(i,r),i;var t=k.extname(n.name).toLowerCase();throw Error('Cannot render "'+t+'" inside a "'+i.nodeName.toLowerCase()+'" element, expected "'+e+'"')},r,e)},i.append=function(e,t,n,i){function r(e){return e=document.createElement(e),t.appendChild(e),e}if("function"==typeof n&&(i=n,n={}),n=n||{},i=i||function(){},o(e),l(n),"string"==typeof t&&(t=document.querySelector(t)),t&&("VIDEO"===t.nodeName||"AUDIO"===t.nodeName))throw Error("Invalid video/audio node argument. Argument must be root element that video/audio tag will be appended to.");a(e,function(e){return"video"===e||"audio"===e?(s(e=r(e),n),t.appendChild(e),e):r(e)},n,function(e,t){e&&t&&t.remove(),i(e,t)})},i.mime=t(178);var v=t(114)("render-media"),b=t(179),w=t(180),k=t(100),r=t(182),_=t(197),x=[".m4a",".m4b",".m4p",".m4v",".mp4"],I=[".m4v",".mkv",".mp4",".webm"],A=[].concat(I,[".m4a",".m4b",".m4p",".mp3"]),j=[".mov",".ogv"],E=[".aac",".oga",".ogg",".wav",".flac"],C=".bmp .gif .jpeg .jpg .png .svg".split(" "),S=".css .html .js .md .pdf .txt".split(" "),c=2e8,z="undefined"!=typeof window&&window.MediaSource},shadow$provide[199]=function(e,t,n,i){var a=t(23).Buffer,o=t(128);n.exports=function(e,t,n){n=o(n);var i=a.alloc(t),r=0;e.on("data",function(e){e.copy(i,r),r+=e.length}).on("end",function(){n(null,i)}).on("error",n)}},shadow$provide[200]=function(e,t,n,i){var r=t(114)("webtorrent:file-stream"),a=t(37);e=function(e,t){var n=a.Readable.call(this,t)||this;n.destroyed=!1,n._torrent=e._torrent;var i=t&&t.start||0;t=t&&t.end&&t.end=e.length||t<0)){var n=e.pop();if(t=this._parserSize;)e=1===this._buffer.length?this._buffer[0]:a.concat(this._buffer),this._buffer=(this._bufferSize-=this._parserSize)?[e.slice(this._parserSize)]:[],this._parser(e.slice(0,this._parserSize));n(null)},e.prototype._callback=function(e,t,n){e&&(this._clearTimeout(),this.peerChoking||this._finished||this._updateTimeout(),e.callback(t,n))},e.prototype._clearTimeout=function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)},e.prototype._updateTimeout=function(){var e=this;this._timeoutMs&&this.requests.length&&!this._timeout&&(this._timeout=setTimeout(function(){return e._onTimeout()},this._timeoutMs),this._timeoutUnref&&this._timeout.unref&&this._timeout.unref())},e.prototype._parse=function(e,t){this._parserSize=e,this._parser=t},e.prototype._onMessageLength=function(e){0<(e=e.readUInt32BE(0))?this._parse(e,this._onMessage):(this._onKeepAlive(),this._parse(4,this._onMessageLength))},e.prototype._onMessage=function(e){switch(this._parse(4,this._onMessageLength),e[0]){case 0:return this._onChoke();case 1:return this._onUnchoke();case 2:return this._onInterested();case 3:return this._onUninterested();case 4:return this._onHave(e.readUInt32BE(1));case 5:return this._onBitField(e.slice(1));case 6:return this._onRequest(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 7:return this._onPiece(e.readUInt32BE(1),e.readUInt32BE(5),e.slice(9));case 8:return this._onCancel(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 9:return this._onPort(e.readUInt16BE(1));case 20:return this._onExtended(e.readUInt8(1),e.slice(2));default:return this._debug("got unknown message"),this.emit("unknownmessage",e)}},e.prototype._parseHandshake=function(){var i=this;this._parse(1,function(e){var n=e.readUInt8(0);i._parse(n+48,function(e){var t=e.slice(0,n);"BitTorrent protocol"!==t.toString()?(i._debug("Error: wire not speaking BitTorrent protocol (%s)",t.toString()),i.end()):(e=e.slice(n),i._onHandshake(e.slice(8,28),e.slice(28,48),{dht:!!(1&e[7]),extended:!!(16&e[5])}),i._parse(4,i._onMessageLength))})})},e.prototype._onFinish=function(){for(this._finished=!0,this.push(null);this.read(););for(clearInterval(this._keepAliveInterval),this._parse(Number.MAX_VALUE,function(){});this.peerRequests.length;)this.peerRequests.pop();for(;this.requests.length;)this._callback(this.requests.pop(),Error("wire was closed"),null)},e.prototype._debug=function(e){for(var t=[],n=0;n=10"},license:"MIT",devDependencies:{tape:"^4.6.0",disc:"^1.3.3",finalhandler:"^1.0.0",standard:"*","webtorrent-fixtures":"^1.5.0",electron:"^7.0.0","bittorrent-tracker":"^9.14.0","run-series":"^1.1.4",browserify:"^16.4.0","network-address":"^1.1.0",airtap:"^2.0.3","serve-static":"^1.11.1","babel-minify":"^0.5.1"},dependencies:{pump:"^3.0.0","bittorrent-dht":"^9.0.0","render-media":"^3.0.0",randombytes:"^2.0.3","run-parallel-limit":"^1.0.3","chunk-store-stream":"^4.0.0","load-ip-set":"^2.1.0",bitfield:"^3.0.0","stream-to-blob":"^2.0.0","fs-chunk-store":"^2.0.0","addr-to-ip-port":"^1.4.2",multistream:"^4.0.0","end-of-stream":"^1.1.0","range-parser":"^1.2.0","memory-chunk-store":"^1.2.0","bittorrent-protocol":"^3.0.0",mime:"^2.4.0","chrome-net":"^3.3.2","readable-stream":"^3.0.6","simple-sha1":"^3.0.1","unordered-array-remove":"^1.0.2","parse-torrent":"^7.0.0","create-torrent":"^4.0.0",debug:"^4.1.0",speedometer:"^1.0.0","torrent-piece":"^2.0.0","torrent-discovery":"^9.1.1","package-json-versionify":"^1.0.2","immediate-chunk-store":"^2.0.0","simple-get":"^3.0.1","simple-concat":"^1.0.0",ut_metadata:"^3.3.0","stream-to-blob-url":"^3.0.0","http-node":"github:feross/http-node#webtorrent",ut_pex:"^2.0.0","escape-html":"^1.0.3","parse-numeric-range":"^0.0.2","random-iterate":"^1.0.1","run-parallel":"^1.1.6",uniq:"^1.0.1","stream-with-known-length-to-buffer":"^1.0.0","simple-peer":"^9.0.0"},author:{name:"WebTorrent, LLC",email:"feross@webtorrent.io",url:"https://webtorrent.io"},chromeapp:{"fs-chunk-store":"memory-chunk-store",http:"http-node","load-ip-set":!1,net:"chrome-net",os:!1},repository:{type:"git",url:"git://github.com/webtorrent/webtorrent.git"},homepage:"https://webtorrent.io",bundleDependencies:!1,browser:{"./lib/server.js":!1,"./lib/tcp-pool.js":!1,"bittorrent-dht/client":!1,"fs-chunk-store":"memory-chunk-store","load-ip-set":!1,net:!1,os:!1,ut_pex:!1},name:"webtorrent",main:"index.js",deprecated:!1,browserify:{transform:["package-json-versionify"]},keywords:"bittorrent;bittorrent client;download;mad science;p2p;peer-to-peer;peers;streaming;swarm;torrent;web torrent;webrtc;webrtc data;webtorrent".split(";"),bugs:{url:"https://github.com/webtorrent/webtorrent/issues"},version:"0.107.17",description:"Streaming torrent client",scripts:{"size-disc":"browserify --full-paths . | discify --open","size-js":"npm run build && cat webtorrent.min.js | gzip | wc -c","test-node":"tape test/*.js test/node/*.js",build:"browserify --standalone WebTorrent . | minify > webtorrent.min.js","build-debug":"browserify --standalone WebTorrent . > webtorrent.debug.js","test-browser-local":"airtap --local -- test/*.js test/browser/*.js","test-browser":"airtap -- test/*.js test/browser/*.js",size:"npm run size-js && npm run size-disc","update-authors":"./scripts/update-authors.sh",test:"standard && npm run test-node && npm run test-browser"}}},shadow$provide[205]=function(e,t,n,i){var r=t(23).Buffer,a=t(161),f=t(114)("webtorrent:webconn"),g=t(149),o=t(132),l=t(203),m=t(204).version;e=function(e,t){var n=l.call(this)||this;return n.url=e,n.webPeerId=o.sync(e),n._torrent=t,n._init(),n},L.inherits(e,l),e.prototype._init=function(){var r=this;this.setKeepAlive(!0),this.once("handshake",function(e,t){if(!r.destroyed){r.handshake(e,r.webPeerId),e=r._torrent.pieces.length,t=new a(e);for(var n=0;n<=e;n++)t.set(n,!0);r.bitfield(t)}}),this.once("interested",function(){f("interested"),r.unchoke()}),this.on("uninterested",function(){f("uninterested")}),this.on("choke",function(){f("choke")}),this.on("unchoke",function(){f("unchoke")}),this.on("bitfield",function(){f("bitfield")}),this.on("request",function(e,t,n,i){f("request pieceIndex=%d offset=%d length=%d",e,t,n),r.httpRequest(e,t,n,i)})},e.prototype.httpRequest=function(o,l,s,c){var t=this,n=o*this._torrent.pieceLength+l,i=n+s-1,e=this._torrent.files;if(e.length<=1)var u=[{url:this.url,start:n,end:i}];else{if((e=e.filter(function(e){return e.offset<=i&&e.offset+e.length>n})).length<1)return c(Error("Could not find file corresponnding to web seed range request"));u=e.map(function(e){return{url:t.url+("/"===t.url[t.url.length-1]?"":"/")+e.path,fileOffsetInRange:Math.max(e.offset-n,0),start:Math.max(n-e.offset,0),end:Math.min(e.offset+e.length-1,i-e.offset)}})}var d,p=0,h=!1;12*(a._numConns-a.numPeers)&&r.amInterested?r.destroy():(n=setTimeout(i,5e3)).unref&&n.unref())};r.on("bitfield",function(){e(),a._update()}),r.on("have",function(){e(),a._update()}),r.once("interested",function(){r.unchoke()}),r.once("close",function(){clearTimeout(n)}),r.on("choke",function(){clearTimeout(n),(n=setTimeout(i,5e3)).unref&&n.unref()}),r.on("unchoke",function(){clearTimeout(n),a._update()}),r.on("request",function(e,t,n,i){if(131072=h)return 1;for(var t=function(){var r=c.downloadSpeed()||1;if(R=t.from+t.offset;--n)if(c.peerPieces.get(n)&&p._request(c,n,!1))return}}();var t=2+Math.ceil(.5*c.downloadSpeed()/k.BLOCK_LENGTH);if(!(c.requests.length>=t)){var h=2+Math.ceil(c.downloadSpeed()/k.BLOCK_LENGTH);e(!1)||e(!0)}}},e.prototype._rechoke=function(){var t=this;if(this.ready){0=this.client.maxConns)){this._debug("drain (%s queued, %s/%s peers)",this._numQueued,this.numPeers,this.client.maxConns);var n=this._queue.shift();if(n){this._debug("tcp connect attempt to %s",n.addr);var e=r(n.addr);(e=n.conn=y.connect({host:e[0],port:e[1]})).once("connect",function(){n.onConnect()}),e.once("error",function(e){n.destroy(e)}),n.startConnectTimeout(),e.on("close",function(){if(!t.destroyed)if(n.retries>=N.length)t._debug("conn %s closed: will not re-add (max %s attempts)",n.addr,N.length);else{var e=N[n.retries];t._debug("conn %s closed: will re-add to queue in %sms (attempt %s)",n.addr,e,n.retries+1),(e=setTimeout(function(){var e=t._addPeer(n.addr);e&&(e.retries=n.retries+1)},e)).unref&&e.unref()}})}}},e.prototype._validAddr=function(e){try{var t=r(e)}catch(e){return!1}return e=t[0],0<(t=t[1])&&t<65535&&!("127.0.0.1"===e&&t===this.client.torrentPort)},L.global.Object.defineProperties(e.prototype,{timeRemaining:{configurable:!0,enumerable:!0,get:function(){return this.done?0:0===this.downloadSpeed?1/0:(this.length-this.downloaded)/this.downloadSpeed*1e3}},downloaded:{configurable:!0,enumerable:!0,get:function(){if(!this.bitfield)return 0;for(var e=0,t=0,n=this.pieces.length;t>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=i>>24&255,e[t+5]=i>>16&255,e[t+6]=i>>8&255,e[t+7]=255&i}function a(e,t,n,i,r){var a,o=0;for(a=0;a>>8)-1}function l(e,t,n,i){return a(e,t,n,i,16)}function g(e,t,n,i){return a(e,t,n,i,32)}function u(e,t,n,i){var r=255&i[0]|(255&i[1])<<8|(255&i[2])<<16|(255&i[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&i[4]|(255&i[5])<<8|(255&i[6])<<16|(255&i[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24;t=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24;for(var h,f=255&i[8]|(255&i[9])<<8|(255&i[10])<<16|(255&i[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,m=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,$=r,v=a,b=o,w=l,k=s,_=c,x=u,I=d,A=p,j=t,E=f,C=g,S=m,z=y,F=n=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,T=i=255&i[12]|(255&i[13])<<8|(255&i[14])<<16|(255&i[15])<<24,O=0;O<20;O+=2)$^=(h=(S^=(h=(A^=(h=(k^=(h=$+S|0)<<7|h>>>25)+$|0)<<9|h>>>23)+k|0)<<13|h>>>19)+A|0)<<18|h>>>14,_^=(h=(v^=(h=(z^=(h=(j^=(h=_+v|0)<<7|h>>>25)+_|0)<<9|h>>>23)+j|0)<<13|h>>>19)+z|0)<<18|h>>>14,E^=(h=(x^=(h=(b^=(h=(F^=(h=E+x|0)<<7|h>>>25)+E|0)<<9|h>>>23)+F|0)<<13|h>>>19)+b|0)<<18|h>>>14,T^=(h=(C^=(h=(I^=(h=(w^=(h=T+C|0)<<7|h>>>25)+T|0)<<9|h>>>23)+w|0)<<13|h>>>19)+I|0)<<18|h>>>14,$^=(h=(w^=(h=(b^=(h=(v^=(h=$+w|0)<<7|h>>>25)+$|0)<<9|h>>>23)+v|0)<<13|h>>>19)+b|0)<<18|h>>>14,_^=(h=(k^=(h=(I^=(h=(x^=(h=_+k|0)<<7|h>>>25)+_|0)<<9|h>>>23)+x|0)<<13|h>>>19)+I|0)<<18|h>>>14,E^=(h=(j^=(h=(A^=(h=(C^=(h=E+j|0)<<7|h>>>25)+E|0)<<9|h>>>23)+C|0)<<13|h>>>19)+A|0)<<18|h>>>14,T^=(h=(F^=(h=(z^=(h=(S^=(h=T+F|0)<<7|h>>>25)+T|0)<<9|h>>>23)+S|0)<<13|h>>>19)+z|0)<<18|h>>>14;$=$+r|0,v=v+a|0,b=b+o|0,w=w+l|0,k=k+s|0,_=_+c|0,x=x+u|0,I=I+d|0,A=A+p|0,j=j+t|0,E=E+f|0,C=C+g|0,S=S+m|0,z=z+y|0,F=F+n|0,T=T+i|0,e[0]=$>>>0&255,e[1]=$>>>8&255,e[2]=$>>>16&255,e[3]=$>>>24&255,e[4]=v>>>0&255,e[5]=v>>>8&255,e[6]=v>>>16&255,e[7]=v>>>24&255,e[8]=b>>>0&255,e[9]=b>>>8&255,e[10]=b>>>16&255,e[11]=b>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=k>>>0&255,e[17]=k>>>8&255,e[18]=k>>>16&255,e[19]=k>>>24&255,e[20]=_>>>0&255,e[21]=_>>>8&255,e[22]=_>>>16&255,e[23]=_>>>24&255,e[24]=x>>>0&255,e[25]=x>>>8&255,e[26]=x>>>16&255,e[27]=x>>>24&255,e[28]=I>>>0&255,e[29]=I>>>8&255,e[30]=I>>>16&255,e[31]=I>>>24&255,e[32]=A>>>0&255,e[33]=A>>>8&255,e[34]=A>>>16&255,e[35]=A>>>24&255,e[36]=j>>>0&255,e[37]=j>>>8&255,e[38]=j>>>16&255,e[39]=j>>>24&255,e[40]=E>>>0&255,e[41]=E>>>8&255,e[42]=E>>>16&255,e[43]=E>>>24&255,e[44]=C>>>0&255,e[45]=C>>>8&255,e[46]=C>>>16&255,e[47]=C>>>24&255,e[48]=S>>>0&255,e[49]=S>>>8&255,e[50]=S>>>16&255,e[51]=S>>>24&255,e[52]=z>>>0&255,e[53]=z>>>8&255,e[54]=z>>>16&255,e[55]=z>>>24&255,e[56]=F>>>0&255,e[57]=F>>>8&255,e[58]=F>>>16&255,e[59]=F>>>24&255,e[60]=T>>>0&255,e[61]=T>>>8&255,e[62]=T>>>16&255,e[63]=T>>>24&255}function c(e,t,n,i){var r=255&i[0]|(255&i[1])<<8|(255&i[2])<<16|(255&i[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&i[4]|(255&i[5])<<8|(255&i[6])<<16|(255&i[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24;t=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24;var h=255&i[8]|(255&i[9])<<8|(255&i[10])<<16|(255&i[11])<<24,f=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,m=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24;n=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,i=255&i[12]|(255&i[13])<<8|(255&i[14])<<16|(255&i[15])<<24;for(var y,$=0;$<20;$+=2)r^=(y=(g^=(y=(p^=(y=(s^=(y=r+g|0)<<7|y>>>25)+r|0)<<9|y>>>23)+s|0)<<13|y>>>19)+p|0)<<18|y>>>14,c^=(y=(a^=(y=(m^=(y=(t^=(y=c+a|0)<<7|y>>>25)+c|0)<<9|y>>>23)+t|0)<<13|y>>>19)+m|0)<<18|y>>>14,h^=(y=(u^=(y=(o^=(y=(n^=(y=h+u|0)<<7|y>>>25)+h|0)<<9|y>>>23)+n|0)<<13|y>>>19)+o|0)<<18|y>>>14,i^=(y=(f^=(y=(d^=(y=(l^=(y=i+f|0)<<7|y>>>25)+i|0)<<9|y>>>23)+l|0)<<13|y>>>19)+d|0)<<18|y>>>14,r^=(y=(l^=(y=(o^=(y=(a^=(y=r+l|0)<<7|y>>>25)+r|0)<<9|y>>>23)+a|0)<<13|y>>>19)+o|0)<<18|y>>>14,c^=(y=(s^=(y=(d^=(y=(u^=(y=c+s|0)<<7|y>>>25)+c|0)<<9|y>>>23)+u|0)<<13|y>>>19)+d|0)<<18|y>>>14,h^=(y=(t^=(y=(p^=(y=(f^=(y=h+t|0)<<7|y>>>25)+h|0)<<9|y>>>23)+f|0)<<13|y>>>19)+p|0)<<18|y>>>14,i^=(y=(n^=(y=(m^=(y=(g^=(y=i+n|0)<<7|y>>>25)+i|0)<<9|y>>>23)+g|0)<<13|y>>>19)+m|0)<<18|y>>>14;e[0]=r>>>0&255,e[1]=r>>>8&255,e[2]=r>>>16&255,e[3]=r>>>24&255,e[4]=c>>>0&255,e[5]=c>>>8&255,e[6]=c>>>16&255,e[7]=c>>>24&255,e[8]=h>>>0&255,e[9]=h>>>8&255,e[10]=h>>>16&255,e[11]=h>>>24&255,e[12]=i>>>0&255,e[13]=i>>>8&255,e[14]=i>>>16&255,e[15]=i>>>24&255,e[16]=u>>>0&255,e[17]=u>>>8&255,e[18]=u>>>16&255,e[19]=u>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=t>>>0&255,e[29]=t>>>8&255,e[30]=t>>>16&255,e[31]=t>>>24&255}function d(e,t,n,i,r,a,o){var l,s=new Uint8Array(16),c=new Uint8Array(64);for(l=0;l<16;l++)s[l]=0;for(l=0;l<8;l++)s[l]=a[l];for(;64<=r;){for(u(c,s,o,oe),l=0;l<64;l++)e[t+l]=n[i+l]^c[l];for(a=1,l=8;l<16;l++)a=a+(255&s[l])|0,s[l]=255&a,a>>>=8;r-=64,t+=64,i+=64}if(0>>=8;n-=64,t+=64}if(0>16&1),i[n-1]&=65535;i[15]=r[15]-32767-(i[14]>>16&1),n=i[15]>>16&1,i[14]&=65535,w(r,i,1-n)}for(n=0;n<16;n++)e[2*n]=255&r[n],e[2*n+1]=r[n]>>8}function _(e,t){var n=new Uint8Array(32),i=new Uint8Array(32);return k(n,e),k(i,t),g(n,0,i,0)}function x(e){var t=new Uint8Array(32);return k(t,e),1&t[0]}function I(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function A(e,t,n){for(var i=0;i<16;i++)e[i]=t[i]+n[i]}function j(e,t,n){for(var i=0;i<16;i++)e[i]=t[i]-n[i]}function E(e,t,n){var i=n[0],r=n[1],a=n[2],o=n[3],l=n[4],s=n[5],c=n[6],u=n[7],d=n[8],p=n[9],h=n[10],f=n[11],g=n[12],m=n[13],y=n[14],$=n[15],v=(n=t[0])*i,b=n*r,w=n*a,k=n*o,_=n*l,x=n*s,I=n*c,A=n*u,j=n*d,E=n*p,C=n*h,S=n*f,z=n*g,F=n*m,T=n*y,O=n*$;b+=(n=t[1])*i,w+=n*r,k+=n*a,_+=n*o,x+=n*l,I+=n*s,A+=n*c,j+=n*u,E+=n*d,C+=n*p,S+=n*h,z+=n*f,F+=n*g,T+=n*m,O+=n*y;var R=n*$;w+=(n=t[2])*i,k+=n*r,_+=n*a,x+=n*o,I+=n*l,A+=n*s,j+=n*c,E+=n*u,C+=n*d,S+=n*p,z+=n*h,F+=n*f,T+=n*g,O+=n*m,R+=n*y;var P=n*$;k+=(n=t[3])*i,_+=n*r,x+=n*a,I+=n*o,A+=n*l,j+=n*s,E+=n*c,C+=n*u,S+=n*d,z+=n*p,F+=n*h,T+=n*f,O+=n*g,R+=n*m,P+=n*y;var N=n*$;_+=(n=t[4])*i,x+=n*r,I+=n*a,A+=n*o,j+=n*l,E+=n*s,C+=n*c,S+=n*u,z+=n*d,F+=n*p,T+=n*h,O+=n*f,R+=n*g,P+=n*m,N+=n*y;var M=n*$;x+=(n=t[5])*i,I+=n*r,A+=n*a,j+=n*o,E+=n*l,C+=n*s,S+=n*c,z+=n*u,F+=n*d,T+=n*p,O+=n*h,R+=n*f,P+=n*g,N+=n*m,M+=n*y;var B=n*$;I+=(n=t[6])*i,A+=n*r,j+=n*a,E+=n*o,C+=n*l,S+=n*s,z+=n*c,F+=n*u,T+=n*d,O+=n*p,R+=n*h,P+=n*f,N+=n*g,M+=n*m,B+=n*y;var L=n*$;A+=(n=t[7])*i,j+=n*r,E+=n*a,C+=n*o,S+=n*l,z+=n*s,F+=n*c,T+=n*u,O+=n*d,R+=n*p,P+=n*h,N+=n*f,M+=n*g,B+=n*m,L+=n*y;var D=n*$;j+=(n=t[8])*i,E+=n*r,C+=n*a,S+=n*o,z+=n*l,F+=n*s,T+=n*c,O+=n*u,R+=n*d,P+=n*p,N+=n*h,M+=n*f,B+=n*g,L+=n*m,D+=n*y;var q=n*$;E+=(n=t[9])*i,C+=n*r,S+=n*a,z+=n*o,F+=n*l,T+=n*s,O+=n*c,R+=n*u,P+=n*d,N+=n*p,M+=n*h,B+=n*f,L+=n*g,D+=n*m,q+=n*y;var U=n*$;C+=(n=t[10])*i,S+=n*r,z+=n*a,F+=n*o,T+=n*l,O+=n*s,R+=n*c,P+=n*u,N+=n*d,M+=n*p,B+=n*h,L+=n*f,D+=n*g,q+=n*m,U+=n*y;var H=n*$;S+=(n=t[11])*i,z+=n*r,F+=n*a,T+=n*o,O+=n*l,R+=n*s,P+=n*c,N+=n*u,M+=n*d,B+=n*p,L+=n*h,D+=n*f,q+=n*g,U+=n*m,H+=n*y;var W=n*$;z+=(n=t[12])*i,F+=n*r,T+=n*a,O+=n*o,R+=n*l,P+=n*s,N+=n*c,M+=n*u,B+=n*d,L+=n*p,D+=n*h,q+=n*f,U+=n*g,H+=n*m,W+=n*y;var V=n*$;F+=(n=t[13])*i,T+=n*r,O+=n*a,R+=n*o,P+=n*l,N+=n*s,M+=n*c,B+=n*u,L+=n*d,D+=n*p,q+=n*h,U+=n*f,H+=n*g,W+=n*m,V+=n*y;var G=n*$;T+=(n=t[14])*i,O+=n*r,R+=n*a,P+=n*o,N+=n*l,M+=n*s,B+=n*c,L+=n*u,D+=n*d,q+=n*p,U+=n*h,H+=n*f,W+=n*g,V+=n*m,G+=n*y;var X=n*$;O+=(n=t[15])*i,b+=38*(P+n*a),w+=38*(N+n*o),k+=38*(M+n*l),_+=38*(B+n*s),x+=38*(L+n*c),I+=38*(D+n*u),A+=38*(q+n*d),j+=38*(U+n*p),E+=38*(H+n*h),C+=38*(W+n*f),S+=38*(V+n*g),z+=38*(G+n*m),F+=38*(X+n*y),T+=38*n*$,v=(n=v+38*(R+n*r)+1+65535)-65536*(t=Math.floor(n/65536)),b=(n=b+t+65535)-65536*(t=Math.floor(n/65536)),w=(n=w+t+65535)-65536*(t=Math.floor(n/65536)),k=(n=k+t+65535)-65536*(t=Math.floor(n/65536)),_=(n=_+t+65535)-65536*(t=Math.floor(n/65536)),x=(n=x+t+65535)-65536*(t=Math.floor(n/65536)),I=(n=I+t+65535)-65536*(t=Math.floor(n/65536)),A=(n=A+t+65535)-65536*(t=Math.floor(n/65536)),j=(n=j+t+65535)-65536*(t=Math.floor(n/65536)),E=(n=E+t+65535)-65536*(t=Math.floor(n/65536)),C=(n=C+t+65535)-65536*(t=Math.floor(n/65536)),S=(n=S+t+65535)-65536*(t=Math.floor(n/65536)),z=(n=z+t+65535)-65536*(t=Math.floor(n/65536)),F=(n=F+t+65535)-65536*(t=Math.floor(n/65536)),T=(n=T+t+65535)-65536*(t=Math.floor(n/65536)),O=(n=O+t+65535)-65536*(t=Math.floor(n/65536)),v=(n=(v+=t-1+37*(t-1))+1+65535)-65536*(t=Math.floor(n/65536)),b=(n=b+t+65535)-65536*(t=Math.floor(n/65536)),w=(n=w+t+65535)-65536*(t=Math.floor(n/65536)),k=(n=k+t+65535)-65536*(t=Math.floor(n/65536)),_=(n=_+t+65535)-65536*(t=Math.floor(n/65536)),x=(n=x+t+65535)-65536*(t=Math.floor(n/65536)),I=(n=I+t+65535)-65536*(t=Math.floor(n/65536)),A=(n=A+t+65535)-65536*(t=Math.floor(n/65536)),j=(n=j+t+65535)-65536*(t=Math.floor(n/65536)),E=(n=E+t+65535)-65536*(t=Math.floor(n/65536)),C=(n=C+t+65535)-65536*(t=Math.floor(n/65536)),S=(n=S+t+65535)-65536*(t=Math.floor(n/65536)),z=(n=z+t+65535)-65536*(t=Math.floor(n/65536)),F=(n=F+t+65535)-65536*(t=Math.floor(n/65536)),T=(n=T+t+65535)-65536*(t=Math.floor(n/65536)),n=O+t+65535,t=Math.floor(n/65536),e[0]=v+(t-1+37*(t-1)),e[1]=b,e[2]=w,e[3]=k,e[4]=_,e[5]=x,e[6]=I,e[7]=A,e[8]=j,e[9]=E,e[10]=C,e[11]=S,e[12]=z,e[13]=F,e[14]=T,e[15]=n-65536*t}function C(e,t){E(e,t,t)}function S(e,t){var n,i=X();for(n=0;n<16;n++)i[n]=t[n];for(n=253;0<=n;n--)C(i,i),2!==n&&4!==n&&E(i,i,t);for(n=0;n<16;n++)e[n]=i[n]}function z(e,t){var n,i=X();for(n=0;n<16;n++)i[n]=t[n];for(n=250;0<=n;n--)C(i,i),1!==n&&E(i,i,t);for(n=0;n<16;n++)e[n]=i[n]}function F(e,t,n){var i,r=new Uint8Array(32),a=new Float64Array(80),o=X(),l=X(),s=X(),c=X(),u=X(),d=X();for(i=0;i<31;i++)r[i]=t[i];for(r[31]=127&t[31]|64,r[0]&=248,I(a,n),i=0;i<16;i++)l[i]=a[i],c[i]=o[i]=s[i]=0;for(o[0]=c[0]=1,i=254;0<=i;--i)w(o,l,t=r[i>>>3]>>>(7&i)&1),w(s,c,t),A(u,o,s),j(o,o,s),A(s,l,c),j(l,l,c),C(c,u),C(d,o),E(o,s,o),E(s,l,u),A(u,o,s),j(o,o,s),C(l,o),j(s,c,d),E(o,s,ee),A(o,o,c),E(s,s,o),E(o,c,d),E(c,l,a),C(l,u),w(o,l,t),w(s,c,t);for(i=0;i<16;i++)a[i+16]=o[i],a[i+32]=s[i],a[i+48]=l[i],a[i+64]=c[i];return r=a.subarray(32),a=a.subarray(16),S(r,r),E(a,a,r),k(e,a),0}function n(e,t){return F(e,t,K)}function i(e,t){return Y(t,32),n(e,t)}function T(e,t,n){var i=new Uint8Array(32);F(i,n,t),c(e,Z,i,oe)}function O(e,t,n,i){for(var r,a=new Int32Array(16),o=new Int32Array(16),l=e[0],s=e[1],c=e[2],u=e[3],d=e[4],p=e[5],h=e[6],f=e[7],g=t[0],m=t[1],y=t[2],$=t[3],v=t[4],b=t[5],w=t[6],k=t[7],_=0;128<=i;){for(r=0;r<16;r++){var x=8*r+_;a[r]=n[x+0]<<24|n[x+1]<<16|n[x+2]<<8|n[x+3],o[r]=n[x+4]<<24|n[x+5]<<16|n[x+6]<<8|n[x+7]}for(r=0;r<80;r++){x=l;var I=s,A=c,j=u,E=d,C=p,S=h,z=g,F=m,T=y,O=$,R=v,P=b,N=w,M=f,B=k,L=65535&B,D=B>>>16,q=65535&M,U=M>>>16;L+=65535&(B=(v>>>14|d<<18)^(v>>>18|d<<14)^(d>>>9|v<<23)),D+=B>>>16,q+=65535&(M=(d>>>14|v<<18)^(d>>>18|v<<14)^(v>>>9|d<<23)),U+=M>>>16,L+=65535&(B=v&b^~v&w),D+=B>>>16,q+=65535&(M=d&p^~d&h),U+=M>>>16,M=ce[2*r],L+=65535&(B=ce[2*r+1]),D+=B>>>16,q+=65535&M,U+=M>>>16,M=a[r%16],D+=(B=o[r%16])>>>16,q+=65535&M,U+=M>>>16;var H=65535&(q+=(D+=(L+=65535&B)>>>16)>>>16)|(U+=q>>>16)<<16,W=65535&L|D<<16;if(L=65535&(B=W),D=B>>>16,q=65535&(M=H),U=M>>>16,L+=65535&(B=(g>>>28|l<<4)^(l>>>2|g<<30)^(l>>>7|g<<25)),D+=B>>>16,q+=65535&(M=(l>>>28|g<<4)^(g>>>2|l<<30)^(g>>>7|l<<25)),U+=M>>>16,D+=(B=g&m^g&y^m&y)>>>16,q+=65535&(M=l&s^l&c^s&c),U+=M>>>16,l=65535&(q+=(D+=(L+=65535&B)>>>16)>>>16)|(U+=q>>>16)<<16,g=65535&L|D<<16,L=65535&(B=O),D=B>>>16,q=65535&(M=j),U=M>>>16,D+=(B=W)>>>16,q+=65535&(M=H),U+=M>>>16,s=x,c=I,u=A,d=j=65535&(q+=(D+=(L+=65535&B)>>>16)>>>16)|(U+=q>>>16)<<16,p=E,h=C,f=S,m=z,y=F,$=T,v=O=65535&L|D<<16,b=R,w=P,k=N,15==r%16)for(x=0;x<16;x++)M=a[x],L=65535&(B=o[x]),D=B>>>16,q=65535&M,U=M>>>16,M=a[(x+9)%16],L+=65535&(B=o[(x+9)%16]),D+=B>>>16,q+=65535&M,U+=M>>>16,H=a[(x+1)%16],L+=65535&(B=((W=o[(x+1)%16])>>>1|H<<31)^(W>>>8|H<<24)^(W>>>7|H<<25)),D+=B>>>16,q+=65535&(M=(H>>>1|W<<31)^(H>>>8|W<<24)^H>>>7),U+=M>>>16,H=a[(x+14)%16],D+=(B=((W=o[(x+14)%16])>>>19|H<<13)^(H>>>29|W<<3)^(W>>>6|H<<26))>>>16,q+=65535&(M=(H>>>19|W<<13)^(W>>>29|H<<3)^H>>>6),U+=M>>>16,U+=(q+=(D+=(L+=65535&B)>>>16)>>>16)>>>16,a[x]=65535&q|U<<16,o[x]=65535&L|D<<16}L=65535&(B=g),D=B>>>16,q=65535&(M=l),U=M>>>16,M=e[0],D+=(B=t[0])>>>16,q+=65535&M,U+=M>>>16,U+=(q+=(D+=(L+=65535&B)>>>16)>>>16)>>>16,e[0]=l=65535&q|U<<16,t[0]=g=65535&L|D<<16,L=65535&(B=m),D=B>>>16,q=65535&(M=s),U=M>>>16,M=e[1],D+=(B=t[1])>>>16,q+=65535&M,U+=M>>>16,U+=(q+=(D+=(L+=65535&B)>>>16)>>>16)>>>16,e[1]=s=65535&q|U<<16,t[1]=m=65535&L|D<<16,L=65535&(B=y),D=B>>>16,q=65535&(M=c),U=M>>>16,M=e[2],D+=(B=t[2])>>>16,q+=65535&M,U+=M>>>16,U+=(q+=(D+=(L+=65535&B)>>>16)>>>16)>>>16,e[2]=c=65535&q|U<<16,t[2]=y=65535&L|D<<16,L=65535&(B=$),D=B>>>16,q=65535&(M=u),U=M>>>16,M=e[3],D+=(B=t[3])>>>16,q+=65535&M,U+=M>>>16,U+=(q+=(D+=(L+=65535&B)>>>16)>>>16)>>>16,e[3]=u=65535&q|U<<16,t[3]=$=65535&L|D<<16,L=65535&(B=v),D=B>>>16,q=65535&(M=d),U=M>>>16,M=e[4],D+=(B=t[4])>>>16,q+=65535&M,U+=M>>>16,U+=(q+=(D+=(L+=65535&B)>>>16)>>>16)>>>16,e[4]=d=65535&q|U<<16,t[4]=v=65535&L|D<<16,L=65535&(B=b),D=B>>>16,q=65535&(M=p),U=M>>>16,M=e[5],D+=(B=t[5])>>>16,q+=65535&M,U+=M>>>16,U+=(q+=(D+=(L+=65535&B)>>>16)>>>16)>>>16,e[5]=p=65535&q|U<<16,t[5]=b=65535&L|D<<16,L=65535&(B=w),D=B>>>16,q=65535&(M=h),U=M>>>16,M=e[6],D+=(B=t[6])>>>16,q+=65535&M,U+=M>>>16,U+=(q+=(D+=(L+=65535&B)>>>16)>>>16)>>>16,e[6]=h=65535&q|U<<16,t[6]=w=65535&L|D<<16,L=65535&(B=k),D=B>>>16,q=65535&(M=f),U=M>>>16,M=e[7],D+=(B=t[7])>>>16,q+=65535&M,U+=M>>>16,U+=(q+=(D+=(L+=65535&B)>>>16)>>>16)>>>16,e[7]=f=65535&q|U<<16,t[7]=k=65535&L|D<<16,_+=128,i-=128}return i}function R(e,t,n){var i,r=new Int32Array(8),a=new Int32Array(8),o=new Uint8Array(256),l=n;for(r[0]=1779033703,r[1]=3144134277,r[2]=1013904242,r[3]=2773480762,r[4]=1359893119,r[5]=2600822924,r[6]=528734635,r[7]=1541459225,a[0]=4089235720,a[1]=2227873595,a[2]=4271175723,a[3]=1595750129,a[4]=2917565137,a[5]=725511199,a[6]=4215389547,a[7]=327033209,O(r,a,t,n),n%=128,i=0;i>(7&i)&1,o=e,l=t,s=a;for(r=0;r<4;r++)w(o[r],l[r],s);for(P(t,e),P(e,e),r=e,o=t,l=a,a=0;a<4;a++)w(r[a],o[a],l)}}function B(e,t){var n=[X(),X(),X(),X()];v(n[0],ie),v(n[1],re),v(n[2],J),E(n[3],ie,re),M(e,n,t)}function L(e,t,n){var i=new Uint8Array(64),r=[X(),X(),X(),X()];for(n||Y(t,32),R(i,t,32),i[0]&=248,i[31]&=127,i[31]|=64,B(r,i),N(e,r),n=0;n<32;n++)t[n+32]=e[n];return 0}function D(e,t){var n,i;for(n=63;32<=n;--n){var r=0,a=n-32;for(i=n-12;a>4)*ue[a],r=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=r*ue[a];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function q(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;D(e,n)}function U(e,t,n,i){var r,a=new Uint8Array(64),o=new Uint8Array(64),l=new Uint8Array(64),s=new Float64Array(64),c=[X(),X(),X(),X()];R(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var u=n+64;for(r=0;r>7&&j(l[0],Q,l[0]),E(l[3],l[0],l[1]),0))return-1;for(s=0;s>>13|n<<3),t=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|t<<6),n=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(t>>>7|n<<9),t=255&e[8]|(255&e[9])<<8,this.r[4]=255&(n>>>4|t<<12),this.r[5]=t>>>1&8190,n=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(t>>>14|n<<2),t=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(n>>>11|t<<5),n=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(t>>>8|n<<8),this.r[9]=n>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};le.prototype.blocks=function(e,t,n){for(var i,r,a,o,l,s,c,u,d,p,h,f=this.fin?0:2048,g=this.h[0],m=this.h[1],y=this.h[2],$=this.h[3],v=this.h[4],b=this.h[5],w=this.h[6],k=this.h[7],_=this.h[8],x=this.h[9],I=this.r[0],A=this.r[1],j=this.r[2],E=this.r[3],C=this.r[4],S=this.r[5],z=this.r[6],F=this.r[7],T=this.r[8],O=this.r[9];16<=n;)g+=8191&(i=255&e[t+0]|(255&e[t+1])<<8),m+=8191&(i>>>13|(r=255&e[t+2]|(255&e[t+3])<<8)<<3),y+=8191&(r>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6),$+=8191&(i>>>7|(r=255&e[t+6]|(255&e[t+7])<<8)<<9),v+=8191&(r>>>4|(i=255&e[t+8]|(255&e[t+9])<<8)<<12),b+=i>>>1&8191,w+=8191&(i>>>14|(r=255&e[t+10]|(255&e[t+11])<<8)<<2),k+=8191&(r>>>11|(i=255&e[t+12]|(255&e[t+13])<<8)<<5),_+=8191&(i>>>8|(r=255&e[t+14]|(255&e[t+15])<<8)<<8),x+=r>>>5|f,i=r=0,i+=g*I,i+=5*m*O,i+=5*y*T,i+=5*$*F,r=(i+=5*v*z)>>>13,i&=8191,i+=5*b*S,i+=5*w*C,i+=5*k*E,i+=5*_*j,a=r+=(i+=5*x*A)>>>13,a+=g*A,a+=m*I,a+=5*y*O,a+=5*$*T,r=(a+=5*v*F)>>>13,a&=8191,a+=5*b*z,a+=5*w*S,a+=5*k*C,a+=5*_*E,r+=(a+=5*x*j)>>>13,a&=8191,o=r,o+=g*j,o+=m*A,o+=y*I,o+=5*$*O,r=(o+=5*v*T)>>>13,o&=8191,o+=5*b*F,o+=5*w*z,o+=5*k*S,o+=5*_*C,l=r+=(o+=5*x*E)>>>13,l+=g*E,l+=m*j,l+=y*A,l+=$*I,r=(l+=5*v*O)>>>13,l&=8191,l+=5*b*T,l+=5*w*F,l+=5*k*z,l+=5*_*S,s=r+=(l+=5*x*C)>>>13,s+=g*C,s+=m*E,s+=y*j,s+=$*A,r=(s+=v*I)>>>13,s&=8191,s+=5*b*O,s+=5*w*T,s+=5*k*F,s+=5*_*z,c=r+=(s+=5*x*S)>>>13,c+=g*S,c+=m*C,c+=y*E,c+=$*j,r=(c+=v*A)>>>13,c&=8191,c+=b*I,c+=5*w*O,c+=5*k*T,c+=5*_*F,u=r+=(c+=5*x*z)>>>13,u+=g*z,u+=m*S,u+=y*C,u+=$*E,r=(u+=v*j)>>>13,u&=8191,u+=b*A,u+=w*I,u+=5*k*O,u+=5*_*T,d=r+=(u+=5*x*F)>>>13,d+=g*F,d+=m*z,d+=y*S,d+=$*C,r=(d+=v*E)>>>13,d&=8191,d+=b*j,d+=w*A,d+=k*I,d+=5*_*O,p=r+=(d+=5*x*T)>>>13,p+=g*T,p+=m*F,p+=y*z,p+=$*S,r=(p+=v*C)>>>13,p&=8191,p+=b*E,p+=w*j,p+=k*A,p+=_*I,h=r+=(p+=5*x*O)>>>13,h+=g*O,h+=m*T,h+=y*F,h+=$*z,r=(h+=v*S)>>>13,h&=8191,h+=b*C,h+=w*E,h+=k*j,h+=_*A,g=i=8191&(r=(r=((r+=(h+=x*I)>>>13)<<2)+r|0)+(i&=8191)|0),m=a+=r>>>=13,y=o&=8191,$=l&=8191,v=s&=8191,b=c&=8191,w=u&=8191,k=d&=8191,_=p&=8191,x=h&=8191,t+=16,n-=16;this.h[0]=g,this.h[1]=m,this.h[2]=y,this.h[3]=$,this.h[4]=v,this.h[5]=b,this.h[6]=w,this.h[7]=k,this.h[8]=_,this.h[9]=x},le.prototype.finish=function(e,t){var n=new Uint16Array(10);if(this.leftover){var i=this.leftover;for(this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}var r=this.h[1]>>>13;for(this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,n[0]=this.h[0]+5,r=n[0]>>>13,n[0]&=8191,i=1;i<10;i++)n[i]=this.h[i]+r,r=n[i]>>>13,n[i]&=8191;for(n[9]-=8192,r=(1^r)-1,i=0;i<10;i++)n[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|n[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),n=this.h[0]+this.pad[0],this.h[0]=65535&n,i=1;i<8;i++)n=(this.h[i]+this.pad[i]|0)+(n>>>16)|0,this.h[i]=65535&n;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},le.prototype.update=function(e,t,n){var i;if(this.leftover){var r=16-this.leftover;for(n>>0,a=new Uint8Array(r);e[t];){var o=c[e.charCodeAt(t)];if(255===o)return;for(var l=0,s=r-1;(0!==o||l>>0,a[s]=o%256>>>0,o=o/256>>>0;if(0!==o)throw Error("Non-zero carry");i=l,t++}if(" "!==e[t]){for(e=r-i;e!==r&&0===a[e];)e++;for((t=g.allocUnsafe(n+(r-e))).fill(0,0,n);e!==r;)t[n++]=a[e++];return t}}}if(255<=u.length)throw new TypeError("Alphabet too long");for(var c=new Uint8Array(256),e=0;e>>0,o=new Uint8Array(a);i!==r;){for(var l=e[i],s=0,c=a-1;(0!==l||s>>0,o[c]=l%d>>>0,l=l/d>>>0;if(0!==l)throw Error("Non-zero carry");n=s,i++}for(e=a-n;e!==a&&0===o[e];)e++;for(t=p.repeat(t);e=this._blockSize;){for(var i=this._blockOffset;i>>32-t}function a(e,t,n,i,r,a,o){return l(e+(t&n|~t&i)+r+a|0,o)+t|0}function o(e,t,n,i,r,a,o){return l(e+(t&i|n&~i)+r+a|0,o)+t|0}function s(e,t,n,i,r,a,o){return l(e+(t^n^i)+r+a|0,o)+t|0}function c(e,t,n,i,r,a,o){return l(e+(n^(t|~i))+r+a|0,o)+t|0}e=t(16);var u=t(213),d=t(24).Buffer,p=Array(16);e(r,u),r.prototype._update=function(){for(var e=0;e<16;++e)p[e]=this._block.readInt32LE(4*e);e=this._a;var t=this._b,n=this._c,i=this._d;e=a(e,t,n,i,p[0],3614090360,7),i=a(i,e,t,n,p[1],3905402710,12),n=a(n,i,e,t,p[2],606105819,17),t=a(t,n,i,e,p[3],3250441966,22),e=a(e,t,n,i,p[4],4118548399,7),i=a(i,e,t,n,p[5],1200080426,12),n=a(n,i,e,t,p[6],2821735955,17),t=a(t,n,i,e,p[7],4249261313,22),e=a(e,t,n,i,p[8],1770035416,7),i=a(i,e,t,n,p[9],2336552879,12),n=a(n,i,e,t,p[10],4294925233,17),t=a(t,n,i,e,p[11],2304563134,22),e=a(e,t,n,i,p[12],1804603682,7),i=a(i,e,t,n,p[13],4254626195,12),n=a(n,i,e,t,p[14],2792965006,17),e=o(e,t=a(t,n,i,e,p[15],1236535329,22),n,i,p[1],4129170786,5),i=o(i,e,t,n,p[6],3225465664,9),n=o(n,i,e,t,p[11],643717713,14),t=o(t,n,i,e,p[0],3921069994,20),e=o(e,t,n,i,p[5],3593408605,5),i=o(i,e,t,n,p[10],38016083,9),n=o(n,i,e,t,p[15],3634488961,14),t=o(t,n,i,e,p[4],3889429448,20),e=o(e,t,n,i,p[9],568446438,5),i=o(i,e,t,n,p[14],3275163606,9),n=o(n,i,e,t,p[3],4107603335,14),t=o(t,n,i,e,p[8],1163531501,20),e=o(e,t,n,i,p[13],2850285829,5),i=o(i,e,t,n,p[2],4243563512,9),n=o(n,i,e,t,p[7],1735328473,14),e=s(e,t=o(t,n,i,e,p[12],2368359562,20),n,i,p[5],4294588738,4),i=s(i,e,t,n,p[8],2272392833,11),n=s(n,i,e,t,p[11],1839030562,16),t=s(t,n,i,e,p[14],4259657740,23),e=s(e,t,n,i,p[1],2763975236,4),i=s(i,e,t,n,p[4],1272893353,11),n=s(n,i,e,t,p[7],4139469664,16),t=s(t,n,i,e,p[10],3200236656,23),e=s(e,t,n,i,p[13],681279174,4),i=s(i,e,t,n,p[0],3936430074,11),n=s(n,i,e,t,p[3],3572445317,16),t=s(t,n,i,e,p[6],76029189,23),e=s(e,t,n,i,p[9],3654602809,4),i=s(i,e,t,n,p[12],3873151461,11),n=s(n,i,e,t,p[15],530742520,16),e=c(e,t=s(t,n,i,e,p[2],3299628645,23),n,i,p[0],4096336452,6),i=c(i,e,t,n,p[7],1126891415,10),n=c(n,i,e,t,p[14],2878612391,15),t=c(t,n,i,e,p[5],4237533241,21),e=c(e,t,n,i,p[12],1700485571,6),i=c(i,e,t,n,p[3],2399980690,10),n=c(n,i,e,t,p[10],4293915773,15),t=c(t,n,i,e,p[1],2240044497,21),e=c(e,t,n,i,p[8],1873313359,6),i=c(i,e,t,n,p[15],4264355552,10),n=c(n,i,e,t,p[6],2734768916,15),t=c(t,n,i,e,p[13],1309151649,21),e=c(e,t,n,i,p[4],4149444226,6),i=c(i,e,t,n,p[11],3174756917,10),n=c(n,i,e,t,p[2],718787259,15),t=c(t,n,i,e,p[9],3951481745,21),this._a=this._a+e|0,this._b=this._b+t|0,this._c=this._c+n|0,this._d=this._d+i|0},r.prototype._digest=function(){this._block[this._blockOffset++]=128,56>>32-t}var a=t(23).Buffer;e=t(16);var o=t(213),f=Array(16),g=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],$=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],v=[0,1518500249,1859775393,2400959708,2840853838],b=[1352829926,1548603684,1836072691,2053994217,0];e(r,o),r.prototype._update=function(){for(var e=0;e<16;++e)f[e]=this._block.readInt32LE(4*e);var t=0|this._a;e=0|this._b;for(var n=0|this._c,i=0|this._d,r=0|this._e,a=0|this._a,o=0|this._b,l=0|this._c,s=0|this._d,c=0|this._e,u=0;u<80;u+=1){if(u<16){var d=r;d=h(t+(e^n^i)+f[g[u]]+v[0]|0,y[u])+d|0,t=c;var p=h(a+(o^(l|~s))+f[m[u]]+b[0]|0,$[u])+t|0}else p=u<32?(d=r,d=h(t+(e&n|~e&i)+f[g[u]]+v[1]|0,y[u])+d|0,t=c,h(a+(o&s|l&~s)+f[m[u]]+b[1]|0,$[u])+t|0):u<48?(d=r,d=h(t+((e|~n)^i)+f[g[u]]+v[2]|0,y[u])+d|0,t=c,h(a+((o|~l)^s)+f[m[u]]+b[2]|0,$[u])+t|0):u<64?(d=r,d=h(t+(e&i|n&~i)+f[g[u]]+v[3]|0,y[u])+d|0,t=c,h(a+(o&l|~o&s)+f[m[u]]+b[3]|0,$[u])+t|0):(d=r,d=h(t+(e^(n|~i))+f[g[u]]+v[4]|0,y[u])+d|0,t=c,h(a+(o^l^s)+f[m[u]]+b[4]|0,$[u])+t|0);t=r,r=i,i=h(n,10),n=e,e=d,a=c,c=s,s=h(l,10),l=o,o=p}n=this._b+n+s|0,this._b=this._c+i+c|0,this._c=this._d+r+a|0,this._d=this._e+t+o|0,this._e=this._a+e+l|0,this._a=n},r.prototype._digest=function(){this._block[this._blockOffset++]=128,56=this._finalSize&&(this._update(this._block),this._block.fill(0)),(t=8*this._len)<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var n=(4294967295&t)>>>0;this._block.writeUInt32BE((t-n)/4294967296,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}return this._update(this._block),t=this._hash(),e?t.toString(e):t},r.prototype._update=function(){throw Error("_update must be implemented by subclass")},n.exports=r},shadow$provide[217]=function(e,t,n,i){function r(){this.init(),this._w=l,a.call(this,64,56)}e=t(16);var a=t(216),o=t(24).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],l=Array(80);e(r,a),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,i=0|this._b,r=0|this._c,a=0|this._d,o=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=t[l-3]^t[l-8]^t[l-14]^t[l-16];for(e=0;e<80;++e){l=(n<<5|n>>>27)+(0===(l=~~(e/20))?i&r|~i&a:2===l?i&r|i&a|r&a:i^r^a)+o+t[e]+s[l]|0,o=a,a=r,r=i<<30|i>>>2,i=n,n=l}this._a=n+this._a|0,this._b=i+this._b|0,this._c=r+this._c|0,this._d=a+this._d|0,this._e=o+this._e|0},r.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},n.exports=r},shadow$provide[218]=function(e,t,n,i){function r(){this.init(),this._w=l,a.call(this,64,56)}e=t(16);var a=t(216),o=t(24).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],l=Array(80);e(r,a),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,i=0|this._b,r=0|this._c,a=0|this._d,o=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)e=t[l-3]^t[l-8]^t[l-14]^t[l-16],t[l]=e<<1|e>>>31;for(l=0;l<80;++l){e=(n<<5|n>>>27)+(0===(e=~~(l/20))?i&r|~i&a:2===e?i&r|i&a|r&a:i^r^a)+o+t[l]+s[e]|0,o=a,a=r,r=i<<30|i>>>2,i=n,n=e}this._a=n+this._a|0,this._b=i+this._b|0,this._c=r+this._c|0,this._d=a+this._d|0,this._e=o+this._e|0},r.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},n.exports=r},shadow$provide[219]=function(e,t,n,i){function r(){this.init(),this._w=l,a.call(this,64,56)}e=t(16);var a=t(216),o=t(24).Buffer,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=Array(64);e(r,a),r.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._a,i=0|this._b,r=0|this._c,a=0|this._d,o=0|this._e,l=0|this._f,s=0|this._g,c=0|this._h,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<64;++u){e=t[u-2];var d=t[u-15];t[u]=((e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+t[u-7]+((d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3)+t[u-16]|0}for(u=0;u<64;++u)e=c+((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(s^o&(l^s))+p[u]+t[u]|0,d=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i|r&(n|i))|0,c=s,s=l,l=o,o=a+e|0,a=r,r=i,i=n,n=e+d|0;this._a=n+this._a|0,this._b=i+this._b|0,this._c=r+this._c|0,this._d=a+this._d|0,this._e=o+this._e|0,this._f=l+this._f|0,this._g=s+this._g|0,this._h=c+this._h|0},r.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},n.exports=r},shadow$provide[220]=function(e,t,n,i){function r(){this.init(),this._w=l,a.call(this,64,56)}e=t(16),i=t(219);var a=t(216),o=t(24).Buffer,l=Array(64);e(r,i),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},n.exports=r},shadow$provide[221]=function(e,t,n,i){function r(){this.init(),this._w=l,a.call(this,128,112)}function j(e,t){return e>>>0>>0?1:0}e=t(16);var a=t(216),o=t(24).Buffer,E=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=Array(160);e(r,a),r.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},r.prototype._update=function(e){for(var t=this._w,n=0|this._ah,i=0|this._bh,r=0|this._ch,a=0|this._dh,o=0|this._eh,l=0|this._fh,s=0|this._gh,c=0|this._hh,u=0|this._al,d=0|this._bl,p=0|this._cl,h=0|this._dl,f=0|this._el,g=0|this._fl,m=0|this._gl,y=0|this._hl,$=0;$<32;$+=2)t[$]=e.readInt32BE(4*$),t[$+1]=e.readInt32BE(4*$+4);for(;$<160;$+=2){e=t[$-30];var v=t[$-30+1],b=(e>>>1|v<<31)^(e>>>8|v<<24)^e>>>7,w=(v>>>1|e<<31)^(v>>>8|e<<24)^(v>>>7|e<<25),k=((e=t[$-4])>>>19|(v=t[$-4+1])<<13)^(v>>>29|e<<3)^e>>>6;v=(v>>>19|e<<13)^(e>>>29|v<<3)^(v>>>6|e<<26);var _=t[$-32],x=t[$-32+1];e=w+t[$-14+1]|0,b=(b=(b=b+t[$-14]+j(e,w)|0)+k+j(e=e+v|0,v)|0)+_+j(e=e+x|0,x)|0,t[$]=b,t[$+1]=e}for($=0;$<160;$+=2){b=t[$],e=t[$+1];var I=E[$+1],A=m^f&(g^m);w=(w=(w=(w=c+((o>>>14|f<<18)^(o>>>18|f<<14)^(f>>>9|o<<23))+j(k=y+((f>>>14|o<<18)^(f>>>18|o<<14)^(o>>>9|f<<23))|0,y)|0)+(s^o&(l^s))+j(k=k+A|0,A)|0)+E[$]+j(k=k+I|0,I)|0)+b+j(k=k+e|0,e)|0,b=(_=(n>>>28|u<<4)^(u>>>2|n<<30)^(u>>>7|n<<25))+(v=n&i|r&(n|i))+j(e=(x=(u>>>28|n<<4)^(n>>>2|u<<30)^(n>>>7|u<<25))+(u&d|p&(u|d))|0,x)|0,c=s,y=m,s=l,m=g,l=o,g=f,o=a+w+j(f=h+k|0,h)|0,a=r,h=p,r=i,p=d,i=n,d=u,n=w+b+j(u=k+e|0,k)|0}this._al=this._al+u|0,this._bl=this._bl+d|0,this._cl=this._cl+p|0,this._dl=this._dl+h|0,this._el=this._el+f|0,this._fl=this._fl+g|0,this._gl=this._gl+m|0,this._hl=this._hl+y|0,this._ah=this._ah+n+j(this._al,u)|0,this._bh=this._bh+i+j(this._bl,d)|0,this._ch=this._ch+r+j(this._cl,p)|0,this._dh=this._dh+a+j(this._dl,h)|0,this._eh=this._eh+o+j(this._el,f)|0,this._fh=this._fh+l+j(this._fl,g)|0,this._gh=this._gh+s+j(this._gl,m)|0,this._hh=this._hh+c+j(this._hl,y)|0},r.prototype._hash=function(){function e(e,t,n){i.writeInt32BE(e,n),i.writeInt32BE(t,n+4)}var i=o.allocUnsafe(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),i},n.exports=r},shadow$provide[222]=function(e,t,n,i){function r(){this.init(),this._w=l,a.call(this,128,112)}e=t(16),i=t(221);var a=t(216),o=t(24).Buffer,l=Array(160);e(r,i),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){function e(e,t,n){i.writeInt32BE(e,n),i.writeInt32BE(t,n+4)}var i=o.allocUnsafe(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),i},n.exports=r},shadow$provide[223]=function(e,t,n,i){(i=n.exports=function(e){e=e.toLowerCase();var t=i[e];if(!t)throw Error(e+" is not supported (we accept pull requests)");return new t}).sha=t(217),i.sha1=t(218),i.sha224=t(220),i.sha256=t(219),i.sha384=t(222),i.sha512=t(221)},shadow$provide[224]=function(e,t,n,i){function r(e){o.call(this),(this.hashMode="string"==typeof e)?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._encoding=this._decoder=null}var a=t(24).Buffer,o=t(42).Transform,l=t(33).StringDecoder;t(16)(r,o),r.prototype.update=function(e,t,n){return"string"==typeof e&&(e=a.from(e,t)),e=this._update(e),this.hashMode?this:(n&&(e=this._toString(e,n)),e)},r.prototype.setAutoPadding=function(){},r.prototype.getAuthTag=function(){throw Error("trying to get auth tag in unsupported state")},r.prototype.setAuthTag=function(){throw Error("trying to set auth tag in unsupported state")},r.prototype.setAAD=function(){throw Error("trying to set aad in unsupported state")},r.prototype._transform=function(e,t,n){try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){var i=e}finally{n(i)}},r.prototype._flush=function(e){try{this.push(this.__final())}catch(e){var t=e}e(t)},r.prototype._finalOrDigest=function(e){var t=this.__final()||a.alloc(0);return e&&(t=this._toString(t,e,!0)),t},r.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new l(t),this._encoding=t),this._encoding!==t)throw Error("can't switch encodings");return e=this._decoder.write(e),n&&(e+=this._decoder.end()),e},n.exports=r},shadow$provide[225]=function(e,t,n,i){function r(e){s.call(this,"digest"),this._hash=e}e=t(16);var a=t(214),o=t(215),l=t(223),s=t(224);e(r,s),r.prototype._update=function(e){this._hash.update(e)},r.prototype._final=function(){return this._hash.digest()},n.exports=function(e){return"md5"===(e=e.toLowerCase())?new a:"rmd160"===e||"ripemd160"===e?new o:new r(l(e))}},shadow$provide[226]=function(e,t,n,i){var r=t(212),a=t(24).Buffer;n.exports=function(i){function t(e){var t=e.slice(0,-4);e=e.slice(-4);var n=i(t);if(!(e[0]^n[0]|e[1]^n[1]|e[2]^n[2]|e[3]^n[3]))return t}return{encode:function(e){var t=i(e);return r.encode(a.concat([e,t],e.length+4))},decode:function(e){if(!(e=t(e=r.decode(e))))throw Error("Invalid checksum");return e},decodeUnsafe:function(e){if(e=r.decodeUnsafe(e))return t(e)}}}},shadow$provide[227]=function(e,t,n,i){var r=t(225);e=t(226),n.exports=e(function(e){return e=r("sha256").update(e).digest(),r("sha256").update(e).digest()})},shadow$provide[228]=function(e,t,n,i){function r(e,t){if(e&&"object"==typeof e&&(t=e,e=null),t=t||{},!(this instanceof r))return new r(e,t);var n=t.tracker||{};n.getAnnounceOpts=n.getAnnounceOpts||function(){return{numwant:4}},t.iceServers&&(n.rtcConfig={iceServers:t.iceServers}),this.announce=t.announce||["wss://hub.bugout.link","wss://tracker.openwebtorrent.com","wss://tracker.btorrent.xyz"],this.wt=t.wt||new l({tracker:n}),this.nacl=w,this.seed=t.seed?t.seed:this.encodeseed(w.randomBytes(32)),this.timeout=t.timeout||A,this.keyPair=t.keyPair||w.sign.keyPair.fromSeed(Uint8Array.from(_.decode(this.seed)).slice(2)),this.keyPairEncrypt=w.box.keyPair(),this.pk=k.encode(o.from(this.keyPair.publicKey)),this.ek=k.encode(o.from(this.keyPairEncrypt.publicKey)),this.identifier=e||this.address(),this.peers={},this.seen={},this.lastwirecount=null,this.api={},this.callbacks={},this.heartbeattimer=this.serveraddress=null,v("address",this.address()),v("identifier",this.identifier),v("public key",this.pk),v("encryption key",this.ek),"object"==typeof File?e=new File([this.identifier],this.identifier):(e=new o.from(this.identifier)).name=this.identifier,(e=this.wt.seed(e,{name:this.identifier,announce:this.announce},$(function(t,e){v("torrent",t.identifier,e),t.emit("torrent",t.identifier,e),e.discovery.tracker&&e.discovery.tracker.on("update",function(e){t.emit("tracker",t.identifier,e)}),e.discovery.on("trackerAnnounce",function(){t.emit("announce",t.identifier),t.connections()})},this))).on("wire",$(a,this,this.identifier)),this.torrent=e,t.heartbeat&&this.heartbeat(t.heartbeat)}function d(e,t){var n,i={t:m(),i:e.identifier,pk:e.pk,ek:e.ek,n:w.randomBytes(8)};for(n in t)i[n]=t[n];return pe=b.encode(i),b.encode({s:w.sign.detached(pe,e.keyPair.secretKey),p:pe})}function p(e,t,n){if(!e.peers[e.address(t)])throw e.address(t)+" not seen - no encryption key.";var i=w.randomBytes(w.box.nonceLength);return n=b.encode({n:i,ek:k.encode(o.from(e.keyPairEncrypt.publicKey)),e:w.box(n,i,k.decode(e.peers[e.address(t)].ek),e.keyPairEncrypt.secretKey)})}function h(e,t){e=e.torrent.wires;for(var n=0;nr,v("packet",s),a&&o&&r)if(f(e,l,o=s.ek.toString(),t),"m"==s.y){v("message",t,s);var c=s.v.toString(),u=null;try{u=JSON.parse(c)}catch(e){v("Malformed message JSON: "+c)}u&&e.emit("message",e.address(l),u,s)}else if("r"==s.y){v("rpc",t,s),u=s.c.toString(),t=s.a.toString();try{c=JSON.parse(t)}catch(e){c=null,v("Malformed args JSON: "+t)}t=s.rn,e.emit("rpc",e.address(l),u,c,y(t)),function(e,t,n,i,r){var a={y:"rr",rn:r};e.api[n]?e.api[n](e.address(t),i,function(e){a.rr=JSON.stringify(e)}):a.rr=JSON.stringify({error:"No such API call."});a=d(e,a),a=p(e,t,a),h(e,a)}(e,l,u,c,t)}else if("rr"==s.y)if(t=y(s.rn),e.callbacks[t]){s=s.rr.toString();try{u=JSON.parse(s)}catch(e){v("Malformed response JSON: "+s),u=null}e.callbacks[t]&&u?(v("rpc-response",e.address(l),t,u),e.emit("rpc-response",e.address(l),t,u),e.callbacks[t](u),delete e.callbacks[t]):v("RPC response nonce not known:",t)}else v("dropped response with no callback.",t);else"p"==s.y?(l=e.address(l),v("ping from",l),e.emit("ping",l)):"x"==s.y?(l=e.address(l),v("got left from",l),delete e.peers[l],e.emit("left",l)):v("unknown packet type");else v("dropping bad packet",n,a,o,r)}else v("skipping packet with no payload",n,a);h(e,i)}e.seen[n]=m()}function f(e,t,n,i){v("sawPeer",e.address(t),n),i=m();var r=e.address(t);r!=e.address()&&(!e.peers[r]||e.peers[r].last+e.timeout