/**
 * CyberChef - The Cyber Swiss Army Knife
 *
 * @copyright Crown Copyright 2016
 * @license Apache-2.0
 *
 *   Copyright 2016 Crown Copyright
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1531)}([function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},function(t,e,r){"use strict";(function(t,n,i){r.d(e,"c",(function(){return v})),r.d(e,"d",(function(){return k})),r.d(e,"e",(function(){return M})),r.d(e,"a",(function(){return S}));var o=r(8),s=r.n(o),a=r(11),u=r.n(a),f=r(2),h=r.n(f),c=r(3),l=r.n(c),p=r(26),d=r.n(p),m=r(16),y=r(21),_=r(29),g=r(28),b=function(){function e(){h()(this,e)}var r;return l()(e,null,[{key:"chr",value:function(t){if(t>65535){t-=65536;var e=String.fromCharCode(t>>>10&1023|55296);return t=56320|1023&t,e+String.fromCharCode(t)}return String.fromCharCode(t)}},{key:"ord",value:function(t){if(2===t.length){var e=t.charCodeAt(0),r=t.charCodeAt(1);if(e>=55296&&e<56320&&r>=56320&&r<57344)return 1024*(e-55296)+r-56320+65536}return t.charCodeAt(0)}},{key:"padBytesRight",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(e);return n.fill(r),[...t].forEach((function(t,e){n[e]=t})),n}},{key:"truncate",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t.length>e&&(t=t.slice(0,e-r.length)+r),t}},{key:"hex",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(t="string"==typeof t?e.ord(t):t).toString(16).padStart(r,"0")}},{key:"bin",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(t="string"==typeof t?e.ord(t):t).toString(2).padStart(r,"0")}},{key:"printable",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];w()&&window.app&&!window.app.options.treatAsUtf8&&(t=e.byteArrayToChars(e.strToByteArray(t)));var n=/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,i=/[\x09-\x10\x0D\u2028\u2029]/g;return t=t.replace(n,"."),r||(t=t.replace(i,".")),t}},{key:"parseEscapedChars",value:function(t){return t.replace(/\\([bfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,(function(t,e){switch(e[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(e,8));case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(e.substr(1),16));case"u":return"{"===e[1]?String.fromCodePoint(parseInt(e.slice(2,-1),16)):String.fromCharCode(parseInt(e.substr(1),16))}}))}},{key:"escapeRegex",value:function(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(t){for(var r=[],n=0;n<t.length;n++)if(n<t.length-2&&"-"===t[n+1]&&"\\"!==t[n]){for(var i=e.ord(t[n]),o=e.ord(t[n+2]),s=i;s<=o;s++)r.push(e.chr(s));n+=2}else n<t.length-2&&"\\"===t[n]&&"-"===t[n+1]?(r.push("-"),n++):r.push(t[n]);return r}},{key:"convertToByteArray",value:function(t,r){switch(r.toLowerCase()){case"binary":return Object(g.a)(t);case"hex":return Object(y.a)(t);case"decimal":return Object(_.a)(t);case"base64":return Object(m.a)(t,null,"byteArray");case"utf8":return e.strToUtf8ByteArray(t);case"latin1":default:return e.strToByteArray(t)}}},{key:"convertToByteString",value:function(t,r){switch(r.toLowerCase()){case"binary":return e.byteArrayToChars(Object(g.a)(t));case"hex":return e.byteArrayToChars(Object(y.a)(t));case"decimal":return e.byteArrayToChars(Object(_.a)(t));case"base64":return e.byteArrayToChars(Object(m.a)(t,null,"byteArray"));case"utf8":return d.a.encode(t);case"latin1":default:return t}}},{key:"strToArrayBuffer",value:function(t){for(var r,n=new Uint8Array(t.length),i=t.length;i--;)if(r=t.charCodeAt(i),n[i]=r,r>255)return e.strToUtf8ArrayBuffer(t);return n.buffer}},{key:"strToUtf8ArrayBuffer",value:function(t){var r=d.a.encode(t);return t.length!==r.length&&(k()?self.setOption("attemptHighlight",!1):w()&&(window.app.options.attemptHighlight=!1)),e.strToArrayBuffer(r)}},{key:"strToByteArray",value:function(t){for(var r,n=new Array(t.length),i=t.length;i--;)if(r=t.charCodeAt(i),n[i]=r,r>255)return e.strToUtf8ByteArray(t);return n}},{key:"strToUtf8ByteArray",value:function(t){var r=d.a.encode(t);return t.length!==r.length&&(k()?self.setOption("attemptHighlight",!1):w()&&(window.app.options.attemptHighlight=!1)),e.strToByteArray(r)}},{key:"strToCharcode",value:function(t){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);if(n<t.length-1&&i>=55296&&i<56320){var o=t[n+1].charCodeAt(0);o>=56320&&o<57344&&(i=e.ord(t[n]+t[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(t){var r=e.byteArrayToChars(t);try{var n=d.a.decode(r);return r.length!==n.length&&(k()?self.setOption("attemptHighlight",!1):w()&&(window.app.options.attemptHighlight=!1)),n}catch(t){return r}}},{key:"byteArrayToChars",value:function(t){if(!t)return"";for(var e="",r=0;r<t.length;)e+=String.fromCharCode(t[r++]);return e}},{key:"arrayBufferToStr",value:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=new Uint8Array(t);return r?e.byteArrayToUtf8(n):e.byteArrayToChars(n)}},{key:"calculateShannonEntropy",value:function(t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var e,r=[],n=new Array(256).fill(0);for(e=0;e<t.length;e++)n[t[e]]++;for(e=0;e<n.length;e++)n[e]>0&&r.push(n[e]/t.length);var i,o=0;for(e=0;e<r.length;e++)o+=(i=r[e])*Math.log(i)/Math.log(2);return-o}},{key:"parseCSV",value:function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],o=!1,s=!1,a="",u=[],f=[];t.length&&"\ufeff"===t[0]&&(t=t.substr(1));for(var h=0;h<t.length;h++)e=t[h],r=t[h+1]||"",o?(a+=e,o=!1):'"'!==e||s?'"'===e&&s?'"'===r?o=!0:s=!1:!s&&n.indexOf(e)>=0?(u.push(a),a=""):!s&&i.indexOf(e)>=0?(u.push(a),a="",f.push(u),u=[],i.indexOf(r)>=0&&r!==e&&h++):a+=e:s=!0;return u.length&&(u.push(a),f.push(u)),f}},{key:"stripHtmlTags",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(t=t.replace(/<(script|style)[^>]*>.*<\/(script|style)>/gim,"")),t.replace(/<[^>]+>/g,"")}},{key:"escapeHtml",value:function(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"};return t.replace(/[&<>"'/`]/g,(function(t){return e[t]}))}},{key:"unescapeHtml",value:function(t){var e={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/","&#x60;":"`"};return t.replace(/&#?x?[a-z0-9]{2,4};/gi,(function(t){return e[t]||t}))}},{key:"encodeURIFragment",value:function(t){var e={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(t=encodeURIComponent(t)).replace(/%[0-9A-F]{2}/g,(function(t){return e[t]||t}))}},{key:"generatePrettyRecipe",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",o="",s="";return t.forEach((function(t){n=t.op.replace(/ /g,"_"),i=JSON.stringify(t.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),o=t.disabled?"/disabled":"",s=t.breakpoint?"/breakpoint":"",r+=`${n}(${i}${o}${s})`,e&&(r+="\n")})),r}},{key:"parseRecipeConfig",value:function(t){if(0===(t=t.trim()).length)return[];if("["===t[0])return JSON.parse(t);var e,r;t=t.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];e=n.exec(t);){r="["+(r=e[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var o={op:e[1].replace(/_/g," "),args:JSON.parse(r)};e[3]&&e[3].indexOf("disabled")>0&&(o.disabled=!0),e[3]&&e[3].indexOf("breakpoint")>0&&(o.breakpoint=!0),i.push(o)}return i}},{key:"displayFilesAsHTML",value:(r=u()(s.a.mark((function t(r){var n,i,o,a,f;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=function(t){return`<div class='card' style='white-space: normal;'>\n                    <div class='card-header'>\n                        <h6 class="mb-0">\n                            ${e.escapeHtml(t.name)}\n                        </h6>\n                    </div>\n                </div>`},i=function(t,r){if(r.startsWith("image")){var n="data:";return n+=r+";","<img style='max-width: 100%;' src='"+(n+="base64,"+Object(m.b)(t))+"'>"}return`<pre>${e.escapeHtml(e.arrayBufferToStr(t.buffer))}</pre>`},o=function(){var t=u()(s.a.mark((function t(r,n){var o,a,u,f;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.readFile(r);case 2:return o=t.sent,a=new Blob([o],{type:r.type||"octet/stream"}),u=URL.createObjectURL(a),f=`<div class='card' style='white-space: normal;'>\n                    <div class='card-header' id='heading${n}'>\n                        <h6 class='mb-0'>\n                            <a class='collapsed'\n                                data-toggle='collapse'\n                                href='#collapse${n}'\n                                aria-expanded='false'\n                                aria-controls='collapse${n}'\n                                title="Show/hide contents of '${e.escapeHtml(r.name)}'">\n                                ${e.escapeHtml(r.name)}</a>\n                            <span class='float-right' style="margin-top: -3px">\n                                ${r.size.toLocaleString()} bytes\n                                <a title="Download ${e.escapeHtml(r.name)}"\n                                    href="${u}"\n                                    download="${e.escapeHtml(r.name)}"\n                                    data-toggle="tooltip">\n                                    <i class="material-icons" style="vertical-align: bottom">save</i>\n                                </a>\n                                <a title="Move to input"\n                                    href="#"\n                                    blob-url="${u}"\n                                    file-name="${e.escapeHtml(r.name)}"\n                                    class="extract-file"\n                                    data-toggle="tooltip">\n                                    <i class="material-icons" style="vertical-align: bottom">open_in_browser</i>\n                                </a>\n                            </span>\n                        </h6>\n                    </div>\n                    <div id='collapse${n}' class='collapse' aria-labelledby='heading${n}' data-parent="#files">\n                        <div class='card-body'>\n                            ${i(o,r.type)}\n                        </div>\n                    </div>\n                </div>`,t.abrupt("return",f);case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),a=`<div style='padding: 5px; white-space: normal;'>\n                ${r.length} file(s) found\n            </div><div id="files" style="padding: 20px">`,f=0;case 5:if(!(f<r.length)){t.next=17;break}if(!r[f].name.endsWith("/")){t.next=10;break}a+=n(r[f]),t.next=14;break;case 10:return t.t0=a,t.next=13,o(r[f],f);case 13:a=t.t0+=t.sent;case 14:f++,t.next=5;break;case 17:return t.abrupt("return",a+="</div>");case 18:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)})},{key:"parseURIParams",value:function(t){if(""===t)return{};"?"!==t[0]&&"#"!==t[0]||(t=t.substr(1));for(var e=t.split("&"),r={},n=0;n<e.length;n++){var i=e[n].split("=");2!==i.length?r[e[n]]=!0:r[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return r}},{key:"readFile",value:function(e){return v()?t.from(e).buffer:new Promise((function(t,r){var n=new FileReader,i=new Uint8Array(e.size),o=0,s=function(){if(o>=e.size)t(i);else{var r=e.slice(o,o+10485760);n.readAsArrayBuffer(r)}};n.onload=function(t){i.set(new Uint8Array(n.result),o),o+=10485760,s()},n.onerror=function(t){r(n.error.message)},s()}))}},{key:"readFileSync",value:function(t){if(!v())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(t.data).buffer}},{key:"mod",value:function(t,e){return(t%e+e)%e}},{key:"gcd",value:function(t,r){return r?e.gcd(r,t%r):t}},{key:"modInv",value:function(t,e){t%=e;for(var r=1;r<e;r++)if(t*r%26==1)return r}},{key:"charRep",value:function(t){return{Space:" ",Percent:"%",Comma:",","Semi-colon":";",Colon:":",Tab:"\t","Line feed":"\n",CRLF:"\r\n","Forward slash":"/",Backslash:"\\","0x":"0x","\\x":"\\x","Nothing (separate chars)":"",None:""}[t]}},{key:"regexRep",value:function(t){return{Space:/\s+/g,Percent:/%/g,Comma:/,/g,"Semi-colon":/;/g,Colon:/:/g,"Line feed":/\n/g,CRLF:/\r\n/g,"Forward slash":/\//g,Backslash:/\\/g,"0x with comma":/,?0x/g,"0x":/0x/g,"\\x":/\\x/g,None:/\s+/g}[t]}}]),e}();function v(){return void 0!==n&&null!=n.versions&&null!=n.versions.node}function w(){return"object"==typeof window}function k(){return"function"==typeof importScripts}function M(t){k()?self.sendStatusMessage(t):w()?app.alert(t,1e4):v()&&!i.TESTING&&console.debug(t)}e.b=b,Array.prototype.unique=function(){for(var t={},e=[],r=0,n=this.length;r<n;r++)Object.prototype.hasOwnProperty.call(t,this[r])||(e.push(this[r]),t[this[r]]=1);return e},Array.prototype.max=function(){return Math.max.apply(null,this)},Array.prototype.min=function(){return Math.min.apply(null,this)},Array.prototype.sum=function(){return this.reduce((function(t,e){return t+e}),0)},Array.prototype.equals=function(t){if(!t)return!1;var e=this.length;if(e!==t.length)return!1;for(;e--;)if(this[e]!==t[e])return!1;return!0},String.prototype.count=function(t){return this.split(t).length-1};var x={};function S(t,e,r,n,i){return function(){clearTimeout(x[r]),x[r]=setTimeout((function(){t.apply(n,i)}),e)}}String.prototype.padStart||(String.prototype.padStart=function(t,e){return t>>=0,e=String(void 0!==e?e:" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),e.slice(0,t)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t>>=0,e=String(void 0!==e?e:" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))})}).call(this,r(12).Buffer,r(19),r(24))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e,r){var n=r(47);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e,r){var n=r(44),i=r(25);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?i(t):e}},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(2),i=r.n(n),o=r(3),s=r.n(o),a=function(){function t(e){i()(this,t),this.bytes=e,this.length=this.bytes.length,this.position=0,this.bitPos=0}return s()(t,[{key:"getBytes",value:function(t){if(!(this.position>this.length)){var e=this.position+t,r=this.bytes.slice(this.position,e);return this.position=e,this.bitPos=0,r}}},{key:"readString",value:function(t){if(!(this.position>this.length)){for(var e="",r=this.position;r<this.position+t;r++){var n=this.bytes[r];if(0===n)break;e+=String.fromCharCode(n)}return this.position+=t,this.bitPos=0,e}}},{key:"readInt",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r=0;if("be"===e)for(var n=this.position;n<this.position+t;n++)r<<=8,r|=this.bytes[n];else for(var i=this.position+t-1;i>=this.position;i--)r<<=8,r|=this.bytes[i];return this.position+=t,this.bitPos=0,r}}},{key:"readBits",value:function(t){if(!(this.position>this.length)){var e=0,r=0;for(e=(this.bytes[this.position++]&256-(1<<this.bitPos))>>>this.bitPos,r=8-this.bitPos,this.bitPos=0;r<t;)e|=this.bytes[this.position++]<<r,r+=8;if(r>t){var n=r-t;e&=(1<<t)-1,r-=n,this.position--,this.bitPos=8-n}return e}}},{key:"continueUntil",value:function(t){if(!(this.position>this.length))if(this.bitPos=0,"number"!=typeof t){var e=t.length,r=t[e-1];this.position=e;for(var n=function(t,e){var r=new Array;return t.forEach((function(t,n){r[t]=e-n})),r}(t,e),i=!0;this.position<this.length;){for(;this.position<this.length&&this.bytes[this.position++]!==r;);i=!0;for(var o=e-1;o>=0;o--)if(this.bytes[this.position-e+o]!==t[o]){i=!1,this.position+=n[t[o]];break}if(i){this.position-=e;break}}}else for(;++this.position<this.length&&this.bytes[this.position]!==t;);}},{key:"consumeWhile",value:function(t){for(;this.position<this.length&&this.bytes[this.position]===t;)this.position++;this.bitPos=0}},{key:"consumeIf",value:function(t){this.bytes[this.position]===t&&(this.position++,this.bitPos=0)}},{key:"moveForwardsBy",value:function(t){var e=this.position+t;if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"moveBackwardsBy",value:function(t){var e=this.position-t;if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(t){if(t<=this.bitPos)this.bitPos-=t;else for(this.bitPos>0&&(t-=this.bitPos,this.bitPos=0);t>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(t),t-=8}},{key:"moveTo",value:function(t){if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"hasMore",value:function(){return this.position<this.length}},{key:"carve",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position;return this.bitPos>0&&e++,this.bytes.slice(t,e)}}]),t}()},function(t,e,r){"use strict";var n=r(2),i=r.n(n),o=r(25),s=r.n(o),a=r(4),u=r.n(a),f=r(5),h=r.n(f),c=r(0),l=r.n(c);function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=l()(t);if(e){var i=l()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h()(this,r)}}
/**
 * Custom error type for handling operation input errors.
 * i.e. where the operation can handle the error and print a message to the screen.
 *
 * @author d98762625 [d98762625@gmail.com]
 * @copyright Crown Copyright 2018
 * @license Apache-2.0
 */
var d=function(t){u()(r,t);var e=p(r);function r(){var t;i()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return(t=e.call(this,...o)).type="OperationError",Error.captureStackTrace&&Error.captureStackTrace(s()(t),r),t}return r}(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Error));e.a=d},function(t,e,r){t.exports=r(45)},function(t,e,r){"use strict";var n=r(2),i=r.n(n),o=r(3),s=r.n(o),a=r(15),u=r(1),f=r(21),h=function(){function t(e){i()(this,t),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,this.min=null,this.max=null,this.step=1,e&&this._parseConfig(e)}return s()(t,[{key:"_parseConfig",value:function(t){this.name=t.name,this.type=t.type,this.defaultValue=t.value,this.disabled=!!t.disabled,this.hint=t.hint||!1,this.rows=t.rows||!1,this.toggleValues=t.toggleValues,this.target=void 0!==t.target?t.target:null,this.defaultIndex=void 0!==t.defaultIndex?t.defaultIndex:0,this.min=t.min,this.max=t.max,this.step=t.step}},{key:"config",get:function(){return this._value}},{key:"value",set:function(e){this._value=t.prepare(e,this.type)},get:function(){return this._value}}],[{key:"prepare",value:function(t,e){var r;switch(e){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return u.b.parseEscapedChars(t);case"byteArray":return"string"==typeof t?(t=t.replace(/\s+/g,""),Object(f.a)(t)):t;case"number":if(null===t)return t;if(r=parseFloat(t),isNaN(r))throw"Invalid ingredient value. Not a number: "+u.b.truncate(t.toString(),10);return r;default:return t}}}]),t}(),c=function(){function t(){i()(this,t),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null}return s()(t,[{key:"run",value:function(t,e){return t}},{key:"highlight",value:function(t,e){return!1}},{key:"highlightReverse",value:function(t,e){return!1}},{key:"present",value:function(t,e){return t}},{key:"addIngredient",value:function(t){this._ingList.push(t)}},{key:"inputType",set:function(t){this._inputType=a.a.typeEnum(t)},get:function(){return a.a.enumLookup(this._inputType)}},{key:"outputType",set:function(t){this._outputType=a.a.typeEnum(t),this._presentType<0&&(this._presentType=this._outputType)},get:function(){return a.a.enumLookup(this._outputType)}},{key:"presentType",set:function(t){this._presentType=a.a.typeEnum(t)},get:function(){return a.a.enumLookup(this._presentType)}},{key:"args",set:function(t){var e=this;t.forEach((function(t){var r=new h(t);e.addIngredient(r)}))},get:function(){return this._ingList.map((function(t){var e={name:t.name,type:t.type,value:t.defaultValue};return t.toggleValues&&(e.toggleValues=t.toggleValues),t.hint&&(e.hint=t.hint),t.rows&&(e.rows=t.rows),t.disabled&&(e.disabled=t.disabled),t.target&&(e.target=t.target),t.defaultIndex&&(e.defaultIndex=t.defaultIndex),"number"==typeof t.min&&(e.min=t.min),"number"==typeof t.max&&(e.max=t.max),t.step&&(e.step=t.step),e}))}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map((function(t){return t.config}))}}},{key:"ingValues",set:function(t){var e=this;t.forEach((function(t,r){e._ingList[r].value=t}))},get:function(){return this._ingList.map((function(t){return t.value}))}},{key:"breakpoint",set:function(t){this._breakpoint=!!t},get:function(){return this._breakpoint}},{key:"disabled",set:function(t){this._disabled=!!t},get:function(){return this._disabled}},{key:"flowControl",get:function(){return this._flowControl},set:function(t){this._flowControl=!!t}},{key:"manualBake",get:function(){return this._manualBake},set:function(t){this._manualBake=!!t}}]),t}();e.a=c},,function(t,e){function r(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}},function(t,e,r){"use strict";(function(t){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */
var n=r(48),i=r(49),o=r(39);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return f(this,t,e,r)}function f(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=l(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):l(t,e);if("Buffer"===e.type&&o(e.data))return l(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e){if(h(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function l(t,e){var r=e.length<0?0:0|p(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(t).length;default:if(n)return z(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return B(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=r;o<a;o++)if(f(t,o)===f(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var c=!0,l=0;l<u;l++)if(f(t,o+l)!==f(e,l)){c=!1;break}if(c)return o}return-1}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function v(t,e,r,n){return q(z(e,t.length-r),t,r,n)}function w(t,e,r,n){return q(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function k(t,e,r,n){return w(t,e,r,n)}function M(t,e,r,n){return q(j(e),t,r,n)}function x(t,e,r,n){return q(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,f=t[i],h=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(h=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return f(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return h(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return c(null,t)},u.allocUnsafeSlow=function(t){return c(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):m.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),f=this.slice(n,i),h=t.slice(e,r),c=0;c<a;++c)if(f[c]!==h[c]){o=f[c],s=h[c];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function B(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function D(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=N(t[o]);return i}function R(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function T(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function F(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(t,e,r,n,o){return o||F(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function C(t,e,r,n,o){return o||F(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||P(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):U(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);I(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);I(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):U(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return O(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return O(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return C(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return C(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:z(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function j(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(24))},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){var n=r(50),i=r(51),o=r(52),s=r(54);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||s()}},function(t,e,r){"use strict";var n=r(8),i=r.n(n),o=r(11),s=r.n(o),a=r(2),u=r.n(a),f=r(3),h=r.n(f),c=r(1),l=r(25),p=r.n(l),d=r(4),m=r.n(d),y=r(5),_=r.n(y),g=r(0),b=r.n(g);function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=b()(t);if(e){var i=b()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _()(this,r)}}
/**
 * Custom error type for handling Dish type errors.
 * i.e. where the Dish cannot be successfully translated between types
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2018
 * @license Apache-2.0
 */
var w=function(t){m()(r,t);var e=v(r);function r(){var t;u()(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(t=e.call(this,...i)).type="DishError",Error.captureStackTrace&&Error.captureStackTrace(p()(t),r),t}return r}(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Error)),k=r(17),M=r.n(k),x=r(20),S=r(27),E=r.n(S),A=function(){function t(){u()(this,t)}return h()(t,null,[{key:"checkForValue",value:function(t){if(void 0===t)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){throw new Error("fromArrayBuffer has not been implemented")}}]),t}();function B(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author d98762625 [d98762625@gmail.com]
 * @copyright Crown Copyright 2019
 * @license Apache-2.0
 */();return function(){var r,n=b()(t);if(e){var i=b()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _()(this,r)}}var D=function(t){m()(r,t);var e=B(r);function r(){return u()(this,r),e.apply(this,arguments)}return h()(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}]),r}(A);function R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author d98762625 [d98762625@gmail.com]
 * @copyright Crown Copyright 2019
 * @license Apache-2.0
 */();return function(){var r,n=b()(t);if(e){var i=b()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _()(this,r)}}var P=function(t){m()(r,t);var e=R(r);function r(){return u()(this,r),e.apply(this,arguments)}return h()(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=M.a.isBigNumber(this.value)?c.b.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(t){r.checkForValue(this.value);try{this.value=new M.a(c.b.arrayBufferToStr(this.value,!t))}catch(t){this.value=new M.a(NaN)}}}]),r}(A);function I(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author d98762625 [d98762625@gmail.com]
 * @copyright Crown Copyright 2019
 * @license Apache-2.0
 */();return function(){var r,n=b()(t);if(e){var i=b()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _()(this,r)}}var T=function(t){m()(r,t);var e=I(r);function r(){return u()(this,r),e.apply(this,arguments)}return h()(r,null,[{key:"toArrayBuffer",value:function(){var t=this;if(r.checkForValue(this.value),!Object(c.c)())return new Promise((function(e,r){c.b.readFile(t.value).then((function(e){return t.value=e.buffer})).then(e).catch(r)}));this.value=c.b.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new File(this.value,"unknown")}}]),r}(A);function U(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author d98762625 [d98762625@gmail.com]
 * @copyright Crown Copyright 2019
 * @license Apache-2.0
 */();return function(){var r,n=b()(t);if(e){var i=b()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _()(this,r)}}var F=function(t){m()(r,t);var e=U(r);function r(){return u()(this,r),e.apply(this,arguments)}return h()(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?c.b.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(t){r.checkForValue(this.value),this.value=this.value?c.b.arrayBufferToStr(this.value,!t):""}}]),r}(A);function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author d98762625 [d98762625@gmail.com]
 * @copyright Crown Copyright 2019
 * @license Apache-2.0
 */();return function(){var r,n=b()(t);if(e){var i=b()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _()(this,r)}}var C=function(t){m()(r,t);var e=O(r);function r(){return u()(this,r),e.apply(this,arguments)}return h()(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?c.b.strToArrayBuffer(c.b.unescapeHtml(c.b.stripHtmlTags(this.value,!0))):new ArrayBuffer}}]),r}(F);function L(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author d98762625 [d98762625@gmail.com]
 * @copyright Crown Copyright 2019
 * @license Apache-2.0
 */();return function(){var r,n=b()(t);if(e){var i=b()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _()(this,r)}}var N=function(t){m()(r,t);var e=L(r);function r(){return u()(this,r),e.apply(this,arguments)}return h()(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=void 0!==this.value?c.b.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(t){r.checkForValue(this.value),this.value=JSON.parse(c.b.arrayBufferToStr(this.value,!t))}}]),r}(A);function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author d98762625 [d98762625@gmail.com]
 * @copyright Crown Copyright 2019
 * @license Apache-2.0
 */();return function(){var r,n=b()(t);if(e){var i=b()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _()(this,r)}}var j=function(t){m()(o,t);var e,r,n=z(o);function o(){return u()(this,o),n.apply(this,arguments)}return h()(o,null,[{key:"toArrayBuffer",value:(r=s()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o.checkForValue(this.value),!Object(c.c)()){t.next=5;break}this.value=this.value.map((function(t){return Uint8Array.from(t.data)})),t.next=8;break;case 5:return t.next=7,o.concatenateTypedArraysWithTypedElements(...this.value);case 7:this.value=t.sent;case 8:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"fromArrayBuffer",value:function(){o.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:(e=s()(i.a.mark((function t(){var e,r,n,o,s,a,u,f,h,l,p,d,m,y=arguments;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=0,r=y.length,n=new Array(r),o=0;o<r;o++)n[o]=y[o];for(s=0,a=n;s<a.length;s++)u=a[s],e+=u.size;f=new Uint8Array(e),h=0,l=0,p=n;case 6:if(!(l<p.length)){t.next=16;break}return d=p[l],t.next=10,c.b.readFile(d);case 10:m=t.sent,f.set(m,h),h+=m.length;case 13:l++,t.next=6;break;case 16:return t.abrupt("return",f);case 17:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})},{key:"concatenateTypedArrays",value:function(){for(var t=0,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var i=0,o=r;i<o.length;i++){var s=o[i];t+=s.length}for(var a=new Uint8Array(t),u=0,f=0,h=r;f<h.length;f++){var c=h[f];a.set(c,u),u+=c.length}return a}}]),o}(A);function q(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author d98762625 [d98762625@gmail.com]
 * @copyright Crown Copyright 2019
 * @license Apache-2.0
 */();return function(){var r,n=b()(t);if(e){var i=b()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _()(this,r)}}var K=function(t){m()(r,t);var e=q(r);function r(){return u()(this,r),e.apply(this,arguments)}return h()(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value="number"==typeof this.value?c.b.strToArrayBuffer(this.value.toString()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(t){r.checkForValue(this.value),this.value=this.value?parseFloat(c.b.arrayBufferToStr(this.value,!t)):0}}]),r}(A),H=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(u()(this,t),this.value=new ArrayBuffer(0),this.type=t.ARRAY_BUFFER,e&&Object.prototype.hasOwnProperty.call(e,"value")&&Object.prototype.hasOwnProperty.call(e,"type"))this.set(e.value,e.type);else if(e&&null!==r)this.set(e,r);else if(e){var n=t.typeEnum(e.constructor.name);this.set(e,n)}}var e;return h()(t,[{key:"get",value:function(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"==typeof e&&(e=t.typeEnum(e)),this.type!==e?Object(c.c)()?(this._translate(e,n),this.value):new Promise((function(t,i){r._translate(e,n).then((function(){t(r.value)})).catch(i)})):this.value}},{key:"set",value:function(e,r){if("string"==typeof r&&(r=t.typeEnum(r)),E.a.debug("Dish type: "+t.enumLookup(r)),this.value=e,this.type=r,!this.valid()){var n=c.b.truncate(JSON.stringify(this.value),25);throw new w(`Data is not a valid ${t.enumLookup(r)}: ${n}`)}}},{key:"presentAs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.clone();return r.get(t,e)}},{key:"detectDishType",value:function(){var t=new Uint8Array(this.value.slice(0,2048)),e=Object(x.a)(t);return e.length&&e[0].mime&&"text/plain"!==!e[0].mime?e[0].mime:null}},{key:"getTitle",value:(e=s()(i.a.mark((function e(r){var n,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="",e.t0=this.type,e.next=e.t0===t.FILE?4:e.t0===t.LIST_FILE?6:e.t0===t.JSON?8:e.t0===t.NUMBER||e.t0===t.BIG_NUMBER?10:e.t0===t.ARRAY_BUFFER||e.t0===t.BYTE_ARRAY?12:15;break;case 4:return n=this.value.name,e.abrupt("break",26);case 6:return n=this.value.length+" file(s)",e.abrupt("break",26);case 8:return n="application/json",e.abrupt("break",26);case 10:return n=this.value.toString(),e.abrupt("break",26);case 12:if(null===(n=this.detectDishType())){e.next=15;break}return e.abrupt("break",26);case 15:return e.prev=15,(o=this.clone()).value=o.value.slice(0,256),e.next=20,o.get(t.STRING);case 20:n=e.sent,e.next=26;break;case 23:e.prev=23,e.t1=e.catch(15),E.a.error(`${t.enumLookup(this.type)} cannot be sliced. ${e.t1}`);case 26:return e.abrupt("return",n.slice(0,r));case 27:case"end":return e.stop()}}),e,this,[[15,23]])}))),function(t){return e.apply(this,arguments)})},{key:"valid",value:function(){switch(this.type){case t.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var e=0;e<this.value.length;e++)if("number"!=typeof this.value[e]||this.value[e]<0||this.value[e]>255)return!1;return!0;case t.STRING:case t.HTML:return"string"==typeof this.value;case t.NUMBER:return"number"==typeof this.value;case t.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case t.BIG_NUMBER:if(M.a.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var r=new M.a;return r.c=this.value.c,r.e=this.value.e,r.s=this.value.s,this.value=r,!0}return!1;case t.JSON:return!0;case t.FILE:return this.value instanceof File;case t.LIST_FILE:return this.value instanceof Array&&this.value.reduce((function(t,e){return t&&e instanceof File}),!0);default:return!1}}},{key:"clone",value:function(){var e=new t;switch(this.type){case t.STRING:case t.HTML:case t.NUMBER:case t.BIG_NUMBER:e.set(this.value,this.type);break;case t.BYTE_ARRAY:case t.JSON:e.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case t.ARRAY_BUFFER:e.set(this.value.slice(0),this.type);break;case t.FILE:e.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case t.LIST_FILE:e.set(this.value.map((function(t){return new File([t],t.name,{type:t.type,lastModified:t.lastModified})})),this.type);break;default:throw new w("Cannot clone Dish, unknown type")}return e}},{key:"_translate",value:function(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(E.a.debug(`Translating Dish from ${t.enumLookup(this.type)} to ${t.enumLookup(e)}`),!Object(c.c)())return new Promise((function(n,i){r._toArrayBuffer().then((function(){return r.type=t.ARRAY_BUFFER})).then((function(){r._fromArrayBuffer(e),n()})).catch(i)}));this._toArrayBuffer(),this.type=t.ARRAY_BUFFER,this._fromArrayBuffer(e,n)}},{key:"_toArrayBuffer",value:function(){var e=this,r={browser:{[t.STRING]:function(){return Promise.resolve(F.toArrayBuffer.bind(e)())},[t.NUMBER]:function(){return Promise.resolve(K.toArrayBuffer.bind(e)())},[t.HTML]:function(){return Promise.resolve(C.toArrayBuffer.bind(e)())},[t.ARRAY_BUFFER]:function(){return Promise.resolve()},[t.BIG_NUMBER]:function(){return Promise.resolve(P.toArrayBuffer.bind(e)())},[t.JSON]:function(){return Promise.resolve(N.toArrayBuffer.bind(e)())},[t.FILE]:function(){return T.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return Promise.resolve(j.toArrayBuffer.bind(e)())},[t.BYTE_ARRAY]:function(){return Promise.resolve(D.toArrayBuffer.bind(e)())}},node:{[t.STRING]:function(){return F.toArrayBuffer.bind(e)()},[t.NUMBER]:function(){return K.toArrayBuffer.bind(e)()},[t.HTML]:function(){return C.toArrayBuffer.bind(e)()},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return P.toArrayBuffer.bind(e)()},[t.JSON]:function(){return N.toArrayBuffer.bind(e)()},[t.FILE]:function(){return T.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return j.toArrayBuffer.bind(e)()},[t.BYTE_ARRAY]:function(){return D.toArrayBuffer.bind(e)()}}};try{return r[Object(c.c)()?"node":"browser"][this.type]()}catch(e){throw new w(`Error translating from ${t.enumLookup(this.type)} to ArrayBuffer: ${e}`)}}},{key:"_fromArrayBuffer",value:function(e,r){var n=this,i={[t.STRING]:function(){return F.fromArrayBuffer.bind(n)(r)},[t.NUMBER]:function(){return K.fromArrayBuffer.bind(n)(r)},[t.HTML]:function(){return C.fromArrayBuffer.bind(n)(r)},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return P.fromArrayBuffer.bind(n)(r)},[t.JSON]:function(){return N.fromArrayBuffer.bind(n)(r)},[t.FILE]:function(){return T.fromArrayBuffer.bind(n)()},[t.LIST_FILE]:function(){return j.fromArrayBuffer.bind(n)()},[t.BYTE_ARRAY]:function(){return D.fromArrayBuffer.bind(n)()}};try{i[e](),this.type=e}catch(r){throw new w(`Error translating from ArrayBuffer to ${t.enumLookup(e)}: ${r}`)}}},{key:"size",get:function(){switch(this.type){case t.BYTE_ARRAY:case t.STRING:case t.HTML:return this.value.length;case t.NUMBER:case t.BIG_NUMBER:return this.value.toString().length;case t.ARRAY_BUFFER:return this.value.byteLength;case t.JSON:return JSON.stringify(this.value).length;case t.FILE:return this.value.size;case t.LIST_FILE:return this.value.reduce((function(t,e){return t+e.size}),0);default:return-1}}}],[{key:"typeEnum",value:function(e){switch(e.toLowerCase()){case"bytearray":case"byte array":return t.BYTE_ARRAY;case"string":return t.STRING;case"number":return t.NUMBER;case"html":return t.HTML;case"arraybuffer":case"array buffer":return t.ARRAY_BUFFER;case"bignumber":case"big number":return t.BIG_NUMBER;case"json":case"object":return t.JSON;case"file":return t.FILE;case"list<file>":return t.LIST_FILE;default:throw new w("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(e){switch(e){case t.BYTE_ARRAY:return"byteArray";case t.STRING:return"string";case t.NUMBER:return"number";case t.HTML:return"html";case t.ARRAY_BUFFER:return"ArrayBuffer";case t.BIG_NUMBER:return"BigNumber";case t.JSON:return"JSON";case t.FILE:return"File";case t.LIST_FILE:return"List<File>";default:throw new w("Invalid data type enum. No matching type.")}}}]),t}();H.BYTE_ARRAY=0,H.STRING=1,H.NUMBER=2,H.HTML=3,H.ARRAY_BUFFER=4,H.BIG_NUMBER=5,H.JSON=6,H.FILE=7,H.LIST_FILE=8;e.a=H},function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return s}));var n=r(1),i=r(7);
/**
 * Base64 functions.
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2016
 * @license Apache-2.0
 */
function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!t)return"";if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),"string"==typeof t&&(t=n.b.strToByteArray(t)),64!==(e=n.b.expandAlphRange(e).join("")).length&&65!==e.length)throw new i.a(`Invalid Base64 alphabet length (${e.length}): ${e}`);for(var r,o,s,a,u,f,h,c="",l=0;l<t.length;)a=(r=t[l++])>>2,u=(3&r)<<4|(o=t[l++])>>4,f=(15&o)<<2|(s=t[l++])>>6,h=63&s,isNaN(o)?f=h=64:isNaN(s)&&(h=64),c+=e.charAt(a)+e.charAt(u)+e.charAt(f)+e.charAt(h);return c}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!t)return"string"===r?"":[];if(e=e||"A-Za-z0-9+/=",64!==(e=n.b.expandAlphRange(e).join("")).length&&65!==e.length)throw new i.a(`Invalid Base64 alphabet length (${e.length}): ${e}`);var s,a,u,f,h,c,l=[],p=0;if(o){var d=new RegExp("[^"+e.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");t=t.replace(d,"")}for(;p<t.length;)s=e.indexOf(t.charAt(p++))<<2|(f=-1===(f=e.indexOf(t.charAt(p++)||"="))?64:f)>>4,a=(15&f)<<4|(h=-1===(h=e.indexOf(t.charAt(p++)||"="))?64:h)>>2,u=(3&h)<<6|(c=-1===(c=e.indexOf(t.charAt(p++)||"="))?64:c),l.push(s),64!==h&&l.push(a),64!==c&&l.push(u);return"string"===r?n.b.byteArrayToUtf8(l):l}},function(t,e,r){var n;!function(i){"use strict";var o,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,f="[BigNumber Error] ",h=f+"Number primitive has more than 15 significant digits: ",c=1e14,l=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],p=1e9;function d(t){var e=0|t;return t>0||t===e?e:e-1}function m(t){for(var e,r,n=1,i=t.length,o=t[0]+"";n<i;){for(r=14-(e=t[n++]+"").length;r--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function y(t,e){var r,n,i=t.c,o=e.c,s=t.s,a=e.s,u=t.e,f=e.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==f,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>f^r?1:-1;for(a=(u=i.length)<(f=o.length)?u:f,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==f?0:u>f^r?1:-1}function _(t,e,r,n){if(t<e||t>r||t!==u(t))throw Error(f+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function g(t){var e=t.c.length-1;return d(t.e/14)==e&&t.c[e]%2!=0}function b(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function v(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}(o=function t(e){var r,n,i,o,w,k,M,x,S,E=N.prototype={constructor:N,toString:null,valueOf:null},A=new N(1),B=20,D=4,R=-7,P=21,I=-1e7,T=1e7,U=!1,F=1,O=0,C={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},L="0123456789abcdefghijklmnopqrstuvwxyz";function N(t,e){var r,o,a,f,c,l,p,d,m=this;if(!(m instanceof N))return new N(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>T?m.c=m.e=null:t.e<I?m.c=[m.e=0]:(m.e=t.e,m.c=t.c.slice()));if((l="number"==typeof t)&&0*t==0){if(m.s=1/t<0?(t=-t,-1):1,t===~~t){for(f=0,c=t;c>=10;c/=10,f++);return void(f>T?m.c=m.e=null:(m.e=f,m.c=[t]))}d=String(t)}else{if(!s.test(d=String(t)))return i(m,d,l);m.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(f=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(f<0&&(f=c),f+=+d.slice(c+1),d=d.substring(0,c)):f<0&&(f=d.length)}else{if(_(e,2,L.length,"Base"),10==e)return K(m=new N(t),B+m.e+1,D);if(d=String(t),l="number"==typeof t){if(0*t!=0)return i(m,d,l,e);if(m.s=1/t<0?(d=d.slice(1),-1):1,N.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(h+t)}else m.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=L.slice(0,e),f=c=0,p=d.length;c<p;c++)if(r.indexOf(o=d.charAt(c))<0){if("."==o){if(c>f){f=p;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,c=-1,f=0;continue}return i(m,String(t),l,e)}l=!1,(f=(d=n(d,e,10,m.s)).indexOf("."))>-1?d=d.replace(".",""):f=d.length}for(c=0;48===d.charCodeAt(c);c++);for(p=d.length;48===d.charCodeAt(--p););if(d=d.slice(c,++p)){if(p-=c,l&&N.DEBUG&&p>15&&(t>9007199254740991||t!==u(t)))throw Error(h+m.s*t);if((f=f-c-1)>T)m.c=m.e=null;else if(f<I)m.c=[m.e=0];else{if(m.e=f,m.c=[],c=(f+1)%14,f<0&&(c+=14),c<p){for(c&&m.c.push(+d.slice(0,c)),p-=14;c<p;)m.c.push(+d.slice(c,c+=14));c=14-(d=d.slice(c)).length}else c-=p;for(;c--;d+="0");m.c.push(+d)}}else m.c=[m.e=0]}function z(t,e,r,n){var i,o,s,a,u;if(null==r?r=D:_(r,0,8),!t.c)return t.toString();if(i=t.c[0],s=t.e,null==e)u=m(t.c),u=1==n||2==n&&(s<=R||s>=P)?b(u,s):v(u,s,"0");else if(o=(t=K(new N(t),e,r)).e,a=(u=m(t.c)).length,1==n||2==n&&(e<=o||o<=R)){for(;a<e;u+="0",a++);u=b(u,o)}else if(e-=s,u=v(u,o,"0"),o+1>a){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-a)>0)for(o+1==a&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function j(t,e){for(var r,n=1,i=new N(t[0]);n<t.length;n++){if(!(r=new N(t[n])).s){i=r;break}e.call(i,r)&&(i=r)}return i}function q(t,e,r){for(var n=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,n++);return(r=n+14*r-1)>T?t.c=t.e=null:r<I?t.c=[t.e=0]:(t.e=r,t.c=e),t}function K(t,e,r,n){var i,o,s,f,h,p,d,m=t.c,y=l;if(m){t:{for(i=1,f=m[0];f>=10;f/=10,i++);if((o=e-i)<0)o+=14,s=e,d=(h=m[p=0])/y[i-s-1]%10|0;else if((p=a((o+1)/14))>=m.length){if(!n)break t;for(;m.length<=p;m.push(0));h=d=0,i=1,s=(o%=14)-14+1}else{for(h=f=m[p],i=1;f>=10;f/=10,i++);d=(s=(o%=14)-14+i)<0?0:h/y[i-s-1]%10|0}if(n=n||e<0||null!=m[p+1]||(s<0?h:h%y[i-s-1]),n=r<4?(d||n)&&(0==r||r==(t.s<0?3:2)):d>5||5==d&&(4==r||n||6==r&&(o>0?s>0?h/y[i-s]:0:m[p-1])%10&1||r==(t.s<0?8:7)),e<1||!m[0])return m.length=0,n?(e-=t.e+1,m[0]=y[(14-e%14)%14],t.e=-e||0):m[0]=t.e=0,t;if(0==o?(m.length=p,f=1,p--):(m.length=p+1,f=y[14-o],m[p]=s>0?u(h/y[i-s]%y[s])*f:0),n)for(;;){if(0==p){for(o=1,s=m[0];s>=10;s/=10,o++);for(s=m[0]+=f,f=1;s>=10;s/=10,f++);o!=f&&(t.e++,m[0]==c&&(m[0]=1));break}if(m[p]+=f,m[p]!=c)break;m[p--]=0,f=1}for(o=m.length;0===m[--o];m.pop());}t.e>T?t.c=t.e=null:t.e<I&&(t.c=[t.e=0])}return t}function H(t){var e,r=t.e;return null===r?t.toString():(e=m(t.c),e=r<=R||r>=P?b(e,r):v(e,r,"0"),t.s<0?"-"+e:e)}return N.clone=t,N.ROUND_UP=0,N.ROUND_DOWN=1,N.ROUND_CEIL=2,N.ROUND_FLOOR=3,N.ROUND_HALF_UP=4,N.ROUND_HALF_DOWN=5,N.ROUND_HALF_EVEN=6,N.ROUND_HALF_CEIL=7,N.ROUND_HALF_FLOOR=8,N.EUCLID=9,N.config=N.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(f+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(_(r=t[e],0,p,e),B=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(_(r=t[e],0,8,e),D=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(_(r[0],-p,0,e),_(r[1],0,p,e),R=r[0],P=r[1]):(_(r,-p,p,e),R=-(P=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)_(r[0],-p,-1,e),_(r[1],1,p,e),I=r[0],T=r[1];else{if(_(r,-p,p,e),!r)throw Error(f+e+" cannot be zero: "+r);I=-(T=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(f+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!r,Error(f+"crypto unavailable");U=r}else U=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(_(r=t[e],0,9,e),F=r),t.hasOwnProperty(e="POW_PRECISION")&&(_(r=t[e],0,p,e),O=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(f+e+" not an object: "+r);C=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(f+e+" invalid: "+r);L=r}}return{DECIMAL_PLACES:B,ROUNDING_MODE:D,EXPONENTIAL_AT:[R,P],RANGE:[I,T],CRYPTO:U,MODULO_MODE:F,POW_PRECISION:O,FORMAT:C,ALPHABET:L}},N.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!N.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-p&&i<=p&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=c||r!==u(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(f+"Invalid BigNumber: "+t)},N.maximum=N.max=function(){return j(arguments,E.lt)},N.minimum=N.min=function(){return j(arguments,E.gt)},N.random=(o=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,s,h=0,c=[],d=new N(A);if(null==t?t=B:_(t,0,p),i=a(t/14),U)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));h<i;)(s=131072*e[h]+(e[h+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[h]=r[0],e[h+1]=r[1]):(c.push(s%1e14),h+=2);h=i/2}else{if(!crypto.randomBytes)throw U=!1,Error(f+"crypto unavailable");for(e=crypto.randomBytes(i*=7);h<i;)(s=281474976710656*(31&e[h])+1099511627776*e[h+1]+4294967296*e[h+2]+16777216*e[h+3]+(e[h+4]<<16)+(e[h+5]<<8)+e[h+6])>=9e15?crypto.randomBytes(7).copy(e,h):(c.push(s%1e14),h+=7);h=i/7}if(!U)for(;h<i;)(s=o())<9e15&&(c[h++]=s%1e14);for(t%=14,(i=c[--h])&&t&&(s=l[14-t],c[h]=u(i/s)*s);0===c[h];c.pop(),h--);if(h<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=14);for(h=1,s=c[0];s>=10;s/=10,h++);h<14&&(n-=14-h)}return d.e=n,d.c=c,d}),N.sum=function(){for(var t=1,e=arguments,r=new N(e[0]);t<e.length;)r=r.plus(e[t++]);return r},n=function(){function t(t,e,r,n){for(var i,o,s=[0],a=0,u=t.length;a<u;){for(o=s.length;o--;s[o]*=e);for(s[0]+=n.indexOf(t.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(e,n,i,o,s){var a,u,f,h,c,l,p,d,y=e.indexOf("."),_=B,g=D;for(y>=0&&(h=O,O=0,e=e.replace(".",""),l=(d=new N(n)).pow(e.length-y),O=h,d.c=t(v(m(l.c),l.e,"0"),10,i,"0123456789"),d.e=d.c.length),f=h=(p=t(e,n,i,s?(a=L,"0123456789"):(a="0123456789",L))).length;0==p[--h];p.pop());if(!p[0])return a.charAt(0);if(y<0?--f:(l.c=p,l.e=f,l.s=o,p=(l=r(l,d,_,g,i)).c,c=l.r,f=l.e),y=p[u=f+_+1],h=i/2,c=c||u<0||null!=p[u+1],c=g<4?(null!=y||c)&&(0==g||g==(l.s<0?3:2)):y>h||y==h&&(4==g||c||6==g&&1&p[u-1]||g==(l.s<0?8:7)),u<1||!p[0])e=c?v(a.charAt(1),-_,a.charAt(0)):a.charAt(0);else{if(p.length=u,c)for(--i;++p[--u]>i;)p[u]=0,u||(++f,p=[1].concat(p));for(h=p.length;!p[--h];);for(y=0,e="";y<=h;e+=a.charAt(p[y++]));e=v(e,f,a.charAt(0))}return e}}(),r=function(){function t(t,e,r){var n,i,o,s,a=0,u=t.length,f=e%1e7,h=e/1e7|0;for(t=t.slice();u--;)a=((i=f*(o=t[u]%1e7)+(n=h*o+(s=t[u]/1e7|0)*f)%1e7*1e7+a)/r|0)+(n/1e7|0)+h*s,t[u]=i%r;return a&&(t=[a].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]<e[r]?1:0,t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,i,o,s,a){var f,h,l,p,m,y,_,g,b,v,w,k,M,x,S,E,A,B=n.s==i.s?1:-1,D=n.c,R=i.c;if(!(D&&D[0]&&R&&R[0]))return new N(n.s&&i.s&&(D?!R||D[0]!=R[0]:R)?D&&0==D[0]||!R?0*B:B/0:NaN);for(b=(g=new N(B)).c=[],B=o+(h=n.e-i.e)+1,a||(a=c,h=d(n.e/14)-d(i.e/14),B=B/14|0),l=0;R[l]==(D[l]||0);l++);if(R[l]>(D[l]||0)&&h--,B<0)b.push(1),p=!0;else{for(x=D.length,E=R.length,l=0,B+=2,(m=u(a/(R[0]+1)))>1&&(R=t(R,m,a),D=t(D,m,a),E=R.length,x=D.length),M=E,w=(v=D.slice(0,E)).length;w<E;v[w++]=0);A=R.slice(),A=[0].concat(A),S=R[0],R[1]>=a/2&&S++;do{if(m=0,(f=e(R,v,E,w))<0){if(k=v[0],E!=w&&(k=k*a+(v[1]||0)),(m=u(k/S))>1)for(m>=a&&(m=a-1),_=(y=t(R,m,a)).length,w=v.length;1==e(y,v,_,w);)m--,r(y,E<_?A:R,_,a),_=y.length,f=1;else 0==m&&(f=m=1),_=(y=R.slice()).length;if(_<w&&(y=[0].concat(y)),r(v,y,w,a),w=v.length,-1==f)for(;e(R,v,E,w)<1;)m++,r(v,E<w?A:R,w,a),w=v.length}else 0===f&&(m++,v=[0]);b[l++]=m,v[0]?v[w++]=D[M]||0:(v=[D[M]],w=1)}while((M++<x||null!=v[0])&&B--);p=null!=v[0],b[0]||b.splice(0,1)}if(a==c){for(l=1,B=b[0];B>=10;B/=10,l++);K(g,o+(g.e=l+14*h-1)+1,s,p)}else g.e=h,g.r=+p;return g}}(),w=/^(-?)0([xbo])(?=\w[\w.]*$)/i,k=/^([^.]+)\.$/,M=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,S=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var i,o=r?e:e.replace(S,"");if(x.test(o))t.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(w,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,o=o.replace(k,"$1").replace(M,"0.$1")),e!=o))return new N(o,i);if(N.DEBUG)throw Error(f+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},E.absoluteValue=E.abs=function(){var t=new N(this);return t.s<0&&(t.s=1),t},E.comparedTo=function(t,e){return y(this,new N(t,e))},E.decimalPlaces=E.dp=function(t,e){var r,n,i,o=this;if(null!=t)return _(t,0,p),null==e?e=D:_(e,0,8),K(new N(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=14*((i=r.length-1)-d(this.e/14)),i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},E.dividedBy=E.div=function(t,e){return r(this,new N(t,e),B,D)},E.dividedToIntegerBy=E.idiv=function(t,e){return r(this,new N(t,e),0,1)},E.exponentiatedBy=E.pow=function(t,e){var r,n,i,o,s,h,c,l,p=this;if((t=new N(t)).c&&!t.isInteger())throw Error(f+"Exponent not an integer: "+H(t));if(null!=e&&(e=new N(e)),s=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return l=new N(Math.pow(+H(p),s?2-g(t):+H(t))),e?l.mod(e):l;if(h=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new N(NaN);(n=!h&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return o=p.s<0&&g(t)?-0:0,p.e>-1&&(o=1/o),new N(h?1/o:o);O&&(o=a(O/14+2))}for(s?(r=new N(.5),h&&(t.s=1),c=g(t)):c=(i=Math.abs(+H(t)))%2,l=new N(A);;){if(c){if(!(l=l.times(p)).c)break;o?l.c.length>o&&(l.c.length=o):n&&(l=l.mod(e))}if(i){if(0===(i=u(i/2)))break;c=i%2}else if(K(t=t.times(r),t.e+1,1),t.e>14)c=g(t);else{if(0===(i=+H(t)))break;c=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?l:(h&&(l=A.div(l)),e?l.mod(e):o?K(l,O,D,void 0):l)},E.integerValue=function(t){var e=new N(this);return null==t?t=D:_(t,0,8),K(e,e.e+1,t)},E.isEqualTo=E.eq=function(t,e){return 0===y(this,new N(t,e))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(t,e){return y(this,new N(t,e))>0},E.isGreaterThanOrEqualTo=E.gte=function(t,e){return 1===(e=y(this,new N(t,e)))||0===e},E.isInteger=function(){return!!this.c&&d(this.e/14)>this.c.length-2},E.isLessThan=E.lt=function(t,e){return y(this,new N(t,e))<0},E.isLessThanOrEqualTo=E.lte=function(t,e){return-1===(e=y(this,new N(t,e)))||0===e},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return this.s>0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(t,e){var r,n,i,o,s=this,a=s.s;if(e=(t=new N(t,e)).s,!a||!e)return new N(NaN);if(a!=e)return t.s=-e,s.plus(t);var u=s.e/14,f=t.e/14,h=s.c,l=t.c;if(!u||!f){if(!h||!l)return h?(t.s=-e,t):new N(l?s:NaN);if(!h[0]||!l[0])return l[0]?(t.s=-e,t):new N(h[0]?s:3==D?-0:0)}if(u=d(u),f=d(f),h=h.slice(),a=u-f){for((o=a<0)?(a=-a,i=h):(f=u,i=l),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(n=(o=(a=h.length)<(e=l.length))?a:e,a=e=0;e<n;e++)if(h[e]!=l[e]){o=h[e]<l[e];break}if(o&&(i=h,h=l,l=i,t.s=-t.s),(e=(n=l.length)-(r=h.length))>0)for(;e--;h[r++]=0);for(e=c-1;n>a;){if(h[--n]<l[n]){for(r=n;r&&!h[--r];h[r]=e);--h[r],h[n]+=c}h[n]-=l[n]}for(;0==h[0];h.splice(0,1),--f);return h[0]?q(t,h,f):(t.s=3==D?-1:1,t.c=[t.e=0],t)},E.modulo=E.mod=function(t,e){var n,i,o=this;return t=new N(t,e),!o.c||!t.s||t.c&&!t.c[0]?new N(NaN):!t.c||o.c&&!o.c[0]?new N(o):(9==F?(i=t.s,t.s=1,n=r(o,t,0,3),t.s=i,n.s*=i):n=r(o,t,0,F),(t=o.minus(n.times(t))).c[0]||1!=F||(t.s=o.s),t)},E.multipliedBy=E.times=function(t,e){var r,n,i,o,s,a,u,f,h,l,p,m,y,_,g=this,b=g.c,v=(t=new N(t,e)).c;if(!(b&&v&&b[0]&&v[0]))return!g.s||!t.s||b&&!b[0]&&!v||v&&!v[0]&&!b?t.c=t.e=t.s=null:(t.s*=g.s,b&&v?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=d(g.e/14)+d(t.e/14),t.s*=g.s,(u=b.length)<(l=v.length)&&(y=b,b=v,v=y,i=u,u=l,l=i),i=u+l,y=[];i--;y.push(0));for(_=c,1e7,i=l;--i>=0;){for(r=0,p=v[i]%1e7,m=v[i]/1e7|0,o=i+(s=u);o>i;)r=((f=p*(f=b[--s]%1e7)+(a=m*f+(h=b[s]/1e7|0)*p)%1e7*1e7+y[o]+r)/_|0)+(a/1e7|0)+m*h,y[o--]=f%_;y[o]=r}return r?++n:y.splice(0,1),q(t,y,n)},E.negated=function(){var t=new N(this);return t.s=-t.s||null,t},E.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new N(t,e)).s,!i||!e)return new N(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/14,s=t.e/14,a=n.c,u=t.c;if(!o||!s){if(!a||!u)return new N(i/0);if(!a[0]||!u[0])return u[0]?t:new N(a[0]?n:0*i)}if(o=d(o),s=d(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(e=u.length)<0&&(r=u,u=a,a=r,e=i),i=0;e;)i=(a[--e]=a[e]+u[e]+i)/c|0,a[e]=c===a[e]?0:a[e]%c;return i&&(a=[i].concat(a),++s),q(t,a,s)},E.precision=E.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return _(t,1,p),null==e?e=D:_(e,0,8),K(new N(o),t,e);if(!(r=o.c))return null;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},E.shiftedBy=function(t){return _(t,-9007199254740991,9007199254740991),this.times("1e"+t)},E.squareRoot=E.sqrt=function(){var t,e,n,i,o,s=this,a=s.c,u=s.s,f=s.e,h=B+4,c=new N("0.5");if(1!==u||!a||!a[0])return new N(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+H(s)))||u==1/0?(((e=m(a)).length+f)%2==0&&(e+="0"),u=Math.sqrt(+e),f=d((f+1)/2)-(f<0||f%2),n=new N(e=u==1/0?"1e"+f:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+f)):n=new N(u+""),n.c[0])for((u=(f=n.e)+h)<3&&(u=0);;)if(o=n,n=c.times(o.plus(r(s,o,h,1))),m(o.c).slice(0,u)===(e=m(n.c)).slice(0,u)){if(n.e<f&&--u,"9999"!=(e=e.slice(u-3,u+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(K(n,n.e+B+2,1),t=!n.times(n).eq(s));break}if(!i&&(K(o,o.e+B+2,0),o.times(o).eq(s))){n=o;break}h+=4,u+=4,i=1}return K(n,n.e+B+1,D,t)},E.toExponential=function(t,e){return null!=t&&(_(t,0,p),t++),z(this,t,e,1)},E.toFixed=function(t,e){return null!=t&&(_(t,0,p),t=t+this.e+1),z(this,t,e)},E.toFormat=function(t,e,r){var n,i=this;if(null==r)null!=t&&e&&"object"==typeof e?(r=e,e=null):t&&"object"==typeof t?(r=t,t=e=null):r=C;else if("object"!=typeof r)throw Error(f+"Argument not an object: "+r);if(n=i.toFixed(t,e),i.c){var o,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,h=r.groupSeparator||"",c=s[0],l=s[1],p=i.s<0,d=p?c.slice(1):c,m=d.length;if(u&&(o=a,a=u,u=o,m-=o),a>0&&m>0){for(o=m%a||a,c=d.substr(0,o);o<m;o+=a)c+=h+d.substr(o,a);u>0&&(c+=h+d.slice(o)),p&&(c="-"+c)}n=l?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):c}return(r.prefix||"")+n+(r.suffix||"")},E.toFraction=function(t){var e,n,i,o,s,a,u,h,c,p,d,y,_=this,g=_.c;if(null!=t&&(!(u=new N(t)).isInteger()&&(u.c||1!==u.s)||u.lt(A)))throw Error(f+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+H(u));if(!g)return new N(_);for(e=new N(A),c=n=new N(A),i=h=new N(A),y=m(g),s=e.e=y.length-_.e-1,e.c[0]=l[(a=s%14)<0?14+a:a],t=!t||u.comparedTo(e)>0?s>0?e:c:u,a=T,T=1/0,u=new N(y),h.c[0]=0;p=r(u,e,0,1),1!=(o=n.plus(p.times(i))).comparedTo(t);)n=i,i=o,c=h.plus(p.times(o=c)),h=o,e=u.minus(p.times(o=e)),u=o;return o=r(t.minus(n),i,0,1),h=h.plus(o.times(c)),n=n.plus(o.times(i)),h.s=c.s=_.s,d=r(c,i,s*=2,D).minus(_).abs().comparedTo(r(h,n,s,D).minus(_).abs())<1?[c,i]:[h,n],T=a,d},E.toNumber=function(){return+H(this)},E.toPrecision=function(t,e){return null!=t&&_(t,1,p),z(this,t,e,2)},E.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=R||o>=P?b(m(r.c),o):v(m(r.c),o,"0"):10===t?e=v(m((r=K(new N(r),B+o+1,D)).c),r.e,"0"):(_(t,2,L.length,"Base"),e=n(v(m(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},E.valueOf=E.toJSON=function(){return H(this)},E._isBigNumber=!0,null!=e&&N.set(e),N}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(e,r,e,t))||(t.exports=n)}()},function(t,e,r){
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var n=r(12),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,f=[],h=!1,c=-1;function l(){h&&u&&(h=!1,u.length?f=u.concat(f):c=-1,f.length&&p())}function p(){if(!h){var t=a(l);h=!0;for(var e=f.length;e;){for(u=f,f=[];++c<e;)u&&u[c].run();c=-1,e=f.length}u=null,h=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];f.push(new d(t,e)),1!==f.length||h||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";r.d(e,"a",(function(){return x})),r.d(e,"b",(function(){return S}));var n=r(14),i=r.n(n),o=r(6);function s(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}
/**
 * File signatures and extractor functions
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2018
 * @license Apache-2.0
 *
 */var u={Images:[{name:"Joint Photographic Experts Group image",extension:"jpg,jpeg,jpe,thm,mpo",mime:"image/jpeg",description:"",signature:{0:255,1:216,2:255,3:[192,196,219,221,224,225,226,227,228,229,231,232,234,235,236,237,238,254]},extractor:function(t,e){var r=new o.a(t.slice(e));for(;r.hasMore();){var n=r.getBytes(2);if(255!==n[0])throw new Error(`Invalid marker while parsing JPEG at pos ${r.position}: ${n}`);var i=0;switch(n[1]){case 216:case 1:break;case 217:return r.carve();case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:case 219:case 222:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:i=r.readInt(2,"be"),r.position+=i-2;break;case 223:r.position++;break;case 220:case 221:r.position+=2;break;case 218:i=r.readInt(2,"be"),r.position+=i-2,r.continueUntil(255);break;case 0:case 208:case 209:case 210:case 211:case 212:case 213:case 214:case 215:default:r.continueUntil(255)}}throw new Error("Unable to parse JPEG successfully")}},{name:"Graphics Interchange Format image",extension:"gif",mime:"image/gif",description:"",signature:{0:71,1:73,2:70,3:56,4:[55,57],5:97},extractor:function(t,e){var r=new o.a(t.slice(e));r.continueUntil([33,255]),r.continueUntil([33,249]),r.moveForwardsBy(2);for(;r.hasMore();){for(r.moveForwardsBy(r.readInt(1)+1),r.moveForwardsBy(11);r.getBytes(2)!==[33,249]&&(r.moveBackwardsBy(2),r.moveForwardsBy(r.readInt(1)),r.readInt(1));)r.moveBackwardsBy(1);if(59===r.readInt(1))break;r.moveForwardsBy(1)}return r.carve()}},{name:"Portable Network Graphics image",extension:"png",mime:"image/png",description:"",signature:{0:137,1:80,2:78,3:71,4:13,5:10,6:26,7:10},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveForwardsBy(8);var n=0,i="";for(;"IEND"!==i;)n=r.readInt(4,"be"),i=r.readString(4),r.moveForwardsBy(n+4);return r.carve()}},{name:"WEBP Image",extension:"webp",mime:"image/webp",description:"",signature:{8:87,9:69,10:66,11:80},extractor:null},{name:"Camera Image File Format",extension:"crw",mime:"image/x-canon-crw",description:"",signature:{6:72,7:69,8:65,9:80,10:67,11:67,12:68,13:82},extractor:null},{name:"Canon CR2 raw image",extension:"cr2",mime:"image/x-canon-cr2",description:"",signature:[{0:73,1:73,2:42,3:0,8:67,9:82},{0:77,1:77,2:0,3:42,8:67,9:82}],extractor:null},{name:"Tagged Image File Format image",extension:"tif",mime:"image/tiff",description:"",signature:[{0:73,1:73,2:42,3:0},{0:77,1:77,2:0,3:42}],extractor:null},{name:"Bitmap image",extension:"bmp",mime:"image/bmp",description:"",signature:{0:66,1:77,7:0,9:0,14:[12,40,56,64,108,124],15:0,16:0,17:0},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveForwardsBy(2);var n=r.readInt(4,"le");return r.moveForwardsBy(n-6),r.carve()}},{name:"JPEG Extended Range image",extension:"jxr",mime:"image/vnd.ms-photo",description:"",signature:{0:73,1:73,2:188},extractor:null},{name:"Photoshop image",extension:"psd",mime:"image/vnd.adobe.photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:1,6:0,7:0,8:0,9:0,10:0,11:0},extractor:null},{name:"Photoshop Large Document",extension:"psb",mime:"application/x-photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:2,6:0,7:0,8:0,9:0,10:0,11:0,12:0},extractor:null},{name:"Paint Shop Pro image",extension:"psp",mime:"image/psp",description:"",signature:[{0:80,1:97,2:105,3:110,4:116,5:32,6:83,7:104,8:111,9:112,10:32,11:80,12:114,13:111,14:32,15:73,16:109},{0:126,1:66,2:75,3:0}],extractor:null},{name:"The GIMP image",extension:"xcf",mime:"image/x-xcf",description:"",signature:{0:103,1:105,2:109,3:112,4:32,5:120,6:99,7:102,8:32,9:[102,118],10:[105,48],11:[108,48],12:[101,49,50,51]},extractor:null},{name:"Icon image",extension:"ico",mime:"image/x-icon",description:"",signature:{0:0,1:0,2:1,3:0,4:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],5:0,6:[16,32,48,64,128],7:[16,32,48,64,128],9:0,10:[0,1]},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveTo(4);var n=r.readInt(2,"le");r.moveForwardsBy(8+16*(n-1));var i=r.readInt(4,"le"),s=r.readInt(4,"le");return r.moveTo(s+i),r.carve()}},{name:"Radiance High Dynamic Range image",extension:"hdr",mime:"image/vnd.radiance",description:"",signature:{0:35,1:63,2:82,3:65,4:68,5:73,6:65,7:78,8:67,9:69,10:10},extractor:null},{name:"Sony ARW image",extension:"arw",mime:"image/x-raw",description:"",signature:{0:5,1:0,2:0,3:0,4:65,5:87,6:49,7:46},extractor:null},{name:"Fujifilm Raw Image",extension:"raf",mime:"image/x-raw",description:"",signature:{0:70,1:85,2:74,3:73,4:70,5:73,6:76,7:77,8:67,9:67,10:68,11:45,12:82,13:65,14:87},extractor:null},{name:"Minolta RAW image",extension:"mrw",mime:"image/x-raw",description:"",signature:{0:0,1:77,2:82,3:77},extractor:null},{name:"Adobe Bridge Thumbnail Cache",extension:"bct",mime:"application/octet-stream",description:"",signature:{0:108,1:110,2:98,3:116,4:2,5:0,6:0,7:0},extractor:null},{name:"Microsoft Document Imaging",extension:"mdi",mime:"image/vnd.ms-modi",description:"",signature:{0:69,1:80,2:42,3:0},extractor:null},{name:"Joint Photographic Experts Group image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:47,1:57,2:106,3:47,4:52},extractor:null},{name:"Portable Network Graphics image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:105,1:86,2:66,3:79,4:82,5:119,6:48},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,123d",mime:"application/acad",description:"",signature:{0:65,1:67,2:49,3:48,4:[48,49],5:[48,49,50,51,52,53],6:0},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,dwt",mime:"application/acad",description:"",signature:[{0:65,1:67,2:49,3:48,4:49,5:56,6:0},{0:65,1:67,2:49,3:48,4:50,5:52,6:0},{0:65,1:67,2:49,3:48,4:50,5:55,6:0}],extractor:null},{name:"Targa Image",extension:"tga",mime:"image/x-targa",description:"",signature:[{0:84,1:82,2:85,3:69,4:86,5:73,6:83,7:73,8:79,9:78,10:45,11:88,12:70,13:73,14:76,15:69,16:46}],extractor:function(t,e){var r=new o.a(t);r.moveTo(e-8);var n=r.readInt(4,"le"),i=r.readInt(4,"le");function s(t,e){for(var n=0;n<t;n++){r.moveBackwardsBy(1);var i=r.readInt(e,"le")-1;if(r.moveBackwardsBy(e),i===n)break}}r.moveBackwardsBy(8),n||i?n?(s(65535,2),r.moveBackwardsBy(n)):i&&(s(4294967295,4),r.moveBackwardsBy(6),r.moveBackwardsBy(i)):(!function(){r.moveBackwardsBy(5);for(var t=0;t<1048576;t++){if(r.readInt(2,"le")*r.readInt(2,"le")*r.readInt(1)/8===t-1)break;r.moveBackwardsBy(6)}}(),r.moveBackwardsBy(17));return r.carve(r.position,e+18)}}],Video:[{name:"Matroska Multimedia Container",extension:"mkv",mime:"video/x-matroska",description:"",signature:{31:109,32:97,33:116,34:114,35:111,36:115,37:107,38:97},extractor:null},{name:"WEBM video",extension:"webm",mime:"video/webm",description:"",signature:{0:26,1:69,2:223,3:163},extractor:null},{name:"Flash MP4 video",extension:"f4v",mime:"video/mp4",description:"",signature:{4:102,5:116,6:121,7:112,8:[102,70],9:52,10:[118,86],11:32},extractor:null},{name:"MPEG-4 video",extension:"mp4",mime:"video/mp4",description:"",signature:[{0:0,1:0,2:0,3:[24,32],4:102,5:116,6:121,7:112},{0:51,1:103,2:112,3:53},{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:109,9:112,10:52,11:50,16:109,17:112,18:52,19:49,20:109,21:112,22:52,23:50,24:105,25:115,26:111,27:109}],extractor:null},{name:"M4V video",extension:"m4v",mime:"video/x-m4v",description:"",signature:{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:77,9:52,10:86},extractor:null},{name:"Quicktime video",extension:"mov",mime:"video/quicktime",description:"",signature:{0:0,1:0,2:0,3:20,4:102,5:116,6:121,7:112},extractor:null},{name:"Audio Video Interleave",extension:"avi",mime:"video/x-msvideo",description:"",signature:{0:82,1:73,2:70,3:70,8:65,9:86,10:73},extractor:null},{name:"Windows Media Video",extension:"wmv",mime:"video/x-ms-wmv",description:"",signature:{0:48,1:38,2:178,3:117,4:142,5:102,6:207,7:17,8:166,9:217},extractor:null},{name:"MPEG video",extension:"mpg",mime:"video/mpeg",description:"",signature:{0:0,1:0,2:1,3:186},extractor:null},{name:"Flash Video",extension:"flv",mime:"video/x-flv",description:"",signature:{0:70,1:76,2:86,3:1},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveForwardsBy(5);var n=r.readInt(4,"be");r.moveForwardsBy(n-9);var i=-11;for(;r.hasMore();){var s=r.readInt(4,"be"),a=r.readInt(1);if([8,9,18].indexOf(a)<0){r.moveBackwardsBy(1);break}if(s!==i+11){r.moveBackwardsBy(i+11+5);break}i=r.readInt(3,"be"),r.moveForwardsBy(7+i)}return r.carve()}},{name:"OGG Video",extension:"ogv,ogm,opus,ogx",mime:"video/ogg",description:"",signature:[{0:79,1:103,2:103,3:83,4:0,5:2,28:1,29:118,30:105,31:100,32:101,33:111},{0:79,1:103,2:103,3:83,4:0,5:2,28:128,29:116,30:104,31:101,32:111,33:114,34:97},{0:79,1:103,2:103,3:83,4:0,5:2,28:102,29:105,30:115,31:104,32:101,33:97,34:100}],extractor:null}],Audio:[{name:"Waveform Audio",extension:"wav",mime:"audio/x-wav",description:"",signature:{0:82,1:73,2:70,3:70,8:87,9:65,10:86,11:69},extractor:function(t,e){var r=new o.a(t.slice(e));return r.moveTo(4),r.moveTo(r.readInt(4,"le")+8),r.carve()}},{name:"OGG audio",extension:"ogg",mime:"audio/ogg",description:"",signature:{0:79,1:103,2:103,3:83},extractor:null},{name:"Musical Instrument Digital Interface audio",extension:"midi",mime:"audio/midi",description:"",signature:{0:77,1:84,2:104,3:100},extractor:null},{name:"MPEG-3 audio",extension:"mp3",mime:"audio/mpeg",description:"",signature:[{0:73,1:68,2:51},{0:255,1:251}],extractor:function(t,e){var r=new o.a(t.slice(e)),n=["free",32e3,4e4,48e3,56e3,64e3,8e4,96e3,112e3,128e3,16e4,192e3,224e3,256e3,32e4,"bad"],i=[44100,48e3,32e3,"reserved"];if(r.getBytes(3).toString()===[73,68,51].toString()){r.moveTo(6);var s=r.readInt(1)<<21|r.readInt(1)<<14|r.readInt(1)<<7|r.readInt(1);r.moveForwardsBy(s)}else r.moveTo(0);for(;r.hasMore();){if(r.getBytes(3)===[84,65,71].toString()){r.moveForwardsBy(125);break}if(r.getBytes(2).toString()!==[255,251].toString()){r.moveBackwardsBy(2);break}var a=r.readInt(1),u=n[a>>4],f=i[(15&a)>>2],h=(2&a)>>1;if("free"===u||"bad"===u||"reserved"===f){r.moveBackwardsBy(1);break}var c=Math.floor(144*u/f+h);if(r.position+c>r.length){r.moveTo(r.length);break}r.moveForwardsBy(c-3)}return r.carve()}},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(t,e){var r=new o.a(t.slice(e));return r.continueUntil([37,37,69,79,70]),r.moveForwardsBy(5),r.consumeIf(13),r.consumeIf(10),r.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(t,e){var r=new o.a(t.slice(e)),n=0;if(123!==r.readInt(1))throw new Error("Not a valid RTF file");n++;for(;n>0&&r.hasMore();)switch(r.readInt(1)){case 123:n++;break;case 125:n--;break;case 92:r.consumeIf(92),r.position++}return r.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:f},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:f}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveTo(60);var n=r.readInt(4,"le");r.moveTo(n),r.moveForwardsBy(6);var i=r.readInt(2,"le");r.moveForwardsBy(16);var s=523===r.readInt(2,"le")?112:96;r.moveForwardsBy(s-2),r.moveForwardsBy(32);var a=r.readInt(4,"le"),u=r.readInt(4,"le");if(a>0)return r.moveTo(a+u),r.carve();r.moveForwardsBy(88),r.moveForwardsBy(40*(i-1)),r.moveForwardsBy(16);var f=r.readInt(4,"le"),h=r.readInt(4,"le");return r.moveTo(h+f),r.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveForwardsBy(4);var n=1===r.readInt(1),i=1===r.readInt(1)?"le":"be";r.moveForwardsBy(n?26:34);var s=n?r.readInt(4,i):r.readInt(8,i);r.moveForwardsBy(10);var a=r.readInt(2,i),u=r.readInt(2,i);return r.moveTo(s),r.moveForwardsBy(a*u),r.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:h},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:h},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:f},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(t,e){var r=new o.a(t.slice(e));for(;r.hasMore();){if(r.moveForwardsBy(257),r.getBytes(5).join("")!==[117,115,116,97,114].join("")){r.moveBackwardsBy(262);break}r.moveBackwardsBy(138);var n=0;r.getBytes(11).forEach((function(t,e){n+=(t-48).toString()})),n=512*Math.ceil(parseInt(n,8)/512),r.moveForwardsBy(n+377)}return r.consumeWhile(0),r.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveForwardsBy(3);var n=r.readInt(1);if(r.moveForwardsBy(4),r.readInt(1),r.moveForwardsBy(1),4&n){var i=r.readInt(2,"le");r.moveForwardsby(i)}8&n&&(r.continueUntil(0),r.moveForwardsBy(1));16&n&&(r.continueUntil(0),r.moveForwardsBy(1));2&n&&r.moveForwardsBy(2);return y(r),r.moveForwardsBy(8),r.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(t,e){for(var r=new o.a(t.slice(e)),n=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i<n.length&&(r.continueUntil(n[i]),r.getBytes(5).join("")!==n[i].join(""));i++)r.moveTo(0);return r.moveForwardsBy(4),r.carve()}},{name:"7zip",extension:"7z",mime:"application/x-7z-compressed",description:"",signature:{0:55,1:122,2:188,3:175,4:39,5:28},extractor:null},{name:"Zlib Deflate",extension:"zlib",mime:"application/x-deflate",description:"",signature:{0:120,1:[1,156,218,94]},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveForwardsBy(1),32&r.readInt(1)&&r.moveForwardsBy(4);return y(r),r.moveForwardsBy(4),r.carve()}},{name:"xz compression",extension:"xz",mime:"application/x-xz",description:"",signature:{0:253,1:55,2:122,3:88,4:90,5:0},extractor:function(t,e){var r=new o.a(t.slice(e));return r.continueUntil([0,0,0,0,4,89,90]),r.moveForwardsBy(7),r.carve()}},{name:"Tarball",extension:"tar.z",mime:"application/x-gtar",description:"",signature:{0:31,1:[157,160]},extractor:null},{name:"ISO disk image",extension:"iso",mime:"application/octet-stream",description:"ISO 9660 CD/DVD image file",signature:[{32769:67,32770:68,32771:48,32772:48,32773:49},{34817:67,34818:68,34819:48,34820:48,34821:49},{36865:67,36866:68,36867:48,36868:48,36869:49}],extractor:null},{name:"Virtual Machine Disk",extension:"vmdk",mime:"application/vmdk,application/x-virtualbox-vmdk",description:"",signature:{0:75,1:68,2:77,3:86,5:0,6:0,7:0},extractor:null},{name:"Virtual Hard Drive",extension:"vhd",mime:"application/x-vhd",description:"",signature:{0:99,1:111,2:110,3:101,4:99,5:116,6:105,7:120},extractor:null},{name:"Macintosh disk image",extension:"dmf,dmg",mime:"application/octet-stream",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96,7:96},extractor:null},{name:"ARJ Archive",extension:"arj",mime:"application/x-arj-compressed",description:"",signature:{0:96,1:234,8:[0,16,20],9:0,10:2},extractor:null},{name:"WinAce Archive",extension:"ace",mime:"application/x-ace-compressed",description:"",signature:{7:42,8:42,9:65,10:67,11:69,12:42,13:42},extractor:null},{name:"Macintosh BinHex Encoded File",extension:"hqx",mime:"application/mac-binhex",description:"",signature:{11:109,12:117,13:115,14:116,15:32,16:98,17:101,18:32,19:99,20:111,21:110,22:118,23:101,24:114,25:116,26:101,27:100,28:32,29:119,30:105,31:116,32:104,33:32,34:66,35:105,36:110,37:72,38:101,39:120},extractor:null},{name:"ALZip Archive",extension:"alz",mime:"application/octet-stream",description:"",signature:{0:65,1:76,2:90,3:1,4:10,5:0,6:0,7:0},extractor:null},{name:"KGB Compressed Archive",extension:"kgb",mime:"application/x-kgb-compressed",description:"",signature:{0:75,1:71,2:66,3:95,4:97,5:114,6:99,7:104,8:32,9:45},extractor:null},{name:"Microsoft Cabinet",extension:"cab",mime:"vnd.ms-cab-compressed",description:"",signature:{0:77,1:83,2:67,3:70,4:0,5:0,6:0,7:0},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:95,1:39,2:168,3:137},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:80,1:75,2:3,3:4,4:20,5:0,6:8,7:0,8:8,9:0},extractor:f},{name:"lzop compressed",extension:"lzop,lzo",mime:"application/x-lzop",description:"",signature:{0:137,1:76,2:90,3:79,4:0,5:13,6:10,7:26},extractor:function(t,e){var r=new o.a(t.slice(e)),n=0,i=0;r.moveForwardsBy(9);var s=r.readInt(2,"be");r.moveForwardsBy(6);var a=r.readInt(4,"be");2048&s&&r.moveForwardsBy(4);2&a&&n++;512&a&&n++;1&a&&i++;256&a&&i++;r.moveForwardsBy(8),s>=2368&&r.moveForwardsBy(4);var u=r.readInt(1,"be");if(r.moveForwardsBy(u),64&a){var f=r.readInt(4,"be");r.moveForwardsBy(f)}r.moveForwardsBy(4);for(;r.hasMore();){var h=r.readInt(4,"be");if(0===h)break;var c=r.readInt(4,"be"),l=h===c?i:i+n;r.moveForwardsBy(c+4*l)}return r.carve()}},{name:"Linux deb package",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveForwardsBy(8);for(;r.hasMore();){r.moveForwardsBy(48);var n,i="",a=s(r.getBytes(10));try{for(a.s();!(n=a.n()).done;){var u=n.value;i+=String.fromCharCode(u)}}catch(t){a.e(t)}finally{a.f()}i=parseInt(i.trim(),10),r.moveForwardsBy(2),r.moveForwardsBy(i)}return r.carve()}},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveTo(16);var n=r.readInt(2);r.moveTo(28);var i=r.readInt(4);return r.moveTo(n*i),r.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveTo(20);var n=r.readInt(4,"le");r.moveTo(n);var i=r.readInt(4,"le");return r.moveForwardsBy(i-4),r.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(t,e){var r=new o.a(t.slice(e));r.moveTo(40);var n=r.readInt(4,"le")-44;r.moveForwardsBy(n);for(;r.hasMore()&&r.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)r.moveForwardsBy(65529);return r.consumeWhile(0),r.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:function(t,e){var r=new o.a(t.slice(e));return r.moveTo(112),r.moveTo(4096*(r.readInt(4,"le")+1)),r.carve()}},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:function(t,e){var r=new o.a(t.slice(e));return r.moveTo(12),r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:function(t,e){var r=new o.a(t.slice(e));return r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(t,e){var r=new o.a(t.slice(e)),n=0;r.continueUntil([60,112,108,105,115,116]),r.moveForwardsBy(6),n++;for(;n>0&&r.hasMore();)60===r.readInt(1)&&(r.getBytes(5).join("")===[112,108,105,115,116].join("")?n++:r.moveBackwardsBy(5),r.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?n--:r.moveBackwardsBy(7));return r.consumeIf(10),r.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:null},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(t){return t>=1&&t<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(t){return t>=1&&t<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(t){return 0!==t},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:function(t,e){var r=new o.a(t.slice(e));return r.moveTo(52),r.moveTo(r.readInt(4,"le")),r.carve()}},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function f(t,e){var r=new o.a(t.slice(e));r.continueUntil([80,75,5,6]),r.moveForwardsBy(20);var n=r.readInt(2,"le");return r.moveForwardsBy(n),r.carve()}function h(t,e){var r=new o.a(t.slice(e)),n=r.getBytes(4).join("");return r.moveTo(function(t,e,r){var n=28;e&&(n+=4),t.moveTo(16);var i=t.readInt(4,r);return function(t,e,r,n){for(var i=0,o=0;o<n;o++){t.moveTo(e);var s=t.readInt(4,r);25===s?(t.moveTo(e+48),i+=t.readInt(8,r),t.moveTo(e+4),e+=t.readInt(4,r)):1===s&&(t.moveTo(e+36),i+=t.readInt(4,r),t.moveTo(e+4),e+=t.readInt(4,r))}return i}(t,n,r,i)}(r,function(t){return"207250237254"===t||"254237250207"===t}(n),function(t){return"206250237254"===t||"207250237254"===t}(n)?"le":"be")),r.carve()}for(var c=new Array(288),l=0;l<c.length;l++)c[l]=l<=143?8:l<=255?9:l<=279?7:8;var p=v(c),d=v(new Array(30).fill(5)),m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function y(t){for(var e=0;!e;){e=t.readBits(1);var r=t.readBits(2);if(0===r){t.moveForwardsBy(1);var n=t.readInt(2,"le");t.moveForwardsBy(2+n)}else if(1===r)b(t,p,d);else{if(2!==r)throw new Error("Invalid block type while parsing DEFLATE stream at pos "+t.position);for(var i=t.readBits(5)+257,o=t.readBits(5)+1,s=t.readBits(4)+4,a=new Uint8Array(m.length),u=0;u<s;u++)a[m[u]]=t.readBits(3);for(var f=v(a),h=new Uint8Array(i+o),c=void 0,l=void 0,y=void 0,_=0;_<i+o;)switch(c=w(t,f)){case 16:for(l=3+t.readBits(2);l--;)h[_++]=y;break;case 17:for(l=3+t.readBits(3);l--;)h[_++]=0;y=0;break;case 18:for(l=11+t.readBits(7);l--;)h[_++]=0;y=0;break;default:h[_++]=c,y=c}b(t,v(h.subarray(0,i)),v(h.subarray(i)))}}t.bitPos>0&&t.moveForwardsBy(1)}var _=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],g=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function b(t,e,r){for(var n,i=0;(n=w(t,e))&&256!==n;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");n<256||(t.readBits(_[n-257]),n=w(t,r),t.readBits(g[n]))}}function v(t){for(var e=Math.max.apply(Math,t),r=Math.min.apply(Math,t),n=1<<e,i=new Uint32Array(n),o=1,s=0,a=2;o<=e;){for(var u=0;u<t.length;u++)if(t[u]===o){var f=void 0,h=void 0,c=void 0;for(f=0,h=s,c=0;c<o;c++)f=f<<1|1&h,h>>=1;for(var l=o<<16|u,p=f;p<n;p+=a)i[p]=l;s++}o++,s<<=1,a<<=1}return[i,e,r]}function w(t,e){var r=i()(e,2),n=r[0],o=r[1],s=n[t.readBits(o)&(1<<o)-1],a=s>>>16;if(a>o)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${t.position}: ${a}`);return t.moveBackwardsByBits(o-a),65535&s}r(1);
/**
 * File type functions
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2018
 * @license Apache-2.0
 *
 */function k(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t.length){for(var n=0;n<t.length;n++)if(M(t[n],e,r))return!0;return!1}return M(t,e,r)}function M(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(var n in t){var i=parseInt(n,10)+r;switch(typeof t[n]){case"number":if(e[i]!==t[n])return!1;break;case"object":if(t[n].indexOf(e[i])<0)return!1;break;case"function":if(!t[n](e[i]))return!1;break;default:throw new Error("Unrecognised signature type at offset "+n)}}return!0}function x(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(u);if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t&&t.length>1))return[];var r=[],n={};for(var i in u)e.includes(i)&&(n[i]=u[i]);for(var o in n){var s=n[o];s.forEach((function(e){k(e.signature,t)&&r.push(e)}))}return r}function S(t){return function(t,e){var r=x(e);if(!r||!r.length)return!1;if("string"==typeof t)return r.reduce((function(e,r){var n=!!r.mime.startsWith(t)&&r.mime;return e||n}),!1);if(t instanceof RegExp)return r.reduce((function(e,r){var n=!!t.test(r.mime)&&r.mime;return e||n}),!1);throw new Error("Invalid type input.")}("image",t)}},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return s}));var n=r(1);
/**
 * Hexadecimal functions.
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2016
 * @license Apache-2.0
 */function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!t)return"";t instanceof ArrayBuffer&&(t=new Uint8Array(t));for(var o="",s="0x"===e||"\\x"===e,a=0;a<t.length;a++){var u=t[a].toString(16).padStart(r,"0");o+=s?e+u:u+e,n&&(o+=n),a!==t.length-1&&(a+1)%i==0&&(o+="\n")}var f=n.length+(s?0:e.length);return f?o.slice(0,-f):o}function o(t){if(!t)return"";t instanceof ArrayBuffer&&(t=new Uint8Array(t));for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if("None"!==e){var i="Auto"===e?/[^a-f\d]|(0x)/gi:n.b.regexRep(e);t=t.replace(i,"")}for(var o=[],s=0;s<t.length;s+=r)o.push(parseInt(t.substr(s,r),16));return o}["Auto"].concat(["Space","Percent","Comma","Semi-colon","Colon","Line feed","CRLF","0x","0x with comma","\\x","None"])},,,function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,r){!function(t){var e,r,n,i=String.fromCharCode;function o(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function s(t){if(t>=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function a(t,e){return i(t>>e&63|128)}function u(t){if(0==(4294967168&t))return i(t);var e="";return 0==(4294965248&t)?e=i(t>>6&31|192):0==(4294901760&t)?(s(t),e=i(t>>12&15|224),e+=a(t,6)):0==(4292870144&t)&&(e=i(t>>18&7|240),e+=a(t,12),e+=a(t,6)),e+=i(63&t|128)}function f(){if(n>=r)throw Error("Invalid byte index");var t=255&e[n];if(n++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function h(){var t,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(t=255&e[n],n++,0==(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|f())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|f()<<6|f())>=2048)return s(i),i;throw Error("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|f()<<12|f()<<6|f())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}t.version="3.0.0",t.encode=function(t){for(var e=o(t),r=e.length,n=-1,i="";++n<r;)i+=u(e[n]);return i},t.decode=function(t){e=o(t),r=e.length,n=0;for(var s,a=[];!1!==(s=h());)a.push(s);return function(t){for(var e,r=t.length,n=-1,o="";++n<r;)(e=t[n])>65535&&(o+=i((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=i(e);return o}(a)}}(e)},function(t,e,r){var n,i;!function(o,s){"use strict";void 0===(i="function"==typeof(n=function(){var t=function(){},e="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function n(t,e){var r=t[e];if("function"==typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(e){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function o(r){return"debug"===r&&(r="log"),"undefined"!=typeof console&&("trace"===r&&e?i:void 0!==console[r]?n(console,r):void 0!==console.log?n(console,"log"):t)}function s(e,n){for(var i=0;i<r.length;i++){var o=r[i];this[o]=i<e?t:this.methodFactory(o,e,n)}this.log=this.debug}function a(t,e,r){return function(){"undefined"!=typeof console&&(s.call(this,e,r),this[t].apply(this,arguments))}}function u(t,e,r){return o(t)||a.apply(this,arguments)}function f(t,e,n){var i,o=this,a="loglevel";function f(){var t;if("undefined"!=typeof window){try{t=window.localStorage[a]}catch(t){}if(void 0===t)try{var e=window.document.cookie,r=e.indexOf(encodeURIComponent(a)+"=");-1!==r&&(t=/^([^;]+)/.exec(e.slice(r))[1])}catch(t){}return void 0===o.levels[t]&&(t=void 0),t}}t&&(a+=":"+t),o.name=t,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=n||u,o.getLevel=function(){return i},o.setLevel=function(e,n){if("string"==typeof e&&void 0!==o.levels[e.toUpperCase()]&&(e=o.levels[e.toUpperCase()]),!("number"==typeof e&&e>=0&&e<=o.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(i=e,!1!==n&&function(t){var e=(r[t]||"silent").toUpperCase();if("undefined"!=typeof window){try{return void(window.localStorage[a]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(a)+"="+e+";"}catch(t){}}}(e),s.call(o,e,t),"undefined"==typeof console&&e<o.levels.SILENT)return"No console available for logging"},o.setDefaultLevel=function(t){f()||o.setLevel(t,!1)},o.enableAll=function(t){o.setLevel(o.levels.TRACE,t)},o.disableAll=function(t){o.setLevel(o.levels.SILENT,t)};var h=f();null==h&&(h=null==e?"WARN":e),o.setLevel(h,!1)}var h=new f,c={};h.getLogger=function(t){if("string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=c[t];return e||(e=c[t]=new f(t,h.getLevel(),h.methodFactory)),e};var l="undefined"!=typeof window?window.log:void 0;return h.noConflict=function(){return"undefined"!=typeof window&&window.log===h&&(window.log=l),h},h.getLoggers=function(){return c},h})?n.call(e,r,e,t):n)||(t.exports=i)}()},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1);
/**
 * Binary functions.
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2018
 * @license Apache-2.0
 */function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,i=n.b.regexRep(e);t=t.replace(i,"");for(var o=[],s=0;s<t.length;s+=r)o.push(parseInt(t.substr(s,r),2));return o}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(1);
/**
 * Decimal functions.
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2018
 * @license Apache-2.0
 */function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto";e=n.b.charRep(e);var r=[],i=t.split(e);""===i[i.length-1]&&(i=i.slice(0,i.length-1));for(var o=0;o<i.length;o++)r[o]=parseInt(i[o],10);return r}},,,,,function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){"use strict";var n=e,i=r(55),o=r(34),s=r(186);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),s=0;s<n.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||e.cmpn(-i)>0;){var o,s,a,u=t.andln(3)+n&3,f=e.andln(3)+i&3;if(3===u&&(u=-1),3===f&&(f=-1),0==(1&u))o=0;else o=3!==(a=t.andln(7)+n&7)&&5!==a||2!==f?u:-u;if(r[0].push(o),0==(1&f))s=0;else s=3!==(a=e.andln(7)+i&7)&&5!==a||2!==u?f:-f;r[1].push(s),2*n===o+1&&(n=1-n),2*i===s+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e,r){(function(){var t,n,i,o,s,a;for(e.const=r(523),s=0,a=(i=[r(785),r(1315)]).length;s<a;s++)for(t in n=i[s])o=n[t],e[t]=o}).call(this)},,function(t,e,r){"use strict";var n=r(63),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var o=Object.create(r(59));o.inherits=r(13);var s=r(104),a=r(83);o.inherits(c,s);for(var u=i(a.prototype),f=0;f<u.length;f++){var h=u[f];c.prototype[h]||(c.prototype[h]=a.prototype[h])}function c(t){if(!(this instanceof c))return new c(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",l)}function l(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),c.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){(function(){var t,r,n;for(r in e.openpgp={public_key_algorithms:{RSA:1,RSA_ENCRYPT_ONLY:2,RSA_SIGN_ONLY:3,ELGAMAL:16,DSA:17,ECDH:18,ECDSA:19,ELGAMAL_SIGN_AND_ENCRYPT:20,EDDSA:22},symmetric_key_algorithms:{CAST5:3,AES128:7,AES192:8,AES256:9},hash_algorithms:{MD5:1,SHA1:2,RIPEMD160:3,SHA256:8,SHA384:9,SHA512:10,SHA224:11},sig_subpacket:{creation_time:2,expiration_time:3,exportable_certificate:4,trust_signature:5,regular_expression:6,revocable:7,key_expiration_time:9,preferred_symmetric_algorithms:11,revocation_key:12,issuer:16,notation_data:20,preferred_hash_algorithms:21,preferred_compression_algorithms:22,key_server_preferences:23,preferred_key_server:24,primary_user_id:25,policy_uri:26,key_flags:27,signers_user_id:28,reason_for_revocation:29,features:30,signature_target:31,embedded_signature:32,issuer_fingerprint:33,experimental_low:101,experimental_high:110},sig_types:{binary_doc:0,canonical_text:1,issuer:16,persona:17,casual:18,positive:19,subkey_binding:24,primary_binding:25,direct:31,key_revocation:32,subkey_revocation:40,certificate_revocation:48},message_types:{generic:0,public_key:4,private_key:5,signature:8,clearsign:9},s2k:{plain:0,salt:1,salt_iter:3,gnu:101,gnu_dummy:1001},s2k_convention:{none:0,checksum:255,sha1:254},ecdh:{param_bytes:3,version:1},packet_tags:{PKESK:1,signature:2,one_pass_sig:4,secret_key:5,public_key:6,secret_subkey:7,compressed:8,literal:11,public_subkey:14,userid:13,user_attribute:17,SEIPD:18,MDC:19},literal_formats:{binary:98,text:116,utf8:117},versions:{PKESK:3,SEIPD:1,one_pass_sig:3,keymaterial:{V4:4},signature:{V2:2,V3:3,V4:4}},signatures:{key:153,userid:180,user_attribute:209},key_flags:{certify_keys:1,sign_data:2,encrypt_comm:4,encrypt_storage:8,private_split:16,auth:32,shared:128},features:{modification_detection:1},key_server_preferences:{no_modify:128},compression:{none:0,zip:1,zlib:2,bzip:3}},e.kb={key_encryption:{none:0,triplesec_v1:1,triplesec_v2:2,triplesec_v3:3},packet_tags:{p3skb:513,signature:514,encryption:515},public_key_algorithms:{NACL_EDDSA:32,NACL_DH:33},versions:{V1:1},padding:{EMSA_PCKS1_v1_5:3,RSASSA_PSS:4},key_defaults:{primary:{expire_in:0,nbits:{RSA:4096,ECDSA:384,DSA:2048}},sub:{expire_in:252288e3,nbits:{RSA:2048,ECDH:256,ECDSA:256,DSA:2048,ELGAMAL:2048}}},kid:{version:1,trailer:10,algo:8,len:32}},e.ops={encrypt:1,decrypt:2,verify:4,sign:8},e.header={version:"Keybase OpenPGP",comment:"https://keybase.io/crypto"},t={default_key_expire_in:126144e3})n=t[r],e[r]=n}).call(this)},,function(t,e,r){"use strict";var n=r(34),i=r(13);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=u(i.toString(16))}return r},e.zero2=a,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,u=e;a<s.length;a++,u+=4){var f;f="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[a]=f>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,f=e;return u+=(f=f+n>>>0)<e?1:0,u+=(f=f+o>>>0)<o?1:0,t+r+i+s+(u+=(f=f+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,f){var h=0,c=e;return h+=(c=c+n>>>0)<e?1:0,h+=(c=c+o>>>0)<o?1:0,h+=(c=c+a>>>0)<a?1:0,t+r+i+s+u+(h+=(c=c+f>>>0)<f?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,f){return e+n+o+a+f>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=r=function(t){return typeof t}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(e)}t.exports=r},function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function a(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),s=new k(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return x()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=b(s,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var h=u(t,e,r);if("normal"===h.type){if(n=r.done?"completed":"suspendedYield",h.arg===f)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(n="completed",r.method="throw",r.arg=h.arg)}}}(t,r,s),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var f={};function h(){}function c(){}function l(){}var p={};p[i]=function(){return this};var d=Object.getPrototypeOf,m=d&&d(d(M([])));m&&m!==e&&r.call(m,i)&&(p=m);var y=l.prototype=h.prototype=Object.create(p);function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var n;this._invoke=function(i,o){function s(){return new e((function(n,s){!function n(i,o,s,a){var f=u(t[i],t,o);if("throw"!==f.type){var h=f.arg,c=h.value;return c&&"object"==typeof c&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(c).then((function(t){h.value=t,s(h)}),(function(t){return n("throw",t,s,a)}))}a(f.arg)}(i,o,n,s)}))}return n=n?n.then(s,s):s()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function M(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return c.prototype=y.constructor=l,l.constructor=c,l[s]=c.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===c||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},_(g.prototype),g.prototype[o]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new g(a(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(y),y[s]="Generator",y[i]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=M,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;w(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function f(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function h(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,s,a;if(f(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=h(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):y(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return h(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var f=u.length,h=y(u,f);for(r=0;r<f;++r)o(h[r],this,e)}return!0},a.prototype.addListener=function(t,e){return c(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return c(this,t,e,!0)},a.prototype.once=function(t,e){return f(e),this.on(t,p(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return f(e),this.prependListener(t,p(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,n,i,o,s;if(f(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=f(t),s=n[0],a=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),h=0,c=a>0?s-4:s;for(r=0;r<c;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[h++]=e>>16&255,u[h++]=e>>8&255,u[h++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[h++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(h(t,s,s+16383>a?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,h=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*m}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}}},function(t,e,r){var n=r(53);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(302).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,h=r;h<a;h+=n)f=u(t,h,h+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var c=1;for(f=u(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=h[t],p=c[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[o-a-1]=s}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,l=h>>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,P=0|s[7],I=8191&P,T=P>>>13,U=0|s[8],F=8191&U,O=U>>>13,C=0|s[9],L=8191&C,N=C>>>13,z=0|a[0],j=8191&z,q=z>>>13,K=0|a[1],H=8191&K,Z=K>>>13,G=0|a[2],W=8191&G,V=G>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,j))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(l,j)|0))<<13)|0;f=((o=Math.imul(l,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,j),i=(i=Math.imul(d,q))+Math.imul(m,j)|0,o=Math.imul(m,q);var _t=(f+(n=n+Math.imul(c,H)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(l,H)|0))<<13)|0;f=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,j),i=(i=Math.imul(_,q))+Math.imul(g,j)|0,o=Math.imul(g,q),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,Z)|0;var gt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,j),i=(i=Math.imul(v,q))+Math.imul(w,j)|0,o=Math.imul(w,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var bt=(f+(n=n+Math.imul(c,X)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(l,X)|0))<<13)|0;f=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,q))+Math.imul(x,j)|0,o=Math.imul(x,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,j),i=(i=Math.imul(E,q))+Math.imul(A,j)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,q))+Math.imul(R,j)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(I,j),i=(i=Math.imul(I,q))+Math.imul(T,j)|0,o=Math.imul(T,q),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,j),i=(i=Math.imul(F,q))+Math.imul(O,j)|0,o=Math.imul(O,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,j),i=(i=Math.imul(L,q))+Math.imul(N,j)|0,o=Math.imul(N,q),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,Z))+Math.imul(N,H)|0,o=Math.imul(N,Z),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,V))+Math.imul(N,W)|0,o=Math.imul(N,V),n=n+Math.imul(F,X)|0,i=(i=i+Math.imul(F,$)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(N,X)|0,o=Math.imul(N,$),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var Pt=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,lt)|0;var It=(f+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(O,dt)|0))<<13)|0;f=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=Pt,u[16]=It,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function d(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),l=67108863&c;a=67108863&(l=l+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,l=f,p=0;p<s;p++){var d=r[h+p],m=n[h+p],y=r[h+p+s],_=n[h+p+s],g=c*y-l*_;_=c*_+l*y,y=g,r[h+p]=d+y,n[h+p]=m+_,r[h+p+s]=d-y,n[h+p+s]=m-_,p!==a&&(g=u*c-f*l,l=u*l+f*c,c=g)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var p=0;p<n;p++){var d=a[p]*h[p]-u[p]*c[p];u[p]=a[p]*c[p]+u[p]*h[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(g,_),g.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,_),i(v,_),i(w,_),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return y[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<d);var _=this.pow(c,new o(1).iushln(d-y-1));l=l.redMul(_),c=_.redSqr(),p=p.redMul(c),d=y}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,k),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(40)(t))},function(t,e,r){(function(){var t,n,i,o,s,a;for(s=0,a=(i=[r(217).util,r(417),r(1333)]).length;s<a;s++)for(t in n=i[s])o=n[t],e[t]=o}).call(this)},function(t,e,r){"use strict";var n=r(151).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.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(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=h,this.end=c,e=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function f(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function h(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){var n=r(18).Buffer,i=r(96).Transform,o=r(57).StringDecoder;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(13)(s,i),s.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,r(12).Buffer)},,,,function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,r(19))},,function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.promisify=n;function n(t){if("function"!=typeof t)throw new TypeError("Argument to promisify must be a function");var e=t["__ES6-PROMISIFY--CUSTOM-ARGUMENTS__"],r=n.Promise||Promise;if("function"!=typeof r)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var n=this,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return new r((function(r,i){o.push((function(t){if(t)return i(t);for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];if(1===o.length||!e)return r(o[0]);var a={};o.forEach((function(t,r){var n=e[r];n&&(a[n]=t)})),r(a)})),t.apply(n,o)}))}}n.argumentNames="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__",n.Promise=void 0},,function(t,e,r){"use strict";(function(e,n){var i=r(18).Buffer,o=e.crypto||e.msCrypto;o&&o.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(t);if(t>0)if(t>65536)for(var s=0;s<t;s+=65536)o.getRandomValues(r.slice(s,s+65536));else o.getRandomValues(r);if("function"==typeof e)return n.nextTick((function(){e(null,r)}));return r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(24),r(19))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" 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(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var i=r(146),o=r(150);r(13)(f,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];f.prototype[u]||(f.prototype[u]=o.prototype[u])}function f(t){if(!(this instanceof f))return new f(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||e.nextTick(c,this)}function c(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(19))},function(t,e,r){var n=r(18).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%i,f=Math.min(o-a,i-u),h=0;h<f;h++)r[u+h]=t[a+h];a+=f,(s+=f)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" 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(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var i=r(180),o=r(184);r(13)(f,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];f.prototype[u]||(f.prototype[u]=o.prototype[u])}function f(t){if(!(this instanceof f))return new f(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||e.nextTick(c,this)}function c(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(19))},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c=[].slice;h=r(76),n=r(36).const,e.BaseError=t=function(t,e){return"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=t||"Error"},h.inherits(t,Error),t.prototype.name="BaseError",f=function(t){return t[0].toUpperCase()+t.slice(1).toLowerCase()},i=function(t){var e;return function(){var r,n,i,o;for(o=[],r=0,n=(i=t.split(/_/)).length;r<n;r++)e=i[r],o.push(f(e));return o}().join("")},a=function(e,r,n){var i;return i=function(e){return t.call(this,e||n,this.constructor),this.istack=[],this.code=r,this},h.inherits(i,t),i.prototype.name=e,i.prototype.inspect=function(){return"["+e+": "+this.message+" (code "+this.code+")]"},i},o=function(t,e){return e[n.trace]=t[n.trace],e},e.make_errors=function(t){var e,r,n,o,s,u;for(n in s={msg:{},name:{},code:{}},t.OK="Success",r=100,t)o=t[n],"OK"!==n?(u=r++,s[e=i(n)+"Error"]=a(e,u,o)):u=0,s[n]=u,s.msg[n]=s.msg[u]=o,s.name[n]=s.name[u]=n,s.code[n]=u;return s},s=function(t,e){if(null!=e)return null==t.istack&&(t.istack=[]),t.istack.push(e)},e.make_esc=u=function(t,e){var r;return null==e&&(e=null!=(r=u.caller)?r.name:void 0),function(r){return o(r,(function(){var n,i;return i=arguments[0],n=2<=arguments.length?c.call(arguments,1):[],null==i?r.apply(null,n):t.__esc?void 0:(t.__esc=!0,s(i,null!=e?e:"unnamed error"),t(i))}))}},e.EscOk=function(){function t(t,e){this.gcb=t,this.where=e}return t.prototype.bailout=function(){var t;if(this.gcb)return t=this.gcb,this.gcb=null,t(!1)},t.prototype.check_ok=function(t){return o(t,(e=this,function(){var r,n;return n=arguments[0],r=2<=arguments.length?c.call(arguments,1):[],n?t.apply(null,r):e.bailout()}));var e},t.prototype.check_err=function(t){return o(t,(e=this,function(){var r,n;return n=arguments[0],r=2<=arguments.length?c.call(arguments,1):[],null!=n?(s(n,e.where),e.bailout()):t.apply(null,r)}));var e},t.prototype.check_non_null=function(t){return o(t,(e=this,function(){var r;return null==(r=1<=arguments.length?c.call(arguments,0):[])[0]?e.bailout():t.apply(null,r)}));var e},t}(),e.EscErr=function(){function t(t,e){this.gcb=t,this.where=e}return t.prototype.finish=function(t){var e;if(this.gcb)return e=this.gcb,this.gcb=null,e(t)},t.prototype.check_ok=function(t,e,r){return null==e&&(e=Error),null==r&&(r=null),o(t,(function(){var n,i,o;return o=arguments[0],n=2<=arguments.length?c.call(arguments,1):[],o?t.apply(null,n):(i=new e(r),s(i,this.where),this.finish(i))}))},t.prototype.check_err=function(t){return o(t,(function(){var e,r;return r=arguments[0],e=2<=arguments.length?c.call(arguments,1):[],null!=r?(s(r,this.where),this.finish(r)):t.apply(null,e)}))},t}(),e.Canceler=function(){function t(t){this.klass=null!=t?t:Error,this._canceled=!1}return t.prototype.is_canceled=function(){return this._canceled},t.prototype.is_ok=function(){return!this._canceled},t.prototype.cancel=function(){return this._canceled=!0},t.prototype.err=function(){return this._canceled?new this.klass("Aborted"):null},t}(),e.chain=function(t,e){return function(){var r;return r=1<=arguments.length?c.call(arguments,0):[],e((function(){return t.apply(null,r)}))}},e.chain_err=function(t,e){return function(){var r;return r=1<=arguments.length?c.call(arguments,0):[],e((function(){var e;return e=1<=arguments.length?c.call(arguments,0):[],t.apply(null,null!=e[0]&&null==r[0]?e:r)}))}}}).call(this)},function(t,e,r){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(67),e.createHash=e.Hash=r(80),e.createHmac=e.Hmac=r(163);var n=r(265),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var s=r(166);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var a=r(267);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var u=r(282);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var f=r(289);e.createSign=f.createSign,e.Sign=f.Sign,e.createVerify=f.createVerify,e.Verify=f.Verify,e.createECDH=r(337);var h=r(340);e.publicEncrypt=h.publicEncrypt,e.privateEncrypt=h.privateEncrypt,e.publicDecrypt=h.publicDecrypt,e.privateDecrypt=h.privateDecrypt;var c=r(344);e.randomFill=c.randomFill,e.randomFillSync=c.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f;for(u=0,f=(o=[r(784),r(1354),r(544),r(1355),r(420),r(812),r(449)]).length;u<f;u++)for(n in i=o[u])a=i[n],e[n]=a;e.util=s=r(56),e.ASP=s.ASP,e.rand=r(112),e.const=r(41),e.processor=r(452),e.armor=r(236),e.keyring=r(812),e.parser=r(531),e.Buffer=t,e.triplesec=r(101),e.hash=r(113),e.ecc=r(1356),e.nacl=r(541),e.kb=r(813),e.ukm=r(815),e.asym=r(369),e.bn=r(140),e.verify=r(1358)}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),u=n[r];r<o;u=n[++r])m(u)||!v(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o,s={};function a(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),h(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function f(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&M(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return _(i)||(i=h(t,i,n)),i}var o=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(_(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),k(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(r);if(0===s.length){if(M(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return c(r)}var f,v="",x=!1,S=["{","}"];(p(r)&&(x=!0,S=["[","]"]),M(r))&&(v=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(v=" "+RegExp.prototype.toString.call(r)),w(r)&&(v=" "+Date.prototype.toUTCString.call(r)),k(r)&&(v=" "+c(r)),0!==s.length||x&&0!=r.length?n<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),f=x?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)B(e,String(s))?o.push(l(t,e,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(l(t,e,r,n,i,!0))})),o}(t,r,n,a,s):s.map((function(e){return l(t,r,n,a,e,x)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n  ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(f,v,S)):S[0]+v+S[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),B(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=m(r)?h(t,u.value,null):h(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return"  "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return"   "+t})).join("\n")):a=t.stylize("[Circular]","special")),g(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function m(t){return null===t}function y(t){return"number"==typeof t}function _(t){return"string"==typeof t}function g(t){return void 0===t}function b(t){return v(t)&&"[object RegExp]"===x(t)}function v(t){return"object"==typeof t&&null!==t}function w(t){return v(t)&&"[object Date]"===x(t)}function k(t){return v(t)&&("[object Error]"===x(t)||t instanceof Error)}function M(t){return"function"==typeof t}function x(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(g(o)&&(o=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=t.pid;s[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else s[r]=function(){};return s[r]},e.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=_,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=b,e.isObject=v,e.isDate=w,e.isError=k,e.isFunction=M,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(346);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),E[t.getMonth()],e].join(" ")}function B(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",A(),e.format.apply(e,arguments))},e.inherits=r(347),e._extend=function(t,e){if(!e||!v(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var D="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(D&&t[D]){var e;if("function"!=typeof(e=t[D]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,D,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),D&&Object.defineProperty(e,D,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=D,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,r).then((function(e){t.nextTick(s,null,e)}),(function(e){t.nextTick(R,e,s)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this,r(19))},,,,function(t,e,r){"use strict";var n=r(13),i=r(117),o=r(119),s=r(120),a=r(58);function u(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(s(t))}},function(t,e,r){(e=t.exports=r(104)).Stream=e,e.Readable=e,e.Writable=r(83),e.Duplex=r(38),e.Transform=r(107),e.PassThrough=r(158)},function(t,e,r){var n=r(12),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";(function(e){var n=r(63);function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var o,s=n.nextTick;y.WritableState=m;var a=Object.create(r(59));a.inherits=r(13);var u={deprecate:r(95)},f=r(105),h=r(82).Buffer,c=e.Uint8Array||function(){};var l,p=r(106);function d(){}function m(t,e){o=o||r(38),t=t||{};var a=e instanceof o;this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,f=t.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:a&&(f||0===f)?f:h,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 c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(k,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(o(i),t._writableState.errorEmitted=!0,t.emit("error",i),k(t,e))}(t,r,i,e,o);else{var a=v(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||b(t,r),i?s(g,t,r,a,o):g(t,r,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function y(t){if(o=o||r(38),!(l.call(y,this)||this instanceof o))return new y(t);this._writableState=new m(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)),f.call(this)}function _(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function g(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),k(t,e)}function b(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,_(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,h=r.encoding,c=r.callback;if(_(t,e,!1,e.objectMode?1:f.length,f,h,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function v(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function w(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),k(t,e)}))}function k(t,e){var r=v(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,n.nextTick(w,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}a.inherits(y,f),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===y&&(t&&t._writableState instanceof m)}})):l=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,h.isBuffer(i)||i instanceof c);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=d),o.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),n.nextTick(i,s),o=!1),o}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _(t,e,!1,a,n,i,o);return u}(this,o,a,t,e,r)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||b(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(24))},function(t,e,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o<n;++o)i[o]=t[o]^r[o];return i}}).call(this,r(12).Buffer)},function(t,e,r){"use strict";var n=r(43),i=r(34);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},function(t,e,r){var n=e;n.bignum=r(322),n.define=r(324).define,n.base=r(87),n.constants=r(193),n.decoders=r(329),n.encoders=r(331)},function(t,e,r){var n=e;n.Reporter=r(326).Reporter,n.DecoderBuffer=r(192).DecoderBuffer,n.EncoderBuffer=r(192).EncoderBuffer,n.Node=r(327)},,,,function(t,e,r){(function(t){(function(){var n,i,o,s,a;a=r(139),i=function(t){var e,r,n,i;for(r=new Uint8Array(t.length),e=n=0,i=t.length;0<=i?n<i:n>i;e=0<=i?++n:--n)r[e]=t.readUInt8(e);return r},s=function(e){var r,n,i,o;for(n=t.alloc(e.length),r=i=0,o=e.length;0<=o?i<o:i>o;r=0<=o?++i:--i)n.writeUInt8(e[r],r);return n},o=function(t){return t>>>24&255|(t>>>16&255)<<8|(t>>>8&255)<<16|(255&t)<<24},e.WordArray=n=function(){function e(t,e){this.words=t||[],this.sigBytes=null!=e?e:4*this.words.length}return e.prototype.concat=function(t){var e,r,n,i,o;if(i=t.words,n=t.sigBytes,this.clamp(),this.sigBytes%4)for(e=o=0;0<=n?o<n:o>n;e=0<=n?++o:--o)r=i[e>>>2]>>>24-e%4*8&255,this.words[this.sigBytes+e>>>2]|=r<<24-(this.sigBytes+e)%4*8;else this.words=this.words.concat(i);return this.sigBytes+=n,this},e.prototype.clamp=function(){return this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this},e.prototype.clone=function(){return new e(this.words.slice(0),this.sigBytes)},e.prototype.to_buffer=function(){var e,r,n,i,o,s,u;for(r=t.alloc(this.sigBytes),n=0,o=0,s=(u=this.words).length;o<s;o++)i=u[o],this.sigBytes-n>=4&&(i=a.fixup_uint32(i),r.writeUInt32BE(i,n),n+=4);for(;n<this.sigBytes;)e=this.words[n>>>2]>>>24-n%4*8&255,r.writeUInt8(e,n),n++;return r},e.prototype.endian_reverse=function(){var t,e,r,n,i;for(t=r=0,n=(i=this.words).length;r<n;t=++r)e=i[t],this.words[t]=o(e);return this},e.prototype.split=function(t){var r,n;if(this.sigBytes%4!=0||this.words.length%t!=0)throw new Error("bad key alignment");return n=this.words.length/t,function(){var t,i,o;for(o=[],r=t=0,i=this.words.length;n>0?t<i:t>i;r=t+=n)o.push(new e(this.words.slice(r,r+n)));return o}.call(this)},e.prototype.to_utf8=function(){return this.to_buffer().toString("utf8")},e.prototype.to_hex=function(){return this.to_buffer().toString("hex")},e.prototype.to_ui8a=function(){return i(this.to_buffer())},e.alloc=function(r){return t.isBuffer(r)?e.from_buffer(r):"object"==typeof r&&r instanceof e?r:"string"==typeof r?e.from_hex(r):null},e.from_buffer=function(t){var r,n,i;for(i=[],n=0;t.length-n>=4;)i.push(t.readUInt32BE(n)),n+=4;if(n<t.length){for(r=0;n<t.length;)r|=t.readUInt8(n)<<24-n%4*8,n++;r=a.fixup_uint32(r),i.push(r)}return new e(i,t.length)},e.from_buffer_le=function(t){var r,n,i;for(i=[],n=0;t.length-n>=4;)i.push(t.readUInt32LE(n)),n+=4;if(n<t.length){for(r=0;n<t.length;)r|=t.readUInt8(n)<<n%4*8,n++;r=a.fixup_uint32(r),i.push(r)}return new e(i,t.length)},e.from_utf8=function(r){return e.from_buffer(t.from(r,"utf8"))},e.from_utf8_le=function(r){return e.from_buffer_le(t.from(r,"utf8"))},e.from_hex=function(r){return e.from_buffer(t.from(r,"hex"))},e.from_hex_le=function(r){return e.from_buffer_le(t.from(r,"hex"))},e.from_ui8a=function(t){return e.from_buffer(s(t))},e.from_i32a=function(t){return new e(Array.apply([],t))},e.prototype.equal=function(t){var e,r,n,i,o,s;if(r=!0,t.sigBytes!==this.sigBytes)r=!1;else for(e=i=0,o=(s=this.words).length;i<o;e=++i)n=s[e],a.fixup_uint32(n)!==a.fixup_uint32(t.words[e])&&(r=!1);return r},e.prototype.xor=function(t,e){var r,n,i,o,s,u;if((r=e.dst_offset)||(r=0),(o=e.src_offset)||(o=0),null==(i=e.n_words)&&(i=t.words.length-o),this.words.length<r+i)throw new Error("dest range exceeded ("+this.words.length+" < "+(r+i)+")");if(t.words.length<o+i)throw new Error("source range exceeded");for(n=u=0;0<=i?u<i:u>i;n=0<=i?++u:--u)s=this.words[r+n]^t.words[o+n],this.words[r+n]=a.fixup_uint32(s);return this},e.prototype.truncate=function(t){var r;if(!(t<=this.sigBytes))throw new Error("Cannot truncate: "+t+" > "+this.sigBytes);return r=Math.ceil(t/4),new e(this.words.slice(0,r),t)},e.prototype.unshift=function(t){var r;return this.words.length>=t?(r=this.words.splice(0,t),this.sigBytes-=4*t,new e(r)):null},e.prototype.is_scrubbed=function(){var t,e,r;for(t=0,e=(r=this.words).length;t<e;t++)if(0!==r[t])return!1;return!0},e.prototype.scrub=function(){return a.scrub_vec(this.words)},e.prototype.cmp_ule=function(t){return a.buffer_cmp_ule(this.to_buffer(),t.to_buffer())},e.prototype.slice=function(t,r){var n,i;if(n=this.words.length,!(t<r&&r<=n))throw new Error("Bad WordArray slice ["+t+","+r+")] when only "+n+" avail");return i=4*(r-t),r===n&&(i-=4*n-this.sigBytes),new e(this.words.slice(t,r),i)},e}(),e.X64Word=function(){function t(t,e){this.high=t,this.low=e}return t.prototype.clone=function(){return new t(this.high,this.low)},t}(),e.X64WordArray=function(){function t(t,e){this.sigBytes=e,this.words=t||[],this.sigBytes||(this.sigBytes=8*this.words.length)}return t.prototype.toX32=function(){var t,e,r,i,o;for(t=[],r=0,i=(o=this.words).length;r<i;r++)e=o[r],t.push(e.high),t.push(e.low);return new n(t,this.sigBytes)},t.prototype.clone=function(){var e;return new t(function(){var t,r,n,i;for(i=[],t=0,r=(n=this.words).length;t<r;t++)e=n[t],i.push(e.clone());return i}.call(this),this.sigBytes)},t}(),e.buffer_to_ui8a=i,e.ui8a_to_buffer=s,e.endian_reverse=o}).call(this)}).call(this,r(12).Buffer)},,,,function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(24))},function(t,e,r){t.exports=i;var n=r(46).EventEmitter;function i(){n.call(this)}r(13)(i,n),i.Readable=r(81),i.Writable=r(159),i.Duplex=r(160),i.Transform=r(161),i.PassThrough=r(162),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(h(),0===n.listenerCount(this,"error"))throw t}function h(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",h),r.removeListener("close",h),t.removeListener("close",h)}return r.on("error",f),t.on("error",f),r.on("end",h),r.on("close",h),t.on("close",h),t.emit("pipe",r),t}},function(t,e,r){var n=r(18).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function s(t,e,r,n,i){for(var o,s,a,u,f=r[0],h=r[1],c=r[2],l=r[3],p=t[0]^e[0],d=t[1]^e[1],m=t[2]^e[2],y=t[3]^e[3],_=4,g=1;g<i;g++)o=f[p>>>24]^h[d>>>16&255]^c[m>>>8&255]^l[255&y]^e[_++],s=f[d>>>24]^h[m>>>16&255]^c[y>>>8&255]^l[255&p]^e[_++],a=f[m>>>24]^h[y>>>16&255]^c[p>>>8&255]^l[255&d]^e[_++],u=f[y>>>24]^h[p>>>16&255]^c[d>>>8&255]^l[255&m]^e[_++],p=o,d=s,m=a,y=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[m>>>8&255]<<8|n[255&y])^e[_++],s=(n[d>>>24]<<24|n[m>>>16&255]<<16|n[y>>>8&255]<<8|n[255&p])^e[_++],a=(n[m>>>24]<<24|n[y>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[_++],u=(n[y>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&m])^e[_++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var f=a^a<<1^a<<2^a<<3^a<<4;f=f>>>8^255&f^99,r[s]=f,n[f]=s;var h=t[s],c=t[h],l=t[c],p=257*t[f]^16843008*f;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*l^65537*c^257*h^16843008*s,o[0][f]=p<<24|p>>>8,o[1][f]=p<<16|p>>>16,o[2][f]=p<<8|p>>>24,o[3][f]=p,0===s?s=a=1:(s=h^t[t[t[l^h]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function f(t){this._key=i(t),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var s=i[o-1];o%e==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-e]^s}for(var f=[],h=0;h<n;h++){var c=n-h,l=i[c-(h%4?0:4)];f[h]=h<4||c<=4?l:u.INV_SUB_MIX[0][u.SBOX[l>>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},f.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},f.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},f.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=f},function(t,e,r){var n=r(18).Buffer,i=r(117);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),f=n.alloc(0);s>0||o>0;){var h=new i;h.update(f),h.update(t),e&&h.update(e),f=h.digest();var c=0;if(s>0){var l=a.length-s;c=Math.min(s,f.length),f.copy(a,l,0,c),s-=c}if(c<f.length&&o>0){var p=u.length-o,d=Math.min(o,f.length-c);f.copy(u,p,c,c+d),o-=d}}return f.fill(0),{key:a,iv:u}}},function(t,e,r){"use strict";var n=r(55),i=r(35),o=i.getNAF,s=i.getJSF,a=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;for(var s=[],u=0;u<n.length;u+=r.step){var f=0;for(e=u+r.step-1;e>=u;e--)f=(f<<1)+n[e];s.push(f)}for(var h=this.jpoint(null,null,null),c=this.jpoint(null,null,null),l=i;l>0;l--){for(u=0;u<s.length;u++){(f=s[u])===l?c=c.mixedAdd(r.points[u]):f===-l&&(c=c.mixedAdd(r.points[u].neg()))}h=h.add(c)}return h.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r,this._bitLength),u=this.jpoint(null,null,null),f=s.length-1;f>=0;f--){for(e=0;f>=0&&0===s[f];f--)e++;if(f>=0&&e++,u=u.dblp(e),f<0)break;var h=s[f];a(0!==h),u="affine"===t.type?h>0?u.mixedAdd(i[h-1>>1]):u.mixedAdd(i[-h-1>>1].neg()):h>0?u.add(i[h-1>>1]):u.add(i[-h-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){for(var a=this._wnafT1,u=this._wnafT2,f=this._wnafT3,h=0,c=0;c<n;c++){var l=(S=e[c])._getNAFPoints(t);a[c]=l.wnd,u[c]=l.points}for(c=n-1;c>=1;c-=2){var p=c-1,d=c;if(1===a[p]&&1===a[d]){var m=[e[p],null,null,e[d]];0===e[p].y.cmp(e[d].y)?(m[1]=e[p].add(e[d]),m[2]=e[p].toJ().mixedAdd(e[d].neg())):0===e[p].y.cmp(e[d].y.redNeg())?(m[1]=e[p].toJ().mixedAdd(e[d]),m[2]=e[p].add(e[d].neg())):(m[1]=e[p].toJ().mixedAdd(e[d]),m[2]=e[p].toJ().mixedAdd(e[d].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],_=s(r[p],r[d]);h=Math.max(_[0].length,h),f[p]=new Array(h),f[d]=new Array(h);for(var g=0;g<h;g++){var b=0|_[0][g],v=0|_[1][g];f[p][g]=y[3*(b+1)+(v+1)],f[d][g]=0,u[p]=m}}else f[p]=o(r[p],a[p],this._bitLength),f[d]=o(r[d],a[d],this._bitLength),h=Math.max(f[p].length,h),h=Math.max(f[d].length,h)}var w=this.jpoint(null,null,null),k=this._wnafT4;for(c=h;c>=0;c--){for(var M=0;c>=0;){var x=!0;for(g=0;g<n;g++)k[g]=0|f[g][c],0!==k[g]&&(x=!1);if(!x)break;M++,c--}if(c>=0&&M++,w=w.dblp(M),c<0)break;for(g=0;g<n;g++){var S,E=k[g];0!==E&&(E>0?S=u[g][E-1>>1]:E<0&&(S=u[g][-E-1>>1].neg()),w="affine"===S.type?w.mixedAdd(S):w.add(S))}}for(c=0;c<n;c++)u[c]=null;return i?w:w.toP()},u.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(t){return this.encode(t,!0)},f.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},f.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},f.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},f.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},f.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},f.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},function(t,e,r){var n=r(321),i=r(334),o=r(335),s=r(122),a=r(166),u=r(18).Buffer;function f(t){var e;"object"!=typeof t||u.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=u.from(t));var r,f,h=o(t,e),c=h.tag,l=h.data;switch(c){case"CERTIFICATE":f=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=n.PublicKey.decode(l,"der")),r=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=n.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+c);case"ENCRYPTED PRIVATE KEY":l=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(".")],f=t.algorithm.decrypt.cipher.iv,h=t.subjectPrivateKey,c=parseInt(o.split("-")[1],10)/8,l=a.pbkdf2Sync(e,r,n,c,"sha1"),p=s.createDecipheriv(o,l,f),d=[];return d.push(p.update(h)),d.push(p.final()),u.concat(d)}(l=n.EncryptedPrivateKey.decode(l,"der"),e);case"PRIVATE KEY":switch(r=(f=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:n.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=n.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+c);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+c)}}t.exports=f,f.signature=n.signature},function(t,e,r){(function(t){(function(){var n,i,o,s,a;for(i in s=r(787))o=s[i],e[i]=o;for(i in a=r(1323))o=a[i],e[i]=o;e.prng=r(790),e.Buffer=t,e.WordArray=r(91).WordArray,e.util=r(139),e.ciphers={AES:r(524).AES,TwoFish:r(525).TwoFish,Salsa20:r(415).Salsa20},e.hash={SHA1:r(1324).SHA1,SHA224:r(1325).SHA224,SHA256:r(527).SHA256,SHA384:r(1326).SHA384,SHA512:r(367).SHA512,KECCAK:r(416).KECCAK,SHA3:r(1327).SHA3,SHA3STD:r(788).SHA3STD,MD5:r(1328).MD5,RIPEMD160:r(1329).RIPEMD160},e.modes={CTR:r(446)},e.scrypt=r(789).scrypt,e.pbkdf2=r(528).pbkdf2,e.hmac=n=r(366),e.HMAC_SHA256=n.HMAC_SHA256,e.HMAC=n.HMAC}).call(this)}).call(this,r(12).Buffer)},,,function(t,e,r){"use strict";(function(e,n){var i=r(63);t.exports=b;var o,s=r(39);b.ReadableState=g;r(46).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(105),f=r(82).Buffer,h=e.Uint8Array||function(){};var c=Object.create(r(59));c.inherits=r(13);var l=r(155),p=void 0;p=l&&l.debuglog?l.debuglog("stream"):function(){};var d,m=r(156),y=r(106);c.inherits(b,u);var _=["error","close","destroy","pause","resume"];function g(t,e){t=t||{};var n=e instanceof(o=o||r(38));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=r(57).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||r(38),!(this instanceof b))return new b(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function v(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,M(t)}(t,s)):(i||(o=function(t,e){var r;n=e,f.isBuffer(n)||n instanceof h||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===f.prototype||(e=function(t){return f.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):S(t,s)):w(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function w(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&M(t)),S(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=f.from(t,e),e=""),r=!0),v(this,t,e,!1,r)},b.prototype.unshift=function(t){return v(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return d||(d=r(57).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};function k(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function M(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(x,t):x(t))}function x(t){p("emit readable"),t.emit("readable"),D(t)}function S(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(E,t,e))}function E(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function A(t){p("readable nexttick read 0"),t.read(0)}function B(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=f.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(I,e,t))}function I(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function T(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}b.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):M(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&P(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(r,e))),null===(n=t>0?R(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&P(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?h:b;function f(e,n){p("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),t.removeListener("close",_),t.removeListener("finish",g),t.removeListener("drain",c),t.removeListener("error",y),t.removeListener("unpipe",f),r.removeListener("end",h),r.removeListener("end",b),r.removeListener("data",m),l=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function h(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",f);var c=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,D(t))}}(r);t.on("drain",c);var l=!1;var d=!1;function m(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==T(o.pipes,t))&&!l&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function y(e){p("onerror",e),b(),t.removeListener("error",y),0===a(t,"error")&&t.emit("error",e)}function _(){t.removeListener("finish",g),b()}function g(){p("onfinish"),t.removeListener("close",_),b()}function b(){p("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",y),t.once("close",_),t.once("finish",g),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var s=T(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},b.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&M(this):i.nextTick(A,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(B,t,e))}(this,t)),this},b.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(p("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<_.length;o++)t.on(_[o],this.emit.bind(this,_[o]));return this._read=function(e){p("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=R}).call(this,r(24),r(19))},function(t,e,r){t.exports=r(46).EventEmitter},function(t,e,r){"use strict";var n=r(63);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";t.exports=s;var n=r(38),i=Object.create(r(59));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);n.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){u(t,e,r)})):u(this,null,null)}function u(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(13),i.inherits(s,n),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},,,,,function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d;f=r(36),t=r(348).BigInteger,p=r(101),u=p.WordArray,c=p.prng,h=c.native_rng,n=r(791).Lock,o=function(){function e(){}return e.prototype.nextBytes=function(t){var e,r,n,i,o,s;for(s=[],n=i=0,o=(e=h(t.length)).length;i<o;n=++i)r=e[n],s.push(t[n]=r);return s},e.prototype.random_word=function(){return h(4).readUInt32BE(0)},e.prototype.random_zn=function(e){for(var r;;)if((r=t.random_nbit(e.bitLength(),this)).compareTo(t.ONE)>0&&r.compareTo(e)<0)return r},e}(),l=null,i=function(){return null==l&&(l=new o),l},a=function(){function e(){this.buf=null,this.lock=new n}return e.prototype.random_word=function(t){var e,r,n;r=f.findDeferral(arguments),function(t){n=new f.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_word"}),c.generate(4,n.defer({assign_fn:function(){return e=arguments[0]},lineno:49})),n._fulfill()}((function(){return t(e.to_buffer().readUInt32BE(0))}))},e.prototype.random_double=function(t){var e,r,n;r=f.findDeferral(arguments),function(t){n=new f.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_double"}),c.generate(8,n.defer({assign_fn:function(){return e=arguments[0]},lineno:55})),n._fulfill()}((function(){return t(e.to_buffer().readDoubleBE(0))}))},e.prototype.rand_0_1=function(t){var e,r,n,i,o,s;i=f.findDeferral(arguments),(s=this,function(t){o=new f.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.rand_0_1"}),s.random_word(o.defer({assign_fn:function(){return r=arguments[0]},lineno:61})),o._fulfill()})(function(s){return function(){o=new f.Deferrals((function(){return e=r*Math.pow(2,-32)+n*Math.pow(2,-64),t(e)}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.rand_0_1"}),s.random_word(o.defer({assign_fn:function(){return n=arguments[0]},lineno:62})),o._fulfill()}}(this))},e.prototype.random_zn=function(e,r){var n,i,o,s,a;o=f.findDeferral(arguments),n=!0,i=!1,(a=this,function(r){var u;(u=function(r){var h;if(h=function(){return f.trampoline((function(){return u(r)}))},!n)return r();s=new f.Deferrals((function(){return h(n=i.compareTo(t.ONE)<=0||i.compareTo(e)>=0)}),{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_zn"}),a.random_nbit(e.bitLength(),s.defer({assign_fn:function(){return i=arguments[0]},lineno:72})),s._fulfill()})(r)})((function(){return r(i)}))},e.prototype.nextBytes=function(t){var e,r,n,i;for(i=[],e=r=0,n=t.length;0<=n?r<n:r>n;e=0<=n?++r:--r)i.push(t[e]=this.buf[e]);return i},e.prototype.random_word_array=function(t,e){var r,n,i,o,s,a,h,l;a=f.findDeferral(arguments),s=new u,i=512,(l=this,function(t){h=new f.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_word_array"}),l.lock.acquire(h.defer({lineno:88})),h._fulfill()})(function(u){return function(){var l;(l=function(e){var u,p;if(u=e,p=function(){return f.trampoline((function(){return l(e)}))},!((n=t-s.sigBytes)>0))return u();o=Math.min(i,n),h=new f.Deferrals((function(){return p(s=s.concat(r))}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_word_array"}),c.generate(o,h.defer({assign_fn:function(){return r=arguments[0]},lineno:91})),h._fulfill()})((function(){return u.lock.release(),e(s)}))}}(this))},e.prototype.random_bytes=function(t,e){var r,n,i,o;n=f.findDeferral(arguments),(o=this,function(e){i=new f.Deferrals(e,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_bytes"}),o.random_word_array(t,i.defer({assign_fn:function(){return r=arguments[0]},lineno:99})),i._fulfill()})((function(){return e(r.to_buffer())}))},e.prototype.random_nbit=function(e,r){var n,i,o,s,a,u;s=f.findDeferral(arguments),n=1+(e>>3),(u=this,function(t){a=new f.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_nbit"}),u.random_bytes(n,a.defer({assign_fn:function(){return o=arguments[0]},lineno:106})),a._fulfill()})(function(n){return function(){a=new f.Deferrals((function(){return n.buf=o,i=t.random_nbit(e,n),n.lock.release(),r(i)}),{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/rand.iced",funcname:"StrongRandomFountain.random_nbit"}),n.lock.acquire(a.defer({lineno:107})),a._fulfill()}}(this))},e}(),d=null,s=function(){return null==d&&(d=new a),d},e.MRF=i,e.SRF=s}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d;for(a in t=r(41).openpgp,c=r(101),n=c.WordArray,i=c.hash,s=function(t,e,r,n){return t.type=n,t.algname=r,t.output_length=e.output_size,t.klass=e,t},u=function(t,e,r){return null!=t?s((function(e){return(new t).bufhash(e)}),t,e,r):null},f=function(t,e,r){return function(){var i,o;return i=new t,(o=function(t){return i.clone().finalize(null!=t?n.from_buffer(t):null).to_buffer()}).update=function(t){return null!=t&&i.update(n.from_buffer(t)),this},s(o,t,e,r)}},p={},e.streamers=h={},d=t.hash_algorithms)l=d[a],p[l]=a,e[a]=u(i[a],a,l),h[a]=f(i[a],a,l);e.alloc=o=function(t){var e,r,n;return n=null,null!=(r=p[t])&&(e=i[r]),null!=e&&(n=u(e,r,t)),n},e.alloc_or_throw=function(t){var e;if(!(e=o(t)))throw new Error("unknown hash type: "+t);return e}}).call(this)},,,,function(t,e,r){"use strict";var n=r(13),i=r(145),o=r(18).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function f(t,e,r,n,i,o,s){return u(t+(e&r|~e&n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return u(t+(e&n|r&~n)+i+o|0,s)+e|0}function c(t,e,r,n,i,o,s){return u(t+(e^r^n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return u(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=f(r,n,i,o,t[0],3614090360,7),o=f(o,r,n,i,t[1],3905402710,12),i=f(i,o,r,n,t[2],606105819,17),n=f(n,i,o,r,t[3],3250441966,22),r=f(r,n,i,o,t[4],4118548399,7),o=f(o,r,n,i,t[5],1200080426,12),i=f(i,o,r,n,t[6],2821735955,17),n=f(n,i,o,r,t[7],4249261313,22),r=f(r,n,i,o,t[8],1770035416,7),o=f(o,r,n,i,t[9],2336552879,12),i=f(i,o,r,n,t[10],4294925233,17),n=f(n,i,o,r,t[11],2304563134,22),r=f(r,n,i,o,t[12],1804603682,7),o=f(o,r,n,i,t[13],4254626195,12),i=f(i,o,r,n,t[14],2792965006,17),r=h(r,n=f(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=h(o,r,n,i,t[6],3225465664,9),i=h(i,o,r,n,t[11],643717713,14),n=h(n,i,o,r,t[0],3921069994,20),r=h(r,n,i,o,t[5],3593408605,5),o=h(o,r,n,i,t[10],38016083,9),i=h(i,o,r,n,t[15],3634488961,14),n=h(n,i,o,r,t[4],3889429448,20),r=h(r,n,i,o,t[9],568446438,5),o=h(o,r,n,i,t[14],3275163606,9),i=h(i,o,r,n,t[3],4107603335,14),n=h(n,i,o,r,t[8],1163531501,20),r=h(r,n,i,o,t[13],2850285829,5),o=h(o,r,n,i,t[2],4243563512,9),i=h(i,o,r,n,t[7],1735328473,14),r=c(r,n=h(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=c(o,r,n,i,t[8],2272392833,11),i=c(i,o,r,n,t[11],1839030562,16),n=c(n,i,o,r,t[14],4259657740,23),r=c(r,n,i,o,t[1],2763975236,4),o=c(o,r,n,i,t[4],1272893353,11),i=c(i,o,r,n,t[7],4139469664,16),n=c(n,i,o,r,t[10],3200236656,23),r=c(r,n,i,o,t[13],681279174,4),o=c(o,r,n,i,t[0],3936430074,11),i=c(i,o,r,n,t[3],3572445317,16),n=c(n,i,o,r,t[6],76029189,23),r=c(r,n,i,o,t[9],3654602809,4),o=c(o,r,n,i,t[12],3873151461,11),i=c(i,o,r,n,t[15],530742520,16),r=l(r,n=c(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=l(o,r,n,i,t[7],1126891415,10),i=l(i,o,r,n,t[14],2878612391,15),n=l(n,i,o,r,t[5],4237533241,21),r=l(r,n,i,o,t[12],1700485571,6),o=l(o,r,n,i,t[3],2399980690,10),i=l(i,o,r,n,t[10],4293915773,15),n=l(n,i,o,r,t[1],2240044497,21),r=l(r,n,i,o,t[8],1873313359,6),o=l(o,r,n,i,t[15],4264355552,10),i=l(i,o,r,n,t[6],2734768916,15),n=l(n,i,o,r,t[13],1309151649,21),r=l(r,n,i,o,t[4],4149444226,6),o=l(o,r,n,i,t[11],3174756917,10),i=l(i,o,r,n,t[2],718787259,15),n=l(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},function(t,e,r){"use strict";var n=r(68).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){a=!1,f=!0,s||o.call(e)},c=e._readableState&&e._readableState.endEmitted,l=function(){s=!1,c=!0,a||o.call(e)},p=function(t){o.call(e,t)},d=function(){var t;return s&&!c?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!f?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on("finish",h)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",h),e.on("abort",d),e.req?m():e.on("request",m)),e.on("end",l),e.on("finish",h),!1!==r.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",h),e.removeListener("abort",d),e.removeListener("request",m),e.req&&e.req.removeListener("finish",h),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("end",l),e.removeListener("error",p),e.removeListener("close",d)}}},function(t,e,r){"use strict";var n=r(12).Buffer,i=r(13),o=r(145),s=new Array(16),a=[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],u=[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],f=[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],h=[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],c=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(t,e){return t<<e|t>>>32-e}function m(t,e,r,n,i,o,s,a){return d(t+(e^r^n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return d(t+(e&r|~e&n)+o+s|0,a)+i|0}function _(t,e,r,n,i,o,s,a){return d(t+((e|~r)^n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return d(t+(e&n|r&~n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return d(t+(e^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,v=0|this._a,w=0|this._b,k=0|this._c,M=0|this._d,x=0|this._e,S=0;S<80;S+=1){var E,A;S<16?(E=m(r,n,i,o,p,t[a[S]],c[0],f[S]),A=b(v,w,k,M,x,t[u[S]],l[0],h[S])):S<32?(E=y(r,n,i,o,p,t[a[S]],c[1],f[S]),A=g(v,w,k,M,x,t[u[S]],l[1],h[S])):S<48?(E=_(r,n,i,o,p,t[a[S]],c[2],f[S]),A=_(v,w,k,M,x,t[u[S]],l[2],h[S])):S<64?(E=g(r,n,i,o,p,t[a[S]],c[3],f[S]),A=y(v,w,k,M,x,t[u[S]],l[3],h[S])):(E=b(r,n,i,o,p,t[a[S]],c[4],f[S]),A=m(v,w,k,M,x,t[u[S]],l[4],h[S])),r=p,p=o,o=d(i,10),i=n,n=E,v=x,x=M,M=d(k,10),k=w,w=A}var B=this._b+i+M|0;this._b=this._c+o+x|0,this._c=this._d+p+v|0,this._d=this._e+r+w|0,this._e=this._a+n+k|0,this._a=B},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=p},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(260),e.sha1=r(261),e.sha224=r(262),e.sha256=r(153),e.sha384=r(263),e.sha512=r(154)},function(t,e,r){"use strict";var n=r(34);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},function(t,e,r){var n=r(272),i=r(280),o=r(174);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){var n={ECB:r(273),CBC:r(274),CFB:r(275),CFB8:r(276),CFB1:r(277),OFB:r(278),CTR:r(172),GCM:r(172)},i=r(174);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},function(t,e,r){var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(286);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},function(t,e,r){"use strict";var n=r(71).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){a=!1,f=!0,s||o.call(e)},c=e._readableState&&e._readableState.endEmitted,l=function(){s=!1,c=!0,a||o.call(e)},p=function(t){o.call(e,t)},d=function(){var t;return s&&!c?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!f?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on("finish",h)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",h),e.on("abort",d),e.req?m():e.on("request",m)),e.on("end",l),e.on("finish",h),!1!==r.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",h),e.removeListener("abort",d),e.removeListener("request",m),e.req&&e.req.removeListener("finish",h),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("end",l),e.removeListener("error",p),e.removeListener("close",d)}}},function(t,e,r){(function(e){var n=r(299),i=r(67);function o(t,r){var i=function(t){var e=s(t);return{blinder:e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(r),o=r.modulus.byteLength(),a=(n.mont(r.modulus),new n(t).mul(i.blinder).umod(r.modulus)),u=a.toRed(n.mont(r.prime1)),f=a.toRed(n.mont(r.prime2)),h=r.coefficient,c=r.prime1,l=r.prime2,p=u.redPow(r.exponent1),d=f.redPow(r.exponent2);p=p.fromRed(),d=d.fromRed();var m=p.isub(d).imul(h).umod(c);return m.imul(l),d.iadd(m),new e(d.imul(i.unblinder).umod(r.modulus).toArray(!1,o))}function s(t){for(var e=t.modulus.byteLength(),r=new n(i(e));r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new n(i(e));return r}t.exports=o,o.getr=s}).call(this,r(12).Buffer)},function(t,e,r){"use strict";var n=e;n.version=r(301).version,n.utils=r(35),n.rand=r(124),n.curve=r(187),n.curves=r(128),n.ec=r(313),n.eddsa=r(317)},function(t,e,r){"use strict";var n,i=e,o=r(129),s=r(187),a=r(35).assert;function u(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(312)}catch(t){n=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(t,e,r){var n=e;n.utils=r(43),n.common=r(85),n.sha=r(306),n.ripemd=r(310),n.hmac=r(311),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(342).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,h=r;h<a;h+=n)f=u(t,h,h+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var c=1;for(f=u(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=h[t],p=c[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[o-a-1]=s}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,l=h>>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,P=0|s[7],I=8191&P,T=P>>>13,U=0|s[8],F=8191&U,O=U>>>13,C=0|s[9],L=8191&C,N=C>>>13,z=0|a[0],j=8191&z,q=z>>>13,K=0|a[1],H=8191&K,Z=K>>>13,G=0|a[2],W=8191&G,V=G>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,j))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(l,j)|0))<<13)|0;f=((o=Math.imul(l,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,j),i=(i=Math.imul(d,q))+Math.imul(m,j)|0,o=Math.imul(m,q);var _t=(f+(n=n+Math.imul(c,H)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(l,H)|0))<<13)|0;f=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,j),i=(i=Math.imul(_,q))+Math.imul(g,j)|0,o=Math.imul(g,q),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,Z)|0;var gt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,j),i=(i=Math.imul(v,q))+Math.imul(w,j)|0,o=Math.imul(w,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var bt=(f+(n=n+Math.imul(c,X)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(l,X)|0))<<13)|0;f=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,q))+Math.imul(x,j)|0,o=Math.imul(x,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,j),i=(i=Math.imul(E,q))+Math.imul(A,j)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,q))+Math.imul(R,j)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(I,j),i=(i=Math.imul(I,q))+Math.imul(T,j)|0,o=Math.imul(T,q),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,j),i=(i=Math.imul(F,q))+Math.imul(O,j)|0,o=Math.imul(O,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,j),i=(i=Math.imul(L,q))+Math.imul(N,j)|0,o=Math.imul(N,q),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,Z))+Math.imul(N,H)|0,o=Math.imul(N,Z),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,V))+Math.imul(N,W)|0,o=Math.imul(N,V),n=n+Math.imul(F,X)|0,i=(i=i+Math.imul(F,$)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(N,X)|0,o=Math.imul(N,$),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var Pt=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,lt)|0;var It=(f+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(O,dt)|0))<<13)|0;f=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=Pt,u[16]=It,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function d(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),l=67108863&c;a=67108863&(l=l+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,l=f,p=0;p<s;p++){var d=r[h+p],m=n[h+p],y=r[h+p+s],_=n[h+p+s],g=c*y-l*_;_=c*_+l*y,y=g,r[h+p]=d+y,n[h+p]=m+_,r[h+p+s]=d-y,n[h+p+s]=m-_,p!==a&&(g=u*c-f*l,l=u*l+f*c,c=g)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var p=0;p<n;p++){var d=a[p]*h[p]-u[p]*c[p];u[p]=a[p]*c[p]+u[p]*h[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(g,_),g.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,_),i(v,_),i(w,_),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return y[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<d);var _=this.pow(c,new o(1).iushln(d-y-1));l=l.redMul(_),c=_.redSqr(),p=p.redMul(c),d=y}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,k),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(40)(t))},,,function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,s;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)o=t[e],s.set(o,i),i+=o.length;return s}},s={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(n)},,,,,function(t,e,r){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=r(76),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,u="foo"===function(){}.name;function f(t){return Object.prototype.toString.call(t)}function h(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var c=t.exports=_,l=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(l);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function m(t){if(u||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function y(t,e,r,n,i){throw new c.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function _(t,e){t||y(t,!0,e,"==",c.ok)}function g(t,e,r,s){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(h(t)&&h(e)&&f(t)===f(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var u=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=b(t),s=b(e);if(i&&!s||!i&&s)return!1;if(i)return t=a.call(t),e=a.call(e),g(t,e,r);var u,f,h=k(t),c=k(e);if(h.length!==c.length)return!1;for(h.sort(),c.sort(),f=h.length-1;f>=0;f--)if(h[f]!==c[f])return!1;for(f=h.length-1;f>=0;f--)if(u=h[f],!g(t[u],e[u],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&y(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!t&&i&&!r;if((!t&&o.isError(i)&&s&&v(i,r)||a)&&y(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}c.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return d(m(t.actual),128)+" "+t.operator+" "+d(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},o.inherits(c.AssertionError,Error),c.fail=y,c.ok=_,c.equal=function(t,e,r){t!=e&&y(t,e,r,"==",c.equal)},c.notEqual=function(t,e,r){t==e&&y(t,e,r,"!=",c.notEqual)},c.deepEqual=function(t,e,r){g(t,e,!1)||y(t,e,r,"deepEqual",c.deepEqual)},c.deepStrictEqual=function(t,e,r){g(t,e,!0)||y(t,e,r,"deepStrictEqual",c.deepStrictEqual)},c.notDeepEqual=function(t,e,r){g(t,e,!1)&&y(t,e,r,"notDeepEqual",c.notDeepEqual)},c.notDeepStrictEqual=function t(e,r,n){g(e,r,!0)&&y(e,r,n,"notDeepStrictEqual",t)},c.strictEqual=function(t,e,r){t!==e&&y(t,e,r,"===",c.strictEqual)},c.notStrictEqual=function(t,e,r){t===e&&y(t,e,r,"!==",c.notStrictEqual)},c.throws=function(t,e,r){w(!0,t,e,r)},c.doesNotThrow=function(t,e,r){w(!1,t,e,r)},c.ifError=function(t){if(t)throw t};var k=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,r(24))},function(t,e,r){(function(t,n){(function(){var i,o,s;o=r(36),s=Math.pow(2,32),e.fixup_uint32=function(t){var e;return t>s||t<0?(e=Math.abs(t)%s,t<0?s-e:e):t},e.scrub_buffer=function(t){var e,r;for(r=t.length>>2,e=0;e<r;)t.writeUInt32LE(0,e),e+=4;for(;e<t.length;)t.writeUInt8(0,e),e++;return!1},e.copy_buffer=function(e){var r,n,i,o;for(n=t.alloc(e.length),r=i=0,o=e.length;0<=o?i<o:i>o;r=0<=o?++i:--i)n.writeUInt8(e.readUInt8(r),r);return n},e.scrub_vec=function(t){var e,r,n;for(e=r=0,n=t.length;0<=n?r<n:r>n;e=0<=n?++r:--r)t[e]=0;return!1},e.default_delay=i=function(t,e,r){var i,s;i=o.findDeferral(arguments),function(t){null!=n?function(t){s=new o.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/util.iced"}),n(s.defer({lineno:45})),s._fulfill()}(t):function(t){s=new o.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/util.iced"}),setTimeout(s.defer({lineno:47}),1),s._fulfill()}(t)}((function(){return r()}))},e.buffer_cmp_ule=function(t,e){var r,n,i,o,s,a;for(i=o=0,r=t.length,n=e.length;i<r&&0===t.readUInt8(i);)i++;for(;o<n&&0===e.readUInt8(o);)o++;if(r-i>n-o)return 1;if(n-o>r-i)return-1;for(;i<r;){if((s=t.readUInt8(i))<(a=e.readUInt8(o)))return-1;if(a<s)return 1;i++,o++}return 0},e.bulk=function(t,e,r){var n,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v;b=o.findDeferral(arguments),_=e.update,f=e.finalize,a=e.default_n,u=r.delay,l=r.n,s=r.cb,g=r.what,d=r.progress_hook,h=0,c=0,y=Math.ceil(t/4),u||(u=i),l||(l=a),(n=function(t){return"function"==typeof d?d({what:g,i:t,total:y}):void 0})(0),function(t){var e;(e=function(t){var r;if(r=function(){return o.trampoline((function(){return e(t)}))},!((c=y-h)>0))return t();p=Math.min(l,c),_(h,h+p),n(h),v=new o.Deferrals((function(){return r(h+=p)}),{parent:b,filename:"/Users/max/src/keybase/triplesec/src/util.iced",funcname:"bulk"}),u(h,y,v.defer({lineno:105})),v._fulfill()})(t)}((function(){return n(y),m=f(),s(m)}))}}).call(this)}).call(this,r(12).Buffer,r(363).setImmediate)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d;l=(d=r(348)).nbv,f=d.nbi,n=d.BigInteger,h=d.nbits,r(56).buffer_to_ui8a,c=function(t,e){return null==e&&(e=10),f().fromString(t,e)},s=function(t){return t.toByteArray().length},p=function(e){var r,n,i;return i=8*((r=e.toByteArray()).length-1)+h(r[0]),(n=t.alloc(2)).writeUInt16BE(i,0),t.concat([n,t.from(r)])},a=function(e){var r,n,i,o,s;return r=i=null,e.length<2?r=new Error("need at least 2 bytes; got "+e.length):(n=t.from(e.slice(0,2)),e=e.slice(2),o=n.readUInt16BE(0),s=Math.ceil(o/8),e.length<s?r=new Error("MPI said "+s+" bytes but only got "+e.length):(i=f().fromBuffer(e.slice(0,s)),e=e.slice(s))),[r,i,e,s+2]},u=function(e,r){var n,i,o;return i=r.mpi_byte_length()-(n=e.toByteArray()).length,o=t.alloc(i),t.concat([o,t.from(n)])},o=function(t,e){var r,n,i,o,s,a,u;for(o=e>>3,i=(1<<(s=e%8))-1,n=a=u=(t=t.slice(0,t.length-o)).length-1;u<=0?a<=0:a>=0;n=u<=0?++a:--a)r=t.readUInt8(n)>>s,n>0&&(r|=(t.readUInt8(n-1)&i)<<8-s),t.writeUInt8(r,n);return t},i=function(t,e){var r,n,i,o;return 8*t.length<=e?f().fromBuffer(t):(n=(e>>3)+((i=e%8)?1:0),r=t.slice(0,n),o=f().fromBuffer(r),i>0&&(o=o.shiftRight(8-i)),o)},e.toMPI=p,e.nbs=c,e.mpi_from_buffer=a,e.mpi_to_padded_octets=u,e.buffer_shift_right=o,e.bn_from_left_n_bits=i,n.prototype.to_mpi_buffer=function(){return p(this)},n.prototype.mpi_byte_length=function(){return s(this)},n.prototype.to_padded_octets=function(t){return u(this,t)},e.BigInteger=n,e.nbi=f,e.nbv=l,e.nbits=h}).call(this)}).call(this,r(12).Buffer)},,,,,function(t,e,r){"use strict";var n=r(18).Buffer,i=r(252).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(13)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){"use strict";(function(e,n){var i;t.exports=S,S.ReadableState=x;r(46).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(147),a=r(12).Buffer,u=e.Uint8Array||function(){};var f,h=r(253);f=h&&h.debuglog?h.debuglog("stream"):function(){};var c,l,p,d=r(254),m=r(148),y=r(149).getHighWaterMark,_=r(68).codes,g=_.ERR_INVALID_ARG_TYPE,b=_.ERR_STREAM_PUSH_AFTER_EOF,v=_.ERR_METHOD_NOT_IMPLEMENTED,w=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(13)(S,s);var k=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function x(t,e,n){i=i||r(69),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=r(57).StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function S(t){if(i=i||r(69),!(this instanceof S))return new S(t);var e=this instanceof i;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function E(t,e,r,n,i){f("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(f("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?D(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)k(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?k(t,new w):A(t,s,e,!0);else if(s.ended)k(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?A(t,s,e,!1):P(t,s)):A(t,s,e,!1)}else n||(s.reading=!1,P(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function A(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&D(t)),P(t,e)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(t,e){e(t)},S.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),E(this,t,e,!1,r)},S.prototype.unshift=function(t){return E(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){c||(c=r(57).StringDecoder);var e=new c(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function B(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function D(t){var e=t._readableState;f("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(R,t))}function R(t){var e=t._readableState;f("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,O(t)}function P(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(f("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function T(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function U(t){f("readable nexttick read 0"),t.read(0)}function F(t,e){f("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),O(t),e.flowing&&!e.reading&&t.read(0)}function O(t){var e=t._readableState;for(f("flow",e.flowing);e.flowing&&null!==t.read(););}function C(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function L(t){var e=t._readableState;f("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(N,e,t))}function N(t,e){if(f("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function z(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}S.prototype.read=function(t){f("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):D(this),null;if(0===(t=B(t,e))&&e.ended)return 0===e.length&&L(this),null;var n,i=e.needReadable;return f("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&f("length less than watermark",i=!0),e.ended||e.reading?f("reading or ended",i=!1):i&&(f("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=B(r,e))),null===(n=t>0?C(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&L(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(t){k(this,new v("_read()"))},S.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:y;function a(e,n){f("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),t.removeListener("close",d),t.removeListener("finish",m),t.removeListener("drain",h),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",l),c=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function u(){f("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var h=function(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,O(t))}}(r);t.on("drain",h);var c=!1;function l(e){f("ondata");var n=t.write(e);f("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==z(i.pipes,t))&&!c&&(f("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(e){f("onerror",e),y(),t.removeListener("error",p),0===o(t,"error")&&k(t,e)}function d(){t.removeListener("finish",m),y()}function m(){f("onfinish"),t.removeListener("close",d),y()}function y(){f("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",p),t.once("close",d),t.once("finish",m),t.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=z(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},S.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,f("on readable",i.length,i.reading),i.length?D(this):i.reading||n.nextTick(U,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(T,this),r},S.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(T,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(F,t,e))}(this,t)),t.paused=!1,this},S.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},S.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<M.length;o++)t.on(M[o],this.emit.bind(this,M[o]));return this._read=function(e){f("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(256)),l(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),S._fromList=C,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,e){return void 0===p&&(p=r(257)),p(S,t,e)})}).call(this,r(24),r(19))},function(t,e,r){t.exports=r(46).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(19))},function(t,e,r){"use strict";var n=r(68).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=S,S.WritableState=x;var s={deprecate:r(95)},a=r(147),u=r(12).Buffer,f=e.Uint8Array||function(){};var h,c=r(148),l=r(149).getHighWaterMark,p=r(68).codes,d=p.ERR_INVALID_ARG_TYPE,m=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,_=p.ERR_STREAM_CANNOT_PIPE,g=p.ERR_STREAM_DESTROYED,b=p.ERR_STREAM_NULL_VALUES,v=p.ERR_STREAM_WRITE_AFTER_END,w=p.ERR_UNKNOWN_ENCODING,k=c.errorOrDestroy;function M(){}function x(t,e,s){o=o||r(69),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=l(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(P,t,e),t._writableState.errorEmitted=!0,k(t,i)):(o(i),t._writableState.errorEmitted=!0,k(t,i),P(t,e))}(t,r,i,e,o);else{var s=D(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||B(t,r),i?n.nextTick(A,t,r,s,o):A(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function S(t){var e=this instanceof(o=o||r(69));if(!e&&!h.call(S,this))return new S(t);this._writableState=new x(t,this,e),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)),a.call(this)}function E(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new g("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),P(t,e)}function B(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,E(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,h=r.encoding,c=r.callback;if(E(t,e,!1,e.objectMode?1:f.length,f,h,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function D(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function R(t,e){t._final((function(r){e.pendingcb--,r&&k(t,r),e.prefinished=!0,t.emit("prefinish"),P(t,e)}))}function P(t,e){var r=D(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(R,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(13)(S,a),x.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(t){return!!h.call(this,t)||this===S&&(t&&t._writableState instanceof x)}})):h=function(t){return t instanceof this},S.prototype.pipe=function(){k(this,new _)},S.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof f);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=M),o.ending?function(t,e){var r=new v;k(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(k(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var f=e.length<e.highWaterMark;f||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else E(t,e,!1,a,n,i,o);return f}(this,o,a,t,e,r)),s},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||B(this,t))},S.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,r){r(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,P(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=c.destroy,S.prototype._undestroy=c.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,r(24),r(19))},function(t,e,r){var n=r(12),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";t.exports=h;var n=r(68).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(69);function f(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(t){if(!(this instanceof h))return new h(t);u.call(this,t),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",c)}function c(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(e,r){l(t,e,r)}))}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(13)(h,u),h.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},h.prototype._transform=function(t,e,r){r(new i("_transform()"))},h.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},h.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){var n=r(13),i=r(70),o=r(18).Buffer,s=[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],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function c(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function p(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.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},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0|this._f,m=0|this._g,y=0|this._h,_=0;_<16;++_)r[_]=t.readInt32BE(4*_);for(;_<64;++_)r[_]=0|(((e=r[_-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[_-7]+p(r[_-15])+r[_-16];for(var g=0;g<64;++g){var b=y+l(u)+f(u,d,m)+s[g]+r[g]|0,v=c(n)+h(n,i,o)|0;y=m,m=d,d=u,u=a+b|0,a=o,o=i,i=n,n=b+v|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var n=r(13),i=r(70),o=r(18).Buffer,s=[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],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function f(t,e,r){return r^t&(e^r)}function h(t,e,r){return t&e|r&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function _(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.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},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,g=0|this._gh,b=0|this._hh,v=0|this._al,w=0|this._bl,k=0|this._cl,M=0|this._dl,x=0|this._el,S=0|this._fl,E=0|this._gl,A=0|this._hl,B=0;B<32;B+=2)e[B]=t.readInt32BE(4*B),e[B+1]=t.readInt32BE(4*B+4);for(;B<160;B+=2){var D=e[B-30],R=e[B-30+1],P=p(D,R),I=d(R,D),T=m(D=e[B-4],R=e[B-4+1]),U=y(R,D),F=e[B-14],O=e[B-14+1],C=e[B-32],L=e[B-32+1],N=I+O|0,z=P+F+_(N,I)|0;z=(z=z+T+_(N=N+U|0,U)|0)+C+_(N=N+L|0,L)|0,e[B]=z,e[B+1]=N}for(var j=0;j<160;j+=2){z=e[j],N=e[j+1];var q=h(r,n,i),K=h(v,w,k),H=c(r,v),Z=c(v,r),G=l(a,x),W=l(x,a),V=s[j],Y=s[j+1],X=f(a,u,g),$=f(x,S,E),J=A+W|0,Q=b+G+_(J,A)|0;Q=(Q=(Q=Q+X+_(J=J+$|0,$)|0)+V+_(J=J+Y|0,Y)|0)+z+_(J=J+N|0,N)|0;var tt=Z+K|0,et=H+q+_(tt,Z)|0;b=g,A=E,g=u,E=S,u=a,S=x,a=o+Q+_(x=M+J|0,M)|0,o=i,M=k,i=n,k=w,n=r,w=v,r=Q+et+_(v=J+tt|0,J)|0}this._al=this._al+v|0,this._bl=this._bl+w|0,this._cl=this._cl+k|0,this._dl=this._dl+M|0,this._el=this._el+x|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+A|0,this._ah=this._ah+r+_(this._al,v)|0,this._bh=this._bh+n+_(this._bl,w)|0,this._ch=this._ch+i+_(this._cl,k)|0,this._dh=this._dh+o+_(this._dl,M)|0,this._eh=this._eh+a+_(this._el,x)|0,this._fh=this._fh+u+_(this._fl,S)|0,this._gh=this._gh+g+_(this._gl,E)|0,this._hh=this._hh+b+_(this._hl,A)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}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),t},t.exports=u},function(t,e){},function(t,e,r){"use strict";var n=r(82).Buffer,i=r(157);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){"use strict";t.exports=o;var n=r(107),i=Object.create(r(59));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(13),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(83)},function(t,e,r){t.exports=r(38)},function(t,e,r){t.exports=r(81).Transform},function(t,e,r){t.exports=r(81).PassThrough},function(t,e,r){"use strict";var n=r(13),i=r(264),o=r(58),s=r(18).Buffer,a=r(164),u=r(119),f=r(120),h=s.alloc(128);function c(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:f(t)).update(e).digest():e.length<r&&(e=s.concat([e,h],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new u:f(t),this._hash.update(n)}n(c,o),c.prototype._update=function(t){this._hash.update(t)},c.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:f(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new c("rmd160",e):"md5"===t?new i(a,e):new c(t,e)}},function(t,e,r){var n=r(117);t.exports=function(t){return(new n).update(t).digest()}},function(t){t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(t,e,r){e.pbkdf2=r(266),e.pbkdf2Sync=r(169)},function(t,e,r){(function(e){var r=Math.pow(2,30)-1;function n(t,r){if("string"!=typeof t&&!e.isBuffer(t))throw new TypeError(r+" must be a buffer or string")}t.exports=function(t,e,i,o){if(n(t,"Password"),n(e,"Salt"),"number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(o<0||o>r||o!=o)throw new TypeError("Bad key length")}}).call(this,r(12).Buffer)},function(t,e,r){var n;n="utf-8",t.exports=n},function(t,e,r){var n=r(164),i=r(119),o=r(120),s=r(167),a=r(168),u=r(18).Buffer,f=u.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function c(t,e,r){var s=function(t){function e(e){return o(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?n:e}(t),a="sha512"===t||"sha384"===t?128:64;e.length>a?e=s(e):e.length<a&&(e=u.concat([e,f],a));for(var c=u.allocUnsafe(a+h[t]),l=u.allocUnsafe(a+h[t]),p=0;p<a;p++)c[p]=54^e[p],l[p]=92^e[p];var d=u.allocUnsafe(a+r+4);c.copy(d,0,0,a),this.ipad1=d,this.ipad2=c,this.opad=l,this.alg=t,this.blocksize=a,this.hash=s,this.size=h[t]}c.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,n,i){s(t,e,r,n),u.isBuffer(t)||(t=u.from(t,a)),u.isBuffer(e)||(e=u.from(e,a));var o=new c(i=i||"sha1",t,e.length),f=u.allocUnsafe(n),l=u.allocUnsafe(e.length+4);e.copy(l,0,0,e.length);for(var p=0,d=h[i],m=Math.ceil(n/d),y=1;y<=m;y++){l.writeUInt32BE(y,e.length);for(var _=o.run(l,o.ipad1),g=_,b=1;b<r;b++){g=o.run(g,o.ipad2);for(var v=0;v<d;v++)_[v]^=g[v]}_.copy(f,p),p+=d}return f}},function(t,e,r){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=e>>>a+s&1,i<<=1,i|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,r,i){for(var o=0,s=0,a=n.length>>>1,u=0;u<a;u++)o<<=1,o|=t>>>n[u]&1;for(u=a;u<n.length;u++)s<<=1,s|=e>>>n[u]&1;r[i+0]=o>>>0,r[i+1]=s>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(t>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(e>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r<o.length;r++)e<<=1,e|=t>>>o[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},function(t,e,r){"use strict";var n=r(34),i=r(13),o=r(170),s=r(121);function a(){this.tmp=new Array(2),this.keys=null}function u(t){s.call(this,t);var e=new a;this._desState=e,this.deriveKeys(e,t.key)}i(u,s),t.exports=u,u.create=function(t){return new u(t)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var s=0;s<t.keys.length;s+=2){var a=f[s>>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,t.keys,s)}},u.prototype._update=function(t,e,r,n){var i=this._desState,s=o.readUInt32BE(t,e),a=o.readUInt32BE(t,e+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},u.prototype._unpad=function(t){for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,r,n,i){for(var s=e,a=r,u=0;u<t.keys.length;u+=2){var f=t.keys[u],h=t.keys[u+1];o.expand(a,t.tmp,0),f^=t.tmp[0],h^=t.tmp[1];var c=o.substitute(f,h),l=a;a=(s^o.permute(c))>>>0,s=l}o.rip(a,s,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var s=r,a=e,u=t.keys.length-2;u>=0;u-=2){var f=t.keys[u],h=t.keys[u+1];o.expand(s,t.tmp,0),f^=t.tmp[0],h^=t.tmp[1];var c=o.substitute(f,h),l=s;s=(a^o.permute(c))>>>0,a=l}o.rip(s,a,n,i)}},function(t,e,r){var n=r(84),i=r(18).Buffer,o=r(173);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var u=s(t),f=o+16*a;t._cache.writeUInt32BE(u[0],f+0),t._cache.writeUInt32BE(u[1],f+4),t._cache.writeUInt32BE(u[2],f+8),t._cache.writeUInt32BE(u[3],f+12)}var h=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,h)}},function(t,e){t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},function(t){t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(t,e,r){var n=r(97),i=r(18).Buffer,o=r(58),s=r(13),a=r(279),u=r(84),f=r(173);function h(t,e,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var h=this._cipher.encryptBlock(u);this._ghash=new a(h),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,s=o%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,h=i.alloc(8);h.writeUIntBE(u,0,8),n.update(h),t._finID=n.state;var c=i.from(t._finID);return f(c),c}(this,r,h),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(h,o),h.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},h.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},h.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},h.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},h.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=h},function(t,e,r){var n=r(97),i=r(18).Buffer,o=r(58);function s(t,e,r,s){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}r(13)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},function(t,e,r){var n=r(67);t.exports=g,g.simpleSieve=y,g.fermatTest=_;var i=r(178),o=new i(24),s=new(r(179)),a=new i(1),u=new i(2),f=new i(5),h=(new i(16),new i(8),new i(10)),c=new i(3),l=(new i(7),new i(11)),p=new i(4),d=(new i(12),null);function m(){if(null!==d)return d;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return d=t,t}function y(t){for(var e=m(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function _(t){var e=i.mont(t);return 0===u.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function g(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var r,d;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(f))for(;r.mod(h).cmp(c);)r.iadd(p)}else for(;r.mod(o).cmp(l);)r.iadd(p);if(y(d=r.shrn(1))&&y(r)&&_(d)&&_(r)&&s.test(d)&&s.test(r))return r}}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(283).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,h=r;h<a;h+=n)f=u(t,h,h+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var c=1;for(f=u(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=h[t],p=c[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[o-a-1]=s}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,l=h>>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,P=0|s[7],I=8191&P,T=P>>>13,U=0|s[8],F=8191&U,O=U>>>13,C=0|s[9],L=8191&C,N=C>>>13,z=0|a[0],j=8191&z,q=z>>>13,K=0|a[1],H=8191&K,Z=K>>>13,G=0|a[2],W=8191&G,V=G>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,j))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(l,j)|0))<<13)|0;f=((o=Math.imul(l,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,j),i=(i=Math.imul(d,q))+Math.imul(m,j)|0,o=Math.imul(m,q);var _t=(f+(n=n+Math.imul(c,H)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(l,H)|0))<<13)|0;f=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,j),i=(i=Math.imul(_,q))+Math.imul(g,j)|0,o=Math.imul(g,q),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,Z)|0;var gt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,j),i=(i=Math.imul(v,q))+Math.imul(w,j)|0,o=Math.imul(w,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var bt=(f+(n=n+Math.imul(c,X)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(l,X)|0))<<13)|0;f=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,q))+Math.imul(x,j)|0,o=Math.imul(x,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,j),i=(i=Math.imul(E,q))+Math.imul(A,j)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,q))+Math.imul(R,j)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(I,j),i=(i=Math.imul(I,q))+Math.imul(T,j)|0,o=Math.imul(T,q),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,j),i=(i=Math.imul(F,q))+Math.imul(O,j)|0,o=Math.imul(O,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,j),i=(i=Math.imul(L,q))+Math.imul(N,j)|0,o=Math.imul(N,q),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,Z))+Math.imul(N,H)|0,o=Math.imul(N,Z),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,V))+Math.imul(N,W)|0,o=Math.imul(N,V),n=n+Math.imul(F,X)|0,i=(i=i+Math.imul(F,$)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(N,X)|0,o=Math.imul(N,$),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var Pt=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,lt)|0;var It=(f+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(O,dt)|0))<<13)|0;f=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=Pt,u[16]=It,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function d(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),l=67108863&c;a=67108863&(l=l+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,l=f,p=0;p<s;p++){var d=r[h+p],m=n[h+p],y=r[h+p+s],_=n[h+p+s],g=c*y-l*_;_=c*_+l*y,y=g,r[h+p]=d+y,n[h+p]=m+_,r[h+p+s]=d-y,n[h+p+s]=m-_,p!==a&&(g=u*c-f*l,l=u*l+f*c,c=g)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var p=0;p<n;p++){var d=a[p]*h[p]-u[p]*c[p];u[p]=a[p]*c[p]+u[p]*h[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(g,_),g.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,_),i(v,_),i(w,_),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return y[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<d);var _=this.pow(c,new o(1).iushln(d-y-1));l=l.redMul(_),c=_.redSqr(),p=p.redMul(c),d=y}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,k),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(40)(t))},function(t,e,r){var n=r(284),i=r(124);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),s=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),u=0;!a.testn(u);u++);for(var f=t.shrn(u),h=a.toRed(o);e>0;e--){var c=this._randrange(new n(2),a);r&&r(c);var l=c.toRed(o).redPow(f);if(0!==l.cmp(s)&&0!==l.cmp(h)){for(var p=1;p<u;p++){if(0===(l=l.redSqr()).cmp(s))return!1;if(0===l.cmp(h))break}if(p===u)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var u=t.shrn(a),f=s.toRed(i);e>0;e--){var h=this._randrange(new n(2),s),c=t.gcd(h);if(0!==c.cmpn(1))return c;var l=h.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(f)){for(var p=1;p<a;p++){if(0===(l=l.redSqr()).cmp(o))return l.fromRed().subn(1).gcd(t);if(0===l.cmp(f))break}if(p===a)return(l=l.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},function(t,e,r){"use strict";(function(e,n){var i;t.exports=S,S.ReadableState=x;r(46).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(181),a=r(12).Buffer,u=e.Uint8Array||function(){};var f,h=r(291);f=h&&h.debuglog?h.debuglog("stream"):function(){};var c,l,p,d=r(292),m=r(182),y=r(183).getHighWaterMark,_=r(71).codes,g=_.ERR_INVALID_ARG_TYPE,b=_.ERR_STREAM_PUSH_AFTER_EOF,v=_.ERR_METHOD_NOT_IMPLEMENTED,w=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(13)(S,s);var k=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function x(t,e,n){i=i||r(72),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=r(57).StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function S(t){if(i=i||r(72),!(this instanceof S))return new S(t);var e=this instanceof i;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function E(t,e,r,n,i){f("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(f("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?D(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)k(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?k(t,new w):A(t,s,e,!0);else if(s.ended)k(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?A(t,s,e,!1):P(t,s)):A(t,s,e,!1)}else n||(s.reading=!1,P(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function A(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&D(t)),P(t,e)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(t,e){e(t)},S.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),E(this,t,e,!1,r)},S.prototype.unshift=function(t){return E(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){c||(c=r(57).StringDecoder);var e=new c(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function B(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function D(t){var e=t._readableState;f("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(R,t))}function R(t){var e=t._readableState;f("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,O(t)}function P(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(f("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function T(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function U(t){f("readable nexttick read 0"),t.read(0)}function F(t,e){f("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),O(t),e.flowing&&!e.reading&&t.read(0)}function O(t){var e=t._readableState;for(f("flow",e.flowing);e.flowing&&null!==t.read(););}function C(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function L(t){var e=t._readableState;f("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(N,e,t))}function N(t,e){if(f("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function z(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}S.prototype.read=function(t){f("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):D(this),null;if(0===(t=B(t,e))&&e.ended)return 0===e.length&&L(this),null;var n,i=e.needReadable;return f("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&f("length less than watermark",i=!0),e.ended||e.reading?f("reading or ended",i=!1):i&&(f("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=B(r,e))),null===(n=t>0?C(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&L(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(t){k(this,new v("_read()"))},S.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:y;function a(e,n){f("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),t.removeListener("close",d),t.removeListener("finish",m),t.removeListener("drain",h),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",l),c=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function u(){f("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var h=function(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,O(t))}}(r);t.on("drain",h);var c=!1;function l(e){f("ondata");var n=t.write(e);f("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==z(i.pipes,t))&&!c&&(f("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(e){f("onerror",e),y(),t.removeListener("error",p),0===o(t,"error")&&k(t,e)}function d(){t.removeListener("finish",m),y()}function m(){f("onfinish"),t.removeListener("close",d),y()}function y(){f("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",p),t.once("close",d),t.once("finish",m),t.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=z(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},S.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,f("on readable",i.length,i.reading),i.length?D(this):i.reading||n.nextTick(U,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(T,this),r},S.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(T,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(F,t,e))}(this,t)),t.paused=!1,this},S.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},S.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<M.length;o++)t.on(M[o],this.emit.bind(this,M[o]));return this._read=function(e){f("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(294)),l(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),S._fromList=C,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,e){return void 0===p&&(p=r(295)),p(S,t,e)})}).call(this,r(24),r(19))},function(t,e,r){t.exports=r(46).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(19))},function(t,e,r){"use strict";var n=r(71).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=S,S.WritableState=x;var s={deprecate:r(95)},a=r(181),u=r(12).Buffer,f=e.Uint8Array||function(){};var h,c=r(182),l=r(183).getHighWaterMark,p=r(71).codes,d=p.ERR_INVALID_ARG_TYPE,m=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,_=p.ERR_STREAM_CANNOT_PIPE,g=p.ERR_STREAM_DESTROYED,b=p.ERR_STREAM_NULL_VALUES,v=p.ERR_STREAM_WRITE_AFTER_END,w=p.ERR_UNKNOWN_ENCODING,k=c.errorOrDestroy;function M(){}function x(t,e,s){o=o||r(72),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=l(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(P,t,e),t._writableState.errorEmitted=!0,k(t,i)):(o(i),t._writableState.errorEmitted=!0,k(t,i),P(t,e))}(t,r,i,e,o);else{var s=D(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||B(t,r),i?n.nextTick(A,t,r,s,o):A(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function S(t){var e=this instanceof(o=o||r(72));if(!e&&!h.call(S,this))return new S(t);this._writableState=new x(t,this,e),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)),a.call(this)}function E(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new g("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),P(t,e)}function B(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,E(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,h=r.encoding,c=r.callback;if(E(t,e,!1,e.objectMode?1:f.length,f,h,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function D(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function R(t,e){t._final((function(r){e.pendingcb--,r&&k(t,r),e.prefinished=!0,t.emit("prefinish"),P(t,e)}))}function P(t,e){var r=D(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(R,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(13)(S,a),x.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(t){return!!h.call(this,t)||this===S&&(t&&t._writableState instanceof x)}})):h=function(t){return t instanceof this},S.prototype.pipe=function(){k(this,new _)},S.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof f);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=M),o.ending?function(t,e){var r=new v;k(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(k(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var f=e.length<e.highWaterMark;f||(e.needDrain=!0);if(e.writing||e.corked){var h=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},h?h.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else E(t,e,!1,a,n,i,o);return f}(this,o,a,t,e,r)),s},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||B(this,t))},S.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,r){r(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,P(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=c.destroy,S.prototype._undestroy=c.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,r(24),r(19))},function(t,e,r){"use strict";t.exports=h;var n=r(71).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(72);function f(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function h(t){if(!(this instanceof h))return new h(t);u.call(this,t),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",c)}function c(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(e,r){l(t,e,r)}))}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(13)(h,u),h.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},h.prototype._transform=function(t,e,r){r(new i("_transform()"))},h.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},h.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},h.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){"use strict";var n=e;function i(t){return 1===t.length?"0"+t:t}function o(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}n.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},n.zero2=i,n.toHex=o,n.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,r){"use strict";var n=e;n.base=r(99),n.short=r(303),n.mont=r(304),n.edwards=r(305)},function(t,e,r){"use strict";var n=r(43).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,e,r){"use strict";var n=r(43),i=r(85),o=r(188),s=r(34),a=n.sum32,u=n.sum32_4,f=n.sum32_5,h=o.ch32,c=o.maj32,l=o.s0_256,p=o.s1_256,d=o.g0_256,m=o.g1_256,y=i.BlockHash,_=[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];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=_,this.W=new Array(64)}n.inherits(g,y),t.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],d(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],_=this.h[3],g=this.h[4],b=this.h[5],v=this.h[6],w=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var k=f(w,p(g),h(g,b,v),this.k[n],r[n]),M=a(l(i),c(i,o,y));w=v,v=b,b=g,g=a(_,k),_=y,y=o,o=i,i=a(k,M)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],y),this.h[3]=a(this.h[3],_),this.h[4]=a(this.h[4],g),this.h[5]=a(this.h[5],b),this.h[6]=a(this.h[6],v),this.h[7]=a(this.h[7],w)},g.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(43),i=r(85),o=r(34),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,f=n.shr64_lo,h=n.sum64,c=n.sum64_hi,l=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,m=n.sum64_5_hi,y=n.sum64_5_lo,_=i.BlockHash,g=[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];function b(){if(!(this instanceof b))return new b;_.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function v(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function w(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function k(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function M(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function x(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function S(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function E(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function A(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function B(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function D(t,e){var r=a(t,e,1)^a(t,e,8)^f(t,e,7);return r<0&&(r+=4294967296),r}function R(t,e){var r=s(t,e,19)^s(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function P(t,e){var r=a(t,e,19)^a(e,t,29)^f(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(b,_),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=R(r[n-4],r[n-3]),o=P(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],u=B(r[n-30],r[n-29]),f=D(r[n-30],r[n-29]),h=r[n-32],c=r[n-31];r[n]=p(i,o,s,a,u,f,h,c),r[n+1]=d(i,o,s,a,u,f,h,c)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],u=this.h[4],f=this.h[5],p=this.h[6],d=this.h[7],_=this.h[8],g=this.h[9],b=this.h[10],B=this.h[11],D=this.h[12],R=this.h[13],P=this.h[14],I=this.h[15];o(this.k.length===r.length);for(var T=0;T<r.length;T+=2){var U=P,F=I,O=E(_,g),C=A(_,g),L=v(_,g,b,B,D),N=w(_,g,b,B,D,R),z=this.k[T],j=this.k[T+1],q=r[T],K=r[T+1],H=m(U,F,O,C,L,N,z,j,q,K),Z=y(U,F,O,C,L,N,z,j,q,K);U=x(n,i),F=S(n,i),O=k(n,i,s,a,u),C=M(n,i,s,a,u,f);var G=c(U,F,O,C),W=l(U,F,O,C);P=D,I=R,D=b,R=B,b=_,B=g,_=c(p,d,H,Z),g=l(d,d,H,Z),p=u,d=f,u=s,f=a,s=n,a=i,n=c(H,Z,G,W),i=l(H,Z,G,W)}h(this.h,0,n,i),h(this.h,2,s,a),h(this.h,4,u,f),h(this.h,6,p,d),h(this.h,8,_,g),h(this.h,10,b,B),h(this.h,12,D,R),h(this.h,14,P,I)},b.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(320).Buffer}catch(t){}function a(t,e,r){for(var i=0,o=Math.min(t.length,r),s=0,a=e;a<o;a++){var u,f=t.charCodeAt(a)-48;i<<=4,i|=u=f>=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:f,s|=u}return n(!(240&s),"Invalid character in "+t),i}function u(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var f=t.charCodeAt(u)-48;o*=i,s=f>=49?f-49+10:f>=17?f-17+10:f,n(f>=0&&s<i,"Invalid character"),o+=s}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,h=r;h<a;h+=n)f=u(t,h,h+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var c=1;for(f=u(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h:o.prototype.inspect=h;var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var f=l[t],h=p[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(h).toString(t);r=(d=d.idivn(h)).isZero()?m+r:c[f-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var m=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,l=h>>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,P=0|s[7],I=8191&P,T=P>>>13,U=0|s[8],F=8191&U,O=U>>>13,C=0|s[9],L=8191&C,N=C>>>13,z=0|a[0],j=8191&z,q=z>>>13,K=0|a[1],H=8191&K,Z=K>>>13,G=0|a[2],W=8191&G,V=G>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,j))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(l,j)|0))<<13)|0;f=((o=Math.imul(l,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,j),i=(i=Math.imul(d,q))+Math.imul(m,j)|0,o=Math.imul(m,q);var _t=(f+(n=n+Math.imul(c,H)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(l,H)|0))<<13)|0;f=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,j),i=(i=Math.imul(_,q))+Math.imul(g,j)|0,o=Math.imul(g,q),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,Z)|0;var gt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,j),i=(i=Math.imul(v,q))+Math.imul(w,j)|0,o=Math.imul(w,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var bt=(f+(n=n+Math.imul(c,X)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(l,X)|0))<<13)|0;f=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,q))+Math.imul(x,j)|0,o=Math.imul(x,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,j),i=(i=Math.imul(E,q))+Math.imul(A,j)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,q))+Math.imul(R,j)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(I,j),i=(i=Math.imul(I,q))+Math.imul(T,j)|0,o=Math.imul(T,q),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,j),i=(i=Math.imul(F,q))+Math.imul(O,j)|0,o=Math.imul(O,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,j),i=(i=Math.imul(L,q))+Math.imul(N,j)|0,o=Math.imul(N,q),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,Z))+Math.imul(N,H)|0,o=Math.imul(N,Z),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,V))+Math.imul(N,W)|0,o=Math.imul(N,V),n=n+Math.imul(F,X)|0,i=(i=i+Math.imul(F,$)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(N,X)|0,o=Math.imul(N,$),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var Pt=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,lt)|0;var It=(f+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(O,dt)|0))<<13)|0;f=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=Pt,u[16]=It,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),l=67108863&c;a=67108863&(l=l+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function _(t,e,r){return y(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(m=d),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?d(this,t,e):r<1024?y(this,t,e):_(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},g.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,l=f,p=0;p<s;p++){var d=r[h+p],m=n[h+p],y=r[h+p+s],_=n[h+p+s],g=c*y-l*_;_=c*_+l*y,y=g,r[h+p]=d+y,n[h+p]=m+_,r[h+p+s]=d-y,n[h+p+s]=m-_,p!==a&&(g=u*c-f*l,l=u*l+f*c,c=g)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var p=0;p<n;p++){var d=a[p]*h[p]-u[p]*c[p];u[p]=a[p]*c[p]+u[p]*h[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),_(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(w,v),w.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(k,v),i(M,v),i(x,v),x.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new k;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return b[t]=e,e},S.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<d);var _=this.pow(c,new o(1).iushln(d-y-1));l=l.redMul(_),c=_.redSqr(),p=p.redMul(c),d=y}return l},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(40)(t))},function(t,e,r){var n=r(13),i=r(87).Reporter,o=r(12).Buffer;function s(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return t instanceof a||(t=new a(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(s,i),e.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){var e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=a,a.prototype.join=function(t,e){return t||(t=new o(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},function(t,e,r){var n=e;n._reverse=function(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r})),e},n.der=r(328)},function(t,e,r){var n=r(13),i=r(86),o=i.base,s=i.bignum,a=i.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new f,this.tree._init(t.body)}function f(t){o.Node.call(this,"der",t)}function h(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function c(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o<i;o++){n<<=8;var s=t.readUInt8(r);if(t.isError(s))return s;n|=s}return n}t.exports=u,u.prototype.decode=function(t,e){return t instanceof o.DecoderBuffer||(t=new o.DecoderBuffer(t,e)),this.tree._decode(t,e)},n(f,o.Node),f.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var n=t.save(),i=h(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},f.prototype._decodeTag=function(t,e,r){var n=h(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;var i=c(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},f.prototype._skipUntilEnd=function(t,e){for(;;){var r=h(t,e);if(t.isError(r))return r;var n,i=c(t,r.primitive,e);if(t.isError(i))return i;if(n=r.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===r.tagStr)break}},f.prototype._decodeList=function(t,e,r,n){for(var i=[];!t.isEmpty();){var o=this._peekTag(t,"end");if(t.isError(o))return o;var s=r.decode(t,"der",n);if(t.isError(s)&&o)break;i.push(s)}return i},f.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var n=t.raw();if(n.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if("numstr"===e){var s=t.raw().toString("ascii");return this._isNumstr(s)?s:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var a=t.raw().toString("ascii");return this._isPrintstr(a)?a:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},f.prototype._decodeObjid=function(t,e,r){for(var n,i=[],o=0;!t.isEmpty();){var s=t.readUInt8();o<<=7,o|=127&s,0==(128&s)&&(i.push(o),o=0)}128&s&&i.push(o);var a=i[0]/40|0,u=i[0]%40;if(n=r?i:[a,u].concat(i.slice(1)),e){var f=e[n.join(" ")];void 0===f&&(f=e[n.join(".")]),void 0!==f&&(n=f)}return n},f.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),u=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,u,0)},f.prototype._decodeNull=function(t){return null},f.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},f.prototype._decodeInt=function(t,e){var r=t.raw(),n=new s(r);return e&&(n=e[n.toString(10)]||n),n},f.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},function(t,e,r){var n=r(13),i=r(12).Buffer,o=r(86),s=o.base,a=o.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new f,this.tree._init(t.body)}function f(t){s.Node.call(this,"der",t)}function h(t){return t<10?"0"+t:t}t.exports=u,u.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(f,s.Node),f.prototype._encodeComposite=function(t,e,r,n){var o,s=function(t,e,r,n){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}if(i>=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var u=1,f=n.length;f>=256;f>>=8)u++;(o=new i(2+u))[0]=s,o[1]=128|u;f=1+u;for(var h=n.length;h>0;f--,h>>=8)o[f]=255&h;return this._createEncoderBuffer([o,n])},f.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new i(2*t.length),n=0;n<t.length;n++)r.writeUInt16BE(t.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},f.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(n=0;n<t.length;n++)t[n]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(n=0;n<t.length;n++){var s=t[n];for(o++;s>=128;s>>=7)o++}var a=new i(o),u=a.length-1;for(n=t.length-1;n>=0;n--){s=t[n];for(a[u--]=127&s;(s>>=7)>0;)a[u--]=128|127&s}return this._createEncoderBuffer(a)},f.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[h(n.getFullYear()),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[h(n.getFullYear()%100),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new i(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=new i(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);n=1;for(var s=t;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},f.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},f.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},f.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},function(t){t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(t,e,r){var n=r(80),i=r(18).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,s=i.alloc(0),a=0;s.length<e;)r=o(a++),s=i.concat([s,n("sha1").update(t).update(r).digest()]);return s.slice(0,e)}},function(t,e){t.exports=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t}},function(t,e,r){var n=r(130),i=r(18).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},function(t,e,r){(function(){var t,n,i,o,s,a,u={}.hasOwnProperty;s=r(91).WordArray,a=r(139),i=function(t){function e(){e.__super__.constructor.call(this)}return function(t,e){for(var r in e)u.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.reset=function(){return e.__super__.reset.call(this),this._doReset(),this},e.prototype.update=function(t){return this._append(t),this._process(),this},e.prototype.finalize=function(t){return t&&this._append(t),this._doFinalize()},e.prototype.bufhash=function(t){var e,r,n;return r=s.from_buffer(t),e=(n=this.finalize(r)).to_buffer(),r.scrub(),n.scrub(),e},e}(n=function(){function t(){this.reset()}return t.prototype._minBufferSize=0,t.prototype.reset=function(){return this._data=new s,this._nDataBytes=0},t.prototype._append=function(t){return this._data.concat(t),this._nDataBytes+=t.sigBytes},t.prototype._process=function(t){var e,r,n,i,o,a,u,f,h,c;if(n=(e=this._data).words,i=(r=e.sigBytes)/(4*this.blockSize),a=(i=t?Math.ceil(i):Math.max((0|i)-this._minBufferSize,0))*this.blockSize,o=Math.min(4*a,r),a){for(u=h=0,c=this.blockSize;c>0?h<a:h>a;u=h+=c)this._doProcessBlock(n,u);f=n.splice(0,a),e.sigBytes-=o}return new s(f,o)},t.prototype.copy_to=function(t){return t._data=this._data.clone(),t._nDataBytes=this._nDataBytes},t.prototype.clone=function(){var e;return e=new t,this.copy_to(e),e},t}()),e.BlockCipher=t=function(){function t(t){}return t.prototype.encryptBlock=function(t,e){},t}(),o=function(){function t(){}return t.prototype.encryptBlock=function(t,e){var r,n;return null==e&&(e=0),n=this.get_pad(),r=Math.min(t.words.length-e,this.bsiw),t.xor(n,{dst_offset:e,n_words:r}),n.scrub(),this.bsiw},t.prototype.encrypt=function(t){var e,r,n,i;for(e=r=0,n=t.words.length,i=this.bsiw;i>0?r<n:r>n;e=r+=i)this.encryptBlock(t,e);return t},t.prototype.bulk_encrypt=function(t,e){var r,n,i,o,s,u;return n=t.input,i=t.progress_hook,s=t.what,o={update:(u=this,function(t,e){var r,i,o,s;for(s=[],r=i=t,o=u.bsiw;o>0?i<e:i>e;r=i+=o)s.push(u.encryptBlock(n,r));return s}),finalize:function(){return n},default_n:1024*this.bsiw},r={progress_hook:i,cb:e,what:s},a.bulk(n.sigBytes,o,r)},t}(),e.BlockCipher=t,e.Hasher=i,e.BufferedBlockAlgorithm=n,e.StreamCipher=o}).call(this)},,,,,,,function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c;f=r(36),h=r(41),n=h.openpgp,i=h.kb,c=r(113),o=c.SHA256,c.SHA512,a=r(140),u=r(217).util.bufeq_secure,s=r(112).SRF,e.BaseKey=function(){function e(){}return e.alloc=function(t,e,r){var n,i,o,s,u,f,h;for(null==r&&(r={}),o=e.length,n=null,s=0,u=(f=t.ORDER).length;s<u;s++)i=f[s],null==n&&(n=(h=a.mpi_from_buffer(e))[0],r[i]=h[1],e=h[2]);return n?[n,null]:[null,new t(r),o-e.length]},e.prototype.serialize=function(){var e;return t.concat(function(){var t,r,n,i;for(i=[],t=0,r=(n=this.ORDER).length;t<r;t++)e=n[t],i.push(this[e].to_mpi_buffer());return i}.call(this))},e.prototype.validity_check=function(t){return t(null)},e}(),e.BaseKeyPair=function(){function e(t){this.priv=t.priv,this.pub=t.pub,this.pub.parent=this,null!=this.priv&&(this.priv.parent=this)}return e.prototype.serialize=function(){return this.pub.serialize()},e.prototype.hash=function(){return o(this.serialize())},e.prototype.ekid=function(){return t.concat([t.from([i.kid.version,this.get_type()]),this.hash(),t.from([i.kid.trailer])])},e.prototype.can_sign=function(){return null!=this.priv},e.prototype.can_decrypt=function(){return null!=this.priv},e.prototype.has_private=function(){return null!=this.priv},e.prototype.fulfills_flags=function(t){return!1},e.prototype.is_toxic=function(){return!1},e.prototype.nbits=function(){var t;return null!=(t=this.pub)?t.nbits():void 0},e.prototype.good_for_flags=function(){return n.key_flags.encrypt_comm|n.key_flags.encrypt_storage|n.key_flags.certify_keys|n.key_flags.sign_data},e.prototype.eq=function(t){return this.type===t.type&&u(this.serialize(),t.serialize())},e.prototype.can_perform=function(t){return!(t&h.ops.sign&&!this.can_sign())&&!(t&h.ops.decrypt&&!this.can_decrypt())},e.parse=function(t,e){var r,n,i,o;return r=(o=t.Pub.alloc(e))[0],n=o[1],i=o[2],null!=n&&(n=new t({pub:n})),[r,n,i]},e.parse_kb=function(t,e){var r,n,i,o;return r=(o=t.Pub.alloc_kb(e))[0],n=o[1],i=o[2],null!=n&&(n=new t({pub:n})),[r,n,i]},e.prototype.add_priv=function(t){var e,r;return e=(r=Priv.alloc(t))[0],this.priv=r[1],[e,r[2]]},e.alloc=function(t,e){var r,n,i,o,s;return i=e.pub,n=e.priv,r=(o=t.Pub.alloc(i))[0],i=o[1],null==r&&null!=n&&(r=(s=t.Priv.alloc(n,i))[0],n=s[1]),null!=r?[r,null]:[null,new t({priv:n,pub:i})]},e.prototype.read_priv=function(t){var e,r;return e=(r=this.Priv.alloc(t,this.pub))[0],this.priv=r[1],e},e.prototype.find=function(t){return t.mod(this.max_value())},e.prototype.hide=function(t,e){var r,n,i,o,a,u,h,c,l,p,d;p=f.findDeferral(arguments),i=t.i,o=t.max,l=t.slosh,c=n=null,a=this.max_value(),function(t){if((r=a.bitLength())>o)return t(n=new Error("Can't hide > "+o+" bits; got "+r));h=o-r+l,function(t){d=new f.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/basekeypair.iced",funcname:"BaseKeyPair.hide"}),s().random_nbit(h,d.defer({assign_fn:function(){return u=arguments[0]},lineno:127})),d._fulfill()}((function(){return t(c=u.multiply(a).add(i))}))}((function(){return e(n,c)}))},e.prototype.validity_check=function(t){return this.pub.validity_check(t)},e.prototype._dsa_verify_update_and_check_hash=function(e,r){var n,i,o,s,a,u,h,c,l,p;h=f.findDeferral(arguments),u=e.sig,n=e.data,s=e.hasher,o=e.hash,a=e.klass,i=null,t.isBuffer(u)&&(l=a.read_sig_from_buf(u),i=l[0],u=l[1]),o||(o=s(n)),(p=this,function(t){if(2!==u.length)return t(i=new Error("Need an [r,s] pair for a DSA-style signature"));!function(t){c=new f.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/basekeypair.iced",funcname:"BaseKeyPair._dsa_verify_update_and_check_hash"}),p.pub.verify(u,o,c.defer({assign_fn:function(){return i=arguments[0],arguments[1]},lineno:148})),c._fulfill()}(t)})((function(){return r(i)}))},e}()}).call(this)}).call(this,r(12).Buffer)},,,,,,,,,,function(t,e,r){(function(){e.armor=r(1331),e.util=r(792),e.userid=r(1332)}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o;o=r(417),r(41).openpgp,i=r(450),n=function(){function e(){this._psc=new i.Collection}return e.prototype.frame_packet=function(e,r){var n;return n=[t.from([192|e]),o.encode_length(r.length),r],t.concat(n)},e.prototype.set=function(t){var e,r,n;for(e in n=[],t)r=t[e],n.push(this[e]=r);return n},e.prototype.is_signature=function(){return!1},e.prototype.is_key_material=function(){return!1},e.prototype.is_duplicate_primary=function(){return!1},e.prototype.to_userid=function(){return null},e.prototype.to_user_attribute=function(){return null},e.prototype.to_literal=function(){return null},e.prototype.to_esk_packet=function(){return null},e.prototype.to_enc_data_packet=function(){return null},e.prototype.replay=function(){return this.frame_packet(this.tag,this.raw)},e.prototype.inflate=function(t){return t(null,null)},e.prototype.push_sig=function(t){return this._psc.push(t)},e.prototype.get_psc=function(){return this._psc},e.prototype.clear_psc=function(){return this._psc.clear()},e.prototype.get_data_signer=function(){return this.get_psc().get_data_signer()},e.prototype.get_data_signers=function(){return this.get_psc().get_data_signers()},e.prototype.get_signed_userids=function(){return[]},e.prototype.get_subkey_binding=function(){return null},e.prototype.is_self_signed=function(){return!1},e}(),e.Packet=n}).call(this)}).call(this,r(12).Buffer)},,,,,,,,,,,,,,,function(t,e,r){"use strict";t.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var o=n,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},function(t,e,r){(function(t){(function(){var r;r=function(){function e(e,r){if(this.buf=e,this.start=null!=r?r:0,!t.isBuffer(this.buf))throw new Error("need a Buffer!");this.i=this.start,this._end=null}return e.prototype.clamp=function(t){var e;return e=this._end,this._end=this.i+t,e},e.prototype.unclamp=function(t){return this.start=this.i,this._end=t},e.prototype.len=function(){return this.buf.length-this.start},e.prototype.rem=function(){return this.buf.length-this.i},e.prototype.offset=function(){return this.i-this.start},e.prototype.check=function(){if(this._end&&this.i>this._end||this.i>this.buf.length)throw new Error("read off the end of the packet @"+this.i+"/"+this.buf.length+"/"+this._end)},e.prototype.read_uint8=function(){var t;return t=this.buf.readUInt8(this.i++),this.check(),t},e.prototype.read_uint16=function(){var t;return t=this.buf.readUInt16BE(this.i),this.i+=2,this.check(),t},e.prototype.read_uint32=function(){var t;return t=this.buf.readUInt32BE(this.i),this.i+=4,this.check(),t},e.prototype.read_buffer_at_most=function(t){return this.read_buffer(Math.min(t,this.rem()))},e.prototype.read_buffer=function(t){var e;return e=this.buf.slice(this.i,this.i+t),this.i+=t,this.check(),e},e.prototype.end=function(){return this._end||this.buf.length},e.prototype.peek_rest_to_buffer=function(){return this.buf.slice(this.i,this.end())},e.prototype.consume_rest_to_buffer=function(){var t;return t=this.peek_rest_to_buffer(),this.i=this.end(),t},e.prototype.advance=function(t){return null==t&&(t=1),this.i+=t},e.prototype.peek_to_buffer=function(t){return this.buf.slice(this.i,this.i+t)},e.prototype.peek_uint8=function(){return this.buf.readUInt8(this.i)},e.prototype.peek_uint16=function(){return this.buf.readUInt16BE(this.i)},e.prototype.read_string=function(){return this.read_buffer(this.read_uint8())},e.prototype.read_v4_length=function(){var t,e;return t=!1,[(e=this.peek_uint8())<192?(this.advance(1),e):e<224?this.read_uint16()-49152+192:e<255?(this.advance(1),1<<(31&e)):(this.advance(1),t=!0,this.read_uint32()),t]},e}(),e.SlicerBuffer=r}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u={}.hasOwnProperty;a=r(56),s=a.katch,a.bufeq_fast,a.uint_to_buffer,t=r(41),n=r(530),o=r(217).armor,e.encode=function(e,r){var i;return i=t.openpgp.message_types,e=function(){switch(e){case i.public_key:return"PUBLIC KEY BLOCK";case i.private_key:return"PRIVATE KEY BLOCK";case i.signature:return"SIGNATURE";case i.generic:return"MESSAGE";default:throw new Error("Cannot encode tag type "+e)}}(),o.encode(n,e,r)},i=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)u.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.parse_type=function(){var e;return e=t.openpgp.message_types,this.ret.type=function(){switch(this.type){case"PUBLIC KEY BLOCK":return e.public_key;case"PRIVATE KEY BLOCK":return e.private_key;case"SIGNED MESSAGE":if(this.ret.clearsign)return e.clearsign;throw new Error("Signed message, but not clear-signed");case"SIGNATURE":return e.signature;case"MESSAGE":return e.generic;default:throw new Error("Unknown message type: "+this.type)}}.call(this),this.ret.fields.type=this.type},r}(o.Parser),e.Message=o.Message,e.decode=function(t){return s((function(){return new i(t).parse()}))},e.mdecode=function(t){return s((function(){return new i(t).mparse()}))},e.decode_strict=function(t){return s((function(){return new i(t,{strict:!0}).parse()}))}}).call(this)},,,,,,,,,,,,,,,,function(t,e,r){(e=t.exports=r(146)).Stream=e,e.Readable=e,e.Writable=r(150),e.Duplex=r(69),e.Transform=r(152),e.PassThrough=r(258),e.finished=r(118),e.pipeline=r(259)},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(12).Buffer,a=r(255).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,f;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),f&&o(e,f),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(118),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),c=Symbol("handlePromise"),l=Symbol("stream");function p(t,e){return{value:t,done:e}}function d(t){var e=t[s];if(null!==e){var r=t[l].read();null!==r&&(t[h]=null,t[s]=null,t[a]=null,e(p(r,!1)))}}function m(t){e.nextTick(d,t)}var y=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((i(n={get stream(){return this[l]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[f])return Promise.resolve(p(void 0,!0));if(this[l].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(p(void 0,!0))}))}));var n,i=this[h];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(p(void 0,!0)):e[c](r,n)}),n)}}(i,this));else{var o=this[l].read();if(null!==o)return Promise.resolve(p(o,!1));n=new Promise(this[c])}return this[h]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[l].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),y);t.exports=function(t){var e,r=Object.create(_,(i(e={},l,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,f,{value:t._readableState.endEmitted,writable:!0}),i(e,c,{value:function(t,e){var n=r[l].read();n?(r[h]=null,r[s]=null,r[a]=null,t(p(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[h]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[h]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[h]=null,r[s]=null,r[a]=null,n(p(void 0,!0))),r[f]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this,r(19))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(152);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(13)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(68).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(118)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function f(t){t()}function h(t,e){return t.pipe(e)}function c(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=c(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(f),o||(s.forEach(f),i(n))}))}));return e.reduce(h)}},function(t,e,r){var n=r(13),i=r(70),o=r(18).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var l=0;l<80;++l){var p=~~(l/20),d=0|((e=n)<<5|e>>>27)+h(p,i,o,a)+u+r[l]+s[p];u=a,a=o,o=f(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(13),i=r(70),o=r(18).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<5|t>>>27}function h(t){return t<<30|t>>>2}function c(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var p=0;p<80;++p){var d=~~(p/20),m=f(n)+c(d,i,o,a)+u+r[p]+s[d]|0;u=a,a=o,o=h(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,r){var n=r(13),i=r(153),o=r(70),s=r(18).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.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},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,r){var n=r(13),i=r(154),o=r(70),s=r(18).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.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},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}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),t},t.exports=u},function(t,e,r){"use strict";var n=r(13),i=r(18).Buffer,o=r(58),s=i.alloc(128);function a(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>64?e=t(e):e.length<64&&(e=i.concat([e,s],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),a=0;a<64;a++)r[a]=54^e[a],n[a]=92^e[a];this._hash=[r]}n(a,o),a.prototype._update=function(t){this._hash.push(t)},a.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=a},function(t,e,r){t.exports=r(165)},function(t,e,r){(function(e,n){var i,o=r(167),s=r(168),a=r(169),u=r(18).Buffer,f=e.crypto&&e.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},c=[];function l(t,e,r,n,i){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return u.from(t)}))}t.exports=function(t,r,p,d,m,y){"function"==typeof m&&(y=m,m=void 0);var _=h[(m=m||"sha1").toLowerCase()];if(!_||"function"!=typeof e.Promise)return n.nextTick((function(){var e;try{e=a(t,r,p,d,m)}catch(t){return y(t)}y(null,e)}));if(o(t,r,p,d),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");u.isBuffer(t)||(t=u.from(t,s)),u.isBuffer(r)||(r=u.from(r,s)),function(t,e){t.then((function(t){n.nextTick((function(){e(null,t)}))}),(function(t){n.nextTick((function(){e(t)}))}))}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==c[t])return c[t];var r=l(i=i||u.alloc(8),i,10,128,t).then((function(){return!0})).catch((function(){return!1}));return c[t]=r,r}(_).then((function(e){return e?l(t,r,p,d,_):a(t,r,p,d,m)})),y)}}).call(this,r(24),r(19))},function(t,e,r){var n=r(268),i=r(122),o=r(123),s=r(281),a=r(98);function u(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function f(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return u(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return f(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=f,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},function(t,e,r){var n=r(58),i=r(269),o=r(13),s=r(18).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(t){n.call(this);var e,r=t.mode.toLowerCase(),i=a[r];e=t.decrypt?"decrypt":"encrypt";var o=t.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var u=t.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:o,iv:u,type:e})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],t.exports=u,o(u,n),u.prototype._update=function(t){return s.from(this._des.update(t))},u.prototype._final=function(){return s.from(this._des.final())}},function(t,e,r){"use strict";e.utils=r(170),e.Cipher=r(121),e.DES=r(171),e.CBC=r(270),e.EDE=r(271)},function(t,e,r){"use strict";var n=r(34),i=r(13),o={};function s(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n<r.length;n++){var s=r[n];e.prototype[s]=o[s]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new s(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=t[e+a];o._update.call(this,s,0,r,n);for(a=0;a<this.blockSize;a++)s[a]=r[n+a]}else{o._update.call(this,t,e,r,n);for(a=0;a<this.blockSize;a++)r[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=t[e+a]}}},function(t,e,r){"use strict";var n=r(34),i=r(13),o=r(121),s=r(171);function a(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function u(t){o.call(this,t);var e=new a(this.type,this.options.key);this._edeState=e}i(u,o),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},function(t,e,r){var n=r(123),i=r(175),o=r(18).Buffer,s=r(176),a=r(58),u=r(97),f=r(98);function h(t,e,r){a.call(this),this._cache=new l,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(13)(h,a),h.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var c=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function p(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,e,r):"auth"===a.type?new i(a.module,e,r):new h(a.module,e,r)}h.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(c))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=o.concat([this.cache,t])},l.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=p,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=f(e,!1,r.key,r.iv);return p(t,i.key,i.iv)}},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){var n=r(84);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e,r){var n=r(18).Buffer,i=r(84);function o(t,e,r){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){s=n.concat([s,o(t,e,r)]);break}i=t._cache.length,s=n.concat([s,o(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},function(t,e,r){var n=r(18).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},function(t,e,r){var n=r(18).Buffer;function i(t,e,r){for(var n,i,s=-1,a=0;++s<8;)n=e&1<<7-s?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>s%8,t._prev=o(t._prev,r?n:i);return a}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},function(t,e,r){(function(t){var n=r(84);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(this,r(12).Buffer)},function(t,e,r){var n=r(18).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,r=function(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}(this.h),n=[0,0,0,0],i=-1;++i<128;){for(0!=(this.state[~~(i/8)]&1<<7-i%8)&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),e=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,e&&(r[0]=r[0]^225<<24)}this.state=o(n)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},function(t,e,r){var n=r(175),i=r(18).Buffer,o=r(123),s=r(176),a=r(58),u=r(97),f=r(98);function h(t,e,r){a.call(this),this._cache=new c,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function c(){this.cache=i.allocUnsafe(0)}function l(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new s(a.module,e,r,!0):"auth"===a.type?new n(a.module,e,r,!0):new h(a.module,e,r)}r(13)(h,a),h.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},h.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},c.prototype.add=function(t){this.cache=i.concat([this.cache,t])},c.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=f(e,!1,r.key,r.iv);return l(t,n.key,n.iv)},e.createDecipheriv=l},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e,r){(function(t){var n=r(177),i=r(287),o=r(288);var s={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var r=new t(i[e].prime,"hex"),n=new t(i[e].gen,"hex");return new o(r,n)},e.createDiffieHellman=e.DiffieHellman=function e(r,i,a,u){return t.isBuffer(i)||void 0===s[i]?e(r,"binary",i,a):(i=i||"binary",u=u||"binary",a=a||new t([2]),t.isBuffer(a)||(a=new t(a,u)),"number"==typeof r?new o(n(r,a),a,!0):(t.isBuffer(r)||(r=new t(r,i)),new o(r,a,!0)))}}).call(this,r(12).Buffer)},function(t,e){},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(285).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,h=r;h<a;h+=n)f=u(t,h,h+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var c=1;for(f=u(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=h[t],p=c[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[o-a-1]=s}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,l=h>>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,P=0|s[7],I=8191&P,T=P>>>13,U=0|s[8],F=8191&U,O=U>>>13,C=0|s[9],L=8191&C,N=C>>>13,z=0|a[0],j=8191&z,q=z>>>13,K=0|a[1],H=8191&K,Z=K>>>13,G=0|a[2],W=8191&G,V=G>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,j))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(l,j)|0))<<13)|0;f=((o=Math.imul(l,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,j),i=(i=Math.imul(d,q))+Math.imul(m,j)|0,o=Math.imul(m,q);var _t=(f+(n=n+Math.imul(c,H)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(l,H)|0))<<13)|0;f=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,j),i=(i=Math.imul(_,q))+Math.imul(g,j)|0,o=Math.imul(g,q),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,Z)|0;var gt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,j),i=(i=Math.imul(v,q))+Math.imul(w,j)|0,o=Math.imul(w,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var bt=(f+(n=n+Math.imul(c,X)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(l,X)|0))<<13)|0;f=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,q))+Math.imul(x,j)|0,o=Math.imul(x,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,j),i=(i=Math.imul(E,q))+Math.imul(A,j)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,q))+Math.imul(R,j)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(I,j),i=(i=Math.imul(I,q))+Math.imul(T,j)|0,o=Math.imul(T,q),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,j),i=(i=Math.imul(F,q))+Math.imul(O,j)|0,o=Math.imul(O,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,j),i=(i=Math.imul(L,q))+Math.imul(N,j)|0,o=Math.imul(N,q),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,Z))+Math.imul(N,H)|0,o=Math.imul(N,Z),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,V))+Math.imul(N,W)|0,o=Math.imul(N,V),n=n+Math.imul(F,X)|0,i=(i=i+Math.imul(F,$)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(N,X)|0,o=Math.imul(N,$),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var Pt=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,lt)|0;var It=(f+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(O,dt)|0))<<13)|0;f=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=Pt,u[16]=It,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function d(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),l=67108863&c;a=67108863&(l=l+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,l=f,p=0;p<s;p++){var d=r[h+p],m=n[h+p],y=r[h+p+s],_=n[h+p+s],g=c*y-l*_;_=c*_+l*y,y=g,r[h+p]=d+y,n[h+p]=m+_,r[h+p+s]=d-y,n[h+p+s]=m-_,p!==a&&(g=u*c-f*l,l=u*l+f*c,c=g)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var p=0;p<n;p++){var d=a[p]*h[p]-u[p]*c[p];u[p]=a[p]*c[p]+u[p]*h[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(g,_),g.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,_),i(v,_),i(w,_),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return y[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<d);var _=this.pow(c,new o(1).iushln(d-y-1));l=l.redMul(_),c=_.redSqr(),p=p.redMul(c),d=y}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,k),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(40)(t))},function(t,e){},function(t,e){},function(t){t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(t,e,r){(function(e){var n=r(178),i=new(r(179)),o=new n(24),s=new n(11),a=new n(10),u=new n(3),f=new n(7),h=r(177),c=r(67);function l(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._pub=new n(t),this}function p(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._priv=new n(t),this}t.exports=m;var d={};function m(t,e,r){this.setGenerator(e),this.__prime=new n(t),this._prime=n.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=p):this._primeCode=8}function y(t,r){var n=new e(t.toArray());return r?n.toString(r):n}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in d)return d[n];var c,l=0;if(t.isEven()||!h.simpleSieve||!h.fermatTest(t)||!i.test(t))return l+=1,l+="02"===r||"05"===r?8:4,d[n]=l,l;switch(i.test(t.shrn(1))||(l+=2),r){case"02":t.mod(o).cmp(s)&&(l+=8);break;case"05":(c=t.mod(a)).cmp(u)&&c.cmp(f)&&(l+=8);break;default:l+=4}return d[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new n(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(t){var r=(t=(t=new n(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new e(r.toArray()),o=this.getPrime();if(i.length<o.length){var s=new e(o.length-i.length);s.fill(0),i=e.concat([s,i])}return i},m.prototype.getPublicKey=function(t){return y(this._pub,t)},m.prototype.getPrivateKey=function(t){return y(this._priv,t)},m.prototype.getPrime=function(t){return y(this.__prime,t)},m.prototype.getGenerator=function(t){return y(this._gen,t)},m.prototype.setGenerator=function(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this.__gen=t,this._gen=new n(t),this}}).call(this,r(12).Buffer)},function(t,e,r){var n=r(18).Buffer,i=r(80),o=r(290),s=r(13),a=r(298),u=r(336),f=r(165);function h(t){o.Writable.call(this);var e=f[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function c(t){o.Writable.call(this);var e=f[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){return new h(t)}function p(t){return new c(t)}Object.keys(f).forEach((function(t){f[t].id=n.from(f[t].id,"hex"),f[t.toLowerCase()]=f[t]})),s(h,o.Writable),h.prototype._write=function(t,e,r){this._hash.update(t),r()},h.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},h.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=a(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},s(c,o.Writable),c.prototype._write=function(t,e,r){this._hash.update(t),r()},c.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},c.prototype.verify=function(t,e,r){"string"==typeof e&&(e=n.from(e,r)),this.end();var i=this._hash.digest();return u(e,i,t,this._signType,this._tag)},t.exports={Sign:l,Verify:p,createSign:l,createVerify:p}},function(t,e,r){(e=t.exports=r(180)).Stream=e,e.Readable=e,e.Writable=r(184),e.Duplex=r(72),e.Transform=r(185),e.PassThrough=r(296),e.finished=r(125),e.pipeline=r(297)},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(12).Buffer,a=r(293).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,f;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),f&&o(e,f),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(125),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),c=Symbol("handlePromise"),l=Symbol("stream");function p(t,e){return{value:t,done:e}}function d(t){var e=t[s];if(null!==e){var r=t[l].read();null!==r&&(t[h]=null,t[s]=null,t[a]=null,e(p(r,!1)))}}function m(t){e.nextTick(d,t)}var y=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((i(n={get stream(){return this[l]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[f])return Promise.resolve(p(void 0,!0));if(this[l].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(p(void 0,!0))}))}));var n,i=this[h];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(p(void 0,!0)):e[c](r,n)}),n)}}(i,this));else{var o=this[l].read();if(null!==o)return Promise.resolve(p(o,!1));n=new Promise(this[c])}return this[h]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[l].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),y);t.exports=function(t){var e,r=Object.create(_,(i(e={},l,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,f,{value:t._readableState.endEmitted,writable:!0}),i(e,c,{value:function(t,e){var n=r[l].read();n?(r[h]=null,r[s]=null,r[a]=null,t(p(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[h]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[h]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[h]=null,r[s]=null,r[a]=null,n(p(void 0,!0))),r[f]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this,r(19))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(185);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(13)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(71).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(125)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function f(t){t()}function h(t,e){return t.pipe(e)}function c(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=c(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(f),o||(s.forEach(f),i(n))}))}));return e.reduce(h)}},function(t,e,r){var n=r(18).Buffer,i=r(163),o=r(126),s=r(127).ec,a=r(191),u=r(100),f=r(196);function h(t,e,r,o){if((t=n.from(t.toArray())).length<e.byteLength()){var s=n.alloc(e.byteLength()-t.length);t=n.concat([s,t])}var a=r.length,u=function(t,e){t=(t=c(t,e)).mod(e);var r=n.from(t.toArray());if(r.length<e.byteLength()){var i=n.alloc(e.byteLength()-r.length);r=n.concat([i,r])}return r}(r,e),f=n.alloc(a);f.fill(1);var h=n.alloc(a);return h=i(o,h).update(f).update(n.from([0])).update(t).update(u).digest(),f=i(o,h).update(f).digest(),{k:h=i(o,h).update(f).update(n.from([1])).update(t).update(u).digest(),v:f=i(o,h).update(f).digest()}}function c(t,e){var r=new a(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function l(t,e,r){var o,s;do{for(o=n.alloc(0);8*o.length<t.bitLength();)e.v=i(r,e.k).update(e.v).digest(),o=n.concat([o,e.v]);s=c(o,t),e.k=i(r,e.k).update(e.v).update(n.from([0])).digest(),e.v=i(r,e.k).update(e.v).digest()}while(-1!==s.cmp(t));return s}function p(t,e,r,n){return t.toRed(a.mont(r)).redPow(e).fromRed().mod(n)}t.exports=function(t,e,r,i,d){var m=u(e);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(t,e){var r=f[e.curve.join(".")];if(!r)throw new Error("unknown curve "+e.curve.join("."));var i=new s(r).keyFromPrivate(e.privateKey).sign(t);return n.from(i.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(t,e,r){var i,o=e.params.priv_key,s=e.params.p,u=e.params.q,f=e.params.g,d=new a(0),m=c(t,u).mod(u),y=!1,_=h(o,u,t,r);for(;!1===y;)i=l(u,_,r),d=p(f,i,s,u),0===(y=i.invm(u).imul(m.add(o.mul(d))).mod(u)).cmpn(0)&&(y=!1,d=new a(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t));128&e[0]&&(e=[0].concat(e));var r=[48,t.length+e.length+4,2,t.length];return r=r.concat(t,[2,e.length],e),n.from(r)}(d,y)}(t,m,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");t=n.concat([d,t]);for(var y=m.modulus.byteLength(),_=[0,1];t.length+_.length+1<y;)_.push(255);_.push(0);for(var g=-1;++g<t.length;)_.push(t[g]);return o(_,m)},t.exports.getKey=h,t.exports.makeKey=l},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(300).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,h=r;h<a;h+=n)f=u(t,h,h+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var c=1;for(f=u(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=h[t],p=c[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[o-a-1]=s}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,l=h>>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,P=0|s[7],I=8191&P,T=P>>>13,U=0|s[8],F=8191&U,O=U>>>13,C=0|s[9],L=8191&C,N=C>>>13,z=0|a[0],j=8191&z,q=z>>>13,K=0|a[1],H=8191&K,Z=K>>>13,G=0|a[2],W=8191&G,V=G>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,j))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(l,j)|0))<<13)|0;f=((o=Math.imul(l,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,j),i=(i=Math.imul(d,q))+Math.imul(m,j)|0,o=Math.imul(m,q);var _t=(f+(n=n+Math.imul(c,H)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(l,H)|0))<<13)|0;f=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,j),i=(i=Math.imul(_,q))+Math.imul(g,j)|0,o=Math.imul(g,q),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,Z)|0;var gt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,j),i=(i=Math.imul(v,q))+Math.imul(w,j)|0,o=Math.imul(w,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var bt=(f+(n=n+Math.imul(c,X)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(l,X)|0))<<13)|0;f=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,q))+Math.imul(x,j)|0,o=Math.imul(x,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,j),i=(i=Math.imul(E,q))+Math.imul(A,j)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,q))+Math.imul(R,j)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(I,j),i=(i=Math.imul(I,q))+Math.imul(T,j)|0,o=Math.imul(T,q),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,j),i=(i=Math.imul(F,q))+Math.imul(O,j)|0,o=Math.imul(O,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,j),i=(i=Math.imul(L,q))+Math.imul(N,j)|0,o=Math.imul(N,q),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,Z))+Math.imul(N,H)|0,o=Math.imul(N,Z),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,V))+Math.imul(N,W)|0,o=Math.imul(N,V),n=n+Math.imul(F,X)|0,i=(i=i+Math.imul(F,$)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(N,X)|0,o=Math.imul(N,$),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var Pt=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,lt)|0;var It=(f+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(O,dt)|0))<<13)|0;f=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=Pt,u[16]=It,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function d(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),l=67108863&c;a=67108863&(l=l+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,l=f,p=0;p<s;p++){var d=r[h+p],m=n[h+p],y=r[h+p+s],_=n[h+p+s],g=c*y-l*_;_=c*_+l*y,y=g,r[h+p]=d+y,n[h+p]=m+_,r[h+p+s]=d-y,n[h+p+s]=m-_,p!==a&&(g=u*c-f*l,l=u*l+f*c,c=g)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var p=0;p<n;p++){var d=a[p]*h[p]-u[p]*c[p];u[p]=a[p]*c[p]+u[p]*h[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(g,_),g.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,_),i(v,_),i(w,_),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return y[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<d);var _=this.pow(c,new o(1).iushln(d-y-1));l=l.redMul(_),c=_.redSqr(),p=p.redMul(c),d=y}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,k),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(40)(t))},function(t,e){},function(t){t.exports=JSON.parse('{"_args":[["elliptic@6.5.2","/home/travis/build/gchq/CyberChef"]],"_development":true,"_from":"elliptic@6.5.2","_id":"elliptic@6.5.2","_inBundle":false,"_integrity":"sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"elliptic@6.5.2","name":"elliptic","escapedName":"elliptic","rawSpec":"6.5.2","saveSpec":null,"fetchSpec":"6.5.2"},"_requiredBy":["/browserify-sign","/create-ecdh"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz","_spec":"6.5.2","_where":"/home/travis/build/gchq/CyberChef","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"dependencies":{"bn.js":"^4.4.0","brorand":"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0","inherits":"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},"description":"EC cryptography","devDependencies":{"brfs":"^1.4.3","coveralls":"^3.0.8","grunt":"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.2","jscs":"^3.0.7","jshint":"^2.10.3","mocha":"^6.2.2"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"jscs":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","jshint":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","lint":"npm run jscs && npm run jshint","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.2"}')},function(t,e){},function(t,e,r){"use strict";var n=r(35),i=r(55),o=r(13),s=r(99),a=n.assert;function u(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(t,e,r,n){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(t,e,r,n){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,u,f,h,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,p=this.n.clone(),d=new i(1),m=new i(0),y=new i(0),_=new i(1),g=0;0!==l.cmpn(0);){var b=p.div(l);f=p.sub(b.mul(l)),h=y.sub(b.mul(d));var v=_.sub(b.mul(m));if(!n&&f.cmp(c)<0)e=u.neg(),r=d,n=f.neg(),o=h;else if(n&&2==++g)break;u=f,p=l,l=f,y=d,d=h,_=m,m=v}s=f.neg(),a=h;var w=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(w)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),f=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(f).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var f=this._wnafMulAdd(1,n,i,2*o,r),h=0;h<2*o;h++)n[h]=null,i[h]=null;return f},o(f,s.BasePoint),u.prototype.point=function(t,e,r){return new f(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return f.fromJSON(this,t,e)},f.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},f.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(h,s.BasePoint),u.prototype.jpoint=function(t,e,r){return new h(this,t,e,r)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),h=f.redMul(a),c=n.redMul(f),l=u.redSqr().redIAdd(h).redISub(c).redISub(c),p=u.redMul(c.redISub(l)).redISub(o.redMul(h)),d=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(l,p,d)},h.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),h=r.redMul(u),c=a.redSqr().redIAdd(f).redISub(h).redISub(h),l=a.redMul(h.redISub(c)).redISub(i.redMul(f)),p=this.z.redMul(s);return this.curve.jpoint(c,l,p)},h.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),f=s.redAdd(s);for(r=0;r<t;r++){var h=o.redSqr(),c=f.redSqr(),l=c.redSqr(),p=h.redAdd(h).redIAdd(h).redIAdd(n.redMul(u)),d=o.redMul(c),m=p.redSqr().redISub(d.redAdd(d)),y=d.redISub(m),_=p.redMul(y);_=_.redIAdd(_).redISub(l);var g=f.redMul(a);r+1<t&&(u=u.redMul(l)),o=m,a=g,f=_}return this.curve.jpoint(o,f.redMul(i),a)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},h.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),t=u,e=a.redMul(s.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),c=this.y.redSqr(),l=c.redSqr(),p=this.x.redAdd(c).redSqr().redISub(h).redISub(l);p=p.redIAdd(p);var d=h.redAdd(h).redIAdd(h),m=d.redSqr(),y=l.redIAdd(l);y=(y=y.redIAdd(y)).redIAdd(y),t=m.redISub(p).redISub(p),e=d.redMul(p.redISub(t)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},h.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),e=a.redMul(s.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),c=this.y.redSqr(),l=this.x.redMul(c),p=this.x.redSub(h).redMul(this.x.redAdd(h));p=p.redAdd(p).redIAdd(p);var d=l.redIAdd(l),m=(d=d.redIAdd(d)).redAdd(d);t=p.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(c).redISub(h);var y=c.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),e=p.redMul(d.redISub(t)).redISub(y)}return this.curve.jpoint(t,e,r)},h.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),f=(u=u.redIAdd(u)).redMul(s),h=a.redSqr().redISub(f.redAdd(f)),c=f.redISub(h),l=s.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var p=a.redMul(c).redISub(l),d=r.redAdd(r).redMul(n);return this.curve.jpoint(h,p,d)},h.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var f=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),h=e.redMul(f);h=(h=h.redIAdd(h)).redIAdd(h);var c=this.x.redMul(a).redISub(h);c=(c=c.redIAdd(c)).redIAdd(c);var l=this.y.redMul(f.redMul(u.redISub(f)).redISub(s.redMul(a)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var p=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(c,l,p)},h.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},h.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},h.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},h.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){"use strict";var n=r(55),i=r(13),o=r(99),s=r(35);function a(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new u(this,t,e)},a.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),u=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,r){"use strict";var n=r(35),i=r(55),o=r(13),s=r(99),a=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function f(t,e,r,n,o){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(e&&!u||!e&&u)&&(a=a.redNeg()),this.point(t,a)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(f,s.BasePoint),u.prototype.pointFromJSON=function(t){return f.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new f(this,t,e,r,n)},f.fromJSON=function(t,e){return new f(t,e[0],e[1],e[2])},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),u=i.redMul(s),f=o.redMul(a),h=i.redMul(a),c=s.redMul(o);return this.curve.point(u,f,c,h)},f.prototype._projDbl=function(){var t,e,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var s=(f=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=n.redSub(i).redSub(o).redMul(s.redSub(this.curve.two)),e=s.redMul(f.redSub(o)),r=s.redSqr().redSub(s).redSub(s);else{var a=this.z.redSqr(),u=s.redSub(a).redISub(a);t=n.redSub(i).redISub(o).redMul(u),e=s.redMul(f.redSub(o)),r=s.redMul(u)}}else{var f=i.redAdd(o);a=this.curve._mulC(this.z).redSqr(),u=f.redSub(a).redSub(a);t=this.curve._mulC(n.redISub(f)).redMul(u),e=this.curve._mulC(f).redMul(i.redISub(o)),r=f.redMul(u)}return this.curve.point(t,e,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(e),f=o.redMul(s),h=a.redMul(u),c=o.redMul(u),l=s.redMul(a);return this.curve.point(f,h,l,c)},f.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),f=i.redAdd(a),h=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),c=n.redMul(u).redMul(h);return this.curve.twisted?(e=n.redMul(f).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(f)):(e=n.redMul(f).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(f)),this.curve.point(c,e,r)},f.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},f.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},f.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},f.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},function(t,e,r){"use strict";e.sha1=r(307),e.sha224=r(308),e.sha256=r(189),e.sha384=r(309),e.sha512=r(190)},function(t,e,r){"use strict";var n=r(43),i=r(85),o=r(188),s=n.rotl32,a=n.sum32,u=n.sum32_5,f=o.ft_1,h=i.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,h),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],h=this.h[2],l=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var d=~~(n/20),m=u(s(i,5),f(d,o,h,l),p,r[n],c[d]);p=l,l=h,h=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],h),this.h[3]=a(this.h[3],l),this.h[4]=a(this.h[4],p)},l.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(43),i=r(189);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,e,r){"use strict";var n=r(43),i=r(190);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,e,r){"use strict";var n=r(43),i=r(85),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,f=i.BlockHash;function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(h,f),e.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],f=this.h[3],h=this.h[4],g=r,b=n,v=i,w=f,k=h,M=0;M<80;M++){var x=s(o(u(r,c(M,n,i,f),t[d[M]+e],l(M)),y[M]),h);r=h,h=f,f=o(i,10),i=n,n=x,x=s(o(u(g,c(79-M,b,v,w),t[m[M]+e],p(M)),_[M]),k),g=k,k=w,w=o(v,10),v=b,b=x}x=a(this.h[1],i,w),this.h[1]=a(this.h[2],f,k),this.h[2]=a(this.h[3],h,g),this.h[3]=a(this.h[4],r,b),this.h[4]=a(this.h[0],n,v),this.h[0]=x},h.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[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]},function(t,e,r){"use strict";var n=r(43),i=r(34);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,r){"use strict";var n=r(55),i=r(314),o=r(35),s=r(128),a=r(124),u=o.assert,f=r(315),h=r(316);function c(t){if(!(this instanceof c))return new c(t);"string"==typeof t&&(u(s.hasOwnProperty(t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=c,c.prototype.keyPair=function(t){return new f(this,t)},c.prototype.keyFromPrivate=function(t,e){return f.fromPrivate(this,t,e)},c.prototype.keyFromPublic=function(t,e){return f.fromPublic(this,t,e)},c.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),u=t.toArray("be",s),f=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new n(1)),l=0;;l++){var p=o.k?o.k(l):new n(f.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(c)>=0)){var d=this.g.mul(p);if(!d.isInfinity()){var m=d.getX(),y=m.umod(this.n);if(0!==y.cmpn(0)){var _=p.invm(this.n).mul(y.mul(e.getPrivate()).iadd(t));if(0!==(_=_.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==m.cmp(y)?2:0);return o.canonical&&_.cmp(this.nh)>0&&(_=this.n.sub(_),g^=1),new h({r:y,s:_,recoveryParam:g})}}}}}},c.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new h(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),f=u.mul(t).umod(this.n),c=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,r.getPublic(),c)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,r.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,"The recovery param is more than two bits"),e=new h(e,i);var o=this.n,s=new n(t),a=e.r,f=e.s,c=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var p=e.r.invm(o),d=o.sub(s).mul(p).umod(o),m=f.mul(p).umod(o);return this.g.mulAdd(d,a,m)},c.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new h(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(t,e,r){"use strict";var n=r(129),i=r(186),o=r(34);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},function(t,e,r){"use strict";var n=r(55),i=r(35).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,r){"use strict";var n=r(55),i=r(35),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s];return e.place=s,i}function f(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function h(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;if(u(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var o=u(t,r),s=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var f=u(t,r);if(t.length!==f+r.place)return!1;var h=t.slice(r.place,f+r.place);return 0===s[0]&&128&s[1]&&(s=s.slice(1)),0===h[0]&&128&h[1]&&(h=h.slice(1)),this.r=new n(s),this.s=new n(h),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=f(e),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];h(n,e.length),(n=n.concat(e)).push(2),h(n,r.length);var o=n.concat(r),s=[48];return h(s,o.length),s=s.concat(o),i.encode(s,t)}},function(t,e,r){"use strict";var n=r(129),i=r(128),o=r(35),s=o.assert,a=o.parseBytes,u=r(318),f=r(319);function h(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof h))return new h(t);t=i[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=h,h.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},h.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},h.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},h.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},h.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},h.prototype.makeSignature=function(t){return t instanceof f?t:new f(this,t)},h.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},h.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},h.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},h.prototype.decodeInt=function(t){return o.intFromLE(t)},h.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,r){"use strict";var n=r(35),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},function(t,e,r){"use strict";var n=r(55),i=r(35),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},function(t,e){},function(t,e,r){"use strict";var n=r(86);e.certificate=r(333);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));e.PublicKey=s;var a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=u;var f=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=f;var h=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=h,e.DSAparam=n.define("DSAparam",(function(){this.int()}));var c=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=c;var l=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(323).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,h=r;h<a;h+=n)f=u(t,h,h+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var c=1;for(f=u(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=h[t],p=c[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[o-a-1]=s}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,l=h>>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,P=0|s[7],I=8191&P,T=P>>>13,U=0|s[8],F=8191&U,O=U>>>13,C=0|s[9],L=8191&C,N=C>>>13,z=0|a[0],j=8191&z,q=z>>>13,K=0|a[1],H=8191&K,Z=K>>>13,G=0|a[2],W=8191&G,V=G>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,j))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(l,j)|0))<<13)|0;f=((o=Math.imul(l,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,j),i=(i=Math.imul(d,q))+Math.imul(m,j)|0,o=Math.imul(m,q);var _t=(f+(n=n+Math.imul(c,H)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(l,H)|0))<<13)|0;f=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,j),i=(i=Math.imul(_,q))+Math.imul(g,j)|0,o=Math.imul(g,q),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,Z)|0;var gt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,j),i=(i=Math.imul(v,q))+Math.imul(w,j)|0,o=Math.imul(w,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var bt=(f+(n=n+Math.imul(c,X)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(l,X)|0))<<13)|0;f=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,q))+Math.imul(x,j)|0,o=Math.imul(x,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,j),i=(i=Math.imul(E,q))+Math.imul(A,j)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,q))+Math.imul(R,j)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(I,j),i=(i=Math.imul(I,q))+Math.imul(T,j)|0,o=Math.imul(T,q),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,j),i=(i=Math.imul(F,q))+Math.imul(O,j)|0,o=Math.imul(O,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,j),i=(i=Math.imul(L,q))+Math.imul(N,j)|0,o=Math.imul(N,q),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,Z))+Math.imul(N,H)|0,o=Math.imul(N,Z),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,V))+Math.imul(N,W)|0,o=Math.imul(N,V),n=n+Math.imul(F,X)|0,i=(i=i+Math.imul(F,$)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(N,X)|0,o=Math.imul(N,$),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var Pt=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,lt)|0;var It=(f+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(O,dt)|0))<<13)|0;f=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=Pt,u[16]=It,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function d(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),l=67108863&c;a=67108863&(l=l+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,l=f,p=0;p<s;p++){var d=r[h+p],m=n[h+p],y=r[h+p+s],_=n[h+p+s],g=c*y-l*_;_=c*_+l*y,y=g,r[h+p]=d+y,n[h+p]=m+_,r[h+p+s]=d-y,n[h+p+s]=m-_,p!==a&&(g=u*c-f*l,l=u*l+f*c,c=g)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var p=0;p<n;p++){var d=a[p]*h[p]-u[p]*c[p];u[p]=a[p]*c[p]+u[p]*h[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(g,_),g.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,_),i(v,_),i(w,_),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return y[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<d);var _=this.pow(c,new o(1).iushln(d-y-1));l=l.redMul(_),c=_.redSqr(),p=p.redMul(c),d=y}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,k),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(40)(t))},function(t,e){},function(t,e,r){var n=r(86),i=r(13);function o(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new o(t,e)},o.prototype._createNamed=function(t){var e;try{e=r(325).runInThisContext("(function "+this.name+"(entity) {\n  this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},o.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},o.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},function(module,exports){var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(t),(function(e){r[e]=t[e]})),forEach(globals,(function(e){t[e]&&(r[e]=t[e])}));var o=Object_keys(r),s=n.call(r,this.code);return forEach(Object_keys(r),(function(e){(e in t||-1===indexOf(o,e))&&(t[e]=r[e])})),forEach(globals,(function(e){e in t||defineProp(t,e,r[e])})),document.body.removeChild(e),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),(function(r){t[r]=e[r]})),r},forEach(Object_keys(Script.prototype),(function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}})),exports.isContext=function(t){return t instanceof Context},exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),(function(r){e[r]=t[r]})),e}},function(t,e,r){var n=r(13);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,r){var n=r(87).Reporter,i=r(87).EncoderBuffer,o=r(87).DecoderBuffer,s=r(34),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function f(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=f;var h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){var t=this._baseState,e={};h.forEach((function(r){e[r]=t[r]}));var r=new this.constructor(e.parent);return r._baseState=e,r},f.prototype._wrap=function(){var t=this._baseState;u.forEach((function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},f.prototype._init=function(t){var e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),s.equal(e.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(t){var e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){f.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),a.forEach((function(t){f.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}})),f.prototype.use=function(t){s(t);var e=this._baseState;return s(null===e.use),e.use=t,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(t){var e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},f.prototype.explicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},f.prototype.implicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},f.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},f.prototype.key=function(t){var e=this._baseState;return s(null===e.key),e.key=t,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(t){var e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},f.prototype.contains=function(t){var e=this._baseState;return s(null===e.use),e.contains=t,this},f.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(s=this._peekTag(t,u,r.any),t.isError(s))return s}else{var f=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(f)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){var h=this._decodeTag(t,r.explicit);if(t.isError(h))return h;t=h}var c=t.offset;if(null===r.use&&null===r.choice){if(r.any)f=t.save();var l=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(l))return l;r.any?i=t.raw(f):t=l}if(e&&e.track&&null!==r.tag&&e.track(t.path(),c,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(p,e)}}return r.obj&&s&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},f.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},f.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},f.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var s=t.save(),a=r.choice[o];try{var u=a._decode(t,e);if(t.isError(u))return!1;n={type:o,value:u},i=!0}catch(e){return t.restore(s),!1}return!0}),this),i?n:t.error("Choice not matched")},f.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},f.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},f.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var s=null,a=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)s=this._getUse(i.contains,r)._encode(t,e),a=!0;else if(i.children)s=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var n=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i}),this).filter((function(t){return t})),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),u))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(s=this._encodePrimitive(i.tag,t),a=!0);if(!i.any&&null===i.choice){var f=null!==i.implicit?i.implicit:i.tag,h=null===i.implicit?"universal":"context";null===f?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(f,a,h,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},f.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},f.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},f.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},f.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},function(t,e,r){var n=r(193);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=n._reverse(e.tag)},function(t,e,r){var n=e;n.der=r(194),n.pem=r(330)},function(t,e,r){var n=r(13),i=r(12).Buffer,o=r(194);function s(t){o.call(this,t),this.enc="pem"}n(s,o),t.exports=s,s.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,u=-1,f=0;f<r.length;f++){var h=r[f].match(s);if(null!==h&&h[2]===n){if(-1!==a){if("END"!==h[1])break;u=f;break}if("BEGIN"!==h[1])break;a=f}}if(-1===a||-1===u)throw new Error("PEM section not found for: "+n);var c=r.slice(a+1,u).join("");c.replace(/[^a-z0-9\+\/=]+/gi,"");var l=new i(c,"base64");return o.prototype.decode.call(this,l,e)}},function(t,e,r){var n=e;n.der=r(195),n.pem=r(332)},function(t,e,r){var n=r(13),i=r(195);function o(t){i.call(this,t),this.enc="pem"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){for(var r=i.prototype.encode.call(this,t).toString("base64"),n=["-----BEGIN "+e.label+"-----"],o=0;o<r.length;o+=64)n.push(r.slice(o,o+64));return n.push("-----END "+e.label+"-----"),n.join("\n")}},function(t,e,r){"use strict";var n=r(86),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),f=n.define("RDNSequence",(function(){this.seqof(u)})),h=n.define("Name",(function(){this.choice({rdnSequence:this.use(f)})})),c=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),l=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),p=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(h),this.key("validity").use(c),this.key("subject").use(h),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),d=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=d},function(t){t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(t,e,r){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,s=r(98),a=r(122),u=r(18).Buffer;t.exports=function(t,e){var r,f=t.toString(),h=f.match(n);if(h){var c="aes"+h[1],l=u.from(h[2],"hex"),p=u.from(h[3].replace(/[\r\n]/g,""),"base64"),d=s(e,l.slice(0,8),parseInt(h[1],10)).key,m=[],y=a.createDecipheriv(c,d,l);m.push(y.update(p)),m.push(y.final()),r=u.concat(m)}else{var _=f.match(o);r=new u(_[2].replace(/[\r\n]/g,""),"base64")}return{tag:f.match(i)[1],data:r}}},function(t,e,r){var n=r(18).Buffer,i=r(191),o=r(127).ec,s=r(100),a=r(196);function u(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,e,r,f,h){var c=s(r);if("ec"===c.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(t,e,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(e,t,s)}(t,e,c)}if("dsa"===c.type){if("dsa"!==f)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,o=r.data.q,a=r.data.g,f=r.data.pub_key,h=s.signature.decode(t,"der"),c=h.s,l=h.r;u(c,o),u(l,o);var p=i.mont(n),d=c.invm(o);return 0===a.toRed(p).redPow(new i(e).mul(d).mod(o)).fromRed().mul(f.toRed(p).redPow(l.mul(d).mod(o)).fromRed()).mod(n).mod(o).cmp(l)}(t,e,c)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");e=n.concat([h,e]);for(var l=c.modulus.byteLength(),p=[1],d=0;e.length+p.length+2<l;)p.push(255),d++;p.push(0);for(var m=-1;++m<e.length;)p.push(e[m]);p=n.from(p);var y=i.mont(c.modulus);t=(t=new i(t).toRed(y)).redPow(new i(c.publicExponent)),t=n.from(t.fromRed().toArray());var _=d<8?1:0;for(l=Math.min(t.length,p.length),t.length!==p.length&&(_=1),m=-1;++m<l;)_|=t[m]^p[m];return 0===_}},function(t,e,r){(function(e){var n=r(127),i=r(338);t.exports=function(t){return new s(t)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(t){this.curveType=o[t],this.curveType||(this.curveType={name:t}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function a(t,r,n){Array.isArray(t)||(t=t.toArray());var i=new e(t);if(n&&i.length<n){var o=new e(n-i.length);o.fill(0),i=e.concat([o,i])}return r?i.toString(r):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,s.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},s.prototype.computeSecret=function(t,r,n){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),a(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},s.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),a(r,t)},s.prototype.getPrivateKey=function(t){return a(this.keys.getPrivate(),t)},s.prototype.setPublicKey=function(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this.keys._importPublic(t),this},s.prototype.setPrivateKey=function(t,r){r=r||"utf8",e.isBuffer(t)||(t=new e(t,r));var n=new i(t);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}}).call(this,r(12).Buffer)},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(339).Buffer}catch(t){}function a(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o<i;o++){var s=t.charCodeAt(o)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,h=r;h<a;h+=n)f=u(t,h,h+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var c=1;for(f=u(t,h,t.length,e),h=0;h<s;h++)c*=e;this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var f=1;f<n;f++){for(var h=u>>>26,c=67108863&u,l=Math.min(f,e.length-1),p=Math.max(0,f-t.length+1);p<=l;p++){var d=f-p|0;h+=(s=(i=0|t.words[d])*(o=0|e.words[p])+c)/67108864|0,c=67108863&s}r.words[f]=0|c,u=0|h}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!==(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=h[t],p=c[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),f[o-a-1]=s}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,f=0,h=0|s[0],c=8191&h,l=h>>>13,p=0|s[1],d=8191&p,m=p>>>13,y=0|s[2],_=8191&y,g=y>>>13,b=0|s[3],v=8191&b,w=b>>>13,k=0|s[4],M=8191&k,x=k>>>13,S=0|s[5],E=8191&S,A=S>>>13,B=0|s[6],D=8191&B,R=B>>>13,P=0|s[7],I=8191&P,T=P>>>13,U=0|s[8],F=8191&U,O=U>>>13,C=0|s[9],L=8191&C,N=C>>>13,z=0|a[0],j=8191&z,q=z>>>13,K=0|a[1],H=8191&K,Z=K>>>13,G=0|a[2],W=8191&G,V=G>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ht=0|a[8],ct=8191&ht,lt=ht>>>13,pt=0|a[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(f+(n=Math.imul(c,j))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(l,j)|0))<<13)|0;f=((o=Math.imul(l,q))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,j),i=(i=Math.imul(d,q))+Math.imul(m,j)|0,o=Math.imul(m,q);var _t=(f+(n=n+Math.imul(c,H)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(l,H)|0))<<13)|0;f=((o=o+Math.imul(l,Z)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(_,j),i=(i=Math.imul(_,q))+Math.imul(g,j)|0,o=Math.imul(g,q),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,Z)|0;var gt=(f+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,V)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(v,j),i=(i=Math.imul(v,q))+Math.imul(w,j)|0,o=Math.imul(w,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(g,H)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var bt=(f+(n=n+Math.imul(c,X)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(l,X)|0))<<13)|0;f=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,j),i=(i=Math.imul(M,q))+Math.imul(x,j)|0,o=Math.imul(x,q),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,V)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0;var vt=(f+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,j),i=(i=Math.imul(E,q))+Math.imul(A,j)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,V)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(f+(n=n+Math.imul(c,rt)|0)|0)+((8191&(i=(i=i+Math.imul(c,nt)|0)+Math.imul(l,rt)|0))<<13)|0;f=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(D,j),i=(i=Math.imul(D,q))+Math.imul(R,j)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,V)|0,n=n+Math.imul(v,X)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(f+(n=n+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,st)|0)+Math.imul(l,ot)|0))<<13)|0;f=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(I,j),i=(i=Math.imul(I,q))+Math.imul(T,j)|0,o=Math.imul(T,q),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var Mt=(f+(n=n+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(l,ut)|0))<<13)|0;f=((o=o+Math.imul(l,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,j),i=(i=Math.imul(F,q))+Math.imul(O,j)|0,o=Math.imul(O,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0;var xt=(f+(n=n+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(l,ct)|0))<<13)|0;f=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,j),i=(i=Math.imul(L,q))+Math.imul(N,j)|0,o=Math.imul(N,q),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,st)|0,n=n+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ft)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ft)|0,n=n+Math.imul(d,ct)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0;var St=(f+(n=n+Math.imul(c,dt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(l,dt)|0))<<13)|0;f=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,Z))+Math.imul(N,H)|0,o=Math.imul(N,Z),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(w,ut)|0,o=o+Math.imul(w,ft)|0,n=n+Math.imul(_,ct)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(g,ct)|0,o=o+Math.imul(g,lt)|0;var Et=(f+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;f=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,V))+Math.imul(N,W)|0,o=Math.imul(N,V),n=n+Math.imul(F,X)|0,i=(i=i+Math.imul(F,$)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ft)|0,n=n+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,lt)|0;var At=(f+(n=n+Math.imul(_,dt)|0)|0)+((8191&(i=(i=i+Math.imul(_,mt)|0)+Math.imul(g,dt)|0))<<13)|0;f=((o=o+Math.imul(g,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(N,X)|0,o=Math.imul(N,$),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(M,ct)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(x,ct)|0,o=o+Math.imul(x,lt)|0;var Bt=(f+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(w,dt)|0))<<13)|0;f=((o=o+Math.imul(w,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,tt))+Math.imul(N,Q)|0,o=Math.imul(N,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ft)|0,n=n+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,lt)|0;var Dt=(f+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(x,dt)|0))<<13)|0;f=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(N,rt)|0,o=Math.imul(N,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ft)|0,n=n+Math.imul(D,ct)|0,i=(i=i+Math.imul(D,lt)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0;var Rt=(f+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,dt)|0))<<13)|0;f=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(N,ot)|0,o=Math.imul(N,st),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,n=n+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0;var Pt=(f+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;f=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ft))+Math.imul(N,ut)|0,o=Math.imul(N,ft),n=n+Math.imul(F,ct)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,lt)|0;var It=(f+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,dt)|0))<<13)|0;f=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,ct),i=(i=Math.imul(L,lt))+Math.imul(N,ct)|0,o=Math.imul(N,lt);var Tt=(f+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(O,dt)|0))<<13)|0;f=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Ut=(f+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(N,dt)|0))<<13)|0;return f=((o=Math.imul(N,mt))+(i>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=yt,u[1]=_t,u[2]=gt,u[3]=bt,u[4]=vt,u[5]=wt,u[6]=kt,u[7]=Mt,u[8]=xt,u[9]=St,u[10]=Et,u[11]=At,u[12]=Bt,u[13]=Dt,u[14]=Rt,u[15]=Pt,u[16]=It,u[17]=Tt,u[18]=Ut,0!==f&&(u[19]=f,r.length++),r};function d(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var h=o-f,c=(0|t.words[h])*(0|e.words[f]),l=67108863&c;a=67108863&(l=l+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},m.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},m.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=u,l=f,p=0;p<s;p++){var d=r[h+p],m=n[h+p],y=r[h+p+s],_=n[h+p+s],g=c*y-l*_;_=c*_+l*y,y=g,r[h+p]=d+y,n[h+p]=m+_,r[h+p+s]=d-y,n[h+p+s]=m-_,p!==a&&(g=u*c-f*l,l=u*l+f*c,c=g)}},m.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},m.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},m.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),c=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,f,n),this.transform(s,o,a,u,n,i),this.transform(f,o,h,c,n,i);for(var p=0;p<n;p++){var d=a[p]*h[p]-u[p]*c[p];u[p]=a[p]*c[p]+u[p]*h[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var h=0;for(f=this.length-1;f>=0&&(0!==h||f>=i);f--){var c=0|this.words[f];this.words[f]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,u);0===h.negative&&(n=h,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var l=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,c);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(g,_),g.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,_),i(v,_),i(w,_),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new b;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return y[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var m=p,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<d);var _=this.pow(c,new o(1).iushln(d-y-1));l=l.redMul(_),c=_.redSqr(),p=p.redMul(c),d=y}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],h=u-1;h>=0;h--){var c=f>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==s?(s<<=1,s|=c,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,k),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(40)(t))},function(t,e){},function(t,e,r){e.publicEncrypt=r(341),e.privateDecrypt=r(343),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},function(t,e,r){var n=r(100),i=r(67),o=r(80),s=r(197),a=r(198),u=r(130),f=r(199),h=r(126),c=r(18).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var p,d=n(t);if(4===l)p=function(t,e){var r=t.modulus.byteLength(),n=e.length,f=o("sha1").update(c.alloc(0)).digest(),h=f.length,l=2*h;if(n>r-l-2)throw new Error("message too long");var p=c.alloc(r-n-l-2),d=r-h-1,m=i(h),y=a(c.concat([f,p,c.alloc(1,1),e],d),s(m,d)),_=a(m,s(y,h));return new u(c.concat([c.alloc(1),_,y],r))}(d,e);else if(1===l)p=function(t,e,r){var n,o=e.length,s=t.modulus.byteLength();if(o>s-11)throw new Error("message too long");n=r?c.alloc(s-o-3,255):function(t){var e,r=c.allocUnsafe(t),n=0,o=i(2*t),s=0;for(;n<t;)s===o.length&&(o=i(2*t),s=0),(e=o[s++])&&(r[n++]=e);return r}(s-o-3);return new u(c.concat([c.from([0,r?1:2]),n,c.alloc(1),e],s))}(d,e,r);else{if(3!==l)throw new Error("unknown padding");if((p=new u(e)).cmp(d.modulus)>=0)throw new Error("data too long for modulus")}return r?h(p,d):f(p,d)}},function(t,e){},function(t,e,r){var n=r(100),i=r(197),o=r(198),s=r(130),a=r(126),u=r(80),f=r(199),h=r(18).Buffer;t.exports=function(t,e,r){var c;c=t.padding?t.padding:r?1:4;var l,p=n(t),d=p.modulus.byteLength();if(e.length>d||new s(e).cmp(p.modulus)>=0)throw new Error("decryption error");l=r?f(new s(e),p):a(e,p);var m=h.alloc(d-l.length);if(l=h.concat([m,l],d),4===c)return function(t,e){var r=t.modulus.byteLength(),n=u("sha1").update(h.alloc(0)).digest(),s=n.length;if(0!==e[0])throw new Error("decryption error");var a=e.slice(1,s+1),f=e.slice(s+1),c=o(a,i(f,s)),l=o(f,i(c,r-s-1));if(function(t,e){t=h.from(t),e=h.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));var i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(n,l.slice(0,s)))throw new Error("decryption error");var p=s;for(;0===l[p];)p++;if(1!==l[p++])throw new Error("decryption error");return l.slice(p)}(p,l);if(1===c)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var s=e.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,l,r);if(3===c)return l;throw new Error("unknown padding")}},function(t,e,r){"use strict";(function(t,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(18),s=(r(67),o.Buffer),a=o.kMaxLength,u=t.crypto||t.msCrypto,f=Math.pow(2,32)-1;function h(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>a||t>e)throw new RangeError("offset out of range")}function c(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>a)throw new RangeError("buffer too small")}function l(t,e,r,i){var o=t.buffer,s=new Uint8Array(o,e,r);return u.getRandomValues(s),i?void n.nextTick((function(){i(null,t)})):t}u&&u.getRandomValues?(e.randomFill=function(e,r,n,i){if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(r,e.length),c(n,r,e.length),l(e,r,n,i)},e.randomFillSync=function(e,r,n){void 0===r&&(r=0);if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(r,e.length),void 0===n&&(n=e.length-r);return c(n,r,e.length),l(e,r,n)}):(e.randomFill=i,e.randomFillSync=i)}).call(this,r(24),r(19))},,function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){var n=r(786).engine;let i;for(var o in i=r(n?1319:1318),i)e[o]=i[o]},,,,,,,,,,,,,,,function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(400),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(24))},,,function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;s=r(36),i=r(367).SHA512,n=r(527).SHA256,u=r(139),t=function(){function t(t,e){var r,n,o;for(null==e&&(e=i),this.key=t.clone(),this.hasher=new e,this.hasherBlockSize=this.hasher.blockSize,this.hasherBlockSizeBytes=4*this.hasherBlockSize,this.key.sigBytes>this.hasherBlockSizeBytes&&(this.key=this.hasher.finalize(this.key)),this.key.clamp(),this._oKey=this.key.clone(),this._iKey=this.key.clone(),r=n=0,o=this.hasherBlockSize;0<=o?n<o:n>o;r=0<=o?++n:--n)this._oKey.words[r]^=1549556828,this._iKey.words[r]^=909522486;this._oKey.sigBytes=this._iKey.sigBytes=this.hasherBlockSizeBytes,this.reset()}return t.outputSize=64,t.prototype.outputSize=t.outputSize,t.prototype.get_output_size=function(){return this.hasher.output_size},t.prototype.reset=function(){return this.hasher.reset().update(this._iKey)},t.prototype.update=function(t){return this.hasher.update(t),this},t.prototype.finalize=function(t){var e,r,n;return e=this.hasher.finalize(t),this.hasher.reset(),r=this._oKey.clone().concat(e),n=this.hasher.finalize(r),e.scrub(),r.scrub(),n},t.prototype.scrub=function(){return this.key.scrub(),this._iKey.scrub(),this._oKey.scrub()},t}(),a=function(e){var r,n,i,o,s;return o=e.key,i=e.input,n=e.hash_class,s=(r=new t(o,n)).finalize(i.clamp()),r.scrub(),s},o=function(e,r){var n,i,o,a,f,h,c,l,p,d,m;d=s.findDeferral(arguments),a=e.key,o=e.input,h=e.progress_hook,f=e.klass,p=e.what,n=e.combine_klasses,f||(f=t),p||(p="hmac_sha512"),i=new f(a,n),o.clamp(),l={update:function(t,e){return i.update(o.slice(t,e))},finalize:function(){return i.finalize()},default_n:1e3*i.hasherBlockSize},function(t){m=new s.Deferrals(t,{parent:d,filename:"/Users/max/src/keybase/triplesec/src/hmac.iced"}),u.bulk(o.sigBytes,l,{what:p,progress_hook:h,cb:m.defer({assign_fn:function(){return c=arguments[0]},lineno:137})}),m._fulfill()}((function(){return i.scrub(),r(c)}))},e.HMAC_SHA256=function(t){function e(t){e.__super__.constructor.call(this,t,n)}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e}(t),e.HMAC=t,e.sign=a,e.bulk_sign=o}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;u=r(91),o=u.X64Word,s=u.X64WordArray,n=r(200).Hasher,t=function(){function t(){this.K=this.convert([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]),this.I=new s(this.convert([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])),this.W=function(){var t,e;for(e=[],t=0;t<80;++t)e.push(new o(0,0));return e}()}return t.convert=function(t){var e,r,n,i;for(i=[],e=r=0,n=t.length;r<n;e=r+=2)i.push(new o(t[e],t[e+1]));return i},t.prototype.convert=function(e){return t.convert(e)},t}(),e.Global=t,a=new t,e.SHA512=i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.blockSize=32,e.prototype.blockSize=e.blockSize,e.output_size=64,e.prototype.output_size=e.output_size,e.prototype._doReset=function(){return this._hash=a.I.clone()},e.prototype._doProcessBlock=function(t,e){var r,n,i,o,s,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P,I,T,U,F,O,C,L,N,z,j,q,K,H,Z,G,W,V,Y,X,$,J,Q,tt,et,rt,nt,it,ot,st,at,ut,ft,ht,ct,lt,pt,dt,mt,yt,_t,gt,bt;for(r=this._hash.words,R=a.W,n=r[0],s=r[1],h=r[2],p=r[3],y=r[4],b=r[5],k=r[6],S=r[7],C=i=n.high,L=o=n.low,N=u=s.high,z=f=s.low,j=c=h.high,H=l=h.low,Z=d=p.high,G=m=p.low,W=_=y.high,V=g=y.low,Y=v=b.high,X=w=b.low,at=M=k.high,ut=x=k.low,ft=E=S.high,ht=A=S.low,ct=bt=0;bt<80;ct=++bt)P=R[ct],ct<16?(F=P.high=0|t[e+2*ct],O=P.low=0|t[e+2*ct+1]):($=((tt=(Q=R[ct-15]).high)>>>1|(et=Q.low)<<31)^(tt>>>8|et<<24)^tt>>>7,J=(et>>>1|tt<<31)^(et>>>8|tt<<24)^(et>>>7|tt<<25),rt=((ot=(it=R[ct-2]).high)>>>19|(st=it.low)<<13)^(ot<<3|st>>>29)^ot>>>6,nt=(st>>>19|ot<<13)^(st<<3|ot>>>29)^(st>>>6|ot<<26),F=(F=(F=$+(U=R[ct-7]).high+((O=J+U.low)>>>0<J>>>0?1:0))+rt+((O+=nt)>>>0<nt>>>0?1:0))+(I=R[ct-16]).high+((O+=T=I.low)>>>0<T>>>0?1:0),P.high=F,P.low=O),q=W&Y^~W&at,K=V&X^~V&ut,lt=C&N^C&j^N&j,pt=L&z^L&H^z&H,dt=(C>>>28|L<<4)^(C<<30|L>>>2)^(C<<25|L>>>7),mt=(L>>>28|C<<4)^(L<<30|C>>>2)^(L<<25|C>>>7),yt=ft+((W>>>14|V<<18)^(W>>>18|V<<14)^(W<<23|V>>>9))+((_t=ht+((V>>>14|W<<18)^(V>>>18|W<<14)^(V<<23|W>>>9)))>>>0<ht>>>0?1:0),ft=at,ht=ut,at=Y,ut=X,Y=W,X=V,W=Z+(yt=(yt=(yt=yt+q+((_t+=K)>>>0<K>>>0?1:0))+(B=a.K[ct]).high+((_t+=D=B.low)>>>0<D>>>0?1:0))+F+((_t+=O)>>>0<O>>>0?1:0))+((V=G+_t|0)>>>0<G>>>0?1:0)|0,Z=j,G=H,j=N,H=z,N=C,z=L,C=yt+(dt+lt+((gt=mt+pt)>>>0<mt>>>0?1:0))+((L=_t+gt|0)>>>0<_t>>>0?1:0)|0;return o=n.low=o+L,n.high=i+C+(o>>>0<L>>>0?1:0),f=s.low=f+z,s.high=u+N+(f>>>0<z>>>0?1:0),l=h.low=l+H,h.high=c+j+(l>>>0<H>>>0?1:0),m=p.low=m+G,p.high=d+Z+(m>>>0<G>>>0?1:0),g=y.low=g+V,y.high=_+W+(g>>>0<V>>>0?1:0),w=b.low=w+X,b.high=v+Y+(w>>>0<X>>>0?1:0),x=k.low=x+ut,k.high=M+at+(x>>>0<ut>>>0?1:0),A=S.low=A+ht,S.high=E+ft+(A>>>0<ht>>>0?1:0)},e.prototype._doFinalize=function(){var t,e,r;return t=this._data.words,r=8*this._nDataBytes,t[(e=8*this._data.sigBytes)>>>5]|=128<<24-e%32,t[30+(e+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(e+128>>>10<<5)]=r,this._data.sigBytes=4*t.length,this._process(),this._hash.toX32()},e.prototype.copy_to=function(t){return e.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(n),e.transform=function(t){var e;return e=(new i).finalize(t),t.scrub(),e}}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P,I,T,U,F,O,C,L,N,z,j,q,K,H,Z,G,W,V,Y,X,$,J,Q,tt,et,rt={}.hasOwnProperty,nt=function(t,e){for(var r in e)rt.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};W=r(36),J=function(){},y=r(218).Packet,n=r(41).openpgp,D=n.sig_subpacket,Q=r(417),G=Q.encode_length,Q.make_time_packet,tt=r(56),$=tt.unix_time,X=tt.uint_to_buffer,Z=tt.bufeq_secure,et=r(113),q=et.alloc_or_throw,P=et.SHA512,R=et.SHA1,H=r(369),r(76),Y=r(450),K=r(138),L=r(235).SlicerBuffer,V=r(73).make_esc,F=function(e){function r(t){this.key=t.key,this.hasher=t.hasher,this.key_id=t.key_id,this.sig_data=t.sig_data,this.public_key_class=t.public_key_class,this.signed_hash_value_hash=t.signed_hash_value_hash,this.time=t.time,this.sig=t.sig,this.type=t.type,this.version=t.version,null==this.hasher&&(this.hasher=P),this._framed_output=null}return nt(r,e),r.prototype.is_signature=function(){return!0},r.prototype.get_key_id=function(){return this.key_id},r.prototype.get_key_flags=function(){return 0},r.prototype.get_key_expires=function(){return 0},r.prototype.get_issuer_key_id=function(){return this.key_id},r.prototype.get_issuer_fingerprint=function(){return null},r.prototype.when_generated=function(){return this.time},r.prototype.time_of_primary_uid_sig=function(){return null},r.prototype.gen_prefix=function(){return t.concat([t.from([n.versions.signature.V3,this.type],X(32,this.time),this.key_id,t.from([this.key.type,this.hasher.type]))])},r.prototype.prepare_payload=function(e){var r,n;return(r=function(){var t,r,i;for(i=[],t=0,r=e.length;t<r;t++)n=e[t],i.push(n.to_signature_payload());return i}()).push(t.from([this.type]),X(32,this.time)),t.concat(r)},r.prototype.verify=function(t,e){var r,i,o,s,a,u,f,h,c,l,p;c=W.findDeferral(arguments),i=n.sig_types,r=Y.SubkeyBinding,this.type===i.subkey_binding&&(t=[this.primary].concat(t)),u=this.prepare_payload(t),a=this.hasher(u),f=new L(a),h=f.read_uint16(),(p=this,function(e){if(h!==(o=p.signed_hash_value_hash))return e(s=new Error("quick hash check failed: "+h+" != "+o));!function(t){l=new W.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/signature.iced",funcname:"Signature_v2_or_v3.verify"}),p.key.verify_unpad_and_check_hash({hash:a,hasher:p.hasher,sig:p.sig},l.defer({assign_fn:function(){return s=arguments[0]},lineno:86})),l._fulfill()}((function(){var n,o,a,u,f;if(null!=s);else if((f=p.type)===i.binary_doc||f===i.canonical_text)for(n=0,a=t.length;n<a;n++)t[n].push_sig(new Y.Data({sig:p}));else if(p.type===i.subkey_binding)for(o=0,u=t.length;o<u;o++)t[o].push_sig(new r({primary:p.primary,sig:p,direction:r.DOWN}));return e()}))})((function(){return e(s)}))},r}(y),U=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return nt(e,t),e}(F),O=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return nt(e,t),e}(F),I=function(e){function r(t){this.key=t.key,this.hasher=t.hasher,this.key_id=t.key_id,this.sig_data=t.sig_data,this.public_key_class=t.public_key_class,this.signed_hash_value_hash=t.signed_hash_value_hash,this.hashed_subpackets=t.hashed_subpackets,this.time=t.time,this.sig=t.sig,this.type=t.type,this.unhashed_subpackets=t.unhashed_subpackets,this.version=t.version,null==this.hasher&&(this.hasher=P),null==this.hashed_subpackets&&(this.hashed_subpackets=[]),null==this.unhashed_subpackets&&(this.unhashed_subpackets=[]),this.subpacket_index=this._make_subpacket_index(),this._framed_output=null}return nt(r,e),r.prototype.get_key_id=function(){var t;return this.key_id?this.key_id:null!=(t=this.subpacket_index.all[D.issuer])?t.id:void 0},r.prototype._make_subpacket_index=function(){var t,e,r,n,i,o,s,a;for(e={hashed:{},unhashed:{},all:{}},r=0,i=(s=this.hashed_subpackets).length;r<i;r++)t=s[r],e.hashed[t.type]=t,e.all[t.type]=t;for(n=0,o=(a=this.unhashed_subpackets).length;n<o;n++)t=a[n],e.unhashed[t.type]=t,e.all[t.type]=t;return e},r.prototype.prepare_payload=function(e){var r,i,o,s,a;return r=t.concat(function(){var t,e,r,n;for(n=[],t=0,e=(r=this.hashed_subpackets).length;t<e;t++)s=r[t],n.push(s.to_buffer());return n}.call(this)),o=t.concat([t.from([n.versions.signature.V4,this.type,this.key.type,this.hasher.type]),X(16,r.length),r]),a=t.concat([t.from([n.versions.signature.V4,255]),X(32,o.length)]),{prefix:o,payload:i=t.concat([e,o,a]),hvalue:this.hasher(i)}},r.prototype.write_unframed=function(e,r){var n,i,o,s,a,u,f,h,c,l,p,d,m;l=W.findDeferral(arguments),n=V(r,"write_unframed"),c=t.concat(function(){var t,e,r,n;for(n=[],t=0,e=(r=this.unhashed_subpackets).length;t<e;t++)f=r[t],n.push(f.to_buffer());return n}.call(this)),d=this.prepare_payload(e),s=d.prefix,o=d.payload,i=d.hvalue,(m=this,function(t){p=new W.Deferrals(t,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/signature.iced",funcname:"Signature.write_unframed"}),m.key.pad_and_sign(o,{hasher:m.hasher},n(p.defer({assign_fn:function(){return h=arguments[0]},lineno:168}))),p._fulfill()})((function(){return a=t.concat([X(16,c.length),c,t.from([i.readUInt8(0),i.readUInt8(1)]),h]),u=t.concat([s,a]),r(null,u)}))},r.prototype.write=function(t,e){var r,i,o,s,a,u;s=W.findDeferral(arguments),(u=this,function(e){a=new W.Deferrals(e,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/signature.iced",funcname:"Signature.write"}),u.write_unframed(t,a.defer({assign_fn:function(){return r=arguments[0],o=arguments[1]},lineno:181})),a._fulfill()})(function(t){return function(){return null==r&&(t._framed_output=i=t.frame_packet(n.packet_tags.signature,o)),e(r,i)}}(this))},r.prototype.get_framed_output=function(){return this._framed_output||this.replay()},r.parse=function(t){return new _(t).parse()},r.prototype.extract_key=function(t){var e,r,n,i;for(i=[],r=0,n=t.length;r<n;r++){if(null!=(e=t[r]).key){this.key=e.key;break}i.push(void 0)}return i},r.prototype.verify=function(t,e,r){var i,o,s,a,u,f,h;if(J,u=W.findDeferral(arguments),i=null!=r&&"function"==typeof r.assert_pgp_hash?r.assert_pgp_hash(this.hasher,this):void 0)return e(i);(h=this,function(e){f=new W.Deferrals(e,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/signature.iced",funcname:"Signature.verify"}),h._verify(t,f.defer({assign_fn:function(){return i=arguments[0]},lineno:213}),r),f._fulfill()})(function(h){return function(){var c,l,p,d;p=h.unhashed_subpackets,l=p.length,c=0,(d=function(e){var m,y,_;return m=e,_=y=function(){return W.trampoline((function(){return++c,d(e)}))},c<l?(o=p[c],null!=i||null==(s=o.to_sig())?y():void function(e){if(s.type!==n.sig_types.primary_binding)return e(i=new Error("unknown subpacket signature type: "+s.type));!function(e){if(1!==t.length)return e(i=new Error("Needed 1 data packet for a primary_binding signature"));a=t[0],s.parent=h,s.primary=h.primary,s.key=a.key,function(t){f=new W.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/signature.iced",funcname:"Signature.verify"}),s._verify([a],f.defer({assign_fn:function(){return i=arguments[0]},lineno:224}),r),f._fulfill()}(e)}(e)}(_)):m()})((function(){return e(i)}))}}(this))},r.prototype._verify=function(e,r,i){var o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x;k=W.findDeferral(arguments),h=null,s=n.sig_types,b=null,this.data_packets=function(){switch(this.type){case s.binary_doc:case s.canonical_text:return e;case s.issuer:case s.persona:case s.casual:case s.positive:case s.certificate_revocation:case s.key_revocation:return(d=e.length)>1?(h=new Error("Only expecting one (or no) UserID-style packet(s) in a self-sig (got "+d+")"),[]):[this.primary].concat(e);case s.subkey_binding:case s.primary_binding:case s.subkey_revocation:return m=[],1!==e.length?h=new Error("Wrong number of data packets; expected only 1"):null==this.primary?h=new Error("Need a primary key for subkey signature"):(b=e[0],m=[this.primary,b]),m;case s.direct:return[this.primary].concat(e);default:return h=new Error("cannot verify sigtype "+this.type),[]}}.call(this),(x=this,function(e){var r;if(null!=h||x.is_third_party&&x.type===s.key_revocation)return e();a=function(){var t,e,r,n;for(n=[],t=0,e=(r=this.data_packets).length;t<e;t++)f=r[t],n.push(f.to_signature_payload());return n}.call(x),u=t.concat(a),r=x.prepare_payload(u),r.payload,l=r.hvalue,function(t){M=new W.Deferrals(t,{parent:k,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/signature.iced",funcname:"Signature._verify"}),x.key.verify_unpad_and_check_hash({sig:x.sig,hash:l,hasher:x.hasher},M.defer({assign_fn:function(){return h=arguments[0]},lineno:276})),M._fulfill()}(e)})(function(t){return function(){var e,n,a,u;if(null==h&&null!=t.key_manager&&(h=t.key_manager.pgp_check_not_expired({subkey_material:t.subkey_material,now:null!=i?i.now:void 0})),null==h&&(i||(i={}),i.subkey=b,a=t._check_key_sig_expiration(i),h=a[0],p=a[1],g=a[2],i.subkey=null),_=t,null==h)switch(o=Y.SubkeyBinding,t.type){case s.binary_doc:case s.canonical_text:for(e=0,n=(u=t.data_packets).length;e<n;e++)u[e].push_sig(new Y.Data({sig:_}));break;case s.issuer:case s.persona:case s.casual:case s.positive:y=null,null!=(w=t.data_packets[1].to_userid())?(y=new Y.SelfSig({type:t.type,userid:w,sig:_}),w.push_sig(y)):null!=(v=t.data_packets[1].to_user_attribute())&&(y=new Y.SelfSig({type:t.type,user_attribute:v,sig:_,key_expiration:p,sig_expiration:g}),v.push_sig(y)),y&&t.primary.push_sig(y);break;case s.subkey_binding:b.push_sig(new o({primary:t.primary,sig:_,direction:o.DOWN,key_expiration:p,sig_expiration:g}));break;case s.primary_binding:b.push_sig(new o({primary:t.primary,sig:_,direction:o.UP,key_expiration:p,sig_expiration:g}));break;case s.subkey_revocation:b.mark_revoked(_);break;case s.key_revocation:t.issuer_matches_key(t.primary)?t.primary.mark_revoked(_):t.primary.add_designated_revocation(_);break;case s.direct:(c=t.subpacket_index.hashed[D.revocation_key])&&t.primary.add_designee(c);break;case s.certificate_revocation:null!=(w=t.data_packets[1].to_userid())&&w.mark_revoked(_);break;default:h=new Error("Got unknown signature type="+t.type)}return r(h)}}(this))},r.prototype._third_party_verify=function(e,r){var n,i,o,s,a,u,f,h,c,l,p;if(J,h=W.findDeferral(arguments),!Z(u=this.get_issuer_key_id(),f=e.get_key_id()))return r(new Error("Key id does not match: "+u.toString("hex")+" != "+f.toString("hex")));n=function(){var t,e,r,n;for(n=[],t=0,e=(r=this.data_packets).length;t<e;t++)o=r[t],n.push(o.to_signature_payload());return n}.call(this),i=t.concat(n),(l=this.prepare_payload(i)).payload,a=l.hvalue,(p=this,function(t){c=new W.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/signature.iced",funcname:"Signature._third_party_verify"}),e.key.verify_unpad_and_check_hash({sig:p.sig,hash:a,hasher:p.hasher},c.defer({assign_fn:function(){return s=arguments[0]},lineno:352})),c._fulfill()})((function(){return r(s)}))},r.prototype.is_signature=function(){return!0},r.prototype.issuer_matches_key=function(t){var e;return!(null!=(e=this.get_issuer_fingerprint())&&!Z(e,this.primary.get_fingerprint()))&&Z(this.get_issuer_key_id(),this.primary.get_key_id())},r.prototype.when_generated=function(){var t;return null!=(t=this.subpacket_index.hashed[D.creation_time])?t.time:void 0},r.prototype.get_key_expires=function(){var t;return null!=(t=this.subpacket_index.hashed[D.key_expiration_time])?t.time:void 0},r.prototype.get_sig_expires=function(){var t;return null!=(t=this.subpacket_index.hashed[D.expiration_time])?t.time:void 0},r.prototype.key_expiration_after_other=function(t){var e,r;return r=this.get_key_expires(),e=t.get_key_expires(),!r||!!e&&r>e},r.prototype.time_primary_pair=function(){var t,e,r;return t=n.sig_types,(e=this.type)===t.issuer||e===t.persona||e===t.casual||e===t.positive?[this.when_generated(),!!(null!=(r=this.subpacket_index.hashed[D.primary_user_id])?r.flag:void 0)]:null},r.prototype._check_key_sig_expiration=function(t){var e,r,i,o,s,a,u,f,h,c,l;return r=null,e=n.sig_types,o=0,h=0,(l=this.type)!==e.issuer&&l!==e.persona&&l!==e.casual&&l!==e.positive&&l!==e.subkey_binding&&l!==e.primary_binding||(i=(t.subkey||this.primary).timestamp,s=this.subpacket_index.hashed[D.key_expiration_time],f=this.subpacket_index.hashed[D.creation_time],c=this.subpacket_index.hashed[D.sig_expiration_time],u=null!=(a=null!=t?t.now:void 0)?a:$(),null!=i&&(null!=s?s.time:void 0)&&(o=i+s.time),null!=f&&(null!=c?c.time:void 0)&&(h=f.time+c.time),o&&!t.time_travel&&u>o&&(r=new Error("Key expired "+(u-o)+"s ago")),h&&!t.time_travel&&u>h&&(r=new Error("Sig expired "+(u-o)+"s ago"))),[r,o,h]},r.prototype.get_key_flags=function(){var t,e,r;return(null!=(t=this.subpacket_index)&&null!=(e=t.hashed)&&null!=(r=e[n.sig_subpacket.key_flags])?r.all_flags():void 0)||0},r.prototype.get_issuer_key_id=function(){var t,e;return null!=(t=this.subpacket_index)&&null!=(e=t.all[n.sig_subpacket.issuer])?e.id:void 0},r.prototype.get_issuer_fingerprint=function(){var t;return null!=(t=this.subpacket_index.all[D.issuer_fingerprint])?t.fingerprint:void 0},r}(y),N=function(){function e(t){this.type=t,this.critical=!1,this.five_byte_len=!1}return e.prototype.set_opts=function(t){var e,r;for(e in t)r=t[e],this[e]=r;return!0},e.prototype.to_buffer=function(){var e;return e=this._v_to_buffer(),t.concat([G(e.length+1,this.five_byte_len),X(8,this.type|(this.critical?128:0)),e])},e.prototype.to_sig=function(){return null},e.prototype.export_to_option=function(){return null},e}(),s=function(t){function e(t,e){this.buf=t,this.type=e}return nt(e,t),e.parse=function(t,r){return new e(t.consume_rest_to_buffer(),r)},e.prototype._v_to_buffer=function(){return this.buf},e}(N),z=function(t){function e(t,r){this.time=r,this.never_expires=0===this.time,e.__super__.constructor.call(this,t)}return nt(e,t),e.parse=function(t,e){return new e(t.read_uint32())},e.prototype._v_to_buffer=function(){return X(32,this.time)},e}(N),b=function(e){function r(t,e){var n,i,o,s;for(this.v=e,r.__super__.constructor.call(this,t),i=0,o=(s=this.v).length;i<o;i++)n=s[i],K(null!=n)}return nt(r,e),r.parse=function(t,e){var r;return new e(function(){var e,n,i,o;for(o=[],e=0,n=(i=t.consume_rest_to_buffer()).length;e<n;e++)r=i[e],o.push(r);return o}())},r.prototype._v_to_buffer=function(){var e;return t.from(function(){var t,r,n,i;for(i=[],t=0,r=(n=this.v).length;t<r;t++)e=n[t],i.push(e);return i}.call(this))},r}(N),i=function(t){function e(t){e.__super__.constructor.call(this,D.creation_time,t)}return nt(e,t),e.parse=function(t){return z.parse(t,e)},e}(z),a=function(t){function e(t){e.__super__.constructor.call(this,D.expiration_time,t)}return nt(e,t),e.parse=function(t){return z.parse(t,e)},e}(z),u=function(t){function e(t){this.flag=t,e.__super__.constructor.call(this,D.exportable_certificate)}return nt(e,t),e.parse=function(t){return new e(t.read_uint8())},e.prototype._v_to_buffer=function(){return X(8,this.flag)},e}(N),j=function(e){function r(t,e){this.level=t,this.amount=e,r.__super__.constructor.call(this,D.trust_signature)}return nt(r,e),r.parse=function(t){return new r(t.read_uint8(),t.read_uint8())},r.prototype._v_to_buffer=function(){return t.concat([X(8,this.level),X(8,this.amount)])},r}(N),E=function(e){function r(t){this.re=t,r.__super__.constructor.call(this,D.regular_expression)}return nt(r,e),r.parse=function(t){return new r(t.consume_rest_to_buffer().toString("utf8"))},r.prototype._v_to_buffer=function(){return t.from(this.re,"utf8")},r}(N),A=function(t){function e(t){this.flag=t,e.__super__.constructor.call(this,D.revocable)}return nt(e,t),e.parse=function(t){return new e(t.read_uint8())},e.prototype._v_to_buffer=function(){return X(8,this.flag)},e}(N),l=function(t){function e(t){e.__super__.constructor.call(this,D.key_expiration_time,t)}return nt(e,t),e.parse=function(t){return z.parse(t,e)},e}(z),M=function(t){function e(t){e.__super__.constructor.call(this,D.preferred_symmetric_algorithms,t)}return nt(e,t),e.parse=function(t){return b.parse(t,e)},e}(b),B=function(e){function r(t,e,n){this.key_class=t,this.alg=e,this.fingerprint=n,r.__super__.constructor.call(this,D.revocation_key)}return nt(r,e),r.parse=function(t){return new r(t.read_uint8(),t.read_uint8(),t.read_buffer(R.output_length))},r.prototype._v_to_buffer=function(){return t.concat([X(8,this.key_class),X(8,this.alg),t.from(this.fingerprint)])},r}(N),h=function(e){function r(t){this.id=t,r.__super__.constructor.call(this,D.issuer)}return nt(r,e),r.parse=function(t){return new r(t.read_buffer(8))},r.prototype._v_to_buffer=function(){return t.from(this.id)},r}(N),m=function(e){function r(t,e,n){this.flags=t,this.name=e,this.value=n,r.__super__.constructor.call(this,D.notation_data)}return nt(r,e),r.parse=function(t){var e,n,i;return e=t.read_uint32(),n=t.read_uint16(),i=t.read_uint16(),new r(e,t.read_buffer(n),t.read_buffer(i))},r.prototype._v_to_buffer=function(){return t.concat([X(32,this.flags),X(16,this.name.length),X(16,this.value.length),t.from(this.name),t.from(this.value)])},r}(N),w=function(t){function e(t){e.__super__.constructor.call(this,D.preferred_hash_algorithms,t)}return nt(e,t),e.parse=function(t){return b.parse(t,e)},e}(b),v=function(t){function e(t){e.__super__.constructor.call(this,D.preferred_compression_algorithms,t)}return nt(e,t),e.parse=function(t){return b.parse(t,e)},e}(b),d=function(t){function e(t){e.__super__.constructor.call(this,D.key_server_preferences,t)}return nt(e,t),e.parse=function(t){return b.parse(t,e)},e}(b),f=function(t){function e(t){e.__super__.constructor.call(this,D.features,t)}return nt(e,t),e.parse=function(t){return b.parse(t,e)},e}(b),k=function(t){function e(t){this.server=t,e.__super__.constructor.call(this,D.preferred_key_server)}return nt(e,t),e.parse=function(t){return new e(t.consume_rest_to_buffer())},e.prototype._v_to_buffer=function(){return this.server},e}(N),x=function(t){function e(t){this.flag=t,e.__super__.constructor.call(this,D.primary_user_id)}return nt(e,t),e.parse=function(t){return new e(t.read_uint8())},e.prototype._v_to_buffer=function(){return X(8,this.flag)},e}(N),g=function(t){function e(t){this.flag=t,e.__super__.constructor.call(this,D.policy_uri)}return nt(e,t),e.parse=function(t){return new e(t.consume_rest_to_buffer())},e.prototype._v_to_buffer=function(){return this.flag},e}(N),p=function(t){function e(t){e.__super__.constructor.call(this,D.key_flags,t)}return nt(e,t),e.parse=function(t){return b.parse(t,e)},e.prototype.all_flags=function(){var t,e,r,n;for(t=0,e=0,r=(n=this.v).length;e<r;e++)t|=n[e];return t},e}(b),C=function(t){function e(t){this.uid=t,e.__super__.constructor.call(this,D.signers_user_id)}return nt(e,t),e.parse=function(t){return new e(t.consume_rest_to_buffer())},e.prototype._v_to_buffer=function(){return this.uid},e}(N),S=function(e){function r(t,e){this.flag=t,this.reason=e,r.__super__.constructor.call(this,D.reason_for_revocation)}return nt(r,e),r.parse=function(t){return new r(t.read_uint8(),t.consume_rest_to_buffer())},r.prototype._v_to_buffer=function(){return t.concat([X(8,this.flag),this.reason])},r}(N),T=function(e){function r(t,e,n){this.pub_key_alg=t,this.hasher=e,this.hval=n,r.__super__.constructor.call(this,D.signature_target)}return nt(r,e),r.parse=function(t){var e;return new r(t.read_uint8(),e=q(t.read_uint8()),t.read_buffer(e.output_length))},r.prototype._v_to_buffer=function(){return t.concat([X(8,this.pub_key_alg),X(8,this.hasher.type),this.hval])},r}(N),o=function(t){function e(t){this.sig=t.sig,this.rawsig=t.rawsig,e.__super__.constructor.call(this,D.embedded_signature)}return nt(e,t),e.prototype._v_to_buffer=function(){return this.rawsig},e.prototype.to_sig=function(){return this.sig},e.parse=function(t){var r;return r=t.peek_rest_to_buffer(),new e({sig:I.parse(t),rawsig:r})},e}(N),c=function(e){function r(t,e){this.n=t,this.fingerprint=e,r.__super__.constructor.call(this,D.issuer_fingerprint)}return nt(r,e),r.parse=function(t){return new r(t.read_uint8(),t.consume_rest_to_buffer())},r.prototype._v_to_buffer=function(){return t.concat([X(8,this.n),this.fingerprint])},r}(N),e.Signature=I,_=function(){function t(t){this.slice=t}return t.prototype.parse_v2_or_v3=function(t,e){var r;if(5!==this.slice.read_uint8())throw new error("Bad one-octet length");return(r={}).type=this.slice.read_uint8(),r.time=this.slice.read_uint32(),r.sig_data=this.slice.peek_rest_to_buffer(),r.key_id=this.slice.read_buffer(8),r.public_key_class=H.get_class(this.slice.read_uint8()),r.hasher=q(this.slice.read_uint8()),r.signed_hash_value_hash=this.slice.read_uint16(),r.sig=r.public_key_class.parse_sig(this.slice),r.version=t,new e(r)},t.prototype.parse_v4=function(){var t,e,r,n;return(r={}).type=this.slice.read_uint8(),r.public_key_class=H.get_class(this.slice.read_uint8()),r.hasher=q(this.slice.read_uint8()),e=this.slice.read_uint16(),t=this.slice.i+e,r.sig_data=this.slice.peek_to_buffer(e),r.hashed_subpackets=function(){var e;for(e=[];this.slice.i<t;)e.push(this.parse_subpacket());return e}.call(this),n=this.slice.read_uint16(),t=this.slice.i+n,r.unhashed_subpackets=function(){var e;for(e=[];this.slice.i<t;)e.push(this.parse_subpacket());return e}.call(this),r.signed_hash_value_hash=this.slice.read_uint16(),r.sig=r.public_key_class.parse_sig(this.slice),r.version=4,new I(r)},t.prototype.parse_subpacket=function(){var t,e,r,n,y,_,b,R;return n=(R=this.slice.read_v4_length())[0],r=R[1],y=this.slice.read_uint8(),b=127&y,t=!!(128&y),e=this.slice.clamp(n-1),(_=function(){switch(b){case D.creation_time:return i;case D.expiration_time:return a;case D.exportable_certificate:return u;case D.trust_signature:return j;case D.regular_expression:return E;case D.revocable:return A;case D.key_expiration_time:return l;case D.preferred_symmetric_algorithms:return M;case D.revocation_key:return B;case D.issuer:return h;case D.notation_data:return m;case D.preferred_hash_algorithms:return w;case D.preferred_compression_algorithms:return v;case D.key_server_preferences:return d;case D.preferred_key_server:return k;case D.primary_user_id:return x;case D.policy_uri:return g;case D.key_flags:return p;case D.signers_user_id:return C;case D.reason_for_revocation:return S;case D.features:return f;case D.signature_target:return T;case D.embedded_signature:return o;case D.issuer_fingerprint:return c;default:if(b>=D.experimental_low&&b<=D.experimental_high)return s;throw new Error("Unknown signature subpacket: "+b)}}().parse(this.slice,b)).set_opts({critical:t,five_byte_len:r}),this.slice.unclamp(e),_},t.prototype.parse=function(){var t;switch(t=this.slice.read_uint8()){case n.versions.signature.V2:return this.parse_v2_or_v3(t,U);case n.versions.signature.V3:return this.parse_v2_or_v3(t,O);case n.versions.signature.V4:return this.parse_v4();default:throw new Error("Unknown signature version: "+t)}},t}(),e.CreationTime=i,e.KeyFlags=p,e.KeyExpirationTime=l,e.PreferredSymmetricAlgorithms=M,e.PreferredHashAlgorithms=w,e.PreferredCompressionAlgorithms=v,e.Features=f,e.KeyServerPreferences=d,e.Issuer=h,e.EmbeddedSignature=o,e.PrimaryUserId=x}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var e,n,i,o,s,a,u,f;e=r(41).openpgp.public_key_algorithms,u=r(445).RSA,n=r(801).DSA,a=r(802).ElGamal,o=r(447).ECDSA,i=r(448).ECDH,s=r(532).EDDSA,f=function(t){switch(t){case e.RSA:case e.RSA_ENCRYPT_ONLY:case e.RSA_SIGN_ONLY:return u;case e.ELGAMAL:return a;case e.DSA:return n;case e.ECDSA:return o;case e.ECDH:return i;case e.EDDSA:return s;default:throw new Error("unknown public key system: "+t)}},t.exports={get_class:f,RSA:u,DSA:n,ElGamal:a}}).call(this)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,o,s,a,u=1,f={},h=!1,c=t.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(t);l=l&&l.setTimeout?l:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){d(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},n=function(t){o.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(i=c.documentElement,n=function(t){var e=c.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(d,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&d(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(e){t.postMessage(s+e,"*")}),l.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var i={callback:t,args:e};return f[u]=i,n(u),u++},l.clearImmediate=p}function p(t){delete f[t]}function d(t){if(h)setTimeout(d,0,t);else{var e=f[t];if(e){h=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{p(t),h=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(24),r(19))},,,,,function(t,e,r){"use strict";(function(t){var n=r(12).Buffer,i=r(96).Transform,o=r(406),s=r(76),a=r(138).ok,u=r(12).kMaxLength,f="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var h=Object.keys(o),c=0;c<h.length;c++){var l=h[c];l.match(/^Z/)&&Object.defineProperty(e,l,{enumerable:!0,value:o[l],writable:!1})}for(var p={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},d=Object.keys(p),m=0;m<d.length;m++){var y=d[m];p[p[y]]=y}function _(t,e,r){var i=[],o=0;function s(){for(var e;null!==(e=t.read());)i.push(e),o+=e.length;t.once("readable",s)}function a(){var e,s=null;o>=u?s=new RangeError(f):e=n.concat(i,o),i=[],t.close(),r(s,e)}t.on("error",(function(e){t.removeListener("end",a),t.removeListener("readable",s),r(e)})),t.on("end",a),t.end(e),s()}function g(t,e){if("string"==typeof e&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function b(t){if(!(this instanceof b))return new b(t);A.call(this,t,o.DEFLATE)}function v(t){if(!(this instanceof v))return new v(t);A.call(this,t,o.INFLATE)}function w(t){if(!(this instanceof w))return new w(t);A.call(this,t,o.GZIP)}function k(t){if(!(this instanceof k))return new k(t);A.call(this,t,o.GUNZIP)}function M(t){if(!(this instanceof M))return new M(t);A.call(this,t,o.DEFLATERAW)}function x(t){if(!(this instanceof x))return new x(t);A.call(this,t,o.INFLATERAW)}function S(t){if(!(this instanceof S))return new S(t);A.call(this,t,o.UNZIP)}function E(t){return t===o.Z_NO_FLUSH||t===o.Z_PARTIAL_FLUSH||t===o.Z_SYNC_FLUSH||t===o.Z_FULL_FLUSH||t===o.Z_FINISH||t===o.Z_BLOCK}function A(t,r){var s=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,i.call(this,t),t.flush&&!E(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!E(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==t.finishFlush?t.finishFlush:o.Z_FINISH,t.chunkSize&&(t.chunkSize<e.Z_MIN_CHUNK||t.chunkSize>e.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<e.Z_MIN_WINDOWBITS||t.windowBits>e.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<e.Z_MIN_LEVEL||t.level>e.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<e.Z_MIN_MEMLEVEL||t.memLevel>e.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!n.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(r);var a=this;this._hadError=!1,this._handle.onerror=function(t,r){B(a),a._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],a.emit("error",n)};var u=e.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(u=t.level);var f=e.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(f=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,u,t.memLevel||e.Z_DEFAULT_MEMLEVEL,f,t.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=f,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!s._handle},configurable:!0,enumerable:!0})}function B(e,r){r&&t.nextTick(r),e._handle&&(e._handle.close(),e._handle=null)}function D(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),e.Deflate=b,e.Inflate=v,e.Gzip=w,e.Gunzip=k,e.DeflateRaw=M,e.InflateRaw=x,e.Unzip=S,e.createDeflate=function(t){return new b(t)},e.createInflate=function(t){return new v(t)},e.createDeflateRaw=function(t){return new M(t)},e.createInflateRaw=function(t){return new x(t)},e.createGzip=function(t){return new w(t)},e.createGunzip=function(t){return new k(t)},e.createUnzip=function(t){return new S(t)},e.deflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new b(e),t,r)},e.deflateSync=function(t,e){return g(new b(e),t)},e.gzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new w(e),t,r)},e.gzipSync=function(t,e){return g(new w(e),t)},e.deflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new M(e),t,r)},e.deflateRawSync=function(t,e){return g(new M(e),t)},e.unzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new S(e),t,r)},e.unzipSync=function(t,e){return g(new S(e),t)},e.inflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new v(e),t,r)},e.inflateSync=function(t,e){return g(new v(e),t)},e.gunzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new k(e),t,r)},e.gunzipSync=function(t,e){return g(new k(e),t)},e.inflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new x(e),t,r)},e.inflateRawSync=function(t,e){return g(new x(e),t)},s.inherits(A,i),A.prototype.params=function(r,n,i){if(r<e.Z_MIN_LEVEL||r>e.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(n!=e.Z_FILTERED&&n!=e.Z_HUFFMAN_ONLY&&n!=e.Z_RLE&&n!=e.Z_FIXED&&n!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==r||this._strategy!==n){var s=this;this.flush(o.Z_SYNC_FLUSH,(function(){a(s._handle,"zlib binding closed"),s._handle.params(r,n),s._hadError||(s._level=r,s._strategy=n,i&&i())}))}else t.nextTick(i)},A.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},A.prototype._flush=function(t){this._transform(n.alloc(0),"",t)},A.prototype.flush=function(e,r){var i=this,s=this._writableState;("function"==typeof e||void 0===e&&!r)&&(r=e,e=o.Z_FULL_FLUSH),s.ended?r&&t.nextTick(r):s.ending?r&&this.once("end",r):s.needDrain?r&&this.once("drain",(function(){return i.flush(e,r)})):(this._flushFlag=e,this.write(n.alloc(0),"",r))},A.prototype.close=function(e){B(this,e),t.nextTick(D,this)},A.prototype._transform=function(t,e,r){var i,s=this._writableState,a=(s.ending||s.ended)&&(!t||s.length===t.length);return null===t||n.isBuffer(t)?this._handle?(a?i=this._finishFlushFlag:(i=this._flushFlag,t.length>=s.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(t,i,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},A.prototype._processChunk=function(t,e,r){var i=t&&t.length,o=this._chunkSize-this._offset,s=0,h=this,c="function"==typeof r;if(!c){var l,p=[],d=0;this.on("error",(function(t){l=t})),a(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(e,t,s,i,this._buffer,this._offset,o)}while(!this._hadError&&g(m[0],m[1]));if(this._hadError)throw l;if(d>=u)throw B(this),new RangeError(f);var y=n.concat(p,d);return B(this),y}a(this._handle,"zlib binding closed");var _=this._handle.write(e,t,s,i,this._buffer,this._offset,o);function g(u,f){if(this&&(this.buffer=null,this.callback=null),!h._hadError){var l=o-f;if(a(l>=0,"have should not go down"),l>0){var m=h._buffer.slice(h._offset,h._offset+l);h._offset+=l,c?h.push(m):(p.push(m),d+=m.length)}if((0===f||h._offset>=h._chunkSize)&&(o=h._chunkSize,h._offset=0,h._buffer=n.allocUnsafe(h._chunkSize)),0===f){if(s+=i-u,i=u,!c)return!0;var y=h._handle.write(e,t,s,i,h._buffer,h._offset,h._chunkSize);return y.callback=g,void(y.buffer=t)}if(!c)return!1;r()}}_.buffer=t,_.callback=g},s.inherits(b,A),s.inherits(v,A),s.inherits(w,A),s.inherits(k,A),s.inherits(M,A),s.inherits(x,A),s.inherits(S,A)}).call(this,r(19))},function(t,e,r){"use strict";(function(t,n){var i=r(138),o=r(407),s=r(408),a=r(411),u=r(414);for(var f in u)e[f]=u[f];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;function h(t){if("number"!=typeof t||t<e.DEFLATE||t>e.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}h.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?s.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||a.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},h.prototype.write=function(t,e,r,n,i,o,s){return this._write(!0,t,e,r,n,i,o,s)},h.prototype.writeSync=function(t,e,r,n,i,o,s){return this._write(!1,t,e,r,n,i,o,s)},h.prototype._write=function(r,o,s,a,u,f,h,c){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==e.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===o,"must provide flush value"),this.write_in_progress=!0,o!==e.Z_NO_FLUSH&&o!==e.Z_PARTIAL_FLUSH&&o!==e.Z_SYNC_FLUSH&&o!==e.Z_FULL_FLUSH&&o!==e.Z_FINISH&&o!==e.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=t.alloc(0),u=0,a=0),this.strm.avail_in=u,this.strm.input=s,this.strm.next_in=a,this.strm.avail_out=c,this.strm.output=f,this.strm.next_out=h,this.flush=o,!r)return this._process(),this._checkError()?this._afterSync():void 0;var l=this;return n.nextTick((function(){l._process(),l._after()})),this},h.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},h.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=e.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=a.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=a.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=a.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=a.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},h.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},h.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},h.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},h.prototype.init=function(t,r,n,o,s){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(t>=8&&t<=15,"invalid windowBits"),i(r>=-1&&r<=9,"invalid compression level"),i(n>=1&&n<=9,"invalid memlevel"),i(o===e.Z_FILTERED||o===e.Z_HUFFMAN_ONLY||o===e.Z_RLE||o===e.Z_FIXED||o===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,t,n,o,s),this._setDictionary()},h.prototype.params=function(){throw new Error("deflateParams Not supported")},h.prototype.reset=function(){this._reset(),this._setDictionary()},h.prototype._init=function(t,r,n,i,u){switch(this.level=t,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new o,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=a.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},h.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},h.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=s.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=a.inflateReset(this.strm)}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=h}).call(this,r(12).Buffer,r(19))},function(t,e,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(t,e,r){"use strict";var n,i=r(133),o=r(409),s=r(233),a=r(234),u=r(410);function f(t,e){return t.msg=u[e],e}function h(t){return(t<<1)-(t>4?9:0)}function c(t){for(var e=t.length;--e>=0;)t[e]=0}function l(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function p(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,l(t.strm)}function d(t,e){t.pending_buf[t.pending++]=e}function m(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function y(t,e,r,n){var o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,i.arraySet(e,t.input,t.next_in,o,r),1===t.state.wrap?t.adler=s(t.adler,e,o,r):2===t.state.wrap&&(t.adler=a(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)}function _(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,f=t.window,h=t.w_mask,c=t.prev,l=t.strstart+258,p=f[o+s-1],d=f[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(f[(r=e)+s]===d&&f[r+s-1]===p&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&o<l);if(n=258-(l-o),o=l-258,n>s){if(t.match_start=e,s=n,n>=a)break;p=f[o+s-1],d=f[o+s]}}}while((e=c[e&h])>u&&0!=--i);return s<=t.lookahead?s:t.lookahead}function g(t){var e,r,n,o,s,a=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-262)){i.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=a?n-a:0}while(--r);e=r=a;do{n=t.prev[--e],t.prev[e]=n>=a?n-a:0}while(--r);o+=a}if(0===t.strm.avail_in)break;if(r=y(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=3)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+3-1])&t.hash_mask,t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function b(t,e){for(var r,n;;){if(t.lookahead<262){if(g(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=_(t,r)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}function v(t,e){for(var r,n,i;;){if(t.lookahead<262){if(g(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=_(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(p(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&p(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}function w(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function k(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),c(this.dyn_ltree),c(this.dyn_dtree),c(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),c(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),c(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function M(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):f(t,-2)}function x(t){var e=M(t);return 0===e&&function(t){t.window_size=2*t.w_size,c(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0}(t.state),e}function S(t,e,r,n,o,s){if(!t)return-2;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||s<0||s>4)return f(t,-2);8===n&&(n=9);var u=new k;return t.state=u,u.strm=t,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,x(t)}n=[new w(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(g(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,p(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(p(t,!1),t.strm.avail_out),1)})),new w(4,4,8,4,b),new w(4,5,16,8,b),new w(4,6,32,32,b),new w(4,4,16,16,v),new w(8,16,32,32,v),new w(8,16,128,128,v),new w(8,32,128,256,v),new w(32,128,258,1024,v),new w(32,258,258,4096,v)],e.deflateInit=function(t,e){return S(t,e,8,15,8,0)},e.deflateInit2=S,e.deflateReset=x,e.deflateResetKeep=M,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},e.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||e>5||e<0)return t?f(t,-2):-2;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return f(t,0===t.avail_out?-5:-2);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,d(i,31),d(i,139),d(i,8),i.gzhead?(d(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),d(i,255&i.gzhead.time),d(i,i.gzhead.time>>8&255),d(i,i.gzhead.time>>16&255),d(i,i.gzhead.time>>24&255),d(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),d(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(d(i,255&i.gzhead.extra.length),d(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(d(i,0),d(i,0),d(i,0),d(i,0),d(i,0),d(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),d(i,3),i.status=113);else{var y=8+(i.w_bits-8<<4)<<8;y|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(y|=32),y+=31-y%31,i.status=113,m(i,y),0!==i.strstart&&(m(i,t.adler>>>16),m(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),l(t),s=i.pending,i.pending!==i.pending_buf_size));)d(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),l(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,d(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),l(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,d(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&l(t),i.pending+2<=i.pending_buf_size&&(d(i,255&t.adler),d(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(l(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&h(e)<=h(r)&&4!==e)return f(t,-5);if(666===i.status&&0!==t.avail_in)return f(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var _=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(g(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=258){if(g(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+258;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);t.match_length=258-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==_&&4!==_||(i.status=666),1===_||3===_)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(c(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),l(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(d(i,255&t.adler),d(i,t.adler>>8&255),d(i,t.adler>>16&255),d(i,t.adler>>24&255),d(i,255&t.total_in),d(i,t.total_in>>8&255),d(i,t.total_in>>16&255),d(i,t.total_in>>24&255)):(m(i,t.adler>>>16),m(i,65535&t.adler)),l(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?f(t,-2):(t.state=null,113===e?f(t,-3):0):-2},e.deflateSetDictionary=function(t,e){var r,n,o,a,u,f,h,l,p=e.length;if(!t||!t.state)return-2;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return-2;for(1===a&&(t.adler=s(t.adler,e,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(c(r.head),r.strstart=0,r.block_start=0,r.insert=0),l=new i.Buf8(r.w_size),i.arraySet(l,e,p-r.w_size,r.w_size,0),e=l,p=r.w_size),u=t.avail_in,f=t.next_in,h=t.input,t.avail_in=p,t.next_in=0,t.input=e,g(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,g(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=f,t.input=h,t.avail_in=u,r.wrap=a,0},e.deflateInfo="pako deflate (from Nodeca project)"},function(t,e,r){"use strict";var n=r(133);function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);i(f);var h=new Array(60);i(h);var c=new Array(512);i(c);var l=new Array(256);i(l);var p=new Array(29);i(p);var d,m,y,_=new Array(30);function g(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function b(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function v(t){return t<256?c[t]:c[256+(t>>>7)]}function w(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function k(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function M(t,e,r){k(t,r[2*e],r[2*e+1])}function x(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function S(t,e,r){var n,i,o=new Array(16),s=0;for(n=1;n<=15;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++){var a=t[2*i+1];0!==a&&(t[2*i]=x(o[a]++,a))}}function E(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function A(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function B(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function D(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&B(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!B(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function R(t,e,r){var n,i,a,u,f=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*f]<<8|t.pending_buf[t.d_buf+2*f+1],i=t.pending_buf[t.l_buf+f],f++,0===n?M(t,i,e):(M(t,(a=l[i])+256+1,e),0!==(u=o[a])&&k(t,i-=p[a],u),M(t,a=v(--n),r),0!==(u=s[a])&&k(t,n-=_[a],u))}while(f<t.last_lit);M(t,256,e)}function P(t,e){var r,n,i,o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,u=e.stat_desc.elems,f=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<u;r++)0!==o[2*r]?(t.heap[++t.heap_len]=f=r,t.depth[r]=0):o[2*r+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=f<2?++f:0)]=1,t.depth[i]=0,t.opt_len--,a&&(t.static_len-=s[2*i+1]);for(e.max_code=f,r=t.heap_len>>1;r>=1;r--)D(t,o,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],D(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,D(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,s,a,u=e.dyn_tree,f=e.max_code,h=e.stat_desc.static_tree,c=e.stat_desc.has_stree,l=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,d=e.stat_desc.max_length,m=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=u[2*u[2*(n=t.heap[r])+1]+1]+1)>d&&(o=d,m++),u[2*n+1]=o,n>f||(t.bl_count[o]++,s=0,n>=p&&(s=l[n-p]),a=u[2*n],t.opt_len+=a*(o+s),c&&(t.static_len+=a*(h[2*n+1]+s)));if(0!==m){do{for(o=d-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[d]--,m-=2}while(m>0);for(o=d;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>f||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(t,e),S(o,f,t.bl_count)}function I(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,f=4;for(0===s&&(u=138,f=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a<u&&i===s||(a<f?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,o=i,0===s?(u=138,f=3):i===s?(u=6,f=3):(u=7,f=4))}function T(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,f=4;for(0===s&&(u=138,f=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++a<u&&i===s)){if(a<f)do{M(t,i,t.bl_tree)}while(0!=--a);else 0!==i?(i!==o&&(M(t,i,t.bl_tree),a--),M(t,16,t.bl_tree),k(t,a-3,2)):a<=10?(M(t,17,t.bl_tree),k(t,a-3,3)):(M(t,18,t.bl_tree),k(t,a-11,7));a=0,o=i,0===s?(u=138,f=3):i===s?(u=6,f=3):(u=7,f=4)}}i(_);var U=!1;function F(t,e,r,i){k(t,0+(i?1:0),3),function(t,e,r,i){A(t),i&&(w(t,r),w(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}e._tr_init=function(t){U||(!function(){var t,e,r,n,i,u=new Array(16);for(r=0,n=0;n<28;n++)for(p[n]=r,t=0;t<1<<o[n];t++)l[r++]=n;for(l[r-1]=n,i=0,n=0;n<16;n++)for(_[n]=i,t=0;t<1<<s[n];t++)c[i++]=n;for(i>>=7;n<30;n++)for(_[n]=i<<7,t=0;t<1<<s[n]-7;t++)c[256+i++]=n;for(e=0;e<=15;e++)u[e]=0;for(t=0;t<=143;)f[2*t+1]=8,t++,u[8]++;for(;t<=255;)f[2*t+1]=9,t++,u[9]++;for(;t<=279;)f[2*t+1]=7,t++,u[7]++;for(;t<=287;)f[2*t+1]=8,t++,u[8]++;for(S(f,287,u),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=x(t,5);d=new g(f,o,257,286,15),m=new g(h,s,0,30,15),y=new g(new Array(0),a,0,19,7)}(),U=!0),t.l_desc=new b(t.dyn_ltree,d),t.d_desc=new b(t.dyn_dtree,m),t.bl_desc=new b(t.bl_tree,y),t.bi_buf=0,t.bi_valid=0,E(t)},e._tr_stored_block=F,e._tr_flush_block=function(t,e,r,n){var i,o,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),P(t,t.l_desc),P(t,t.d_desc),s=function(t){var e;for(I(t,t.dyn_ltree,t.l_desc.max_code),I(t,t.dyn_dtree,t.d_desc.max_code),P(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*u[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?F(t,e,r,n):4===t.strategy||o===i?(k(t,2+(n?1:0),3),R(t,f,h)):(k(t,4+(n?1:0),3),function(t,e,r,n){var i;for(k(t,e-257,5),k(t,r-1,5),k(t,n-4,4),i=0;i<n;i++)k(t,t.bl_tree[2*u[i]+1],3);T(t,t.dyn_ltree,e-1),T(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),R(t,t.dyn_ltree,t.dyn_dtree)),E(t),n&&A(t)},e._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(l[r]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){k(t,2,3),M(t,256,f),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e,r){"use strict";var n=r(133),i=r(233),o=r(234),s=r(412),a=r(413);function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function c(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,h(t)):-2}function l(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,c(t))):-2}function p(t,e){var r,n;return t?(n=new f,t.state=n,n.window=null,0!==(r=l(t,e))&&(t.state=null),r):-2}var d,m,y=!0;function _(t){if(y){var e;for(d=new n.Buf32(512),m=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,d,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,m,0,t.work,{bits:5}),y=!1}t.lencode=d,t.lenbits=9,t.distcode=m,t.distbits=5}function g(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}e.inflateReset=c,e.inflateReset2=l,e.inflateResetKeep=h,e.inflateInit=function(t){return p(t,15)},e.inflateInit2=p,e.inflate=function(t,e){var r,f,h,c,l,p,d,m,y,b,v,w,k,M,x,S,E,A,B,D,R,P,I,T,U=0,F=new n.Buf8(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return-2;12===(r=t.state).mode&&(r.mode=13),l=t.next_out,h=t.output,d=t.avail_out,c=t.next_in,f=t.input,p=t.avail_in,m=r.hold,y=r.bits,b=p,v=d,P=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;y<16;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if(2&r.wrap&&35615===m){r.check=0,F[0]=255&m,F[1]=m>>>8&255,r.check=o(r.check,F,2,0),m=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",r.mode=30;break}if(y-=4,R=8+(15&(m>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<R,t.adler=r.check=1,r.mode=512&m?10:12,m=0,y=0;break;case 2:for(;y<16;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if(r.flags=m,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(F[0]=255&m,F[1]=m>>>8&255,r.check=o(r.check,F,2,0)),m=0,y=0,r.mode=3;case 3:for(;y<32;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}r.head&&(r.head.time=m),512&r.flags&&(F[0]=255&m,F[1]=m>>>8&255,F[2]=m>>>16&255,F[3]=m>>>24&255,r.check=o(r.check,F,4,0)),m=0,y=0,r.mode=4;case 4:for(;y<16;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(F[0]=255&m,F[1]=m>>>8&255,r.check=o(r.check,F,2,0)),m=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(F[0]=255&m,F[1]=m>>>8&255,r.check=o(r.check,F,2,0)),m=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((w=r.length)>p&&(w=p),w&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,f,c,w,R)),512&r.flags&&(r.check=o(r.check,f,w,c)),p-=w,c+=w,r.length-=w),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break t;w=0;do{R=f[c+w++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R))}while(R&&w<p);if(512&r.flags&&(r.check=o(r.check,f,w,c)),p-=w,c+=w,R)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break t;w=0;do{R=f[c+w++],r.head&&R&&r.length<65536&&(r.head.comment+=String.fromCharCode(R))}while(R&&w<p);if(512&r.flags&&(r.check=o(r.check,f,w,c)),p-=w,c+=w,R)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;y<16;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if(m!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}m=0,y=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}t.adler=r.check=u(m),m=0,y=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=l,t.avail_out=d,t.next_in=c,t.avail_in=p,r.hold=m,r.bits=y,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){m>>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}switch(r.last=1&m,y-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(_(r),r.mode=20,6===e){m>>>=2,y-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}m>>>=2,y-=2;break;case 14:for(m>>>=7&y,y-=7&y;y<32;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if((65535&m)!=(m>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,m=0,y=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(w=r.length){if(w>p&&(w=p),w>d&&(w=d),0===w)break t;n.arraySet(h,f,c,w,l),p-=w,c+=w,d-=w,l+=w,r.length-=w;break}r.mode=12;break;case 17:for(;y<14;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if(r.nlen=257+(31&m),m>>>=5,y-=5,r.ndist=1+(31&m),m>>>=5,y-=5,r.ncode=4+(15&m),m>>>=4,y-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;y<3;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}r.lens[O[r.have++]]=7&m,m>>>=3,y-=3}for(;r.have<19;)r.lens[O[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,I={bits:r.lenbits},P=a(0,r.lens,0,19,r.lencode,0,r.work,I),r.lenbits=I.bits,P){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;S=(U=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,E=65535&U,!((x=U>>>24)<=y);){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if(E<16)m>>>=x,y-=x,r.lens[r.have++]=E;else{if(16===E){for(T=x+2;y<T;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if(m>>>=x,y-=x,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}R=r.lens[r.have-1],w=3+(3&m),m>>>=2,y-=2}else if(17===E){for(T=x+3;y<T;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}y-=x,R=0,w=3+(7&(m>>>=x)),m>>>=3,y-=3}else{for(T=x+7;y<T;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}y-=x,R=0,w=11+(127&(m>>>=x)),m>>>=7,y-=7}if(r.have+w>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;w--;)r.lens[r.have++]=R}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,I={bits:r.lenbits},P=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,I),r.lenbits=I.bits,P){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,I={bits:r.distbits},P=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,I),r.distbits=I.bits,P){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(p>=6&&d>=258){t.next_out=l,t.avail_out=d,t.next_in=c,t.avail_in=p,r.hold=m,r.bits=y,s(t,v),l=t.next_out,h=t.output,d=t.avail_out,c=t.next_in,f=t.input,p=t.avail_in,m=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;S=(U=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,E=65535&U,!((x=U>>>24)<=y);){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if(S&&0==(240&S)){for(A=x,B=S,D=E;S=(U=r.lencode[D+((m&(1<<A+B)-1)>>A)])>>>16&255,E=65535&U,!(A+(x=U>>>24)<=y);){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}m>>>=A,y-=A,r.back+=A}if(m>>>=x,y-=x,r.back+=x,r.length=E,0===S){r.mode=26;break}if(32&S){r.back=-1,r.mode=12;break}if(64&S){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&S,r.mode=22;case 22:if(r.extra){for(T=r.extra;y<T;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;S=(U=r.distcode[m&(1<<r.distbits)-1])>>>16&255,E=65535&U,!((x=U>>>24)<=y);){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if(0==(240&S)){for(A=x,B=S,D=E;S=(U=r.distcode[D+((m&(1<<A+B)-1)>>A)])>>>16&255,E=65535&U,!(A+(x=U>>>24)<=y);){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}m>>>=A,y-=A,r.back+=A}if(m>>>=x,y-=x,r.back+=x,64&S){t.msg="invalid distance code",r.mode=30;break}r.offset=E,r.extra=15&S,r.mode=24;case 24:if(r.extra){for(T=r.extra;y<T;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===d)break t;if(w=v-d,r.offset>w){if((w=r.offset-w)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}w>r.wnext?(w-=r.wnext,k=r.wsize-w):k=r.wnext-w,w>r.length&&(w=r.length),M=r.window}else M=h,k=l-r.offset,w=r.length;w>d&&(w=d),d-=w,r.length-=w;do{h[l++]=M[k++]}while(--w);0===r.length&&(r.mode=21);break;case 26:if(0===d)break t;h[l++]=r.length,d--,r.mode=21;break;case 27:if(r.wrap){for(;y<32;){if(0===p)break t;p--,m|=f[c++]<<y,y+=8}if(v-=d,t.total_out+=v,r.total+=v,v&&(t.adler=r.check=r.flags?o(r.check,h,v,l-v):i(r.check,h,v,l-v)),v=d,(r.flags?m:u(m))!==r.check){t.msg="incorrect data check",r.mode=30;break}m=0,y=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;y<32;){if(0===p)break t;p--,m+=f[c++]<<y,y+=8}if(m!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}m=0,y=0}r.mode=29;case 29:P=1;break t;case 30:P=-3;break t;case 31:return-4;case 32:default:return-2}return t.next_out=l,t.avail_out=d,t.next_in=c,t.avail_in=p,r.hold=m,r.bits=y,(r.wsize||v!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&g(t,t.output,t.next_out,v-t.avail_out)?(r.mode=31,-4):(b-=t.avail_in,v-=t.avail_out,t.total_in+=b,t.total_out+=v,r.total+=v,r.wrap&&v&&(t.adler=r.check=r.flags?o(r.check,h,v,t.next_out-v):i(r.check,h,v,t.next_out-v)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===b&&0===v||4===e)&&0===P&&(P=-5),P)},e.inflateEnd=function(t){if(!t||!t.state)return-2;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?-2:(r.head=e,e.done=!1,0):-2},e.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?-2:11===r.mode&&i(1,e,n,0)!==r.check?-3:g(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},e.inflateInfo="pako inflate (from Nodeca project)"},function(t,e,r){"use strict";t.exports=function(t,e){var r,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E;r=t.state,n=t.next_in,S=t.input,i=n+(t.avail_in-5),o=t.next_out,E=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,f=r.wsize,h=r.whave,c=r.wnext,l=r.window,p=r.hold,d=r.bits,m=r.lencode,y=r.distcode,_=(1<<r.lenbits)-1,g=(1<<r.distbits)-1;t:do{d<15&&(p+=S[n++]<<d,d+=8,p+=S[n++]<<d,d+=8),b=m[p&_];e:for(;;){if(p>>>=v=b>>>24,d-=v,0===(v=b>>>16&255))E[o++]=65535&b;else{if(!(16&v)){if(0==(64&v)){b=m[(65535&b)+(p&(1<<v)-1)];continue e}if(32&v){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}w=65535&b,(v&=15)&&(d<v&&(p+=S[n++]<<d,d+=8),w+=p&(1<<v)-1,p>>>=v,d-=v),d<15&&(p+=S[n++]<<d,d+=8,p+=S[n++]<<d,d+=8),b=y[p&g];r:for(;;){if(p>>>=v=b>>>24,d-=v,!(16&(v=b>>>16&255))){if(0==(64&v)){b=y[(65535&b)+(p&(1<<v)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(k=65535&b,d<(v&=15)&&(p+=S[n++]<<d,(d+=8)<v&&(p+=S[n++]<<d,d+=8)),(k+=p&(1<<v)-1)>u){t.msg="invalid distance too far back",r.mode=30;break t}if(p>>>=v,d-=v,k>(v=o-s)){if((v=k-v)>h&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(M=0,x=l,0===c){if(M+=f-v,v<w){w-=v;do{E[o++]=l[M++]}while(--v);M=o-k,x=E}}else if(c<v){if(M+=f+c-v,(v-=c)<w){w-=v;do{E[o++]=l[M++]}while(--v);if(M=0,c<w){w-=v=c;do{E[o++]=l[M++]}while(--v);M=o-k,x=E}}}else if(M+=c-v,v<w){w-=v;do{E[o++]=l[M++]}while(--v);M=o-k,x=E}for(;w>2;)E[o++]=x[M++],E[o++]=x[M++],E[o++]=x[M++],w-=3;w&&(E[o++]=x[M++],w>1&&(E[o++]=x[M++]))}else{M=o-k;do{E[o++]=E[M++],E[o++]=E[M++],E[o++]=E[M++],w-=3}while(w>2);w&&(E[o++]=E[M++],w>1&&(E[o++]=E[M++]))}break}}break}}while(n<i&&o<a);n-=w=d>>3,p&=(1<<(d-=w<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<a?a-o+257:257-(o-a),r.hold=p,r.bits=d}},function(t,e,r){"use strict";var n=r(133),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,u,f,h,c,l){var p,d,m,y,_,g,b,v,w,k=l.bits,M=0,x=0,S=0,E=0,A=0,B=0,D=0,R=0,P=0,I=0,T=null,U=0,F=new n.Buf16(16),O=new n.Buf16(16),C=null,L=0;for(M=0;M<=15;M++)F[M]=0;for(x=0;x<u;x++)F[e[r+x]]++;for(A=k,E=15;E>=1&&0===F[E];E--);if(A>E&&(A=E),0===E)return f[h++]=20971520,f[h++]=20971520,l.bits=1,0;for(S=1;S<E&&0===F[S];S++);for(A<S&&(A=S),R=1,M=1;M<=15;M++)if(R<<=1,(R-=F[M])<0)return-1;if(R>0&&(0===t||1!==E))return-1;for(O[1]=0,M=1;M<15;M++)O[M+1]=O[M]+F[M];for(x=0;x<u;x++)0!==e[r+x]&&(c[O[e[r+x]]++]=x);if(0===t?(T=C=c,g=19):1===t?(T=i,U-=257,C=o,L-=257,g=256):(T=s,C=a,g=-1),I=0,x=0,M=S,_=h,B=A,D=0,m=-1,y=(P=1<<A)-1,1===t&&P>852||2===t&&P>592)return 1;for(;;){b=M-D,c[x]<g?(v=0,w=c[x]):c[x]>g?(v=C[L+c[x]],w=T[U+c[x]]):(v=96,w=0),p=1<<M-D,S=d=1<<B;do{f[_+(I>>D)+(d-=p)]=b<<24|v<<16|w|0}while(0!==d);for(p=1<<M-1;I&p;)p>>=1;if(0!==p?(I&=p-1,I+=p):I=0,x++,0==--F[M]){if(M===E)break;M=e[r+c[x]]}if(M>A&&(I&y)!==m){for(0===D&&(D=A),_+=S,R=1<<(B=M-D);B+D<E&&!((R-=F[B+D])<=0);)B++,R<<=1;if(P+=1<<B,1===t&&P>852||2===t&&P>592)return 1;f[m=I&y]=A<<24|B<<16|_-h|0}}return 0!==I&&(f[_+I]=M-D<<24|64<<16|0),l.bits=A,0}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y={}.hasOwnProperty,_=function(t,e){for(var r in e)y.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};p=r(36),m=r(91),c=m.endian_reverse,f=m.WordArray,i=r(446).Counter,l=r(139).fixup_uint32,u=r(200).StreamCipher,d=r(139),h=function(t,e){var r,n,i,o;for(n=i=0,o=e.length;i<o;n=++i)r=e[n],t[n]+=r;return!1},o=function(e){function r(t,e){var n;if(r.__super__.constructor.call(this,20),this.key=t.clone().endian_reverse(),this.nonce=e.clone().endian_reverse(),(16!==this.key.sigBytes||8!==this.nonce.sigBytes)&&(32!==this.key.sigBytes||8!==(n=this.nonce.sigBytes)&&24!==n))throw new Error("Bad key/nonce lengths");24===this.nonce.sigBytes&&this.xsalsa_setup(),this.input=this.key_iv_setup(this.nonce,this.key),this._reset()}return _(r,e),r.prototype.sigma=f.from_buffer_le(t.from("expand 32-byte k")),r.prototype.tau=f.from_buffer_le(t.from("expand 16-byte k")),r.blockSize=64,r.prototype.blockSize=r.blockSize,r.keySize=32,r.prototype.keySize=r.keySize,r.ivSize=24,r.prototype.ivSize=r.ivSize,r.prototype.scrub=function(){return this.key.scrub(),this.nonce.scrub(),d.scrub_vec(this.input)},r.prototype.xsalsa_setup=function(){var t;return t=new f(this.nonce.words.slice(0,4)),this.nonce=new f(this.nonce.words.slice(4)),this.key=this.hsalsa20(t,this.key)},r.prototype.hsalsa20=function(t,e){var r,n,i,o;return(i=this.key_iv_setup(t,e))[8]=t.words[2],i[9]=t.words[3],o=this._core(i),n=[0,5,10,15,6,7,8,9],o=function(){var t,e,i;for(i=[],t=0,e=n.length;t<e;t++)r=n[t],i.push(l(o[r]));return i}(),d.scrub_vec(i),new f(o)},r.prototype.key_iv_setup=function(t,e){var r,n,i,o,s,a,u,f;for(o=[],i=s=0;s<4;i=++s)o[i+1]=e.words[i];for(n=(f=32===e.sigBytes?[this.sigma,e.words.slice(4)]:[this.tau,e.words])[0],r=f[1],i=a=0;a<4;i=++a)o[i+11]=r[i];for(i=u=0;u<4;i=++u)o[5*i]=n.words[i];return o[6]=t.words[0],o[7]=t.words[1],o},r.prototype.counter_setup=function(){return this.input[8]=this.counter.get().words[0],this.input[9]=this.counter.get().words[1]},r.prototype._reset=function(){return this.counter=new i({len:2})},r.prototype._generateBlock=function(){var t;return this.counter_setup(),t=this._core(this.input),h(t,this.input),this.counter.inc_le(),t},r}(s=function(){function t(t){this.rounds=t}return t.prototype._core=function(t){var e,r,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b;for(r=t[0],n=t[1],h=t[2],c=t[3],l=t[4],p=t[5],d=t[6],m=t[7],y=t[8],_=t[9],i=t[10],o=t[11],s=t[12],a=t[13],u=t[14],f=t[15],g=0,b=this.rounds;g<b;g+=2)r^=(e=(s^=(e=(y^=(e=(l^=(e=r+s|0)<<7|e>>>25)+r|0)<<9|e>>>23)+l|0)<<13|e>>>19)+y|0)<<18|e>>>14,p^=(e=(n^=(e=(a^=(e=(_^=(e=p+n|0)<<7|e>>>25)+p|0)<<9|e>>>23)+_|0)<<13|e>>>19)+a|0)<<18|e>>>14,i^=(e=(d^=(e=(h^=(e=(u^=(e=i+d|0)<<7|e>>>25)+i|0)<<9|e>>>23)+u|0)<<13|e>>>19)+h|0)<<18|e>>>14,f^=(e=(o^=(e=(m^=(e=(c^=(e=f+o|0)<<7|e>>>25)+f|0)<<9|e>>>23)+c|0)<<13|e>>>19)+m|0)<<18|e>>>14,r^=(e=(c^=(e=(h^=(e=(n^=(e=r+c|0)<<7|e>>>25)+r|0)<<9|e>>>23)+n|0)<<13|e>>>19)+h|0)<<18|e>>>14,p^=(e=(l^=(e=(m^=(e=(d^=(e=p+l|0)<<7|e>>>25)+p|0)<<9|e>>>23)+d|0)<<13|e>>>19)+m|0)<<18|e>>>14,i^=(e=(_^=(e=(y^=(e=(o^=(e=i+_|0)<<7|e>>>25)+i|0)<<9|e>>>23)+o|0)<<13|e>>>19)+y|0)<<18|e>>>14,f^=(e=(u^=(e=(a^=(e=(s^=(e=f+u|0)<<7|e>>>25)+f|0)<<9|e>>>23)+s|0)<<13|e>>>19)+a|0)<<18|e>>>14;return[r,n,h,c,l,p,d,m,y,_,i,o,s,a,u,f]},t}()),e.Salsa20WordStream=a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return _(e,t),e.prototype._reset=function(){return e.__super__._reset.call(this)},e.prototype.getWordArray=function(t){var e,r,n,i,o,s,a,u;for(null==t||t===this.blockSize?o=this._generateBlock():(n=Math.ceil(t/this.blockSize),e=function(){var t,e;for(e=[],r=t=0;0<=n?t<n:t>n;r=0<=n?++t:--t)e.push(this._generateBlock());return e}.call(this),o=(u=[]).concat.apply(u,e)),r=s=0,a=o.length;s<a;r=++s)i=o[r],o[r]=c(i);return new f(o,t)},e}(o),e.Salsa20=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return _(r,e),r.prototype._reset=function(){return r.__super__._reset.call(this),this._i=this.blockSize},r.prototype.getBytes=function(e){var r,n,i;if(null==e&&(e=this.blockSize),i=[],r=this.blockSize,this._i===r&&e===r)return this._generateBlockBuffer();for(;e>0;)this._i===r&&(this._generateBlockBuffer(),this._i=0),n=Math.min(e,r-this._i),i.push(n===r?this._buf:this._buf.slice(this._i,this._i+n)),this._i+=n,e-=n;return t.concat(i)},r.prototype._generateBlockBuffer=function(){var e,r,n,i,o;for(this._buf=t.alloc(this.blockSize),r=i=0,o=(n=this._generateBlock()).length;i<o;r=++i)e=n[r],this._buf.writeUInt32LE(l(e),4*r);return this._buf},r}(o),e.Cipher=n=function(t){function e(t){var r,n;n=t.key,r=t.iv,e.__super__.constructor.call(this),this.salsa=new a(n,r),this.bsiw=this.salsa.blockSize/4}return _(e,t),e.prototype.scrub=function(){return this.salsa.scrub()},e.prototype.get_pad=function(){return this.salsa.getWordArray()},e}(u),e.encrypt=function(t){var e,r,i,o,s;return o=t.key,i=t.iv,r=t.input,s=(e=new n({key:o,iv:i})).encrypt(r),e.scrub(),s},e.bulk_encrypt=function(t,e){var r,i,o,s,a,u,f,h;f=p.findDeferral(arguments),s=t.key,o=t.iv,i=t.input,a=t.progress_hook,r=new n({key:s,iv:o}),function(t){h=new p.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/salsa20.iced"}),r.bulk_encrypt({input:i,progress_hook:a,what:"salsa20"},h.defer({assign_fn:function(){return u=arguments[0]},lineno:256})),h._fulfill()}((function(){return r.scrub(),e(u)}))},e.Salsa20InnerCore=s,e.endian_reverse=c,e.asum=h}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;u=r(91),o=u.WordArray,s=u.X64Word,u.X64WordArray,n=r(200).Hasher,t=function(){function t(){this.RHO_OFFSETS=[],this.PI_INDEXES=[],this.ROUND_CONSTANTS=[],this.T=[],this.compute_rho_offsets(),this.compute_pi_indexes(),this.compute_round_constants(),this.make_reusables()}return t.prototype.compute_rho_offsets=function(){var t,e,r,n,i,o;for(r=1,n=0,o=[],e=i=0;i<24;e=++i)this.RHO_OFFSETS[r+5*n]=(e+1)*(e+2)/2%64,t=(2*r+3*n)%5,r=n%5,o.push(n=t);return o},t.prototype.compute_pi_indexes=function(){var t,e,r,n;for(n=[],t=r=0;r<5;t=++r)n.push(function(){var r,n;for(n=[],e=r=0;r<5;e=++r)n.push(this.PI_INDEXES[t+5*e]=e+(2*t+3*e)%5*5);return n}.call(this));return n},t.prototype.compute_round_constants=function(){var t,e,r,n,i,o,a,u,f;for(t=1,f=[],r=a=0;a<24;r=++a){for(o=0,i=0,n=u=0;u<7;n=++u)1&t&&((e=(1<<n)-1)<32?i^=1<<e:o^=1<<e-32),128&t?t=t<<1^113:t<<=1;f.push(this.ROUND_CONSTANTS[r]=new s(o,i))}return f},t.prototype.make_reusables=function(){return this.T=function(){var t,e;for(e=[],t=0;t<25;++t)e.push(new s(0,0));return e}()},t}(),a=new t,e.KECCAK=i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.outputLength=512,e.prototype.outputLength=e.outputLength,e.blockSize=(1600-2*e.outputLength)/32,e.prototype.blockSize=e.blockSize,e.output_size=e.outputLength/8,e.prototype.output_size=e.output_size,e.prototype.pad=1,e.prototype._doReset=function(){return this._state=function(){var t,e;for(e=[],t=0;t<25;++t)e.push(new s(0,0));return e}()},e.prototype._doProcessBlock=function(t,e){var r,n,i,o,s,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P,I,T,U,F,O,C,L,N,z;for(r=a,S=this._state,w=this.blockSize/2,y=P=0;0<=w?P<w:P>w;y=0<=w?++P:--P)n=16711935&((n=t[e+2*y])<<8|n>>>24)|4278255360&(n<<24|n>>>8),i=16711935&((i=t[e+2*y+1])<<8|i>>>24)|4278255360&(i<<24|i>>>8),(_=S[y]).high^=i,_.low^=n;for(z=[],M=I=0;I<24;M=++I){for(D=T=0;T<5;D=++T){for(B=A=0,R=U=0;U<5;R=++U)B^=(_=S[D+5*R]).high,A^=_.low;(f=r.T[D]).high=B,f.low=A}for(D=F=0;F<5;D=++F)for(m=r.T[(D+4)%5],p=(h=r.T[(D+1)%5]).high,l=h.low,B=m.high^(p<<1|l>>>31),A=m.low^(l<<1|p>>>31),R=O=0;O<5;R=++O)(_=S[D+5*R]).high^=B,_.low^=A;for(g=C=1;C<25;g=++C)v=(_=S[g]).high,b=_.low,(k=r.RHO_OFFSETS[g])<32?(B=v<<k|b>>>32-k,A=b<<k|v>>>32-k):(B=b<<k-32|v>>>64-k,A=v<<k-32|b>>>64-k),(u=r.T[r.PI_INDEXES[g]]).high=B,u.low=A;for(o=r.T[0],E=S[0],o.high=E.high,o.low=E.low,D=L=0;L<5;D=++L)for(R=N=0;N<5;R=++N)_=S[g=D+5*R],s=r.T[g],c=r.T[(D+1)%5+5*R],d=r.T[(D+2)%5+5*R],_.high=s.high^~c.high&d.high,_.low=s.low^~c.low&d.low;_=S[0],x=r.ROUND_CONSTANTS[M],_.high^=x.high,z.push(_.low^=x.low)}return z},e.prototype._doFinalize=function(){var t,e,r,n,i,s,a,u,f,h,c,l,p;for(r=(e=this._data).words,8*this._nDataBytes,f=8*e.sigBytes,t=32*this.blockSize,r[f>>>5]|=this.pad<<24-f%32,r[(Math.ceil((f+1)/t)*t>>>5)-1]|=128,e.sigBytes=4*r.length,this._process(),l=this._state,c=(h=this.outputLength/8)/8,n=[],i=p=0;0<=c?p<c:p>c;i=0<=c?++p:--p)u=16711935&((u=(s=l[i]).high)<<8|u>>>24)|4278255360&(u<<24|u>>>8),a=16711935&((a=s.low)<<8|a>>>24)|4278255360&(a<<24|a>>>8),n.push(a),n.push(u);return new o(n,h)},e.prototype.copy_to=function(t){var r;return e.__super__.copy_to.call(this,t),t._state=function(){var t,e,n,i;for(i=[],t=0,e=(n=this._state).length;t<e;t++)r=n[t],i.push(r.clone());return i}.call(this)},e.prototype.scrub=function(){},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(n),e.transform=function(t){var e;return e=(new i).finalize(t),t.scrub(),e}}).call(this)},function(t,e,r){(function(t){(function(){var n;n=r(41),e.make_time_packet=function(e){var r;return e||(e=Math.floor(Date.now()/1e3)),(r=t.alloc(4)).writeUInt32BE(e,0),r},e.calc_checksum=function(t){var e,r,n,i;for(r=0,e=n=0,i=t.length;0<=i?n<i:n>i;e=0<=i?++n:--n)r=(r+t.readUInt8(e))%65536;return r},e.encode_length=function(e,r){var n;return null==r&&(r=!1),n=null,e>=8384||r?((n=t.alloc(5)).writeUInt8(255,0),n.writeUInt32BE(e,1)):e<192?(n=t.alloc(1)).writeUInt8(e,0):e>=192&&e<8384&&(n=t.alloc(2)).writeUInt16BE(e-192+49152,0),n},e.ops_to_keyflags=function(t){var e;return e=0,t&n.ops.encrypt&&(e|=n.openpgp.key_flags.encrypt_comm),t&n.ops.decrypt&&(e|=n.openpgp.key_flags.encrypt_comm),t&n.ops.verify&&(e|=n.openpgp.key_flags.sign_data),t&n.ops.sign&&(e|=n.openpgp.key_flags.sign_data),e},e.fit_to_size=function(e,r){var n;return 0===(n=e-r.length)?r:n>0?t.concat([t.alloc(n),r]):n<0?r.slice(-e):void 0}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c;f=r(36),n=r(113).SHA512,r(41).openpgp,h=r(140).nbs,c=r(56),s=c.buffer_to_ui8a,o=c.bufeq_secure,i=r(112).SRF,u={MD5:[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],SHA1:[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],SHA224:[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28],SHA256:[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],SHA384:[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],SHA512:[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64]},e.emsa_pkcs1_encode=function(e,r,i){var o,a,f,c;return null==i&&(i={}),a=i.hasher||n,f=u[a.algname],c=r-f.length-3-a.output_length,o=t.concat([t.from([0,1]),t.from(function(){var t,e;for(e=[],t=0;0<=c?t<c:t>c;0<=c?++t:--t)e.push(255);return e}()),t.from([0]),t.from(f),e]),h(s(o),256)},e.emsa_pkcs1_decode=function(e,r){var n,i,s,a,f;if(n=f=null,a=0,e.length<2)n=new Error("signature was way too short: < 2 bytes");else if(1!==e.readUInt16BE(0))n=new Error("Sig verify error: Didn't get two-byte header 0x00 0x01");else{for(a=2;a<e.length&&255===e.readUInt8(a);)a++;a>=e.length||0!==e.readUInt8(a)?n=new Error("Sig verify error: Missed the 0x0 separator"):(a++,s=u[r.algname],o(t.from(s),e.slice(a,s.length+a))?(a+=s.length,(i=e.slice(a)).length!==r.output_length?n=new Error("Sig verify error: trailing garbage in signature"):f=i):n=new Error("Sig verify error: missing ASN header for "+r.algname))}return[n,f]},a=function(e,r){var n,o,s,a,u,h,c;h=f.findDeferral(arguments),o=[],function(t){var r;(r=function(t){var l,p;if(l=t,p=function(){return f.trampoline((function(){return r(t)}))},!(o.length<e))return l();a=e-o.length,c=new f.Deferrals((function(){var t;for(u=t=0;0<=a?t<a:t>a;u=0<=a?++t:--t)0!==(s=n.readUInt8(u))&&o.push(s);return p()}),{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/pad.iced"}),i().random_bytes(a,c.defer({assign_fn:function(){return n=arguments[0]},lineno:77})),c._fulfill()})(t)}((function(){return r(t.from(o))}))},e.eme_pkcs1_encode=function(e,r,n){var i,o,u,c,l,p,d;p=f.findDeferral(arguments),l=u=null,function(n){if(e.length>r-11)return n(u=new Error("cannot encrypt message -- it's too long!"));c=r-3-e.length,function(t){d=new f.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/pad.iced",funcname:"eme_pkcs1_encode"}),a(c,d.defer({assign_fn:function(){return i=arguments[0]},lineno:93})),d._fulfill()}((function(){return o=t.concat([t.from([0,2]),i,t.from([0]),e]),n(l=h(s(o),256))}))}((function(){return n(u,l)}))},e.eme_pkcs1_decode=function(t){var e,r,n;if(e=n=null,t.length<12)e=new Error("Ciphertext too short, needs to be >= 12 bytes");else if(2!==t.readUInt16BE(0))e=new Error("Failed to find expected header: 0x00 0x02");else{for(r=2;r<t.length&&0!==t.readUInt8(r);)r++;r>=t.length?e=new Error("didn't get 0x00 seperator octet"):(r++,n=t.slice(r))}return[e,n]},e.ecc_pkcs5_pad_data=function(e){var r,n,i,o;return r=i=null,(n=40-e.length)<0?r=new Error("Pad underrun"):(o=function(){var t,e;for(e=[],t=0;0<=n?t<n:t>n;0<=n?t++:t--)e.push(n);return e}(),i=t.concat([e,t.from(o)])),[r,i]},e.ecc_pkcs5_unpad_data=function(t,e){var r,n,i,o,s,a;if(n=null,(o=t.length-e)<0)n=new Error("Pad length was < 0; pad underrun");else if(t.length%8!=0)n=new Error("Padded data must be a multiple of 8 bytes long");else for(i=s=e,a=t.length;e<=a?s<a:s>a;i=e<=a?++s:--s)if((r=t.readUInt8(i))!==o){n=new Error("Got bad PKCS#5 pad character "+r+" at position "+i+"; wanted "+o);break}return n}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l;i=r(41).openpgp.symmetric_key_algorithms,c=r(101),n=c.ciphers.AES,o=r(1340).CAST5,s=r(235).SlicerBuffer,a=c.WordArray,l=r(56).uint_to_buffer,f=r(418).ecc_pkcs5_unpad_data,e.get_cipher=h=function(t){var e;return t||(t=i.AES256),(e=function(){switch(t){case i.AES128:return{klass:n,key_size:16};case i.AES192:return{klass:n,key_size:24};case i.AES256:return{klass:n,key_size:32};case i.CAST5:return{klass:o,key_size:o.keySize};default:throw new Error("unknown cipher: "+t)}}()).type=t,e},e.checksum2=u=function(t){var e,r,n,i;for(r=0,e=n=0,i=t.length;0<=i?n<i:n>i;e=0<=i?++n:--n)r=r+t.readUInt8(e)&65535;return r},e.import_key_pgp=function(t,e){var r,n,i,o,c;if(null==e&&(e=!1),c=new s(t),null,n=h(c.read_uint8()),o=c.read_buffer(n.key_size),r=c.read_uint16(),null!=(i=u(o)!==r?new Error("Checksum mismatch"):e?f(t,c.offset()):c.rem()?new Error("Junk at the end of input"):null))throw i;return new n.klass(a.from_buffer(o))},e.export_key_pgp=function(e,r){var n;return n=u(r),t.concat([t.from([e]),r,l(16,n)])}}).call(this)}).call(this,r(12).Buffer)},function(t,e){(function(){var t;t=function(){function t(){}return t.prototype.fetch=function(t,e,r){return r(new Error("not implemented"))},t}(),e.KeyFetcher=t}).call(this)},,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P={}.hasOwnProperty,I=function(t,e){for(var r in e)P.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};w=r(36),(E=r(1316)).naive_is_prime,S=E.random_prime,(m=r(140)).nbits,x=m.nbv,m.nbi,s=m.BigInteger,A=r(56),y=A.bufeq_secure,n=A.ASP,M=r(73).make_esc,k=r(41),a=k.openpgp,k.kb,p=r(113).SHA512,B=r(418),g=B.eme_pkcs1_encode,_=B.eme_pkcs1_decode,b=B.emsa_pkcs1_decode,v=B.emsa_pkcs1_encode,D=r(112),d=D.SRF,u=D.MRF,R=r(207),i=R.BaseKey,o=R.BaseKeyPair,c=function(t){function e(t){this.p=t.p,this.q=t.q,this.d=t.d,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.u=t.u,this.pub=t.pub}return I(e,t),e.prototype.decrypt=function(t,e){var r,n,i,o;n=w.findDeferral(arguments),(o=this,function(e){i=new w.Deferrals(e,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Priv.decrypt"}),o.mod_pow_d_crt(t,i.defer({assign_fn:function(){return r=arguments[0]},lineno:22})),i._fulfill()})((function(){return e(null,r)}))},e.prototype.sign=function(t,e){return this.mod_pow_d_crt(t,e)},e.ORDER=["d","p","q","u"],e.prototype.ORDER=e.ORDER,e.prototype.n=function(){return this.p.multiply(this.q)},e.prototype.phi=function(){return this.p.subtract(s.ONE).multiply(this.q.subtract(s.ONE))},e.prototype.lambda=function(){return this.phi.divide(this.p.subtract(s.ONE).gcd(this.q.subtract(s.ONE)))},e.alloc=function(t,r){return i.alloc(e,t,{pub:r})},e.prototype.mod_pow_d_crt=function(t,e){var r,n,i,o,a,u,f,h,c,l,p,m;l=w.findDeferral(arguments),null==this.dP&&(this.dP=this.d.mod(this.p.subtract(s.ONE))),null==this.dQ&&(this.dQ=this.d.mod(this.q.subtract(s.ONE))),null==this.qInv&&(this.qInv=this.q.modInverse(this.p)),r=this.pub.n,function(t){p=new w.Deferrals(t,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Priv.mod_pow_d_crt"}),d().random_zn(r,p.defer({assign_fn:function(){return n=arguments[0]},lineno:141})),p._fulfill()}((m=this,function(){for(o=n.modInverse(r),i=n.modPow(m.pub.e,r),a=t.multiply(i).mod(r),u=a.mod(m.p).modPow(m.dP,m.p),f=a.mod(m.q).modPow(m.dQ,m.q);u.compareTo(f)<0;)u=u.add(m.p);return c=u.subtract(f).multiply(m.qInv).mod(m.p).multiply(m.q).add(f),h=c.multiply(o).mod(r),e(h)}))},e}(i),l=function(t){function e(t){this.n=t.n,this.e=t.e}return I(e,t),e.type=a.public_key_algorithms.RSA,e.prototype.type=e.type,e.ORDER=["n","e"],e.prototype.ORDER=e.ORDER,e.prototype.encrypt=function(t,e){return this.mod_pow(t,this.e,e)},e.prototype.verify=function(t,e){return this.mod_pow(t,this.e,e)},e.prototype.nbits=function(){var t;return null!=(t=this.n)?t.bitLength():void 0},e.alloc=function(t){return i.alloc(e,t)},e.prototype.mod_pow=function(t,e,r){return r(t.modPow(e,this.n))},e.prototype.validity_check=function(t){return t(this.n.gcd(this.e).equals(s.ONE)?this.n.mod(x(2)).equals(s.ONE)?this.e.compareTo(s.ONE)<=0?new Error("e <= 1"):this.e.bitLength()>32?new Error("e="+this.e+" > 2^32"):null:new Error("n % 2 != 1"):new Error("gcd(n,e) != 1"))},e}(i),h=function(e){function r(t){var e,n;e=t.priv,n=t.pub,r.__super__.constructor.call(this,{priv:e,pub:n})}return I(r,e),r.type=a.public_key_algorithms.RSA,r.prototype.type=r.type,r.prototype.get_type=function(){return this.type},r.klass_name="RSA",r.Pub=l,r.prototype.Pub=l,r.Priv=c,r.prototype.Priv=c,r.parse=function(t){return o.parse(r,t)},r.alloc=function(t){var e,r;return r=t.pub,e=t.priv,o.alloc({pub:r,priv:e})},r.subkey_algo=function(t){return r},r.prototype.sanity_check=function(t){var e,r,n,i,o,s,a,f,h,c;f=w.findDeferral(arguments),e=0===this.priv.n().compareTo(this.pub.n)?null:new Error("pq != n"),(c=this,function(t){if(null!=e)return t();r=u().random_zn(c.pub.n),function(t){h=new w.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),c.encrypt(r,h.defer({assign_fn:function(){return n=arguments[0]},lineno:240})),h._fulfill()}((function(){!function(t){h=new w.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),c.decrypt(n,h.defer({assign_fn:function(){return e=arguments[0],i=arguments[1]},lineno:241})),h._fulfill()}((function(){return t(null==e&&0!==r.compareTo(i)?e=new Error("Decrypt/encrypt failed"):void 0)}))}))})(function(r){return function(){!function(t){if(null!=e)return t();o=u().random_zn(r.pub.n),function(t){h=new w.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),r.sign(o,h.defer({assign_fn:function(){return s=arguments[0]},lineno:246})),h._fulfill()}((function(){!function(t){h=new w.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.sanity_check"}),r.verify(s,h.defer({assign_fn:function(){return a=arguments[0]},lineno:247})),h._fulfill()}((function(){return t(0!==o.compareTo(a)&&(e=new Error("Sign/verify failed")))}))}))}((function(){return t(e)}))}}(this))},r.parse_sig=function(t){var e,r,n,i;if(e=(i=m.mpi_from_buffer(t.peek_rest_to_buffer()))[0],n=i[1],i[2],r=i[3],null!=e)throw e;return t.advance(r),n},r.prototype.encrypt=function(t,e){return this.pub.encrypt(t,e)},r.prototype.decrypt=function(t,e){return this.priv.decrypt(t,e)},r.prototype.max_value=function(){return this.pub.n},r.make=function(t){var e,n,i,o,s,a,u,f,h,p,d,m;return u=t.p,p=t.q,o=t.e,t.phi,f=t.p1,d=t.q1,s=t.lambda,a=u.multiply(p),n=(e=o.modInverse(s)).mod(f),i=e.mod(d),m=u.modInverse(p),h=new l({n:a,e:o}),new r({priv:new c({p:u,q:p,d:e,dmp1:n,dmq1:i,u:m,pub:h}),pub:h})},r.prototype.to_openpgp=function(){var t;return(t=new((new RSA).keyObject)).n=this.pub.n,t.e=this.pub.e.intValue(),t.ee=this.pub.e,t.d=this.priv.d,t.p=this.priv.p,t.q=this.priv.q,t.dmp1=this.priv.dmp1,t.dmq1=this.priv.dmq1,t.u=this.priv.u,t},r.prototype.sign=function(t,e){return this.priv.sign(t,e)},r.prototype.verify=function(t,e){return this.pub.verify(t,e)},r.prototype.pad_and_encrypt=function(t,e,r){var n,i,o,s,a,u,f;a=w.findDeferral(arguments),i=s=null,(f=this,function(e){u=new w.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.pad_and_encrypt"}),g(t,f.pub.n.mpi_byte_length(),u.defer({assign_fn:function(){return i=arguments[0],o=arguments[1]},lineno:306})),u._fulfill()})(function(t){return function(){!function(e){if(null!=i)return e();!function(e){u=new w.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.pad_and_encrypt"}),t.encrypt(o,u.defer({assign_fn:function(){return n=arguments[0]},lineno:308})),u._fulfill()}((function(){return e(s=t.export_output({y_mpi:n}))}))}((function(){return r(i,s)}))}}(this))},r.prototype.decrypt_and_unpad=function(t,e,r){var n,i,o,s,a,u,f;a=w.findDeferral(arguments),i=s=null,(f=this,function(e){u=new w.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.decrypt_and_unpad"}),f.decrypt(t.y(),u.defer({assign_fn:function(){return i=arguments[0],o=arguments[1]},lineno:318})),u._fulfill()})(function(t){return function(){var e;return null==i&&(n=o.to_padded_octets(t.pub.n),e=_(n),i=e[0],s=e[1]),r(i,s)}}(this))},r.prototype.pad_and_sign=function(t,e,r){var n,i,o,s,a,u,f;a=w.findDeferral(arguments),(i=e.hasher)||(i=p),n=i(t),o=v(n,this.pub.n.mpi_byte_length(),{hasher:i}),(f=this,function(t){u=new w.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.pad_and_sign"}),f.sign(o,u.defer({assign_fn:function(){return s=arguments[0]},lineno:330})),u._fulfill()})((function(){return r(null,s.to_mpi_buffer())}))},r.prototype.verify_unpad_and_check_hash=function(e,r){var n,i,o,s,a,u,f,h,c,l,p,d;c=w.findDeferral(arguments),f=e.sig,i=e.data,a=e.hasher,s=e.hash,o=null,t.isBuffer(f)&&(p=m.mpi_from_buffer(f),o=p[0],f=p[1]),(d=this,function(t){if(null!=o)return t();!function(t){l=new w.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.verify_unpad_and_check_hash"}),d.verify(f,l.defer({assign_fn:function(){return h=arguments[0]},lineno:339})),l._fulfill()}((function(){var e;return n=h.to_padded_octets(d.pub.n),e=b(n,a),o=e[0],u=e[1],t(null==o?(s||(s=a(i)),y(u,s)?void 0:o=new Error("hash mismatch")):void 0)}))})((function(){return r(o)}))},r.generate=function(t,e){var i,o,a,u,f,h,c,l,p,d,m,y,_,g,b,v;b=w.findDeferral(arguments),p=t.nbits,h=t.iters,o=t.e,i=t.asp,o||(o=65537),a=o,p||(p=4096),h||(h=10),i||(i=new n({})),o=x(a),u=M(e,"generate_rsa_keypair"),f=!0,p>>=1,function(t){var e;(e=function(t){var r;if(r=function(){return w.trampoline((function(){return e(t)}))},!f)return t();v=new w.Deferrals((function(){v=new w.Deferrals((function(){v=new w.Deferrals((function(){v=new w.Deferrals((function(){var t;return d.compareTo(_)<=0&&(d=(t=[_,d])[0],_=t[1]),g=_.subtract(s.ONE),m=d.subtract(s.ONE),y=m.multiply(g),l=y.divide(g.gcd(m)),r(0!==y.gcd(o).compareTo(s.ONE)?("function"==typeof progress_hook&&progress_hook({what:"unlucky_phi"}),f=!0):f=!1)}),{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),i.progress({what:"found",q:_},u(v.defer({lineno:366}))),v._fulfill()}),{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),S({asp:i.section("q"),e:o,nbits:p,iters:h},u(v.defer({assign_fn:function(){return _=arguments[0]},lineno:365}))),v._fulfill()}),{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),i.progress({what:"found",p:d},u(v.defer({lineno:364}))),v._fulfill()}),{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.generate"}),S({asp:i.section("p"),e:o,nbits:p,iters:h},u(v.defer({assign_fn:function(){return d=arguments[0]},lineno:363}))),v._fulfill()})(t)}((function(){return c=r.make({p:d,q:_,e:o,phi:y,p1:m,q1:g,lambda:l}),e(null,c)}))},r.parse_output=function(t){return f.parse(t)},r.prototype.export_output=function(t){return new f(t)},r.prototype.validity_check=function(t){var e,r,n,i;r=w.findDeferral(arguments),(i=this,function(t){n=new w.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Pair.validity_check"}),i.pub.validity_check(n.defer({assign_fn:function(){return e=arguments[0]},lineno:391})),n._fulfill()})((function(){return t(e)}))},r}(o),f=function(){function t(t){this.y_mpi=t.y_mpi,this.y_buf=t.y_buf}return t.parse=function(e){var r,n,i,o;if(r=(o=m.mpi_from_buffer(e))[0],i=o[1],n=o[2],o[3],null!=r)throw r;if(0!==n.length)throw new Error("junk at the end of input");return new t({y_mpi:i})},t.prototype.y=function(){return this.y_mpi},t.prototype.hide=function(t,e){var r,n,i,o,s,a,u,f;a=w.findDeferral(arguments),i=t.key,o=t.max,s=t.slosh,o||(o=8192),s||(s=128),(f=this,function(t){u=new w.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/rsa.iced",funcname:"Output.hide"}),i.hide({i:f.y(),max:o,slosh:s},u.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:417})),u._fulfill()})(function(t){return function(){return null==r&&(t.y_mpi=n,t.y_buf=null),e(r)}}(this))},t.prototype.find=function(t){var e;return e=t.key,this.y_mpi=e.find(this.y_mpi)},t.prototype.output=function(){return this.y_buf||this.y_mpi.to_mpi_buffer()},t}(),e.RSA=e.Pair=h,e.Output=f}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;u=r(36),o=r(91).WordArray,i=r(200).StreamCipher,n=function(){function t(t){var e,r;r=t.value,e=t.len,this._value=null!=r?r.clone():(null==e&&(e=2),new o(function(){var t,r;for(r=[],t=0;0<=e?t<e:t>e;0<=e?++t:--t)r.push(0);return r}()))}return t.prototype.WORD_MAX=4294967295,t.prototype.inc=function(){var e,r;for(e=!0,r=this._value.words.length-1;e&&r>=0;)++this._value.words[r]>t.WORD_MAX?this._value.words[r]=0:e=!1,r--;return this},t.prototype.inc_le=function(){var e,r;for(e=!0,r=0;e&&r<this._value.words.length;)++this._value.words[r]>t.WORD_MAX?this._value.words[r]=0:e=!1,r++;return this},t.prototype.get=function(){return this._value},t.prototype.copy=function(){return this._value.clone()},t}(),t=function(t){function e(t){if(this.block_cipher=t.block_cipher,this.iv=t.iv,e.__super__.constructor.call(this),this.bsiw=this.block_cipher.blockSize/4,this.iv.sigBytes!==this.block_cipher.blockSize)throw new Error("IV is wrong length ("+this.iv.sigBytes+")");this.ctr=new n({value:this.iv})}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.scrub=function(){return this.block_cipher.scrub()},e.prototype.get_pad=function(){var t;return t=this.ctr.copy(),this.ctr.inc(),this.block_cipher.encryptBlock(t.words),t},e}(i),a=function(e){var r,n,i,o,s;return r=e.block_cipher,o=e.iv,i=e.input,s=(n=new t({block_cipher:r,iv:o})).encrypt(i),n.scrub(),s},s=function(e,r){var n,i,o,s,a,f,h,c,l;c=u.findDeferral(arguments),n=e.block_cipher,s=e.iv,o=e.input,a=e.progress_hook,h=e.what,i=new t({block_cipher:n,iv:s}),function(t){l=new u.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/triplesec/src/ctr.iced"}),i.bulk_encrypt({input:o,progress_hook:a,what:h},l.defer({assign_fn:function(){return f=arguments[0]},lineno:121})),l._fulfill()}((function(){return r(f)}))},e.Counter=n,e.Cipher=t,e.encrypt=a,e.bulk_encrypt=s}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g={}.hasOwnProperty,b=function(t,e){for(var r in e)g.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};p=r(36),(c=r(140)).nbits,c.nbv,c.BigInteger,(m=r(56)).uint_to_buffer,m.bufeq_secure,m.ASP,r(73).make_esc,d=r(41),s=d.openpgp,d.kb,y=r(207),o=y.BaseKeyPair,i=y.BaseKey,_=r(793),l=_.generate,n=_.BaseEccKey,a=r(448).ECDH,h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return b(e,t),e.type=s.public_key_algorithms.ECDSA,e.prototype.type=e.type,e.prototype.nbits=function(){return this.curve.nbits()},e.prototype.read_params=function(t){},e.prototype.trunc_hash=function(t){return c.bn_from_left_n_bits(t,this.nbits())},e.alloc=function(t){return n.alloc(e,t)},e.prototype.verify=function(t,e,r){var n,i,o,s,a,u,f,h;return s=t[0],a=t[1],n=null,i=this.trunc_hash(e),s.signum()<=0||s.compareTo(this.curve.p)>0?n=new Error("bad r"):s.signum()<=0||a.compareTo(this.curve.p)>0?n=new Error("bad s"):(o=this.curve.n,h=a.modInverse(o),u=i.multiply(h).mod(o),f=s.multiply(h).mod(o),this.curve.G.multiplyTwo(u,this.R,f).affineX.mod(o).equals(s)||(n=new Error("verification failed"))),r(n)},e}(n),f=function(t){function e(t){this.x=t.x,this.pub=t.pub}return b(e,t),e.ORDER=["x"],e.prototype.ORDER=e.ORDER,e.alloc=function(t,r){return i.alloc(e,t,{pub:r})},e.prototype.sign=function(t,e){var r,n,i,o,s,a,u,f,h,c,l;f=p.findDeferral(arguments),c=this.pub.curve,s=c.n,r=c.G,i=this.pub.trunc_hash(t),(l=this,function(t){h=new p.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdsa.iced",funcname:"Priv.sign"}),l.pub.curve.random_scalar(h.defer({assign_fn:function(){return o=arguments[0]},lineno:79})),h._fulfill()})(function(t){return function(){if(n=r.multiply(o),0===(a=n.affineX.mod(s)).signum())throw new Error("invalid r-value");return u=o.modInverse(s).multiply(i.add(t.x.multiply(a))).mod(s),e([a,u])}}(this))},e}(i),u=function(e){function r(t){var e,n;n=t.pub,e=t.priv,r.__super__.constructor.call(this,{pub:n,priv:e})}return b(r,e),r.Pub=h,r.prototype.Pub=h,r.Priv=f,r.prototype.Priv=f,r.type=s.public_key_algorithms.ECDSA,r.prototype.type=r.type,r.klass_name="ECDSA",r.prototype.get_type=function(){return this.type},r.parse=function(t){return o.parse(r,t)},r.prototype.can_encrypt=function(){return!1},r.subkey_algo=function(t){return t&(s.key_flags.certify_keys|s.key_flags.sign_data)?r:a},r.prototype.fulfills_flags=function(t){return(t&(s.key_flags.certify_keys|s.key_flags.sign_data))===t},r.prototype.verify_unpad_and_check_hash=function(t,e){var n,i,o,s;return s=t.sig,n=t.data,o=t.hasher,i=t.hash,this._dsa_verify_update_and_check_hash({sig:s,data:n,hasher:o,hash:i,klass:r},e)},r.prototype.pad_and_sign=function(e,r,n){var i,o,s,a,u,f,h;u=p.findDeferral(arguments),(o=r.hasher)||(o=SHA512),i=o(e),(h=this,function(t){f=new p.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdsa.iced",funcname:"Pair.pad_and_sign"}),h.priv.sign(i,f.defer({assign_fn:function(){return a=arguments[0]},lineno:134})),f._fulfill()})((function(){return n(null,t.concat(function(){var t,e,r;for(r=[],t=0,e=a.length;t<e;t++)s=a[t],r.push(s.to_mpi_buffer());return r}()))}))},r.parse_sig=function(t){var e,n,i,o,s;if(e=t.peek_rest_to_buffer(),n=(s=r.read_sig_from_buf(e))[0],o=s[1],i=s[2],null!=n)throw n;return t.advance(i),o},r.read_sig_from_buf=function(t){var e,r,n,i,o,s;return i=t.length,n=["r","s"],e=null,o=function(){var r,i,o,a;for(a=[],r=0,i=n.length;r<i;r++)n[r],null==e&&(o=c.mpi_from_buffer(t),e=o[0],s=o[1],t=o[2],a.push(s));return a}(),r=i-t.length,[e,o,r]},r.prototype.good_for_flags=function(){return s.key_flags.certify_keys|s.key_flags.sign_data},r.generate=function(t,e){var n,i;return i=t.nbits,n=t.asp,l({nbits:i,asp:n,Pair:r},e)},r}(o),e.ECDSA=e.Pair=u}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E={}.hasOwnProperty,A=function(t,e){for(var r in e)E.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};m=r(36),k=r(56),b=k.uint_to_buffer,k.bufeq_secure,k.ASP,_=r(73).make_esc,y=r(41),s=y.openpgp,M=r(207),o=M.BaseKeyPair,i=M.BaseKey,l=r(418).ecc_pkcs5_pad_data,x=r(793),p=x.generate,n=x.BaseEccKey,d=r(113),g=r(419),c=r(235).SlicerBuffer,S=r(1341),w=S.wrap,v=S.unwrap,h=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return A(r,e),r.type=s.public_key_algorithms.ECDH,r.prototype.type=r.type,r.prototype.apply_defaults=function(){return this.cipher||(this.cipher=g.get_cipher()),this.hasher||(this.hasher=d.SHA512)},r.prototype.read_params=function(t){var e,r,n,i;if((r=t.read_uint8())<(e=s.ecdh.param_bytes))throw new Error("Need at least "+e+" bytes of params; got "+r);if((i=t.read_uint8())!==(n=s.ecdh.version))throw new Error("Cannot deal with future extensions, byte="+i+"; wanted "+n);return this.hasher=d.alloc_or_throw(t.read_uint8()),this.cipher=g.get_cipher(t.read_uint8()),t.advance(r-3)},r.alloc=function(t){return n.alloc(r,t)},r.prototype.serialize_params=function(){return t.concat([b(8,s.ecdh.param_bytes),b(8,s.ecdh.version),b(8,this.hasher.type),b(8,this.cipher.type)])},r.prototype.serialize=function(){return t.concat([r.__super__.serialize.call(this),this.serialize_params()])},r.prototype.format_params=function(e){var r;return r=e.fingerprint,t.concat([b(8,this.curve.oid.length),this.curve.oid,b(8,this.type),this.serialize_params(),t.from("Anonymous Sender    ","utf8"),r])},r.prototype.kdf=function(e){var r,n,i,o,s;return r=e.X,s=e.params,o=this.cipher.key_size,n=this.curve.point_to_mpi_buffer_compact(r),i=t.concat([t.from([0,0,0,1]),n,s]),this.hasher(i).slice(0,o)},r.prototype.encrypt=function(t,e,r){var n,i,o,s,a,u,f,h,c;f=m.findDeferral(arguments),s=e.fingerprint,(c=this,function(t){h=new m.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdh.iced",funcname:"Pub.encrypt"}),c.curve.encrypt(c.R,h.defer({assign_fn:function(){return o=arguments[0].V,i=arguments[0].S},lineno:97})),h._fulfill()})(function(e){return function(){return u=e.format_params({fingerprint:s}),a=e.kdf({X:i,params:u}),n=w({key:a,plaintext:t,cipher:e.cipher}),r({V:o,C:n})}}(this))},r}(n),f=function(t){function e(t){this.x=t.x,this.pub=t.pub}return A(e,t),e.ORDER=["x"],e.prototype.ORDER=e.ORDER,e.prototype.serialize=function(){return this.pub.curve.coord_to_mpi_buffer(this.x)},e.alloc=function(t,r){var n,i,o,s,a,u,f,h,c;for(a=t.length,o=null,n=r.curve,i={pub:r},u=0,f=(h=e.ORDER).length;u<f;u++)s=h[u],null==o&&(o=(c=n.mpi_from_buffer(t))[0],i[s]=c[1],t=c[2]);return o?[o,null]:[null,new e(i),a-t.length]},e.prototype.decrypt=function(t,e,r){var n,i,o,s,a,u,f,h,c,l,p,d;l=m.findDeferral(arguments),u=e.fingerprint,a=_(r,"Priv::decrypt"),o=this.pub.curve,function(e){p=new m.Deferrals(e,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdh.iced",funcname:"Priv.decrypt"}),t.load_V(o,a(p.defer({assign_fn:function(){return i=arguments[0]},lineno:144}))),p._fulfill()}((d=this,function(){var e;return n=o.decrypt(d.x,i),h=d.pub.format_params({fingerprint:u}),f=d.pub.kdf({X:n,params:h}),e=v({key:f,ciphertext:t.C,cipher:d.pub.cipher}),s=e[0],c=e[1],r(s,c)}))},e}(i),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return A(e,t),e.Pub=h,e.prototype.Pub=h,e.Priv=f,e.prototype.Priv=f,e.type=s.public_key_algorithms.ECDH,e.prototype.type=e.type,e.klass_name="ECDH",e.prototype.get_type=function(){return this.type},e.prototype.fulfills_flags=function(t){return(t&(s.key_flags.encrypt_comm|s.key_flags.encrypt_storage))===t},e.prototype.can_sign=function(){return!1},e.parse=function(t){return o.parse(e,t)},e.prototype.max_value=function(){return this.pub.p},e.prototype.pad_and_encrypt=function(t,e,r){var n,i,o,s,a,u,f,h,c,p;f=m.findDeferral(arguments),s=e.fingerprint,o=u=null,c=l(t),o=c[0],a=c[1],(p=this,function(t){if(null!=o)return t();!function(t){h=new m.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdh.iced",funcname:"Pair.pad_and_encrypt"}),p.pub.encrypt(a,{fingerprint:s},h.defer({assign_fn:function(){return n=arguments[0].C,i=arguments[0].V},lineno:199})),h._fulfill()}((function(){return t(u=p.export_output({C:n,V:i,curve:p.pub.curve}))}))})((function(){return r(o,u)}))},e.prototype.decrypt_and_unpad=function(t,e,r){var n,i,o,s,a,u;s=m.findDeferral(arguments),i=e.fingerprint,n=null,(u=this,function(e){a=new m.Deferrals(e,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdh.iced",funcname:"Pair.decrypt_and_unpad"}),u.priv.decrypt(t,{fingerprint:i},a.defer({assign_fn:function(){return n=arguments[0],o=arguments[1]},lineno:207})),a._fulfill()})((function(){return r(n,o,!0)}))},e.parse_output=function(t){return a.parse(t)},e.prototype.export_output=function(t){return new a(t)},e.generate=function(t,r){var n,i,o,s,a,u,f;u=m.findDeferral(arguments),s=t.nbits,i=t.curve_name,n=t.asp,function(t){f=new m.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/ecc/ecdh.iced",funcname:"Pair.generate"}),p({nbits:s,asp:n,curve_name:i,Pair:e},f.defer({assign_fn:function(){return o=arguments[0],a=arguments[1]},lineno:218})),f._fulfill()}((function(){return null==o&&a.pub.apply_defaults(),r(o,a)}))},e}(o),a=function(){function e(t){this.V_buf=t.V_buf,this.C=t.C,this.V=t.V,this.curve=t.curve}return e.prototype.load_V=function(t,e){var r,n;return this.curve=t,r=(n=t.mpi_point_from_buffer(this.V_buf))[0],this.V=n[1],e(r,this.V)},e.parse=function(r){var n,i,o,s,a,u;if(s=(u=new c(r)).read_uint16(),a=Math.ceil(s/8),i=t.concat([r.slice(0,2),u.read_buffer(a)]),a=u.read_uint8(),(o=(n=u.consume_rest_to_buffer()).length)!==a)throw new Error("bad C input: wanted "+a+" bytes, but got "+o);return new e({V_buf:i,C:n})},e.prototype.get_V_buf=function(){return null==this.V_buf&&(this.V_buf=this.curve.point_to_mpi_buffer(this.V)),this.V_buf},e.prototype.hide=function(t,e){return t.key,t.max,t.slosh,e(null)},e.prototype.find=function(t){t.key},e.prototype.good_for_flags=function(){return C.key_flags.encrypt_comm|C.key_flags.encrypt_storage},e.prototype.output=function(){return t.concat([this.get_V_buf(),b(8,this.C.length),this.C])},e}(),e.ECDH=e.Pair=u}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t;t=r(73).make_errors,e.errors=t({WRONG_SIGNING_KEY:"wrong signing key specified",REVOKED_KEY:"key is revoked",UNSEAL:"packet unseal failed"})}).call(this)},function(t,e){(function(){var t,r,n,i,o,s={}.hasOwnProperty,a=function(t,e){for(var r in e)s.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=function(t){function e(t){var r,n,i;this.userid=t.userid,this.user_attribute=t.user_attribute,this.type=t.type,n=t.sig,this.options=t.options,r=t.key_expiration,i=t.sig_expiration,e.__super__.constructor.call(this,{sig:n,key_expiration:r,sig_expiration:i})}return a(e,t),e.prototype.typ=function(){return"self_sig"},e.prototype.push=function(t){var e,r;return t.self_sig.push(this),e=null!=this.userid?this.userid.utf8()||"":void 0,null==(r=t.self_sigs_by_uid[e])&&(r=[],t.self_sigs_by_uid[e]=r),r.push(this)},e}(t=function(){function t(t){this.sig=t.sig,this.key_expiration=t.key_expiration}return t.prototype.typ=function(){return"none"},t.prototype.get_key_flags=function(){return this.sig.get_key_flags()},t.prototype.push=function(t){return t[this.typ()].push(this)},t}()),o=function(t){function e(t){var r,n,i;this.primary=t.primary,n=t.sig,this.direction=t.direction,i=t.sig_expiration,r=t.key_expiration,e.__super__.constructor.call(this,{sig:n,key_expiration:r,sig_expiration:i})}return a(e,t),e.UP=1,e.DOWN=2,e.prototype.typ=function(){return"subkey_binding"},e.prototype.is_down=function(){return this.direction===e.DOWN},e}(t),n=function(t){function e(t){var r,n,i;this.key=t.key,n=t.sig,r=t.key_expiration,i=t.sig_expiration,e.__super__.constructor.call(this,{sig:n,key_expiration:r,sig_expiration:i})}return a(e,t),e.prototype.typ=function(){return"data"},e.prototype.get_key_manager=function(){var t;return null!=(t=this.sig)?t.key_manager:void 0},e}(t),r=function(){function t(){this.clear()}return t.prototype.clear=function(){return this.all=[],this.lookup={self_sig:[],self_sigs_by_uid:{},subkey_binding:[],data:[]}},t.prototype.push=function(t){return this.all.push(t),t.push(this.lookup)},t.prototype.is_signed_subkey_of=function(t,e){var r,n,i,o,s,a;for(i=r=!1,o=0,s=(a=this.lookup.subkey_binding).length;o<s;o++)if((n=a[o]).primary.equal(t)&&(n.is_down()?r=!0:i=!0,r&&(i||!e)))return!0;return!1},t.prototype.get_all_key_flags=function(){var t,e,r,n;for(t=0,e=0,r=(n=this.all).length;e<r;e++)t|=n[e].get_key_flags();return t},t.prototype.get_signed_userids=function(){var t,e,r,n,i;for(i=[],e=0,r=(n=this.lookup.self_sig).length;e<r;e++)null!=(t=n[e].userid)&&i.push(t);return i},t.prototype.get_signed_user_attributes=function(){var t,e,r,n,i;for(i=[],e=0,r=(n=this.lookup.self_sig).length;e<r;e++)null!=(t=n[e].user_attribute)&&i.push(t);return i},t.prototype.get_self_sig=function(){return this.lookup.self_sig.length?this.lookup.self_sig[0]:null},t.prototype.get_self_sigs=function(){return this.lookup.self_sig},t.prototype.is_self_signed=function(){return this.get_signed_userids().length>0},t.prototype.get_data_signer=function(){return this.lookup.data.length>0?this.lookup.data[0]:null},t.prototype.get_data_signers=function(){return this.lookup.data},t.prototype.get_subkey_binding=function(){return this.lookup.subkey_binding.length?this.lookup.subkey_binding[0]:null},t}(),e.SelfSig=i,e.SubkeyBinding=o,e.Data=n,e.Collection=r}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f={}.hasOwnProperty,h=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1};a=r(36),s=r(218).Packet,n=r(41).openpgp,r(369),u=r(56).uint_to_buffer,i=function(e){function r(t){this.format=t.format,this.filename=t.filename,this.date=t.date,this.data=t.data,r.__super__.constructor.call(this)}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.parse=function(t){return new o(t).parse()},r.prototype.toString=function(t){return null==t&&(t=null),this.data.toString(t||this.buffer_format())},r.prototype.toBuffer=function(){return this.data},r.prototype.buffer_format=function(){switch(this.format){case n.literal_formats.text:return"ascii";case n.literal_formats.utf8:return"utf8";default:return"binary"}},r.prototype.to_signature_payload=function(){return t.concat([this.data])},r.prototype.write_unframed=function(e){var r;return this.filename||(this.filename=t.from([])),r=[t.from([this.format]),u(8,this.filename.length),this.filename,u(32,this.date),this.data],e(null,t.concat(r))},r.prototype.write=function(t){var e,r,i,o,s,u;o=a.findDeferral(arguments),e=i=null,(u=this,function(t){s=new a.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/literal.iced",funcname:"Literal.write"}),u.write_unframed(s.defer({assign_fn:function(){return e=arguments[0],r=arguments[1]},lineno:41})),s._fulfill()})(function(o){return function(){return null==e&&(i=o.frame_packet(n.packet_tags.literal,r)),t(e,i)}}(this))},r.prototype.to_literal=function(){return this},r}(s),o=function(){function t(t){this.slice=t}return t.prototype.parse=function(){var t,e,r,o,s,a,u;if(a=function(){var t,e;for(s in e=[],t=n.literal_formats)u=t[s],e.push(u);return e}(),o=this.slice.read_uint8(),h.call(a,o)<0)throw new Error("unknwon format: "+o);return r=this.slice.read_string(),e=this.slice.read_uint32(),t=this.slice.consume_rest_to_buffer(),new i({format:o,filename:r,date:e,data:t})},t}(),e.Literal=i}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d,m,y;u=r(36),l=r(73).make_esc,r(420).OPS,c=r(41),t=c.openpgp,y=r(56),h=y.katch,y.unix_time,y.athrow,o=y.Warnings,a=y.bufeq_secure,p=r(531).parse,f=r(419).import_key_pgp,r(76),s=r(236),r(113),d=r(807).verify,m=r(809).verify,n=function(){function e(t,e){this.packets=t,this.verified_signatures=[],this.subkeys=[],this.primary=null,this.userids=[],this.user_attributes=[],this.warnings=new o,this.opts=e||{},null==this.opts.strict&&(this.opts.strict=!0)}return e.prototype.to_obj=function(){return{subkeys:this.subkeys,primary:this.primary,userids:this.userids}},e.prototype._extract_keys=function(){var t,e,r,n,i,o;if(t=null,this.packets.length)if((this.primary=this.packets[0]).is_primary())for(e=n=0,i=(o=this.packets.slice(1)).length;n<i;e=++n)(r=o[e]).is_key_material()&&null==t&&(r.key.is_toxic()?this.warnings.push("Ignoring toxic subkey (ElGamal Encrypt+Sign)"):r.is_primary()?a(r.get_fingerprint(),this.primary.get_fingerprint())?r.set_duplicate_primary():t=new Error("cannot have 2 primary keys"):this.subkeys.push(r));else t=new Error("First packet must be the primary key");else t=new Error("No packets; cannot extract a key");return t},e.prototype._check_keys=function(){return this._check_primary()||this._check_subkeys()},e.prototype._check_primary=function(){return this.primary.is_self_signed()?0===(this.userids=this.primary.get_signed_userids()).length?new Error("no valid Userid signed into key"):(this.user_attributes=this.primary.get_signed_user_attributes(),null):new Error("no valid primary key self-signature or key(s) have expired")},e.prototype._check_subkeys=function(){var t,e,r,n,i,o;for(n=this.subkeys,null,this.subkeys=[],t=i=0,o=n.length;i<o;t=++i)(e=n[t]).is_signed_subkey_of(this.primary,this.opts)?this.subkeys.push(e):(r="Subkey "+t+" was invalid; discarding",this.warnings.push(r));return null},e.prototype.process=function(t){var e,r,n,i;r=u.findDeferral(arguments),e=this._extract_keys(),(i=this,function(t){if(null!=e)return t();!function(t){n=new u.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"KeyBlock.process"}),i._verify_sigs(n.defer({assign_fn:function(){return e=arguments[0]},lineno:87})),n._fulfill()}(t)})(function(r){return function(){var n;return(null!=(n=r.opts)?n.no_check_keys:void 0)?null==e&&(r.userids=r.primary.get_signed_userids()):null==e&&(e=r._check_keys()),t(e)}}(this))},e.prototype._get_issuer=function(t,e,r){var n,i;return null!=(n=e.get_issuer_fingerprint())?[n,a(n,this.primary.get_fingerprint()),this.primary.get_fingerprint()]:null!=(i=e.get_issuer_key_id())?[i,a(i,this.primary.get_key_id()),this.primary.get_key_id()]:(this.warnings.push("Signature is missing an issuer (at packet="+t+")"),[null,!1])},e.prototype._verify_sigs=function(e){var r,n,i,o,s,a,f,h,c,l,p,d,m;p=u.findDeferral(arguments),r=null,l=[],f=0,(m=this,function(e){var y,_,g;_=m.packets.slice(1),y=_.length,i=0,(g=function(e){var b,v,w;return b=e,w=v=function(){return u.trampoline((function(){return++i,g(e)}))},i<y?(h=_[i],null!=r?v():void function(t){if(h.is_signature())return t();f>0&&(f=0,l=[]),h.is_duplicate_primary()||l.push(h),v()}((function(){var e;f++,e=m._get_issuer(i,h,m.primary),o=e[0],s=e[1],n=e[2],function(e){if(null==o)return e();!function(e){if(s||h.type===t.sig_types.key_revocation)return e();m.warnings.push("Skipping signature by another issuer: "+(null!=o?o.toString("hex"):void 0)+" != "+(null!=n?n.toString("hex"):void 0)),v()}((function(){h.key=m.primary.key,h.primary=m.primary,h.is_third_party=!s,function(t){d=new u.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"KeyBlock._verify_sigs"}),h.verify(l,d.defer({assign_fn:function(){return c=arguments[0]},lineno:137}),m.opts),d._fulfill()}((function(){return e(null!=c?(a="Signature failure in packet "+i+": "+c.message+" ("+o.toString("hex")+")",m.warnings.push(a)):m.verified_signatures.push(h))}))}))}(w)}))):b()})(e)})((function(){return e(r)}))},e}(),i=function(){function e(t){this.keyfetch=t.keyfetch,this.data_fn=t.data_fn,this.data=t.data,this.strict=t.strict,this.now=t.now,this.assert_pgp_hash=t.assert_pgp_hash,this.literals=[],this.enc_data_packet=null,this.warnings=new o}return e.prototype._get_session_key=function(t){var e,r,n,i,o,s,a,f,h,l,p,d,m,y,_,g;y=u.findDeferral(arguments),s=[],n=[],r=null,p=!1,s=function(){var t;for(t=[];this.packets.length&&(h=this.packets[0].to_esk_packet());)n.push(h),this.packets.shift(),t.push(h.get_key_id());return t}.call(this),(g=this,function(t){if(!s.length)return t(e=!1);e=!0,function(t){_=new u.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._get_session_key"}),g.keyfetch.fetch(s,c.ops.decrypt,_.defer({assign_fn:function(){return r=arguments[0],f=arguments[1],o=arguments[2]},lineno:178})),_._fulfill()}((function(){!function(t){if(null!=r)return t();l=n[o],a=f.find_pgp_key_material(s[o]),i=a.get_fingerprint(),d=a.key,function(t){_=new u.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._get_session_key"}),d.decrypt_and_unpad(l.ekey,{fingerprint:i},_.defer({assign_fn:function(){return r=arguments[0],m=arguments[1],p=arguments[2]},lineno:184})),_._fulfill()}((function(){return t(null==r?g.encryption_subkey=a:void 0)}))}(t)}))})((function(){return t(r,e,m,p)}))},e.prototype._find_encrypted_data=function(t){var e,r;return e=r=null,this.packets.length&&(r=this.packets[0].to_enc_data_packet())?this.packets.pop():e=new Error("Could not find encrypted data packet"),t(e,r)},e.prototype._decrypt_with_session_key=function(t,e,r,n){var i,o,s,a,c,l;a=u.findDeferral(arguments),l=h((function(){return f(t,r)})),o=l[0],i=l[1],function(t){if(null!=o)return t();!function(t){c=new u.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt_with_session_key"}),e.decrypt({cipher:i},c.defer({assign_fn:function(){return o=arguments[0],s=arguments[1]},lineno:206})),c._fulfill()}(t)}((function(){return n(o,s)}))},e.prototype._parse=function(t,e){var r;return e((r=p(t))[0],r[1])},e.prototype._decrypt=function(t){var e,r,n,i,o,s,a,f,h,c;f=u.findDeferral(arguments),r=l(t,"Message::decrypt"),(c=this,function(t){h=new u.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),c._get_session_key(r(h.defer({assign_fn:function(){return n=arguments[0],a=arguments[1],o=arguments[2]},lineno:219}))),h._fulfill()})(function(c){return function(){!function(t){if(!n)return t();!function(t){h=new u.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),c._find_encrypted_data(r(h.defer({assign_fn:function(){return e=arguments[0]},lineno:221}))),h._fulfill()}((function(){!function(t){h=new u.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),c._decrypt_with_session_key(a,e,o,r(h.defer({assign_fn:function(){return s=arguments[0]},lineno:222}))),h._fulfill()}((function(){!function(t){h=new u.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._decrypt"}),c._parse(s,r(h.defer({assign_fn:function(){return i=arguments[0]},lineno:223}))),h._fulfill()}((function(){return t(c.packets=i.concat(c.packets))}))}))}))}((function(){return t(null)}))}}(this))},e.prototype._inflate=function(t){var e,r,n,i,o,s,a;o=u.findDeferral(arguments),i=[],e=l(t,"Message::_inflate"),(a=this,function(t){var f,h,c,l;c=a.packets,h=c.length,f=0,(l=function(t){var p;if(p=function(){return u.trampoline((function(){return++f,l(t)}))},!(f<h))return t();n=c[f],s=new u.Deferrals((function(){!function(t){if(null==r)return t(i.push(n));!function(t){s=new u.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._inflate"}),a._parse(r,e(s.defer({assign_fn:function(){return n=arguments[0]},lineno:235}))),s._fulfill()}((function(){return t(i.push.apply(i,n))}))}(p)}),{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._inflate"}),n.inflate(e(s.defer({assign_fn:function(){return r=arguments[0]},lineno:233}))),s._fulfill()})(t)})(function(e){return function(){return e.packets=i,t(null)}}(this))},e.prototype._frame_signatures=function(){var e,r,n,i,o,s,a,u,f,h;for(i=[],o=[],n=[],s=0,u=(h=this.packets).length;s<u;s++)(r=h[s]).tag===t.packet_tags.one_pass_sig?o.push({open:r}):o.length&&(r.tag===t.packet_tags.signature?((e=o.pop()).close=r,i.push(e)):n.push(r));for(a=0,f=i.length;a<f;a++)(e=i[a]).payload=n;return i},e.prototype._verify_sig=function(t,e){var r,n,i,o,s,f,h,l;f=u.findDeferral(arguments),i=null,a(r=t.open.key_id,n=t.close.get_key_id())||(i=new Error("signature mismatch open v close: "+(null!=r?r.toString("hex"):void 0)+" != "+(null!=n?n.toString("hex"):void 0))),(l=this,function(t){if(null!=i)return t();!function(t){h=new u.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._verify_sig"}),l.keyfetch.fetch([r],c.ops.verify,h.defer({assign_fn:function(){return i=arguments[0],s=arguments[1],arguments[2]},lineno:274})),h._fulfill()}((function(){return t(null!=i?i=new Error("Can't find a key for "+r.toString("hex")+": "+i.message):void 0)}))})(function(n){return function(){!function(e){if(null!=i)return e(n.strict||(n.warnings.push("Problem fetching key "+r.toString("hex")+": "+i.toString()),i=null));o=s.find_pgp_key_material(r),t.close.key=o.key,t.close.subkey_material=o,t.close.key_manager=s,function(e){h=new u.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._verify_sig"}),t.close.verify(t.payload,h.defer({assign_fn:function(){return i=arguments[0]},lineno:289}),{now:n.now,assert_pgp_hash:n.assert_pgp_hash}),h._fulfill()}(e)}((function(){return e(i)}))}}(this))},e.prototype._verify=function(t){var e,r,n,i,o,s;i=u.findDeferral(arguments),e=l(t,"Message::_verify_sigs"),n=this._frame_signatures(),(s=this,function(t){var a,f,h,c;f=(h=n).length,a=0,(c=function(t){var n;if(n=function(){return u.trampoline((function(){return++a,c(t)}))},!(a<f))return t();r=h[a],function(t){o=new u.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._verify"}),s._verify_sig(r,e(o.defer({lineno:303}))),o._fulfill()}(n)})(t)})((function(){return t(null)}))},e.prototype.collect_literals=function(){var e,r,n,i,o;for(o=[],r=0,n=(i=this.packets).length;r<n;r++)(e=i[r]).tag===t.packet_tags.literal&&o.push(e);return o},e.prototype._process_generic=function(t,e){var r,n,i,o,s;i=u.findDeferral(arguments),n=t.packets,this.packets=n,r=l(e,"Message:process"),(s=this,function(t){o=new u.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._process_generic"}),s._decrypt(r(o.defer({lineno:316}))),o._fulfill()})(function(t){return function(){o=new u.Deferrals((function(){o=new u.Deferrals((function(){return e(null,t.collect_literals())}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._process_generic"}),t._verify(r(o.defer({lineno:318}))),o._fulfill()}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._process_generic"}),t._inflate(r(o.defer({lineno:317}))),o._fulfill()}}(this))},e.prototype._verify_clearsign=function(t,e){var r,n,i,o,s,a,f;s=u.findDeferral(arguments),o=t.packets,r=t.clearsign,(f=this,function(t){if(null==r)return t(n=new Error("no clearsign data found"));!function(t){a=new u.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._verify_clearsign"}),d({packets:o,clearsign:r,keyfetch:f.keyfetch,now:f.now,assert_pgp_hash:f.assert_pgp_hash},a.defer({assign_fn:function(){return n=arguments[0],i=arguments[1]},lineno:327})),a._fulfill()}(t)})((function(){return e(n,[i])}))},e.prototype.parse_and_inflate=function(t,e){var r,n,i,o;n=u.findDeferral(arguments),r=l(e,"Message::parse_and_inflate"),(o=this,function(e){var s;i=new u.Deferrals(e,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message.parse_and_inflate"}),o._parse(t,r(i.defer({assign_fn:(s=o,function(){return s.packets=arguments[0]}),lineno:334}))),i._fulfill()})(function(t){return function(){i=new u.Deferrals((function(){return e(null,t.collect_literals())}),{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message.parse_and_inflate"}),t._inflate(r(i.defer({lineno:335}))),i._fulfill()}}(this))},e.prototype.parse_and_process=function(t,e){var r,n,i,o,s,a;o=u.findDeferral(arguments),r=l(e,"Message::parse_and_process"),(a=this,function(e){s=new u.Deferrals(e,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message.parse_and_process"}),a._parse(t.body,r(s.defer({assign_fn:function(){return i=arguments[0]},lineno:342}))),s._fulfill()})(function(a){return function(){s=new u.Deferrals((function(){return e(null,n)}),{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message.parse_and_process"}),a._process({msg:t,packets:i},r(s.defer({assign_fn:function(){return n=arguments[0]},lineno:343}))),s._fulfill()}}(this))},e.prototype._verify_signature=function(t,e){var r,n,i,o,s,a;o=u.findDeferral(arguments),i=t.packets,(a=this,function(t){if(null==a.data&&null==a.data_fn)return t(r=new Error("Cannot verify detached signature without data input"));!function(t){s=new u.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._verify_signature"}),m({packets:i,data:a.data,data_fn:a.data_fn,keyfetch:a.keyfetch,now:a.now,assert_pgp_hash:a.assert_pgp_hash},s.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:352})),s._fulfill()}(t)})((function(){return e(r,n)}))},e.prototype._process=function(e,r){var n,i,o,s,a,f,h;a=u.findDeferral(arguments),o=e.msg,s=e.packets,o.type||(o.type=t.message_types.generic),(h=this,function(e){switch(o.type){case t.message_types.generic:!function(t){f=new u.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._process"}),h._process_generic({packets:s},f.defer({assign_fn:function(){return n=arguments[0],i=arguments[1]},lineno:361})),f._fulfill()}(e);break;case t.message_types.clearsign:!function(t){f=new u.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._process"}),h._verify_clearsign({packets:s,clearsign:o.clearsign},f.defer({assign_fn:function(){return n=arguments[0],i=arguments[1]},lineno:363})),f._fulfill()}(e);break;case t.message_types.signature:!function(t){f=new u.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced",funcname:"Message._process"}),h._verify_signature({packets:s},f.defer({assign_fn:function(){return n=arguments[0],i=arguments[1]},lineno:365})),f._fulfill()}(e);break;default:return e(n=new Error("Needed a 'generic', 'clearsign', or 'signature' PGP message, got "+o.type))}})((function(){return r(n,i)}))},e}(),e.KeyBlock=n,e.Message=i,e.do_message=function(e,r){var n,o,a,f,h,c,l,p,d,m,y,_,g,b,v,w,k;v=u.findDeferral(arguments),n=e.armored,_=e.raw,d=e.msg_type,c=e.keyfetch,a=e.data_fn,o=e.data,g=e.strict,m=e.now,l=null,f=p=b=h=null,null!=n?(k=s.decode(n),f=k[0],p=k[1]):null!=_?(d||(d=t.message_types.generic),p={body:_,type:d}):f=new Error("No input to do_message; need either 'armored' or 'raw' input"),function(t){if(null!=f)return t();null==g&&(g=!0),y=new i({keyfetch:c,data_fn:a,data:o,strict:g,now:m}),function(t){w=new u.Deferrals(t,{parent:v,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/processor.iced"}),y.parse_and_process(p,w.defer({assign_fn:function(){return f=arguments[0],l=arguments[1]},lineno:413})),w._fulfill()}((function(){return b=y.warnings,t(h=y.encryption_subkey)}))}((function(){return r(f,l,b,h)}))}}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_;n=r(41).kb,y=r(113),s=y.alloc,i=y.SHA256,c=r(1351),(_=r(56)).katch,f=_.obj_extract,a=_.bufeq_secure,o=r(449).errors.UnsealError,u=t.alloc(0),h=function(t){return c.pack(t,{sort_keys:!0})},d=function(t){return c.unpack(t,{strict:!0})},p=function(t){var e,r,o,s,a;return o=t.obj,e=t.dohash,r=i,s={version:n.versions.V1,tag:o.tag,body:o.body},e&&(s.hash={type:r.type,value:u},a=h(s),s.hash.value=r(a)),h(s)},l=function(e){var r;return r=e.split(/\s+/).join(""),t.from(r,"base64")},m=function(t,e){var r,i,c,l,p,m,y;if(p=(null!=e?e:{}).strict,null!=(c=null!=(l=d(t))&&null!=(y=l.hash)?y.value:void 0)){if(l.hash.value=u,null==(i=s(m=l.hash.type)))throw new o("unknown hash algo: "+m);if(r=i(h(l)),!a(r,c))throw new o("hash mismatch");if(l.version!==n.versions.V1)throw new o("unknown version")}else if(p)throw new o("need a hash in strict mode");return f(l,["tag","body"])},e.seal=p,e.pack=h,e.unseal=m,e.unpack=d,e.read_base64=l}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_={}.hasOwnProperty;l=r(36),p=r(529),r(112).SRF,d=r(41),i=d.kb,y=r(56),m=y.prefix_signature_payload,c=y.genseed,y.bufeq_secure,h=y.bufeq_fast,r(207).BaseKey,n=r(811).BaseKeyPair,o=r(542).Pair,f=i.public_key_algorithms.NACL_EDDSA,e.b2u=function(t){return new Uint8Array(t)},e.u2b=function(e){return t.from(e)},u=function(){function e(t){this.key=t}return e.HEADER=t.from([i.kid.version,f]),e.TRAILER=t.from([i.kid.trailer]),e.LEN=e.HEADER.length+e.TRAILER.length+p.sign.publicKeyLength,e.alloc_kb=function(t){var r;return r=null,[t.length!==e.LEN?new Error("bad key length"):h(t.slice(-1),e.TRAILER)?h(t.slice(0,2),e.HEADER)?(r=new e(t.slice(2,-1)),null):new Error("bad header"):new Error("bad trailing byte"),r]},e.prototype.serialize=function(){return this.key},e.prototype.nbits=function(){return 255},e.prototype.read_params=function(t){},e.prototype.verify=function(t,e){var r,n,i,o,s,a;return i=t.payload,s=t.sig,r=t.detached,o=t.prefix,n=p.alloc({publicKey:this.key}),i=m(o,i),e((a=n.verify({payload:i,sig:s,detached:r}))[0],i=a[1])},e}(),a=function(){function t(t){this.key=t}return t.prototype.alloc=function(e){var r,n;return r=n=null,e.length!==sign.secretKeyLength?r=new Error("Bad secret key length"):n=new t(e),[r,n]},t.prototype.sign=function(t,e){var r,n;return n=t.payload,r=t.detached,e(p.alloc({secretKey:this.key}).sign({payload:n,detached:r}))},t}(),s=function(t){function e(t){var r,n;n=t.pub,r=t.priv,e.__super__.constructor.call(this,{pub:n,priv:r})}return function(t,e){for(var r in e)_.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.Pub=u,e.prototype.Pub=u,e.Priv=a,e.prototype.Priv=a,e.type=i.public_key_algorithms.NACL_EDDSA,e.prototype.type=e.type,e.prototype.get_type=function(){return this.type},e.klass_name="EDDSA",e.prototype.can_encrypt=function(){return!1},e.prototype.hash=function(){return this.serialize()},e.prototype.sign_kb=function(t,e){var r,n,i,o,s,a,u,f;a=l.findDeferral(arguments),i=t.payload,r=t.detached,o=t.prefix,n=s=null,(f=this,function(t){if(null==f.priv)return t(n=new Error("no secret key available"));i=m(o,i),function(t){u=new l.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/nacl/eddsa.iced",funcname:"Pair.sign_kb"}),f.priv.sign({payload:i,detached:r},u.defer({assign_fn:function(){return s=arguments[0]},lineno:110})),u._fulfill()}(t)})((function(){return e(n,s)}))},e.prototype.verify_kb=function(t,e){var r,n,i,o;return n=t.payload,o=t.sig,r=t.detached,i=t.prefix,this.pub.verify({payload:n,sig:o,detached:r,prefix:i},e)},e.subkey_algo=function(t){return t&(C.key_flags.certify_keys|C.key_flags.sign_data)?e:o},e.prototype.fulfills_flags=function(t){return(t&(C.key_flags.certify_keys|C.key_flags.sign_data))===t},e.prototype.verify_unpad_and_check_hash=function(t,e){return t.sig,t.data,t.hasher,t.hash,e(new Error("verify_unpad_and_check_hash unsupported"))},e.prototype.pad_and_sign=function(t,e,r){return e.hasher,r(new Error("pad_and_sign unsupported"))},e.parse_kb=function(t){return n.parse_kb(e,t)},e.parse_sig=function(t){throw new Error("@parse_sig unsupported")},e.read_sig_from_buf=function(t){return[new Error("@read_sig_from_buf unsupported")]},e.import_private=function(t,r){var n,i,o,s,f,h;return(n=(f=t.raw).length)!==(i=p.sign.secretKeyLength)?o=new Error("Bad length: expected "+i+"} bytes, but got "+n):(s=new u(f.slice(-p.sign.publicKeyLength)),h=new e({priv:new a(f),pub:s})),r(o,h)},e.generate=function(t,r){var n,i,o,s,f,h,d,m,y,_,g,b;g=l.findDeferral(arguments),m=t.seed,_=t.split,y=t.server_half,n={seed:m,split:_,len:p.sign.seedLength,server_half:y},function(t){b=new l.Deferrals(t,{parent:g,filename:"/Users/max/src/keybase/kbpgp/src/nacl/eddsa.iced",funcname:"Pair.generate"}),c(n,b.defer({assign_fn:function(){return i=arguments[0],y=arguments[1].server_half,m=arguments[1].seed},lineno:187})),b._fulfill()}((function(){var t;return h=null,null==i&&(t=p.alloc({}).genFromSeed({seed:m}),d=t.secretKey,f=t.publicKey,s=new u(f),o=new a(d),h=new e({pub:s,priv:o})),r(i,h,y)}))},e}(n),e.EdDSA=e.Pair=s}).call(this)}).call(this,r(12).Buffer)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){(function(){t.exports={k:"__iced_k",k_noop:"__iced_k_noop",param:"__iced_p_",ns:"iced",runtime:"runtime",Deferrals:"Deferrals",deferrals:"__iced_deferrals",fulfill:"_fulfill",b_while:"_break",t_while:"_while",c_while:"_continue",n_while:"_next",n_arg:"__iced_next_arg",defer_method:"defer",slot:"__slot",assign_fn:"assign_fn",autocb:"autocb",retslot:"ret",trace:"__iced_trace",passed_deferral:"__iced_passed_deferral",findDeferral:"findDeferral",lineno:"lineno",parent:"parent",filename:"filename",funcname:"funcname",catchExceptions:"catchExceptions",runtime_modes:["node","inline","window","none","browserify","interp"],trampoline:"trampoline",context:"context",defer_arg:"__iced_defer_"}}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a={}.hasOwnProperty;n=r(200).BlockCipher,s=r(139).scrub_vec,o=function(){function t(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=function(){var t,e;for(e=[],t=0;t<4;++t)e.push([]);return e}(),this.INV_SUB_MIX=function(){var t,e;for(e=[],t=0;t<4;++t)e.push([]);return e}(),this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}return t.prototype.init=function(){var t,e,r,n,i,o,s,a,u,f;for(t=function(){var t,r;for(r=[],e=t=0;t<256;e=++t)e<128?r.push(e<<1):r.push(e<<1^283);return r}(),i=0,u=0,e=f=0;f<256;e=++f)r=(r=u^u<<1^u<<2^u<<3^u<<4)>>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,a=t[s=t[o=t[i]]],n=257*t[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*a^65537*s^257*o^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=u=1:(i=o^t[t[t[a^o]]],u^=t[t[u]]);return!0},t}(),i=new o,t=function(t){function e(t){this._key=t.clone(),this._doReset()}return function(t,e){for(var r in e)a.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.blockSize=16,e.prototype.blockSize=e.blockSize,e.keySize=32,e.prototype.keySize=e.keySize,e.ivSize=e.blockSize,e.prototype.ivSize=e.ivSize,e.prototype._doReset=function(){var t,e,r,n,o,s,a,u;for(r=this._key.words,e=this._key.sigBytes/4,this._nRounds=e+6,o=4*(this._nRounds+1),this._keySchedule=[],n=a=0;0<=o?a<o:a>o;n=0<=o?++a:--a)this._keySchedule[n]=n<e?r[n]:(s=this._keySchedule[n-1],n%e==0?(s=s<<8|s>>>24,s=i.SBOX[s>>>24]<<24|i.SBOX[s>>>16&255]<<16|i.SBOX[s>>>8&255]<<8|i.SBOX[255&s],s^=i.RCON[n/e|0]<<24):e>6&&n%e==4&&(s=i.SBOX[s>>>24]<<24|i.SBOX[s>>>16&255]<<16|i.SBOX[s>>>8&255]<<8|i.SBOX[255&s]),this._keySchedule[n-e]^s);for(this._invKeySchedule=[],t=u=0;0<=o?u<o:u>o;t=0<=o?++u:--u)n=o-t,s=this._keySchedule[n-(t%4?0:4)],this._invKeySchedule[t]=t<4||n<=4?s:i.INV_SUB_MIX[0][i.SBOX[s>>>24]]^i.INV_SUB_MIX[1][i.SBOX[s>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[s>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&s]];return!0},e.prototype.encryptBlock=function(t,e){return null==e&&(e=0),this._doCryptBlock(t,e,this._keySchedule,i.SUB_MIX,i.SBOX)},e.prototype.decryptBlock=function(t,e){var r,n;return null==e&&(e=0),r=[t[e+3],t[e+1]],t[e+1]=r[0],t[e+3]=r[1],this._doCryptBlock(t,e,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX),n=[t[e+3],t[e+1]],t[e+1]=n[0],t[e+3]=n[1],n},e.prototype.scrub=function(){return s(this._keySchedule),s(this._invKeySchedule),this._key.scrub()},e.prototype._doCryptBlock=function(t,e,r,n,i){var o,s,a,u,f,h,c,l,p,d,m;for(s=t[e]^r[0],a=t[e+1]^r[1],u=t[e+2]^r[2],f=t[e+3]^r[3],o=4,d=1,m=this._nRounds;1<=m?d<m:d>m;1<=m?++d:--d)h=n[0][s>>>24]^n[1][a>>>16&255]^n[2][u>>>8&255]^n[3][255&f]^r[o++],c=n[0][a>>>24]^n[1][u>>>16&255]^n[2][f>>>8&255]^n[3][255&s]^r[o++],l=n[0][u>>>24]^n[1][f>>>16&255]^n[2][s>>>8&255]^n[3][255&a]^r[o++],p=n[0][f>>>24]^n[1][s>>>16&255]^n[2][a>>>8&255]^n[3][255&u]^r[o++],s=h,a=c,u=l,f=p;return h=(i[s>>>24]<<24|i[a>>>16&255]<<16|i[u>>>8&255]<<8|i[255&f])^r[o++],c=(i[a>>>24]<<24|i[u>>>16&255]<<16|i[f>>>8&255]<<8|i[255&s])^r[o++],l=(i[u>>>24]<<24|i[f>>>16&255]<<16|i[s>>>8&255]<<8|i[255&a])^r[o++],p=(i[f>>>24]<<24|i[s>>>16&255]<<16|i[a>>>8&255]<<8|i[255&u])^r[o++],t[e]=h,t[e+1]=c,t[e+2]=l,t[e+3]=p},e}(n),e.AES=t}).call(this)},function(t,e,r){(function(){var t,n,i,o={}.hasOwnProperty;t=r(200).BlockCipher,i=r(139).scrub_vec,n=new function(){this.P=[[169,103,179,232,4,253,163,118,154,146,128,120,228,221,209,56,13,198,53,152,24,247,236,108,67,117,55,38,250,19,148,72,242,208,139,48,132,84,223,35,25,91,61,89,243,174,162,130,99,1,131,46,217,81,155,124,166,235,165,190,22,12,227,97,192,140,58,245,115,44,37,11,187,78,137,107,83,106,180,241,225,230,189,69,226,244,182,102,204,149,3,86,212,28,30,215,251,195,142,181,233,207,191,186,234,119,57,175,51,201,98,113,129,121,9,173,36,205,249,216,229,197,185,77,68,8,134,231,161,29,170,237,6,112,178,210,65,123,160,17,49,194,39,144,32,246,96,255,150,92,177,171,158,156,82,27,95,147,10,239,145,133,73,238,45,79,143,59,71,135,109,70,214,62,105,100,42,206,203,47,252,151,5,122,172,127,213,26,75,14,167,90,40,20,63,41,136,60,76,2,184,218,176,23,85,31,138,125,87,199,141,116,183,196,159,114,126,21,34,18,88,7,153,52,110,80,222,104,101,188,219,248,200,168,43,64,220,254,50,164,202,16,33,240,211,93,15,0,111,157,54,66,74,94,193,224],[117,243,198,244,219,123,251,200,74,211,230,107,69,125,232,75,214,50,216,253,55,113,241,225,48,15,248,27,135,250,6,63,94,186,174,91,138,0,188,157,109,193,177,14,128,93,210,213,160,132,7,20,181,144,44,163,178,115,76,84,146,116,54,81,56,176,189,90,252,96,98,150,108,66,247,16,124,40,39,140,19,149,156,199,36,70,59,112,202,227,133,203,17,208,147,184,166,131,32,255,159,119,195,204,3,111,8,191,64,231,43,226,121,12,170,130,65,58,234,185,228,154,164,151,126,218,122,23,102,148,161,29,61,240,222,179,11,114,167,28,239,209,83,62,143,51,38,95,236,118,42,73,129,136,238,33,196,26,235,217,197,57,153,205,173,49,139,1,24,35,221,31,78,45,249,72,79,242,101,142,120,92,88,25,141,229,152,87,103,127,5,100,175,99,182,254,245,183,60,165,206,233,104,68,224,77,67,105,41,46,172,21,89,168,10,158,110,71,223,52,53,106,207,220,34,201,192,155,137,212,237,171,18,162,13,82,187,2,47,169,215,97,30,180,80,4,246,194,22,37,134,86,85,9,190,145]],this.P_00=1,this.P_01=0,this.P_02=0,this.P_03=1,this.P_04=1,this.P_10=0,this.P_11=0,this.P_12=1,this.P_13=1,this.P_14=0,this.P_20=1,this.P_21=1,this.P_22=0,this.P_23=0,this.P_24=0,this.P_30=0,this.P_31=1,this.P_32=1,this.P_33=0,this.P_34=1,this.GF256_FDBK=361,this.GF256_FDBK_2=this.GF256_FDBK/2,this.GF256_FDBK_4=this.GF256_FDBK/4,this.RS_GF_FDBK=333,this.SK_STEP=33686018,this.SK_BUMP=16843009,this.SK_ROTL=9},e.TwoFish=function(t){function e(t){this._key=t.clone(),this.gMDS0=[],this.gMDS1=[],this.gMDS2=[],this.gMDS3=[],this.gSubKeys=[],this.gSBox=[],this.k64Cnt=0,this._doReset()}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.blockSize=16,e.prototype.blockSize=e.blockSize,e.keySize=32,e.prototype.keySize=e.keySize,e.ivSize=e.blockSize,e.prototype.ivSize=e.ivSize,e.prototype.getByte=function(t,e){return t>>>8*e&255},e.prototype.switchEndianness=function(t){return(255&t)<<24|(t>>8&255)<<16|(t>>16&255)<<8|t>>24&255},e.prototype.LFSR1=function(t){return t>>1^(0!=(1&t)?n.GF256_FDBK_2:0)},e.prototype.LFSR2=function(t){return t>>2^(0!=(2&t)?n.GF256_FDBK_2:0)^(0!=(1&t)?n.GF256_FDBK_4:0)},e.prototype.Mx_X=function(t){return t^this.LFSR2(t)},e.prototype.Mx_Y=function(t){return t^this.LFSR1(t)^this.LFSR2(t)},e.prototype.RS_rem=function(t){var e,r,i;return r=255&((e=t>>>24&255)<<1^(0!=(128&e)?n.RS_GF_FDBK:0)),t<<8^(i=e>>>1^(0!=(1&e)?n.RS_GF_FDBK>>>1:0)^r)<<24^r<<16^i<<8^e},e.prototype.RS_MDS_Encode=function(t,e){var r,n,i;for(r=e,n=0;n<4;++n)r=this.RS_rem(r);for(r^=t,i=0;i<4;++i)r=this.RS_rem(r);return r},e.prototype.F32=function(t,e){var r,i,o,s,a,u,f,h,c;return r=this.getByte(t,0),i=this.getByte(t,1),o=this.getByte(t,2),s=this.getByte(t,3),a=e[0],u=e[1],f=e[2],h=e[3],1===(c=3&this.k64Cnt)?this.gMDS0[255&n.P[n.P_01][r]^this.getByte(a,0)]^this.gMDS1[255&n.P[n.P_11][i]^this.getByte(a,1)]^this.gMDS2[255&n.P[n.P_21][o]^this.getByte(a,2)]^this.gMDS3[255&n.P[n.P_31][s]^this.getByte(a,3)]:(0===c&&(r=255&n.P[n.P_04][r]^this.getByte(h,0),i=255&n.P[n.P_14][i]^this.getByte(h,1),o=255&n.P[n.P_24][o]^this.getByte(h,2),s=255&n.P[n.P_34][s]^this.getByte(h,3)),(0===c||3===c)&&(r=255&n.P[n.P_03][r]^this.getByte(f,0),i=255&n.P[n.P_13][i]^this.getByte(f,1),o=255&n.P[n.P_23][o]^this.getByte(f,2),s=255&n.P[n.P_33][s]^this.getByte(f,3)),this.gMDS0[255&n.P[n.P_01][255&n.P[n.P_02][r]^this.getByte(u,0)]^this.getByte(a,0)]^this.gMDS1[255&n.P[n.P_11][255&n.P[n.P_12][i]^this.getByte(u,1)]^this.getByte(a,1)]^this.gMDS2[255&n.P[n.P_21][255&n.P[n.P_22][o]^this.getByte(u,2)]^this.getByte(a,2)]^this.gMDS3[255&n.P[n.P_31][255&n.P[n.P_32][s]^this.getByte(u,3)]^this.getByte(a,3)])},e.prototype.Fe32_0=function(t){return this.gSBox[0+2*(255&t)]^this.gSBox[1+2*(t>>>8&255)]^this.gSBox[512+2*(t>>>16&255)]^this.gSBox[513+2*(t>>>24&255)]},e.prototype.Fe32_3=function(t){return this.gSBox[0+2*(t>>>24&255)]^this.gSBox[1+2*(255&t)]^this.gSBox[512+2*(t>>>8&255)]^this.gSBox[513+2*(t>>>16&255)]},e.prototype._doReset=function(){var t,e,r,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A;if(p=[],d=[],w=[],y=[],_=[],g=[],this.k64Cnt=this._key.words.length/2,this.k64Cnt<1)throw"Key size less than 64 bits";if(this.k64Cnt>4)throw"Key size larger than 256 bits";for(a=k=0;k<256;a=++k)u=255&n.P[0][a],y[0]=u,_[0]=255&this.Mx_X(u),g[0]=255&this.Mx_Y(u),u=255&n.P[1][a],y[1]=u,_[1]=255&this.Mx_X(u),g[1]=255&this.Mx_Y(u),this.gMDS0[a]=y[n.P_00]|_[n.P_00]<<8|g[n.P_00]<<16|g[n.P_00]<<24,this.gMDS1[a]=g[n.P_10]|g[n.P_10]<<8|_[n.P_10]<<16|y[n.P_10]<<24,this.gMDS2[a]=_[n.P_20]|g[n.P_20]<<8|y[n.P_20]<<16|g[n.P_20]<<24,this.gMDS3[a]=_[n.P_30]|y[n.P_30]<<8|g[n.P_30]<<16|_[n.P_30]<<24;for(a=M=0,E=this.k64Cnt;0<=E?M<E:M>E;a=0<=E?++M:--M)b=2*a,p[a]=this.switchEndianness(this._key.words[b]),d[a]=this.switchEndianness(this._key.words[b+1]),w[this.k64Cnt-1-a]=this.RS_MDS_Encode(p[a],d[a]);for(a=x=0,20;x<20;a=++x)v=a*n.SK_STEP,t=this.F32(v,p),t+=e=(e=this.F32(v+n.SK_BUMP,d))<<8|e>>>24,this.gSubKeys[2*a]=t,t+=e,this.gSubKeys[2*a+1]=t<<n.SK_ROTL|t>>>32-n.SK_ROTL;for(f=w[0],h=w[1],c=w[2],l=w[3],this.gSBox=[],A=[],a=S=0;S<256;a=++S)r=i=o=s=a,1===(m=3&this.k64Cnt)?(this.gSBox[2*a]=this.gMDS0[255&n.P[n.P_01][r]^this.getByte(f,0)],this.gSBox[2*a+1]=this.gMDS1[255&n.P[n.P_11][i]^this.getByte(f,1)],this.gSBox[2*a+512]=this.gMDS2[255&n.P[n.P_21][o]^this.getByte(f,2)],A.push(this.gSBox[2*a+513]=this.gMDS3[255&n.P[n.P_31][s]^this.getByte(f,3)])):(0===m&&(r=255&n.P[n.P_04][r]^this.getByte(l,0),i=255&n.P[n.P_14][i]^this.getByte(l,1),o=255&n.P[n.P_24][o]^this.getByte(l,2),s=255&n.P[n.P_34][s]^this.getByte(l,3)),0!==m&&3!==m||(r=255&n.P[n.P_03][r]^this.getByte(c,0),i=255&n.P[n.P_13][i]^this.getByte(c,1),o=255&n.P[n.P_23][o]^this.getByte(c,2),s=255&n.P[n.P_33][s]^this.getByte(c,3)),this.gSBox[2*a]=this.gMDS0[255&n.P[n.P_01][255&n.P[n.P_02][r]^this.getByte(h,0)]^this.getByte(f,0)],this.gSBox[2*a+1]=this.gMDS1[255&n.P[n.P_11][255&n.P[n.P_12][i]^this.getByte(h,1)]^this.getByte(f,1)],this.gSBox[2*a+512]=this.gMDS2[255&n.P[n.P_21][255&n.P[n.P_22][o]^this.getByte(h,2)]^this.getByte(f,2)],A.push(this.gSBox[2*a+513]=this.gMDS3[255&n.P[n.P_31][255&n.P[n.P_32][s]^this.getByte(h,3)]^this.getByte(f,3)]));return A},e.prototype.scrub=function(){return i(this.gSubKeys),i(this.gSBox),this._key.scrub()},e.prototype.decryptBlock=function(t,e){var r,n,i,o,s,a,u,f;for(null==e&&(e=0),a=this.switchEndianness(t[e])^this.gSubKeys[4],u=this.switchEndianness(t[e+1])^this.gSubKeys[5],o=this.switchEndianness(t[e+2])^this.gSubKeys[6],s=this.switchEndianness(t[e+3])^this.gSubKeys[7],r=39,f=0;f<16;f+=2)s^=(n=this.Fe32_0(a))+2*(i=this.Fe32_3(u))+this.gSubKeys[r--],o=(o<<1|o>>>31)^n+i+this.gSubKeys[r--],s=s>>>1|s<<31,u^=(n=this.Fe32_0(o))+2*(i=this.Fe32_3(s))+this.gSubKeys[r--],a=(a<<1|a>>>31)^n+i+this.gSubKeys[r--],u=u>>>1|u<<31;return t[e]=this.switchEndianness(o^this.gSubKeys[0]),t[e+1]=this.switchEndianness(s^this.gSubKeys[1]),t[e+2]=this.switchEndianness(a^this.gSubKeys[2]),t[e+3]=this.switchEndianness(u^this.gSubKeys[3])},e.prototype.encryptBlock=function(t,e){var r,n,i,o,s,a,u,f;for(null==e&&(e=0),o=this.switchEndianness(t[e])^this.gSubKeys[0],s=this.switchEndianness(t[e+1])^this.gSubKeys[1],a=this.switchEndianness(t[e+2])^this.gSubKeys[2],u=this.switchEndianness(t[e+3])^this.gSubKeys[3],r=8,f=0;f<16;f+=2)a=(a^=(n=this.Fe32_0(o))+(i=this.Fe32_3(s))+this.gSubKeys[r++])>>>1|a<<31,u=(u<<1|u>>>31)^n+2*i+this.gSubKeys[r++],o=(o^=(n=this.Fe32_0(a))+(i=this.Fe32_3(u))+this.gSubKeys[r++])>>>1|o<<31,s=(s<<1|s>>>31)^n+2*i+this.gSubKeys[r++];return t[e]=this.switchEndianness(a^this.gSubKeys[4]),t[e+1]=this.switchEndianness(u^this.gSubKeys[5]),t[e+2]=this.switchEndianness(o^this.gSubKeys[6]),t[e+3]=this.switchEndianness(s^this.gSubKeys[7])},e}(t)}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c={}.hasOwnProperty,l=function(t,e){for(var r in e)c.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};h=r(366),i=h.HMAC,f=h.bulk_sign,s=r(367).SHA512,o=r(416).KECCAK,a=r(91).WordArray,n=function(t){function e(t,r){var n,a,u,f,h;null==r&&(r=[s,o]),h=t.split(r.length),this.hashers=function(){var t,e,o;for(o=[],a=t=0,e=r.length;t<e;a=++t)u=r[a],f=h[a],n=new i(f,u),f.scrub(),o.push(n);return o}(),e.__super__.constructor.call(this)}return l(e,t),e.get_output_size=function(){return s.output_size+o.output_size},e.prototype._coalesce=function(t,e){return t.concat(e)},e.prototype.get_output_size=function(){var t,e,r,n;for(t=0,e=0,r=(n=this.hashers).length;e<r;e++)t+=n[e].get_output_size();return t},e.sign=function(t){var r,n;return n=t.key,r=t.input,new e(n).finalize(r)},e.bulk_sign=function(t,r){return t.klass=e,t.what="HMAC-SHA512-SHA3",f(t,r)},e}(t=function(){function t(){this.hasherBlockSize=this.hashers[0].hasherBlockSize,this.hasherBlockSizeBytes=4*this.hasherBlockSize,this.reset()}return t.prototype.reset=function(){var t,e,r;for(t=0,e=(r=this.hashers).length;t<e;t++)r[t].reset();return this},t.prototype.update=function(t){var e,r,n;for(e=0,r=(n=this.hashers).length;e<r;e++)n[e].update(t);return this},t.prototype.scrub=function(){var t,e,r;for(t=0,e=(r=this.hashers).length;t<e;t++)r[t].scrub();return this},t.prototype.finalize=function(t){var e,r,n,i,o,s;for(n=(r=function(){var r,n,i,o;for(o=[],r=0,n=(i=this.hashers).length;r<n;r++)e=i[r],o.push(e.finalize(t));return o}.call(this))[0],i=0,o=(s=r.slice(1)).length;i<o;i++)e=s[i],this._coalesce(n,e),e.scrub();return n},t}()),u=function(t){function e(t,r){var n;null==r&&(r=[s,o]),this.hashers=function(){var e,o,s;for(s=[],e=0,o=r.length;e<o;e++)n=r[e],s.push(new i(t,n));return s}(),e.__super__.constructor.call(this)}return l(e,t),e.prototype.reset=function(){var t,r,n,i;for(e.__super__.reset.call(this),t=r=0,n=(i=this.hashers).length;r<n;t=++r)i[t].update(new a([t]));return this},e.get_output_size=function(){return Math.max(s.output_size,o.output_size)},e.prototype._coalesce=function(t,e){return t.xor(e,{})},e.prototype.get_output_size=function(){var t;return Math.max.apply(Math,function(){var e,r,n,i;for(i=[],e=0,r=(n=this.hashers).length;e<r;e++)t=n[e],i.push(t.get_output_size());return i}.call(this))},e.sign=function(t){var r,n;return n=t.key,r=t.input,new e(n).finalize(r)},e.bulk_sign=function(t,r){return t.klass=e,t.what="HMAC-SHA512-XOR-SHA3",f(t,r)},e}(t),e.Concat=n,e.XOR=u}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u={}.hasOwnProperty;o=r(91).WordArray,n=r(200).Hasher,t=function(){function t(){this.H=[],this.K=[],this.W=[],this.init()}return t.prototype.isPrime=function(t){var e,r,n;if(2===t||3===t||5===t||7===t)return!0;if(1===t||4===t||6===t||8===t||9===t)return!1;for(r=Math.ceil(Math.sqrt(t)),e=n=2;2<=r?n<=r:n>=r;e=2<=r?++n:--n)if(t%e==0)return!1;return!0},t.prototype.getFractionalBits=function(t){return 4294967296*(t-(0|t))|0},t.prototype.init=function(){var t,e,r;for(t=2,e=0,r=[];e<64;)this.isPrime(t)&&(e<8&&(this.H[e]=this.getFractionalBits(Math.pow(t,.5))),this.K[e]=this.getFractionalBits(Math.pow(t,1/3)),e++),r.push(t++);return r},t}(),s=new t,i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)u.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.blockSize=16,e.prototype.blockSize=e.blockSize,e.output_size=32,e.prototype.output_size=e.output_size,e.prototype._doReset=function(){return this._hash=new o(s.H.slice(0))},e.prototype.get_output_size=function(){return this.output_size},e.prototype._doProcessBlock=function(t,e){var r,n,i,o,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k;for(r=this._hash.words,i=s.W,n=s.K,o=r[0],a=r[1],u=r[2],f=r[3],h=r[4],c=r[5],l=r[6],_=r[7],g=k=0;k<64;g=++k)g<16?i[g]=0|t[e+g]:(p=((d=i[g-15])<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,m=((y=i[g-2])<<15|y>>>17)^(y<<13|y>>>19)^y>>>10,i[g]=p+i[g-7]+m+i[g-16]),b=o&a^o&u^a&u,v=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),w=_+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&c^~h&l)+n[g]+i[g],_=l,l=c,c=h,h=f+w|0,f=u,u=a,a=o,o=w+(v+b)|0;return r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+u|0,r[3]=r[3]+f|0,r[4]=r[4]+h|0,r[5]=r[5]+c|0,r[6]=r[6]+l|0,r[7]=r[7]+_|0},e.prototype._doFinalize=function(){var t,e,r,n;return e=(t=this._data).words,n=8*this._nDataBytes,e[(r=8*t.sigBytes)>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},e.prototype.scrub=function(){return this._hash.scrub()},e.prototype.copy_to=function(t){return e.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(n),a=function(t){var e;return e=(new i).finalize(t),t.scrub(),e},e.SHA256=i,e.transform=a}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a;o=r(36),t=r(366).HMAC,i=r(91).WordArray,a=r(139),n=function(){function e(e){this.klass=e.klass,this.c=e.c,this.c||(this.c=1024),this.klass||(this.klass=t)}return e.prototype._PRF=function(t){return this.prf.reset(),this.prf.finalize(t)},e.prototype._gen_T_i=function(t,e){var r,n,s,u,f,h,c,l,p,d;l=o.findDeferral(arguments),f=t.salt,n=t.i,(s=t.progress_hook)(0),h=f.clone().concat(new i([n])),r=this._PRF(h),u=r.clone(),n=1,(d=this,function(t){var e;(e=function(t){var i,f;if(i=t,f=function(){return o.trampoline((function(){return e(t)}))},!(n<d.c))return i();for(c=Math.min(d.c,n+128);n<c;)r=d._PRF(r),u.xor(r,{}),n++;s(n),p=new o.Deferrals((function(){return f(null)}),{parent:l,filename:"/Users/max/src/keybase/triplesec/src/pbkdf2.iced",funcname:"PBKDF2._gen_T_i"}),a.default_delay(0,0,p.defer({lineno:57})),p._fulfill()})(t)})((function(){return s(n),e(u)}))},e.prototype.run=function(t,e){var r,n,s,a,u,f,h,c,l,p,d,m,y,_,g;m=o.findDeferral(arguments),u=t.key,l=t.salt,n=t.dkLen,c=t.progress_hook,this.prf=new this.klass(u),r=this.prf.get_output_size(),f=Math.ceil(n/r),d=[],g=this,(h=function(t){return function(e){return"function"==typeof c?c({what:"pbkdf2",total:f*g.c,i:t*g.c+e}):void 0}})(0)(0),function(t){return function(e){var r;a=1,_=f>1,(r=function(e){var n;if(n=function(){return o.trampoline((function(){return _?a+=1:a-=1,r(e)}))},!0===_&&a>f||!1===_&&a<f)return e();y=new o.Deferrals((function(){return n(d.push(p.words))}),{parent:m,filename:"/Users/max/src/keybase/triplesec/src/pbkdf2.iced",funcname:"PBKDF2.run"}),t._gen_T_i({salt:l,i:a,progress_hook:h(a-1)},y.defer({assign_fn:function(){return p=arguments[0]},lineno:80})),y._fulfill()})(e)}}(this)(function(t){return function(){var r;return h(f)(0),s=(r=[]).concat.apply(r,d),u.scrub(),t.prf.scrub(),t.prf=null,e(new i(s,n))}}(this))},e}(),s=function(t,e){var r,i,s,a,u,f,h,c,l,p;l=o.findDeferral(arguments),a=t.key,c=t.salt,u=t.klass,r=t.c,i=t.dkLen,h=t.progress_hook,s=new n({klass:u,c:r}),function(t){p=new o.Deferrals(t,{parent:l,filename:"/Users/max/src/keybase/triplesec/src/pbkdf2.iced"}),s.run({key:a,salt:c,dkLen:i,progress_hook:h},p.defer({assign_fn:function(){return f=arguments[0]},lineno:106})),p._fulfill()}((function(){return e(f)}))},e.pbkdf2=s,e.PBKDF2=n}).call(this)},function(t,e,r){(function(){var t,n,i,o;o=r(797),i=null,t=r(1338).Sodium,n=r(1339).TweetNaCl;try{i=r(!function(){var t=new Error("Cannot find module 'sodium'");throw t.code="MODULE_NOT_FOUND",t}()).api}catch(t){t}e.sign={publicKeyLength:o.sign.publicKeyLength,secretKeyLength:o.sign.secretKeyLength,signatureLength:o.sign.signatureLength,seedLength:o.sign.seedLength},e.alloc=function(e){var r,s,a;return r=e.publicKey,a=e.secretKey,(s=e.force_js||null==i?new n({publicKey:r,secretKey:a}):new t({publicKey:r,secretKey:a})).lib={c:i,js:o},s}}).call(this)},function(t,e,r){(function(){var t,n;t=r(41),n=r(1343),e.header={version:t.header.version+" v"+n.version,comment:t.header.comment}}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g;_=r(56),d=r(235).SlicerBuffer,n=r(41).openpgp,s=r(800).KeyMaterial,p=r(368).Signature,g=r(803),l=g.SEIPD,h=g.PKESK,y=r(804).UserID,m=r(1347).UserAttribute,i=r(805).Compressed,o=r(1349).Generic,f=r(806).OnePassSignature,a=r(451).Literal,r(76).inspect,u=function(){function t(t){this.slice=t}return t.prototype.parse=function(){var t;for(t=[];this.slice.rem();)t.push(this.parse_packet());return t},t.prototype.parse_packet=function(){return new c(this.slice).parse()},t}(),c=function(){function e(t){this.slice=t,this.body=null,this.real_packet_len=null,this.tag=null,this.len=null,this.header_len=null}return e.prototype.parse_header=function(){return this.parse_tag_and_len(),this.header_len||(this.header_len=this.slice.offset()),this.body||(this.body=new d(this.slice.read_buffer(this.len))),this.real_packet_len||(this.real_packet_len=this.len),this.slice.unclamp()},e.prototype.parse=function(){return this.parse_header(),this.parse_body()},e.prototype.parse_body=function(){var t,e,r,u;return e=n.packet_tags,r=(u=this.body).peek_rest_to_buffer(),(t=function(){switch(this.tag){case e.PKESK:return h.parse(u);case e.one_pass_sig:return f.parse(u);case e.secret_key:return s.parse_private_key(u,{subkey:!1});case e.secret_subkey:return s.parse_private_key(u,{subkey:!0});case e.public_key:return s.parse_public_key(u,{subkey:!1});case e.public_subkey:return s.parse_public_key(u,{subkey:!0});case e.signature:return p.parse(u);case e.userid:return y.parse(u);case e.user_attribute:return m.parse(u);case e.SEIPD:return l.parse(u);case e.literal:return a.parse(u);case e.compressed:return i.parse(u);default:return new o(this.tag,u)}}.call(this)).set({tag:this.tag,real_packet_len:this.real_packet_len,header_len:this.header_len,raw:r}),t},e.prototype.parse_tag_and_len=function(){var t;if(this.slice.len()<2||0==(128&(t=this.slice.read_uint8())))throw new Error("This doesn't look like a binary PGP packet (c="+t+")");return 0==(64&t)?this.parse_tag_and_len_old(t):this.parse_tag_and_len_new(t)},e.prototype.parse_tag_and_len_old=function(t){return this.tag=(63&t)>>2,this.len=function(){switch(3&t){case 0:return this.slice.read_uint8();case 1:return this.slice.read_uint16();case 2:return this.slice.read_uint32();case 3:return this.slice.rem()}}.call(this)},e.prototype.parse_tag_and_len_new=function(t){return this.tag=63&t,this.parse_tag_len_new()},e.prototype.parse_tag_len_new=function(){var e,r,n,i,o;for(r=!0,o=[],this.len=0,n=0;r;)r=!1,n=(e=this.slice.read_uint8())<192?e:255===e?this.slice.read_uint32():e<224?(e-192<<8)+(this.slice.read_uint8()+192):(this.header_len||(this.header_len=this.slice.offset()),i=1<<(31&e),o.push(this.slice.read_buffer(i)),r=!0,i),this.len+=n;if(o.length)return o.push(this.slice.read_buffer(n)),this.body=new d(t.concat(o)),this.len=this.body.length,this.real_packet_len=this.slice.offset()},e}(),e.parse=function(t){return _.katch((function(){return new u(new d(t)).parse()}))}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_={}.hasOwnProperty,g=function(t,e){for(var r in e)_.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};c=r(36),l=r(529),h=r(235).SlicerBuffer,d=r(56).uint_to_buffer,y=r(207),i=y.BaseKeyPair,n=y.BaseKey,f=r(112).SRF,m=r(56),p=r(41),o=p.openpgp,u=function(e){function r(t){this.key=t.key}return g(r,e),r.type=o.public_key_algorithms.EDDSA,r.prototype.type=r.type,r.OID=t.from([43,6,1,4,1,218,71,15,1]),r.prototype.OID=r.OID,r.MPI_LENGTH_HEADERS=t.from([1,7,64]),r.prototype.MPI_LENGTH_HEADERS=r.MPI_LENGTH_HEADERS,r.prototype.nbits=function(){return 255},r.prototype.read_params=function(t){},r.prototype.trunc_hash=function(t){return bn.bn_from_left_n_bits(t,this.nbits())},r.prototype.serialize=function(){return t.concat([t.from([this.OID.length]),this.OID,this.MPI_LENGTH_HEADERS,this.key])},r._alloc=function(t){var e,n,i,o,s,a;if(s=(a=new h(t)).rem(),n=a.read_uint8(),o=a.read_buffer(n),e=r.OID,!m.bufeq_secure(o,e))throw new Error("Wrong OID in EdDSA key");if(i=a.read_buffer(r.MPI_LENGTH_HEADERS.length),!m.bufeq_secure(i,r.MPI_LENGTH_HEADERS))throw new Error("Wrong MPI length headers");return[new r({key:a.read_buffer(l.sign.publicKeyLength)}),s-a.rem()]},r.alloc=function(t){var e,n,i,o;i=n=e=null;try{i=(o=r._alloc(t))[0],n=o[1]}catch(t){e=t}return[e,i,n]},r.prototype.verify=function(e,r,n){var i,o,s,a,u,f;return s=e[0],a=e[1],o=l.alloc({publicKey:this.key}),s=m.fit_to_size(l.sign.signatureLength/2,s),a=m.fit_to_size(l.sign.signatureLength/2,a),u=t.concat([s,a]),i=(f=o.verify({payload:r,sig:u,detached:!0}))[0],f[1],n(i)},r}(n),a=function(e){function r(t){this.seed=t.seed,this.key=t.key,this.pub=t.pub}return g(r,e),r._alloc=function(e,n){var i,o,s,a,u,f,c,p,d;if(a=(f=new h(e)).rem(),(s=i=Math.ceil(f.read_uint16()/8))!==(o=l.sign.seedLength))throw new Error("Expected "+o+" bytes for EDDSA priv key, got "+s+".");if(p=f.read_buffer(i),u=(d=l.alloc({}).genFromSeed({seed:p})).publicKey,c=d.secretKey,!m.bufeq_secure(n.key,u))throw new Error("Loaded EDDSA private key but it does not match the public key.");return[new r({seed:p,key:t.from(c),pub:n}),a-f.rem()]},r.alloc=function(t,e){var n,i,o,s;o=i=n=null;try{o=(s=r._alloc(t,e))[0],i=s[1]}catch(t){n=t}return[n,o,i]},r.prototype.sign=function(e,r){var n,i;return i=l.alloc({secretKey:this.key}).sign({payload:e}),n=l.sign.signatureLength/2,r([t.from(i.slice(0,n)),t.from(i.slice(n,2*n))])},r.prototype.serialize=function(){return t.concat([d(16,8*l.sign.seedLength),this.seed])},r}(n),s=function(e){function r(t){var e,n;n=t.pub,e=t.priv,r.__super__.constructor.call(this,{pub:n,priv:e})}return g(r,e),r.Pub=u,r.prototype.Pub=u,r.Priv=a,r.prototype.Priv=a,r.type=o.public_key_algorithms.EDDSA,r.prototype.type=r.type,r.klass_name="EDDSA",r.prototype.get_type=function(){return this.type},r.parse=function(t){return i.parse(r,t)},r.prototype.can_encrypt=function(){return!1},r.subkey_algo=function(t){return t&(o.key_flags.certify_keys|o.key_flags.sign_data)?r:ECDH},r.prototype.fulfills_flags=function(t){return(t&(o.key_flags.certify_keys|o.key_flags.sign_data))===t},r.prototype.verify_unpad_and_check_hash=function(t,e){var n,i,o,s;return s=t.sig,n=t.data,o=t.hasher,i=t.hash,this._dsa_verify_update_and_check_hash({sig:s,data:n,hasher:o,hash:i,klass:r},e)},r.prototype.pad_and_sign=function(e,r,n){var i,o,s,a,u,f,h,l;f=c.findDeferral(arguments),(o=r.hasher)||(o=SHA512),i=o(e),(l=this,function(t){h=new c.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/ecc/eddsa.iced",funcname:"Pair.pad_and_sign"}),l.priv.sign(i,h.defer({assign_fn:function(){return u=arguments[0]},lineno:210})),h._fulfill()})((function(){return s=u[0],a=u[1],n(null,t.concat([d(16,8*s.length),s,d(16,8*a.length),a]))}))},r.parse_sig=function(t){var e,n,i,o,s;if(e=t.peek_rest_to_buffer(),n=(s=r.read_sig_from_buf(e))[0],o=s[1],i=s[2],null!=n)throw n;return t.advance(i),o},r.eddsa_value_from_buffer=function(t){var e,r,n,i;return n=i=null,(e=t.readUInt16BE(0))>256||e<216?n=new Error("Got an unexpected number of Bits for an EdDSA value: "+e):(r=2+Math.ceil(e/8),i=t.slice(2,r),t=t.slice(r)),[n,i,t]},r.read_sig_from_buf=function(t){var e,n,i,o,s,a;return s=t.length,o=["r","s"],n=null,e=function(){var e,i,s,u;for(u=[],e=0,i=o.length;e<i;e++)o[e],null==n&&(s=r.eddsa_value_from_buffer(t),n=s[0],a=s[1],t=s[2],u.push(a));return u}(),i=s-t.length,[n,null!=n?null:e,i]},r.alloc=function(t,e){var r,n,i,o;i=n=r=null;try{i=(o=u.alloc(e))[0],n=o[1]}catch(t){r=t}return[r,i,n]},r.prototype.good_for_flags=function(){return o.key_flags.certify_keys|o.key_flags.sign_data},r.generate=function(e,n){var i,o,s,h,p,d,m,y;m=c.findDeferral(arguments),e.nbits,e.asp,function(t){y=new c.Deferrals(t,{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/ecc/eddsa.iced",funcname:"Pair.generate"}),f().random_bytes(l.sign.seedLength,y.defer({assign_fn:function(){return d=arguments[0]},lineno:282})),y._fulfill()}((function(){var e;return e=l.alloc({}).genFromSeed({seed:d}),s=e.publicKey,p=e.secretKey,o=new u({key:t.from(s)}),i=new a({seed:d,key:t.from(p),pub:o}),h=new r({pub:o,priv:i}),n(null,h)}))},r}(i),e.EDDSA=e.Pair=s}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u;o=(u=r(101)).ciphers,i=u.WordArray,n=o.AES,a=function(e){var r,o,s,a,u,f,h,c,l,p;return r=e.block_cipher_class,h=e.key,a=e.cipher,l=e.plaintext,f=e.iv,r||(r=n),a||(a=new r(i.from_buffer(h))),o=a.blockSize,s=i.from_buffer(f.slice(0,o)),p=0,c=function(){var t;for(t=[];l.length>p;)a.encryptBlock(s.words,0),u=s,s=i.from_buffer(l.slice(p,p+o)),u.xor(s,{n_words:s.words.length}),p+=o,s=u,t.push(u.to_buffer());return t}(),t.concat(c).slice(0,l.length)},s=function(e){var r,o,s,a,u,f,h,c,l,p,d;return o=e.block_cipher_class,c=e.key,a=e.cipher,u=e.ciphertext,h=e.iv,o||(o=n),a||(a=new o(i.from_buffer(c))),s=a.blockSize,h||(h=t.from(function(){var t,e;for(e=[],t=0;0<=s?t<s:t>s;0<=s?++t:--t)e.push(0);return e}())),r=i.from_buffer(h.slice(0,s)),d=0,l=function(){var t;for(t=[];u.length>d;)a.encryptBlock(r.words,0),f=r,r=i.from_buffer(u.slice(d,d+s)),f.xor(r,{}),d+=s,t.push(f.to_buffer());return t}(),(p=t.concat(l)).slice(p,u.length)},e.encrypt=a,e.decrypt=s}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u;t=r(535).C,i=r(536).PpBuffer,o=r(537).U32MAX,s=function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=function(t){return Math.floor(t)===t},u=function(t){var e,r;return e=Math.floor(t/o),[o-e-((r=t%o)>0?1:0),0===r?0:o-r]},e.Packer=n=function(){function e(t){this._opts=null!=t?t:{},this._buffer=new i}return e.prototype.output=function(){return this._buffer.freeze()},e.prototype.p=function(t){switch(typeof t){case"number":return this.p_number(t);case"string":return this.p_str(t);case"boolean":return this.p_boolean(t);case"undefined":return this.p_null();case"object":if(null==t)return this.p_null();if(s(t))return this.p_array(t);if(i.isBuffer(t))return this.p_bin(t);if(!this.p_ext(t))return this.p_obj(t)}},e.prototype.p_number=function(t){return a(t)?t>=0?this.p_positive_int(t):this.p_negative_int(t):this.p_pack_double(t)},e.prototype.p_pack_double=function(e){return null!=this._opts.floats?(this.p_uint8(t.float),this._buffer.push_float32(e)):(this.p_uint8(t.double),this._buffer.push_float64(e))},e.prototype.p_uint8=function(t){return this._buffer.push_uint8(t)},e.prototype.p_uint16=function(t){return this._buffer.push_uint16(t)},e.prototype.p_uint32=function(t){return this._buffer.push_uint32(t)},e.prototype.p_int8=function(t){return this._buffer.push_int8(t)},e.prototype.p_int16=function(t){return this._buffer.push_int16(t)},e.prototype.p_int32=function(t){return this._buffer.push_int32(t)},e.prototype.p_neg_int64=function(t){var e,r,n;return e=(n=u(0-t))[0],r=n[1],this.p_uint32(e),this.p_uint32(r)},e.prototype.p_boolean=function(e){return this.p_uint8(e?t.true:t.false)},e.prototype.p_null=function(){return this.p_uint8(t.null)},e.prototype.p_array=function(e){var r,n,i,o;for(this.p_len(e.length,t.fix_array_min,t.fix_array_max,t.array16,t.array32),o=[],n=0,i=e.length;n<i;n++)r=e[n],o.push(this.p(r));return o},e.prototype.p_obj=function(e){var r,n,i,o,s,a;for(i=(n=Object.keys(e)).length,this.p_len(i,t.fix_map_min,t.fix_map_max,t.map16,t.map32),this._opts.sort_keys&&n.sort(),a=[],o=0,s=n.length;o<s;o++)r=n[o],this.p(r),a.push(this.p(e[r]));return a},e.prototype.p_positive_int=function(e){return e<=127?this.p_uint8(e):e<=255?(this.p_uint8(t.uint8),this.p_uint8(e)):e<=65535?(this.p_uint8(t.uint16),this.p_uint16(e)):e<o?(this.p_uint8(t.uint32),this.p_uint32(e)):(this.p_uint8(t.uint64),this.p_uint32(Math.floor(e/o)),this.p_uint32(e%o))},e.prototype.p_negative_int=function(e){return e>=-32?this.p_int8(e):e>=-128?(this.p_uint8(t.int8),this.p_int8(e)):e>=-32768?(this.p_uint8(t.int16),this.p_int16(e)):e>=-2147483648?(this.p_uint8(t.int32),this.p_int32(e)):(this.p_uint8(t.int64),this.p_neg_int64(e))},e.prototype.p_buffer=function(t){return this._buffer.push_buffer(t)},e.prototype.p_bin=function(e){return this.p_len(e.length,null,null,t.bin16,t.bin32,t.bin8),this.p_buffer(e)},e.prototype.p_str=function(e){var r,n;return r=this._buffer.prepare_utf8(e),n=this._opts.no_str8?null:t.str8,this.p_len(r.length,t.fix_str_min,t.fix_str_max,t.str16,t.str32,n),this.p_buffer(r)},e.prototype.p_len=function(t,e,r,n,i,o){return null==o&&(o=null),null!=e&&null!=r&&t<=r-e?this.p_uint8(t|e):null!=o&&t<=255?(this.p_uint8(o),this.p_uint8(t)):t<=65535?(this.p_uint8(n),this.p_uint16(t)):(this.p_uint8(i),this.p_uint32(t))},e.prototype.p_ext=function(e){var r,n,i,o;if(null==this._opts.ext)return!1;if(i=this._opts.ext(e)){switch(o=i[0],n=(r=i[1]).length){case 1:this.p_uint8(t.fix_ext1);break;case 2:this.p_uint8(t.fix_ext2);break;case 4:this.p_uint8(t.fix_ext4);break;case 8:this.p_uint8(t.fix_ext8);break;case 16:this.p_uint8(t.fix_ext16);break;default:n<=255?(this.p_uint8(t.ext8),this.p_uint8(n)):n<=65535?(this.p_uint8(t.ext16),this.p_uint16(n)):(this.p_uint8(t.ext32),this.p_uint32(n))}return this.p_uint8(o),this.p_buffer(r),!0}return!1},e}(),e.pack=function(t,e){var r;return null==e&&(e={}),(r=new n(e)).p(t),r.output()}}).call(this)},function(t,e){(function(){e.C={null:192,false:194,true:195,bin8:196,bin16:197,bin32:198,ext8:199,ext16:200,ext32:201,float:202,double:203,uint8:204,uint16:205,uint32:206,uint64:207,int8:208,int16:209,int32:210,int64:211,fix_ext1:212,fix_ext2:213,fix_ext4:214,fix_ext8:215,fix_ext16:216,str8:217,str16:218,str32:219,array16:220,array32:221,map16:222,map32:223,fix_str_min:160,fix_str_max:191,fix_array_min:144,fix_array_max:159,fix_map_min:128,fix_map_max:143,fix_array_count_mask:15,fix_map_count_mask:15,fix_str_count_mask:31,negative_fix_min:224,negative_fix_max:255,negative_fix_mask:31,negative_fix_offset:32,positive_fix_max:127,rpc_request:0,rpc_response:1,rpc_notify:2}}).call(this)},function(t,e,r){(function(t){(function(){var n,i;i=r(537).twos_compl_inv,n=t,e.PpBuffer=function(){function t(t){null==t?(this._frozen_buf=null,this._sub_buffers=[],this._limits=[],this._sz=1024,this._small_buf_sz=256,this._logsz=10,this._i=0,this._tot=0):this._freeze_to(t)}return t.prototype._nb=function(){return this._sub_buffers.length},t.prototype._ab=function(){return this._sub_buffers[this._nb()-1]},t.prototype._lib=function(){return 0},t.prototype._finish_sub_buffer=function(){return this._limits.push(this._i),this._i=0},t.prototype._push_sub_buffer=function(t){return this._sub_buffers.length&&this._finish_sub_buffer(),this._lib=function(){return t.length-this._i},this._sub_buffers.push(t),t},t.prototype._make_room=function(){return this._push_sub_buffer(n.alloc(this._sz))},t.prototype._make_room_for_n_bytes=function(t){if(this._lib()<t)return this._make_room()},t.prototype.push_uint8=function(t){return 1,this._make_room_for_n_bytes(1),this._ab().writeUInt8(t,this._i),this._i+=1,this._tot+=1},t.prototype.push_int8=function(t){return 1,this._make_room_for_n_bytes(1),this._ab().writeInt8(t,this._i),this._i+=1,this._tot+=1},t.prototype.push_uint16=function(t){return 2,this._make_room_for_n_bytes(2),this._ab().writeUInt16BE(t,this._i),this._i+=2,this._tot+=2},t.prototype.push_uint32=function(t){return 4,this._make_room_for_n_bytes(4),this._ab().writeUInt32BE(t,this._i),this._i+=4,this._tot+=4},t.prototype.push_int16=function(t){return 2,this._make_room_for_n_bytes(2),this._ab().writeInt16BE(t,this._i),this._i+=2,this._tot+=2},t.prototype.push_int32=function(t){return 4,this._make_room_for_n_bytes(4),this._ab().writeInt32BE(t,this._i),this._i+=4,this._tot+=4},t.prototype.push_float64=function(t){return 8,this._make_room_for_n_bytes(8),this._ab().writeDoubleBE(t,this._i),this._i+=8,this._tot+=8},t.prototype.push_float32=function(t){return 4,this._make_room_for_n_bytes(4),this._ab().writeFloatBE(t,this._i),this._i+=4,this._tot+=4},t.prototype.push_raw_bytes=function(t){return this.push_buffer(n.from(t,"binary"))},t.prototype.prepare_utf8=function(t){return n.from(t,"utf8")},t.prototype.push_buffer=function(t){var e,r;return t.length>this._small_buf_sz?(this._push_sub_buffer(t),this._i=t.length,this._tot+=t.length):((r=Math.min(t.length,this._lib()))>0&&(t.copy(this._ab(),this._i,0,r),this._i+=r,this._tot+=r),r<t.length&&(this._make_room(),t.copy(this._ab(),this._i,r,t.length),e=t.length-r,this._i+=e,this._tot+=e)),this},t.prototype.freeze=function(){var t,e,r,i,o,s,a;if(null==this._frozen_buf){for(this._finish_sub_buffer(),i=[],e=o=0,s=(a=this._sub_buffers).length;o<s;e=++o)t=a[e],(r=this._limits[e])===t.length?i.push(t):r>0&&i.push(t.slice(0,r));this._sub_buffers=[],this._frozen_buf=n.concat(i,this._tot)}return this._frozen_buf},t.prototype._freeze_to=function(t){return this._frozen_buf=t,this._tot=t.length,this._sub_buffers=[],this._cp=0,this},t.prototype.bytes_left=function(){return this._tot-this._cp},t.prototype._get=function(t){if(t<this._tot)return this._frozen_buf.readUInt8(t);throw new Error("read off end of buffer")},t.prototype.read_uint8=function(){return this._get(this._cp++)},t.prototype.read_int8=function(){return i(this.read_uint8(),8)},t.prototype.read_uint16=function(){var t;return t=this._frozen_buf.readUInt16BE(this._cp),this._cp+=2,t},t.prototype.read_uint32=function(){var t;return t=this._frozen_buf.readUInt32BE(this._cp),this._cp+=4,t},t.prototype.read_int16=function(){var t;return t=this._frozen_buf.readInt16BE(this._cp),this._cp+=2,t},t.prototype.read_int32=function(){var t;return t=this._frozen_buf.readInt32BE(this._cp),this._cp+=4,t},t.prototype.read_float64=function(){var t;return t=this._frozen_buf.readDoubleBE(this._cp),this._cp+=8,t},t.prototype.read_float32=function(){var t;return t=this._frozen_buf.readFloatBE(this._cp),this._cp+=4,t},t.prototype.read_buffer=function(t){var e,r,n;if(t>(e=this.bytes_left()))throw new Error("Corruption: asked for "+t+" bytes, but only "+e+" available");return r=this._cp+t,n=this._frozen_buf.slice(this._cp,r),this._cp=r,n},t.isBuffer=function(t){return n.isBuffer(t)},t}(),e.bufeq=function(t,e){var r,n,i;if(t.length!==e.length)return!1;for(r=n=0,i=t.lenth;0<=i?n<i:n>i;r=0<=i?++n:--n)if(t.readUInt8(r)!==e.readUInt8(r))return!1;return!0}}).call(this)}).call(this,r(12).Buffer)},function(t,e){(function(){var t;e.pow2=t=function(t){return t<31?1<<t:Math.pow(2,t)},e.U32MAX=t(32),e.rshift=function(t,e){return e<31?t>>e:Math.floor(t/Math.pow(2,e))},e.twos_compl=function(e,r){return e<0?t(r)-Math.abs(e):e},e.twos_compl_inv=function(e,r){return e-t(r)}}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h={}.hasOwnProperty;s=r(36),n=r(41).kb,a=r(101),r(113).SHA512,t=a.Decryptor,a.prng.native_rng,o=r(539).Packet,(u=r(453)).pack,u.box,r(73).make_esc,r(445),(f=r(56)).bufeq_secure,f.bufferify,i=function(e){function r(t){var e,i;this.pub=t.pub,i=t.priv_clear,e=t.priv,this.type=t.type,r.__super__.constructor.call(this),this.priv=null!=e?e:null!=i?{data:i,encryption:n.key_encryption.none}:void 0}return function(t,e){for(var r in e)h.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.tag=function(){return n.packet_tags.p3skb},r.prototype.tag=function(){return r.tag()},r.prototype.get_packet_body=function(){var t;return t={pub:this.pub,priv:this.priv},null!=this.type&&(t.type=this.type),t},r.prototype.lock=function(t,e){var r,i,o,a,u,f,h,c;f=s.findDeferral(arguments),r=t.asp,u=t.tsenc,a=t.passphrase_generation,(c=this,function(t){h=new s.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/p3skb.iced",funcname:"P3SKB.lock"}),u.run({data:c.priv.data,progress_hook:null!=r?r.progress_hook():void 0},h.defer({assign_fn:function(){return o=arguments[0],i=arguments[1]},lineno:30})),h._fulfill()})(function(t){return function(){return null==o&&(t.priv.data=i,t.priv.encryption=n.key_encryption.triplesec_v3,null!=a&&(t.priv.passphrase_generation=a)),e(o)}}(this))},r.prototype.unlock=function(e,r){var i,o,a,u,f,h,c,l,p,d,m,y;d=s.findDeferral(arguments),o=e.asp,p=e.tsenc,h=e.passphrase_generation,(y=this,function(e){switch(y.priv.encryption){case n.key_encryption.triplesec_v3:case n.key_encryption.triplesec_v2:case n.key_encryption.triplesec_v1:u=new t({enc:p}),c=null!=o?o.progress_hook():void 0,function(t){m=new s.Deferrals(t,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/p3skb.iced",funcname:"P3SKB.unlock"}),u.run({data:y.priv.data,progress_hook:c},m.defer({assign_fn:function(){return f=arguments[0],l=arguments[1]},lineno:42})),m._fulfill()}((function(){return u.scrub(),e(null==f?(y.priv.data=l,y.priv.encryption=n.key_encryption.none):null!=(i=h)&&null!=(a=y.priv.passphrase_generation)&&i!==a?f=new Error("Decryption failed, likely due to old passphrase (wanted v"+i+" but got v"+a+") ["+f.toString()+"]"):void 0)}));break;case n.key_encryption.none:return e();default:return e(f=new Error("Unknown key encryption type: "+k.encryption))}})((function(){return r(f)}))},r.alloc=function(t){var e,n;if(n=t.tag,e=t.body,n===r.tag())return new r(e);throw new Error("wrong tag found: "+n)},r.prototype.has_private=function(){return null!=this.priv},r.prototype.is_locked=function(){return this.priv.encryption!==n.key_encryption.none},r.prototype.get_private_data=function(){var t;return null!=(t=this.priv)?t.data:void 0},r.prototype.get_public_data=function(){return this.pub},r.prototype.get_key_type=function(){return this.type},r.prototype.is_p3skb=function(){return!0},r}(o),e.P3SKB=i}).call(this)},function(t,e,r){(function(){var t,n,i;r(56),i=r(453).seal,t=r(41).kb,n=function(){function e(){}return e.prototype.frame_packet=function(){return{tag:this.tag(),body:this.get_packet_body()}},e.prototype.frame_packet_armored=function(t){var e,r;return e=t.dohash,r=this.frame_packet(),i({obj:r,dohash:e}).toString("base64")},e.prototype.is_signature=function(){return!1},e.prototype.is_p3skb=function(){return!1},e.alloc=function(e){var n,i,o,s;return s=e.tag,n=e.body,i=null,o=function(){switch(s){case t.packet_tags.p3skb:return r(538).P3SKB.alloc({tag:s,body:n});case t.packet_tags.signature:return r(540).Signature.alloc({tag:s,body:n});default:return i=new Error("unknown packet tag: "+s),null}}(),[i,o]},e.prototype.unbox=function(t,e){return e(new Error("unbox() unimplemented for tag="+this.tag))},e}(),e.Packet=n}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h={}.hasOwnProperty;a=r(36),u=r(41),n=u.kb,t=u.openpgp,i=r(539).Packet,f=r(73).make_esc,s=r(541).eddsa,o=function(e){function r(t){var e;this.key=t.key,this.payload=t.payload,this.sig=t.sig,this.detached=t.detached,null!=(e=t.prefix)&&(this.prefix=e),r.__super__.constructor.call(this)}return function(t,e){for(var r in e)h.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.SIG_TYPE=n.public_key_algorithms.NACL_EDDSA,r.HASH_TYPE=t.hash_algorithms.SHA512,r.tag=function(){return n.packet_tags.signature},r.prototype.tag=function(){return r.tag()},r.prototype.get_packet_body=function(){var t,e,n;return n=r.SIG_TYPE,t=r.HASH_TYPE,e={key:this.key,payload:this.payload,sig:this.sig,detached:this.detached,sig_type:n,hash_type:t},null!=this.prefix&&(e.prefix=this.prefix),e},r.alloc=function(t){var e,n,i,o,s,a;if(a=t.tag,i=t.body,s=null,null!=(o=a!==r.tag()?new Error("wrong tag found: "+a):(e=i.hash_type)!==(n=r.HASH_TYPE)?new Error("Expected SHA512 (type "+n+"); got "+e):(e=i.sig_type)!==(n=r.SIG_TYPE)?o=new Error("Expected EDDSA (type "+n+"); got "+e):(s=new r(i),null)))throw o;return s},r.prototype.is_signature=function(){return!0},r.prototype.verify=function(t){var e,r,n,i,o,u,h;i=a.findDeferral(arguments),r=f(t,"verify"),e=null,u=s.Pair.parse_kb(this.key),e=u[0],n=u[1],(h=this,function(t){if(null!=e)return t();!function(t){o=new a.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/signature.iced",funcname:"Signature.verify"}),n.verify_kb(h,r(o.defer({lineno:61}))),o._fulfill()}(t)})(function(r){return function(){return t(e,{keypair:n,payload:r.payload})}}(this))},r.prototype.unbox=function(t,e){var r,n,i,o,s;i=a.findDeferral(arguments),(s=this,function(t){o=new a.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/signature.iced",funcname:"Signature.unbox"}),s.verify(o.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:67})),o._fulfill()})((function(){return e(r,n)}))},r.box=function(t,e){var n,i,o,s,u,h,c,l,p,d;p=a.findDeferral(arguments),o=t.km,c=t.prefix,h=t.payload,i=f(e,"@sign"),u=o.get_keypair(),n=!0,function(t){d=new a.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/signature.iced",funcname:"Signature.box"}),u.sign_kb({payload:h,prefix:c,detached:n},i(d.defer({assign_fn:function(){return l=arguments[0]},lineno:76}))),d._fulfill()}((function(){return s=new r({key:u.ekid(),payload:h,sig:l,detached:n,prefix:c}),e(null,s)}))},r}(i),e.Signature=o,e.sign=o.sign}).call(this)},function(t,e,r){(function(){e.eddsa=r(454),e.dh=r(542)}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v={}.hasOwnProperty;m=r(36),l=r(797).box,f=r(112).SRF,y=r(41),i=y.kb,g=r(56),d=g.genseed,p=g.bufeq_fast,r(207).BaseKey,n=r(811).BaseKeyPair,b=r(454),b.b2u,b.u2b,o=r(454).Pair,h=i.public_key_algorithms.NACL_DH,c=function(t){return new Uint8Array(t)},_=function(e){return t.from(e)},u=function(){function e(t){this.key=t}return e.HEADER=t.from([i.kid.version,h]),e.TRAILER=t.from([i.kid.trailer]),e.LEN=e.HEADER.length+e.TRAILER.length+l.publicKeyLength,e.alloc_kb=function(t){var r;return r=null,[t.length!==e.LEN?new Error("bad key length"):p(t.slice(-1),e.TRAILER)?p(t.slice(0,2),e.HEADER)?(r=new e(t.slice(2,-1)),null):new Error("bad header"):new Error("bad trailing byte"),r]},e.prototype.serialize=function(){return this.key},e.prototype.nbits=function(){return 255},e.prototype.read_params=function(t){},e.prototype.encrypt=function(t,e){var r,n,i,o,s,a,u,h,p,d;h=m.findDeferral(arguments),o=t.plaintext,u=t.sender,i=t.nonce,n=a=null,function(t){if(null!=i)return t(i.length!==l.nonceLength?n=new Error("bad nonce; wrong length (wanted "+l.nonceLength+")"):void 0);!function(t){p=new m.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/nacl/dh.iced",funcname:"Pub.encrypt"}),f().random_bytes(l.nonceLength,p.defer({assign_fn:function(){return i=arguments[0]},lineno:52})),p._fulfill()}(t)}((d=this,function(){return null==n&&(s=l(c(o),c(i),c(d.key),c(u.priv.key)),r=_(s),a={ciphertext:r,nonce:i}),e(n,a)}))},e}(),a=function(){function t(t){this.key=t}return t.prototype.alloc=function(e){var r,n;return r=n=null,e.length!==l.secretKeyLength?r=new Error("Bad secret key length"):n=new t(e),[r,n]},t.prototype.decrypt=function(t,e){var r,n,i,o,s;return r=t.ciphertext,i=t.nonce,s=t.sender,n=o=null,!1===(o=l.open(c(r),c(i),c(s.pub.key),c(this.key)))?(n=new Error("decryption failed"),o=null):o=_(o),e(n,o)},t}(),s=function(t){function e(t){var r,n;n=t.pub,r=t.priv,e.__super__.constructor.call(this,{pub:n,priv:r})}return function(t,e){for(var r in e)v.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.Pub=u,e.prototype.Pub=u,e.Priv=a,e.prototype.Priv=a,e.type=i.public_key_algorithms.NACL_DH,e.prototype.type=e.type,e.prototype.get_type=function(){return this.type},e.klass_name="DH",e.prototype.can_encrypt=function(){return!0},e.prototype.can_sign=function(){return!1},e.prototype.hash=function(){return this.serialize()},e.prototype.encrypt_kb=function(t,e){var r,n,i;return n=t.plaintext,i=t.sender,r=t.nonce,this.pub.encrypt({plaintext:n,sender:i,nonce:r},e)},e.prototype.decrypt_kb=function(t,e){var r,n,i,o,s,a,u,f;a=m.findDeferral(arguments),r=t.ciphertext,i=t.nonce,s=t.sender,n=null,(f=this,function(t){if(null==f.priv)return t(n=new Error("no secret key available"));!function(t){u=new m.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/nacl/dh.iced",funcname:"Pair.decrypt_kb"}),f.priv.decrypt({ciphertext:r,nonce:i,sender:s},u.defer({assign_fn:function(){return n=arguments[0],o=arguments[1]},lineno:125})),u._fulfill()}(t)})((function(){return e(n,o)}))},e.subkey_algo=function(t){return t&(C.key_flags.encrypt_comm|C.key_flags.encrypt_storage)?e:o},e.prototype.fulfills_flags=function(t){return(t&(C.key_flags.encrypt_comm|C.key_flags.encrypt_storage))===t},e.prototype.verify_unpad_and_check_hash=function(t,e){return t.sig,t.data,t.hasher,t.hash,e(new Error("verify_unpad_and_check_hash unsupported"))},e.prototype.pad_and_sign=function(t,e,r){return e.hasher,r(new Error("pad_and_sign unsupported"))},e.parse_kb=function(t){return n.parse_kb(e,t)},e.parse_sig=function(t){throw new Error("@parse_sig unsupported")},e.read_sig_from_buf=function(t){return[new Error("@read_sig_from_buf unsupported")]},e.generate=function(t,r){var n,i,o,s,f,h,p,y,g,b,v,w;v=m.findDeferral(arguments),g=t.server_half,y=t.seed,b=t.split,n={seed:y,split:b,len:l.secretKeyLength,server_half:g},function(t){w=new m.Deferrals(t,{parent:v,filename:"/Users/max/src/keybase/kbpgp/src/nacl/dh.iced",funcname:"Pair.generate"}),d(n,w.defer({assign_fn:function(){return i=arguments[0],g=arguments[1].server_half,y=arguments[1].seed},lineno:186})),w._fulfill()}((function(){var t;return h=null,null==i&&(t=l.keyPair.fromSecretKey(c(y)),p=t.secretKey,f=t.publicKey,s=new u(_(f)),o=new a(_(p)),h=new e({pub:s,priv:o})),r(i,h,g)}))},e}(n),e.DH=e.Pair=s}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c={}.hasOwnProperty;u=r(36),f=r(73).make_esc,i=r(544).burn,h=r(452),o=r(236).decode,t=r(41),n=r(545).SignatureEngineInterface,e.decode_sig=s=function(e){var r,n,i,s,a;return r=e.armored,n=(a=o(r))[0],i=a[1],s=t.openpgp.message_types,null==n&&i.type!==s.generic&&(n=new Error("wrong message type; expected a generic message; got "+i.type)),[n,i]},e.get_sig_body=a=function(t){var e,r,n,i,o;return e=t.armored,i=null,r=(o=s({armored:e}))[0],n=o[1],null==r&&(i=n.body),[r,i]},e.SignatureEngine=function(t){function e(t){this.km=t.km}return function(t,e){for(var r in e)c.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.get_km=function(){return this.km},e.prototype.box=function(t,e,r){var n,o,s,a,f,h;a=u.findDeferral(arguments),null==r&&(r={}),o={type:"pgp"},(h=this,function(e){if(null!=r.prefix)return e(n=new Error("prefixes cannot be used with PGP"));!function(e){if(null==(s=h.km.find_signing_pgp_key()))return e(n=new Error("No signing key found"));!function(e){var h,c;f=new u.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.box"}),i({msg:t,signing_key:s,opts:r},f.defer({assign_fn:(h=o,c=o,function(){return n=arguments[0],h.pgp=arguments[1],c.raw=arguments[2]}),lineno:38})),f._fulfill()}((function(){return e(null==n?o.armored=o.pgp:void 0)}))}(e)})((function(){return e(n,o)}))},e.prototype.get_unverified_payload_from_raw_sig_body=function(t,e){var r,n,i,o,s,a,c,l,p,d;p=u.findDeferral(arguments),r=t.body,i=f(e,"get_payload_from_raw_sig_body"),l=null,a=new h.Message({}),function(t){d=new u.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.get_unverified_payload_from_raw_sig_body"}),a.parse_and_inflate(r,i(d.defer({assign_fn:function(){return s=arguments[0]},lineno:49}))),d._fulfill()}((function(){return 1!==(c=s.length)||null==(o=s[0])?n=new Error("Got "+c+" literals; only wanted 1"):l=o.data,e(n,l)}))},e.prototype.get_body=function(t,e){var r;return e((r=a(t))[0],r[1])},e.prototype.decode=function(t,e){var r;return e((r=s({armored:t}))[0],r[1])},e.prototype.unbox=function(t,e,r){var n,i,o,s,a,c,l;a=u.findDeferral(arguments),null==r&&(r={}),i=f(e,"SignatureEngine::unbox"),(l=this,function(e){if("string"!=typeof t)return e();!function(e){c=new u.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.unbox"}),l.decode(t,i(c.defer({assign_fn:function(){return t=arguments[0]},lineno:73}))),c._fulfill()}(e)})(function(f){return function(){r.keyfetch=f.km,r.strict=!0,n=new h.Message(r),c=new u.Deferrals((function(){c=new u.Deferrals((function(){return e(null,s,t.body)}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.unbox"}),f._check_result(o,i(c.defer({assign_fn:function(){return s=arguments[0]},lineno:78}))),c._fulfill()}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/sigeng.iced",funcname:"SignatureEngine.unbox"}),n.parse_and_process({body:t.body},i(c.defer({assign_fn:function(){return o=arguments[0]},lineno:77}))),c._fulfill()}}(this))},e.prototype._check_result=function(t,e){var r,n,i,o,s,a,u;return n=s=null,1!==(o=t.length)||null==(i=t[0])?n=new Error("Expected only one pgp literal; got "+o):null==(a=null!=(u=i.get_data_signer())?u.sig:void 0)?n=new Error("Expected a signature on the payload message"):null==this.km.find_pgp_key(r=a.get_key_id())?n=new Error("Failed sanity check; didn't have a key for '"+r.toString("hex")+"'"):s=i.data,e(n,s)},e}(n)}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P,I={}.hasOwnProperty;M=r(36),x=r(73).make_esc,h=r(806).OnePassSignature,D=r(368),m=D.Signature,a=D.CreationTime,u=D.Issuer,s=r(805).Compressed,f=r(451).Literal,B=r(56).unix_time,d=r(112).SRF,A=r(101),R=r(419),w=R.export_key_pgp,k=R.get_cipher,E=A.util.scrub_buffer,y=A.WordArray,P=r(803),l=P.SEIPD,c=P.PKESK,o=r(41).openpgp,p=r(113).SHA512,v=r(236).encode,_=r(807),g=r(809),n=r(1353).BaseBurner,b=t.from(function(){var t,e;for(e=[],t=0;t<16;t++)e.push(0);return e}()),i=function(e){function r(t){var e,n,i,o,s;this.literals=t.literals,this.opts=t.opts,o=t.sign_with,n=t.encrypt_for,s=t.signing_key,i=t.encryption_key,e=t.asp,r.__super__.constructor.call(this,{sign_with:o,encrypt_for:n,signing_key:s,encryption_key:i,asp:e}),this.packets=[],this.opts||(this.opts={}),this.signed_payload=null}return function(t,e){for(var r in e)I.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype._frame_literals=function(e){var r,n,i,o,s,a,u;s=M.findDeferral(arguments),r=x(e,"Burner::_frame_literals"),o=[],(u=this,function(t){var e,f,h,c;h=u.literals,f=h.length,e=0,(c=function(t){var l;if(l=function(){return M.trampoline((function(){return++e,c(t)}))},!(e<f))return t();n=h[e],o.push(n.to_signature_payload()),a=new M.Deferrals((function(){return l(u.packets.push(i))}),{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._frame_literals"}),n.write(r(a.defer({assign_fn:function(){return i=arguments[0]},lineno:51}))),a._fulfill()})(t)})(function(r){return function(){return r.signed_payload=t.concat(o),e(null)}}(this))},r.prototype._sign=function(t){var e,r,n,i,s,f,c,l,d,y,_;c=M.findDeferral(arguments),e=x(t,"Burner::_sign"),n=null!=(d=null!=(y=this.opts)?y.hasher:void 0)?d:p,i=new h({sig_type:o.sig_types.binary_doc,hasher:n,sig_klass:this.signing_key.get_klass(),key_id:this.signing_key.get_key_id(),is_final:1}),function(t){l=new M.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._sign"}),i.write(e(l.defer({assign_fn:function(){return s=arguments[0]},lineno:68}))),l._fulfill()}((_=this,function(){var i;f=new m({type:o.sig_types.binary_doc,hasher:n,key:_.signing_key.key,hashed_subpackets:[new a((null!=(i=_.opts)?i.now:void 0)||B())],unhashed_subpackets:[new u(_.signing_key.get_key_id())]}),l=new M.Deferrals((function(){l=new M.Deferrals((function(){l=new M.Deferrals((function(){return _.packets.unshift(s),_.packets.push(r),t(null)}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._sign"}),_.asp.progress({what:"sign",i:1,total:1},e(l.defer({lineno:78}))),l._fulfill()}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._sign"}),f.write(_.signed_payload,e(l.defer({assign_fn:function(){return r=arguments[0]},lineno:77}))),l._fulfill()}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._sign"}),_.asp.progress({what:"sign",i:0,total:1},e(l.defer({lineno:76}))),l._fulfill()}))},r.prototype.collect_packets=function(){var e;return e=t.concat(this.packets),this.packets=[],e},r.prototype._compress=function(t){var e,r,n,i,a,u,f;a=M.findDeferral(arguments),e=x(t,"Burner::_compress"),r=this.collect_packets(),i=new s({algo:o.compression.zlib,inflated:r}),(f=this,function(t){u=new M.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._compress"}),f.asp.progress({what:"compress",i:0,total:1},e(u.defer({lineno:96}))),u._fulfill()})(function(r){return function(){u=new M.Deferrals((function(){u=new M.Deferrals((function(){return r.packets.push(n),t(null)}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._compress"}),r.asp.progress({what:"compress",i:1,total:1},e(u.defer({lineno:98}))),u._fulfill()}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._compress"}),i.write(e(u.defer({assign_fn:function(){return n=arguments[0]},lineno:97}))),u._fulfill()}}(this))},r.prototype._make_session_key=function(t){var e,r,n;e=M.findDeferral(arguments),this._cipher_algo=o.symmetric_key_algorithms.AES256,this._cipher_info=k(this._cipher_algo),(n=this,function(t){var i;r=new M.Deferrals(t,{parent:e,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._make_session_key"}),d().random_bytes(n._cipher_info.key_size,r.defer({assign_fn:(i=n,function(){return i._session_key=arguments[0]}),lineno:107})),r._fulfill()})(function(e){return function(){return e._cipher=new e._cipher_info.klass(y.from_buffer(e._session_key)),t(null)}}(this))},r.prototype.scrub=function(){if(null!=this._cipher&&this._cipher.scrub(),null!=this._session_key)return E(this._session_key)},r.prototype._encrypt_session_key_once=function(t,e){var r,n,i,o,s,a,u,f,h,l,p;h=M.findDeferral(arguments),n=x(e,"_encrypt_session_key_once"),s=w(this._cipher_algo,this._session_key),f=t.key,i=t.get_fingerprint(),(p=this,function(t){l=new M.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_session_key_once"}),p.asp.progress({what:"session key encrypt",i:0,total:1},n(l.defer({lineno:124}))),l._fulfill()})(function(p){return function(){l=new M.Deferrals((function(){l=new M.Deferrals((function(){!function(e){if(!p.opts.hide)return e(o=t.get_key_id());o=b,function(t){l=new M.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_session_key_once"}),p.asp.progress({what:"hide encryption",i:0,total:1},n(l.defer({lineno:129}))),l._fulfill()}((function(){!function(t){var e,i;l=new M.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_session_key_once"}),r.hide({max:null!=(e=p.opts.hide)?e.max:void 0,slosh:null!=(i=p.opts.hide)?i.slosh:void 0,key:f},n(l.defer({lineno:130}))),l._fulfill()}((function(){!function(t){l=new M.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_session_key_once"}),p.asp.progress({what:"hide encryption",i:1,total:1},n(l.defer({lineno:131}))),l._fulfill()}(e)}))}))}((function(){u=new c({crypto_type:f.type,key_id:o,ekey:r}),l=new M.Deferrals((function(){return e(null,a)}),{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_session_key_once"}),u.write(n(l.defer({assign_fn:function(){return a=arguments[0]},lineno:139}))),l._fulfill()}))}),{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_session_key_once"}),p.asp.progress({what:"session key encrypt",i:1,total:1},n(l.defer({lineno:126}))),l._fulfill()}),{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_session_key_once"}),f.pad_and_encrypt(s,{fingerprint:i},n(l.defer({assign_fn:function(){return r=arguments[0]},lineno:125}))),l._fulfill()}}(this))},r.prototype._encrypt_session_key=function(t){var e,r,n,i,o,s;i=M.findDeferral(arguments),e=x(t,"_encrypt_session_key"),this._pkesks=[],(s=this,function(t){var a,u,f,h;f=s.encryption_keys,u=f.length,a=0,(h=function(t){var c;if(c=function(){return M.trampoline((function(){return++a,h(t)}))},!(a<u))return t();r=f[a],o=new M.Deferrals((function(){return c(s._pkesks.push(n))}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_session_key"}),s._encrypt_session_key_once(r,e(o.defer({assign_fn:function(){return n=arguments[0]},lineno:148}))),o._fulfill()})(t)})((function(){return t(null)}))},r.prototype._encrypt_payload=function(t){var e,r,n,i,o,s,a,u;s=M.findDeferral(arguments),r=x(t,"Burner::_encrypt_payload"),i=this.collect_packets(),(u=this,function(t){a=new M.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_payload"}),d().random_bytes(u._cipher.blockSize,a.defer({assign_fn:function(){return o=arguments[0]},lineno:157})),a._fulfill()})(function(u){return function(){n=new l({}),e=u.asp.section("encrypt payload"),a=new M.Deferrals((function(){a=new M.Deferrals((function(){return E(i),u.packets=u._pkesks.concat([n]),t(null)}),{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_payload"}),n.write(r(a.defer({assign_fn:function(){return n=arguments[0]},lineno:161}))),a._fulfill()}),{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt_payload"}),n.encrypt({cipher:u._cipher,plaintext:i,prefixrandom:o,asp:e},r(a.defer({lineno:160}))),a._fulfill()}}(this))},r.prototype._encrypt=function(t){var e,r,n,i;r=M.findDeferral(arguments),e=x(t,"Burner::_encrypt"),(i=this,function(t){n=new M.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt"}),i._make_session_key(e(n.defer({lineno:170}))),n._fulfill()})(function(i){return function(){n=new M.Deferrals((function(){n=new M.Deferrals((function(){return t(null)}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt"}),i._encrypt_payload(e(n.defer({lineno:172}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner._encrypt"}),i._encrypt_session_key(e(n.defer({lineno:171}))),n._fulfill()}}(this))},r.prototype.scrub=function(){},r.prototype.burn=function(e){var r,n,i,o,s;i=M.findDeferral(arguments),r=x(e,"Burner::burn"),(s=this,function(t){o=new M.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner.burn"}),s._find_keys(r(o.defer({lineno:183}))),o._fulfill()})(function(s){return function(){o=new M.Deferrals((function(){!function(t){if(null==s.signing_key)return t();!function(t){o=new M.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner.burn"}),s._sign(r(o.defer({lineno:186}))),o._fulfill()}(t)}((function(){o=new M.Deferrals((function(){!function(t){if(null==s.encryption_keys)return t();!function(t){o=new M.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner.burn"}),s._encrypt(r(o.defer({lineno:189}))),o._fulfill()}(t)}((function(){return n=t.concat(s.packets),e(null,n)}))}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner.burn"}),s._compress(r(o.defer({lineno:187}))),o._fulfill()}))}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"Burner.burn"}),s._frame_literals(r(o.defer({lineno:184}))),o._fulfill()}}(this))},r}(n),e.Burner=i,e.make_simple_literals=S=function(e){return[new f({data:t.from(e),format:o.literal_formats.utf8,date:B()})]},e.clearsign=_.sign,e.detachsign=g.sign,e.burn=function(t,e){var r,n,s,a,u,f,h,c,l,p,d,m,y,_;y=M.findDeferral(arguments),c=t.msg,h=t.literals,d=t.sign_with,a=t.encrypt_for,m=t.signing_key,u=t.encryption_key,n=t.asp,l=t.opts,null!=c&&null==h&&(h=S(c)),s=new i({literals:h,sign_with:d,encrypt_for:a,signing_key:m,encryption_key:u,asp:n,opts:l}),function(t){_=new M.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/burner.iced",funcname:"burn"}),s.burn(_.defer({assign_fn:function(){return f=arguments[0],p=arguments[1]},lineno:249})),_._fulfill()}((function(){return s.scrub(),null!=p&&null==f&&(r=v(o.message_types.generic,p)),e(f,r,p)}))}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s={}.hasOwnProperty;i=r(36),n=r(420).KeyFetcher,o=r(73).make_esc,t=new Error("not implemented"),e.KeyManagerInterface=function(e){function r(){}return function(t,e){for(var r in e)s.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.get_pgp_fingerprint=function(){return null},r.prototype.get_ekid=function(){return null},r.prototype.get_fp2=function(){return null},r.prototype.get_fp2_formatted=function(){return null},r.prototype.get_type=function(){return null},r.prototype.check_public_eq=function(t){return this.EUI},r.prototype.get_userids=function(){return[]},r.prototype.get_primary_keypair=function(){return null},r.prototype.get_all_pgp_key_materials=function(){return[]},r.prototype.get_userids_mark_primary=function(){return[]},r.prototype.make_sig_eng=function(){return null},r.prototype.export_pgp_public=function(t,e){return e(null,null)},r.prototype.export_pgp_private=function(t,e){return e(null,null)},r.prototype.export_public=function(e,r){return e.asp,e.regen,r(t,null)},r.prototype.export_private=function(e,r){return e.asp,e.passphrase,e.p3skb,r(t)},r.prototype.can_verify=function(){return!1},r.prototype.can_sign=function(){return!1},r.prototype.can_encrypt=function(){return!1},r.prototype.can_decrypt=function(){return!1},r.prototype.get_all_pgp_key_ids=function(){return[]},r.prototype.pgp_full_hash=function(t,e){return e(null,null)},r}(n),e.SignatureEngineInterface=function(){function e(t){this.km=t.km}return e.prototype.get_km=function(){return this.km},e.prototype.box=function(e,r){return r(t)},e.prototype.unbox=function(e,r){return r(t)},e.prototype.get_body=function(e,r){return e.armored,r(t)},e.prototype.get_unverified_payload_from_raw_sig_body=function(e,r){return e.body,r(t)},e.prototype.get_body_and_unverified_payload=function(t,e){var r,n,s,a,u,f,h;u=i.findDeferral(arguments),r=t.armored,s=o(e,"get_body_and_unverified_payload"),(h=this,function(t){f=new i.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/kmi.iced",funcname:"SignatureEngineInterface.get_body_and_unverified_payload"}),h.get_body({armored:r},s(f.defer({assign_fn:function(){return n=arguments[0]},lineno:96}))),f._fulfill()})(function(t){return function(){f=new i.Deferrals((function(){return e(null,n,a)}),{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/kmi.iced",funcname:"SignatureEngineInterface.get_body_and_unverified_payload"}),t.get_unverified_payload_from_raw_sig_body({body:n},s(f.defer({assign_fn:function(){return a=arguments[0]},lineno:97}))),f._fulfill()}}(this))},e}()}).call(this)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P,I,T,U,F,O,C,L,N,z,j,q,K,H,Z,G,W={}.hasOwnProperty,V=function(t,e){for(var r in e)W.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},Y=[].slice;R=r(36),j=function(){},_=r(445).RSA,o=r(447).ECDSA,g=r(113).SHA256,I=r(41),u=I.kb,i=I.openpgp,U=r(73).make_esc,B=r(449).errors,q=r(56),D=q.format_pgp_fingerprint_2,k=q.athrow,w=q.assert_no_nulls,n=q.ASP,P=q.katch,M=q.bufeq_secure,N=q.unix_time,x=q.bufferify,O=r(417).ops_to_keyflags,K=r(1342),l=K.Lifespan,v=K.Subkey,y=K.Primary,H=r(236),p=H.Message,A=H.encode,S=H.decode,E=H.decode_strict,C=r(531).parse,f=r(452).KeyBlock,F=r(1350),Z=r(453),L=Z.read_base64,z=Z.unseal,d=r(538).P3SKB,(G=r(420)).KeyFetcher,G.KeyFetched,b=r(543).SignatureEngine,s=r(101).Encryptor,c=r(545).KeyManagerInterface,a=function(){function t(t){var e,r,n;for(this.primary=t.primary,this.subkeys=t.subkeys,this.userids=t.userids,this.key_manager=t.key_manager,this.packets=[],this.messages=[],this._allocate_key_packets(),e=0,r=(n=this.subkeys).length;e<r;e++)n[e].primary=this.primary;this._index_keys()}return t.prototype._index_keys=function(){var t,e,r,n,i;for(this._index={},i=[],e=0,r=(n=this._all_keys()).length;e<r;e++)t=n[e],i.push(this._index[this.ekid(t)]=t);return i},t.prototype.ekid=function(t){return this.key(t).ekid()},t.prototype._allocate_key_packets=function(){var t,e,r,n,i;for(this._v_allocate_key_packet(this.primary,{subkey:!1}),i=[],e=0,r=(n=this.subkeys).length;e<r;e++)t=n[e],i.push(this._v_allocate_key_packet(t,{subkey:!0}));return i},t.prototype._all_keys=function(){return[this.primary].concat(this.subkeys)},t.prototype.self_sign_primary=function(t,e){return this._v_self_sign_primary(t,e)},t.prototype.get_all_key_materials=function(){var t;return[[this.key(this.primary),!0]].concat(function(){var e,r,n,i;for(i=[],e=0,r=(n=this.subkeys).length;e<r;e++)t=n[e],i.push([this.key(t),!1]);return i}.call(this))},t.prototype.sign_subkeys=function(t,e){var r,n,i,o,s,a,u;s=R.findDeferral(arguments),o=t.time,r=t.asp,n=null,(u=this,function(t){var e,f,h,c;h=u.subkeys,f=h.length,e=0,(c=function(t){var l,p,d;return l=t,d=p=function(){return R.trampoline((function(){return++e,c(t)}))},e<f?(i=h[e],null!=n?p():void function(t){a=new R.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"Engine.sign_subkeys"}),u._v_sign_subkey({asp:r,time:o,subkey:i},a.defer({assign_fn:function(){return n=arguments[0]},lineno:76})),a._fulfill()}(d)):l()})(t)})((function(){return e(n)}))},t.prototype.get_subkey_materials=function(){var t,e,r,n,i;for(i=[],e=0,r=(n=this.subkeys).length;e<r;e++)t=n[e],i.push(this.key(t));return i},t.prototype.is_locked=function(){var t,e,r,n,i;for(t=r=0,n=(i=this._all_keys()).length;r<n;t=++r)if(e=i[t],this.key(e).is_locked())return!0;return!1},t.prototype.has_private=function(){var t,e,r,n;for(e=0,r=(n=this._all_keys()).length;e<r;e++)if(t=n[e],this.key(t).has_private())return!0;return!1},t.prototype.sign=function(t,e){var r,n,i,o,s,a;o=R.findDeferral(arguments),r=t.asp,i=t.time,(a=this,function(t){s=new R.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"Engine.sign"}),a.self_sign_primary({asp:r,time:i},s.defer({assign_fn:function(){return n=arguments[0]},lineno:100})),s._fulfill()})(function(t){return function(){!function(e){if(null!=n)return e();!function(e){s=new R.Deferrals(e,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"Engine.sign"}),t.sign_subkeys({asp:r,time:i},s.defer({assign_fn:function(){return n=arguments[0]},lineno:101})),s._fulfill()}(e)}((function(){return e(n)}))}}(this))},t.prototype.check_eq=function(t){var e,r,n,i,o,s;if(e=null,this.primary.key.eq(t.primary.key))if(this.subkeys.length!==t.subkeys.length)e=new Error("different # of subkeys");else for(r=i=0,o=(s=this.subkeys).length;i<o;r=++i)n=s[r],null==this.err&&(n.key.eq(t.subkeys[r].key)||(e=new Error("subkey "+r+" doesn't match")));else e=new Error("Primary keys don't match");return e},t.prototype.merge_private=function(t){var e,r,n,i,o,s;if(null==(e=this._merge_private_primary(t)))for(r=i=0,o=(s=t.subkeys).length;i<o&&(n=s[r],null==(e=this._merge_private_subkey(n,r)));r=++i);return e},t.prototype._merge_private_primary=function(t){return this.key(t.primary).has_secret_key_material()?this._merge_1_private(this.primary,t.primary)?null:new Error("primary public key doesn't match private key"):null},t.prototype._merge_private_subkey=function(t,e){var r,n;return this.key(t).has_secret_key_material()?null==(r=this.ekid(t))?new Error("Subkey "+e+" is malformed"):null==(n=this._index[r])?new Error("Subkey "+e+" wasn't found in public key"):this._merge_1_private(n,t)?null:new Error("subkey "+e+" can't be merged"):null},t.prototype.unlock_keys=function(t,e){var r,n,i,o,s,a,u,f,h;u=R.findDeferral(arguments),r=t.asp,o=t.passphrase,a=t.tsenc,n=U(e,"Engine::unlock_keys"),(h=this,function(t){f=new R.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"Engine.unlock_keys"}),h.key(h.primary).unlock({asp:r,tsenc:a,passphrase:o},n(f.defer({lineno:149}))),f._fulfill()})(function(t){return function(){var h,c,l;c=t.subkeys,h=c.length,i=0,(l=function(e){var p,d,m;return p=e,m=d=function(){return R.trampoline((function(){return++i,l(e)}))},i<h?(s=c[i],t.key(s).has_private()?void function(e){f=new R.Deferrals(e,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"Engine.unlock_keys"}),t.key(s).unlock({asp:r,tsenc:a,passphrase:o},n(f.defer({lineno:151}))),f._fulfill()}(m):d()):p()})((function(){return e(null)}))}}(this))},t.prototype.export_keys_to_keyring=function(t){var e,r,n;return n=this,[(r=function(e,r){return{km:t,is_primary:r,key_wrapper:e,key_material:n.key(e),key:n.key(e).key}})(this.primary,!0)].concat(function(){var t,n,i,o;for(o=[],t=0,n=(i=this.subkeys).length;t<n;t++)e=i[t],o.push(r(e,!1));return o}.call(this))},t.prototype._merge_1_private=function(t,e){return!!M(this.ekid(t),this.ekid(e))&&(this.key(t).merge_private(this.key(e)),!0)},t.prototype.merge_subkey_omitting_revokes=function(t){var e,r;return e=t.ekid(),null!=(r=this._index[e])?r.overwrite_with_omitting_revokes(t):(this._index[e]=t,this.subkeys.push(t))},t.prototype.merge_public_omitting_revokes=function(t){return this.primary.overwrite_with_omitting_revokes(t.primary),this.merge_all_subkeys_omitting_revokes(t)},t.prototype.merge_all_subkeys_omitting_revokes=function(t){var e,r,n,i,o;for(o=[],r=0,n=(i=t.subkeys).length;r<n;r++)e=i[r],o.push(this.merge_subkey_omitting_revokes(e));return o},t.prototype.check_not_expired=function(t){var e,r,n;return n=t.subkey_material,(r=t.now)||(r=N()),null==(e=this.key(this.primary).check_not_expired({now:r}))&&(e=n.check_not_expired({now:r})),e},t}(),T=function(t){var e,r,n;return e=t.key_wrapper,n=t.time,r=e.lifespan,null!=n&&((r=r.copy()).generated=n),r},m=function(e){function r(t){var e,n,i,o;n=t.primary,i=t.subkeys,o=t.userids,this.user_attributes=t.user_attributes,e=t.key_manager,r.__super__.constructor.call(this,{primary:n,subkeys:i,userids:o,key_manager:e})}return V(r,e),r.prototype.key=function(t){return t._pgp},r.prototype._v_allocate_key_packet=function(t,e){if(null==t._pgp)return t._pgp=new F.KeyMaterial({key:t.key,timestamp:t.lifespan.generated,flags:t.flags,opts:e})},r.prototype._v_self_sign_primary=function(t,e){var r,n,i,o,s,a,u,f;a=R.findDeferral(arguments),s=t.time,t.asp,i=t.raw_payload,n=T({key_wrapper:this.primary,time:s}),(f=this,function(t){u=new R.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"PgpEngine._v_self_sign_primary"}),f.key(f.primary).self_sign_key({lifespan:n,userids:f.userids,raw_payload:i},u.defer({assign_fn:function(){return r=arguments[0],o=arguments[1]},lineno:241})),u._fulfill()})((function(){return e(r,o)}))},r.prototype._v_sign_subkey=function(t,e){var r,n,i,o,s,a,u;s=R.findDeferral(arguments),t.asp,i=t.subkey,o=t.time,n=T({key_wrapper:i,time:o}),(u=this,function(t){a=new R.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"PgpEngine._v_sign_subkey"}),u.key(u.primary).sign_subkey({subkey:u.key(i),lifespan:n},a.defer({assign_fn:function(){return r=arguments[0]},lineno:248})),a._fulfill()})((function(){return e(r)}))},r.prototype.clear_psc=function(){var t,e,r,n,i,o,s,a;for(this.key(this.primary).clear_psc(),e=0,n=(o=this.userids).length;e<n;e++)o[e].clear_psc();for(a=[],r=0,i=(s=this.subkeys).length;r<i;r++)t=s[r],a.push(this.key(t).clear_psc());return a},r.prototype.set_passphrase=function(t){var e,r,n,i,o;for(this.primary.passphrase=t,o=[],r=0,n=(i=this.subkeys).length;r<n;r++)e=i[r],o.push(e.passphrase=t);return o},r.prototype._export_keys_to_binary=function(e){var r,n,i,o,s,a,u,f,h;for(r=[this.key(this.primary).export_framed(e)],o=0,a=(f=this.userids).length;o<a;o++)i=f[o],r.push(i.write(),i.get_framed_signature_output());for(e.subkey=!0,s=0,u=(h=this.subkeys).length;s<u;s++)n=h[s],r.push(this.key(n).export_framed(e),this.key(n).get_subkey_binding_signature_output());return w(r),t.concat(r)},r.prototype.export_keys=function(t){var e,r,n;return r=i.message_types,n=t.private?r.private_key:r.public_key,e=this._export_keys_to_binary(t),A(n,e)},r.prototype.export_to_p3skb=function(){var t,e;return e=this._export_keys_to_binary({private:!1}),t=this._export_keys_to_binary({private:!0}),new d({pub:e,priv_clear:t})},r.prototype.find_key=function(t){var e,r,n,i;for(r=0,n=(i=this._all_keys()).length;r<n;r++)if(e=i[r],M(this.key(e).get_key_id(),t))return e;return null},r.prototype.find_key_material=function(t){var e;return null!=(e=this.find_key(t))?this.key(e):null},r.prototype.get_key_id=function(){return this.key(this.primary).get_key_id()},r.prototype.get_short_key_id=function(){return this.key(this.primary).get_short_key_id()},r.prototype.get_fingerprint=function(){return this.key(this.primary).get_fingerprint()},r.prototype.get_ekid=function(){return this.key(this.primary).ekid()},r.prototype.get_all_key_ids=function(){var t,e,r,n,i;for(i=[],e=0,r=(n=this._all_keys()).length;e<r;e++)t=n[e],i.push(this.key(t).get_key_id());return i},r.prototype.get_designated_revocations=function(){return this.key(this.primary).get_designated_revocations()},r.prototype.validity_check=function(t){var e,r,n,i,o;n=R.findDeferral(arguments),e=null,(o=this,function(t){var s,a,u,f;u=o._all_keys(),a=u.length,s=0,(f=function(t){var h,c;if(h=t,c=function(){return R.trampoline((function(){return++s,f(t)}))},!(s<a))return h();r=u[s],i=new R.Deferrals((function(){!function(t){if(null==e)return t();h()}(c)}),{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"PgpEngine.validity_check"}),o.key(r).validity_check(i.defer({assign_fn:function(){return e=arguments[0]},lineno:328})),i._fulfill()})(t)})((function(){return t(e)}))},r.prototype.find_best_key=function(t,e){var r,n,i,o,s,a,u;for(null==e&&(e=!1),r=null,u=this,n=function(r){var n,i,o,s;return i=(n=u.key(r)).fulfills_flags(t)||(r.flags&t)===t,o=!e||n.has_private(),s=!n.is_revoked(),i&&o&&s},o=0,s=(a=this.subkeys).length;o<s;o++)n(i=a[o])&&(null==r||this.key(i).is_preferable_to(this.key(r)))&&(r=i);return null==r&&n(this.primary)&&(r=this.primary),null!=r?this.key(r):null},r.prototype.fetch=function(t,e,r){var n,i,o,s,a,u,f,h,c,l;for(i=O(e),n=s=null,s=null,u=null,o=f=0,h=t.length;f<h;o=++f)a=t[o],null==s&&null!=(s=this.find_key(a))&&(u=o);return null==s?n=new Error("No keys match the given key IDs"):this.key(s).is_revoked()||this.is_revoked()?(n=new B.RevokedKeyError).km=this:this.key(s).fulfills_flags(i)?(null!=(c=this.key(s))&&null!=(l=c.key)?l.can_perform(e):void 0)?this.key(s):n=new Error("can't peform the operation -- maybe no secret key material (op_mask="+e+")"):n=new Error("We don't have a key for the requested PGP ops (flags = "+i+")"),r(n,this.key_manager,u)},r.prototype.is_revoked=function(){return this.key(this.primary).is_revoked()},r}(a),h=function(e){function r(t){var e;this.primary=t.primary,this.subkeys=t.subkeys,this.userids=t.userids,this.armored_pgp_public=t.armored_pgp_public,this.armored_pgp_private=t.armored_pgp_private,this.user_attributes=t.user_attributes,e=t.signed,this.pgp=new m({primary:this.primary,subkeys:this.subkeys,userids:this.userids,user_attributes:this.user_attributes,key_manager:this}),this.engines=[this.pgp],this._signed=null!=e&&e,this.p3skb=null}return V(r,e),r.generate=function(t,e){var s,a,f,h,c,p,d,m,g,b,w,M,x,S,E,A,B,D,P,I,T,O,C,L,z,q,K,H,Z,G;for(j,K=R.findDeferral(arguments),h=t.asp,z=t.userid,q=t.userids,B=t.primary,O=t.subkeys,d=t.ecc,I=t.sub_flags,A=t.nsubs,D=t.primary_flags,E=t.nbits,b=t.expire_in,x=t.generated,p=t.curve_name,h=n.make(h),s=i.key_flags,a=(f=s.sign_data|s.encrypt_comm|s.encrypt_storage|s.auth)|s.certify_keys,B||(B={}),B.flags||(B.flags=D||a),B.expire_in||(B.expire_in=(null!=b?b.primary:void 0)||u.key_defaults.primary.expire_in),B.algo||(B.algo=d?o:_),B.nbits||(B.nbits=E||u.key_defaults.primary.nbits[B.algo.klass_name]),p&&(B.curve_name=p),null!=A&&null==I&&(I=function(){var t,e;for(e=[],S=t=0;0<=A?t<A:t>A;S=0<=A?++t:--t)e.push(f);return e}()),O||(O=function(){var t,e,r;for(r=[],t=0,e=I.length;t<e;t++)w=I[t],r.push({flags:w});return r}()),Z=0,G=O.length;Z<G;Z++)(T=O[Z]).expire_in||(T.expire_in=(null!=b?b.subkey:void 0)||u.key_defaults.sub.expire_in),T.flags||(T.flags=f),T.algo||(T.algo=B.algo.subkey_algo(T.flags)),T.nbits||(T.nbits=E||u.key_defaults.sub.nbits[T.algo.klass_name]);x||(x=N()),g=U(e,"KeyManager::generate"),null!=z&&(q=[z]),function(t){if(null!=q&&Array.isArray(q))return t(q=function(){var t,e,r;for(r=[],t=0,e=q.length;t<e;t++)L=q[t],r.push(new F.UserID(L));return r}());m=new Error("Need either 'userid' or 'userids' specified as an array"),function(t){H=new R.Deferrals(t,{parent:K,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.generate"}),k(m,g(H.defer({lineno:474}))),H._fulfill()}(t)}((function(){M=function(t,e){var r,n,i,o,s,a,u,f,c,p,d;p=R.findDeferral(arguments),i=t.klass,f=t.section,a=t.params,u=t.primary,h.section(f),function(t){d=new R.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced"}),a.algo.generate({asp:h,nbits:a.nbits,curve_name:a.curve_name},d.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:478})),d._fulfill()}((function(){return null==r&&(s=a.generated||x,o=new l({generated:s,expire_in:a.expire_in}),c=new i({key:n,lifespan:o,flags:a.flags,primary:u})),e(r,c)}))},H=new R.Deferrals((function(){var t,n,i;C=[],t=(n=O).length,S=0,(i=function(e){var r;if(r=function(){return R.trampoline((function(){return++S,i(e)}))},!(S<t))return e();T=n[S],H=new R.Deferrals((function(){return r(C.push(P))}),{parent:K,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.generate"}),M({klass:v,section:"subkey "+(S+1),params:T,primary:B},g(H.defer({assign_fn:function(){return P=arguments[0]},lineno:488}))),H._fulfill()})((function(){return c=new r({primary:B,subkeys:C,userids:q}),e(null,c)}))}),{parent:K,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.generate"}),M({klass:y,section:"primary",params:B},g(H.defer({assign_fn:function(){return B=arguments[0]},lineno:485}))),H._fulfill()}))},r.generate_rsa=function(t,e){var n,o,s,a,u,f;return o=t.asp,u=t.userid,f=t.userids,s={flags:(n=i.key_flags).certify_keys,nbits:4096},a=[{flags:n.encrypt_storage|n.encrypt_comm,nbits:2048},{flags:n.sign_data|n.auth,nbits:2048}],r.generate({asp:o,userid:u,userids:f,primary:s,subkeys:a},e)},r.generate_ecc=function(t,e){var n,s,a,u,f,h,c;return s=t.asp,h=t.userid,c=t.userids,a=t.generated,u={flags:(n=i.key_flags).certify_keys,nbits:384,algo:o},f=[{flags:n.encrypt_storage|n.encrypt_comm,nbits:256},{flags:n.sign_data|n.auth,nbits:256}],r.generate({asp:s,userid:h,userids:c,primary:u,subkeys:f,generated:a},e)},r.prototype.set_enc=function(t){return this.tsenc=t},r.import_from_armored_pgp=function(t,e){var o,s,a,u,f,h,c,l,p,d,m,y,_,g;m=R.findDeferral(arguments),o=t.armored,l=t.raw,a=t.binary,s=t.asp,h=t.opts,u=null,null==(f=a)&&(l||(l=o),s=n.make(s),d=null,p=null,_=((null!=h?h.decode_strict:void 0)?E:S)(l),u=_[0],f=_[1],null==u&&(g=f.type)!==i.message_types.public_key&&g!==i.message_types.private_key&&(u=new Error("Wanted a public or private key; got: "+f.type))),function(t){if(null!=u)return t();!function(t){y=new R.Deferrals(t,{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.import_from_armored_pgp"}),r.import_from_pgp_message({msg:f,asp:s,opts:h},y.defer({assign_fn:function(){return u=arguments[0],p=arguments[1],d=arguments[2],c=arguments[3]},lineno:567})),y._fulfill()}(t)}((function(){!function(t){if(null!=u)return t();!function(t){y=new R.Deferrals(t,{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.import_from_armored_pgp"}),p.simple_unlock({},y.defer({assign_fn:function(){return u=arguments[0]},lineno:573})),y._fulfill()}(t)}((function(){return e(u,p,d,c)}))}))},r.prototype.simple_unlock=function(t,e){var r,n,i,o;n=R.findDeferral(arguments),r=null,(o=this,function(t){if(!o.has_pgp_private()||o.is_pgp_locked())return t();!function(t){i=new R.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.simple_unlock"}),o.unlock_pgp({},i.defer({assign_fn:function(){return r=arguments[0]},lineno:585})),i._fulfill()}(t)})((function(){return e(r)}))},r.import_from_p3skb=function(t,e){var o,s,a,u,f,h,c,l,m,y,_,g,b,v,w;b=R.findDeferral(arguments),y=t.raw,o=t.armored,s=t.asp,h=t.no_check_keys,_=t.time_travel,c=t.now,o||(o=y),s=n.make(s),u=null,g=null,w=P((function(){return d.alloc(z(L(o)))})),a=w[0],m=w[1],function(t){if(null!=a)return t();f=new p({body:m.pub,type:i.message_types.public_key}),l={no_check_keys:h,time_travel:_,now:c},function(t){v=new R.Deferrals(t,{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.import_from_p3skb"}),r.import_from_pgp_message({msg:f,asp:s,opts:l},v.defer({assign_fn:function(){return a=arguments[0],u=arguments[1],g=arguments[2]},lineno:601})),v._fulfill()}((function(){return t(null!=u?u.p3skb=m:void 0)}))}((function(){return e(a,u,g)}))},r.prototype.unlock_p3skb=function(e,o){var a,u,f,h,c,l,d,m,y,_,g,b,v,w;b=R.findDeferral(arguments),a=e.asp,g=e.tsenc,m=e.passphrase,y=e.passphrase_generation,c=e.no_check_keys,_=e.time_travel,l=e.now,a=n.make(a),null==g&&null!=m&&(g=new s({key:x(m)})),(w=this,function(t){v=new R.Deferrals(t,{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.unlock_p3skb"}),w.p3skb.unlock({tsenc:g,asp:a,passphrase_generation:y},v.defer({assign_fn:function(){return u=arguments[0]},lineno:611})),v._fulfill()})(function(e){return function(){!function(t){if(null!=u)return t();h=new p({body:e.p3skb.priv.data,type:i.message_types.private_key}),d={no_check_keys:c,time_travel:_,now:l},function(t){v=new R.Deferrals(t,{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.unlock_p3skb"}),r.import_from_pgp_message({msg:h,asp:a,opts:d},v.defer({assign_fn:function(){return u=arguments[0],f=arguments[1]},lineno:615})),v._fulfill()}(t)}((function(){null==u&&(u=e.pgp.merge_private(f.pgp)),function(r){if(null!=u)return r();m=t.from([]),function(t){v=new R.Deferrals(t,{parent:b,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.unlock_p3skb"}),e.unlock_pgp({passphrase:m},v.defer({assign_fn:function(){return u=arguments[0]},lineno:624})),v._fulfill()}(r)}((function(){return o(u)}))}))}}(this))},r.import_from_pgp_message=function(t,e){var i,o,s,a,u,h,c,l,p,d,m,_;d=R.findDeferral(arguments),h=t.msg,i=t.asp,c=t.opts,i=n.make(i),o=null,p=null,null==s&&(_=C(h.body),s=_[0],l=_[1]),function(t){if(null!=s)return t();u=new f(l,c),function(t){m=new R.Deferrals(t,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.import_from_pgp_message"}),u.process(m.defer({assign_fn:function(){return s=arguments[0]},lineno:639})),m._fulfill()}((function(){return t(p=u.warnings)}))}((function(){null==s&&((o=new r({primary:r._wrap_pgp(y,u.primary),subkeys:function(){var t,e,n,i;for(i=[],t=0,e=(n=u.subkeys).length;t<e;t++)a=n[t],i.push(r._wrap_pgp(v,a));return i}(),user_attributes:u.user_attributes,userids:u.userids,signed:!0})).has_pgp_private()?o.armored_pgp_private=h.raw():o.armored_pgp_public=h.raw()),function(t){if(null!=s)return t();!function(t){m=new R.Deferrals(t,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.import_from_pgp_message"}),o.check_pgp_validity(m.defer({assign_fn:function(){return s=arguments[0]},lineno:657})),m._fulfill()}(t)}((function(){return e(s,o,p,l)}))}))},r.prototype.merge_pgp_private=function(t,e){var i,o,s,a,u,f,h,c,l,p;c=R.findDeferral(arguments),i=t.armored,h=t.raw,o=t.asp,f=t.import_opts,o=n.make(o),u=U(e,"merge_pgp_private"),function(t){l=new R.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.merge_pgp_private"}),r.import_from_armored_pgp({armored:i,raw:h,asp:o,opts:f},u(l.defer({assign_fn:function(){return s=arguments[0]},lineno:668}))),l._fulfill()}((p=this,function(){a=p.pgp.merge_private(s.pgp),function(t){if(null!=a)return t();!function(t){if(!p.has_pgp_private())return t(a=new Error("no private key material found after merge"));!function(t){l=new R.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.merge_pgp_private"}),p.simple_unlock({},u(l.defer({lineno:675}))),l._fulfill()}(t)}(t)}((function(){return e(a)}))}))},r.prototype.check_pgp_public_eq=function(t){return this.pgp.check_eq(t.pgp)},r.prototype.unlock_pgp=function(t,e){var r,n,i,o,s;i=R.findDeferral(arguments),n=t.passphrase,(s=this,function(t){o=new R.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.unlock_pgp"}),s.pgp.unlock_keys({passphrase:n},o.defer({assign_fn:function(){return r=arguments[0]},lineno:688})),o._fulfill()})((function(){return e(r)}))},r.prototype.is_pgp_locked=function(){return this.pgp.is_locked()},r.prototype.is_keybase_locked=function(){return this.keybase.is_locked()},r.prototype.has_pgp_private=function(){return this.pgp.has_private()},r.prototype.has_p3skb_private=function(){var t;return null!=(t=this.p3skb)?t.has_private():void 0},r.prototype.has_keybase_private=function(){return this.keybase.has_private()},r.prototype.is_p3skb_locked=function(){var t;return null!=(t=this.p3skb)?t.is_locked():void 0},r.prototype.unlock_keybase=function(t,e){var r,i,o,s,a,u;s=R.findDeferral(arguments),o=t.tsenc,r=t.asp,r=n.make(r),(u=this,function(t){a=new R.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.unlock_keybase"}),u.keybase.unlock_keys({tsenc:o,asp:r},a.defer({assign_fn:function(){return i=arguments[0]},lineno:706})),a._fulfill()})((function(){return e(i)}))},r.prototype.export_private_to_server=function(t,e){var r,i,o,s,a,u,f,h,c;f=R.findDeferral(arguments),u=t.tsenc,r=t.asp,s=t.passphrase_generation,r=n.make(r),i=a=null,(c=this,function(t){if(null!=(i=c._assert_signed()))return t();o=c.pgp.export_to_p3skb(),function(t){h=new R.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.export_private_to_server"}),o.lock({tsenc:u,asp:r,passphrase_generation:s},h.defer({assign_fn:function(){return i=arguments[0]},lineno:719})),h._fulfill()}(t)})((function(){return null==i&&(a=o.frame_packet_armored({dohash:!0})),e(i,a)}))},r.prototype.export_pgp_private_to_client=function(t,e){var r,n,i,o;return i=t.passphrase,o=t.regen,r=null,null!=i&&(i=x(i)),(o||null==(n=this.armored_pgp_private))&&null==(r=this._assert_signed())&&(this.armored_pgp_private=n=this.pgp.export_keys({private:!0,passphrase:i})),e(r,n)},r.prototype.export_pgp_private=function(){var t;return t=1<=arguments.length?Y.call(arguments,0):[],this.export_pgp_private_to_client.apply(this,t)},r.prototype.export_pgp_public=function(t,e){var r,n;return r=null,(t.regen||null==(n=this.armored_pgp_public))&&null==(r=this._assert_signed())&&(this.armored_pgp_public=n=this.pgp.export_keys({private:!1})),e(r,n)},r.prototype.export_public=function(t,e){var r,n,i,o,s,a,u,f;s=R.findDeferral(arguments),r=(u=null!=t?t:{}).asp,o=u.regen,null==e&&(e=null),(f=this,function(t){a=new R.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.export_public"}),f.export_pgp_public({asp:r,regen:o},a.defer({assign_fn:function(){return n=arguments[0],i=arguments[1]},lineno:753})),a._fulfill()})((function(){return e(n,i)}))},r.prototype.export_private=function(t,e){var r,n,i,o,a,u,f,h,c,l,p;c=R.findDeferral(arguments),o=t.passphrase,i=t.p3skb,r=t.asp,u=t.regen,a=t.passphrase_generation,(p=this,function(t){i?(h=new s({key:x(o)}),function(t){l=new R.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.export_private"}),p.export_private_to_server({tsenc:h,asp:r,passphrase_generation:a},l.defer({assign_fn:function(){return n=arguments[0],f=arguments[1]},lineno:761})),l._fulfill()}(t)):function(t){l=new R.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.export_private"}),p.export_pgp_private_to_client({passphrase:o,asp:r,regen:u},l.defer({assign_fn:function(){return n=arguments[0],f=arguments[1]},lineno:763})),l._fulfill()}(t)})((function(){return e(n,f)}))},r.prototype.pgp_full_hash=function(e,r){var n,i,o,s,a;o=R.findDeferral(arguments),i=U(r,"get_pgp_full_hash"),(a=this,function(t){s=new R.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.pgp_full_hash"}),a.export_pgp_public(e,i(s.defer({assign_fn:function(){return n=arguments[0]},lineno:770}))),s._fulfill()})((function(){return r(null,new g(t.from(n.trim())).toString("hex"))}))},r.prototype.sign_pgp=function(t,e){var r,n;return r=t.asp,n=t.time,this.pgp.sign({asp:r,time:n},e)},r.prototype.sign=function(t,e){var r,i,o,s,a,u;s=R.findDeferral(arguments),r=t.asp,o=t.time,(r=n.make(r)).section("sign"),r.progress({what:"sign PGP",total:1,i:0}),(u=this,function(t){a=new R.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.sign"}),u.sign_pgp({asp:r,time:o},a.defer({assign_fn:function(){return i=arguments[0]},lineno:783})),a._fulfill()})(function(t){return function(){return r.progress({what:"sign PGP",total:1,i:1}),null==i&&(t._signed=!0),e(i)}}(this))},r.prototype.get_userids=function(){return this.userids},r.prototype.get_userids_mark_primary=function(){var t,e,r,n,i,o,s,a,u,f,h,c,l,p,d,m,y;for(n=null,i=null,l={},o=function(t,e){return null==t&&null==e?null:null==t?e:null==e||t>e?t:e},e=d=0,m=(y=this.userids).length;d<m;e=++d)null!=(p=y[e])&&(c=p.utf8(),a=p.time_primary_pair(),s={userid:p,pair:a,i:e},t=!1,null!=(u=l[c])?(f=o(u.pair[1],a[1]),(null==u.pair[0]||a[0]&&u.pair[0]<a[0])&&(t=!0)):(f=a[1],t=!0),t&&(l[c]=s),null!=f&&(null==n||n<f)&&(i=c,n=f));for(r in null!=i&&(l[i].userid.primary=!0),h=[],l)(s=l[r]).userid.most_recent_sig=s.pair[0],h.push(s.userid);return h},r.prototype.fetch=function(t,e,r){return this.pgp.fetch(t,e,r)},r.prototype.find_pgp_key=function(t){return this.pgp.find_key(t)},r.prototype.find_pgp_key_material=function(t){return this.pgp.find_key_material(t)},r.prototype.find_best_pgp_key=function(t,e){return this.pgp.find_best_key(t,e)},r.prototype.find_signing_pgp_key=function(){return this.find_best_pgp_key(i.key_flags.sign_data,!0)},r.prototype.find_verifying_pgp_key=function(){return this.find_best_pgp_key(i.key_flags.sign_data,!1)},r.prototype.find_crypt_pgp_key=function(t){return null==t&&(t=!1),this.find_best_pgp_key(i.key_flags.encrypt_comm,t)},r.prototype.can_verify=function(){return null!=this.find_verifying_pgp_key()},r.prototype.can_sign=function(){return null!=this.find_signing_pgp_key()},r.prototype.can_encrypt=function(){return null!=this.find_crypt_pgp_key(!1)},r.prototype.can_decrypt=function(){return null!=this.find_crypt_pgp_key(!0)},r.prototype.is_pgp_revoked=function(){return this.pgp.is_revoked()},r.prototype.get_pgp_designated_revocations=function(){return this.pgp.get_designated_revocations()},r.prototype.get_primary_keypair=function(){return this.primary.key},r.prototype.get_all_pgp_key_materials=function(){return this.pgp.get_all_key_materials()},r.prototype.export_pgp_keys_to_keyring=function(){return this.pgp.export_keys_to_keyring(this)},r.prototype.get_pgp_key_id=function(){return this.pgp.get_key_id()},r.prototype.get_pgp_short_key_id=function(){return this.pgp.get_short_key_id()},r.prototype.get_pgp_fingerprint=function(){return this.pgp.get_fingerprint()},r.prototype.get_pgp_fingerprint_str=function(){var t;return null!=(t=this.get_pgp_fingerprint())?t.toString("hex"):void 0},r.prototype.get_ekid=function(){return this.pgp.get_ekid()},r.prototype.clear_pgp_internal_sigs=function(){return this.pgp.clear_psc()},r.prototype.get_all_pgp_key_ids=function(){return this.pgp.get_all_key_ids()},r.prototype.get_ekid_b64_str=function(){var t;return null!=(t=this.get_ekid())?base64u.encode(t):null},r.prototype.get_fp2=function(){return this.get_pgp_fingerprint()},r.prototype.get_fp2_formatted=function(t){var e;return null!=(e=this.get_fp2())?D(e,t):null},r.prototype.get_type=function(){return"pgp"},r.prototype.check_pgp_validity=function(t){return this.pgp.validity_check(t)},r.prototype.make_sig_eng=function(){return new b({km:this})},r.prototype._apply_to_engines=function(t,e){var r,n,i,o,s,a,u;s=R.findDeferral(arguments),r=t.args,o=t.meth,i=null,(u=this,function(t){var e,f,h,c;h=u.engines,f=h.length,e=0,(c=function(t){var u,l,p;return u=t,p=l=function(){return R.trampoline((function(){return++e,c(t)}))},e<f?(n=h[e],i?l():void function(t){a=new R.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager._apply_to_engines"}),o.call(n,r,a.defer({assign_fn:function(){return i=arguments[0]},lineno:923})),a._fulfill()}(p)):u()})(t)})((function(){return e(i)}))},r.prototype._assert_signed=function(){return this._signed?null:new Error("need to sign before export")},r._wrap_pgp=function(t,e){var r;return new t({key:e.key,lifespan:new l({generated:e.timestamp,expire_in:null!=(r=e.get_expire_time())?r.expire_in:void 0}),_pgp:e})},r.prototype.merge_all_subkeys_omitting_revokes=function(t){if(null!=this.pgp&&null!=t.pgp)return this.pgp.merge_all_subkeys_omitting_revokes(t.pgp)},r.prototype.pgp_check_not_expired=function(t){var e,r;return r=t.subkey_material,e=t.now,this.pgp.check_not_expired({subkey_material:r,now:e})},r.prototype.merge_public_omitting_revokes=function(t){if(null!=this.pgp&&null!=t.pgp)return this.pgp.merge_public_omitting_revokes(t.pgp)},r.prototype.merge_userids=function(t){var e,r,n,i,o,s,a,u,f;if(null!=this.pgp&&null!=t.pgp){for(r={},n=0,o=(a=this.userids).length;n<o;n++)r[a[n].utf8()]=!0;for(f=[],i=0,s=(u=t.get_userids_mark_primary()).length;i<s;i++)(e=u[i]).utf8()in r?f.push(void 0):f.push(this.userids.push(e));return f}},r.prototype.merge_everything=function(t){return this.merge_public_omitting_revokes(t),this.merge_userids(t)},r.prototype.find_verified_designated_revoke=function(t,e){var r,n,i,o,s,a,u,f;return j,u=R.findDeferral(arguments),null==this.pgp||null==(a=this.get_pgp_designated_revocations())||0===a.length?e():void function(h){var c,l,p,d;l=(p=a).length,c=0,(d=function(a){var h,m;if(m=h=function(){return R.trampoline((function(){return++c,d(a)}))},!(c<l))return a();s=p[c],n=s.get_issuer_key_id(),f=new R.Deferrals((function(){!function(t){if(!r&&null!=o&&null!=o.pgp)return t();h()}((function(){i=o.find_pgp_key_material(n),function(t){if(null!=i)return t();h()}((function(){f=new R.Deferrals((function(){return r?m():e(s)}),{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.find_verified_designated_revoke"}),s._third_party_verify(i,f.defer({assign_fn:function(){return r=arguments[0]},lineno:1003})),f._fulfill()}))}))}),{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/keymanager.iced",funcname:"KeyManager.find_verified_designated_revoke"}),t.fetch([n],I.ops.verify,f.defer({assign_fn:function(){return r=arguments[0],o=arguments[1],arguments[2]},lineno:995})),f._fulfill()})(h)}((function(){return e()}))},r}(c),e.KeyManager=h,e.opkts=F}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p=[].slice;n=r(523),o=function(t,e,r,i,o){var s,a,u,h;for(s in u={},i)h=i[s],u[s]=h;return u[n.lineno]=null!=e?e[n.lineno]:void 0,(a=function(){var n,i,s;return n=1<=arguments.length?p.call(arguments,0):[],null!=e&&null!=(s=e.assign_fn)&&s.apply(null,n),t?(i=t,o||(t=null),i._fulfill(r,u)):f("overused deferral at "+l(u))})[n.trace]=u,a},c=0,a=function(t){return++c%t==0&&(c=0,!0)},h=null,l=function(t){return(t[n.funcname]||"<anonymous>")+" ("+t[n.filename]+":"+(t[n.lineno]+1)+")"},f=function(t){return"undefined"!=typeof console&&null!==console?console.error("ICED warning: "+t):void 0},e.trampoline=u=function(e){return a(500)?null!=(null!=t?t.nextTick:void 0)?t.nextTick(e):setTimeout(e):e()},e.Deferrals=function(){function t(t,e){this.trace=e,this.continuation=t,this.count=1,this.ret=null}return t.prototype._call=function(t){var e;return this.continuation?(h=t,e=this.continuation,this.continuation=null,e(this.ret)):f("Entered dead await at "+l(t))},t.prototype._fulfill=function(t,e){if(!(--this.count>0))return u((r=this,function(){return r._call(e)}));var r},t.prototype.defer=function(t){return this.count++,this,o(this,t,null,this.trace)},t}(),e.findDeferral=function(t){var e,r,i;for(r=0,i=t.length;r<i;r++)if(null!=(e=t[r])?e[n.trace]:void 0)return e;return null},e.Rendezvous=function(){var t;function e(){this.completed=[],this.waiters=[],this.defer_id=0}return t=function(){function t(t,e,r){this.rv=t,this.id=e,this.multi=r}return t.prototype.defer=function(t){return this.rv._defer_with_id(this.id,t,this.multi)},t}(),e.prototype.wait=function(t){return this.completed.length?t(this.completed.shift()):this.waiters.push(t)},e.prototype.defer=function(t){var e;return e=this.defer_id++,this._defer_with_id(e,t)},e.prototype.id=function(e,r){return new t(this,e,r=!!r)},e.prototype._fulfill=function(t,e){return this.waiters.length?this.waiters.shift()(t):this.completed.push(t)},e.prototype._defer_with_id=function(t,e,r){return this.count++,o(this,e,t,{},r)},e}(),e.stackWalk=s=function(t){var e,r,i,o;for(r=[],i=t?t[n.trace]:h;i;)e="   at "+l(i),r.push(e),i=null!=i&&null!=(o=i[n.parent])?o[n.trace]:void 0;return r},e.exceptionHandler=i=function(t,e){var r;if(e||(e=console.error),e(t.stack),(r=s()).length)return e("Iced 'stack' trace (w/ real line numbers):"),e(r.join("\n"))},e.catchExceptions=function(e){return null!=t?t.on("uncaughtException",(function(r){return i(r,e),t.exit(1)})):void 0}}).call(this)}).call(this,r(19))},function(t,e,r){var n=null,i=["bigint","bignum"];for(var o in i)try{n=r(1317)(i[o]);break}catch(t){}e.engine=n},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x={}.hasOwnProperty;g=r(36),d=r(91).WordArray,w=r(415),t=r(524).AES,l=r(525).TwoFish,y=r(446),m=(M=r(526)).XOR,i=M.Concat,h=r(367).SHA512,f=r(788).SHA3STD,a=r(416).KECCAK,u=r(528).PBKDF2,c=r(789).Scrypt,k=r(139),v=r(790),b=r(73).make_esc,s=r(366).HMAC_SHA256,p={1:{header:[479516638,1],salt_size:8,xsalsa20_rev:!0,kdf:{klass:u,opts:{c:1024,klass:m}},use_twofish:!0,hmac_hashes:[h,a],hmac_key_size:96,version:1},2:{header:[479516638,2],salt_size:16,xsalsa20_rev:!0,kdf:{klass:c,opts:{c:64,klass:m,N:12,r:8,p:1}},use_twofish:!0,hmac_hashes:[h,a],hmac_key_size:96,version:2},3:{header:[479516638,3],salt_size:16,xsalsa20_rev:!1,kdf:{klass:c,opts:{c:1,klass:s,N:15,r:8,p:1}},use_twofish:!0,hmac_hashes:[h,a],hmac_key_size:96,version:3},4:{header:[479516638,4],salt_size:16,xsalsa20_rev:!1,kdf:{klass:c,opts:{c:1,klass:s,N:15,r:8,p:1}},hmac_key_size:96,use_twofish:!1,hmac_hashes:[h,f],version:4}},e.CURRENT_VERSION=4,n=function(){function e(t){var e,r;if(e=t.key,r=t.version,this.version=p[null!=r?r:4],null==this.version)throw new Error("unknown version: "+r);this.set_key(e),this.derived_keys={}}return e.prototype.kdf=function(e,r){var n,i,o,s,a,u,f,h,c,p,m,y,_,b,v,k,M,x;k=g.findDeferral(arguments),_=e.salt,s=e.extra_keymaterial,m=e.progress_hook,(x=this,function(t){M=new g.Deferrals(t,{parent:k,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.kdf"}),x._check_scrubbed(x.key,"in KDF",r,M.defer({lineno:121})),M._fulfill()})(function(e){return function(){b=_.to_hex(),f=e.key.clone(),M=new g.Deferrals((function(){!function(r){if(null!=(h=e.derived_keys[b]))return r();for(u in e._kdf=new e.version.kdf.klass(e.version.kdf.opts),c={hmac:e.version.hmac_key_size,aes:t.keySize,salsa20:w.Salsa20.keySize},e.version.use_twofish&&(c.twofish=l.keySize),p=e.version.use_twofish?["hmac","aes","twofish","salsa20"]:["hmac","aes","salsa20"],i=s||0,c)v=c[u],i+=v;n={dkLen:i,key:f,progress_hook:m,salt:_},function(t){M=new g.Deferrals(t,{parent:k,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.kdf"}),e._kdf.run(n,M.defer({assign_fn:function(){return y=arguments[0]},lineno:152})),M._fulfill()}((function(){var t,n;for(h={},a=0,t=0,n=p.length;t<n;t++)u=p[t],v=c[u],o=a+v/4,h[u]=new d(y.words.slice(a,o)),a=o;return h.extra=new d(y.words.slice(o)).to_buffer(),r(e.derived_keys[b]=h)}))}((function(){return r(null,h)}))}),{parent:k,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.kdf"}),e._check_scrubbed(f,"KDF",r,M.defer({lineno:129})),M._fulfill()}}(this))},e.prototype.set_key=function(t){var e;return null==t?this.scrub():(e=d.from_buffer(t),this.key&&this.key.equal(e)?void 0:(this.scrub(),this.key=e))},e.prototype._check_scrubbed=function(t,e,r,n){return null==t||t.is_scrubbed()?r(new Error(e+": Failed due to scrubbed key!"),null):n()},e.prototype.sign=function(t,e){var r,n,o,s,a,u,f,h,c;f=g.findDeferral(arguments),n=t.input,o=t.key,u=t.salt,a=t.progress_hook,(c=this,function(t){h=new g.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.sign"}),c._check_scrubbed(o,"HMAC",e,h.defer({lineno:210})),h._fulfill()})(function(t){return function(){n=new d(t.version.header).concat(u).concat(n),r=t.version.hmac_hashes,h=new g.Deferrals((function(){return n.scrub(),e(null,s)}),{parent:f,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.sign"}),i.bulk_sign({key:o,input:n,progress_hook:a,combine_klasses:r},h.defer({assign_fn:function(){return s=arguments[0]},lineno:213})),h._fulfill()}}(this))},e.prototype.run_salsa20=function(t,e){var r,n,i,o,s,a,u,f,h,c;f=g.findDeferral(arguments),i=t.input,s=t.key,o=t.iv,a=t.output_iv,u=t.progress_hook,(c=this,function(t){h=new g.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_salsa20"}),c._check_scrubbed(s,"Salsa20",e,h.defer({lineno:229})),h._fulfill()})(function(t){return function(){r={input:i,progress_hook:u,key:s,iv:o},t.version.xsalsa20_rev&&(r.key=s.clone().endian_reverse(),r.iv=o.clone().endian_reverse()),h=new g.Deferrals((function(){return a&&(n=o.clone().concat(n)),t.version.xsalsa20_rev&&(r.key.scrub(),r.iv.scrub()),e(null,n)}),{parent:f,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_salsa20"}),w.bulk_encrypt(r,h.defer({assign_fn:function(){return n=arguments[0]},lineno:241})),h._fulfill()}}(this))},e.prototype.run_twofish=function(t,e){var r,n,i,o,s,a,u,f,h;u=g.findDeferral(arguments),i=t.input,s=t.key,o=t.iv,a=t.progress_hook,(h=this,function(t){f=new g.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_twofish"}),h._check_scrubbed(s,"TwoFish",e,f.defer({lineno:264})),f._fulfill()})((function(){r=new l(s),f=new g.Deferrals((function(){return r.scrub(),e(null,o.clone().concat(n))}),{parent:u,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_twofish"}),y.bulk_encrypt({block_cipher:r,iv:o,input:i,progress_hook:a,what:"twofish"},f.defer({assign_fn:function(){return n=arguments[0]},lineno:266})),f._fulfill()}))},e.prototype.run_aes=function(e,r){var n,i,o,s,a,u,f,h,c;f=g.findDeferral(arguments),o=e.input,a=e.key,s=e.iv,u=e.progress_hook,(c=this,function(t){h=new g.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_aes"}),c._check_scrubbed(a,"AES",r,h.defer({lineno:281})),h._fulfill()})((function(){n=new t(a),h=new g.Deferrals((function(){return n.scrub(),r(null,s.clone().concat(i))}),{parent:f,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_aes"}),y.bulk_encrypt({block_cipher:n,iv:s,input:o,progress_hook:u,what:"aes"},h.defer({assign_fn:function(){return i=arguments[0]},lineno:283})),h._fulfill()}))},e.prototype.scrub=function(){var t,e,r,n,i;if(null!=this.key&&this.key.scrub(),null!=this.derived_keys)for(n in i=this.derived_keys)for(t in r=i[n])e=r[t],"extra"!==t&&e.scrub();return this.derived_keys={},null!=this.salt&&this.salt.scrub(),this.salt=null,this.key=null},e.prototype.clone_derived_keys=function(){var t,e,r,n,i,o;if(n=null,null!=this.derived_keys)for(i in n={},o=this.derived_keys)for(t in r=o[i],n[i]={},r)e=r[t],n[i][t]="extra"===t?e:e.clone();return n},e}(),o=function(e){function r(t){var e,n,i;e=t.key,n=t.rng,i=t.version,r.__super__.constructor.call(this,{key:e,version:i}),this.rng=n||v.generate}return function(t,e){for(var r in e)x.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.pick_random_ivs=function(e,r){var n,i,o,s,a,u,f;a=g.findDeferral(arguments),e.progress_hook,(n=[]).push(["aes",t.ivSize]),this.version.use_twofish&&n.push(["twofish",l.ivSize]),n.push(["salsa20",w.Salsa20.ivSize]),i={},(f=this,function(t){var e,r,h,c;r=(h=n).length,e=0,(c=function(t){var n,l;if(n=function(){return g.trampoline((function(){return++e,c(t)}))},!(e<r))return t();l=h[e],o=l[0],s=l[1],function(t){var e,r;u=new g.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.pick_random_ivs"}),f.rng(s,u.defer({assign_fn:(e=i,r=o,function(){return e[r]=arguments[0]}),lineno:407})),u._fulfill()}(n)})(t)})((function(){return r(i)}))},r.prototype.resalt=function(t,e){var r,n,i,o,s,a,u;s=g.findDeferral(arguments),o=t.salt,n=t.extra_keymaterial,i=t.progress_hook,r=null,(u=this,function(t){if(null!=o)return t(o.length!==u.version.salt_size?r=new Error("Need a salt of exactly "+u.version.salt_size+" bytes (got "+o.length+")"):u.salt=d.alloc(o));!function(t){var e;a=new g.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.resalt"}),u.rng(u.version.salt_size,a.defer({assign_fn:(e=u,function(){return e.salt=arguments[0]}),lineno:423})),a._fulfill()}(t)})(function(t){return function(){!function(e){if(null!=r)return e();!function(e){var o;a=new g.Deferrals(e,{parent:s,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.resalt"}),t.kdf({extra_keymaterial:n,progress_hook:i,salt:t.salt},a.defer({assign_fn:(o=t,function(){return r=arguments[0],o.keys=arguments[1]}),lineno:429})),a._fulfill()}(e)}((function(){return e(r,t.keys)}))}}(this))},r.prototype.run=function(t,e){var r,n,i,o,s,a,u,f,h,c,l,p,m,y;p=g.findDeferral(arguments),n=t.data,c=t.salt,o=t.extra_keymaterial,u=t.progress_hook,i=b(e,"Encryptor::run"),(y=this,function(t){if(null==c&&null!=y.salt)return t();!function(t){m=new g.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),y.resalt({salt:c,extra_keymaterial:o,progress_hook:u},i(m.defer({lineno:460}))),m._fulfill()}(t)})(function(t){return function(){m=new g.Deferrals((function(){f=d.from_buffer(n),m=new g.Deferrals((function(){!function(e){if(!t.version.use_twofish)return e();!function(e){m=new g.Deferrals(e,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),t.run_twofish({input:a,key:t.keys.twofish,progress_hook:u,iv:s.twofish},i(m.defer({assign_fn:function(){return a=arguments[0]},lineno:465}))),m._fulfill()}(e)}((function(){m=new g.Deferrals((function(){m=new g.Deferrals((function(){return h=new d(t.version.header).concat(t.salt).concat(l).concat(r).to_buffer(),k.scrub_buffer(n),e(null,h)}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),t.sign({input:r,key:t.keys.hmac,progress_hook:u,salt:t.salt},i(m.defer({assign_fn:function(){return l=arguments[0]},lineno:467}))),m._fulfill()}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),t.run_aes({input:a,key:t.keys.aes,progress_hook:u,iv:s.aes},i(m.defer({assign_fn:function(){return r=arguments[0]},lineno:466}))),m._fulfill()}))}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),t.run_salsa20({input:f,key:t.keys.salsa20,progress_hook:u,iv:s.salsa20,output_iv:!0},i(m.defer({assign_fn:function(){return a=arguments[0]},lineno:463}))),m._fulfill()}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),t.pick_random_ivs({progress_hook:u},m.defer({assign_fn:function(){return s=arguments[0]},lineno:461})),m._fulfill()}}(this))},r.prototype.clone=function(){var t,e,n;return(t=new r({key:null!=(e=this.key)?e.to_buffer():void 0,rng:this.rng,version:null!=(n=this.version)?n.version:void 0})).derived_keys=this.clone_derived_keys(),t},r}(n),_=function(t,e){var r,n,i,s,a,u,f,h,c,l;c=g.findDeferral(arguments),s=t.key,r=t.data,f=t.rng,a=t.progress_hook,h=t.version,n=new o({key:s,rng:f,version:h}),function(t){l=new g.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/triplesec/src/enc.iced"}),n.run({data:r,progress_hook:a},l.defer({assign_fn:function(){return i=arguments[0],u=arguments[1]},lineno:506})),l._fulfill()}((function(){return n.scrub(),e(i,u)}))},e.V=p,e.encrypt=_,e.Base=n,e.Encryptor=o}).call(this)},function(t,e,r){(function(){var t,n,i,o={}.hasOwnProperty;r(91).WordArray,r(200).Hasher,t=r(416).KECCAK,n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.pad=6,e}(t),i=function(t){var e;return e=(new n).finalize(t),t.scrub(),e},e.SHA3STD=n,e.transform=i}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g;c=r(36),t=r(366).HMAC_SHA256,l=r(528).pbkdf2,y=r(415),f=y.endian_reverse,n=y.Salsa20InnerCore,(_=r(91)).ui8a_to_buffer,o=_.WordArray,g=r(139),h=g.fixup_uint32,u=g.default_delay,p=g.scrub_vec,new(function(){function t(){this.tot=0}return t.prototype.start=function(){return this._t=Date.now()},t.prototype.stop=function(){return this.tot+=Date.now()-this._t},t}()),s=function(t,e,r,n,i){var o,s,a;for(a=r<<4|0,o=(s=n<<4|0)+(i<<4)|0;s<o;)t[a]=e[s],t[a+1]=e[s+1],t[a+2]=e[s+2],t[a+3]=e[s+3],t[a+4]=e[s+4],t[a+5]=e[s+5],t[a+6]=e[s+6],t[a+7]=e[s+7],t[a+8]=e[s+8],t[a+9]=e[s+9],t[a+10]=e[s+10],t[a+11]=e[s+11],t[a+12]=e[s+12],t[a+13]=e[s+13],t[a+14]=e[s+14],t[a+15]=e[s+15],s+=16,a+=16;return!0},a=function(t,e,r,n){var i,o;for(n=n<<4|0,i=0,o=r<<4|0;i<n;)t[i]^=e[o],t[i+1]^=e[o+1],t[i+2]^=e[o+2],t[i+3]^=e[o+3],t[i+4]^=e[o+4],t[i+5]^=e[o+5],t[i+6]^=e[o+6],t[i+7]^=e[o+7],t[i+8]^=e[o+8],t[i+9]^=e[o+9],t[i+10]^=e[o+10],t[i+11]^=e[o+11],t[i+12]^=e[o+12],t[i+13]^=e[o+13],t[i+14]^=e[o+14],t[i+15]^=e[o+15],i+=16,o+=16;return!0},m=function(t){var e,r,n,i;for(r=n=0,i=t.length;n<i;r=++n)e=t[r],t[r]=f(e);return!0},i=function(){function e(e){var r,i,o,s;r=e.N,this.r=e.r,this.p=e.p,i=e.c,o=e.c0,s=e.c1,this.klass=e.klass,this.N||(this.N=1<<(r||15)),this.r||(this.r=8),this.p||(this.p=1),this.c0=o||i||1,this.c1=s||i||1,this.klass||(this.klass=t),this.X16_tmp=new Int32Array(16),this.s20ic=new n(8)}return e.prototype.salsa20_8=function(t){var e,r,n,i,o;for(r=i=0,o=(e=this.s20ic._core(t)).length;i<o;r=++i)n=e[r],t[r]+=n;return!0},e.prototype.pbkdf2=function(t,e){var r,n,i,o,s,a,u,f,h;u=c.findDeferral(arguments),i=t.key,s=t.salt,n=t.dkLen,o=t.progress_hook,r=t.c,(h=this,function(t){f=new c.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.pbkdf2"}),l({key:i,salt:s,c:r,dkLen:n,klass:h.klass,progress_hook:o},f.defer({assign_fn:function(){return a=arguments[0]},lineno:109})),f._fulfill()})((function(){return e(a)}))},e.prototype.blockmix_salsa8=function(t,e){var r,n,i,o;for(r=this.X16_tmp,s(r,t,0,2*this.r-1,1),n=i=0,o=2*this.r;0<=o?i<o:i>o;n=0<=o?++i:--i)a(r,t,n,1),this.salsa20_8(r),s(e,r,n,0,1);for(n=0;n<this.r;)s(t,e,n,2*n,1),n++;for(n=0;n<this.r;)s(t,e,n+this.r,2*n+1,1),n++;return!0},e.prototype.smix=function(t,e){var r,n,i,o,f,l,p,d,m,y,_,g,b;_=c.findDeferral(arguments),r=t.B,n=t.V,o=t.XY,m=t.progress_hook,i=o,d=2*this.r,f=o.subarray(16*d),s(i,r,0,0,d),l=0,(b=this,function(t){var e;(e=function(t){var r,o;if(r=t,o=function(){return c.trampoline((function(){return e(t)}))},!(l<b.N))return r();for(y=Math.min(b.N,l+2048);l<y;)s(n,i,d*l,0,d),b.blockmix_salsa8(i,f),l++;"function"==typeof m&&m(l),function(t){g=new c.Deferrals(t,{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.smix"}),u(0,0,g.defer({lineno:166})),g._fulfill()}(o)})(t)})(function(t){return function(){var o;l=0,(o=function(e){var r,s;if(r=e,s=function(){return c.trampoline((function(){return o(e)}))},!(l<t.N))return r();for(y=Math.min(t.N,l+256);l<y;)p=h(i[16*(d-1)])&t.N-1,a(i,n,p*d,d),t.blockmix_salsa8(i,f),l++;"function"==typeof m&&m(l+t.N),function(t){g=new c.Deferrals(t,{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.smix"}),u(0,0,g.defer({lineno:183})),g._fulfill()}(s)})((function(){return s(r,i,0,0,d),e()}))}}(this))},e.prototype.run=function(t,e){var r,n,i,s,a,u,f,h,l,d,y,_,g,b,v,w,k;_=c.findDeferral(arguments),f=t.key,y=t.salt,a=t.dkLen,d=t.progress_hook,a>(n=4294967295)?new Error("asked for too much data"):this.r*this.p>=1<<30?new Error("r & p are too big"):(this.r>n/128/this.p||this.r>n/256||this.N>n/128/this.r)&&new Error("N is too big"),s=new Int32Array(64*this.r),i=new Int32Array(32*this.r*this.N),h=function(t){return t.what+=" (pass 1)","function"==typeof d?d(t):void 0},(k=this,function(t){g=new c.Deferrals(t,{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),k.pbkdf2({key:f.clone(),salt:y,dkLen:128*k.r*k.p,c:k.c0,progress_hook:h},g.defer({assign_fn:function(){return r=arguments[0]},lineno:214})),g._fulfill()})(function(t){return function(){var n;r=new Int32Array(r.words),m(r),h=function(e){return function(r){return"function"==typeof d?d({i:r+e*t.N*2,what:"scrypt",total:t.p*t.N*2}):void 0}},u=0,b=0,v=t.p,w=v>b,(n=function(e){var o,a;if(o=e,a=function(){return c.trampoline((function(){return w?u+=1:u-=1,n(e)}))},!0===w&&u>=t.p||!1===w&&u<=t.p)return o();!function(e){g=new c.Deferrals(e,{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),t.smix({B:r.subarray(32*t.r*u),V:i,XY:s,progress_hook:h(u)},g.defer({lineno:221})),g._fulfill()}(a)})((function(){m(r),h=function(t){return t.what+=" (pass 2)","function"==typeof d?d(t):void 0},g=new c.Deferrals((function(){return p(s),p(i),p(r),f.scrub(),e(l)}),{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),t.pbkdf2({key:f,salt:o.from_i32a(r),dkLen:a,c:t.c1,progress_hook:h},g.defer({assign_fn:function(){return l=arguments[0]},lineno:229})),g._fulfill()}))}}(this))},e}(),d=function(t,e){var r,n,o,s,a,u,f,h,l,p,d,m,y,_,g;_=c.findDeferral(arguments),f=t.key,m=t.salt,d=t.r,r=t.N,l=t.p,o=t.c0,s=t.c1,n=t.c,h=t.klass,p=t.progress_hook,a=t.dkLen,u=new i({r:d,N:r,p:l,c:n,c0:o,c1:s,klass:h}),function(t){g=new c.Deferrals(t,{parent:_,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced"}),u.run({key:f,salt:m,progress_hook:p,dkLen:a},g.defer({assign_fn:function(){return y=arguments[0]},lineno:259})),g._fulfill()}((function(){return e(y)}))},e.Scrypt=i,e.scrypt=d,e.v_endian_reverse=m}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b;if(f=r(36),function(){},c=r(1320),n=r(1322).ADRBG,o=r(91).WordArray,s=r(526).XOR,d=r(139),m=null,a=function(e){var r;return r=new Uint8Array(e),m(r),t.from(r)},null!=(m=null!=(h="undefined"!=typeof window&&null!==window&&null!=(g=window.crypto)?g.getRandomValues:void 0)?h.bind(window.crypto):null!=(h="undefined"!=typeof window&&null!==window&&null!=(b=window.msCrypto)?b.getRandomValues:void 0)?h.bind(window.msCrypto):null))y=a;else try{null!=(p=r(74).rng)&&(y=p)}catch(t){t}l=function(t){if(null==y)throw new Error('No rng found; tried requiring "crypto" and window.crypto');return y(t)},i=function(){function e(){var t;this.meg=new c.Generator,this.adrbg=new n((t=this,function(e,r){return t.gen_seed(e,r)}),s.sign)}return e.prototype.now_to_buffer=function(){var e,r,n,i;return n=(r=Date.now())%1e3,i=Math.floor(r/1e3),(e=t.alloc(8)).writeUInt32BE(i,0),e.writeUInt32BE(n,4),e},e.prototype.gen_seed=function(e,r){var n,i,s,a,u,h,c,p,m;c=f.findDeferral(arguments),a=e/8,(i=[]).push(this.now_to_buffer()),(m=this,function(t){p=new f.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/triplesec/src/prng.iced",funcname:"PRNG.gen_seed"}),m.meg.generate(e,p.defer({assign_fn:function(){return h=arguments[0]},lineno:83})),p._fulfill()})(function(e){return function(){var f,c;for(i.push(e.now_to_buffer()),i.push(t.from(h)),i.push(l(a)),i.push(e.now_to_buffer()),s=t.concat(i),u=o.from_buffer(s),d.scrub_buffer(s),f=0,c=i.length;f<c;f++)n=i[f],d.scrub_buffer(n);return r(u)}}(this))},e.prototype.generate=function(t,e){return this.adrbg.generate(t,e)},e}(),_=null,u=function(t,e){return null==_&&(_=new i),_.generate(t,e)},e.PRNG=i,e.generate=u,e.native_rng=l}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s={}.hasOwnProperty;o=r(36),e.Lock=t=function(){function t(){this._open=!0,this._waiters=[]}return t.prototype.acquire=function(t){return this._open?(this._open=!1,t()):this._waiters.push(t)},t.prototype.release=function(){return this._waiters.length?this._waiters.shift()():this._open=!0},t.prototype.open=function(){return this._open},t}(),n=function(t){function e(t,r){this.tab=t,this.name=r,e.__super__.constructor.call(this),this.refs=0}return function(t,e){for(var r in e)s.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.incref=function(){return++this.refs},e.prototype.decref=function(){return--this.refs},e.prototype.release=function(){if(e.__super__.release.call(this),0===this.decref())return delete this.tab.locks[this.name]},e}(t),e.Table=function(){function t(){this.locks={}}return t.prototype.create=function(t){var e;return e=new n(this,t),this.locks[t]=e},t.prototype.acquire=function(t,e,r){var n,i,s,a;s=o.findDeferral(arguments),n=this.locks[t]||this.create(t),i=n._open,n.incref(),function(t){if(!r&&!n._open)return t(n=null);!function(t){a=new o.Deferrals(t,{parent:s,filename:"/Users/max/src/iced/iced-lock/index.iced",funcname:"Table.acquire"}),n.acquire(a.defer({lineno:69})),a._fulfill()}(t)}((function(){return e(n,i)}))},t.prototype.lookup=function(t){return this.locks[t]},t}(),i=function(){function t(t){this.table=t.table,this.key=t.key,this.seqid=null,this.waiter=null,this.open=!0,this.refs=0}return t.prototype._incref=function(){return++this.refs},t.prototype._decref=function(){if(0==--this.refs)return this.table._remove({key:this.key})},t.prototype._enter=function(t,e){var r,n;return r=t.seqid,this.open?(this.open=!1,this.seqid=r,e(null,this)):null!=this.waiter?(r>this.waiter.seqid?(n=this.waiter,this.waiter={cb:e,seqid:r},n.cb(new Error("our seqid="+n.seqid+" was preempted by "+r))):e(new Error("our seqid="+r+" is too stale (since "+this.waiter.seqid+" is ahead of us)")),this._decref()):r>this.seqid?this.waiter={seqid:r,cb:e}:(e(new Error("our seqid="+r+" is too stale (since "+this.seqid+" is already in flight)")),this._decref())},t.prototype.release=function(){var t,e;return null!=this.waiter?(e=this.waiter,this.seqid=e.seqid,t=e.cb,this.waiter=null,t(null,this)):(this.open=!0,this.seqid=null),this._decref()},t}(),e.SingleFlightTable=function(){function t(){this._jobs={}}return t.prototype._create=function(t){var e;return e=t.key,this._jobs[e]=new i({table:this,key:e})},t.prototype._remove=function(t){var e;return e=t.key,delete this._jobs[e]},t.prototype.enter=function(t,e){var r,n,i;return i=t.seqid,r=t.key,(n=this._jobs[r]||this._create({key:r}))._incref(),n._enter({seqid:i},e)},t}()}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l=[].slice;u=r(36),c=function(){},n=r(73).Canceler,i=r(138),e.uint_to_buffer=function(e,r){var n;switch(n=null,e){case 16:(n=t.alloc(2)).writeUInt16BE(r,0);break;case 32:(n=t.alloc(4)).writeUInt32BE(r,0);break;case 8:(n=t.alloc(1)).writeUInt8(r,0);break;default:throw new Error("Bit types not found: "+nbit)}return n},e.ASP=function(){function t(t){var e,r,i;i=t.progress_hook,r=t.delay,e=t.canceler,this._delay=null!=r?r:2,this._canceler=e||new n,this._progress_hook=i||function(t){},this._section=null}return t.prototype.section=function(t){return this._section=t,this},t.prototype.progress=function(t,e){var r,n,i,o,s;if(o=c,n=u.findDeferral(arguments),this._section&&(t.section=this._section),this._progress_hook(t),null==e)return o();(s=this,function(t){i=new u.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/pgp-utils/src/util.iced",funcname:"ASP.progress"}),s.delay(i.defer({assign_fn:function(){return r=arguments[0]},lineno:43})),i._fulfill()})((function(){return o(e(r))}))},t.prototype.delay=function(t){var e,r,n;e=u.findDeferral(arguments),(n=this,function(t){r=new u.Deferrals(t,{parent:e,filename:"/Users/max/src/keybase/pgp-utils/src/util.iced",funcname:"ASP.delay"}),setTimeout(r.defer({lineno:47}),n.delay),r._fulfill()})(function(e){return function(){return t(e._canceler.err())}}(this))},t.prototype.canceler=function(){return this._canceler},t.prototype.progress_hook=function(){return this._progress_hook},t.make=function(e){return e||new t({})},t}(),e.Warnings=function(){function t(){this._w=[]}return t.prototype.push=function(){var t,e;return t=1<=arguments.length?l.call(arguments,0):[],(e=this._w).push.apply(e,t)},t.prototype.warnings=function(){return this._w},t}(),e.bufeq_fast=function(t,e){var r,n,i;if(null==t&&null==e)return!0;if(null==t||null==e)return!1;if(t.length!==e.length)return!1;for(r=n=0,i=t.length;0<=i?n<i:n>i;r=0<=i?++n:--n)if(t.readUInt8(r)!==e.readUInt8(r))return!1;return!0},e.bufeq_secure=s=function(t,e){var r,n;return function(){var i,o;if(null==t&&null==e)return!0;if(null==t||null==e)return!1;if(t.length!==e.length)return!1;for(r=0,n=i=0,o=t.length;0<=o?i<o:i>o;n=0<=o?++i:--i)r|=t.readUInt8(n)^e.readUInt8(n);return 0===r}()},e.streq_secure=function(t,e){var r;return s((r=function(t){return null!=t?a(t):null})(t),r(e))},e.bufferify=a=function(e){if(t.isBuffer(e))return e;if("string"==typeof e)return t.from(e,"utf8");throw new Error("Cannot convert to buffer: "+e)},e.katch=f=function(t){var e,r;r=e=null;try{r=t()}catch(t){e=t}return[e,r]},e.akatch=function(t,e){return o(f(t),e)},e.buffer_to_ui8a=function(t){var e,r,n,i;for(r=t.length,n=new Uint8Array(r),e=i=0;0<=r?i<r:i>r;e=0<=r?++i:--i)n[e]=t.readUInt8(e);return n},e.ui32a_to_ui8a=function(t,e){var r,n,i,o;for(null==e&&(e=null),e||(e=new Uint8Array(4*t.length)),r=0,i=0,o=t.length;i<o;i++)n=t[i],e[r++]=n>>24&255,e[r++]=n>>16&255,e[r++]=n>>8&255,e[r++]=255&n;return e},e.ui8a_to_ui32a=function(t,e){var r,n,i,o,s;for(null==e&&(e=null),e||(e=new Uint32Array(t.length>>2)),n=0,r=o=0,s=t.length;o<s;r=o+=4)i=(t[r]<<24)+(t[r+1]<<16)+(t[r+2]<<8)+t[r+3],e[n++]=i;return e},e.unix_time=function(){return Math.floor(Date.now()/1e3)},e.json_stringify_sorted=function(t,e){var r,n,i,o,s,a;return i=(e=e||{}).sort_fn||null,s=e.spaces||null,null!=e.spaces?"\n":"","number"==typeof s&&(s=function(){var t,e;for(e=[],t=0;0<=s?t<s:t>s;0<=s?++t:--t)e.push(" ");return e}().join("")),o=function(t){return null==s?"":"\n"+function(){var e,r;for(r=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)r.push(s);return r}().join("")},r=function(t,e){var n,s,a,u,f,h;return Array.isArray(t)?a="["+function(){var n,i,o;for(o=[],n=0,i=t.length;n<i;n++)h=t[n],o.push(r(h,e+1));return o}().join(",")+"]":"object"==typeof t&&t?(u=o(e),f=o(e+1),s=function(){var e;for(n in e=[],t)e.push(n);return e}(),i?s.sort(i):s.sort(),a="{"+function(){var i,o,a;for(a=[],i=0,o=s.length;i<o;i++)n=s[i],a.push(f+JSON.stringify(n)+":"+r(t[n],e+1));return a}().join(",")+u+"}"):a=JSON.stringify(t),a},void 0===(a=JSON.stringify(t))?a:(n=JSON.parse(a),r(n,0))},e.obj_extract=function(t,e){var r,n,i,o;for(n={},i=0,o=e.length;i<o;i++)n[r=e[i]]=t[r];return n},e.base64u={encode:function(t){return t.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},decode:function(e){return e=(e+Array(5-e.length%4).join("=")).replace(/\-/g,"+").replace(/\_/g,"/"),t.from(e,"base64")},verify:function(t){return/^[A-Za-z0-9\-_]+$/.test(t)}},e.assert_no_nulls=function(t){var e,r,n;for(e=!0,r=0,n=t.length;r<n;r++)null==t[r]&&(e=!1);if(!e)return console.error("Found 1 or more nulls in vector: "),console.error(t),i(!1)},e.athrow=function(t,e){return e(t)},e.asyncify=o=function(t,e){return e.apply(null,t)},e.format_fingerprint=function(t){var e,r;return e=t.toString("hex").toUpperCase(),function(){var t,n,i;for(i=[],r=t=0,n=e.length;t<n;r=t+=4)i.push(e.slice(r,r+4));return i}().join(" ")},e.format_pgp_fingerprint_2=function(t,e){var r,n,i,o,s;return null==e&&(e={}),r=t.toString("hex"),i=(null!=e?e.length:void 0)||40,s=(null!=e?e.space:void 0)||" ",40===(r=r.toUpperCase().slice(-i)).length?(o=function(){var t,e,i;for(i=[],n=t=0,e=r.length;t<e;n=t+=4)i.push(r.slice(n,n+4));return i}(),(o=function(){var t,e,r;for(r=[],n=t=0,e=o.length;t<e;n=t+=5)r.push(o.slice(n,n+5).join(s));return r}()).join(s+s)):r.length>8?(o=function(){var t,e,i;for(i=[],n=t=0,e=r.length;t<e;n=t+=4)i.push(r.slice(n,n+4));return i}()).join(s):r},e.fingerprint_to_key_id_64=function(t){return t.slice(-16)},e.strip=h=function(t){return t.split(/\s+/).join("")},e.trim=function(t){var e;return(e=null!=t?t.match(/^\s+(.*?)$/):void 0)&&(t=e[1]),(e=null!=t?t.match(/^(.*?)\s+$/):void 0)&&(t=e[1]),t},e.fpeq=function(t,e){return h(t).toLowerCase()===h(e).toLowerCase()},e.xxd=function(t,e){var r,n,i,o,s,a,u;return null==e&&(e={}),a=e.q||8,o=e.p||7,t=t.toString("hex"),u=function(){var e,n,i;for(i=[],r=e=0,n=t.length;e<n;r=e+=4)i.push(t.slice(r,r+4));return i}(),i=function(){var t,e,n;for(n=[],r=t=0,e=u.length;a>0?t<e:t>e;r=t+=a)n.push(u.slice(r,r+a).join(" "));return n}(),s=function(t,e){return function(){var r,n,i;for(i=[],r=0,n=e-t.length;0<=n?r<n:r>n;0<=n?r++:r--)i.push("0");return i}().join("")+t},function(){var t,e,u;for(u=[],r=t=0,e=i.length;t<e;r=++t)n=i[r],u.push(s((2*r*a).toString(16),o)+": "+n);return u}().join("\n")}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u;a=r(36),n=r(235).SlicerBuffer,u=r(794),o=u.alloc_by_nbits,s=u.alloc_by_oid,i=u.alloc_by_name,e.BaseEccKey=function(){function e(t){this.curve=t.curve,this.R=t.R}return e.prototype.serialize=function(){var e;return e=this.curve.oid,t.concat([t.from([e.length]),e,this.curve.point_to_mpi_buffer(this.R)])},e._alloc=function(t,e){var r,i,o,a,u,f,h,c,l,p;if(f=(c=new n(e)).rem(),a=c.read_uint8(),u=c.read_buffer(a),o=(l=s(u))[0],i=l[1],null!=o)throw o;if(o=(p=i.mpi_point_from_slicer_buffer(c))[0],r=p[1],null!=o)throw o;return(h=new t({curve:i,R:r})).read_params(c),[h,f-c.rem()]},e.alloc=function(t,r){var n,i,o,s;o=i=n=null;try{o=(s=e._alloc(t,r))[0],i=s[1]}catch(t){n=t}return[n,o,i]},e.prototype.validity_check=function(t){return t(null)},e}(),e.generate=function(t,e){var r,n,s,u,f,h,c,l,p,d,m,y,_,g;m=a.findDeferral(arguments),h=t.nbits,t.asp,u=t.curve_name,r=t.Pair,p=null,u?(_=i(u),f=_[0],s=_[1]):(g=o(h),f=g[0],s=g[1]),function(t){if(null!=f)return t();!function(t){y=new a.Deferrals(t,{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/ecc/base.iced",funcname:"generate"}),s.generate(y.defer({assign_fn:function(){return d=arguments[0].x,n=arguments[0].R},lineno:58})),y._fulfill()}((function(){return l=new r.Pub({curve:s,R:n}),c=new r.Priv({pub:l,x:d}),t(p=new r({pub:l,priv:c}))}))}((function(){return e(f,p)}))}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E={}.hasOwnProperty,A=function(t,e){for(var r in e)E.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};for(b in g=r(36),function(){},n=r(140).BigInteger,l=r(1334),x=r(56).uint_to_buffer,c=r(235).SlicerBuffer,h=r(112).SRF,p=r(140),v=r(529),e.H=s=function(t){return n.fromHex(t.split(/\s+/).join(""))},e.Curve=i=function(e){function r(t){var e,i,o,s,a,u,f;f=t.p,o=t.a,s=t.b,e=t.Gx,i=t.Gy,u=t.n,a=t.h,this.oid=t.oid,a||(a=n.ONE),r.__super__.constructor.call(this,f,o,s,e,i,u,a)}return A(r,e),r.prototype.mkpoint=function(t){var e,r;return e=t.x,r=t.y,l.Point.fromAffine(this,e,r)},r.prototype.nbits=function(){return this.p.bitLength()},r.prototype.mpi_bit_size=function(){return 2*this.mpi_coord_bit_size()+3},r.prototype.mpi_byte_size=function(){return Math.ceil(this.mpi_bit_size()/8)},r.prototype.mpi_coord_byte_size=function(){return Math.ceil(this.nbits()/8)},r.prototype.mpi_coord_bit_size=function(){return 8*this.mpi_coord_byte_size()},r.prototype._mpi_point_from_slicer_buffer=function(t){var e,r,i,o,s,a,u,f,h;if(o=t.read_uint16(),(s=Math.ceil(o/8))!==(e=this.mpi_byte_size()))throw r=this.mpi_bit_size(),new Error("Need "+e+" bytes ("+r+" bits) for this curve; got "+s+" ("+o+" bits)");if(4!==t.read_uint8())throw new Error("Can only handle 0x4 prefix for MPI representations");if(i=this.mpi_coord_byte_size(),u=(h=[n.fromBuffer(t.read_buffer(i)),n.fromBuffer(t.read_buffer(i))])[0],f=h[1],a=this.mkpoint({x:u,y:f}),!this.isOnCurve(a))throw new Error("Given ECC point isn't on the given curve; data corruption detected.");return[null,a]},r.prototype.mpi_point_from_buffer=function(t){return this.mpi_point_from_slicer_buffer(new c(t))},r.prototype.mpi_point_from_slicer_buffer=function(t){var e,r,n;e=r=null;try{e=(n=this._mpi_point_from_slicer_buffer(t))[0],r=n[1]}catch(t){e=t}return[e,r]},r.prototype.point_to_mpi_buffer_compact=function(t){return t.affineX.toBuffer(this.mpi_coord_byte_size())},r.prototype.point_to_mpi_buffer=function(e){var r;return r=this.mpi_coord_byte_size(),t.concat([x(16,this.mpi_bit_size()),t.from([4]),e.affineX.toBuffer(r),e.affineY.toBuffer(r)])},r.prototype.random_scalar=function(t){var e,r,n,i;r=g.findDeferral(arguments),(i=this,function(t){n=new g.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/ecc/curves.iced",funcname:"Curve.random_scalar"}),h().random_zn(i.n.subtract(p.nbv(2)),n.defer({assign_fn:function(){return e=arguments[0]},lineno:103})),n._fulfill()})((function(){return e=e.add(p.BigInteger.ONE),t(e)}))},r.prototype.coord_to_mpi_buffer=function(e){var r;return r=this.mpi_coord_byte_size(),t.concat([x(16,8*r),e.toBuffer(r)])},r.prototype.mpi_from_buffer=function(t){return p.mpi_from_buffer(t)},r.prototype.encrypt=function(t,e){var r,n,i,o,s,a,u;s=g.findDeferral(arguments),this.n,r=this.G,(u=this,function(t){a=new g.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/ecc/curves.iced",funcname:"Curve.encrypt"}),u.random_scalar(a.defer({assign_fn:function(){return o=arguments[0]},lineno:134})),a._fulfill()})((function(){return i=r.multiply(o),n=t.multiply(o),e({V:i,S:n})}))},r.prototype.decrypt=function(t,e){return e.multiply(t)},r.prototype.generate=function(t){var e,r,n,i,o;n=g.findDeferral(arguments),(o=this,function(t){i=new g.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/ecc/curves.iced",funcname:"Curve.generate"}),o.random_scalar(i.defer({assign_fn:function(){return r=arguments[0]},lineno:157})),i._fulfill()})(function(n){return function(){return e=n.G.multiply(r),t({x:r,R:e})}}(this))},r}(l.Curve),e.Curve25519=o=function(e){function r(t){this.oid=t.oid}return A(r,e),r.prototype.nbits=function(){return 256},r.prototype.mpi_bit_size=function(){return 263},r.prototype._mpi_point_from_slicer_buffer=function(t){var e,r,n,i;if(n=t.read_uint16(),(i=Math.ceil(n/8))!==(e=this.mpi_byte_size()))throw r=this.mpi_bit_size(),new Error("Need "+e+" bytes ("+r+" bits) for this curve; got "+i+" ("+n+" bits)");if(64!==t.read_uint8())throw new Error("Can only handle 0x40 prefix for 25519 MPI representations");return i=this.mpi_coord_byte_size(),[null,t.read_buffer(i)]},r.prototype.point_to_mpi_buffer_compact=function(t){return t},r.prototype.point_to_mpi_buffer=function(e){return this.mpi_coord_byte_size(),t.concat([x(16,this.mpi_bit_size()),t.from([64]),e])},r.prototype.random_scalar=function(t){return h().random_bytes(this.mpi_coord_byte_size(),t)},r.prototype.coord_to_mpi_buffer=function(e){var r;return r=this.mpi_coord_byte_size(),t.concat([x(16,8*r),e])},r.prototype.mpi_from_buffer=function(e){var r,n,i,o,s;return r=i=null,e.length<2?r=new Error("need at least 2 bytes; got "+e.length):(n=t.from(e.slice(0,2)),e=e.slice(2),o=n.readUInt16BE(0),s=Math.ceil(o/8),e.length<s?r=new Error("MPI said "+s+" bytes but only got "+e.length):(i=e.slice(0,s),e=e.slice(s))),[r,i,e,s+2]},r.prototype.encrypt=function(t,e){var r,n,i,o,s,a,u;s=g.findDeferral(arguments),(u=this,function(t){a=new g.Deferrals(t,{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/ecc/curves.iced",funcname:"Curve25519.encrypt"}),u.random_scalar(a.defer({assign_fn:function(){return o=arguments[0]},lineno:257})),a._fulfill()})((function(){return i=v.alloc({}),n=i.scalarmult_base(o),r=i.scalarmult(o,t),e({V:n,S:r})}))},r.reverse_buf=function(e){var r,n,i,o;for(r=t.alloc(e.length),n=i=0,o=e.length;0<=o?i<o:i>o;n=0<=o?++i:--i)r[e.length-1-n]=e[n];return r},r.prototype.decrypt=function(t,e){return t=r.reverse_buf(t),v.alloc({}).scalarmult(t,e)},r.prototype.generate=function(t){var e,n,i,o,s;i=g.findDeferral(arguments),(s=this,function(t){o=new g.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/ecc/curves.iced",funcname:"Curve25519.generate"}),s.random_scalar(o.defer({assign_fn:function(){return n=arguments[0]},lineno:290})),o._fulfill()})((function(){return e=v.alloc({}).scalarmult_base(n),n=r.reverse_buf(n),t({x:n,R:e})}))},r}(i),e.nist_p256=w=function(){var t,e,r,n,o,u;return u=s("FFFFFFFF 00000001 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFF"),r=s("FFFFFFFF 00000001 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFC"),n=s("5AC635D8 AA3A93E7 B3EBBD55 769886BC 651D06B0 CC53B0F6 3BCE3C3E 27D2604B"),o=s("FFFFFFFF 00000000 FFFFFFFF FFFFFFFF BCE6FAAD A7179E84 F3B9CAC2 FC632551"),t=s("6B17D1F2 E12C4247 F8BCE6E5 63A440F2 77037D81 2DEB33A0 F4A13945 D898C296"),e=s("4FE342E2 FE1A7F9B 8EE7EB4A 7C0F9E16 2BCE3357 6B315ECE CBB64068 37BF51F5"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.nist_p256})},e.nist_p384=k=function(){var t,e,r,n,o,u;return u=s("ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff"),r=s("ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc"),n=s("b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef"),o=s("ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973"),t=s("aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7"),e=s("3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.nist_p384})},e.nist_p521=M=function(){var t,e,r,n,o,u;return u=s("000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff"),r=s("000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc"),n=s("00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00"),o=s("000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409"),t=s("000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66"),e=s("00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.nist_p521})},e.brainpool_p256=d=function(){var t,e,r,n,o,u;return u=s("a9fb57db a1eea9bc 3e660a90 9d838d72 6e3bf623 d5262028 2013481d 1f6e5377"),r=s("7d5a0975 fc2c3057 eef67530 417affe7 fb8055c1 26dc5c6c e94a4b44 f330b5d9"),n=s("26dc5c6c e94a4b44 f330b5d9 bbd77cbf 95841629 5cf7e1ce 6bccdc18 ff8c07b6"),o=s("a9fb57db a1eea9bc 3e660a90 9d838d71 8c397aa3 b561a6f7 901e0e82 974856a7"),t=s("8bd2aeb9 cb7e57cb 2c4b482f fc81b7af b9de27e1 e3bd23c2 3a4453bd 9ace3262"),e=s("547ef835 c3dac4fd 97f8461a 14611dc9 c2774513 2ded8e54 5c1d54c7 2f046997"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.brainpool_p256})},e.brainpool_p384=m=function(){var t,e,r,n,o,u;return u=s("8cb91e82 a3386d28 0f5d6f7e 50e641df 152f7109 ed5456b4 12b1da19 7fb71123 acd3a729 901d1a71 87470013 3107ec53"),r=s("7bc382c6 3d8c150c 3c72080a ce05afa0 c2bea28e 4fb22787 139165ef ba91f90f 8aa5814a 503ad4eb 04a8c7dd 22ce2826"),n=s("04a8c7dd 22ce2826 8b39b554 16f0447c 2fb77de1 07dcd2a6 2e880ea5 3eeb62d5 7cb43902 95dbc994 3ab78696 fa504c11"),o=s("8cb91e82 a3386d28 0f5d6f7e 50e641df 152f7109 ed5456b3 1f166e6c ac0425a7 cf3ab6af 6b7fc310 3b883202 e9046565"),t=s("1d1c64f0 68cf45ff a2a63a81 b7c13f6b 8847a3e7 7ef14fe3 db7fcafe 0cbd10e8 e826e034 36d646aa ef87b2e2 47d4af1e"),e=s("8abe1d75 20f9c2a4 5cb1eb8e 95cfd552 62b70b29 feec5864 e19c054f f9912928 0e464621 77918111 42820341 263c5315"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.brainpool_p384})},e.brainpool_p512=y=function(){var t,e,r,n,o,u;return u=s("aadd9db8 dbe9c48b 3fd4e6ae 33c9fc07 cb308db3 b3c9d20e d6639cca 70330871 7d4d9b00 9bc66842 aecda12a e6a380e6 2881ff2f 2d82c685 28aa6056 583a48f3"),r=s("7830a331 8b603b89 e2327145 ac234cc5 94cbdd8d 3df91610 a83441ca ea9863bc 2ded5d5a a8253aa1 0a2ef1c9 8b9ac8b5 7f1117a7 2bf2c7b9 e7c1ac4d 77fc94ca"),n=s("3df91610 a83441ca ea9863bc 2ded5d5a a8253aa1 0a2ef1c9 8b9ac8b5 7f1117a7 2bf2c7b9 e7c1ac4d 77fc94ca dc083e67 984050b7 5ebae5dd 2809bd63 8016f723"),o=s("aadd9db8 dbe9c48b 3fd4e6ae 33c9fc07 cb308db3 b3c9d20e d6639cca 70330870 553e5c41 4ca92619 41866119 7fac1047 1db1d381 085ddadd b5879682 9ca90069"),t=s("81aee4bd d82ed964 5a21322e 9c4c6a93 85ed9f70 b5d916c1 b43b62ee f4d0098e ff3b1f78 e2d0d48d 50d1687b 93b97d5f 7c6d5047 406a5e68 8b352209 bcb9f822"),e=s("7dde385d 566332ec c0eabfa9 cf7822fd f209f700 24a57b1a a000c55b 881f8111 b2dcde49 4a5f485e 5bca4bd8 8a2763ae d1ca2b2f a8f05406 78cd1e0f 3ad80892"),new i({p:u,a:r,b:n,Gx:t,Gy:e,n:o,oid:a.brainpool_p512})},e.cv25519=_=function(){return new o({oid:a.cv25519})},a={nist_p256:t.from([42,134,72,206,61,3,1,7]),nist_p384:t.from([43,129,4,0,34]),nist_p521:t.from([43,129,4,0,35]),brainpool_p256:t.from([43,36,3,3,2,8,1,1,7]),brainpool_p384:t.from([43,36,3,3,2,8,1,1,11]),brainpool_p512:t.from([43,36,3,3,2,8,1,1,13]),cv25519:t.from([43,6,1,4,1,151,85,1,5,1])},u={},a)S=a[b],u[S.toString("hex")]=e[b];for(b in f={Curve25519:_,"NIST P-256":w,"NIST P-384":k,brainpoolP256r1:d,brainpoolP384r1:m,brainpoolP512r1:y},a)f[b]=e[b];e.alloc_by_oid=function(e){var r,n,i;return t.isBuffer(e)&&(e=e.toString("hex")),n=r=null,null!=(i=u[e.toLowerCase()])?r=i():n=new Error("Unknown curve OID: "+e),[n,r]},e.alloc_by_nbits=function(t){var e,r,n;return n=e=null,t||(t=256),null!=(r=function(){switch(t){case 256:return w;case 384:return k;case 521:return M;default:return null}}())?n=r():e=new Error("No curve for "+t+" bits"),[e,n]},e.alloc_by_name=function(t){var e,r,n;return n=r=null,null!=(e=f[t])?r=e():n=new Error("Unknown curve name: "+t),[n,r]}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(e){var n=r(138),i=r(348).BigInteger,o=i.valueOf(3);function s(t,e,r,i){n.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(s.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(s.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(s.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),s.fromAffine=function(t,e,r){return new s(t,e,r,i.ONE)},s.prototype.equals=function(t){return t===this||(this.curve.isInfinity(this)?this.curve.isInfinity(t):this.curve.isInfinity(t)?this.curve.isInfinity(this):0===t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p).signum()&&0===t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p).signum())},s.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new s(this.curve,this.x,t,this.z)},s.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,n=t.x,i=t.y.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),a=n.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===a.signum())return 0===i.signum()?this.twice():this.curve.infinity;var u=a.square(),f=u.multiply(a),h=e.multiply(u),c=i.square().multiply(this.z),l=c.subtract(h.shiftLeft(1)).multiply(t.z).subtract(f).multiply(a).mod(this.curve.p),p=h.multiply(o).multiply(i).subtract(r.multiply(f)).subtract(c.multiply(i)).multiply(t.z).add(i.multiply(f)).mod(this.curve.p),d=f.multiply(this.z).multiply(t.z).mod(this.curve.p);return new s(this.curve,l,p,d)},s.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z),n=r.multiply(e).mod(this.curve.p),i=this.curve.a,a=t.square().multiply(o);0!==i.signum()&&(a=a.add(this.z.square().multiply(i)));var u=(a=a.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),f=a.multiply(o).multiply(t).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(a.pow(3)).mod(this.curve.p),h=r.pow(3).shiftLeft(3).mod(this.curve.p);return new s(this.curve,u,f,h)},s.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.signum())return this.curve.infinity;for(var e=t,r=e.multiply(o),n=this.negate(),i=this,s=r.bitLength()-2;s>0;--s){i=i.twice();var a=r.testBit(s);a!=e.testBit(s)&&(i=i.add(a?this:n))}return i},s.prototype.multiplyTwo=function(t,e,r){var n;n=t.bitLength()>r.bitLength()?t.bitLength()-1:r.bitLength()-1;for(var i=this.curve.infinity,o=this.add(e);n>=0;){i=i.twice();var s=t.testBit(n),a=r.testBit(n);s?i=a?i.add(o):i.add(this):a&&(i=i.add(e)),--n}return i},s.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return e.from("00","hex");var r,n=this.affineX,i=this.affineY,o=Math.floor((this.curve.p.bitLength()+7)/8);return t?(r=e.alloc(1+o)).writeUInt8(i.isEven()?2:3,0):((r=e.alloc(1+o+o)).writeUInt8(4,0),i.toBuffer(o).copy(r,1+o)),n.toBuffer(o).copy(r,1),r},s.decodeFrom=function(t,e){var r,o=e.readUInt8(0),a=4!==o,u=i.fromBuffer(e.slice(1,33)),f=Math.floor((t.p.bitLength()+7)/8);if(a){n.equal(e.length,f+1,"Invalid sequence length"),n(2===o||3===o,"Invalid sequence tag");var h=3===o;r=t.pointFromX(h,u)}else{n.equal(e.length,1+f+f,"Invalid sequence length");var c=i.fromBuffer(e.slice(1+f));r=s.fromAffine(t,u,c)}return r.compressed=a,r},s.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=s}).call(this,r(12).Buffer)},function(t,e,r){var n=r(138),i=r(348).BigInteger,o=r(795);function s(t,e,r,n,s,a,u){this.p=t,this.a=e,this.b=r,this.G=o.fromAffine(this,n,s),this.n=a,this.h=u,this.infinity=new o(this,null,null,i.ZERO),this.pOverFour=t.add(i.ONE).shiftRight(2)}s.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!t&&(n=this.p.subtract(n)),o.fromAffine(this,e,n)},s.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},s.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,r=t.affineY,n=this.a,i=this.b,o=this.p;if(e.signum()<0||e.compareTo(o)>=0)return!1;if(r.signum()<0||r.compareTo(o)>=0)return!1;var s=r.square().mod(o),a=e.pow(3).add(n.multiply(e)).add(i).mod(o);return s.equals(a)},s.prototype.validate=function(t){n(!this.isInfinity(t),"Point is at infinity"),n(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return n(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=s},function(t,e,r){(function(e){!function(t){"use strict";var n=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e<t.length;e++)r[e]=t[e];return r},i=function(){throw new Error("no PRNG")},o=new Uint8Array(16),s=new Uint8Array(32);s[0]=9;var a=n(),u=n([1]),f=n([56129,1]),h=n([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=n([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=n([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=n([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=n([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function m(t,e,r,n){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function y(t,e,r,n,i){var o,s=0;for(o=0;o<i;o++)s|=t[e+o]^r[n+o];return(1&s-1>>>8)-1}function _(t,e,r,n){return y(t,e,r,n,16)}function g(t,e,r,n){return y(t,e,r,n,32)}function b(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,f=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,_=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,k=s,M=a,x=u,S=f,E=h,A=c,B=l,D=p,R=d,P=m,I=y,T=_,U=g,F=b,O=v,C=0;C<20;C+=2)w^=(i=(T^=(i=(D^=(i=(S^=(i=w+T|0)<<7|i>>>25)+w|0)<<9|i>>>23)+S|0)<<13|i>>>19)+D|0)<<18|i>>>14,E^=(i=(k^=(i=(U^=(i=(R^=(i=E+k|0)<<7|i>>>25)+E|0)<<9|i>>>23)+R|0)<<13|i>>>19)+U|0)<<18|i>>>14,P^=(i=(A^=(i=(M^=(i=(F^=(i=P+A|0)<<7|i>>>25)+P|0)<<9|i>>>23)+F|0)<<13|i>>>19)+M|0)<<18|i>>>14,O^=(i=(I^=(i=(B^=(i=(x^=(i=O+I|0)<<7|i>>>25)+O|0)<<9|i>>>23)+x|0)<<13|i>>>19)+B|0)<<18|i>>>14,w^=(i=(x^=(i=(M^=(i=(k^=(i=w+x|0)<<7|i>>>25)+w|0)<<9|i>>>23)+k|0)<<13|i>>>19)+M|0)<<18|i>>>14,E^=(i=(S^=(i=(B^=(i=(A^=(i=E+S|0)<<7|i>>>25)+E|0)<<9|i>>>23)+A|0)<<13|i>>>19)+B|0)<<18|i>>>14,P^=(i=(R^=(i=(D^=(i=(I^=(i=P+R|0)<<7|i>>>25)+P|0)<<9|i>>>23)+I|0)<<13|i>>>19)+D|0)<<18|i>>>14,O^=(i=(F^=(i=(U^=(i=(T^=(i=O+F|0)<<7|i>>>25)+O|0)<<9|i>>>23)+T|0)<<13|i>>>19)+U|0)<<18|i>>>14;w=w+o|0,k=k+s|0,M=M+a|0,x=x+u|0,S=S+f|0,E=E+h|0,A=A+c|0,B=B+l|0,D=D+p|0,R=R+d|0,P=P+m|0,I=I+y|0,T=T+_|0,U=U+g|0,F=F+b|0,O=O+v|0,t[0]=w>>>0&255,t[1]=w>>>8&255,t[2]=w>>>16&255,t[3]=w>>>24&255,t[4]=k>>>0&255,t[5]=k>>>8&255,t[6]=k>>>16&255,t[7]=k>>>24&255,t[8]=M>>>0&255,t[9]=M>>>8&255,t[10]=M>>>16&255,t[11]=M>>>24&255,t[12]=x>>>0&255,t[13]=x>>>8&255,t[14]=x>>>16&255,t[15]=x>>>24&255,t[16]=S>>>0&255,t[17]=S>>>8&255,t[18]=S>>>16&255,t[19]=S>>>24&255,t[20]=E>>>0&255,t[21]=E>>>8&255,t[22]=E>>>16&255,t[23]=E>>>24&255,t[24]=A>>>0&255,t[25]=A>>>8&255,t[26]=A>>>16&255,t[27]=A>>>24&255,t[28]=B>>>0&255,t[29]=B>>>8&255,t[30]=B>>>16&255,t[31]=B>>>24&255,t[32]=D>>>0&255,t[33]=D>>>8&255,t[34]=D>>>16&255,t[35]=D>>>24&255,t[36]=R>>>0&255,t[37]=R>>>8&255,t[38]=R>>>16&255,t[39]=R>>>24&255,t[40]=P>>>0&255,t[41]=P>>>8&255,t[42]=P>>>16&255,t[43]=P>>>24&255,t[44]=I>>>0&255,t[45]=I>>>8&255,t[46]=I>>>16&255,t[47]=I>>>24&255,t[48]=T>>>0&255,t[49]=T>>>8&255,t[50]=T>>>16&255,t[51]=T>>>24&255,t[52]=U>>>0&255,t[53]=U>>>8&255,t[54]=U>>>16&255,t[55]=U>>>24&255,t[56]=F>>>0&255,t[57]=F>>>8&255,t[58]=F>>>16&255,t[59]=F>>>24&255,t[60]=O>>>0&255,t[61]=O>>>8&255,t[62]=O>>>16&255,t[63]=O>>>24&255}(t,e,r,n)}function v(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,f=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,_=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,v=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(_^=(i=(p^=(i=(f^=(i=o+_|0)<<7|i>>>25)+o|0)<<9|i>>>23)+f|0)<<13|i>>>19)+p|0)<<18|i>>>14,h^=(i=(s^=(i=(g^=(i=(d^=(i=h+s|0)<<7|i>>>25)+h|0)<<9|i>>>23)+d|0)<<13|i>>>19)+g|0)<<18|i>>>14,m^=(i=(c^=(i=(a^=(i=(b^=(i=m+c|0)<<7|i>>>25)+m|0)<<9|i>>>23)+b|0)<<13|i>>>19)+a|0)<<18|i>>>14,v^=(i=(y^=(i=(l^=(i=(u^=(i=v+y|0)<<7|i>>>25)+v|0)<<9|i>>>23)+u|0)<<13|i>>>19)+l|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,h^=(i=(f^=(i=(l^=(i=(c^=(i=h+f|0)<<7|i>>>25)+h|0)<<9|i>>>23)+c|0)<<13|i>>>19)+l|0)<<18|i>>>14,m^=(i=(d^=(i=(p^=(i=(y^=(i=m+d|0)<<7|i>>>25)+m|0)<<9|i>>>23)+y|0)<<13|i>>>19)+p|0)<<18|i>>>14,v^=(i=(b^=(i=(g^=(i=(_^=(i=v+b|0)<<7|i>>>25)+v|0)<<9|i>>>23)+_|0)<<13|i>>>19)+g|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=h>>>0&255,t[5]=h>>>8&255,t[6]=h>>>16&255,t[7]=h>>>24&255,t[8]=m>>>0&255,t[9]=m>>>8&255,t[10]=m>>>16&255,t[11]=m>>>24&255,t[12]=v>>>0&255,t[13]=v>>>8&255,t[14]=v>>>16&255,t[15]=v>>>24&255,t[16]=c>>>0&255,t[17]=c>>>8&255,t[18]=c>>>16&255,t[19]=c>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(t,e,r,n,i,o,s){var a,u,f=new Uint8Array(16),h=new Uint8Array(64);for(u=0;u<16;u++)f[u]=0;for(u=0;u<8;u++)f[u]=o[u];for(;i>=64;){for(b(h,f,s,w),u=0;u<64;u++)t[e+u]=r[n+u]^h[u];for(a=1,u=8;u<16;u++)a=a+(255&f[u])|0,f[u]=255&a,a>>>=8;i-=64,e+=64,n+=64}if(i>0)for(b(h,f,s,w),u=0;u<i;u++)t[e+u]=r[n+u]^h[u];return 0}function M(t,e,r,n,i){var o,s,a=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(b(u,a,i,w),s=0;s<64;s++)t[e+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(b(u,a,i,w),s=0;s<r;s++)t[e+s]=u[s];return 0}function x(t,e,r,n,i){var o=new Uint8Array(32);v(o,n,i,w);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return M(t,e,r,s,o)}function S(t,e,r,n,i,o,s){var a=new Uint8Array(32);v(a,o,s,w);for(var u=new Uint8Array(8),f=0;f<8;f++)u[f]=o[f+16];return k(t,e,r,n,i,u,a)}var E=function(t){var e,r,n,i,o,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,r=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(e>>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function A(t,e,r,n,i,o){var s=new E(o);return s.update(r,n,i),s.finish(t,e),0}function B(t,e,r,n,i,o){var s=new Uint8Array(16);return A(s,0,r,n,i,o),_(t,e,s,0)}function D(t,e,r,n,i){var o;if(r<32)return-1;for(S(t,0,e,0,r,n,i),A(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function R(t,e,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(x(s,0,32,n,i),0!==B(e,16,e,32,r-32,s))return-1;for(S(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function P(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function I(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function T(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function U(t,e){var r,i,o,s=n(),a=n();for(r=0;r<16;r++)a[r]=e[r];for(I(a),I(a),I(a),i=0;i<2;i++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,T(a,s,1-o)}for(r=0;r<16;r++)t[2*r]=255&a[r],t[2*r+1]=a[r]>>8}function F(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return U(r,t),U(n,e),g(r,0,n,0)}function O(t){var e=new Uint8Array(32);return U(e,t),1&e[0]}function C(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function L(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function N(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function z(t,e,r){var n,i,o=0,s=0,a=0,u=0,f=0,h=0,c=0,l=0,p=0,d=0,m=0,y=0,_=0,g=0,b=0,v=0,w=0,k=0,M=0,x=0,S=0,E=0,A=0,B=0,D=0,R=0,P=0,I=0,T=0,U=0,F=0,O=r[0],C=r[1],L=r[2],N=r[3],z=r[4],j=r[5],q=r[6],K=r[7],H=r[8],Z=r[9],G=r[10],W=r[11],V=r[12],Y=r[13],X=r[14],$=r[15];o+=(n=e[0])*O,s+=n*C,a+=n*L,u+=n*N,f+=n*z,h+=n*j,c+=n*q,l+=n*K,p+=n*H,d+=n*Z,m+=n*G,y+=n*W,_+=n*V,g+=n*Y,b+=n*X,v+=n*$,s+=(n=e[1])*O,a+=n*C,u+=n*L,f+=n*N,h+=n*z,c+=n*j,l+=n*q,p+=n*K,d+=n*H,m+=n*Z,y+=n*G,_+=n*W,g+=n*V,b+=n*Y,v+=n*X,w+=n*$,a+=(n=e[2])*O,u+=n*C,f+=n*L,h+=n*N,c+=n*z,l+=n*j,p+=n*q,d+=n*K,m+=n*H,y+=n*Z,_+=n*G,g+=n*W,b+=n*V,v+=n*Y,w+=n*X,k+=n*$,u+=(n=e[3])*O,f+=n*C,h+=n*L,c+=n*N,l+=n*z,p+=n*j,d+=n*q,m+=n*K,y+=n*H,_+=n*Z,g+=n*G,b+=n*W,v+=n*V,w+=n*Y,k+=n*X,M+=n*$,f+=(n=e[4])*O,h+=n*C,c+=n*L,l+=n*N,p+=n*z,d+=n*j,m+=n*q,y+=n*K,_+=n*H,g+=n*Z,b+=n*G,v+=n*W,w+=n*V,k+=n*Y,M+=n*X,x+=n*$,h+=(n=e[5])*O,c+=n*C,l+=n*L,p+=n*N,d+=n*z,m+=n*j,y+=n*q,_+=n*K,g+=n*H,b+=n*Z,v+=n*G,w+=n*W,k+=n*V,M+=n*Y,x+=n*X,S+=n*$,c+=(n=e[6])*O,l+=n*C,p+=n*L,d+=n*N,m+=n*z,y+=n*j,_+=n*q,g+=n*K,b+=n*H,v+=n*Z,w+=n*G,k+=n*W,M+=n*V,x+=n*Y,S+=n*X,E+=n*$,l+=(n=e[7])*O,p+=n*C,d+=n*L,m+=n*N,y+=n*z,_+=n*j,g+=n*q,b+=n*K,v+=n*H,w+=n*Z,k+=n*G,M+=n*W,x+=n*V,S+=n*Y,E+=n*X,A+=n*$,p+=(n=e[8])*O,d+=n*C,m+=n*L,y+=n*N,_+=n*z,g+=n*j,b+=n*q,v+=n*K,w+=n*H,k+=n*Z,M+=n*G,x+=n*W,S+=n*V,E+=n*Y,A+=n*X,B+=n*$,d+=(n=e[9])*O,m+=n*C,y+=n*L,_+=n*N,g+=n*z,b+=n*j,v+=n*q,w+=n*K,k+=n*H,M+=n*Z,x+=n*G,S+=n*W,E+=n*V,A+=n*Y,B+=n*X,D+=n*$,m+=(n=e[10])*O,y+=n*C,_+=n*L,g+=n*N,b+=n*z,v+=n*j,w+=n*q,k+=n*K,M+=n*H,x+=n*Z,S+=n*G,E+=n*W,A+=n*V,B+=n*Y,D+=n*X,R+=n*$,y+=(n=e[11])*O,_+=n*C,g+=n*L,b+=n*N,v+=n*z,w+=n*j,k+=n*q,M+=n*K,x+=n*H,S+=n*Z,E+=n*G,A+=n*W,B+=n*V,D+=n*Y,R+=n*X,P+=n*$,_+=(n=e[12])*O,g+=n*C,b+=n*L,v+=n*N,w+=n*z,k+=n*j,M+=n*q,x+=n*K,S+=n*H,E+=n*Z,A+=n*G,B+=n*W,D+=n*V,R+=n*Y,P+=n*X,I+=n*$,g+=(n=e[13])*O,b+=n*C,v+=n*L,w+=n*N,k+=n*z,M+=n*j,x+=n*q,S+=n*K,E+=n*H,A+=n*Z,B+=n*G,D+=n*W,R+=n*V,P+=n*Y,I+=n*X,T+=n*$,b+=(n=e[14])*O,v+=n*C,w+=n*L,k+=n*N,M+=n*z,x+=n*j,S+=n*q,E+=n*K,A+=n*H,B+=n*Z,D+=n*G,R+=n*W,P+=n*V,I+=n*Y,T+=n*X,U+=n*$,v+=(n=e[15])*O,s+=38*(k+=n*L),a+=38*(M+=n*N),u+=38*(x+=n*z),f+=38*(S+=n*j),h+=38*(E+=n*q),c+=38*(A+=n*K),l+=38*(B+=n*H),p+=38*(D+=n*Z),d+=38*(R+=n*G),m+=38*(P+=n*W),y+=38*(I+=n*V),_+=38*(T+=n*Y),g+=38*(U+=n*X),b+=38*(F+=n*$),o=(n=(o+=38*(w+=n*C))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=f,t[5]=h,t[6]=c,t[7]=l,t[8]=p,t[9]=d,t[10]=m,t[11]=y,t[12]=_,t[13]=g,t[14]=b,t[15]=v}function j(t,e){z(t,e,e)}function q(t,e){var r,i=n();for(r=0;r<16;r++)i[r]=e[r];for(r=253;r>=0;r--)j(i,i),2!==r&&4!==r&&z(i,i,e);for(r=0;r<16;r++)t[r]=i[r]}function K(t,e,r){var i,o,s=new Uint8Array(32),a=new Float64Array(80),u=n(),h=n(),c=n(),l=n(),p=n(),d=n();for(o=0;o<31;o++)s[o]=e[o];for(s[31]=127&e[31]|64,s[0]&=248,C(a,r),o=0;o<16;o++)h[o]=a[o],l[o]=u[o]=c[o]=0;for(u[0]=l[0]=1,o=254;o>=0;--o)T(u,h,i=s[o>>>3]>>>(7&o)&1),T(c,l,i),L(p,u,c),N(u,u,c),L(c,h,l),N(h,h,l),j(l,p),j(d,u),z(u,c,u),z(c,h,p),L(p,u,c),N(u,u,c),j(h,u),N(c,l,d),z(u,c,f),L(u,u,l),z(c,c,u),z(u,l,d),z(l,h,a),j(h,p),T(u,h,i),T(c,l,i);for(o=0;o<16;o++)a[o+16]=u[o],a[o+32]=c[o],a[o+48]=h[o],a[o+64]=l[o];var m=a.subarray(32),y=a.subarray(16);return q(m,m),z(y,y,m),U(t,y),0}function H(t,e){return K(t,e,s)}function Z(t,e){return i(e,32),H(t,e)}function G(t,e,r){var n=new Uint8Array(32);return K(n,r,e),v(t,o,n,w)}E.prototype.blocks=function(t,e,r){for(var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k=this.fin?0:2048,M=this.h[0],x=this.h[1],S=this.h[2],E=this.h[3],A=this.h[4],B=this.h[5],D=this.h[6],R=this.h[7],P=this.h[8],I=this.h[9],T=this.r[0],U=this.r[1],F=this.r[2],O=this.r[3],C=this.r[4],L=this.r[5],N=this.r[6],z=this.r[7],j=this.r[8],q=this.r[9];r>=16;)l=c=0,l+=(M+=8191&(n=255&t[e+0]|(255&t[e+1])<<8))*T,l+=(x+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*q),l+=(S+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*j),l+=(E+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*z),c=(l+=(A+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*N))>>>13,l&=8191,l+=(B+=a>>>1&8191)*(5*L),l+=(D+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*C),l+=(R+=8191&(u>>>11|(f=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*O),l+=(P+=8191&(f>>>8|(h=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*F),p=c+=(l+=(I+=h>>>5|k)*(5*U))>>>13,p+=M*U,p+=x*T,p+=S*(5*q),p+=E*(5*j),c=(p+=A*(5*z))>>>13,p&=8191,p+=B*(5*N),p+=D*(5*L),p+=R*(5*C),p+=P*(5*O),c+=(p+=I*(5*F))>>>13,p&=8191,d=c,d+=M*F,d+=x*U,d+=S*T,d+=E*(5*q),c=(d+=A*(5*j))>>>13,d&=8191,d+=B*(5*z),d+=D*(5*N),d+=R*(5*L),d+=P*(5*C),m=c+=(d+=I*(5*O))>>>13,m+=M*O,m+=x*F,m+=S*U,m+=E*T,c=(m+=A*(5*q))>>>13,m&=8191,m+=B*(5*j),m+=D*(5*z),m+=R*(5*N),m+=P*(5*L),y=c+=(m+=I*(5*C))>>>13,y+=M*C,y+=x*O,y+=S*F,y+=E*U,c=(y+=A*T)>>>13,y&=8191,y+=B*(5*q),y+=D*(5*j),y+=R*(5*z),y+=P*(5*N),_=c+=(y+=I*(5*L))>>>13,_+=M*L,_+=x*C,_+=S*O,_+=E*F,c=(_+=A*U)>>>13,_&=8191,_+=B*T,_+=D*(5*q),_+=R*(5*j),_+=P*(5*z),g=c+=(_+=I*(5*N))>>>13,g+=M*N,g+=x*L,g+=S*C,g+=E*O,c=(g+=A*F)>>>13,g&=8191,g+=B*U,g+=D*T,g+=R*(5*q),g+=P*(5*j),b=c+=(g+=I*(5*z))>>>13,b+=M*z,b+=x*N,b+=S*L,b+=E*C,c=(b+=A*O)>>>13,b&=8191,b+=B*F,b+=D*U,b+=R*T,b+=P*(5*q),v=c+=(b+=I*(5*j))>>>13,v+=M*j,v+=x*z,v+=S*N,v+=E*L,c=(v+=A*C)>>>13,v&=8191,v+=B*O,v+=D*F,v+=R*U,v+=P*T,w=c+=(v+=I*(5*q))>>>13,w+=M*q,w+=x*j,w+=S*z,w+=E*N,c=(w+=A*L)>>>13,w&=8191,w+=B*C,w+=D*O,w+=R*F,w+=P*U,M=l=8191&(c=(c=((c+=(w+=I*T)>>>13)<<2)+c|0)+(l&=8191)|0),x=p+=c>>>=13,S=d&=8191,E=m&=8191,A=y&=8191,B=_&=8191,D=g&=8191,R=b&=8191,P=v&=8191,I=w&=8191,e+=16,r-=16;this.h[0]=M,this.h[1]=x,this.h[2]=S,this.h[3]=E,this.h[4]=A,this.h[5]=B,this.h[6]=D,this.h[7]=R,this.h[8]=P,this.h[9]=I},E.prototype.finish=function(t,e){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=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,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(s[9]>>>15)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];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),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},E.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=t[e+n];if(r-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=t[e+n];this.leftover+=r}};var W=D,V=R;var Y=[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];function X(t,e,r,n){for(var i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R=new Int32Array(16),P=new Int32Array(16),I=t[0],T=t[1],U=t[2],F=t[3],O=t[4],C=t[5],L=t[6],N=t[7],z=e[0],j=e[1],q=e[2],K=e[3],H=e[4],Z=e[5],G=e[6],W=e[7],V=0;n>=128;){for(k=0;k<16;k++)M=8*k+V,R[k]=r[M+0]<<24|r[M+1]<<16|r[M+2]<<8|r[M+3],P[k]=r[M+4]<<24|r[M+5]<<16|r[M+6]<<8|r[M+7];for(k=0;k<80;k++)if(i=I,o=T,s=U,a=F,u=O,f=C,h=L,N,l=z,p=j,d=q,m=K,y=H,_=Z,g=G,W,E=65535&(S=W),A=S>>>16,B=65535&(x=N),D=x>>>16,E+=65535&(S=(H>>>14|O<<18)^(H>>>18|O<<14)^(O>>>9|H<<23)),A+=S>>>16,B+=65535&(x=(O>>>14|H<<18)^(O>>>18|H<<14)^(H>>>9|O<<23)),D+=x>>>16,E+=65535&(S=H&Z^~H&G),A+=S>>>16,B+=65535&(x=O&C^~O&L),D+=x>>>16,E+=65535&(S=Y[2*k+1]),A+=S>>>16,B+=65535&(x=Y[2*k]),D+=x>>>16,x=R[k%16],A+=(S=P[k%16])>>>16,B+=65535&x,D+=x>>>16,B+=(A+=(E+=65535&S)>>>16)>>>16,E=65535&(S=w=65535&E|A<<16),A=S>>>16,B=65535&(x=v=65535&B|(D+=B>>>16)<<16),D=x>>>16,E+=65535&(S=(z>>>28|I<<4)^(I>>>2|z<<30)^(I>>>7|z<<25)),A+=S>>>16,B+=65535&(x=(I>>>28|z<<4)^(z>>>2|I<<30)^(z>>>7|I<<25)),D+=x>>>16,A+=(S=z&j^z&q^j&q)>>>16,B+=65535&(x=I&T^I&U^T&U),D+=x>>>16,c=65535&(B+=(A+=(E+=65535&S)>>>16)>>>16)|(D+=B>>>16)<<16,b=65535&E|A<<16,E=65535&(S=m),A=S>>>16,B=65535&(x=a),D=x>>>16,A+=(S=w)>>>16,B+=65535&(x=v),D+=x>>>16,T=i,U=o,F=s,O=a=65535&(B+=(A+=(E+=65535&S)>>>16)>>>16)|(D+=B>>>16)<<16,C=u,L=f,N=h,I=c,j=l,q=p,K=d,H=m=65535&E|A<<16,Z=y,G=_,W=g,z=b,k%16==15)for(M=0;M<16;M++)x=R[M],E=65535&(S=P[M]),A=S>>>16,B=65535&x,D=x>>>16,x=R[(M+9)%16],E+=65535&(S=P[(M+9)%16]),A+=S>>>16,B+=65535&x,D+=x>>>16,v=R[(M+1)%16],E+=65535&(S=((w=P[(M+1)%16])>>>1|v<<31)^(w>>>8|v<<24)^(w>>>7|v<<25)),A+=S>>>16,B+=65535&(x=(v>>>1|w<<31)^(v>>>8|w<<24)^v>>>7),D+=x>>>16,v=R[(M+14)%16],A+=(S=((w=P[(M+14)%16])>>>19|v<<13)^(v>>>29|w<<3)^(w>>>6|v<<26))>>>16,B+=65535&(x=(v>>>19|w<<13)^(w>>>29|v<<3)^v>>>6),D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,R[M]=65535&B|D<<16,P[M]=65535&E|A<<16;E=65535&(S=z),A=S>>>16,B=65535&(x=I),D=x>>>16,x=t[0],A+=(S=e[0])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[0]=I=65535&B|D<<16,e[0]=z=65535&E|A<<16,E=65535&(S=j),A=S>>>16,B=65535&(x=T),D=x>>>16,x=t[1],A+=(S=e[1])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[1]=T=65535&B|D<<16,e[1]=j=65535&E|A<<16,E=65535&(S=q),A=S>>>16,B=65535&(x=U),D=x>>>16,x=t[2],A+=(S=e[2])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[2]=U=65535&B|D<<16,e[2]=q=65535&E|A<<16,E=65535&(S=K),A=S>>>16,B=65535&(x=F),D=x>>>16,x=t[3],A+=(S=e[3])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[3]=F=65535&B|D<<16,e[3]=K=65535&E|A<<16,E=65535&(S=H),A=S>>>16,B=65535&(x=O),D=x>>>16,x=t[4],A+=(S=e[4])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[4]=O=65535&B|D<<16,e[4]=H=65535&E|A<<16,E=65535&(S=Z),A=S>>>16,B=65535&(x=C),D=x>>>16,x=t[5],A+=(S=e[5])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[5]=C=65535&B|D<<16,e[5]=Z=65535&E|A<<16,E=65535&(S=G),A=S>>>16,B=65535&(x=L),D=x>>>16,x=t[6],A+=(S=e[6])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[6]=L=65535&B|D<<16,e[6]=G=65535&E|A<<16,E=65535&(S=W),A=S>>>16,B=65535&(x=N),D=x>>>16,x=t[7],A+=(S=e[7])>>>16,B+=65535&x,D+=x>>>16,D+=(B+=(A+=(E+=65535&S)>>>16)>>>16)>>>16,t[7]=N=65535&B|D<<16,e[7]=W=65535&E|A<<16,V+=128,n-=128}return n}function $(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,X(i,o,e,r),r%=128,n=0;n<r;n++)s[n]=e[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,m(s,r-8,a/536870912|0,a<<3),X(i,o,s,r),n=0;n<8;n++)m(t,8*n,i[n],o[n]);return 0}function J(t,e){var r=n(),i=n(),o=n(),s=n(),a=n(),u=n(),f=n(),h=n(),l=n();N(r,t[1],t[0]),N(l,e[1],e[0]),z(r,r,l),L(i,t[0],t[1]),L(l,e[0],e[1]),z(i,i,l),z(o,t[3],e[3]),z(o,o,c),z(s,t[2],e[2]),L(s,s,s),N(a,i,r),N(u,s,o),L(f,s,o),L(h,i,r),z(t[0],a,u),z(t[1],h,f),z(t[2],f,u),z(t[3],a,h)}function Q(t,e,r){var n;for(n=0;n<4;n++)T(t[n],e[n],r)}function tt(t,e){var r=n(),i=n(),o=n();q(o,e[2]),z(r,e[0],o),z(i,e[1],o),U(t,i),t[31]^=O(r)<<7}function et(t,e,r){var n,i;for(P(t[0],a),P(t[1],u),P(t[2],u),P(t[3],a),i=255;i>=0;--i)Q(t,e,n=r[i/8|0]>>(7&i)&1),J(e,t),J(t,t),Q(t,e,n)}function rt(t,e){var r=[n(),n(),n(),n()];P(r[0],l),P(r[1],p),P(r[2],u),z(r[3],l,p),et(t,r,e)}function nt(t,e,r){var o,s=new Uint8Array(64),a=[n(),n(),n(),n()];for(r||i(e,32),$(s,e,32),s[0]&=248,s[31]&=127,s[31]|=64,rt(a,s),tt(t,a),o=0;o<32;o++)e[o+32]=t[o];return 0}var it=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ot(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)e[i]+=r-16*e[n]*it[i-(n-32)],r=e[i]+128>>8,e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*it[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*it[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function st(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;ot(t,r)}function at(t,e,r,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),f=new Uint8Array(64),h=new Float64Array(64),c=[n(),n(),n(),n()];$(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var l=r+64;for(o=0;o<r;o++)t[64+o]=e[o];for(o=0;o<32;o++)t[32+o]=a[32+o];for($(f,t.subarray(32),r+32),st(f),rt(c,f),tt(t,c),o=32;o<64;o++)t[o]=i[o];for($(u,t,r+64),st(u),o=0;o<64;o++)h[o]=0;for(o=0;o<32;o++)h[o]=f[o];for(o=0;o<32;o++)for(s=0;s<32;s++)h[o+s]+=u[o]*a[s];return ot(t.subarray(32),h),l}function ut(t,e){var r=n(),i=n(),o=n(),s=n(),f=n(),c=n(),l=n();return P(t[2],u),C(t[1],e),j(o,t[1]),z(s,o,h),N(o,o,t[2]),L(s,t[2],s),j(f,s),j(c,f),z(l,c,f),z(r,l,o),z(r,r,s),function(t,e){var r,i=n();for(r=0;r<16;r++)i[r]=e[r];for(r=250;r>=0;r--)j(i,i),1!==r&&z(i,i,e);for(r=0;r<16;r++)t[r]=i[r]}(r,r),z(r,r,o),z(r,r,s),z(r,r,s),z(t[0],r,s),j(i,t[0]),z(i,i,s),F(i,o)&&z(t[0],t[0],d),j(i,t[0]),z(i,i,s),F(i,o)?-1:(O(t[0])===e[31]>>7&&N(t[0],a,t[0]),z(t[3],t[0],t[1]),0)}function ft(t,e,r,i){var o,s=new Uint8Array(32),a=new Uint8Array(64),u=[n(),n(),n(),n()],f=[n(),n(),n(),n()];if(-1,r<64)return-1;if(ut(f,i))return-1;for(o=0;o<r;o++)t[o]=e[o];for(o=0;o<32;o++)t[o+32]=i[o];if($(a,t,r),st(a),et(u,f,a),rt(f,e.subarray(32)),J(u,f),tt(s,u),r-=64,g(e,0,s,0)){for(o=0;o<r;o++)t[o]=0;return-1}for(o=0;o<r;o++)t[o]=e[o+64];return r}function ht(t,e){if(32!==t.length)throw new Error("bad key size");if(24!==e.length)throw new Error("bad nonce size")}function ct(){var t,e;for(e=0;e<arguments.length;e++)if("[object Uint8Array]"!==(t=Object.prototype.toString.call(arguments[e])))throw new TypeError("unexpected type "+t+", use Uint8Array")}function lt(t){for(var e=0;e<t.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:S,crypto_stream:x,crypto_stream_salsa20_xor:k,crypto_stream_salsa20:M,crypto_onetimeauth:A,crypto_onetimeauth_verify:B,crypto_verify_16:_,crypto_verify_32:g,crypto_secretbox:D,crypto_secretbox_open:R,crypto_scalarmult:K,crypto_scalarmult_base:H,crypto_box_beforenm:G,crypto_box_afternm:W,crypto_box:function(t,e,r,n,i,o){var s=new Uint8Array(32);return G(s,i,o),W(t,e,r,n,s)},crypto_box_open:function(t,e,r,n,i,o){var s=new Uint8Array(32);return G(s,i,o),V(t,e,r,n,s)},crypto_box_keypair:Z,crypto_hash:$,crypto_sign:at,crypto_sign_keypair:nt,crypto_sign_open:ft,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},t.util={},t.util.decodeUTF8=function(t){var e,r=unescape(encodeURIComponent(t)),n=new Uint8Array(r.length);for(e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n},t.util.encodeUTF8=function(t){var e,r=[];for(e=0;e<t.length;e++)r.push(String.fromCharCode(t[e]));return decodeURIComponent(escape(r.join("")))},t.util.encodeBase64=function(t){if("undefined"==typeof btoa)return new e(t).toString("base64");var r,n=[],i=t.length;for(r=0;r<i;r++)n.push(String.fromCharCode(t[r]));return btoa(n.join(""))},t.util.decodeBase64=function(t){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new e(t,"base64"),0));var r,n=atob(t),i=new Uint8Array(n.length);for(r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i},t.randomBytes=function(t){var e=new Uint8Array(t);return i(e,t),e},t.secretbox=function(t,e,r){ct(t,e,r),ht(r,e);for(var n=new Uint8Array(32+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+32]=t[o];return D(i,n,n.length,e,r),i.subarray(16)},t.secretbox.open=function(t,e,r){ct(t,e,r),ht(r,e);for(var n=new Uint8Array(16+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+16]=t[o];return!(n.length<32)&&(0===R(i,n,n.length,e,r)&&i.subarray(32))},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=16,t.scalarMult=function(t,e){if(ct(t,e),32!==t.length)throw new Error("bad n size");if(32!==e.length)throw new Error("bad p size");var r=new Uint8Array(32);return K(r,t,e),r},t.scalarMult.base=function(t){if(ct(t),32!==t.length)throw new Error("bad n size");var e=new Uint8Array(32);return H(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox(e,r,o)},t.box.before=function(t,e){ct(t,e),function(t,e){if(32!==t.length)throw new Error("bad public key size");if(32!==e.length)throw new Error("bad secret key size")}(t,e);var r=new Uint8Array(32);return G(r,t,e),r},t.box.after=t.secretbox,t.box.open=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox.open(e,r,o)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(32);return Z(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(ct(t),32!==t.length)throw new Error("bad secret key size");var e=new Uint8Array(32);return H(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(ct(t,e),64!==e.length)throw new Error("bad secret key size");var r=new Uint8Array(64+t.length);return at(r,t,t.length,e),r},t.sign.open=function(t,e){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(ct(t,e),32!==e.length)throw new Error("bad public key size");var r=new Uint8Array(t.length),n=ft(r,t,t.length,e);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},t.sign.detached=function(e,r){for(var n=t.sign(e,r),i=new Uint8Array(64),o=0;o<i.length;o++)i[o]=n[o];return i},t.sign.detached.verify=function(t,e,r){if(ct(t,e,r),64!==e.length)throw new Error("bad signature size");if(32!==r.length)throw new Error("bad public key size");var n,i=new Uint8Array(64+t.length),o=new Uint8Array(64+t.length);for(n=0;n<64;n++)i[n]=e[n];for(n=0;n<t.length;n++)i[n+64]=t[n];return ft(o,i,i.length,r)>=0},t.sign.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(64);return nt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(ct(t),64!==t.length)throw new Error("bad secret key size");for(var e=new Uint8Array(32),r=0;r<e.length;r++)e[r]=t[32+r];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(ct(t),32!==t.length)throw new Error("bad seed size");for(var e=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=t[n];return nt(e,r,!0),{publicKey:e,secretKey:r}},t.sign.publicKeyLength=32,t.sign.secretKeyLength=64,t.sign.seedLength=32,t.sign.signatureLength=64,t.hash=function(t){ct(t);var e=new Uint8Array(64);return $(e,t,t.length),e},t.hash.hashLength=64,t.verify=function(t,e){return ct(t,e),0!==t.length&&0!==e.length&&(t.length===e.length&&0===y(t,0,e,0,t.length))},t.setPRNG=function(t){i=t},function(){var e;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?e=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(e=window.msCrypto),e&&t.setPRNG((function(t,r){var n,i=new Uint8Array(r);for(e.getRandomValues(i),n=0;n<r;n++)t[n]=i[n];lt(i)}))):(e=r(1337))&&t.setPRNG((function(t,r){var n,i=e.randomBytes(r);for(n=0;n<r;n++)t[n]=i[n];lt(i)}))}()}(t.exports?t.exports:window.nacl=window.nacl||{})}).call(this,r(12).Buffer)},function(t,e){(function(){e.bufeq_secure=function(t,e){var r,n;return function(){var i,o;if(null==t&&null==e)return!0;if(null==t||null==e)return!1;if(t.length!==e.length)return!1;for(r=0,n=i=0,o=t.length;0<=o?i<o:i>o;n=0<=o?++i:--i)r|=t.readUInt8(n)^e.readUInt8(n);return 0===r}()}}).call(this)},function(t,e,r){(function(t){(function(){var r,n;e.b2u=r=function(t){return new Uint8Array(t)},e.u2b=n=function(e){return t.from(e)},e.Base=function(){function t(t){this.publicKey=t.publicKey,this.secretKey=t.secretKey,this.lib=t.lib}return t.prototype.genFromSeed=function(t){var e,i;return e=t.seed,i=this.lib.js.sign.keyPair.fromSeed(r(e)),this.secretKey=n(i.secretKey),this.publicKey=n(i.publicKey),{secretKey:this.secretKey,publicKey:this.publicKey}},t.prototype.genBoxPair=function(){var t;return t=this.lib.js.box.keyPair(),this.secretKey=n(t.secretKey),this.publicKey=n(t.publicKey),{secretKey:this.secretKey,publicKey:this.publicKey}},t.prototype.get_secret_key=function(){return this.secretKey},t.prototype.get_public_key=function(){return this.publicKey},t}()}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P,I,T,U,F={}.hasOwnProperty;S=r(36),i=r(41).openpgp,P=(D=r(101)).hash,_=P.SHA1,P.SHA256,d=r(445).Pair,o=r(801).Pair,f=r(802).Pair,h=r(1344).Pair,a=r(447).Pair,s=r(448).Pair,u=r(532).Pair,n=D.ciphers.AES,E=D.prng.native_rng,k=r(417).calc_checksum,I=r(56),w=I.bufferify,I.unix_time,v=I.bufeq_secure,I.katch,I.make_time_packet,R=I.uint_to_buffer,T=r(533),M=T.decrypt,x=T.encrypt,l=r(218).Packet,m=r(368),b=m.Signature,r(236).encode,U=r(1345),y=U.S2K,g=U.SecretKeyMaterial,B=r(419),r(76),A=r(450),c=function(e){function r(t){this.key=t.key,this.timestamp=t.timestamp,this.passphrase=t.passphrase,this.skm=t.skm,this.opts=t.opts,this.flags=t.flags,this.opts||(this.opts={}),this.flags||(this.flags=0),this._is_duplicate_primary=!1,this.hasher=null,r.__super__.constructor.call(this)}return function(t,e){for(var r in e)F.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype._write_private_enc=function(e,r,o){var s,a,u,f,h,c,l,p;return e.push(t.from([i.s2k_convention.sha1,i.symmetric_key_algorithms.AES256,i.s2k.salt_iter,i.hash_algorithms.SHA256])),p=(new _).bufhash(r),l=E(8),e.push(l),96,e.push(t.from([96])),h=n.keySize,f=(new y).write(o,l,96,h),u=n.blockSize,a=E(u),e.push(a),c=t.concat([r,p]),s=x({block_cipher_class:n,key:f,plaintext:c,iv:a}),e.push(s)},r.prototype._write_private_clear=function(e,r){return e.push(t.from([i.s2k_convention.none]),r,R(16,k(r)))},r.prototype._write_public=function(e){var r;return r=this.key.serialize(),e.push(t.from([i.versions.keymaterial.V4]),R(32,this.timestamp),t.from([this.key.type]),r)},r.prototype._write_dummy=function(e){return e.push(t.from([i.s2k_convention.sha1,i.symmetric_key_algorithms.AES256,i.s2k.gnu,2]),t.from("GNU","utf8"),t.from([1]))},r.prototype.add_flags=function(t){return this.flags|=t},r.prototype.private_body=function(e){var r,n,i,o;return r=[],this._write_public(r),o=null!=(n=this.key.priv)?n.serialize():null,i=e.passphrase||this.passphrase,null==o?this._write_dummy(r):null!=i?this._write_private_enc(r,o,i):this._write_private_clear(r,o),t.concat(r)},r.prototype.private_framed=function(t){var e,r,n;return r=this.private_body(t),e=i.packet_tags,n=t.subkey?e.secret_subkey:e.secret_key,this.frame_packet(n,r)},r.prototype.public_body=function(){var e;return e=[],this._write_public(e),t.concat(e)},r.prototype.get_fingerprint=function(){var e;return e=this.public_body(),(new _).bufhash(t.concat([t.from([i.signatures.key]),R(16,e.length),e]))},r.prototype.get_key_id=function(){return this.get_fingerprint().slice(12,20)},r.prototype.get_short_key_id=function(){return this.get_key_id().slice(-4).toString("hex").toUpperCase()},r.prototype.get_klass=function(){return this.key.constructor},r.prototype.export_framed=function(t){return null==t&&(t={}),t.private?this.private_framed(t):this.public_framed(t)},r.prototype.public_framed=function(t){var e,r,n;return null==t&&(t={}),r=this.public_body(),e=i.packet_tags,n=t.subkey?e.public_subkey:e.public_key,this.frame_packet(n,r)},r.prototype.to_signature_payload=function(){var e;return e=this.public_body(),t.concat([t.from([i.signatures.key]),R(16,e.length),e])},r.prototype.self_sign_key=function(t,e){var r,n,i,o,s,a,u,f,h,c,l;h=S.findDeferral(arguments),f=t.userids,n=t.lifespan,o=t.raw_payload,r=null,a=[],i=!0,(l=this,function(t){var e,p,d,m;p=(d=f).length,e=0,(m=function(t){var f,y,_;return f=t,_=y=function(){return S.trampoline((function(){return++e,m(t)}))},e<p?(u=d[e],null!=r?y():(s=null,void function(t){if(!l.key.can_sign()&&!o)return t(null==(s=u.get_framed_signature_output())&&(r=new Error("Cannot sign key --- don't have a private key, and can't replay")));!function(t){c=new S.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/keymaterial.iced",funcname:"KeyMaterial.self_sign_key"}),l._self_sign_key({userid:u,lifespan:n,raw_payload:o,primary:i},c.defer({assign_fn:function(){return r=arguments[0],s=arguments[1]},lineno:197})),c._fulfill()}(t)}((function(){return i=!1,_(a.push(s))})))):f()})(t)})((function(){return e(r,s)}))},r.prototype._self_sign_key=function(e,r){var n,o,s,a,u,f,h,c,l,p,d,y,_;d=S.findDeferral(arguments),p=e.userid,s=e.lifespan,h=e.raw_payload,u=e.primary,a=t.concat([this.to_signature_payload(),p.to_signature_payload()]),l=i.sig_types.positive,o=[new m.CreationTime(s.generated),new m.KeyFlags([this.flags]),new m.PreferredSymmetricAlgorithms([i.symmetric_key_algorithms.AES256,i.symmetric_key_algorithms.AES128]),new m.PreferredHashAlgorithms([i.hash_algorithms.SHA512,i.hash_algorithms.SHA256]),new m.Features([i.features.modification_detection]),new m.KeyServerPreferences([i.key_server_preferences.no_modify]),new m.PreferredCompressionAlgorithms([i.compression.zlib,i.compression.zip])],u&&o.push(new m.PrimaryUserId(1)),s.expire_in&&o.push(new m.KeyExpirationTime(s.expire_in)),c=new b({type:l,key:this.key,hasher:this.hasher,hashed_subpackets:o,unhashed_subpackets:[new m.Issuer(this.get_key_id())]}),(_=this,function(t){if(h)return t(c=a);!function(t){y=new S.Deferrals(t,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/keymaterial.iced",funcname:"KeyMaterial._self_sign_key"}),c.write(a,y.defer({assign_fn:function(){return n=arguments[0]},lineno:241})),y._fulfill()}((function(){return f=new A.SelfSig({userid:p,type:l,sig:c,options:_.flags}),p.push_sig(f),t(_.push_sig(f))}))})((function(){return r(n,c)}))},r.prototype.sign_subkey=function(t,e){var r,n,i,o,s,a;o=S.findDeferral(arguments),i=t.subkey,n=t.lifespan,r=null,(a=this,function(t){var e,u;if(!a.key.can_sign())return t((null!=(e=i.get_subkey_binding())&&null!=(u=e.sig)?u.get_framed_output():void 0)?void 0:r=new Error("Cannot sign with subkey --- don't have private key and can't replay"));!function(t){s=new S.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/keymaterial.iced",funcname:"KeyMaterial.sign_subkey"}),a._sign_subkey({subkey:i,lifespan:n},s.defer({assign_fn:function(){return r=arguments[0]},lineno:254})),s._fulfill()}(t)})((function(){return e(r)}))},r.prototype._sign_subkey=function(t,e){var r,n,i,o,s,a,u,f,h,c;f=S.findDeferral(arguments),u=t.subkey,i=t.lifespan,a=n=o=null,(c=this,function(t){if(!u.can_sign())return t();!function(t){h=new S.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/keymaterial.iced",funcname:"KeyMaterial._sign_subkey"}),u._sign_primary_with_subkey({primary:c,lifespan:i},h.defer({assign_fn:function(){return n=arguments[0],o=arguments[1]},lineno:266})),h._fulfill()}(t)})(function(t){return function(){!function(e){if(null!=n)return e();!function(e){h=new S.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/keymaterial.iced",funcname:"KeyMaterial._sign_subkey"}),t._sign_subkey_with_primary({subkey:u,lifespan:i,primary_binding:o},h.defer({assign_fn:function(){return n=arguments[0],a=arguments[1]},lineno:268})),h._fulfill()}(e)}((function(){return null==n&&(r=A.SubkeyBinding,s=new r({primary:t,sig:a,direction:r.DOWN}),u.push_sig(s)),e(n)}))}}(this))},r.prototype._sign_primary_with_subkey=function(e,r){var n,o,s,a,u,f,h,c;h=S.findDeferral(arguments),a=e.primary,o=e.lifespan,s=t.concat([a.to_signature_payload(),this.to_signature_payload()]),u=new b({type:i.sig_types.primary_binding,key:this.key,hasher:this.hasher,hashed_subpackets:[new m.CreationTime(o.generated)],unhashed_subpackets:[new m.Issuer(this.get_key_id())]}),function(t){c=new S.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/keymaterial.iced",funcname:"KeyMaterial._sign_primary_with_subkey"}),u.write_unframed(s,c.defer({assign_fn:function(){return n=arguments[0],f=arguments[1]},lineno:293})),c._fulfill()}((function(){return r(n,f)}))},r.prototype._sign_subkey_with_primary=function(e,r){var n,o,s,a,u,f,h,c,l;c=S.findDeferral(arguments),f=e.subkey,o=e.lifespan,a=e.primary_binding,s=t.concat([this.to_signature_payload(),f.to_signature_payload()]),h=[new m.Issuer(this.get_key_id())],null!=a&&h.push(new m.EmbeddedSignature({rawsig:a})),u=new b({type:i.sig_types.subkey_binding,key:this.key,hasher:this.hasher,hashed_subpackets:[new m.CreationTime(o.generated),new m.KeyExpirationTime(o.expire_in),new m.KeyFlags([f.flags])],unhashed_subpackets:h}),function(t){l=new S.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/keymaterial.iced",funcname:"KeyMaterial._sign_subkey_with_primary"}),u.write(s,l.defer({assign_fn:function(){return n=arguments[0]},lineno:318})),l._fulfill()}((function(){return r(n,u)}))},r.prototype.merge_private=function(t){return this.skm=t.skm},r.parse_public_key=function(t,e){return new p(t).parse_public_key(e)},r.parse_private_key=function(t,e){return new p(t).parse_private_key(e)},r.prototype.is_key_material=function(){return!0},r.prototype.is_primary=function(){var t;return!(null!=(t=this.opts)?t.subkey:void 0)},r.prototype.is_duplicate_primary=function(){return this._is_duplicate_primary},r.prototype.set_duplicate_primary=function(){return this._is_duplicate_primary=!0},r.prototype.ekid=function(){return this.key.ekid()},r.prototype.can_sign=function(){return this.key.can_sign()},r.prototype.is_locked=function(){return!this.key.has_private()&&null!=this.skm&&this.skm.is_locked()},r.prototype.has_private=function(){return this.has_unlocked_private()||this.has_locked_private()},r.prototype.has_locked_private=function(){return this.skm&&this.skm.has_private()},r.prototype.has_unlocked_private=function(){return this.key.has_private()},r.prototype.has_secret_key_material=function(){return null!=this.skm},r.prototype.validity_check=function(t){var e,r,n,i;r=S.findDeferral(arguments),(i=this,function(t){n=new S.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/keymaterial.iced",funcname:"KeyMaterial.validity_check"}),i.key.validity_check(n.defer({assign_fn:function(){return e=arguments[0]},lineno:352})),n._fulfill()})(function(r){return function(){return null!=e&&("In key "+r.get_fingerprint().toString("hex")+": "+e.message,e=new Error(e)),t(e)}}(this))},r.prototype.is_signed_subkey_of=function(t,e){var r;return!this.primary_flag&&(r=(null!=e?e.strict:void 0)&&this.fulfills_flags(i.key_flags.sign_data),this.get_psc().is_signed_subkey_of(t,r))},r.prototype.get_subkey_binding=function(){return this.opts.subkey?this.get_psc().get_subkey_binding():null},r.prototype.get_subkey_binding_signature_output=function(){var t,e;return null!=(t=this.get_subkey_binding())&&null!=(e=t.sig)?e.get_framed_output():void 0},r.prototype.equal=function(t){return v(this.ekid(),t.ekid())},r.prototype.unlock=function(t,e){var r,n,o,s,a,u,f,h;if(null!=(f=t.passphrase)&&(f=w(f)),o=null,null==this.skm)return e(o=new Error("Cannot unlock secret key -- no material!"));if(h=this.skm.s2k_convention===i.s2k_convention.none?this.skm.payload:this.skm.s2k.type===i.s2k.gnu_dummy?null:null==f?(o=new Error("Key was locked, but no passphrase given"),null):(u=this.skm.s2k.produce_key(f,this.skm.cipher.key_size),M({ciphertext:this.skm.payload,block_cipher_class:this.skm.cipher.klass,iv:this.skm.iv,key:u}))){switch(this.skm.s2k_convention){case i.s2k_convention.sha1:n=h.length-_.output_size,s=h.slice(n),h=h.slice(0,n),a=(new _).bufhash(h),v(s,a)||(o=new Error("bad private key passphrase (hash mismatch)"));break;case i.s2k_convention.checksum:case i.s2k_convention.none:n=h.length-2,r=h.readUInt16BE(n),h=h.slice(0,n),r!==k(h)&&(o=new Error("bad private key passphrase (checksum mismatch)"))}null==o&&(o=this.key.read_priv(h))}return e(o)},r.prototype.get_all_key_flags=function(){return this._psc.get_all_key_flags()},r.prototype.add_flags=function(t){return this.flags|=t},r.prototype.fulfills_flags=function(t){var e;return!this.is_revoked()&&(((e=this.get_all_key_flags())&t)===t||this.key.fulfills_flags(t)||this.is_primary()&&0===e&&(this.key.good_for_flags()&t)===t)},r.prototype.get_signed_userids=function(){return this.get_psc().get_signed_userids()},r.prototype.get_signed_user_attributes=function(){return this.get_psc().get_signed_user_attributes()},r.prototype.is_self_signed=function(){return this.get_psc().is_self_signed()},r.prototype.push_sig=function(t){var e,n,o;if(this.is_primary())return this.add_flags(t.sig.get_key_flags()),r.__super__.push_sig.call(this,t);if((n=t.sig).type===i.sig_types.subkey_binding){if(null==(o=this._winner_subkey_binding)||n.key_expiration_after_other(o))return this._winner_subkey_binding=n,this.get_psc().clear(),this.flags=0,this.add_flags(n.get_key_flags()),r.__super__.push_sig.call(this,t)}else{if(n.type!==i.sig_types.primary_binding)return r.__super__.push_sig.call(this,t);if(null!=(e=n.parent)&&e===this._winner_subkey_binding)return r.__super__.push_sig.call(this,t)}},r.prototype.clear_psc=function(){return null!=this._winner_subkey_binding&&(this._winner_subkey_binding=null),r.__super__.clear_psc.call(this)},r.prototype.mark_revoked=function(t){return this.revocation=t},r.prototype.is_revoked=function(){return null!=this.revocation},r.prototype.check_not_expired=function(t){var e,r,n,i;return n=t.now,r=null,(e=null!=(i=this.get_expire_time())?i.expire_at:void 0)&&e<n&&(r=new Error("PGP key "+this.get_fingerprint().toString("hex")+" expired at "+e+" but we checked for time "+n)),r},r.prototype.is_preferable_to=function(t){var e,r;return e=this.get_expire_time(),r=t.get_expire_time(),null==e.expire_at&&(e.expire_at=1/0),null==r.expire_at&&(r.expire_at=1/0),e.expire_at>r.expire_at||!(e.expire_at<r.expire_at)&&e.generated>=r.generated},r.prototype.get_expire_time=function(){return null==this.get_psc()?null:this.is_primary()?this._get_expire_time_on_primary():this._get_expire_time_on_subkey()},r.prototype._get_expire_time_on_primary=function(){var t,e,r,n,i,o,s,a,u,f,h,c;for(s in o=this.get_psc().lookup.self_sigs_by_uid,f=null,this.timestamp,o){for(u=null,h=0,c=(e=o[s]).length;h<c;h++)null!=(n=e[h].sig)&&(t=n.get_key_expires(),i=n.when_generated(),(null==u||u.sig_generated<i)&&(u={expire_in:t,sig_generated:i}));null!=u&&(a=u.expire_in||0,(null==f||0===a||0<f&&f<a)&&(f=a))}return r={generated:this.timestamp,expire_at:null,expire_in:null},f&&(r.expire_at=this.timestamp+f,r.expire_in=f),r},r.prototype._get_expire_time_on_subkey=function(){var t,e,r,n,i,o,s,a;if(!(null!=(n=this.get_psc().lookup.subkey_binding)?n.length:void 0))return null;for(o=null,s=0,a=n.length;s<a;s++)null!=(i=n[s]).sig&&i.is_down()&&(e=i.sig.get_key_expires(),r=this.timestamp,e&&r?(t=r+e,(null==o||null!=o.expire_at&&o.expire_at<t)&&(o={expire_at:t,generated:r,expire_in:e})):(null!=e&&0===e||null==e)&&(o={generated:r,expire_in:null,expire_at:null}));return null==o&&(o={generated:0,expire_at:null,expire_in:null}),o},r.prototype.add_designee=function(t){var e;return e=function(t){return t.slice(12,20).toString("hex")},(this.desig_revokers||(this.desig_revokers={}))[e(t.fingerprint)]=t},r.prototype.add_designated_revocation=function(t){return(this.unverified_revocations||(this.unverified_revocations=[])).push(t)},r.prototype.get_designated_revocations=function(){return null==this.unverified_revocations||null==this.desig_revokers?[]:this.unverified_revocations.filter((t=this,function(e){var r;return null!=(r=e.get_issuer_key_id())&&r.toString("hex")in t.desig_revokers}));var t},r}(l),p=function(){function t(t){this.slice=t,this.key=null}return t.prototype.parse_public_key_v3=function(){return this.timestamp=this.slice.read_uint32(),this.expiration=this.slice.read_uint16(),this.parse_public_key_mpis()},t.prototype.parse_public_key_v4=function(){return this.timestamp=this.slice.read_uint32(),this.parse_public_key_mpis()},t.prototype.parse_public_key_mpis=function(){var t,e,r,n,c;if(this.algorithm=this.slice.read_uint8(),t=i.public_key_algorithms,e=(c=function(){switch(this.algorithm){case t.RSA:case t.RSA_ENCRYPT_ONLY:case t.RSA_SIGN_ONLY:return d;case t.DSA:return o;case t.ELGAMAL:return f;case t.ELGAMAL_SIGN_AND_ENCRYPT:return h;case t.ECDSA:return a;case t.ECDH:return s;case t.EDDSA:return u;default:throw new Error("Unknown key type: "+this.algorithm)}}.call(this).parse(this.slice.peek_rest_to_buffer()))[0],r=c[1],n=c[2],null!=e)throw e;return this.slice.advance(n),r},t.prototype._parse_public_key=function(){var t;switch(t=this.slice.read_uint8()){case i.versions.keymaterial.V3:return this.parse_public_key_v3();case i.versions.keymaterial.V4:return this.parse_public_key_v4();default:throw new Error("Unknown public key version: "+t)}},t.prototype.parse_public_key=function(t){var e;return e=this._parse_public_key(),new c({key:e,timestamp:this.timestamp,opts:t})},t.prototype.parse_private_key=function(t){var e,r,n,o,s;return n=new g,r=this._parse_public_key(),!0,o=null,(n.s2k_convention=this.slice.read_uint8())===i.s2k_convention.none?!1:(s=n.s2k_convention)===i.s2k_convention.sha1||s===i.s2k_convention.checksum?(o=this.slice.read_uint8(),n.s2k=(new y).read(this.slice)):o=n.s2k_convention,n.s2k_convention!==i.s2k_convention.none&&n.s2k.type===i.s2k.gnu_dummy?n.payload=null:(o&&(n.cipher=B.get_cipher(o),e=n.cipher.klass.blockSize,n.iv=this.slice.read_buffer(e)),n.payload=this.slice.consume_rest_to_buffer()),new c({key:r,skm:n,timestamp:this.timestamp,opts:t})},t}(),e.KeyMaterial=c}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_={}.hasOwnProperty,g=function(t,e){for(var r in e)_.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};c=r(36),(h=r(140)).nbits,h.nbv,h.BigInteger,p=r(112),f=p.SRF,p.MRF,(d=r(56)).bufeq_secure,d.ASP,r(73).make_esc,l=r(41),o=l.openpgp,l.kb,m=r(207),n=m.BaseKey,i=m.BaseKeyPair,y=r(112),f=y.SRF,y.MRF,u=function(t){function e(t){this.p=t.p,this.q=t.q,this.g=t.g,this.y=t.y}return g(e,t),e.type=o.public_key_algorithms.DSA,e.prototype.type=e.type,e.ORDER=["p","q","g","y"],e.prototype.ORDER=e.ORDER,e.alloc=function(t){return n.alloc(e,t)},e.prototype.trunc_hash=function(t){return h.bn_from_left_n_bits(t,this.q.bitLength())},e.prototype.nbits=function(){var t;return null!=(t=this.p)?t.bitLength():void 0},e.prototype.verify=function(t,e,r){var n,i,o,s,a,u,f;return o=t[0],s=t[1],n=null,i=this.trunc_hash(e),f=s.modInverse(this.q),a=i.multiply(f).mod(this.q),u=o.multiply(f).mod(this.q),this.g.modPow(a,this.p).multiply(this.y.modPow(u,this.p)).mod(this.p).mod(this.q).equals(o)||(n=new Error("verification failed")),r(n)},e}(n),a=function(t){function e(t){this.x=t.x,this.pub=t.pub}return g(e,t),e.ORDER=["x"],e.prototype.ORDER=e.ORDER,e.alloc=function(t,r){return n.alloc(e,t,{pub:r})},e.prototype.sign=function(t,e){var r,n,i,o,s,a,u,l,p,d,m;l=c.findDeferral(arguments),d=this.pub,o=d.p,s=d.q,r=d.g,n=this.pub.trunc_hash(t),function(t){p=new c.Deferrals(t,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/dsa.iced",funcname:"Priv.sign"}),f().random_zn(s.subtract(h.nbv(2)),p.defer({assign_fn:function(){return i=arguments[0]},lineno:76})),p._fulfill()}((m=this,function(){return i=i.add(h.BigInteger.ONE),a=r.modPow(i,o).mod(s),u=i.modInverse(s).multiply(n.add(m.x.multiply(a))).mod(s),e([a,u])}))},e}(n),s=function(e){function r(t){var e,n;n=t.pub,e=t.priv,r.__super__.constructor.call(this,{pub:n,priv:e})}return g(r,e),r.Pub=u,r.prototype.Pub=u,r.Priv=a,r.prototype.Priv=a,r.type=o.public_key_algorithms.DSA,r.prototype.type=r.type,r.prototype.get_type=function(){return this.type},r.klass_name="DSA",r.parse=function(t){return i.parse(r,t)},r.prototype.can_encrypt=function(){return!1},r.prototype.fulfills_flags=function(t){return(t&this.good_for_flags())===t},r.prototype.good_for_flags=function(){return o.key_flags.certify_keys|o.key_flags.sign_data},r.prototype.verify_unpad_and_check_hash=function(t,e){var n,i,o,s;return s=t.sig,n=t.data,o=t.hasher,i=t.hash,this._dsa_verify_update_and_check_hash({sig:s,data:n,hasher:o,hash:i,klass:r},e)},r.prototype.pad_and_sign=function(e,r,n){var i,o,s,a,u,f,h;u=c.findDeferral(arguments),(o=r.hasher)||(o=SHA512),i=o(e),(h=this,function(t){f=new c.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/dsa.iced",funcname:"Pair.pad_and_sign"}),h.priv.sign(i,f.defer({assign_fn:function(){return a=arguments[0]},lineno:128})),f._fulfill()})((function(){return n(null,t.concat(function(){var t,e,r;for(r=[],t=0,e=a.length;t<e;t++)s=a[t],r.push(s.to_mpi_buffer());return r}()))}))},r.parse_sig=function(t){var e,n,i,o,s;if(e=t.peek_rest_to_buffer(),n=(s=r.read_sig_from_buf(e))[0],o=s[1],i=s[2],null!=n)throw n;return t.advance(i),o},r.read_sig_from_buf=function(t){var e,r,n,i,o,s;return i=t.length,n=["r","s"],e=null,o=function(){var r,i,o,a;for(a=[],r=0,i=n.length;r<i;r++)n[r],null==e&&(o=h.mpi_from_buffer(t),e=o[0],s=o[1],t=o[2],a.push(s));return a}(),r=i-t.length,[e,o,r]},r}(i),e.DSA=e.Pair=s}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v={}.hasOwnProperty,w=function(t,e){for(var r in e)v.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};d=r(36),c=r(140),(y=r(56)).bufeq_secure,y.ASP,r(73).make_esc,m=r(41),o=m.openpgp,m.kb,_=r(207),i=_.BaseKeyPair,n=_.BaseKey,g=r(112),h=g.SRF,g.MRF,b=r(418),p=b.eme_pkcs1_encode,l=b.eme_pkcs1_decode,f=function(t){function e(t){this.p=t.p,this.g=t.g,this.y=t.y}return w(e,t),e.type=o.public_key_algorithms.ELGAMAL,e.prototype.type=e.type,e.ORDER=["p","g","y"],e.prototype.ORDER=e.ORDER,e.alloc=function(t){return n.alloc(e,t)},e.prototype.encrypt=function(t,e){var r,n,i,o,s;i=d.findDeferral(arguments),(s=this,function(t){o=new d.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/elgamal.iced",funcname:"Pub.encrypt"}),h().random_zn(s.p.subtract(c.nbv(2)),o.defer({assign_fn:function(){return n=arguments[0]},lineno:35})),o._fulfill()})(function(i){return function(){return n=n.add(c.BigInteger.ONE),r=[i.g.modPow(n,i.p),i.y.modPow(n,i.p).multiply(t).mod(i.p)],e(r)}}(this))},e}(n),u=function(t){function e(t){this.x=t.x,this.pub=t.pub}return w(e,t),e.ORDER=["x"],e.prototype.ORDER=e.ORDER,e.prototype.serialize=function(){return this.x.to_mpi_buffer()},e.alloc=function(t,r){return n.alloc(e,t,{pub:r})},e.prototype.decrypt=function(t,e){var r;return r=this.pub.p,e(null,t[0].modPow(this.x,r).modInverse(r).multiply(t[1]).mod(r))},e}(n),a=function(t){function e(t){var r,n;n=t.pub,r=t.priv,e.__super__.constructor.call(this,{pub:n,priv:r})}return w(e,t),e.Pub=f,e.prototype.Pub=f,e.Priv=u,e.prototype.Priv=u,e.type=o.public_key_algorithms.ELGAMAL,e.klass_name="ELGAMAL",e.prototype.type=e.type,e.prototype.get_type=function(){return this.type},e.prototype.fulfills_flags=function(t){return(t&this.good_for_flags())===t},e.prototype.good_for_flags=function(){return o.key_flags.encrypt_comm|o.key_flags.encrypt_storage},e.prototype.can_sign=function(){return!1},e.parse=function(t){return i.parse(e,t)},e.prototype.max_value=function(){return this.pub.p},e.prototype.pad_and_encrypt=function(t,e,r){var n,i,o,s,a,u,f;a=d.findDeferral(arguments),i=s=null,(f=this,function(e){u=new d.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/elgamal.iced",funcname:"Pair.pad_and_encrypt"}),p(t,f.pub.p.mpi_byte_length(),u.defer({assign_fn:function(){return i=arguments[0],o=arguments[1]},lineno:112})),u._fulfill()})(function(t){return function(){!function(e){if(null!=i)return e();!function(e){u=new d.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/elgamal.iced",funcname:"Pair.pad_and_encrypt"}),t.pub.encrypt(o,u.defer({assign_fn:function(){return n=arguments[0]},lineno:114})),u._fulfill()}((function(){return e(s=t.export_output({c_mpis:n}))}))}((function(){return r(i,s)}))}}(this))},e.prototype.decrypt_and_unpad=function(t,e,r){var n,i,o,s,a,u,f;a=d.findDeferral(arguments),i=s=null,(f=this,function(e){u=new d.Deferrals(e,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/elgamal.iced",funcname:"Pair.decrypt_and_unpad"}),f.priv.decrypt(t.c(),u.defer({assign_fn:function(){return i=arguments[0],o=arguments[1]},lineno:122})),u._fulfill()})(function(t){return function(){var e;return null==i&&(n=o.to_padded_octets(t.pub.p),e=l(n),i=e[0],s=e[1]),r(i,s)}}(this))},e.parse_output=function(t){return s.parse(t)},e.prototype.export_output=function(t){return new s(t)},e}(i),s=function(){function e(t){this.c_mpis=t.c_mpis,this.c_bufs=t.c_bufs}return e.parse=function(t){var r,n,i;if(r=function(){var e,r,o;for(o=[],e=0;e<2;++e){if(r=c.mpi_from_buffer(t),n=r[0],i=r[1],t=r[2],r[3],null!=n)throw n;o.push(i)}return o}(),0!==t.length)throw new Error("junk at the end of input");return new e({c_mpis:r})},e.prototype.c=function(){return this.c_mpis},e.prototype.hide=function(t,e){var r,n,i,o,s,a,u,f,h,c;f=d.findDeferral(arguments),i=t.key,o=t.max,a=t.slosh,o||(o=4096),a||(a=128),n=null,this.c_bufs=null,s=[],(c=this,function(t){var e,l,p,m;p=c.c_mpis,l=p.length,e=0,(m=function(t){var c,y;if(c=t,y=function(){return d.trampoline((function(){return++e,m(t)}))},!(e<l))return c();r=p[e],h=new d.Deferrals((function(){s.push(u),function(t){null!=n?c():t()}(y)}),{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/elgamal.iced",funcname:"Output.hide"}),i.hide({i:r,max:o,slosh:a},h.defer({assign_fn:function(){return n=arguments[0],u=arguments[1]},lineno:164})),h._fulfill()})(t)})(function(t){return function(){return null==n&&(t.c_mpis=s),e(n)}}(this))},e.prototype.find=function(t){var e,r;return r=t.key,this.c_mpis=function(){var t,n,i,o;for(o=[],t=0,n=(i=this.c_mpis).length;t<n;t++)e=i[t],o.push(r.find(e));return o}.call(this)},e.prototype.get_c_bufs=function(){var t;return null!=this.c_bufs?this.c_bufs:this.c_bufs=function(){var e,r,n,i;for(i=[],e=0,r=(n=this.c_mpis).length;e<r;e++)t=n[e],i.push(t.to_mpi_buffer());return i}.call(this)},e.prototype.output=function(){return t.concat(this.get_c_bufs())},e}(),e.ElGamal=e.Pair=a}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S={}.hasOwnProperty,E=function(t,e){for(var r in e)S.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};g=r(36),h=r(218).Packet,i=r(41).openpgp,d=r(369),k=r(113),p=k.SHA1,v=k.streamers,M=r(56),w=M.uint_to_buffer,y=M.bufeq_secure,m=M.bufeq_fast,x=r(1346),_=x.encrypt,o=x.Decryptor,n=r(217).util.ASP,b=r(73).make_esc,u=function(e){function r(t){this.crypto_type=t.crypto_type,this.key_id=t.key_id,this.ekey=t.ekey}return E(r,e),r.parse=function(t){return new f(t).parse()},r.prototype.to_esk_packet=function(){return this},r.prototype.get_key_id=function(){return this.key_id},r.prototype.write_unframed=function(e){var r;return r=[w(8,i.versions.PKESK),this.key_id,w(8,this.crypto_type),this.ekey.output()],null,e(null,t.concat(r))},r.prototype.write=function(t){var e,r,n,o,s,a;o=g.findDeferral(arguments),r=null,(a=this,function(t){s=new g.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"PKESK.write"}),a.write_unframed(s.defer({assign_fn:function(){return e=arguments[0],n=arguments[1]},lineno:36})),s._fulfill()})(function(o){return function(){return null==e&&(r=o.frame_packet(i.packet_tags.PKESK,n)),t(e,r)}}(this))},r}(h),c=function(e){function r(t){this.ciphertext=t.ciphertext}return E(r,e),r.parse=function(t){return new l(t).parse()},r.prototype.to_enc_data_packet=function(){return this},r.prototype.check=function(){},r.prototype.decrypt=function(t,e){var r,i,a,u,f,h,c,l,p,d,m;d=g.findDeferral(arguments),i=t.cipher,r=t.asp,a=new o({cipher:i,ciphertext:this.ciphertext,asp:r}),f=b(e,"SEIPD::decrypt"),r=n.make(r),function(t){m=new g.Deferrals(t,{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.decrypt"}),a.check(f(m.defer({lineno:63}))),m._fulfill()}((function(){m=new g.Deferrals((function(){var t;t=s.parse(p),h=t[0],c=t[1],l=a.get_prefix(),m=new g.Deferrals((function(){return u=h.check()?null:new Error("MDC mismatch"),e(u,c)}),{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.decrypt"}),h.compute({prefix:l,plaintext:c,asp:r},f(m.defer({lineno:70}))),m._fulfill()}),{parent:d,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.decrypt"}),a.dec(f(m.defer({assign_fn:function(){return p=arguments[0]},lineno:64}))),m._fulfill()}))},r.prototype.encrypt=function(e,r){var i,o,a,u,f,h,c,l,p,d;l=g.findDeferral(arguments),o=e.cipher,h=e.plaintext,c=e.prefixrandom,i=e.asp,u=new s({}),a=b(r,"SEIPD::encrypt"),i=n.make(i),function(t){p=new g.Deferrals(t,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.encrypt"}),u.compute({plaintext:h,prefix:c,asp:i},a(p.defer({assign_fn:function(){return f=arguments[0]},lineno:81}))),p._fulfill()}((d=this,function(){var e;h=t.concat([h,s.header,f]),p=new g.Deferrals((function(){return r(null)}),{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.encrypt"}),_({cipher:o,plaintext:h,prefixrandom:c},a(p.defer({assign_fn:(e=d,function(){return e.ciphertext=arguments[0]}),lineno:83}))),p._fulfill()}))},r.prototype.write_unframed=function(e){return e(null,t.concat([w(8,i.versions.SEIPD),this.ciphertext]))},r.prototype.write=function(t){var e,r,n,o,s,a;o=g.findDeferral(arguments),r=e=null,(a=this,function(t){s=new g.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"SEIPD.write"}),a.write_unframed(s.defer({assign_fn:function(){return e=arguments[0],n=arguments[1]},lineno:97})),s._fulfill()})(function(o){return function(){return null==e&&(r=o.frame_packet(i.packet_tags.SEIPD,n)),t(e,r)}}(this))},r}(h),s=function(e){function r(t){this.digest=t.digest}return E(r,e),r.header=t.from([192|i.packet_tags.MDC,p.output_length]),r.prototype.header=r.header,r.parse=function(t){return new a(t).parse()},r.prototype.compute=function(e,r){var i,o,s,a,u,f,h,c,l,p;c=g.findDeferral(arguments),u=e.plaintext,f=e.prefix,i=e.asp,i=n.make(i),(s=v.SHA1()).update(t.concat([f,f.slice(-2)])),o=b(r,"MDC::compute"),h=1048576,function(t){var e,r,n;a=0,u.length,e=(r=h)>0,(n=function(t){var f,p;if(f=t,p=function(){return g.trampoline((function(){return a+=r,n(t)}))},!0===e&&a>=u.length||!1===e&&a<=u.length)return f();s.update(u.slice(a,a+h)),function(t){l=new g.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/sess.iced",funcname:"MDC.compute"}),i.progress({what:"MDC",total:u.length,i:a},o(l.defer({lineno:122}))),l._fulfill()}(p)})(t)}((p=this,function(){return s.update(p.header),p.computed=s(),r(null,p.computed)}))},r.prototype.check=function(){return y(this.digest,this.computed)},r}(h),a=function(){function t(t){this.buf=t}return t.prototype.parse=function(){var t,e,r,n,i;if(r=s.header.length,n=p.output_length+r,i=this.buf.slice(0,-n),t=this.buf.slice(-n),!m(t.slice(0,r),s.header))throw new Error("Missing MDC header");return e=t.slice(r),[new s({digest:e}),i]},t}(),l=function(){function t(t){this.slice=t}return t.prototype.payload_split=function(t){},t.prototype.parse=function(){var t,e;if((e=this.slice.read_uint8())!==i.versions.SEIPD)throw new Error("Unknown SEIPD version "+e);return t=this.slice.consume_rest_to_buffer(),new c({ciphertext:t})},t}(),f=function(){function t(t){this.slice=t}return t.prototype.parse=function(){var t,e,r,n;if((n=this.slice.read_uint8())!==i.versions.PKESK)throw new Error("Unknown PKESK version: "+n);return r=this.slice.read_buffer(8),t=this.slice.read_uint8(),e=d.get_class(t).parse_output(this.slice.consume_rest_to_buffer()),new u({crypto_type:t,key_id:r,ekey:e})},t}(),e.SEIPD=c,e.PKESK=u,e.MDC=s}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l={}.hasOwnProperty;n=r(41).openpgp,(h=(u=r(101)).hash).SHA1,h.SHA256,u.ciphers.AES,u.prng.native_rng,c=r(56),s=c.bufferify,f=c.uint_to_buffer,r(533).encrypt,i=r(218).Packet,a=r(217).userid.parse,o=function(e){function r(t,e){this.components=null!=e?e:null,this.userid=s(t),null==this.compontents&&this._parse(),r.__super__.constructor.call(this),this._time_primary_pair=null,this.primary=!1,this.most_recent_sig=null}return function(t,e){for(var r in e)l.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.utf8=function(){return this.userid.toString("utf8")},r.prototype.write=function(){return this.frame_packet(n.packet_tags.userid,this.userid)},r.parse=function(t){return new r(t.consume_rest_to_buffer())},r.prototype.to_userid=function(){return this},r.prototype.cmp=function(t){var e,r;return(e=this.utf8())<(r=t.utf8())?-1:e===r?0:1},r.prototype.to_signature_payload=function(){return t.concat([t.from([n.signatures.userid]),f(32,this.userid.length),this.userid])},r.prototype._parse=function(){var t;if(null!=(t=a(this.utf8())))return this.components=t},r.prototype.get_username=function(){var t;return null!=(t=this.components)?t.username:void 0},r.prototype.get_comment=function(){var t;return null!=(t=this.components)?t.comment:void 0},r.prototype.get_email=function(){var t;return null!=(t=this.components)?t.email:void 0},r.prototype.time_primary_pair=function(){var t,e,r,n,i,o;if(null==this._time_primary_pair){for(e=function(){var t,e,r,i,o;for(o=[],t=0,e=(r=this.get_psc().get_self_sigs()).length;t<e;t++)n=r[t],o.push(null!=n&&null!=(i=n.sig)?i.time_primary_pair():void 0);return o}.call(this),null,r=[null,null],i=0,o=e.length;i<o;i++)null!=(t=e[i])&&(t[0]&&(null==r[0]||r[0]<t[0])&&(r[0]=t[0]),t[1]&&(null==r[1]||r[1]<t[0])&&(r[1]=t[0]));this._time_primary_pair=r,this.most_recent_sig=r[0]}return this._time_primary_pair},r.make=function(t){var e,n;return n=null!=(e=t.comment)?"("+e+") ":"",new r(t.username+" "+n+"<"+t.email+">",t)},r.prototype.get_framed_signature_output=function(){var t,e,r;return null!=(t=this.get_psc())&&null!=(e=t.get_self_sig())&&null!=(r=e.sig)?r.get_framed_output():void 0},r.prototype.mark_revoked=function(t){return this.revocation=t},r.prototype.is_revoked=function(){return null!=this.revocation},r}(i),e.UserID=o}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p={}.hasOwnProperty;h=r(36),s=r(218).Packet,n=r(41).openpgp,r(369),l=r(405),c=r(56).uint_to_buffer,a=r(1348),f=function(e,r){var n,i,o,s,a,u;a=h.findDeferral(arguments),e=t.concat([t.from([120,156]),e]),s=l.createInflate({flush:l.Z_FULL_FLUSH}),n=[],i=function(e){var i;if(null!=(i=r))return null!=e&&"Z_BUF_ERROR"===e.code&&(e=null),r=null,i(e,null!=e?null:t.concat(n))},s.on("readable",(function(){var t;if(null!=(t=s.read()))return n.push(t)})),s.on("end",(function(){return i(null)})),s.on("error",(function(t){return i(t)})),function(t){u=new h.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced"}),s.write(e,u.defer({assign_fn:function(){return o=arguments[0]},lineno:53})),u._fulfill()}((function(){!function(t){if(null!=o)return t();!function(t){u=new h.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced"}),s.end(o),u._fulfill()}(t)}((function(){if(null!=o)return i(o)}))}))},u=function(t,e){var r,n;r=null;try{n=a(t)}catch(t){r=t}return e(r,n)},i=function(e){function r(t){this.algo=t.algo,this.compressed=t.compressed,this.inflated=t.inflated}return function(t,e){for(var r in e)p.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.parse=function(t){return new o(t).parse()},r.prototype.inflate=function(t){var e,r,i,o,s;i=h.findDeferral(arguments),e=r=null,(s=this,function(t){switch(s.algo){case n.compression.none:return t(r=s.compressed);case n.compression.zlib:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.inflate"}),l.inflate(s.compressed,o.defer({assign_fn:function(){return e=arguments[0],r=arguments[1]},lineno:95})),o._fulfill()}(t);break;case n.compression.zip:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.inflate"}),f(s.compressed,o.defer({assign_fn:function(){return e=arguments[0],r=arguments[1]},lineno:97})),o._fulfill()}(t);break;case n.compression.bzip:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.inflate"}),u(s.compressed,o.defer({assign_fn:function(){return e=arguments[0],r=arguments[1]},lineno:99})),o._fulfill()}(t);break;default:return t(e=new Error("no known inflation -- algo: "+s.algo))}})((function(){return t(e,r)}))},r.prototype.deflate=function(t){var e,r,i,o,s;i=h.findDeferral(arguments),e=r=null,(s=this,function(t){switch(s.algo){case n.compression.none:return t(r=s.inflated);case n.compression.zlib:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.deflate"}),l.deflate(s.inflated,o.defer({assign_fn:function(){return e=arguments[0],r=arguments[1]},lineno:111})),o._fulfill()}(t);break;case n.compression.zip:!function(t){o=new h.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.deflate"}),fake_zip_deflate(s.inflated,o.defer({assign_fn:function(){return e=arguments[0],r=arguments[1]},lineno:113})),o._fulfill()}(t);break;default:return t(e=new Error("no known deflation -- algo: "+s.algo))}})((function(){return t(e,r)}))},r.prototype.write_unframed=function(e){var r,n,i,o,s,a;o=h.findDeferral(arguments),n=i=null,(a=this,function(t){var e;s=new h.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.write_unframed"}),a.deflate(s.defer({assign_fn:(e=a,function(){return n=arguments[0],e.compressed=arguments[1]}),lineno:122})),s._fulfill()})(function(o){return function(){return null==n&&(r=[c(8,o.algo),o.compressed],i=t.concat(r)),e(n,i)}}(this))},r.prototype.write=function(t){var e,r,i,o,s,a;o=h.findDeferral(arguments),e=r=null,(a=this,function(t){s=new h.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/compressed.iced",funcname:"Compressed.write"}),a.write_unframed(s.defer({assign_fn:function(){return e=arguments[0],i=arguments[1]},lineno:132})),s._fulfill()})(function(o){return function(){return null==e&&(r=o.frame_packet(n.packet_tags.compressed,i)),t(e,r)}}(this))},r}(s),o=function(){function t(t){this.slice=t}return t.prototype.parse=function(){var t,e;return t=this.slice.read_uint8(),e=this.slice.consume_rest_to_buffer(),new i({algo:t,compressed:e})},t}(),e.Compressed=i}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c={}.hasOwnProperty;f=r(36),s=r(218).Packet,n=r(41).openpgp,a=r(369),u=r(113),h=r(56).uint_to_buffer,o=function(e){function r(t){this.sig_type=t.sig_type,this.hasher=t.hasher,this.sig_klass=t.sig_klass,this.key_id=t.key_id,this.is_final=t.is_final}return function(t,e){for(var r in e)c.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.parse=function(t){return new i(t).parse()},r.prototype.write_unframed=function(e){var r,i,o;return i=[n.versions.one_pass_sig,this.sig_type,this.hasher.type,this.sig_klass.type],(r=function(){var t,e,r;for(r=[],t=0,e=i.length;t<e;t++)o=i[t],r.push(h(8,o));return r}()).push(this.key_id),r.push(h(8,this.is_final)),e(null,t.concat(r))},r.prototype.write=function(t){var e,r,i,o,s,a;o=f.findDeferral(arguments),(a=this,function(t){s=new f.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/packet/one_pass_sig.iced",funcname:"OnePassSignature.write"}),a.write_unframed(s.defer({assign_fn:function(){return e=arguments[0],i=arguments[1]},lineno:38})),s._fulfill()})(function(o){return function(){return r=o.frame_packet(n.packet_tags.one_pass_sig,i),t(e,r)}}(this))},r}(s),i=function(){function t(t){this.slice=t}return t.prototype.parse=function(){var t,e,r,i,s,f;if((f=this.slice.read_uint8())!==n.versions.one_pass_sig)throw new Error("Unknown OnePassSignature version "+f);return s=this.slice.read_uint8(),t=u.alloc_or_throw(this.slice.read_uint8()),i=a.get_class(this.slice.read_uint8()),r=this.slice.read_buffer(8),e=this.slice.read_uint8(),new o({sig_type:s,hasher:t,sig_klass:i,key_id:r,is_final:e})},t}(),e.OnePassSignature=o}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P={}.hasOwnProperty;b=r(36),x=r(73).make_esc,B=r(368),u=B.Signature,o=B.CreationTime,s=B.Issuer,D=r(56),c=D.bufferify,E=D.unix_time,r(112).SRF,S=r(101),(R=r(419)).export_key_pgp,R.get_cipher,S.util.scrub_buffer,S.WordArray,M=r(41),t=M.openpgp,n=r(530),(g=r(113)).SHA512,_=r(236).encode,l=r(217).armor.clearsign_header,a=r(451).Literal,h=r(808).Base,e.input_to_cleartext=v=function(t){var e;return e=t.split(/\n/),{show:c(w(e)),sign:c(k(e))}},e.dash_escape=d=function(t){return t.length>=1&&"-"===t[0]?"- "+t:t},e.dash_unescape_line=m=function(t){var e,r,n;return r=!1,[null!=(e=t.match(/^-( )?(.*?)$/))?(1!==(null!=(n=e[1])?n.length:void 0)&&(r=!0),e[2]):t,r]},e.dash_unescape_lines=y=function(t,e){var r,n,i;return null==e&&(e=null),function(){var o,s,a,u;for(u=[],r=o=0,s=t.length;o<s;r=++o)i=t[r],a=m(i),n=a[0],a[1]&&null!=e&&e.push("Bad dash-encoding on line "+(r+1)),u.push(n);return u}()},e.input_to_cleartext_display=w=function(t){var e,r;return r=function(){var r,n,i;for(i=[],r=0,n=t.length;r<n;r++)e=t[r],i.push(d(e));return i}(),0!==t.length&&""===t.slice(-1)[0]||r.push(""),r.join("\n")},e.clearsign_to_sign=p=function(t,e){return t=y(t,e),k(t)},e.input_to_cleartext_sign=k=function(t){var e,r,n,i;for(n=function(){var r,n,i;for(i=[],r=0,n=t.length;r<n;r++)e=t[r],i.push(A(e));return i}(),r=0,i=n.length-1;i>=0&&""===n[i];i+=-1)r++;return r>0&&n.pop(),n.join("\r\n")},e.whitespace_strip=A=function(t){var e;return(e=(t=t.replace(/\r/g,"")).match(/^(.*?)([ \t]*)$/))?e[1]:t},i=function(){function e(t){this.msg=t.msg,this.signing_key=t.signing_key,this.now=t.now,this.hasher=t.hasher}return e.prototype._fix_msg=function(t){return this._cleartext=v(this.msg.toString("utf8")),t(null)},e.prototype._sign_msg=function(e){var r,n,i,a;n=b.findDeferral(arguments),this.sig=new u({hasher:this.hasher,sig_type:t.sig_types.canonical_text,key:this.signing_key.key,hashed_subpackets:[new o(this.now||E())],unhashed_subpackets:[new s(this.signing_key.get_key_id())]}),(a=this,function(t){var e;i=new b.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner._sign_msg"}),a.sig.write(a._cleartext.sign,i.defer({assign_fn:(e=a,function(){return r=arguments[0],e._sig_output=arguments[1]}),lineno:118})),i._fulfill()})(function(t){return function(){return e(r,t._sig_output)}}(this))},e.prototype.scrub=function(){},e.prototype.hasher_name=function(){return this.sig.hasher.algname},e.prototype._encode=function(e){return e(null,l(n,this._cleartext.show,this.hasher_name())+_(t.message_types.signature,this._sig_output))},e.prototype.run=function(t){var e,r,n,i,o,s;i=b.findDeferral(arguments),r=x(t,"ClearSigner::run"),(s=this,function(t){o=new b.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner.run"}),s._fix_msg(r(o.defer({lineno:140}))),o._fulfill()})(function(s){return function(){o=new b.Deferrals((function(){o=new b.Deferrals((function(){return t(null,e,n)}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner.run"}),s._encode(r(o.defer({assign_fn:function(){return e=arguments[0]},lineno:142}))),o._fulfill()}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"ClearSigner.run"}),s._sign_msg(r(o.defer({assign_fn:function(){return n=arguments[0]},lineno:141}))),o._fulfill()}}(this))},e}(),f=function(e){function r(t){var e,n;n=t.packets,this.clearsign=t.clearsign,e=t.keyfetch,this.now=t.now,this.assert_pgp_hash=t.assert_pgp_hash,r.__super__.constructor.call(this,{packets:n,keyfetch:e})}return function(t,e){for(var r in e)P.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype._reformat_text=function(e){var r;return r=c(p(this.clearsign.lines)),this._literal=new a({data:r,format:t.literal_formats.utf8,date:this.now||E()}),e(null)},r.prototype._make_hasher=function(t){var e,r;return e=null,r=(this.clearsign.headers.hash||"MD5").trim(),null==(this._sig.hasher=g[r])&&(e=new Error("Unknown hash algorithm: "+r)),t(e)},r.prototype._verify=function(t){var e,r,n,i,o;n=b.findDeferral(arguments),r={now:this.now,assert_pgp_hash:this.assert_pgp_hash},(o=this,function(t){i=new b.Deferrals(t,{parent:n,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier._verify"}),o._sig.verify([o._literal],i.defer({assign_fn:function(){return e=arguments[0]},lineno:184}),r),i._fulfill()})((function(){return t(e)}))},r.prototype._check_headers=function(t){var e,r,n;for(r in e=null,n=this.clearsign.headers)if(n[r],"hash"!==r){e=new Error("Unallowed header: "+r);break}return t(e)},r.prototype.run=function(t){var e,r,n,i;r=b.findDeferral(arguments),e=x(t,"Verifier::run"),(i=this,function(t){n=new b.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._check_headers(e(n.defer({lineno:201}))),n._fulfill()})(function(i){return function(){n=new b.Deferrals((function(){n=new b.Deferrals((function(){n=new b.Deferrals((function(){n=new b.Deferrals((function(){n=new b.Deferrals((function(){return t(null,i._literal)}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._verify(e(n.defer({lineno:206}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._make_hasher(e(n.defer({lineno:205}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._fetch_key(e(n.defer({lineno:204}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._reformat_text(e(n.defer({lineno:203}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"Verifier.run"}),i._find_signature(e(n.defer({lineno:202}))),n._fulfill()}}(this))},r}(h),e.sign=function(t,e){var r,n,o,s,a,u,f,h,c,l;c=b.findDeferral(arguments),a=t.msg,h=t.signing_key,u=t.now,s=t.hasher,r=new i({msg:a,signing_key:h,now:u,hasher:s}),function(t){l=new b.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"sign"}),r.run(l.defer({assign_fn:function(){return o=arguments[0],n=arguments[1],f=arguments[2]},lineno:217})),l._fulfill()}((function(){return r.scrub(),e(o,n,f)}))},e.verify=function(t,e){var r,n,i,o,s,a,u,h,c,l;c=b.findDeferral(arguments),u=t.packets,n=t.clearsign,o=t.keyfetch,a=t.now,r=t.assert_pgp_hash,h=new f({packets:u,clearsign:n,keyfetch:o,now:a,assert_pgp_hash:r}),function(t){l=new b.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/clearsign.iced",funcname:"verify"}),h.run(l.defer({assign_fn:function(){return i=arguments[0],s=arguments[1]},lineno:225})),l._fulfill()}((function(){return e(i,s)}))}}).call(this)},function(t,e,r){(function(){var t,n,i;n=r(36),i=r(41),t=i.openpgp,e.Base=function(){function e(t){this.packets=t.packets,this.keyfetch=t.keyfetch,this._sig=null}return e.prototype._find_signature=function(e){var r;return e(1!==(r=this.packets.length)?new Error("Expected one signature packet; got "+r):(this._sig=this.packets[0]).tag!==t.packet_tags.signature?new Error("Expected a signature packet; but got type="+this.packets[0].tag):null)},e.prototype._fetch_key=function(t){var e,r,o,s,a,u,f;a=n.findDeferral(arguments),r=this._sig.get_key_id(),(f=this,function(t){u=new n.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/verifier.iced",funcname:"Base._fetch_key"}),f.keyfetch.fetch([r],i.ops.verify,u.defer({assign_fn:function(){return e=arguments[0],s=arguments[1],arguments[2]},lineno:28})),u._fulfill()})(function(n){return function(){return null==e&&(o=s.find_pgp_key_material(r),n._sig.key=o.key,n._sig.key_manager=s,n._sig.subkey_material=o),t(e)}}(this))},e}()}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v={}.hasOwnProperty;p=r(36),m=r(73).make_esc,b=r(368),a=b.Signature,i=b.CreationTime,o=b.Issuer,g=r(56).unix_time,c=r(101).WordArray,d=r(41),n=d.openpgp,r(530),_=r(113).streamers,l=r(236).encode,s=r(451).Literal,h=r(808).Base,y=r(450),u=function(){function e(t){this.data=t.data,this.hash_streamer=t.hash_streamer,this.signing_key=t.signing_key}return e.prototype.run=function(t){var e,r,n,i,o,s;i=p.findDeferral(arguments),r=m(t,"Signer::run"),(s=this,function(t){o=new p.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer.run"}),s._run_hash(r(o.defer({lineno:39}))),o._fulfill()})(function(s){return function(){o=new p.Deferrals((function(){o=new p.Deferrals((function(){return t(null,e,n)}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer.run"}),s._encode(r(o.defer({assign_fn:function(){return e=arguments[0]},lineno:41}))),o._fulfill()}),{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer.run"}),s._sign(r(o.defer({assign_fn:function(){return n=arguments[0]},lineno:40}))),o._fulfill()}}(this))},e.prototype.scrub=function(){},e.prototype._sign=function(e){var r,s,u,f,h;u=p.findDeferral(arguments),this.sig=new a({sig_type:n.sig_types.canonical_text,key:this.signing_key.key,hashed_subpackets:[new i(g())],unhashed_subpackets:[new o(this.signing_key.get_key_id())],hasher:this.hash_streamer}),r=t.from([]),(h=this,function(t){var e;f=new p.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Signer._sign"}),h.sig.write(r,f.defer({assign_fn:(e=h,function(){return s=arguments[0],e._sig_output=arguments[1]}),lineno:59})),f._fulfill()})(function(t){return function(){return e(s,t._sig_output)}}(this))},e.prototype._encode=function(t){return null,t(null,l(n.message_types.signature,this._sig_output))},e.prototype._run_hash=function(t){var e;return e=null,null!=this.hash_streamer||(null!=this.data?(this.hash_streamer=_.SHA512(),this.hash_streamer.update(this.data)):e=new Error("Need either a hasher or data")),t(e)},e}(),f=function(e){function r(t){var e,n;n=t.packets,this.data=t.data,this.data_fn=t.data_fn,e=t.keyfetch,this.now=t.now,this.assert_pgp_hash=t.assert_pgp_hash,r.__super__.constructor.call(this,{packets:n,keyfetch:e})}return function(t,e){for(var r in e)v.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype._consume_data=function(t){var e,r,n,i,o,s,a,u;s=p.findDeferral(arguments),n=null,(u=this,function(t){if(null==u.data_fn)return t();n=null,u._sig.hasher.klass,o=_[u._sig.hasher.algname](),e=function(t){return o.update(t)},i=!0,function(t){var o;(o=function(t){var f;if(f=function(){return p.trampoline((function(){return o(t)}))},!i)return t();a=new p.Deferrals((function(){return f(null!=n||r?i=!1:void 0)}),{parent:s,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier._consume_data"}),u.data_fn(e,a.defer({assign_fn:function(){return n=arguments[0],r=arguments[1]},lineno:101})),a._fulfill()})(t)}((function(){return t(u._sig.hasher=o)}))})((function(){return t(n)}))},r.prototype._verify=function(t){var e,r,n,i,o,a;i=p.findDeferral(arguments),e=this.data?[new s({data:this.data})]:[],this.literals=e,n={now:this.now,assert_pgp_hash:this.assert_pgp_hash},(a=this,function(t){o=new p.Deferrals(t,{parent:i,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier._verify"}),a._sig.verify(e,o.defer({assign_fn:function(){return r=arguments[0]},lineno:113}),n),o._fulfill()})((function(){return t(r)}))},r.prototype._make_literals=function(e){return this.literals.length||this.literals.push(new s({data:t.from([])})),this.literals[0].push_sig(new y.Data({sig:this._sig})),e(null)},r.prototype.run=function(t){var e,r,n,i;r=p.findDeferral(arguments),e=m(t,"Verifier::run"),(i=this,function(t){n=new p.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._find_signature(e(n.defer({lineno:128}))),n._fulfill()})(function(i){return function(){n=new p.Deferrals((function(){n=new p.Deferrals((function(){n=new p.Deferrals((function(){n=new p.Deferrals((function(){return t(null,i.literals)}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._make_literals(e(n.defer({lineno:132}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._verify(e(n.defer({lineno:131}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._consume_data(e(n.defer({lineno:130}))),n._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"Verifier.run"}),i._fetch_key(e(n.defer({lineno:129}))),n._fulfill()}}(this))},r}(h),e.sign=function(t,e){var r,n,i,o,s,a,f,h,c,l;c=p.findDeferral(arguments),r=t.data,o=t.hash_streamer,h=t.signing_key,s=t.now,a=new u({data:r,hash_streamer:o,signing_key:h,now:s}),function(t){l=new p.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"sign"}),a.run(l.defer({assign_fn:function(){return i=arguments[0],n=arguments[1],f=arguments[2]},lineno:139})),l._fulfill()}((function(){return a.scrub(),e(i,n,f)}))},e.verify=function(t,e){var r,n,i,o,s,a,u,h,c,l,d;l=p.findDeferral(arguments),n=t.data,i=t.data_fn,h=t.packets,s=t.keyfetch,u=t.now,r=t.assert_pgp_hash,c=new f({data:n,data_fn:i,packets:h,keyfetch:s,now:u,assert_pgp_hash:r}),function(t){d=new p.Deferrals(t,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/detachsign.iced",funcname:"verify"}),c.run(d.defer({assign_fn:function(){return o=arguments[0],a=arguments[1]},lineno:147})),d._fulfill()}((function(){return e(o,a)}))}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c;t=r(535).C,h=r(536),s=h.bufeq,n=h.PpBuffer,(c=r(537)).pow2,f=c.twos_compl_inv,i=c.U32MAX,u=r(534).pack,a=function(t,e){return{type:t,raw:e}},e.Unpacker=o=function(){function e(t,e){this._opts=null!=e?e:{},this._orig_buffer=t,this._buffer=new n(t),this._ext=this._opts.ext||(this._opts.no_ext?null:a)}return e.prototype.u_buf=function(t){return this._buffer.read_buffer(t)},e.prototype.u_str=function(t){return this.u_buf(t).toString("utf8")},e.prototype.u_bin=function(t){return this.u_buf(t)},e.prototype.u_ext=function(t){var e,r;if(r=this.u_uint8(),e=this.u_buf(t),null!=this._opts.ext)return this._opts.ext(r,e);throw new Error("No ext hook but got message type: "+r)},e.prototype.u_array=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)r.push(this.u());return r},e.prototype.u_map=function(t){var e,r,n,i,o,s,a;for(i={},n=[],e=o=0;0<=t?o<t:o>t;e=0<=t?++o:--o){if(r=this.u(),n.push(r),null!=i[r])throw new Error("duplicate key '"+r+"'");i[r]=this.u()}if(this._opts.strict)for(e=s=0,a=n.length-1;0<=a?s<a:s>a;e=0<=a?++s:--s)if(n[e]>n[e+1])throw new Error("unsorted object keys in strict mode: "+n[e]+" > "+n[e+1]);return i},e.prototype.u_uint8=function(){return this._buffer.read_uint8()},e.prototype.u_uint16=function(){return this._buffer.read_uint16()},e.prototype.u_uint32=function(){return this._buffer.read_uint32()},e.prototype.u_int8=function(){return this._buffer.read_int8()},e.prototype.u_int16=function(){return this._buffer.read_int16()},e.prototype.u_int32=function(){return this._buffer.read_int32()},e.prototype.u_uint64=function(){return this.u_uint32()*i+this.u_uint32()},e.prototype.u_double=function(){return this._buffer.read_float64()},e.prototype.u_float=function(){return this._buffer.read_float32()},e.prototype.u_int64=function(){var t,e,r;return t=(r=function(){var t,e;for(e=[],t=0;t<2;++t)e.push(this.u_uint32());return e}.call(this))[0],e=r[1],i*(t-i)+e},e.prototype.u=function(){var e,r;if((e=this.u_uint8())<=t.positive_fix_max)return e;if(e>=t.negative_fix_min&&e<=t.negative_fix_max)return f(e,8);if(e>=t.fix_str_min&&e<=t.fix_str_max)return r=e&t.fix_str_count_mask,this.u_str(r);if(e>=t.fix_array_min&&e<=t.fix_array_max)return r=e&t.fix_array_count_mask,this.u_array(r);if(e>=t.fix_map_min&&e<=t.fix_map_max)return r=e&t.fix_map_count_mask,this.u_map(r);switch(e){case t.null:return null;case t.true:return!0;case t.false:return!1;case t.uint8:return this.u_uint8();case t.uint16:return this.u_uint16();case t.uint32:return this.u_uint32();case t.uint64:return this.u_uint64();case t.int8:return this.u_int8();case t.int16:return this.u_int16();case t.int32:return this.u_int32();case t.int64:return this.u_int64();case t.double:return this.u_double();case t.float:return this.u_float();case t.str8:return this.u_str(this.u_uint8());case t.str16:return this.u_str(this.u_uint16());case t.str32:return this.u_str(this.u_uint32());case t.bin8:return this.u_bin(this.u_uint8());case t.bin16:return this.u_bin(this.u_uint16());case t.bin32:return this.u_bin(this.u_uint32());case t.array16:return this.u_array(this.u_uint16());case t.array32:return this.u_array(this.u_uint32());case t.map16:return this.u_map(this.u_uint16());case t.map32:return this.u_map(this.u_uint32());case t.fix_ext1:return this.u_ext(1);case t.fix_ext2:return this.u_ext(2);case t.fix_ext4:return this.u_ext(4);case t.fix_ext8:return this.u_ext(8);case t.fix_ext16:return this.u_ext(16);case t.ext8:return this.u_ext(this.u_uint8());case t.ext16:return this.u_ext(this.u_uint16());case t.ext32:return this.u_ext(this.u_uint32());default:throw new Error("unhandled type "+e)}},e.prototype.unpack=function(){var t,e,r,n;if(n=this.u(),this._opts.strict){if((t=(r=u(n,{sort_keys:!0})).length)!==(e=this._orig_buffer.length))throw new Error("encoding size mismatch: wanted "+t+" but got "+e);if(!s(r,this._orig_buffer))throw new Error("Got non-standard encoding in strict mode")}return n},e}(),e.unpack=function(t,e){return null==e&&(e={}),new o(t,e).unpack()}}).call(this)},function(t,e,r){(function(){var t,n={}.hasOwnProperty;t=r(207).BaseKeyPair,e.BaseKeyPair=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,t),e.prototype.export_secret_key_kb=function(t,e){var r,n,i;return r=null,null==(n=null!=(i=this.priv)?i.key:void 0)&&(r=new Error("no private key available")),e(r,n)},e}(t)}).call(this)},function(t,e,r){(function(){var t,n,i,o={}.hasOwnProperty;t=r(420).KeyFetcher,i=function(t){return t.toString("hex")},n=function(t){function e(){this._keys={},this._kms={}}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.prototype.add_key_manager=function(t){var e,r,n,o,s,a;for(a=[],o=0,s=(r=t.export_pgp_keys_to_keyring()).length;o<s;o++)e=r[o],n=i(e.key_material.get_key_id()),this._keys[n]=e,a.push(this._kms[n]=t);return a},e.prototype.fetch=function(t,e,r){var n,o,s,a,u,f,h,c,l,p;for(n=null,o=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)u=t[e],n.push(i(u));return n}(),f=null,s=c=0,l=o.length;c<l;s=++c)if(a=o[s],null!=(u=this._keys[a])&&null!=(p=u.key)?p.can_perform(e):void 0){h=s,f=this._kms[a];break}return null==f&&(n=new Error("key not found: "+JSON.stringify(o))),f?f.fetch(t,e,r):r(n,f,h)},e.prototype.find_best_key=function(t,e){var r,n,o,s,a,u;return s=t.key_id,n=t.flags,null==(u=this._kms[a=i(s)])?r=new Error("Could not find key for fingerprint "+a):null==(o=u.find_best_pgp_key(n))&&(r=new Error("no matching key for flags: "+n)),e(r,o)},e.prototype.lookup=function(t){return this._keys[i(t)]},e}(t),e.PgpKeyRing=n,e.KeyRing=n}).call(this)},function(t,e,r){(function(e){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P,I={}.hasOwnProperty,T=function(t,e){for(var r in e)I.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},U=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1};M=r(36),D=function(){},l=(R=r(545)).SignatureEngineInterface,f=R.KeyManagerInterface,S=r(73).make_esc,v=r(453),(P=r(56)).athrow,g=P.bufferify,y=P.base64u,P.buffer_xor,m=P.asyncify,p=P.akatch,x=r(41),d=r(1357).alloc,h=r(540).Signature,a=r(814).Encryption,o=r(454).EdDSA,w=r(449).errors,i=r(542).DH,x.kb,n=x.openpgp,u=function(t){function r(t){this.key=t.key,this.server_half=t.server_half}return T(r,t),r.generate=function(t,e){var n,i,s,a,u,f,h,c,l;c=M.findDeferral(arguments),n=t.algo,u=t.seed,h=t.split,f=t.server_half,a=t.klass,n||(n=o),a||(a=r),function(t){l=new M.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.generate"}),n.generate({split:h,seed:u,server_half:f},l.defer({assign_fn:function(){return i=arguments[0],s=arguments[1],f=arguments[2]},lineno:30})),l._fulfill()}((function(){return e(i,new a({key:s,server_half:f}))}))},r.prototype.get_mask=function(){return n.key_flags.sign_data|n.key_flags.certify_keys|n.key_flags.auth},r.prototype.fetch=function(t,e,r){var n,i,o,s;return s=this.key.ekid().toString("hex"),i=null,o=this.get_mask(),U.call(t,s)>=0&&(e&o)===e?i=this.key:n=new Error("Key not found"),r(n,i)},r.prototype.get_keypair=function(){return this.key},r.prototype.get_primary_keypair=function(){return this.key},r.prototype.can_verify=function(){return!0},r.prototype.can_sign=function(){var t;return null!=(t=this.key)?t.can_sign():void 0},r.prototype.eq=function(t){return this.key.eq(t.key)},r.import_private=function(t,n){var i,s,a,u,f,h,c;if(D,h=M.findDeferral(arguments),s=t.hex,u=t.raw,i=f=null,null!=s)try{u=e.from(s,"hex")}catch(t){return n(t)}!function(t){c=new M.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.import_private"}),o.import_private({raw:u},c.defer({assign_fn:function(){return i=arguments[0],a=arguments[1]},lineno:69})),c._fulfill()}((function(){return null==i&&(f=new r({key:a})),n(i,f)}))},r.import_public=function(t,n){var i,a,u,f,h,c,l,p;if(D,c=M.findDeferral(arguments),a=t.hex,f=t.raw,i=h=null,null!=a)try{f=e.from(a,"hex")}catch(t){return n(t)}p=o.parse_kb(f),i=p[0],u=p[1],function(t){if(null==i)return t(h=new r({key:u}));!function(t){l=new M.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.import_public"}),s.import_public({raw:f},l.defer({assign_fn:function(){return i=arguments[0],h=arguments[1]},lineno:84})),l._fulfill()}(t)}((function(){return n(i,h)}))},r.prototype.check_public_eq=function(t){return this.eq(t)},r.prototype.export_public=function(t,e){return t.asp,t.regen,e(null,this.key.ekid().toString("hex"))},r.prototype.export_private=function(t,e){var r,n,i,o,s,a;o=M.findDeferral(arguments),t.asp,n=t.p3skb,t.passphrase,r=i=null,(a=this,function(t){if(n)return t(r=new Error("No support yet for P3SKB encrypted secret key exports"));!function(t){s=new M.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"KeyManager.export_private"}),a.key.export_secret_key_kb({},s.defer({assign_fn:function(){return r=arguments[0],i=arguments[1]},lineno:106})),s._fulfill()}(t)})((function(){return e(r,i)}))},r.prototype.export_server_half=function(){var t;return null!=(t=this.server_half)?t.toString("hex"):void 0},r.prototype.get_ekid=function(){return this.get_keypair().ekid()},r.prototype.get_fp2=function(){return this.get_ekid()},r.prototype.get_fp2_formatted=function(){return y.encode(this.get_fp2())},r.prototype.get_type=function(){return"kb"},r.prototype.make_sig_eng=function(){return new c({km:this})},r.prototype.verify_raw=function(t,e){var r,n,i,o;return i=t.sig,r=t.payload,n=t.prefix,new h({key:null!=(o=this.key)?o.ekid():void 0,payload:r,prefix:n,sig:i,detached:!0}).verify(e)},r}(f),s=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return T(r,t),r.generate=function(t,e){return t.algo=i,t.klass=r,u.generate(t,e)},r.prototype.make_sig_eng=function(){return null},r.prototype.can_sign=function(){return!1},r.prototype.can_verify=function(){return!1},r.prototype.can_encrypt=function(){return!0},r.prototype.can_decrypt=function(){var t;return null!=(null!=(t=this.key)?t.priv:void 0)},r.import_private=function(t,n){var i,o,s,a,u,f;if(D,u=M.findDeferral(arguments),o=t.hex,a=t.raw,i=null,null!=o)try{a=e.from(o,"hex")}catch(t){return n(t)}!function(t){f=new M.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"EncKeyManager.import_private"}),r.generate({seed:a},f.defer({assign_fn:function(){return i=arguments[0],s=arguments[1]},lineno:158})),f._fulfill()}((function(){return n(i,s)}))},r.prototype.get_mask=function(){return n.key_flags.encrypt_comm|n.key_flags.encrypt_storage},r.import_public=function(t,n){var o,s,a,u,f,h;if(s=t.hex,u=t.raw,f=null,null!=s)try{u=e.from(s,"hex")}catch(t){return n(t)}return o=(h=i.parse_kb(u))[0],a=h[1],null==o&&(f=new r({key:a})),n(o,f)},r}(u),A=function(t){var r,n,i,o,s;if(r=t.armored,n=t.binary,i=t.rawobj,o=t.require_packet_hash,null,null==r&&null==i&&null==n)return[new Error("need either 'armored' or 'binary' or 'rawobj'"),null];if(null!=r&&(n=e.from(r,"base64")),null!=n)try{i=v.unseal(n,{strict:o})}catch(t){return[t,null]}return[(s=d(i))[0],s[1],n]},E=function(t,e){var r,n,i,o,s,a,f,h,c,l,p;l=M.findDeferral(arguments),r=t.armored,n=t.binary,f=t.rawobj,i=t.encrypt_for,a=t.prefix,h=t.require_packet_hash,o=S(e,"unbox"),function(t){p=new M.Deferrals(t,{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),m(A({armored:r,binary:n,rawobj:f,require_packet_hash:h}),o(p.defer({assign_fn:function(){return s=arguments[0],n=arguments[1]},lineno:201}))),p._fulfill()}((function(){null!=a&&(s.prefix=a),p=new M.Deferrals((function(){return null!=c.keypair&&(c.km=new u({key:c.keypair})),null!=c.sender_keypair&&(c.sender_km=new u({key:c.sender_keypair})),null!=c.receiver_keypair&&(c.receiver_km=new u({key:c.receiver_keypair})),e(null,c,n)}),{parent:l,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),s.unbox({encrypt_for:i},o(p.defer({assign_fn:function(){return c=arguments[0]},lineno:203}))),p._fulfill()}))},_=function(t,e){var r,n,i,o,s,u,f,c,l,p,d,m,y,_;y=M.findDeferral(arguments),u=t.msg,m=t.sign_with,o=t.encrypt_for,r=t.anonymous,f=t.nonce,p=t.prefix,i=t.dohash,s=S(e,"box"),u=g(u),function(t){null!=o?function(t){_=new M.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),a.box({sign_with:m,encrypt_for:o,plaintext:u,anonymous:r,nonce:f},s(_.defer({assign_fn:function(){return l=arguments[0]},lineno:220}))),_._fulfill()}(t):function(t){_=new M.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),h.box({km:m,payload:u,prefix:p},s(_.defer({assign_fn:function(){return l=arguments[0]},lineno:222}))),_._fulfill()}(t)}((function(){return c=l.frame_packet(),i||(i=!1),d=v.seal({obj:c,dohash:i}),n=d.toString("base64"),e(null,n,d,l.sig)}))},B=function(t,e){var r,n,i,o,s,a,f,h,c,l;c=M.findDeferral(arguments),r=t.armored,n=t.binary,s=t.kid,f=t.require_packet_hash,o=S(e),i=null,function(t){l=new M.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),u.import_public({hex:s},o(l.defer({assign_fn:function(){return a=arguments[0]},lineno:234}))),l._fulfill()}((function(){l=new M.Deferrals((function(){return h.km.check_public_eq(a)||(i=new w.WrongSigningKeyError("Got wrong signing key")),e(i,h.payload)}),{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced"}),E({armored:r,binary:n,require_packet_hash:f},o(l.defer({assign_fn:function(){return h=arguments[0]},lineno:235}))),l._fulfill()}))},k=function(t){var e,r,n;return e=t.armored,[(n=b({armored:e}))[0],null!=(r=n[1])?r.body:void 0]},b=function(t){var r;return r=t.armored,[null,{body:e.from(r,"base64"),type:n.message_types.generic,payload:r}]},c=function(t){function r(t){this.km=t.km}return T(r,t),r.prototype.get_km=function(){return this.km},r.prototype.get_unverified_payload_from_raw_sig_body=function(t,e){var r,n,i,o,s,a,u;a=M.findDeferral(arguments),r=t.body,s=t.require_packet_hash,n=S(e,"get_payload_from_raw_sig_body"),function(t){u=new M.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.get_unverified_payload_from_raw_sig_body"}),p((function(){return v.unseal(r,{strict:s})}),n(u.defer({assign_fn:function(){return o=arguments[0]},lineno:269}))),u._fulfill()}((function(){u=new M.Deferrals((function(){return e(null,i.payload)}),{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.get_unverified_payload_from_raw_sig_body"}),m(d(o),n(u.defer({assign_fn:function(){return i=arguments[0]},lineno:270}))),u._fulfill()}))},r.prototype.get_body=function(t,e){var r;return e((r=k(t))[0],r[1])},r.prototype.box=function(t,e,r){var n,i,o,s,a,u,f,h,c,l;f=M.findDeferral(arguments),s=(c=null!=r?r:{}).prefix,i=c.dohash,o=S(e,"SignatureEngine::box"),(l=this,function(e){h=new M.Deferrals(e,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.box"}),_({msg:t,prefix:s,sign_with:l.km,dohash:i},o(h.defer({assign_fn:function(){return n=arguments[0],a=arguments[1],u=arguments[2]},lineno:283}))),h._fulfill()})((function(){return e(null,{type:"kb",armored:n,kb:n,raw:a,sig:u})}))},r.prototype.unbox=function(t,r,n){var i,o,s,a,u,f,h,c,l;h=M.findDeferral(arguments),null==n&&(n={}),a=S(r,"SignatureEngine::unbox"),s=u=null,(i=e.isBuffer(t)?{binary:t}:{armored:t}).prefix=n.prefix,i.require_packet_hash=n.require_packet_hash,function(t){c=new M.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/hilev.iced",funcname:"SignatureEngine.unbox"}),E(i,a(c.defer({assign_fn:function(){return f=arguments[0],o=arguments[1]},lineno:296}))),c._fulfill()}((l=this,function(){return f.km.eq(l.km)?u=f.payload:(f.km.get_ekid().toString("hex"),l.km.get_ekid().toString("hex"),s=new w.WrongSigningKeyError("Got wrong signing key")),r(s,u,o)}))},r}(l),t.exports={box:_,unbox:E,unbox_decode:A,KeyManager:u,EncKeyManager:s,decode_sig:b,get_sig_body:k,encode:v,verify:B}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;s=r(36),a=r(41),n=a.kb,a.openpgp,i=r(539).Packet,u=r(73).make_esc,o=r(541).dh,t=function(t){function e(t){this.encrypt_for=t.encrypt_for,this.sign_with=t.sign_with,this.plaintext=t.plaintext,this.ciphertext=t.ciphertext,this.sender_key=t.sender_key,this.nonce=t.nonce,this.anonymous=t.anonymous,e.__super__.constructor.call(this),this.ephemeral=!1}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.ENC_TYPE=n.public_key_algorithms.NACL_DH,e.tag=function(){return n.packet_tags.encryption},e.prototype.tag=function(){return e.tag()},e.prototype.get_packet_body=function(){var t;return t=e.ENC_TYPE,{sender_key:this.sender_key,ciphertext:this.ciphertext,nonce:this.nonce,enc_type:t,receiver_key:this.receiver_key}},e.alloc=function(t){var r,n,i,o,s,a;if(a=t.tag,i=t.body,s=null,null!=(o=a!==e.tag()?new Error("wrong tag found: "+a):(r=i.enc_type)!==(n=e.ENC_TYPE)?o=new Error("Expected Curve25519 DH (type "+n+"); got "+r):(s=new e(i),null)))throw o;return s},e.prototype.is_signature=function(){return!1},e.prototype.get_sender_keypair=function(t,e){var r,n,i,a,u,f,h;u=s.findDeferral(arguments),a=t.sign_with,r=t.encrypt,n=i=null,(h=this,function(t){if(null!=a)return t(i=a.get_keypair());!function(t){if(null!=h.sign_with)return t(i=h.sign_with.get_keypair());!function(t){if(null!=h.sender_keypair)return t(i=h.sender_keypair);!function(t){var e;if(!r)return t(null!=h.sender_key?(e=o.Pair.parse_kb(h.sender_key),n=e[0],h.sender_keypair=e[1],null==n?i=h.sender_keypair:void 0):n=new Error("Cannot encrypt without a sender keypair"));!function(t){var e;f=new s.Deferrals(t,{parent:u,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.get_sender_keypair"}),o.Pair.generate({},f.defer({assign_fn:(e=h,function(){return n=arguments[0],e.sender_keypair=arguments[1]}),lineno:56})),f._fulfill()}((function(){return i=h.sender_keypair,t(h.ephemeral=!0)}))}(t)}(t)}(t)})((function(){return e(n,i)}))},e.prototype.encrypt=function(t,e){var r,n,i,o,a,f;o=s.findDeferral(arguments),r=u(e,"encrypt"),(f=this,function(t){a=new s.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.encrypt"}),f.get_sender_keypair({encrypt:!0},r(a.defer({assign_fn:function(){return i=arguments[0]},lineno:71}))),a._fulfill()})(function(t){return function(){var u,f;n=t.encrypt_for.get_keypair(),a=new s.Deferrals((function(){return t.anonymous&&!t.ephemeral||(t.sender_key=i.ekid()),t.anonymous||(t.receiver_key=n.ekid()),e(null)}),{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.encrypt"}),n.encrypt_kb({plaintext:t.plaintext,sender:i,nonce:t.nonce},r(a.defer({assign_fn:(u=t,f=t,function(){return u.ciphertext=arguments[0].ciphertext,f.nonce=arguments[0].nonce}),lineno:73}))),a._fulfill()}}(this))},e.prototype.decrypt=function(t,e){var r,n,i,o,a,f,h,c,l;h=s.findDeferral(arguments),f=t.sign_with,n=t.encrypt_for,i=u(e,"decrypt"),(l=this,function(t){c=new s.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.decrypt"}),l.get_sender_keypair({sign_with:f},i(c.defer({assign_fn:function(){return a=arguments[0]},lineno:82}))),c._fulfill()})(function(t){return function(){var u;r={ciphertext:t.ciphertext,nonce:t.nonce,sender:a},o=n.get_keypair(),c=new s.Deferrals((function(){return e(null,{sender_keypair:a,plaintext:t.plaintext,receiver_keypair:o})}),{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.decrypt"}),o.decrypt_kb(r,i(c.defer({assign_fn:(u=t,function(){return u.plaintext=arguments[0]}),lineno:85}))),c._fulfill()}}(this))},e.prototype.unbox=function(t,e){var r,n,i,o,a,u;o=s.findDeferral(arguments),r=t.encrypt_for,(u=this,function(t){a=new s.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.unbox"}),u.decrypt({encrypt_for:r},a.defer({assign_fn:function(){return n=arguments[0],i=arguments[1]},lineno:91})),a._fulfill()})((function(){return e(n,i)}))},e.box=function(t,r){var n,i,o,a,u,f,h,c,l;c=s.findDeferral(arguments),h=t.sign_with,i=t.encrypt_for,f=t.plaintext,n=t.anonymous,a=t.nonce,u=new e({sign_with:h,encrypt_for:i,plaintext:f,anonymous:n,nonce:a}),function(t){l=new s.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/packet/encryption.iced",funcname:"Encryption.box"}),u.encrypt({},l.defer({assign_fn:function(){return o=arguments[0]},lineno:98})),l._fulfill()}((function(){return null!=o&&(u=null),r(o,u)}))},e}(i),e.Encryption=t}).call(this)},function(t,e,r){(function(){var t,n,i,o,s;t=r(36),o=r(784),s=r(543),i=r(813),e.import_armored_public=function(e,r){var n,s,a,u,f,h,c,l;c=t.findDeferral(arguments),n=e.armored,s=e.asp,u=e.opts,h=null,function(e){n.match(/^-{5}BEGIN PGP PUBLIC KEY BLOCK-{5}/)?function(e){l=new t.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/ukm.iced",funcname:"import_armored_public"}),o.KeyManager.import_from_armored_pgp({armored:n,asp:s,opts:u},l.defer({assign_fn:function(){return a=arguments[0],f=arguments[1],h=arguments[2]},lineno:12})),l._fulfill()}(e):function(e){l=new t.Deferrals(e,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/ukm.iced",funcname:"import_armored_public"}),i.KeyManager.import_public({hex:n},l.defer({assign_fn:function(){return a=arguments[0],f=arguments[1]},lineno:14})),l._fulfill()}(e)}((function(){return r(a,f,h)}))},n=function(t){return t.match(/^-{5}BEGIN PGP MESSAGE-{5}/)},e.decode_sig=function(t){var e;return e=t.armored,n(e)?s.decode_sig({armored:e}):i.decode_sig({armored:e})},e.get_sig_body=function(t){var e;return e=t.armored,n(e)?s.get_sig_body({armored:e}):i.get_sig_body({armored:e})}}).call(this)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){(function(){var t,n,i,o,s,a=[].slice;t=r(523),e.iced=n=r(785),s=function(t,e,r,i){var o,s,u,f,h,c;h=n.findDeferral(arguments),s=new n.Rendezvous,i[0]=s.id(!0).defer({assign_fn:function(){return o=a.call(arguments,0)},lineno:20,context:c}),u=setTimeout(s.id(!1).defer({lineno:21,context:c}),e),function(t){c=new n.Deferrals(t,{parent:h,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced"}),s.wait(c.defer({assign_fn:function(){return f=arguments[0]},lineno:22})),c._fulfill()}((function(){return r&&(r[0]=f),f&&clearTimeout(u),t.apply(null,o)}))},e.timeout=function(t,e,r){var n;return s(t,e,r,n=[]),n[0]},i=function(t,e,r){var i,o,s;o=n.findDeferral(arguments),function(t){s=new n.Deferrals(t,{parent:o,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced"}),r[0]=s.defer({assign_fn:function(){return i=arguments[0]},lineno:40}),s._fulfill()}((function(){return i||(e[0]=!1),t()}))},e.iand=function(t,e){var r;return i(t,e,r=[]),r[0]},o=function(t,e,r){var i,o,s;o=n.findDeferral(arguments),function(t){s=new n.Deferrals(t,{parent:o,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced"}),r[0]=s.defer({assign_fn:function(){return i=arguments[0]},lineno:59}),s._fulfill()}((function(){return i&&(e[0]=!0),t()}))},e.ior=function(t,e){var r;return o(t,e,r=[]),r[0]},e.Pipeliner=function(){function e(e,r){this.window=e||1,this.delay=r||0,this.queue=[],this.n_out=0,this.cb=null,this[t.deferrals]=this,this.defer=this._defer}return e.prototype.waitInQueue=function(t){var e,r,i;e=n.findDeferral(arguments),(i=this,function(t){var o;(o=function(t){var s,a;if(s=t,a=function(){return n.trampoline((function(){return o(t)}))},!(i.n_out>=i.window))return s();!function(t){r=new n.Deferrals(t,{parent:e,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced",funcname:"Pipeliner.waitInQueue"}),i.cb=r.defer({lineno:101}),r._fulfill()}(a)})(t)})(function(i){return function(){i.n_out++,function(t){if(!i.delay)return t();!function(t){r=new n.Deferrals(t,{parent:e,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced",funcname:"Pipeliner.waitInQueue"}),setTimeout(r.defer({lineno:109}),i.delay),r._fulfill()}(t)}((function(){return t()}))}}(this))},e.prototype.__defer=function(t,e){var r,i,o,s,u;o=n.findDeferral(arguments),function(r){s=new n.Deferrals(r,{parent:o,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced",funcname:"Pipeliner.__defer"}),i=s.defer({lineno:123}),t[0]=function(){var t,r;return t=1<=arguments.length?a.call(arguments,0):[],null!=(r=e.assign_fn)&&r.apply(null,t),i()},s._fulfill()}((u=this,function(){if(u.n_out--,u.cb)return r=u.cb,u.cb=null,r()}))},e.prototype._defer=function(t){var e;return e=[],this.__defer(e,t),e[0]},e.prototype.flush=function(t){var e,r,i,o,s;r=t,e=n.findDeferral(arguments),o=this,(i=function(t){var r,a;if(r=t,a=function(){return n.trampoline((function(){return i(t)}))},!o.n_out)return r();!function(t){s=new n.Deferrals(t,{parent:e,filename:"/Users/max/src/iced/iced-coffee-script/iced-runtime/src/library.iced",funcname:"Pipeliner.flush"}),o.cb=s.defer({lineno:152}),s._fulfill()}(a)})(r)},e}()}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w;f=r(36),v=r(348),p=v.nbv,v.nbi,i=v.BigInteger,r(101).prng.native_rng,_=r(1330).small_primes,h=r(73).make_esc,t=r(56).ASP,l=r(140).nbs,w=r(112),o=w.MRF,a=w.SRF,function(){function t(){this.start=Date.now()}t.prototype.stop=function(){return Date.now()-this.start}}(),n=function(){function t(){this.tot=0,this.n=0}return t.prototype.start=function(){return this._t=Date.now()},t.prototype.stop=function(){var t;return t=Date.now()-this._t,console.log("ran in "+t),this.tot+=t,this.n++},t.prototype.avg=function(){return this.tot/this.n},t}(),m=function(t,e){return t.modInt(e)},new n,u=function(t){var e,r,n,i,o;for(i=p(1),r=t.bitLength(),r--,e=t.byteLength(),n=o=r;r<=0?o<=0:o>=0;n=r<=0?++o:--o)(i=i.square()).byteLength()>e&&(i=i.mod(t)),t.testBit(n)&&(i=i.shiftLeft(1));return i.compareTo(t)>0&&(i=i.mod(t)),0===i.compareTo(p(2))},g=function(t){var e,r,n,s,a,u,f,h;if(a=t.s,s=t.r,r=t.p,n=t.p1,0!==(u=o().random_zn(r).modPow(s,r)).compareTo(i.ONE))for(e=f=h=a-1;h<=0?f<=0:f>=0;e=h<=0?++f:--f)if(0!==u.compareTo(n)){if(0===e)return!1;if(0===(u=u.square().mod(r)).compareTo(i.ONE))return!1}return!0},b=function(t){var e,r;return!((e=t.p).compareTo(i.ZERO)<=0)&&(e.compareTo(p(7))<=0?2===(r=e.intValue())||3===r||5===r||7===r:!!e.testBit(0))},c=function(e,r){var n,o,s,a,u,c,l,p,d,m,y;m=f.findDeferral(arguments),u=e.p,a=e.iter,(n=e.asp)||(n=new t({})),a||(a=10),o=h(r,"miller_rabin"),p=b({p:u}),function(t){if(!p)return t();c=u.subtract(i.ONE),d=c.getLowestSetBit(),l=c.shiftRight(d),p=!0,function(t){var e,r,i,h;s=0,i=(e=a)>0?1:-1,r=e>0,(h=function(t){var e,_;if(e=t,_=function(){return f.trampoline((function(){return s+=i,h(t)}))},!0===r&&s>=a||!1===r&&s<=a)return e();y=new f.Deferrals((function(){!function(t){if(g({s:d,r:l,p:u,p1:c}))return t();p=!1,e()}(_)}),{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),n.progress({what:"mr",i:s,total:a,p:u},o(y.defer({lineno:122}))),y._fulfill()})(t)}((function(){!function(t){y=new f.Deferrals(t,{parent:m,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),n.progress({what:"mr",i:a,total:a,p:u},o(y.defer({lineno:127}))),y._fulfill()}(t)}))}((function(){return r(null,p)}))},s=function(){function t(t,e){this.p=t,this.sieve=e,this.inc=0,this.maxinc=-1,this.sievepos=m(this.p,this.sieve.length),this.calcmods()}return t.prototype.getp=function(){return this.p},t.prototype.setmax=function(t){if(-1!==this.maxinc)throw new Error("can only setmax() once");return this.maxinc=t},t.prototype.calcmods=function(){var t;return this.p=this.p.add(p(this.inc)),-1!==this.maxinc&&(this.maxinc-=this.inc),this.inc=0,this.mods=function(){var e,r,n;for(n=[],e=0,r=_.length;e<r;e++)t=_[e],n.push(m(this.p,t));return n}.call(this)},t.prototype.decrement_mods_find_divisor=function(){var t,e,r,n;for(t=r=0,n=_.length;r<n;t=++r)for(e=_[t];this.mods[t]+this.inc>=e;)if(this.mods[t]-=e,this.mods[t]+this.inc===0)return!0;return!1},t.prototype.next_weak=function(){for(var t;;){if(t=this.sieve[this.sievepos],this.sievepos=(this.sievepos+t)%this.sieve.length,this.inc+=t,this.inc>this.maxinc&&this.maxinc>0)return this.tmp=p(0),this.tmp;if(this.inc<0&&this.calcmods(),!this.decrement_mods_find_divisor())return this.tmp=this.p.add(p(this.inc)),this.tmp}},t.prototype.next_fermat=function(){for(;;)if(this.next_weak(),!this.tmp||u(this.tmp))return this.tmp},t.prototype.next_strong=function(t){for(null==t&&(t=32);;)if(this.next_weak(),!this.tmp||u(this.tmp)&&probab_prime(this.tmp,t))return this.tmp},t}(),d=function(t,e){var r,n,a,l,d,m,y,_,g,b,v,w,k,M,x,S;x=f.findDeferral(arguments),k=t.start,b=t.range,w=t.sieve,r=t.asp,(d=t.iters)||(d=20),(y=new s(k,w)).setmax(b),g=function(){var t;for(t=[];(_=y.next_weak()).compareTo(i.ZERO)>0;)t.push(_);return t}(),n=h(e,"prime_search"),v=null,function(t){var e;(e=function(t){var i,s;if(i=t,s=function(){return f.trampoline((function(){return e(t)}))},!g.length||null!=v)return i();a=o().random_word()%g.length,m=g[a],S=new f.Deferrals((function(){!function(t){if(!u(m))return t();!function(t){S=new f.Deferrals(t,{parent:x,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),c({p:m,iters:d,asp:r},n(S.defer({assign_fn:function(){return l=arguments[0]},lineno:229}))),S._fulfill()}((function(){!function(t){S=new f.Deferrals(t,{parent:x,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),r.progress({what:"passed_mr",p:m},n(S.defer({lineno:230}))),S._fulfill()}((function(){return t(l?v=m:r.progress({what:"failed_mr",p:m}))}))}))}((function(){return M=g.pop(),s(a<g.length?g[a]=M:void 0)}))}),{parent:x,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),r.progress({what:"fermat",p:m},n(S.defer({lineno:226}))),S._fulfill()})(t)}((function(){return null==v&&(v=p(0)),e(null,v)}))},y=function(t,e){var r,n,o,s,u,c,l,p,m,y,_;y=f.findDeferral(arguments),c=t.nbits,u=t.iters,r=t.asp,n=t.e,m=[1,2],s=!0,o=h(e,"random_prime"),p=c,l=null,function(t){var e;(e=function(t){var h;if(h=function(){return f.trampoline((function(){return e(t)}))},!s)return t();_=new f.Deferrals((function(){l=l.setBit(0).setBit(c-1).setBit(c-2),function(t){null==n||0===l.subtract(i.ONE).gcd(n).compareTo(i.ONE)?function(t){_=new f.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),r.progress({what:"guess",p:l},o(_.defer({lineno:265}))),_._fulfill()}((function(){!function(t){_=new f.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),d({start:l,range:p,sieve:m,asp:r,iters:u},o(_.defer({assign_fn:function(){return l=arguments[0]},lineno:266}))),_._fulfill()}((function(){return t(s=null==l||0===l.compareTo(i.ZERO))}))})):t()}(h)}),{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),a().random_nbit(c,_.defer({assign_fn:function(){return l=arguments[0]},lineno:262})),_._fulfill()})(t)}((function(){_=new f.Deferrals((function(){return e(null,l)}),{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/primegen.iced"}),r.progress({what:"found",p:l},o(_.defer({lineno:269}))),_._fulfill()}))},e.naive_is_prime=function(t){var e,r,n,i;for(e=Math.floor(Math.sqrt(t)),n=0,i=_.length;n<i;n++){if((r=_[n])>e)return!0;if(t%r==0)return!1}return!1},e.fermat2_test=u,e.nbs=l,e.small_primes=_,e.miller_rabin=c,e.random_prime=y}).call(this)},function(t,e){function r(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}r.keys=function(){return[]},r.resolve=r,t.exports=r,r.id=1317},function(t,e,r){(function(e){!function(){function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function n(){return new r(null)}r.prototype.am=function(t,e,r,n,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this[t],f=this[t++]>>14,h=a*u+f*s;i=((u=s*u+((16383&h)<<14)+r[n]+i)>>28)+(h>>14)+a*f,r[n++]=268435455&u}return i},r.prototype.DB=28,r.prototype.DM=268435455,r.prototype.DV=1<<28;r.prototype.FV=Math.pow(2,52),r.prototype.F1=24,r.prototype.F2=4;var i,o,s=new Array;for(i="0".charCodeAt(0),o=0;o<=9;++o)s[i++]=o;for(i="a".charCodeAt(0),o=10;o<36;++o)s[i++]=o;for(i="A".charCodeAt(0),o=10;o<36;++o)s[i++]=o;function a(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function u(t,e){var r=s[t.charCodeAt(e)];return null==r?-1:r}function f(t){var e=n();return e.fromInt(t),e}function h(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function c(t){this.m=t}function l(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function p(t,e){return t&e}function d(t,e){return t|e}function m(t,e){return t^e}function y(t,e){return t&~e}function _(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function g(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function b(){}function v(t){return t}function w(t){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}c.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},c.prototype.revert=function(t){return t},c.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},c.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},c.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},l.prototype.convert=function(t){var e=n();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(r.ZERO)>0&&this.m.subTo(e,e),e},l.prototype.revert=function(t){var e=n();return t.copyTo(e),this.reduce(e),e},l.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},l.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},l.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e,n){var i;if(16==e)i=4;else if(8==e)i=3;else if(256==e)i=8;else if(2==e)i=1;else if(32==e)i=5;else{if(4!=e)return this.fromRadix(t,e),this;i=2}this.t=0,this.s=0;for(var o=t.length,s=!1,a=0;--o>=0;){var f=8==i?255&t[o]:u(t,o);f<0?"-"==t.charAt(o)&&(s=!0):(s=!1,0==a?this[this.t++]=f:a+i>this.DB?(this[this.t-1]|=(f&(1<<this.DB-a)-1)<<a,this[this.t++]=f>>this.DB-a):this[this.t-1]|=f<<a,(a+=i)>=this.DB&&(a-=this.DB))}return n||8!=i||0==(128&t[0])||(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),s&&r.ZERO.subTo(this,this),this},r.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},r.prototype.lShiftTo=function(t,e){var r,n=t%this.DB,i=this.DB-n,o=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<<n;for(r=s-1;r>=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<<n)-1;e[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)e[s-r-1]|=(this[s]&o)<<i,e[s-r]=this[s]>>n;n>0&&(e[this.t-r-1]|=(this.s&o)<<i),e.t=this.t-r,e.clamp()}},r.prototype.subTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},r.prototype.multiplyTo=function(t,e){var n=this.abs(),i=t.abs(),o=n.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+n.t]=n.am(0,i[o],e,o,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&r.ZERO.subTo(e,e)},r.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,i){var o=t.abs();if(!(o.t<=0)){var s=this.abs();if(s.t<o.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=n());var a=n(),u=this.s,f=t.s,c=this.DB-h(o[o.t-1]);c>0?(o.lShiftTo(c,a),s.lShiftTo(c,i)):(o.copyTo(a),s.copyTo(i));var l=a.t,p=a[l-1];if(0!=p){var d=p*(1<<this.F1)+(l>1?a[l-2]>>this.F2:0),m=this.FV/d,y=(1<<this.F1)/d,_=1<<this.F2,g=i.t,b=g-l,v=null==e?n():e;for(a.dlShiftTo(b,v),i.compareTo(v)>=0&&(i[i.t++]=1,i.subTo(v,i)),r.ONE.dlShiftTo(l,v),v.subTo(a,a);a.t<l;)a[a.t++]=0;for(;--b>=0;){var w=i[--g]==p?this.DM:Math.floor(i[g]*m+(i[g-1]+_)*y);if((i[g]+=a.am(0,w,i,b,0,l))<w)for(a.dlShiftTo(b,v),i.subTo(v,i);i[g]<--w;)i.subTo(v,i)}null!=e&&(i.drShiftTo(l,e),u!=f&&r.ZERO.subTo(e,e)),i.t=l,i.clamp(),c>0&&i.rShiftTo(c,i),u<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var i=n(),o=n(),s=e.convert(this),a=h(t)-1;for(s.copyTo(i);--a>=0;)if(e.sqrTo(i,o),(t&1<<a)>0)e.mulTo(o,s,i);else{var u=i;i=o,o=u}return e.revert(i)},r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,i=!1,o="",s=this.t,u=this.DB-s*this.DB%e;if(s-- >0)for(u<this.DB&&(r=this[s]>>u)>0&&(i=!0,o=a(r));s>=0;)u<e?(r=(this[s]&(1<<u)-1)<<e-u,r|=this[--s]>>(u+=this.DB-e)):(r=this[s]>>(u-=e)&n,u<=0&&(u+=this.DB,--s)),r>0&&(i=!0),i&&(o+=a(r));return i?o:"0"},r.prototype.negate=function(){var t=n();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=n();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new c(e):new l(e),this.exp(t,r)},r.ZERO=f(0),r.ONE=f(1),b.prototype.convert=v,b.prototype.revert=v,b.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},b.prototype.sqrTo=function(t,e){t.squareTo(e)},w.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=n();return t.copyTo(e),this.reduce(e),e},w.prototype.revert=function(t){return t},w.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},w.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},w.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var k=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],M=(1<<26)/k[k.length-1];function h(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=f(r),o=n(),s=n(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a},r.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),i=Math.pow(e,n),o=!1,s=0,a=0,f=0;f<t.length;++f){var h=u(t,f);h<0?"-"==t.charAt(f)&&0==this.signum()&&(o=!0):(a=e*a+h,++s>=n&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),d,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},r.prototype.bitwiseTo=function(t,e,r){var n,i,o=Math.min(t.t,this.t);for(n=0;n<o;++n)r[n]=e(this[n],t[n]);if(t.t<this.t){for(i=t.s&this.DM,n=o;n<this.t;++n)r[n]=e(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},r.prototype.changeBit=function(t,e){var n=r.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n},r.prototype.addTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},r.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},r.prototype.multiplyUpperTo=function(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)},r.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var o=e.shiftRight(i);(t=t+1>>1)>k.length&&(t=k.length);for(var s=n(),a=0;a<t;++a){s.fromInt(k[Math.floor(Math.random()*k.length)]);var u=s.modPow(o,this);if(0!=u.compareTo(r.ONE)&&0!=u.compareTo(e)){for(var f=1;f++<i&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(r.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},r.prototype.clone=function(){var t=n();return this.copyTo(t),t},r.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},r.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(t){var e=this.t,r=new Array;r[0]=this.s;var n,i=this.DB-e*this.DB%8,o=0;if(e-- >0)for(i<this.DB&&(n=this[e]>>i)!=(this.s&this.DM)>>i&&(r[o++]=n|this.s<<this.DB-i);e>=0;)i<8?(n=(this[e]&(1<<i)-1)<<8-i,n|=this[--e]>>(i+=this.DB-8)):(n=this[e]>>(i-=8)&255,i<=0&&(i+=this.DB,--e)),t&&(0!=(128&n)&&(n|=-256),0==o&&(128&this.s)!=(128&n)&&++o),(o>0||n!=this.s)&&(r[o++]=n);return r},r.prototype.equals=function(t){return 0==this.compareTo(t)},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=n();return this.bitwiseTo(t,p,e),e},r.prototype.or=function(t){var e=n();return this.bitwiseTo(t,d,e),e},r.prototype.xor=function(t){var e=n();return this.bitwiseTo(t,m,e),e},r.prototype.andNot=function(t){var e=n();return this.bitwiseTo(t,y,e),e},r.prototype.not=function(){for(var t=n(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},r.prototype.shiftLeft=function(t){var e=n();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},r.prototype.shiftRight=function(t){var e=n();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},r.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+_(this[t]);return this.s<0?this.t*this.DB:-1},r.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=g(this[r]^e);return t},r.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},r.prototype.setBit=function(t){return this.changeBit(t,d)},r.prototype.clearBit=function(t){return this.changeBit(t,y)},r.prototype.flipBit=function(t){return this.changeBit(t,m)},r.prototype.add=function(t){var e=n();return this.addTo(t,e),e},r.prototype.subtract=function(t){var e=n();return this.subTo(t,e),e},r.prototype.multiply=function(t){var e=n();return this.multiplyTo(t,e),e},r.prototype.divide=function(t){var e=n();return this.divRemTo(t,e,null),e},r.prototype.remainder=function(t){var e=n();return this.divRemTo(t,null,e),e},r.prototype.divideAndRemainder=function(t){var e=n(),r=n();return this.divRemTo(t,e,r),new Array(e,r)},r.prototype.modPow=function(t,e){var r,i,o=t.bitLength(),s=f(1);if(o<=0)return s;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new c(e):e.isEven()?new w(e):new l(e);var a=new Array,u=3,p=r-1,d=(1<<r)-1;if(a[1]=i.convert(this),r>1){var m=n();for(i.sqrTo(a[1],m);u<=d;)a[u]=n(),i.mulTo(m,a[u-2],a[u]),u+=2}var y,_,g=t.t-1,b=!0,v=n();for(o=h(t[g])-1;g>=0;){for(o>=p?y=t[g]>>o-p&d:(y=(t[g]&(1<<o+1)-1)<<p-o,g>0&&(y|=t[g-1]>>this.DB+o-p)),u=r;0==(1&y);)y>>=1,--u;if((o-=u)<0&&(o+=this.DB,--g),b)a[y].copyTo(s),b=!1;else{for(;u>1;)i.sqrTo(s,v),i.sqrTo(v,s),u-=2;u>0?i.sqrTo(s,v):(_=s,s=v,v=_),i.mulTo(v,a[y],s)}for(;g>=0&&0==(t[g]&1<<o);)i.sqrTo(s,v),_=s,s=v,v=_,--o<0&&(o=this.DB-1,--g)}return i.revert(s)},r.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return r.ZERO;for(var n=t.clone(),i=this.clone(),o=f(1),s=f(0),a=f(0),u=f(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);n.compareTo(i)>=0?(n.subTo(i,n),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(n,i),e&&a.subTo(o,a),u.subTo(s,u))}return 0!=i.compareTo(r.ONE)?r.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},r.prototype.pow=function(t){return this.exp(t,new b)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},r.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=k[k.length-1]){for(e=0;e<k.length;++e)if(r[0]==k[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<k.length;){for(var n=k[e],i=e+1;i<k.length&&n<M;)n*=k[i++];for(n=r.modInt(n);e<i;)if(n%k[e++]==0)return!1}return r.millerRabin(t)},r.prototype.toMPI=function(){var t=this.toByteArray(),e=8*(t.length-1)+h(t[0]),r="";return r+=String.fromCharCode((65280&e)>>8),r+=String.fromCharCode(255&e),r+=util.bin2str(t)},r.prototype.square=function(){var t=n();return this.squareTo(t),t},r.prototype.fromBuffer=function(t){return this.fromString(function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++)r[n]=t.readUInt8(n);return r}(t),256,!0),this},r.fromBuffer=function(t){var e=n();return e.fromBuffer(t),e},r.random_nbit=function(t,e){return new r(t,e)},r.prototype.inspect=function(){return"<BigInteger/pure "+this.toString()+">"},r.fromHex=function(t){if(!t.match(/^[a-fA-F0-9]*$/))throw new Error("hex string invalid: "+t);if(t.length%2!=0)throw new Error("got an odd-length hex-string");return new r(t,16)},r.valueOf=function(t){return function(t){return"number"==typeof t?f(t):t}(t)},r.prototype.toBuffer=function(t){var r;t||(t=0);var n=this.signum();r=0==n?[]:this.toByteArray(n<0);var i=e.from(r);if((diff=t-r.length)>0){var o=e.alloc(diff);o.fill(0),i=e.concat([o,i])}return i},r.prototype.byteLength=function(){return this.t},r.prototype.toDERInteger=function(){return this.toByteArray(!0)},r.fromDERInteger=function(t){var e=n();return e.fromString(t,256,!1),e},r.prototype.toByteArrayUnsigned=function(){return new Uint8Array(this.toBuffer())},r.fromByteArrayUnsigned=function(t){return r.fromBuffer(e.from(t))},r.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")},t.exports={BigInteger:r,nbi:n,nbv:f,Montgomery:l,Classic:c,nbits:h}}()}).call(this,r(12).Buffer)},function(t,e,r){(function(e){!function(){var n=r(786).engine,o=n(0),s=n(1);function a(t,r){if(!(this instanceof a))return new a(t,r);if("string"==typeof t)t=t.replace(/\s+/g,""),r||(r=10),this._v=n(t,r);else if("number"==typeof t)this._v=n(t);else if("object"==typeof t&&Array.isArray(t))this._v=n.fromBuffer(e.from(t));else{if(t.constructor!=o.constructor)throw new Error("failed to get valid inner object in constructor");this._v=t}}function u(t){return new a(n(t))}function f(t){return"number"==typeof t?u(t):t}a.prototype.bitLength=function(){return 0==this.signum()?0:this._v.bitLength()},a.prototype.byteLength=function(){return this.bitLength()>>3},a.prototype.modPowInt=function(t,e){return new a(this._v.powm(n(t),e._v))},a.prototype.modInt=function(t){return this._v.mod(n(t)).toNumber()},a.prototype.testBit=function(t){var e=s.shiftLeft(t);return this._v.and(e).eq(o)?0:1},a.prototype.setBit=function(t){var e=n(1).shiftLeft(t);return new a(this._v.or(e))},a.prototype.shiftLeft=function(t){return new a(this._v.shiftLeft(t))},a.prototype.shiftRight=function(t){return new a(this._v.shiftRight(t))},a.prototype.compareTo=function(t){return this._v.cmp(t._v)},a.prototype.modPow=function(t,e){return new a(this._v.powm(t._v,e._v))},a.prototype.square=function(){return new a(this._v.mul(this._v))},a.prototype.mod=function(t){var e=this._v.mod(t._v);return e.cmp(o)<0&&(e=e.add(t._v)),new a(e)},a.prototype.abs=function(){return new a(this._v.abs())},a.prototype.pow=function(t){return new a(this._v.pow(f(t)._v))},a.prototype.intValue=function(){return this._v.toNumber()},a.prototype.signum=function(){var t=this._v.cmp(o);return ret=t>0?1:0===t?0:-1,ret},a.prototype.negate=function(){return new a(this._v.neg())},a.prototype.equals=function(t){return this._v.eq(t._v)},a.prototype.subtract=function(t){return new a(this._v.sub(t._v))},a.prototype.add=function(t){return new a(this._v.add(t._v))},a.prototype.multiply=function(t){return new a(this._v.mul(t._v))},a.prototype.divide=function(t){if(this._v.ge(o)&&t._v.ge(o))i=this._v.div(t._v);else{var e=this.signum()*t.signum();i=this._v.abs().div(t._v.abs()),e<0&&(i=i.neg())}return new a(i)},a.prototype.gcd=function(t){return new a(this._v.gcd(t._v))},a.prototype.fromBuffer=function(t){return new a(n.fromBuffer(t))},a.fromByteArrayUnsigned=function(t){return a.fromBuffer(e.from(t))},a.fromBuffer=function(t){return new a(n.fromBuffer(t))},a.fromDERInteger=function(t){var e;if(0==t.length)e=a.ZERO;else if(0==t[0])e=a.fromBuffer(t);else if(e=a.fromBuffer(t),128&t[0]){var r=a.ONE.shiftLeft(e.bitLength());e=e.subtract(r)}return e},a.prototype.compute_twos_complement=function(){var t=this.add(a.ONE).bitLength(),e=Math.floor(t/8)+1;return a.ONE.shiftLeft(8*e).add(this)},a.prototype.toDERInteger=function(){var t=null,r=this.signum();if(0==r)t=e.from([0]);else if(r<0){t=this.compute_twos_complement().toBuffer()}else{t=this.toBuffer();this.bitLength()%8==0&&(pad=e.from([0]),t=e.concat([pad,t]))}return function(t){for(var e=new Array,r=0;r<t.length;r++)e[r]=t.readUInt8(r);return e}(t)},a.prototype.divideAndRemainder=function(t){return[new a(this._v.div(t._v)),new a(this._v.mod(t._v))]},a.fromString=function(t,e){return new a(256===e?n.fromBuffer(t):n(t,e))},a.prototype.fromString=function(t,e){return a.fromString(t,e)},a.prototype.toByteArray=function(){for(var t=this.toBuffer(),e=t.length,r=new Array(e),n=0;n<e;n++)r[n]=t[n];return r},a.prototype.toByteArrayUnsigned=function(){return new Uint8Array(this.toBuffer())},a.prototype.toBuffer=function(t){var r=null;if(t||(t=0),r=0==this.signum()?e.from([]):this._v.toBuffer(),(diff=t-r.length)>0){var n=e.alloc(diff);n.fill(0),r=e.concat([n,r])}return r},a.prototype.toHex=function(t){var e=this;return this.signum()<0&&(e=this.compute_twos_complement()),e.toBuffer(t).toString("hex")},a.prototype.clone=function(){return new a(n(this._v))},a.prototype.getLowestSetBit=function(){for(var t=this._v.bitLength(),e=-1,r=n(1),i=0;i<t&&e<0;i++)r.and(this._v).eq(o)?r=r.shiftLeft(1):e=i;return e},a.prototype.modInverse=function(t){return new a(this._v.invertm(t._v))},a.prototype.isEven=function(){return n(1).and(this._v).eq(o)},a.random_nbit=function(t,r){var i=Math.ceil(t/8),o=e.alloc(i);r.nextBytes(o);var s=n.fromBuffer(o),u=n(1).shiftLeft(t).sub(n(1));return new a(s=s.and(u))},a.fromHex=function(t){if(!t.match(/^[a-fA-F0-9]*$/))throw new Error("hex string invalid: "+t);if(t.length%2!=0)throw new Error("got an odd-length hex-string");return new a(t,16)},a.prototype.inspect=function(){return"<BigInteger/fast "+this._v.toString()+">"},a.prototype.toString=function(t){t||(t=10);var e=this._v.toString(t);return 0==e.length?e="0":16==t&&e.length>1&&("0"==e[0]?e=e.slice(1):"-0"==e.slice(0,2)&&(e="-"+e.slice(2))),e},a.valueOf=function(t){return f(t)},a.ZERO=u(0),a.ONE=u(1),t.exports={BigInteger:a,nbi:function(){return new a(n(0))},nbv:u,nbits:function(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}}}()}).call(this,r(12).Buffer)},function(t,e,r){(function(){e.Generator=r(1321).Generator}).call(this)},function(t,e,r){(function(){var t,n,i;n=r(36),i=function(){},t=t=function(){function t(t){t=t||{},this.lazy_loop_delay=t.lazy_loop_delay||30,this.loop_delay=t.loop_delay||5,this.work_min=t.work_min||1,this.auto_stop_bits=t.auto_stop_bits||4096,this.max_bits_per_delta=t.max_bits_per_delta||4,this.auto_stop=!t.auto_stop||t.auto_stop,this.entropies=[],this.running=!0,this.is_generating=!1,this.timer_race_loop()}return t.prototype.generate=function(t,e){var r,i,o,s,a,u;s=n.findDeferral(arguments),this.is_generating=!0,this.running||this.resume(),i=0,o=[],(u=this,function(e){var f,h;f=[],(h=function(e){var c,l;if(c=function(){return n.trampoline((function(){return h(e)}))},l=function(t){return f.push(t),c()},!(i<t))return e(f);!function(t){if(u.entropies.length)return r=u.entropies.splice(0,1)[0],i+=r[1],t(o.push(r[0]));!function(t){a=new n.Deferrals(t,{parent:s,filename:"/Users/chris/git/more-entropy/src/generator.iced",funcname:"Generator.generate"}),u.delay(a.defer({lineno:28})),a._fulfill()}(t)}(l)})(e)})(function(t){return function(){return t.auto_stop&&t.stop(),t.is_generating=!1,e(o)}}(this))},t.prototype.stop=function(){return this.running=!1},t.prototype.resume=function(){return this.running=!0,this.timer_race_loop()},t.prototype.reset=function(){return this.entropies=[],this.total_bits=0},t.prototype.count_unused_bits=function(){var t,e,r,n;for(t=0,e=0,r=(n=this.entropies).length;e<r;e++)t+=n[e][1];return t},t.prototype.delay=function(t){var e,r,i;r=n.findDeferral(arguments),e=this.is_generating?this.loop_delay:this.lazy_loop_delay,function(t){i=new n.Deferrals(t,{parent:r,filename:"/Users/chris/git/more-entropy/src/generator.iced",funcname:"Generator.delay"}),setTimeout(i.defer({lineno:50}),e),i._fulfill()}((function(){return t()}))},t.prototype.timer_race_loop=function(){var t,e,r,o,s,a,u,f,h,c;e=i,t=n.findDeferral(arguments),this._last_count=null,r=[],s=this,(o=function(e){var i,l,p;if(i=function(){return e(r)},l=function(){return n.trampoline((function(){return o(e)}))},p=function(t){return r.push(t),l()},!s.running)return i();s.count_unused_bits()<s.auto_stop_bits&&(a=s.millisecond_count(),null!=s._last_count&&(u=a-s._last_count)&&(f=Math.floor(s.log_2(Math.abs(u))),f=Math.min(s.max_bits_per_delta,f),h=[u,f],s.entropies.push(h)),s._last_count=a),function(e){c=new n.Deferrals(e,{parent:t,filename:"/Users/chris/git/more-entropy/src/generator.iced",funcname:"Generator.timer_race_loop"}),s.delay(c.defer({lineno:64})),c._fulfill()}(p)})(e)},t.prototype.log_2=function(t){return Math.log(t)/Math.LN2},t.prototype.millisecond_count=function(){var t,e,r;for(t=Date.now(),e=r=0;Date.now()<t+this.work_min+1;)e++,r=Math.sin(Math.sqrt(Math.log(e+r)));return e},t}(),"undefined"!=typeof window&&null!==window&&(window.Generator=t),null!==e&&(e.Generator=t)}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u;u=r(36),a=r(366),s=r(91).WordArray,o=r(791).Lock,i=function(){function e(t,e,r){this.hmac=r||a.sign,this.security_strength=256,t=this.check_entropy(t),e||(e=new s([])),this._instantiate(t,e)}return e.prototype.check_entropy=function(t,e){if(null==e&&(e=!1),8*t.sigBytes*2<(e?2:3)*this.security_strength)throw new Error("entropy must be at least "+1.5*this.security_strength+" bits.");return t},e.prototype._hmac=function(t,e){return this.hmac({key:t,input:e})},e.prototype._update=function(t){var e,r;return e=new s([0],1),null!=t&&(e=e.concat(t)),r=this.V.clone().concat(e),this.K=this._hmac(this.K,r),r.scrub(),e.scrub(),this.V=this._hmac(this.K,this.V),null!=t&&(r=this.V.clone().concat(new s([1<<24],1)).concat(t),this.K=this._hmac(this.K,r),r.scrub(),this.V=this._hmac(this.K,this.V)),null!=t?t.scrub():void 0},e.prototype._instantiate=function(e,r){var n,i;return i=e.concat(r),n=64,this.K=s.from_buffer(t.from(function(){var t,e;for(e=[],t=0;t<n;++t)e.push(0);return e}())),this.V=s.from_buffer(t.from(function(){var t,e;for(e=[],t=0;t<n;++t)e.push(1);return e}())),this._update(i),e.scrub(),this.reseed_counter=1},e.prototype.reseed=function(t){return this._update(this.check_entropy(t,!0)),this.reseed_counter=1},e.prototype.generate=function(t){var e,r;if(8*t>7500)throw new Error("generate cannot generate > 7500 bits in 1 call.");if(this.reseed_counter>=1e4)throw new Error("Need a reseed!");for(e=[],0;0===e.length||e.length*e[0].length*4<t;)this.V=this._hmac(this.K,this.V),e.push(this.V.words);return this._update(),this.reseed_counter+=1,new s((r=[]).concat.apply(r,e)).truncate(t)},e}(),n=function(){function t(t,e){this.gen_seed=t,this.hmac=e,this.drbg=null,this.lock=new o}return t.prototype.generate=function(t,e){var r,n,o,s,a;o=u.findDeferral(arguments),(a=this,function(t){s=new u.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/triplesec/src/drbg.iced",funcname:"ADRBG.generate"}),a.lock.acquire(s.defer({lineno:145})),s._fulfill()})(function(a){return function(){!function(t){if(null!=a.drbg)return t();!function(t){s=new u.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/triplesec/src/drbg.iced",funcname:"ADRBG.generate"}),a.gen_seed(256,s.defer({assign_fn:function(){return n=arguments[0]},lineno:147})),s._fulfill()}((function(){return t(a.drbg=new i(n,null,a.hmac))}))}((function(){!function(t){if(!(a.drbg.reseed_counter>100))return t();!function(t){s=new u.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/triplesec/src/drbg.iced",funcname:"ADRBG.generate"}),a.gen_seed(256,s.defer({assign_fn:function(){return n=arguments[0]},lineno:150})),s._fulfill()}((function(){return t(a.drbg.reseed(n))}))}((function(){return r=a.drbg.generate(t),a.lock.release(),e(r)}))}))}}(this))},t}(),e.DRBG=i,e.ADRBG=n}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d={}.hasOwnProperty;c=r(36),f=r(91).WordArray,r(415),t=r(524).AES,a=r(525).TwoFish,r(446),i=r(526).Concat,r(367).SHA512,s=r(415).Salsa20,n=(p=r(787)).Base,u=p.V,l=r(73).make_esc,o=function(e){function r(t){var e,n;n=t.key,e=t.enc,r.__super__.constructor.call(this,{key:n}),null!=e&&(this.key=e.key,this.derived_keys=e.derived_keys)}return function(t,e){for(var r in e)d.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.read_header=function(t){var e;return t(null==(e=this.ct.unshift(2))?new Error("Ciphertext underrun in header"):null==(this.version=u[e.words[1]])?new Error("bad header; couldn't find a good version (got "+e.words[1]+")"):e.words[0]!==this.version.header[0]?new Error("Bad header: unrecognized magic value"):null)},r.prototype.verify_sig=function(t,e){var r,n,o,s,a,u;s=c.findDeferral(arguments),(u=this,function(e){if(null==(o=u.ct.unshift(i.get_output_size()/4)))return e(n=new Error("Ciphertext underrun in signature"));!function(e){a=new c.Deferrals(e,{parent:s,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.verify_sig"}),u.sign({input:u.ct,key:t,salt:u.salt},a.defer({assign_fn:function(){return n=arguments[0],r=arguments[1]},lineno:63})),a._fulfill()}((function(){return e(n=null!=n?n:o.equal(r)?null:new Error("Signature mismatch or bad decryption key"))}))})((function(){return e(n)}))},r.prototype.unshift_iv=function(t,e,r){var n;return r(null!=(n=this.ct.unshift(t/4))?null:new Error("Ciphertext underrun in "+e),n)},r.prototype.read_salt=function(t){return t(null==(this.salt=this.ct.unshift(this.version.salt_size/4))?new Error("Ciphertext underrrun in read_salt"):null)},r.prototype.generate_keys=function(t,e){var r,n,i,o,s,a;o=c.findDeferral(arguments),i=t.progress_hook,(a=this,function(t){s=new c.Deferrals(t,{parent:o,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.generate_keys"}),a.kdf({salt:a.salt,progress_hook:i},s.defer({assign_fn:function(){return r=arguments[0],n=arguments[1]},lineno:114})),s._fulfill()})((function(){return e(r,n)}))},r.prototype.run=function(e,r){var n,i,o,u,h,p,d,m;p=c.findDeferral(arguments),n=e.data,u=e.progress_hook,i=l(r,"Decryptor::run"),this.ct=f.from_buffer(n),(m=this,function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),m.read_header(i(d.defer({lineno:141}))),d._fulfill()})(function(e){return function(){d=new c.Deferrals((function(){var n;d=new c.Deferrals((function(){d=new c.Deferrals((function(){d=new c.Deferrals((function(){d=new c.Deferrals((function(){!function(t){if(!e.version.use_twofish)return t();!function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.unshift_iv(a.ivSize,"2fish",i(d.defer({assign_fn:function(){return o=arguments[0]},lineno:148}))),d._fulfill()}((function(){!function(t){d=new c.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.run_twofish({iv:o,input:e.ct,key:e.keys.twofish,progress_hook:u},i(d.defer({assign_fn:function(){return d.ret=arguments[0]},lineno:149}))),d._fulfill()}(t)}))}((function(){d=new c.Deferrals((function(){d=new c.Deferrals((function(){return r(null,h.to_buffer())}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.run_salsa20({iv:o,input:e.ct,key:e.keys.salsa20,output_iv:!1,progress_hook:u},i(d.defer({assign_fn:function(){return h=arguments[0]},lineno:151}))),d._fulfill()}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.unshift_iv(s.ivSize,"Salsa",i(d.defer({assign_fn:function(){return o=arguments[0]},lineno:150}))),d._fulfill()}))}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.run_aes({iv:o,input:e.ct,key:e.keys.aes,progress_hook:u},i(d.defer({assign_fn:function(){return d.ret=arguments[0]},lineno:146}))),d._fulfill()}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.unshift_iv(t.ivSize,"AES",i(d.defer({assign_fn:function(){return o=arguments[0]},lineno:145}))),d._fulfill()}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.verify_sig(e.keys.hmac,i(d.defer({lineno:144}))),d._fulfill()}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.generate_keys({progress_hook:u},i(d.defer({assign_fn:(n=e,function(){return n.keys=arguments[0]}),lineno:143}))),d._fulfill()}),{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),e.read_salt(i(d.defer({lineno:142}))),d._fulfill()}}(this))},r.prototype.clone=function(){var t,e;return(t=new r({key:null!=(e=this.key)?e.to_buffer():void 0,rng:this.rng,version:this.version})).derived_keys=this.clone_derived_keys(),t},r}(n),h=function(t,e){var r,n,i,s,a,u,f,h;f=c.findDeferral(arguments),s=t.key,r=t.data,a=t.progress_hook,n=new o({key:s}),function(t){h=new c.Deferrals(t,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/dec.iced"}),n.run({data:r,progress_hook:a},h.defer({assign_fn:function(){return i=arguments[0],u=arguments[1]},lineno:181})),h._fulfill()}((function(){return n.scrub(),e(i,u)}))},e.Decryptor=o,e.decrypt=h}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a={}.hasOwnProperty;o=r(91).WordArray,t=r(200).Hasher,i=[],n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)a.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.blockSize=16,e.prototype.blockSize=e.blockSize,e.output_size=20,e.prototype.output_size=e.output_size,e.prototype._doReset=function(){return this._hash=new o([1732584193,4023233417,2562383102,271733878,3285377520])},e.prototype._doProcessBlock=function(t,e){var r,n,o,s,a,u,f,h,c,l;for(n=(r=this._hash.words)[0],o=r[1],s=r[2],a=r[3],u=r[4],f=l=0;l<80;f=++l)f<16?i[f]=0|t[e+f]:(h=i[f-3]^i[f-8]^i[f-14]^i[f-16],i[f]=h<<1|h>>>31),c=(n<<5|n>>>27)+u+i[f],c+=f<20?1518500249+(o&s|~o&a):f<40?1859775393+(o^s^a):f<60?(o&s|o&a|s&a)-1894007588:(o^s^a)-899497514,u=a,a=s,s=o<<30|o>>>2,o=n,n=c;return r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+u|0},e.prototype._doFinalize=function(){var t,e,r,n;return e=(t=this._data).words,n=8*this._nDataBytes,e[(r=8*t.sigBytes)>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},e.prototype.copy_to=function(t){return e.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(t),s=s=function(t){var e;return e=(new n).finalize(t),t.scrub(),e},e.SHA1=n,e.transform=s}).call(this)},function(t,e,r){(function(){var t,n,i,o,s={}.hasOwnProperty;i=r(91).WordArray,n=r(527).SHA256,t=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)s.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,t),e.output_size=28,e.prototype.output_size=e.output_size,e.prototype._doReset=function(){return this._hash=new i([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},e.prototype._doFinalize=function(){var t;return(t=e.__super__._doFinalize.call(this)).sigBytes-=4,t},e.prototype.clone=function(){var t;return t=new e,this.copy_to(t),t},e}(n),o=function(e){var r;return r=(new t).finalize(e),e.scrub(),r},e.SHA224=t,e.transform=o}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f={}.hasOwnProperty;a=r(91),o=a.X64WordArray,a.WordArray,i=(u=r(367)).SHA512,t=u.Global,n=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)f.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.output_size=48,r.prototype.output_size=r.output_size,r.prototype._doReset=function(){return this._hash=new o(t.convert([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]))},r.prototype._doFinalize=function(){var t;return(t=r.__super__._doFinalize.call(this)).sigBytes-=16,t},r.prototype.clone=function(){var t;return t=new r,this.copy_to(t),t},r}(i),s=function(t){var e;return e=(new n).finalize(t),t.scrub(),e},e.SHA384=n,e.transform=s}).call(this)},function(t,e,r){(function(){var t;t=r(416),e.SHA3=t.KECCAK,e.transform=t.transform}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h={}.hasOwnProperty;u=r(91).WordArray,o=r(200).Hasher,f=new function(){var t;this.T=function(){var e,r;for(r=[],t=e=0;e<64;t=++e)r.push(4294967296*Math.abs(Math.sin(t+1))|0);return r}()},e.MD5=a=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)h.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.blockSize=16,r.prototype.blockSize=r.blockSize,r.output_size=16,r.prototype.output_size=r.output_size,r.prototype._doReset=function(){return this._hash=new u([1732584193,4023233417,2562383102,271733878])},r.prototype._doProcessBlock=function(e,r){var o,a,u,h,c,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P;for(D=P=0;P<16;D=++P)x=e[R=r+D],e[R]=16711935&(x<<8|x>>>24)|4278255360&(x<<24|x>>>8);return o=this._hash.words,a=e[r+0],u=e[r+1],y=e[r+2],_=e[r+3],g=e[r+4],b=e[r+5],v=e[r+6],w=e[r+7],k=e[r+8],M=e[r+9],h=e[r+10],c=e[r+11],l=e[r+12],p=e[r+13],d=e[r+14],m=e[r+15],S=o[0],E=o[1],A=o[2],B=o[3],S=t(S,E,A,B,a,7,f.T[0]),B=t(B,S,E,A,u,12,f.T[1]),A=t(A,B,S,E,y,17,f.T[2]),E=t(E,A,B,S,_,22,f.T[3]),S=t(S,E,A,B,g,7,f.T[4]),B=t(B,S,E,A,b,12,f.T[5]),A=t(A,B,S,E,v,17,f.T[6]),E=t(E,A,B,S,w,22,f.T[7]),S=t(S,E,A,B,k,7,f.T[8]),B=t(B,S,E,A,M,12,f.T[9]),A=t(A,B,S,E,h,17,f.T[10]),E=t(E,A,B,S,c,22,f.T[11]),S=t(S,E,A,B,l,7,f.T[12]),B=t(B,S,E,A,p,12,f.T[13]),A=t(A,B,S,E,d,17,f.T[14]),E=t(E,A,B,S,m,22,f.T[15]),S=n(S,E,A,B,u,5,f.T[16]),B=n(B,S,E,A,v,9,f.T[17]),A=n(A,B,S,E,c,14,f.T[18]),E=n(E,A,B,S,a,20,f.T[19]),S=n(S,E,A,B,b,5,f.T[20]),B=n(B,S,E,A,h,9,f.T[21]),A=n(A,B,S,E,m,14,f.T[22]),E=n(E,A,B,S,g,20,f.T[23]),S=n(S,E,A,B,M,5,f.T[24]),B=n(B,S,E,A,d,9,f.T[25]),A=n(A,B,S,E,_,14,f.T[26]),E=n(E,A,B,S,k,20,f.T[27]),S=n(S,E,A,B,p,5,f.T[28]),B=n(B,S,E,A,y,9,f.T[29]),A=n(A,B,S,E,w,14,f.T[30]),E=n(E,A,B,S,l,20,f.T[31]),S=i(S,E,A,B,b,4,f.T[32]),B=i(B,S,E,A,k,11,f.T[33]),A=i(A,B,S,E,c,16,f.T[34]),E=i(E,A,B,S,d,23,f.T[35]),S=i(S,E,A,B,u,4,f.T[36]),B=i(B,S,E,A,g,11,f.T[37]),A=i(A,B,S,E,w,16,f.T[38]),E=i(E,A,B,S,h,23,f.T[39]),S=i(S,E,A,B,p,4,f.T[40]),B=i(B,S,E,A,a,11,f.T[41]),A=i(A,B,S,E,_,16,f.T[42]),E=i(E,A,B,S,v,23,f.T[43]),S=i(S,E,A,B,M,4,f.T[44]),B=i(B,S,E,A,l,11,f.T[45]),A=i(A,B,S,E,m,16,f.T[46]),E=i(E,A,B,S,y,23,f.T[47]),S=s(S,E,A,B,a,6,f.T[48]),B=s(B,S,E,A,w,10,f.T[49]),A=s(A,B,S,E,d,15,f.T[50]),E=s(E,A,B,S,b,21,f.T[51]),S=s(S,E,A,B,l,6,f.T[52]),B=s(B,S,E,A,_,10,f.T[53]),A=s(A,B,S,E,h,15,f.T[54]),E=s(E,A,B,S,u,21,f.T[55]),S=s(S,E,A,B,k,6,f.T[56]),B=s(B,S,E,A,m,10,f.T[57]),A=s(A,B,S,E,v,15,f.T[58]),E=s(E,A,B,S,p,21,f.T[59]),S=s(S,E,A,B,g,6,f.T[60]),B=s(B,S,E,A,c,10,f.T[61]),A=s(A,B,S,E,y,15,f.T[62]),E=s(E,A,B,S,M,21,f.T[63]),o[0]=o[0]+S|0,o[1]=o[1]+E|0,o[2]=o[2]+A|0,o[3]=o[3]+B|0},r.prototype._doFinalize=function(){var t,e,r,n,i,o,s,a,u,f,h;for(n=(r=this._data).words,a=8*this._nDataBytes,n[(s=8*r.sigBytes)>>>5]|=128<<24-s%32,u=Math.floor(a/4294967296),f=a,n[15+(s+64>>>9<<4)]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),n[14+(s+64>>>9<<4)]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),r.sigBytes=4*(n.length+1),this._process(),t=(i=this._hash).words,o=h=0;h<4;o=++h)e=t[o],t[o]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return i},r.prototype.copy_to=function(t){return r.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},r.prototype.clone=function(){var t;return t=new r,this.copy_to(t),t},r}(o),t=function(t,e,r,n,i,o,s){var a;return((a=t+(e&r|~e&n)+i+s)<<o|a>>>32-o)+e},n=function(t,e,r,n,i,o,s){var a;return((a=t+(e&n|r&~n)+i+s)<<o|a>>>32-o)+e},i=function(t,e,r,n,i,o,s){var a;return((a=t+(e^r^n)+i+s)<<o|a>>>32-o)+e},s=function(t,e,r,n,i,o,s){var a;return((a=t+(r^(e|~n))+i+s)<<o|a>>>32-o)+e},e.transform=function(t){var e;return e=(new a).finalize(t),t.scrub(),e}}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p,d={}.hasOwnProperty;p=r(91),o=p.WordArray,p.X64Word,p.X64WordArray,n=r(200).Hasher,t=new function(){this._zl=new o([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]),this._zr=new o([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]),this._sl=new o([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]),this._sr=new o([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]),this._hl=new o([0,1518500249,1859775393,2400959708,2840853838]),this._hr=new o([1352829926,1548603684,1836072691,2053994217,0])},i=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)d.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.blockSize=16,r.prototype.blockSize=r.blockSize,r.output_size=20,r.prototype.output_size=r.output_size,r.prototype._doReset=function(){return this._hash=new o([1732584193,4023233417,2562383102,271733878,3285377520])},r.prototype.get_output_size=function(){return this.output_size},r.prototype._doProcessBlock=function(e,r){var n,i,o,l,p,d,m,y,_,g,b,v,w,k,M,x,S,E,A,B,D,R,P;for(M=R=0;R<16;M=++R)i=e[x=r+M],e[x]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);for(n=this._hash.words,w=t._hl.words,k=t._hr.words,B=t._zl.words,D=t._zr.words,S=t._sl.words,E=t._sr.words,l=o=n[0],d=p=n[1],y=m=n[2],g=_=n[3],v=b=n[4],M=P=0;P<80;M=++P)A=o+e[r+B[M]]|0,A+=M<16?s(p,m,_)+w[0]:M<32?a(p,m,_)+w[1]:M<48?u(p,m,_)+w[2]:M<64?f(p,m,_)+w[3]:h(p,m,_)+w[4],A=(A=c(A|=0,S[M]))+b|0,o=b,b=_,_=c(m,10),m=p,p=A,A=l+e[r+D[M]]|0,A+=M<16?h(d,y,g)+k[0]:M<32?f(d,y,g)+k[1]:M<48?u(d,y,g)+k[2]:M<64?a(d,y,g)+k[3]:s(d,y,g)+k[4],A=(A=c(A|=0,E[M]))+v|0,l=v,v=g,g=c(y,10),y=d,d=A;return A=n[1]+m+g|0,n[1]=n[2]+_+v|0,n[2]=n[3]+b+l|0,n[3]=n[4]+o+d|0,n[4]=n[0]+p+y|0,n[0]=A},r.prototype._doFinalize=function(){var t,e,r,n,i,o,s,a,u;for(n=(r=this._data).words,a=8*this._nDataBytes,n[(s=8*r.sigBytes)>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r.sigBytes=4*(n.length+1),this._process(),t=(i=this._hash).words,o=u=0;u<5;o=++u)e=t[o],t[o]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);return i},r.prototype.scrub=function(){return this._hash.scrub()},r.prototype.copy_to=function(t){return r.__super__.copy_to.call(this,t),t._hash=this._hash.clone()},r.prototype.clone=function(){var t;return t=new r,this.copy_to(t),t},r}(n),s=function(t,e,r){return t^e^r},a=function(t,e,r){return t&e|~t&r},u=function(t,e,r){return(t|~e)^r},f=function(t,e,r){return t&r|e&~r},h=function(t,e,r){return t^(e|~r)},c=function(t,e){return t<<e|t>>>32-e},l=function(t){var e;return e=(new i).finalize(t),t.scrub(),e},e.RIPEMD160=i,e.transform=l}).call(this)},function(t,e){(function(){e.small_primes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999,5003,5009,5011,5021,5023,5039,5051,5059,5077,5081,5087,5099,5101,5107,5113,5119,5147,5153,5167,5171,5179,5189,5197,5209,5227,5231,5233,5237,5261,5273,5279,5281,5297,5303,5309,5323,5333,5347,5351,5381,5387,5393,5399,5407,5413,5417,5419,5431,5437,5441,5443,5449,5471,5477,5479,5483,5501,5503,5507,5519,5521,5527,5531,5557,5563,5569,5573,5581,5591,5623,5639,5641,5647,5651,5653,5657,5659,5669,5683,5689,5693,5701,5711,5717,5737,5741,5743,5749,5779,5783,5791,5801,5807,5813,5821,5827,5839,5843,5849,5851,5857,5861,5867,5869,5879,5881,5897,5903,5923,5927,5939,5953,5981,5987,6007,6011,6029,6037,6043,6047,6053,6067,6073,6079,6089,6091,6101,6113,6121,6131,6133,6143,6151,6163,6173,6197,6199,6203,6211,6217,6221,6229,6247,6257,6263,6269,6271,6277,6287,6299,6301,6311,6317,6323,6329,6337,6343,6353,6359,6361,6367,6373,6379,6389,6397,6421,6427,6449,6451,6469,6473,6481,6491,6521,6529,6547,6551,6553,6563,6569,6571,6577,6581,6599,6607,6619,6637,6653,6659,6661,6673,6679,6689,6691,6701,6703,6709,6719,6733,6737,6761,6763,6779,6781,6791,6793,6803,6823,6827,6829,6833,6841,6857,6863,6869,6871,6883,6899,6907,6911,6917,6947,6949,6959,6961,6967,6971,6977,6983,6991,6997,7001,7013,7019,7027,7039,7043,7057,7069,7079,7103,7109,7121,7127,7129,7151,7159,7177,7187,7193,7207,7211,7213,7219,7229,7237,7243,7247,7253,7283,7297,7307,7309,7321,7331,7333,7349,7351,7369,7393,7411,7417,7433,7451,7457,7459,7477,7481,7487,7489,7499,7507,7517,7523,7529,7537,7541,7547,7549,7559,7561,7573,7577,7583,7589,7591,7603,7607,7621,7639,7643,7649,7669,7673,7681,7687,7691,7699,7703,7717,7723,7727,7741,7753,7757,7759,7789,7793,7817,7823,7829,7841,7853,7867,7873,7877,7879,7883,7901,7907,7919,7927,7933,7937,7949,7951,7963,7993,8009,8011,8017,8039,8053,8059,8069,8081,8087,8089,8093,8101,8111,8117,8123,8147,8161,8167,8171,8179,8191,8209,8219,8221,8231,8233,8237,8243,8263,8269,8273,8287,8291,8293,8297,8311,8317,8329,8353,8363,8369,8377,8387,8389,8419,8423,8429,8431,8443,8447,8461,8467,8501,8513,8521,8527,8537,8539,8543,8563,8573,8581,8597,8599,8609,8623,8627,8629,8641,8647,8663,8669,8677,8681,8689,8693,8699,8707,8713,8719,8731,8737,8741,8747,8753,8761,8779,8783,8803,8807,8819,8821,8831,8837,8839,8849,8861,8863,8867,8887,8893,8923,8929,8933,8941,8951,8963,8969,8971,8999,9001,9007,9011,9013,9029,9041,9043,9049,9059,9067,9091,9103,9109,9127,9133,9137,9151,9157,9161,9173,9181,9187,9199,9203,9209,9221,9227,9239,9241,9257,9277,9281,9283,9293,9311,9319,9323,9337,9341,9343,9349,9371,9377,9391,9397,9403,9413,9419,9421,9431,9433,9437,9439,9461,9463,9467,9473,9479,9491,9497,9511,9521,9533,9539,9547,9551,9587,9601,9613,9619,9623,9629,9631,9643,9649,9661,9677,9679,9689,9697,9719,9721,9733,9739,9743,9749,9767,9769,9781,9787,9791,9803,9811,9817,9829,9833,9839,9851,9857,9859,9871,9883,9887,9901,9907,9923,9929,9931,9941,9949,9967,9973,10007,10009,10037,10039,10061,10067,10069,10079,10091,10093,10099,10103,10111,10133,10139,10141,10151,10159,10163,10169,10177,10181,10193,10211,10223,10243,10247,10253,10259,10267,10271,10273,10289,10301,10303,10313,10321,10331,10333,10337,10343,10357,10369,10391,10399,10427,10429,10433,10453,10457,10459,10463,10477,10487,10499,10501,10513,10529,10531,10559,10567,10589,10597,10601,10607,10613,10627,10631,10639,10651,10657,10663,10667,10687,10691,10709,10711,10723,10729,10733,10739,10753,10771,10781,10789,10799,10831,10837,10847,10853,10859,10861,10867,10883,10889,10891,10903,10909,10937,10939,10949,10957,10973,10979,10987,10993,11003,11027,11047,11057,11059,11069,11071,11083,11087,11093,11113,11117,11119,11131,11149,11159,11161,11171,11173,11177,11197,11213,11239,11243,11251,11257,11261,11273,11279,11287,11299,11311,11317,11321,11329,11351,11353,11369,11383,11393,11399,11411,11423,11437,11443,11447,11467,11471,11483,11489,11491,11497,11503,11519,11527,11549,11551,11579,11587,11593,11597,11617,11621,11633,11657,11677,11681,11689,11699,11701,11717,11719,11731,11743,11777,11779,11783,11789,11801,11807,11813,11821,11827,11831,11833,11839,11863,11867,11887,11897,11903,11909,11923,11927,11933,11939,11941,11953,11959,11969,11971,11981,11987,12007,12011,12037,12041,12043,12049,12071,12073,12097,12101,12107,12109,12113,12119,12143,12149,12157,12161,12163,12197,12203,12211,12227,12239,12241,12251,12253,12263,12269,12277,12281,12289,12301,12323,12329,12343,12347,12373,12377,12379,12391,12401,12409,12413,12421,12433,12437,12451,12457,12473,12479,12487,12491,12497,12503,12511,12517,12527,12539,12541,12547,12553,12569,12577,12583,12589,12601,12611,12613,12619,12637,12641,12647,12653,12659,12671,12689,12697,12703,12713,12721,12739,12743,12757,12763,12781,12791,12799,12809,12821,12823,12829,12841,12853,12889,12893,12899,12907,12911,12917,12919,12923,12941,12953,12959,12967,12973,12979,12983,13001,13003,13007,13009,13033,13037,13043,13049,13063,13093,13099,13103,13109,13121,13127,13147,13151,13159,13163,13171,13177,13183,13187,13217,13219,13229,13241,13249,13259,13267,13291,13297,13309,13313,13327,13331,13337,13339,13367,13381,13397,13399,13411,13417,13421,13441,13451,13457,13463,13469,13477,13487,13499,13513,13523,13537,13553,13567,13577,13591,13597,13613,13619,13627,13633,13649,13669,13679,13681,13687,13691,13693,13697,13709,13711,13721,13723,13729,13751,13757,13759,13763,13781,13789,13799,13807,13829,13831,13841,13859,13873,13877,13879,13883,13901,13903,13907,13913,13921,13931,13933,13963,13967,13997,13999,14009,14011,14029,14033,14051,14057,14071,14081,14083,14087,14107,14143,14149,14153,14159,14173,14177,14197,14207,14221,14243,14249,14251,14281,14293,14303,14321,14323,14327,14341,14347,14369,14387,14389,14401,14407,14411,14419,14423,14431,14437,14447,14449,14461,14479,14489,14503,14519,14533,14537,14543,14549,14551,14557,14561,14563,14591,14593,14621,14627,14629,14633,14639,14653,14657,14669,14683,14699,14713,14717,14723,14731,14737,14741,14747,14753,14759,14767,14771,14779,14783,14797,14813,14821,14827,14831,14843,14851,14867,14869,14879,14887,14891,14897,14923,14929,14939,14947,14951,14957,14969,14983,15013,15017,15031,15053,15061,15073,15077,15083,15091,15101,15107,15121,15131,15137,15139,15149,15161,15173,15187,15193,15199,15217,15227,15233,15241,15259,15263,15269,15271,15277,15287,15289,15299,15307,15313,15319,15329,15331,15349,15359,15361,15373,15377,15383,15391,15401,15413,15427,15439,15443,15451,15461,15467,15473,15493,15497,15511,15527,15541,15551,15559,15569,15581,15583,15601,15607,15619,15629,15641,15643,15647,15649,15661,15667,15671,15679,15683,15727,15731,15733,15737,15739,15749,15761,15767,15773,15787,15791,15797,15803,15809,15817,15823,15859,15877,15881,15887,15889,15901,15907,15913,15919,15923,15937,15959,15971,15973,15991,16001,16007,16033,16057,16061,16063,16067,16069,16073,16087,16091,16097,16103,16111,16127,16139,16141,16183,16187,16189,16193,16217,16223,16229,16231,16249,16253,16267,16273,16301,16319,16333,16339,16349,16361,16363,16369,16381,16411,16417,16421,16427,16433,16447,16451,16453,16477,16481,16487,16493,16519,16529,16547,16553,16561,16567,16573,16603,16607,16619,16631,16633,16649,16651,16657,16661,16673,16691,16693,16699,16703,16729,16741,16747,16759,16763,16787,16811,16823,16829,16831,16843,16871,16879,16883,16889,16901,16903,16921,16927,16931,16937,16943,16963,16979,16981,16987,16993,17011,17021,17027,17029,17033,17041,17047,17053,17077,17093,17099,17107,17117,17123,17137,17159,17167,17183,17189,17191,17203,17207,17209,17231,17239,17257,17291,17293,17299,17317,17321,17327,17333,17341,17351,17359,17377,17383,17387,17389,17393,17401,17417,17419,17431,17443,17449,17467,17471,17477,17483,17489,17491,17497,17509,17519,17539,17551,17569,17573,17579,17581,17597,17599,17609,17623,17627,17657,17659,17669,17681,17683,17707,17713,17729,17737,17747,17749,17761,17783,17789,17791,17807,17827,17837,17839,17851,17863,17881,17891,17903,17909,17911,17921,17923,17929,17939,17957,17959,17971,17977,17981,17987,17989,18013,18041,18043,18047,18049,18059,18061,18077,18089,18097,18119,18121,18127,18131,18133,18143,18149,18169,18181,18191,18199,18211,18217,18223,18229,18233,18251,18253,18257,18269,18287,18289,18301,18307,18311,18313,18329,18341,18353,18367,18371,18379,18397,18401,18413,18427,18433,18439,18443,18451,18457,18461,18481,18493,18503,18517,18521,18523,18539,18541,18553,18583,18587,18593,18617,18637,18661,18671,18679,18691,18701,18713,18719,18731,18743,18749,18757,18773,18787,18793,18797,18803,18839,18859,18869,18899,18911,18913,18917,18919,18947,18959,18973,18979,19001,19009,19013,19031,19037,19051,19069,19073,19079,19081,19087,19121,19139,19141,19157,19163,19181,19183,19207,19211,19213,19219,19231,19237,19249,19259,19267,19273,19289,19301,19309,19319,19333,19373,19379,19381,19387,19391,19403,19417,19421,19423,19427,19429,19433,19441,19447,19457,19463,19469,19471,19477,19483,19489,19501,19507,19531,19541,19543,19553,19559,19571,19577,19583,19597,19603,19609,19661,19681,19687,19697,19699,19709,19717,19727,19739,19751,19753,19759,19763,19777,19793,19801,19813,19819,19841,19843,19853,19861,19867,19889,19891,19913,19919,19927,19937,19949,19961,19963,19973,19979,19991,19993,19997,20011,20021,20023,20029,20047,20051,20063,20071,20089,20101,20107,20113,20117,20123,20129,20143,20147,20149,20161,20173,20177,20183,20201,20219,20231,20233,20249,20261,20269,20287,20297,20323,20327,20333,20341,20347,20353,20357,20359,20369,20389,20393,20399,20407,20411,20431,20441,20443,20477,20479,20483,20507,20509,20521,20533,20543,20549,20551,20563,20593,20599,20611,20627,20639,20641,20663,20681,20693,20707,20717,20719,20731,20743,20747,20749,20753,20759,20771,20773,20789,20807,20809,20849,20857,20873,20879,20887,20897,20899,20903,20921,20929,20939,20947,20959,20963,20981,20983,21001,21011,21013,21017,21019,21023,21031,21059,21061,21067,21089,21101,21107,21121,21139,21143,21149,21157,21163,21169,21179,21187,21191,21193,21211,21221,21227,21247,21269,21277,21283,21313,21317,21319,21323,21341,21347,21377,21379,21383,21391,21397,21401,21407,21419,21433,21467,21481,21487,21491,21493,21499,21503,21517,21521,21523,21529,21557,21559,21563,21569,21577,21587,21589,21599,21601,21611,21613,21617,21647,21649,21661,21673,21683,21701,21713,21727,21737,21739,21751,21757,21767,21773,21787,21799,21803,21817,21821,21839,21841,21851,21859,21863,21871,21881,21893,21911,21929,21937,21943,21961,21977,21991,21997,22003,22013,22027,22031,22037,22039,22051,22063,22067,22073,22079,22091,22093,22109,22111,22123,22129,22133,22147,22153,22157,22159,22171,22189,22193,22229,22247,22259,22271,22273,22277,22279,22283,22291,22303,22307,22343,22349,22367,22369,22381,22391,22397,22409,22433,22441,22447,22453,22469,22481,22483,22501,22511,22531,22541,22543,22549,22567,22571,22573,22613,22619,22621,22637,22639,22643,22651,22669,22679,22691,22697,22699,22709,22717,22721,22727,22739,22741,22751,22769,22777,22783,22787,22807,22811,22817,22853,22859,22861,22871,22877,22901,22907,22921,22937,22943,22961,22963,22973,22993,23003,23011,23017,23021,23027,23029,23039,23041,23053,23057,23059,23063,23071,23081,23087,23099,23117,23131,23143,23159,23167,23173,23189,23197,23201,23203,23209,23227,23251,23269,23279,23291,23293,23297,23311,23321,23327,23333,23339,23357,23369,23371,23399,23417,23431,23447,23459,23473,23497,23509,23531,23537,23539,23549,23557,23561,23563,23567,23581,23593,23599,23603,23609,23623,23627,23629,23633,23663,23669,23671,23677,23687,23689,23719,23741,23743,23747,23753,23761,23767,23773,23789,23801,23813,23819,23827,23831,23833,23857,23869,23873,23879,23887,23893,23899,23909,23911,23917,23929,23957,23971,23977,23981,23993,24001,24007,24019,24023,24029,24043,24049,24061,24071,24077,24083,24091,24097,24103,24107,24109,24113,24121,24133,24137,24151,24169,24179,24181,24197,24203,24223,24229,24239,24247,24251,24281,24317,24329,24337,24359,24371,24373,24379,24391,24407,24413,24419,24421,24439,24443,24469,24473,24481,24499,24509,24517,24527,24533,24547,24551,24571,24593,24611,24623,24631,24659,24671,24677,24683,24691,24697,24709,24733,24749,24763,24767,24781,24793,24799,24809,24821,24841,24847,24851,24859,24877,24889,24907,24917,24919,24923,24943,24953,24967,24971,24977,24979,24989,25013,25031,25033,25037,25057,25073,25087,25097,25111,25117,25121,25127,25147,25153,25163,25169,25171,25183,25189,25219,25229,25237,25243,25247,25253,25261,25301,25303,25307,25309,25321,25339,25343,25349,25357,25367,25373,25391,25409,25411,25423,25439,25447,25453,25457,25463,25469,25471,25523,25537,25541,25561,25577,25579,25583,25589,25601,25603,25609,25621,25633,25639,25643,25657,25667,25673,25679,25693,25703,25717,25733,25741,25747,25759,25763,25771,25793,25799,25801,25819,25841,25847,25849,25867,25873,25889,25903,25913,25919,25931,25933,25939,25943,25951,25969,25981,25997,25999,26003,26017,26021,26029,26041,26053,26083,26099,26107,26111,26113,26119,26141,26153,26161,26171,26177,26183,26189,26203,26209,26227,26237,26249,26251,26261,26263,26267,26293,26297,26309,26317,26321,26339,26347,26357,26371,26387,26393,26399,26407,26417,26423,26431,26437,26449,26459,26479,26489,26497,26501,26513,26539,26557,26561,26573,26591,26597,26627,26633,26641,26647,26669,26681,26683,26687,26693,26699,26701,26711,26713,26717,26723,26729,26731,26737,26759,26777,26783,26801,26813,26821,26833,26839,26849,26861,26863,26879,26881,26891,26893,26903,26921,26927,26947,26951,26953,26959,26981,26987,26993,27011,27017,27031,27043,27059,27061,27067,27073,27077,27091,27103,27107,27109,27127,27143,27179,27191,27197,27211,27239,27241,27253,27259,27271,27277,27281,27283,27299,27329,27337,27361,27367,27397,27407,27409,27427,27431,27437,27449,27457,27479,27481,27487,27509,27527,27529,27539,27541,27551,27581,27583,27611,27617,27631,27647,27653,27673,27689,27691,27697,27701,27733,27737,27739,27743,27749,27751,27763,27767,27773,27779,27791,27793,27799,27803,27809,27817,27823,27827,27847,27851,27883,27893,27901,27917,27919,27941,27943,27947,27953,27961,27967,27983,27997,28001,28019,28027,28031,28051,28057,28069,28081,28087,28097,28099,28109,28111,28123,28151,28163,28181,28183,28201,28211,28219,28229,28277,28279,28283,28289,28297,28307,28309,28319,28349,28351,28387,28393,28403,28409,28411,28429,28433,28439,28447,28463,28477,28493,28499,28513,28517,28537,28541,28547,28549,28559,28571,28573,28579,28591,28597,28603,28607,28619,28621,28627,28631,28643,28649,28657,28661,28663,28669,28687,28697,28703,28711,28723,28729,28751,28753,28759,28771,28789,28793,28807,28813,28817,28837,28843,28859,28867,28871,28879,28901,28909,28921,28927,28933,28949,28961,28979,29009,29017,29021,29023,29027,29033,29059,29063,29077,29101,29123,29129,29131,29137,29147,29153,29167,29173,29179,29191,29201,29207,29209,29221,29231,29243,29251,29269,29287,29297,29303,29311,29327,29333,29339,29347,29363,29383,29387,29389,29399,29401,29411,29423,29429,29437,29443,29453,29473,29483,29501,29527,29531,29537,29567,29569,29573,29581,29587,29599,29611,29629,29633,29641,29663,29669,29671,29683,29717,29723,29741,29753,29759,29761,29789,29803,29819,29833,29837,29851,29863,29867,29873,29879,29881,29917,29921,29927,29947,29959,29983,29989,30011,30013,30029,30047,30059,30071,30089,30091,30097,30103,30109,30113,30119,30133,30137,30139,30161,30169,30181,30187,30197,30203,30211,30223,30241,30253,30259,30269,30271,30293,30307,30313,30319,30323,30341,30347,30367,30389,30391,30403,30427,30431,30449,30467,30469,30491,30493,30497,30509,30517,30529,30539,30553,30557,30559,30577,30593,30631,30637,30643,30649,30661,30671,30677,30689,30697,30703,30707,30713,30727,30757,30763,30773,30781,30803,30809,30817,30829,30839,30841,30851,30853,30859,30869,30871,30881,30893,30911,30931,30937,30941,30949,30971,30977,30983,31013,31019,31033,31039,31051,31063,31069,31079,31081,31091,31121,31123,31139,31147,31151,31153,31159,31177,31181,31183,31189,31193,31219,31223,31231,31237,31247,31249,31253,31259,31267,31271,31277,31307,31319,31321,31327,31333,31337,31357,31379,31387,31391,31393,31397,31469,31477,31481,31489,31511,31513,31517,31531,31541,31543,31547,31567,31573,31583,31601,31607,31627,31643,31649,31657,31663,31667,31687,31699,31721,31723,31727,31729,31741,31751,31769,31771,31793,31799,31817,31847,31849,31859,31873,31883,31891,31907,31957,31963,31973,31981,31991,32003,32009,32027,32029,32051,32057,32059,32063,32069,32077,32083,32089,32099,32117,32119,32141,32143,32159,32173,32183,32189,32191,32203,32213,32233,32237,32251,32257,32261,32297,32299,32303,32309,32321,32323,32327,32341,32353,32359,32363,32369,32371,32377,32381,32401,32411,32413,32423,32429,32441,32443,32467,32479,32491,32497,32503,32507,32531,32533,32537,32561,32563,32569,32573,32579,32587,32603,32609,32611,32621,32633,32647,32653,32687,32693,32707,32713,32717,32719,32749,32771,32779,32783,32789,32797,32801,32803,32831,32833,32839,32843,32869,32887,32909,32911,32917,32933,32939,32941,32957,32969,32971,32983,32987,32993,32999,33013,33023,33029,33037,33049,33053,33071,33073,33083,33091,33107,33113,33119,33149,33151,33161,33179,33181,33191,33199,33203,33211,33223,33247,33287,33289,33301,33311,33317,33329,33331,33343,33347,33349,33353,33359,33377,33391,33403,33409,33413,33427,33457,33461,33469,33479,33487,33493,33503,33521,33529,33533,33547,33563,33569,33577,33581,33587,33589,33599,33601,33613,33617,33619,33623,33629,33637,33641,33647,33679,33703,33713,33721,33739,33749,33751,33757,33767,33769,33773,33791,33797,33809,33811,33827,33829,33851,33857,33863,33871,33889,33893,33911,33923,33931,33937,33941,33961,33967,33997,34019,34031,34033,34039,34057,34061,34123,34127,34129,34141,34147,34157,34159,34171,34183,34211,34213,34217,34231,34253,34259,34261,34267,34273,34283,34297,34301,34303,34313,34319,34327,34337,34351,34361,34367,34369,34381,34403,34421,34429,34439,34457,34469,34471,34483,34487,34499,34501,34511,34513,34519,34537,34543,34549,34583,34589,34591,34603,34607,34613,34631,34649,34651,34667,34673,34679,34687,34693,34703,34721,34729,34739,34747,34757,34759,34763,34781,34807,34819,34841,34843,34847,34849,34871,34877,34883,34897,34913,34919,34939,34949,34961,34963,34981,35023,35027,35051,35053,35059,35069,35081,35083,35089,35099,35107,35111,35117,35129,35141,35149,35153,35159,35171,35201,35221,35227,35251,35257,35267,35279,35281,35291,35311,35317,35323,35327,35339,35353,35363,35381,35393,35401,35407,35419,35423,35437,35447,35449,35461,35491,35507,35509,35521,35527,35531,35533,35537,35543,35569,35573,35591,35593,35597,35603,35617,35671,35677,35729,35731,35747,35753,35759,35771,35797,35801,35803,35809,35831,35837,35839,35851,35863,35869,35879,35897,35899,35911,35923,35933,35951,35963,35969,35977,35983,35993,35999,36007,36011,36013,36017,36037,36061,36067,36073,36083,36097,36107,36109,36131,36137,36151,36161,36187,36191,36209,36217,36229,36241,36251,36263,36269,36277,36293,36299,36307,36313,36319,36341,36343,36353,36373,36383,36389,36433,36451,36457,36467,36469,36473,36479,36493,36497,36523,36527,36529,36541,36551,36559,36563,36571,36583,36587,36599,36607,36629,36637,36643,36653,36671,36677,36683,36691,36697,36709,36713,36721,36739,36749,36761,36767,36779,36781,36787,36791,36793,36809,36821,36833,36847,36857,36871,36877,36887,36899,36901,36913,36919,36923,36929,36931,36943,36947,36973,36979,36997,37003,37013,37019,37021,37039,37049,37057,37061,37087,37097,37117,37123,37139,37159,37171,37181,37189,37199,37201,37217,37223,37243,37253,37273,37277,37307,37309,37313,37321,37337,37339,37357,37361,37363,37369,37379,37397,37409,37423,37441,37447,37463,37483,37489,37493,37501,37507,37511,37517,37529,37537,37547,37549,37561,37567,37571,37573,37579,37589,37591,37607,37619,37633,37643,37649,37657,37663,37691,37693,37699,37717,37747,37781,37783,37799,37811,37813,37831,37847,37853,37861,37871,37879,37889,37897,37907,37951,37957,37963,37967,37987,37991,37993,37997,38011,38039,38047,38053,38069,38083,38113,38119,38149,38153,38167,38177,38183,38189,38197,38201,38219,38231,38237,38239,38261,38273,38281,38287,38299,38303,38317,38321,38327,38329,38333,38351,38371,38377,38393,38431,38447,38449,38453,38459,38461,38501,38543,38557,38561,38567,38569,38593,38603,38609,38611,38629,38639,38651,38653,38669,38671,38677,38693,38699,38707,38711,38713,38723,38729,38737,38747,38749,38767,38783,38791,38803,38821,38833,38839,38851,38861,38867,38873,38891,38903,38917,38921,38923,38933,38953,38959,38971,38977,38993,39019,39023,39041,39043,39047,39079,39089,39097,39103,39107,39113,39119,39133,39139,39157,39161,39163,39181,39191,39199,39209,39217,39227,39229,39233,39239,39241,39251,39293,39301,39313,39317,39323,39341,39343,39359,39367,39371,39373,39383,39397,39409,39419,39439,39443,39451,39461,39499,39503,39509,39511,39521,39541,39551,39563,39569,39581,39607,39619,39623,39631,39659,39667,39671,39679,39703,39709,39719,39727,39733,39749,39761,39769,39779,39791,39799,39821,39827,39829,39839,39841,39847,39857,39863,39869,39877,39883,39887,39901,39929,39937,39953,39971,39979,39983,39989,40009,40013,40031,40037,40039,40063,40087,40093,40099,40111,40123,40127,40129,40151,40153,40163,40169,40177,40189,40193,40213,40231,40237,40241,40253,40277,40283,40289,40343,40351,40357,40361,40387,40423,40427,40429,40433,40459,40471,40483,40487,40493,40499,40507,40519,40529,40531,40543,40559,40577,40583,40591,40597,40609,40627,40637,40639,40693,40697,40699,40709,40739,40751,40759,40763,40771,40787,40801,40813,40819,40823,40829,40841,40847,40849,40853,40867,40879,40883,40897,40903,40927,40933,40939,40949,40961,40973,40993,41011,41017,41023,41039,41047,41051,41057,41077,41081,41113,41117,41131,41141,41143,41149,41161,41177,41179,41183,41189,41201,41203,41213,41221,41227,41231,41233,41243,41257,41263,41269,41281,41299,41333,41341,41351,41357,41381,41387,41389,41399,41411,41413,41443,41453,41467,41479,41491,41507,41513,41519,41521,41539,41543,41549,41579,41593,41597,41603,41609,41611,41617,41621,41627,41641,41647,41651,41659,41669,41681,41687,41719,41729,41737,41759,41761,41771,41777,41801,41809,41813,41843,41849,41851,41863,41879,41887,41893,41897,41903,41911,41927,41941,41947,41953,41957,41959,41969,41981,41983,41999,42013,42017,42019,42023,42043,42061,42071,42073,42083,42089,42101,42131,42139,42157,42169,42179,42181,42187,42193,42197,42209,42221,42223,42227,42239,42257,42281,42283,42293,42299,42307,42323,42331,42337,42349,42359,42373,42379,42391,42397,42403,42407,42409,42433,42437,42443,42451,42457,42461,42463,42467,42473,42487,42491,42499,42509,42533,42557,42569,42571,42577,42589,42611,42641,42643,42649,42667,42677,42683,42689,42697,42701,42703,42709,42719,42727,42737,42743,42751,42767,42773,42787,42793,42797,42821,42829,42839,42841,42853,42859,42863,42899,42901,42923,42929,42937,42943,42953,42961,42967,42979,42989,43003,43013,43019,43037,43049,43051,43063,43067,43093,43103,43117,43133,43151,43159,43177,43189,43201,43207,43223,43237,43261,43271,43283,43291,43313,43319,43321,43331,43391,43397,43399,43403,43411,43427,43441,43451,43457,43481,43487,43499,43517,43541,43543,43573,43577,43579,43591,43597,43607,43609,43613,43627,43633,43649,43651,43661,43669,43691,43711,43717,43721,43753,43759,43777,43781,43783,43787,43789,43793,43801,43853,43867,43889,43891,43913,43933,43943,43951,43961,43963,43969,43973,43987,43991,43997,44017,44021,44027,44029,44041,44053,44059,44071,44087,44089,44101,44111,44119,44123,44129,44131,44159,44171,44179,44189,44201,44203,44207,44221,44249,44257,44263,44267,44269,44273,44279,44281,44293,44351,44357,44371,44381,44383,44389,44417,44449,44453,44483,44491,44497,44501,44507,44519,44531,44533,44537,44543,44549,44563,44579,44587,44617,44621,44623,44633,44641,44647,44651,44657,44683,44687,44699,44701,44711,44729,44741,44753,44771,44773,44777,44789,44797,44809,44819,44839,44843,44851,44867,44879,44887,44893,44909,44917,44927,44939,44953,44959,44963,44971,44983,44987,45007,45013,45053,45061,45077,45083,45119,45121,45127,45131,45137,45139,45161,45179,45181,45191,45197,45233,45247,45259,45263,45281,45289,45293,45307,45317,45319,45329,45337,45341,45343,45361,45377,45389,45403,45413,45427,45433,45439,45481,45491,45497,45503,45523,45533,45541,45553,45557,45569,45587,45589,45599,45613,45631,45641,45659,45667,45673,45677,45691,45697,45707,45737,45751,45757,45763,45767,45779,45817,45821,45823,45827,45833,45841,45853,45863,45869,45887,45893,45943,45949,45953,45959,45971,45979,45989,46021,46027,46049,46051,46061,46073,46091,46093,46099,46103,46133,46141,46147,46153,46171,46181,46183,46187,46199,46219,46229,46237,46261,46271,46273,46279,46301,46307,46309,46327,46337,46349,46351,46381,46399,46411,46439,46441,46447,46451,46457,46471,46477,46489,46499,46507,46511,46523,46549,46559,46567,46573,46589,46591,46601,46619,46633,46639,46643,46649,46663,46679,46681,46687,46691,46703,46723,46727,46747,46751,46757,46769,46771,46807,46811,46817,46819,46829,46831,46853,46861,46867,46877,46889,46901,46919,46933,46957,46993,46997,47017,47041,47051,47057,47059,47087,47093,47111,47119,47123,47129,47137,47143,47147,47149,47161,47189,47207,47221,47237,47251,47269,47279,47287,47293,47297,47303,47309,47317,47339,47351,47353,47363,47381,47387,47389,47407,47417,47419,47431,47441,47459,47491,47497,47501,47507,47513,47521,47527,47533,47543,47563,47569,47581,47591,47599,47609,47623,47629,47639,47653,47657,47659,47681,47699,47701,47711,47713,47717,47737,47741,47743,47777,47779,47791,47797,47807,47809,47819,47837,47843,47857,47869,47881,47903,47911,47917,47933,47939,47947,47951,47963,47969,47977,47981,48017,48023,48029,48049,48073,48079,48091,48109,48119,48121,48131,48157,48163,48179,48187,48193,48197,48221,48239,48247,48259,48271,48281,48299,48311,48313,48337,48341,48353,48371,48383,48397,48407,48409,48413,48437,48449,48463,48473,48479,48481,48487,48491,48497,48523,48527,48533,48539,48541,48563,48571,48589,48593,48611,48619,48623,48647,48649,48661,48673,48677,48679,48731,48733,48751,48757,48761,48767,48779,48781,48787,48799,48809,48817,48821,48823,48847,48857,48859,48869,48871,48883,48889,48907,48947,48953,48973,48989,48991,49003,49009,49019,49031,49033,49037,49043,49057,49069,49081,49103,49109,49117,49121,49123,49139,49157,49169,49171,49177,49193,49199,49201,49207,49211,49223,49253,49261,49277,49279,49297,49307,49331,49333,49339,49363,49367,49369,49391,49393,49409,49411,49417,49429,49433,49451,49459,49463,49477,49481,49499,49523,49529,49531,49537,49547,49549,49559,49597,49603,49613,49627,49633,49639,49663,49667,49669,49681,49697,49711,49727,49739,49741,49747,49757,49783,49787,49789,49801,49807,49811,49823,49831,49843,49853,49871,49877,49891,49919,49921,49927,49937,49939,49943,49957,49991,49993,49999,50021,50023,50033,50047,50051,50053,50069,50077,50087,50093,50101,50111,50119,50123,50129,50131,50147,50153,50159,50177,50207,50221,50227,50231,50261,50263,50273,50287,50291,50311,50321,50329,50333,50341,50359,50363,50377,50383,50387,50411,50417,50423,50441,50459,50461,50497,50503,50513,50527,50539,50543,50549,50551,50581,50587,50591,50593,50599,50627,50647,50651,50671,50683,50707,50723,50741,50753,50767,50773,50777,50789,50821,50833,50839,50849,50857,50867,50873,50891,50893,50909,50923,50929,50951,50957,50969,50971,50989,50993,51001,51031,51043,51047,51059,51061,51071,51109,51131,51133,51137,51151,51157,51169,51193,51197,51199,51203,51217,51229,51239,51241,51257,51263,51283,51287,51307,51329,51341,51343,51347,51349,51361,51383,51407,51413,51419,51421,51427,51431,51437,51439,51449,51461,51473,51479,51481,51487,51503,51511,51517,51521,51539,51551,51563,51577,51581,51593,51599,51607,51613,51631,51637,51647,51659,51673,51679,51683,51691,51713,51719,51721,51749,51767,51769,51787,51797,51803,51817,51827,51829,51839,51853,51859,51869,51871,51893,51899,51907,51913,51929,51941,51949,51971,51973,51977,51991,52009,52021,52027,52051,52057,52067,52069,52081,52103,52121,52127,52147,52153,52163,52177,52181,52183,52189,52201,52223,52237,52249,52253,52259,52267,52289,52291,52301,52313,52321,52361,52363,52369,52379,52387,52391,52433,52453,52457,52489,52501,52511,52517,52529,52541,52543,52553,52561,52567,52571,52579,52583,52609,52627,52631,52639,52667,52673,52691,52697,52709,52711,52721,52727,52733,52747,52757,52769,52783,52807,52813,52817,52837,52859,52861,52879,52883,52889,52901,52903,52919,52937,52951,52957,52963,52967,52973,52981,52999,53003,53017,53047,53051,53069,53077,53087,53089,53093,53101,53113,53117,53129,53147,53149,53161,53171,53173,53189,53197,53201,53231,53233,53239,53267,53269,53279,53281,53299,53309,53323,53327,53353,53359,53377,53381,53401,53407,53411,53419,53437,53441,53453,53479,53503,53507,53527,53549,53551,53569,53591,53593,53597,53609,53611,53617,53623,53629,53633,53639,53653,53657,53681,53693,53699,53717,53719,53731,53759,53773,53777,53783,53791,53813,53819,53831,53849,53857,53861,53881,53887,53891,53897,53899,53917,53923,53927,53939,53951,53959,53987,53993,54001,54011,54013,54037,54049,54059,54083,54091,54101,54121,54133,54139,54151,54163,54167,54181,54193,54217,54251,54269,54277,54287,54293,54311,54319,54323,54331,54347,54361,54367,54371,54377,54401,54403,54409,54413,54419,54421,54437,54443,54449,54469,54493,54497,54499,54503,54517,54521,54539,54541,54547,54559,54563,54577,54581,54583,54601,54617,54623,54629,54631,54647,54667,54673,54679,54709,54713,54721,54727,54751,54767,54773,54779,54787,54799,54829,54833,54851,54869,54877,54881,54907,54917,54919,54941,54949,54959,54973,54979,54983,55001,55009,55021,55049,55051,55057,55061,55073,55079,55103,55109,55117,55127,55147,55163,55171,55201,55207,55213,55217,55219,55229,55243,55249,55259,55291,55313,55331,55333,55337,55339,55343,55351,55373,55381,55399,55411,55439,55441,55457,55469,55487,55501,55511,55529,55541,55547,55579,55589,55603,55609,55619,55621,55631,55633,55639,55661,55663,55667,55673,55681,55691,55697,55711,55717,55721,55733,55763,55787,55793,55799,55807,55813,55817,55819,55823,55829,55837,55843,55849,55871,55889,55897,55901,55903,55921,55927,55931,55933,55949,55967,55987,55997,56003,56009,56039,56041,56053,56081,56087,56093,56099,56101,56113,56123,56131,56149,56167,56171,56179,56197,56207,56209,56237,56239,56249,56263,56267,56269,56299,56311,56333,56359,56369,56377,56383,56393,56401,56417,56431,56437,56443,56453,56467,56473,56477,56479,56489,56501,56503,56509,56519,56527,56531,56533,56543,56569,56591,56597,56599,56611,56629,56633,56659,56663,56671,56681,56687,56701,56711,56713,56731,56737,56747,56767,56773,56779,56783,56807,56809,56813,56821,56827,56843,56857,56873,56891,56893,56897,56909,56911,56921,56923,56929,56941,56951,56957,56963,56983,56989,56993,56999,57037,57041,57047,57059,57073,57077,57089,57097,57107,57119,57131,57139,57143,57149,57163,57173,57179,57191,57193,57203,57221,57223,57241,57251,57259,57269,57271,57283,57287,57301,57329,57331,57347,57349,57367,57373,57383,57389,57397,57413,57427,57457,57467,57487,57493,57503,57527,57529,57557,57559,57571,57587,57593,57601,57637,57641,57649,57653,57667,57679,57689,57697,57709,57713,57719,57727,57731,57737,57751,57773,57781,57787,57791,57793,57803,57809,57829,57839,57847,57853,57859,57881,57899,57901,57917,57923,57943,57947,57973,57977,57991,58013,58027,58031,58043,58049,58057,58061,58067,58073,58099,58109,58111,58129,58147,58151,58153,58169,58171,58189,58193,58199,58207,58211,58217,58229,58231,58237,58243,58271,58309,58313,58321,58337,58363,58367,58369,58379,58391,58393,58403,58411,58417,58427,58439,58441,58451,58453,58477,58481,58511,58537,58543,58549,58567,58573,58579,58601,58603,58613,58631,58657,58661,58679,58687,58693,58699,58711,58727,58733,58741,58757,58763,58771,58787,58789,58831,58889,58897,58901,58907,58909,58913,58921,58937,58943,58963,58967,58979,58991,58997,59009,59011,59021,59023,59029,59051,59053,59063,59069,59077,59083,59093,59107,59113,59119,59123,59141,59149,59159,59167,59183,59197,59207,59209,59219,59221,59233,59239,59243,59263,59273,59281,59333,59341,59351,59357,59359,59369,59377,59387,59393,59399,59407,59417,59419,59441,59443,59447,59453,59467,59471,59473,59497,59509,59513,59539,59557,59561,59567,59581,59611,59617,59621,59627,59629,59651,59659,59663,59669,59671,59693,59699,59707,59723,59729,59743,59747,59753,59771,59779,59791,59797,59809,59833,59863,59879,59887,59921,59929,59951,59957,59971,59981,59999,60013,60017,60029,60037,60041,60077,60083,60089,60091,60101,60103,60107,60127,60133,60139,60149,60161,60167,60169,60209,60217,60223,60251,60257,60259,60271,60289,60293,60317,60331,60337,60343,60353,60373,60383,60397,60413,60427,60443,60449,60457,60493,60497,60509,60521,60527,60539,60589,60601,60607,60611,60617,60623,60631,60637,60647,60649,60659,60661,60679,60689,60703,60719,60727,60733,60737,60757,60761,60763,60773,60779,60793,60811,60821,60859,60869,60887,60889,60899,60901,60913,60917,60919,60923,60937,60943,60953,60961,61001,61007,61027,61031,61043,61051,61057,61091,61099,61121,61129,61141,61151,61153,61169,61211,61223,61231,61253,61261,61283,61291,61297,61331,61333,61339,61343,61357,61363,61379,61381,61403,61409,61417,61441,61463,61469,61471,61483,61487,61493,61507,61511,61519,61543,61547,61553,61559,61561,61583,61603,61609,61613,61627,61631,61637,61643,61651,61657,61667,61673,61681,61687,61703,61717,61723,61729,61751,61757,61781,61813,61819,61837,61843,61861,61871,61879,61909,61927,61933,61949,61961,61967,61979,61981,61987,61991,62003,62011,62017,62039,62047,62053,62057,62071,62081,62099,62119,62129,62131,62137,62141,62143,62171,62189,62191,62201,62207,62213,62219,62233,62273,62297,62299,62303,62311,62323,62327,62347,62351,62383,62401,62417,62423,62459,62467,62473,62477,62483,62497,62501,62507,62533,62539,62549,62563,62581,62591,62597,62603,62617,62627,62633,62639,62653,62659,62683,62687,62701,62723,62731,62743,62753,62761,62773,62791,62801,62819,62827,62851,62861,62869,62873,62897,62903,62921,62927,62929,62939,62969,62971,62981,62983,62987,62989,63029,63031,63059,63067,63073,63079,63097,63103,63113,63127,63131,63149,63179,63197,63199,63211,63241,63247,63277,63281,63299,63311,63313,63317,63331,63337,63347,63353,63361,63367,63377,63389,63391,63397,63409,63419,63421,63439,63443,63463,63467,63473,63487,63493,63499,63521,63527,63533,63541,63559,63577,63587,63589,63599,63601,63607,63611,63617,63629,63647,63649,63659,63667,63671,63689,63691,63697,63703,63709,63719,63727,63737,63743,63761,63773,63781,63793,63799,63803,63809,63823,63839,63841,63853,63857,63863,63901,63907,63913,63929,63949,63977,63997,64007,64013,64019,64033,64037,64063,64067,64081,64091,64109,64123,64151,64153,64157,64171,64187,64189,64217,64223,64231,64237,64271,64279,64283,64301,64303,64319,64327,64333,64373,64381,64399,64403,64433,64439,64451,64453,64483,64489,64499,64513,64553,64567,64577,64579,64591,64601,64609,64613,64621,64627,64633,64661,64663,64667,64679,64693,64709,64717,64747,64763,64781,64783,64793,64811,64817,64849,64853,64871,64877,64879,64891,64901,64919,64921,64927,64937,64951,64969,64997,65003,65011,65027,65029,65033,65053,65063,65071,65089,65099,65101,65111,65119,65123,65129,65141,65147,65167,65171,65173,65179,65183,65203,65213,65239,65257,65267,65269,65287,65293,65309,65323,65327,65353,65357,65371,65381,65393,65407,65413,65419,65423,65437,65447,65449,65479,65497,65519,65521,65537,65539,65543,65551,65557,65563,65579,65581,65587,65599,65609,65617,65629,65633,65647,65651,65657,65677,65687,65699,65701,65707,65713,65717,65719,65729,65731,65761,65777,65789,65809,65827,65831,65837,65839,65843,65851,65867,65881,65899,65921,65927,65929,65951,65957,65963,65981,65983,65993,66029,66037,66041,66047,66067,66071,66083,66089,66103,66107,66109,66137,66161,66169,66173,66179,66191,66221,66239,66271,66293,66301,66337,66343,66347,66359,66361,66373,66377,66383,66403,66413,66431,66449,66457,66463,66467,66491,66499,66509,66523,66529,66533,66541,66553,66569,66571,66587,66593,66601,66617,66629,66643,66653,66683,66697,66701,66713,66721,66733,66739,66749,66751,66763,66791,66797,66809,66821,66841,66851,66853,66863,66877,66883,66889,66919,66923,66931,66943,66947,66949,66959,66973,66977,67003,67021,67033,67043,67049,67057,67061,67073,67079,67103,67121,67129,67139,67141,67153,67157,67169,67181,67187,67189,67211,67213,67217,67219,67231,67247,67261,67271,67273,67289,67307,67339,67343,67349,67369,67391,67399,67409,67411,67421,67427,67429,67433,67447,67453,67477,67481,67489,67493,67499,67511,67523,67531,67537,67547,67559,67567,67577,67579,67589,67601,67607,67619,67631,67651,67679,67699,67709,67723,67733,67741,67751,67757,67759,67763,67777,67783,67789,67801,67807,67819,67829,67843,67853,67867,67883,67891,67901,67927,67931,67933,67939,67943,67957,67961,67967,67979,67987,67993,68023,68041,68053,68059,68071,68087,68099,68111,68113,68141,68147,68161,68171,68207,68209,68213,68219,68227,68239,68261,68279,68281,68311,68329,68351,68371,68389,68399,68437,68443,68447,68449,68473,68477,68483,68489,68491,68501,68507,68521,68531,68539,68543,68567,68581,68597,68611,68633,68639,68659,68669,68683,68687,68699,68711,68713,68729,68737,68743,68749,68767,68771,68777,68791,68813,68819,68821,68863,68879,68881,68891,68897,68899,68903,68909,68917,68927,68947,68963,68993,69001,69011,69019,69029,69031,69061,69067,69073,69109,69119,69127,69143,69149,69151,69163,69191,69193,69197,69203,69221,69233,69239,69247,69257,69259,69263,69313,69317,69337,69341,69371,69379,69383,69389,69401,69403,69427,69431,69439,69457,69463,69467,69473,69481,69491,69493,69497,69499,69539,69557,69593,69623,69653,69661,69677,69691,69697,69709,69737,69739,69761,69763,69767,69779,69809,69821,69827,69829,69833,69847,69857,69859,69877,69899,69911,69929,69931,69941,69959,69991,69997,70001,70003,70009,70019,70039,70051,70061,70067,70079,70099,70111,70117,70121,70123,70139,70141,70157,70163,70177,70181,70183,70199,70201,70207,70223,70229,70237,70241,70249,70271,70289,70297,70309,70313,70321,70327,70351,70373,70379,70381,70393,70423,70429,70439,70451,70457,70459,70481,70487,70489,70501,70507,70529,70537,70549,70571,70573,70583,70589,70607,70619,70621,70627,70639,70657,70663,70667,70687,70709,70717,70729,70753,70769,70783,70793,70823,70841,70843,70849,70853,70867,70877,70879,70891,70901,70913,70919,70921,70937,70949,70951,70957,70969,70979,70981,70991,70997,70999,71011,71023,71039,71059,71069,71081,71089,71119,71129,71143,71147,71153,71161,71167,71171,71191,71209,71233,71237,71249,71257,71261,71263,71287,71293,71317,71327,71329,71333,71339,71341,71347,71353,71359,71363,71387,71389,71399,71411,71413,71419,71429,71437,71443,71453,71471,71473,71479,71483,71503,71527,71537,71549,71551,71563,71569,71593,71597,71633,71647,71663,71671,71693,71699,71707,71711,71713,71719,71741,71761,71777,71789,71807,71809,71821,71837,71843,71849,71861,71867,71879,71881,71887,71899,71909,71917,71933,71941,71947,71963,71971,71983,71987,71993,71999,72019,72031,72043,72047,72053,72073,72077,72089,72091,72101,72103,72109,72139,72161,72167,72169,72173,72211,72221,72223,72227,72229,72251,72253,72269,72271,72277,72287,72307,72313,72337,72341,72353,72367,72379,72383,72421,72431,72461,72467,72469,72481,72493,72497,72503,72533,72547,72551,72559,72577,72613,72617,72623,72643,72647,72649,72661,72671,72673,72679,72689,72701,72707,72719,72727,72733,72739,72763,72767,72797,72817,72823,72859,72869,72871,72883,72889,72893,72901,72907,72911,72923,72931,72937,72949,72953,72959,72973,72977,72997,73009,73013,73019,73037,73039,73043,73061,73063,73079,73091,73121,73127,73133,73141,73181,73189,73237,73243,73259,73277,73291,73303,73309,73327,73331,73351,73361,73363,73369,73379,73387,73417,73421,73433,73453,73459,73471,73477,73483,73517,73523,73529,73547,73553,73561,73571,73583,73589,73597,73607,73609,73613,73637,73643,73651,73673,73679,73681,73693,73699,73709,73721,73727,73751,73757,73771,73783,73819,73823,73847,73849,73859,73867,73877,73883,73897,73907,73939,73943,73951,73961,73973,73999,74017,74021,74027,74047,74051,74071,74077,74093,74099,74101,74131,74143,74149,74159,74161,74167,74177,74189,74197,74201,74203,74209,74219,74231,74257,74279,74287,74293,74297,74311,74317,74323,74353,74357,74363,74377,74381,74383,74411,74413,74419,74441,74449,74453,74471,74489,74507,74509,74521,74527,74531,74551,74561,74567,74573,74587,74597,74609,74611,74623,74653,74687,74699,74707,74713,74717,74719,74729,74731,74747,74759,74761,74771,74779,74797,74821,74827,74831,74843,74857,74861,74869,74873,74887,74891,74897,74903,74923,74929,74933,74941,74959,75011,75013,75017,75029,75037,75041,75079,75083,75109,75133,75149,75161,75167,75169,75181,75193,75209,75211,75217,75223,75227,75239,75253,75269,75277,75289,75307,75323,75329,75337,75347,75353,75367,75377,75389,75391,75401,75403,75407,75431,75437,75479,75503,75511,75521,75527,75533,75539,75541,75553,75557,75571,75577,75583,75611,75617,75619,75629,75641,75653,75659,75679,75683,75689,75703,75707,75709,75721,75731,75743,75767,75773,75781,75787,75793,75797,75821,75833,75853,75869,75883,75913,75931,75937,75941,75967,75979,75983,75989,75991,75997,76001,76003,76031,76039,76079,76081,76091,76099,76103,76123,76129,76147,76157,76159,76163,76207,76213,76231,76243,76249,76253,76259,76261,76283,76289,76303,76333,76343,76367,76369,76379,76387,76403,76421,76423,76441,76463,76471,76481,76487,76493,76507,76511,76519,76537,76541,76543,76561,76579,76597,76603,76607,76631,76649,76651,76667,76673,76679,76697,76717,76733,76753,76757,76771,76777,76781,76801,76819,76829,76831,76837,76847,76871,76873,76883,76907,76913,76919,76943,76949,76961,76963,76991,77003,77017,77023,77029,77041,77047,77069,77081,77093,77101,77137,77141,77153,77167,77171,77191,77201,77213,77237,77239,77243,77249,77261,77263,77267,77269,77279,77291,77317,77323,77339,77347,77351,77359,77369,77377,77383,77417,77419,77431,77447,77471,77477,77479,77489,77491,77509,77513,77521,77527,77543,77549,77551,77557,77563,77569,77573,77587,77591,77611,77617,77621,77641,77647,77659,77681,77687,77689,77699,77711,77713,77719,77723,77731,77743,77747,77761,77773,77783,77797,77801,77813,77839,77849,77863,77867,77893,77899,77929,77933,77951,77969,77977,77983,77999,78007,78017,78031,78041,78049,78059,78079,78101,78121,78137,78139,78157,78163,78167,78173,78179,78191,78193,78203,78229,78233,78241,78259,78277,78283,78301,78307,78311,78317,78341,78347,78367,78401,78427,78437,78439,78467,78479,78487,78497,78509,78511,78517,78539,78541,78553,78569,78571,78577,78583,78593,78607,78623,78643,78649,78653,78691,78697,78707,78713,78721,78737,78779,78781,78787,78791,78797,78803,78809,78823,78839,78853,78857,78877,78887,78889,78893,78901,78919,78929,78941,78977,78979,78989,79031,79039,79043,79063,79087,79103,79111,79133,79139,79147,79151,79153,79159,79181,79187,79193,79201,79229,79231,79241,79259,79273,79279,79283,79301,79309,79319,79333,79337,79349,79357,79367,79379,79393,79397,79399,79411,79423,79427,79433,79451,79481,79493,79531,79537,79549,79559,79561,79579,79589,79601,79609,79613,79621,79627,79631,79633,79657,79669,79687,79691,79693,79697,79699,79757,79769,79777,79801,79811,79813,79817,79823,79829,79841,79843,79847,79861,79867,79873,79889,79901,79903,79907,79939,79943,79967,79973,79979,79987,79997,79999,80021,80039,80051,80071,80077,80107,80111,80141,80147,80149,80153,80167,80173,80177,80191,80207,80209,80221,80231,80233,80239,80251,80263,80273,80279,80287,80309,80317,80329,80341,80347,80363,80369,80387,80407,80429,80447,80449,80471,80473,80489,80491,80513,80527,80537,80557,80567,80599,80603,80611,80621,80627,80629,80651,80657,80669,80671,80677,80681,80683,80687,80701,80713,80737,80747,80749,80761,80777,80779,80783,80789,80803,80809,80819,80831,80833,80849,80863,80897,80909,80911,80917,80923,80929,80933,80953,80963,80989,81001,81013,81017,81019,81023,81031,81041,81043,81047,81049,81071,81077,81083,81097,81101,81119,81131,81157,81163,81173,81181,81197,81199,81203,81223,81233,81239,81281,81283,81293,81299,81307,81331,81343,81349,81353,81359,81371,81373,81401,81409,81421,81439,81457,81463,81509,81517,81527,81533,81547,81551,81553,81559,81563,81569,81611,81619,81629,81637,81647,81649,81667,81671,81677,81689,81701,81703,81707,81727,81737,81749,81761,81769,81773,81799,81817,81839,81847,81853,81869,81883,81899,81901,81919,81929,81931,81937,81943,81953,81967,81971,81973,82003,82007,82009,82013,82021,82031,82037,82039,82051,82067,82073,82129,82139,82141,82153,82163,82171,82183,82189,82193,82207,82217,82219,82223,82231,82237,82241,82261,82267,82279,82301,82307,82339,82349,82351,82361,82373,82387,82393,82421,82457,82463,82469,82471,82483,82487,82493,82499,82507,82529,82531,82549,82559,82561,82567,82571,82591,82601,82609,82613,82619,82633,82651,82657,82699,82721,82723,82727,82729,82757,82759,82763,82781,82787,82793,82799,82811,82813,82837,82847,82883,82889,82891,82903,82913,82939,82963,82981,82997,83003,83009,83023,83047,83059,83063,83071,83077,83089,83093,83101,83117,83137,83177,83203,83207,83219,83221,83227,83231,83233,83243,83257,83267,83269,83273,83299,83311,83339,83341,83357,83383,83389,83399,83401,83407,83417,83423,83431,83437,83443,83449,83459,83471,83477,83497,83537,83557,83561,83563,83579,83591,83597,83609,83617,83621,83639,83641,83653,83663,83689,83701,83717,83719,83737,83761,83773,83777,83791,83813,83833,83843,83857,83869,83873,83891,83903,83911,83921,83933,83939,83969,83983,83987,84011,84017,84047,84053,84059,84061,84067,84089,84121,84127,84131,84137,84143,84163,84179,84181,84191,84199,84211,84221,84223,84229,84239,84247,84263,84299,84307,84313,84317,84319,84347,84349,84377,84389,84391,84401,84407,84421,84431,84437,84443,84449,84457,84463,84467,84481,84499,84503,84509,84521,84523,84533,84551,84559,84589,84629,84631,84649,84653,84659,84673,84691,84697,84701,84713,84719,84731,84737,84751,84761,84787,84793,84809,84811,84827,84857,84859,84869,84871,84913,84919,84947,84961,84967,84977,84979,84991,85009,85021,85027,85037,85049,85061,85081,85087,85091,85093,85103,85109,85121,85133,85147,85159,85193,85199,85201,85213,85223,85229,85237,85243,85247,85259,85297,85303,85313,85331,85333,85361,85363,85369,85381,85411,85427,85429,85439,85447,85451,85453,85469,85487,85513,85517,85523,85531,85549,85571,85577,85597,85601,85607,85619,85621,85627,85639,85643,85661,85667,85669,85691,85703,85711,85717,85733,85751,85781,85793,85817,85819,85829,85831,85837,85843,85847,85853,85889,85903,85909,85931,85933,85991,85999,86011,86017,86027,86029,86069,86077,86083,86111,86113,86117,86131,86137,86143,86161,86171,86179,86183,86197,86201,86209,86239,86243,86249,86257,86263,86269,86287,86291,86293,86297,86311,86323,86341,86351,86353,86357,86369,86371,86381,86389,86399,86413,86423,86441,86453,86461,86467,86477,86491,86501,86509,86531,86533,86539,86561,86573,86579,86587,86599,86627,86629,86677,86689,86693,86711,86719,86729,86743,86753,86767,86771,86783,86813,86837,86843,86851,86857,86861,86869,86923,86927,86929,86939,86951,86959,86969,86981,86993,87011,87013,87037,87041,87049,87071,87083,87103,87107,87119,87121,87133,87149,87151,87179,87181,87187,87211,87221,87223,87251,87253,87257,87277,87281,87293,87299,87313,87317,87323,87337,87359,87383,87403,87407,87421,87427,87433,87443,87473,87481,87491,87509,87511,87517,87523,87539,87541,87547,87553,87557,87559,87583,87587,87589,87613,87623,87629,87631,87641,87643,87649,87671,87679,87683,87691,87697,87701,87719,87721,87739,87743,87751,87767,87793,87797,87803,87811,87833,87853,87869,87877,87881,87887,87911,87917,87931,87943,87959,87961,87973,87977,87991,88001,88003,88007,88019,88037,88069,88079,88093,88117,88129,88169,88177,88211,88223,88237,88241,88259,88261,88289,88301,88321,88327,88337,88339,88379,88397,88411,88423,88427,88463,88469,88471,88493,88499,88513,88523,88547,88589,88591,88607,88609,88643,88651,88657,88661,88663,88667,88681,88721,88729,88741,88747,88771,88789,88793,88799,88801,88807,88811,88813,88817,88819,88843,88853,88861,88867,88873,88883,88897,88903,88919,88937,88951,88969,88993,88997,89003,89009,89017,89021,89041,89051,89057,89069,89071,89083,89087,89101,89107,89113,89119,89123,89137,89153,89189,89203,89209,89213,89227,89231,89237,89261,89269,89273,89293,89303,89317,89329,89363,89371,89381,89387,89393,89399,89413,89417,89431,89443,89449,89459,89477,89491,89501,89513,89519,89521,89527,89533,89561,89563,89567,89591,89597,89599,89603,89611,89627,89633,89653,89657,89659,89669,89671,89681,89689,89753,89759,89767,89779,89783,89797,89809,89819,89821,89833,89839,89849,89867,89891,89897,89899,89909,89917,89923,89939,89959,89963,89977,89983,89989,90001,90007,90011,90017,90019,90023,90031,90053,90059,90067,90071,90073,90089,90107,90121,90127,90149,90163,90173,90187,90191,90197,90199,90203,90217,90227,90239,90247,90263,90271,90281,90289,90313,90353,90359,90371,90373,90379,90397,90401,90403,90407,90437,90439,90469,90473,90481,90499,90511,90523,90527,90529,90533,90547,90583,90599,90617,90619,90631,90641,90647,90659,90677,90679,90697,90703,90709,90731,90749,90787,90793,90803,90821,90823,90833,90841,90847,90863,90887,90901,90907,90911,90917,90931,90947,90971,90977,90989,90997,91009,91019,91033,91079,91081,91097,91099,91121,91127,91129,91139,91141,91151,91153,91159,91163,91183,91193,91199,91229,91237,91243,91249,91253,91283,91291,91297,91303,91309,91331,91367,91369,91373,91381,91387,91393,91397,91411,91423,91433,91453,91457,91459,91463,91493,91499,91513,91529,91541,91571,91573,91577,91583,91591,91621,91631,91639,91673,91691,91703,91711,91733,91753,91757,91771,91781,91801,91807,91811,91813,91823,91837,91841,91867,91873,91909,91921,91939,91943,91951,91957,91961,91967,91969,91997,92003,92009,92033,92041,92051,92077,92083,92107,92111,92119,92143,92153,92173,92177,92179,92189,92203,92219,92221,92227,92233,92237,92243,92251,92269,92297,92311,92317,92333,92347,92353,92357,92363,92369,92377,92381,92383,92387,92399,92401,92413,92419,92431,92459,92461,92467,92479,92489,92503,92507,92551,92557,92567,92569,92581,92593,92623,92627,92639,92641,92647,92657,92669,92671,92681,92683,92693,92699,92707,92717,92723,92737,92753,92761,92767,92779,92789,92791,92801,92809,92821,92831,92849,92857,92861,92863,92867,92893,92899,92921,92927,92941,92951,92957,92959,92987,92993,93001,93047,93053,93059,93077,93083,93089,93097,93103,93113,93131,93133,93139,93151,93169,93179,93187,93199,93229,93239,93241,93251,93253,93257,93263,93281,93283,93287,93307,93319,93323,93329,93337,93371,93377,93383,93407,93419,93427,93463,93479,93481,93487,93491,93493,93497,93503,93523,93529,93553,93557,93559,93563,93581,93601,93607,93629,93637,93683,93701,93703,93719,93739,93761,93763,93787,93809,93811,93827,93851,93871,93887,93889,93893,93901,93911,93913,93923,93937,93941,93949,93967,93971,93979,93983,93997,94007,94009,94033,94049,94057,94063,94079,94099,94109,94111,94117,94121,94151,94153,94169,94201,94207,94219,94229,94253,94261,94273,94291,94307,94309,94321,94327,94331,94343,94349,94351,94379,94397,94399,94421,94427,94433,94439,94441,94447,94463,94477,94483,94513,94529,94531,94541,94543,94547,94559,94561,94573,94583,94597,94603,94613,94621,94649,94651,94687,94693,94709,94723,94727,94747,94771,94777,94781,94789,94793,94811,94819,94823,94837,94841,94847,94849,94873,94889,94903,94907,94933,94949,94951,94961,94993,94999,95003,95009,95021,95027,95063,95071,95083,95087,95089,95093,95101,95107,95111,95131,95143,95153,95177,95189,95191,95203,95213,95219,95231,95233,95239,95257,95261,95267,95273,95279,95287,95311,95317,95327,95339,95369,95383,95393,95401,95413,95419,95429,95441,95443,95461,95467,95471,95479,95483,95507,95527,95531,95539,95549,95561,95569,95581,95597,95603,95617,95621,95629,95633,95651,95701,95707,95713,95717,95723,95731,95737,95747,95773,95783,95789,95791,95801,95803,95813,95819,95857,95869,95873,95881,95891,95911,95917,95923,95929,95947,95957,95959,95971,95987,95989,96001,96013,96017,96043,96053,96059,96079,96097,96137,96149,96157,96167,96179,96181,96199,96211,96221,96223,96233,96259,96263,96269,96281,96289,96293,96323,96329,96331,96337,96353,96377,96401,96419,96431,96443,96451,96457,96461,96469,96479,96487,96493,96497,96517,96527,96553,96557,96581,96587,96589,96601,96643,96661,96667,96671,96697,96703,96731,96737,96739,96749,96757,96763,96769,96779,96787,96797,96799,96821,96823,96827,96847,96851,96857,96893,96907,96911,96931,96953,96959,96973,96979,96989,96997,97001,97003,97007,97021,97039,97073,97081,97103,97117,97127,97151,97157,97159,97169,97171,97177,97187,97213,97231,97241,97259,97283,97301,97303,97327,97367,97369,97373,97379,97381,97387,97397,97423,97429,97441,97453,97459,97463,97499,97501,97511,97523,97547,97549,97553,97561,97571,97577,97579,97583,97607,97609,97613,97649,97651,97673,97687,97711,97729,97771,97777,97787,97789,97813,97829,97841,97843,97847,97849,97859,97861,97871,97879,97883,97919,97927,97931,97943,97961,97967,97973,97987,98009,98011,98017,98041,98047,98057,98081,98101,98123,98129,98143,98179,98207,98213,98221,98227,98251,98257,98269,98297,98299,98317,98321,98323,98327,98347,98369,98377,98387,98389,98407,98411,98419,98429,98443,98453,98459,98467,98473,98479,98491,98507,98519,98533,98543,98561,98563,98573,98597,98621,98627,98639,98641,98663,98669,98689,98711,98713,98717,98729,98731,98737,98773,98779,98801,98807,98809,98837,98849,98867,98869,98873,98887,98893,98897,98899,98909,98911,98927,98929,98939,98947,98953,98963,98981,98993,98999,99013,99017,99023,99041,99053,99079,99083,99089,99103,99109,99119,99131,99133,99137,99139,99149,99173,99181,99191,99223,99233,99241,99251,99257,99259,99277,99289,99317,99347,99349,99367,99371,99377,99391,99397,99401,99409,99431,99439,99469,99487,99497,99523,99527,99529,99551,99559,99563,99571,99577,99581,99607,99611,99623,99643,99661,99667,99679,99689,99707,99709,99713,99719,99721,99733,99761,99767,99787,99793,99809,99817,99823,99829,99833,99839,99859,99871,99877,99881,99901,99907,99923,99929,99961,99971,99989,99991,100003,100019,100043,100049,100057,100069,100103,100109,100129,100151,100153,100169,100183,100189,100193,100207,100213,100237,100267,100271,100279,100291,100297,100313,100333,100343,100357,100361,100363,100379,100391,100393,100403,100411,100417,100447,100459,100469,100483,100493,100501,100511,100517,100519,100523,100537,100547,100549,100559,100591,100609,100613,100621,100649,100669,100673,100693,100699,100703,100733,100741,100747,100769,100787,100799,100801,100811,100823,100829,100847,100853,100907,100913,100927,100931,100937,100943,100957,100981,100987,100999,101009,101021,101027,101051,101063,101081,101089,101107,101111,101113,101117,101119,101141,101149,101159,101161,101173,101183,101197,101203,101207,101209,101221,101267,101273,101279,101281,101287,101293,101323,101333,101341,101347,101359,101363,101377,101383,101399,101411,101419,101429,101449,101467,101477,101483,101489,101501,101503,101513,101527,101531,101533,101537,101561,101573,101581,101599,101603,101611,101627,101641,101653,101663,101681,101693,101701,101719,101723,101737,101741,101747,101749,101771,101789,101797,101807,101833,101837,101839,101863,101869,101873,101879,101891,101917,101921,101929,101939,101957,101963,101977,101987,101999,102001,102013,102019,102023,102031,102043,102059,102061,102071,102077,102079,102101,102103,102107,102121,102139,102149,102161,102181,102191,102197,102199,102203,102217,102229,102233,102241,102251,102253,102259,102293,102299,102301,102317,102329,102337,102359,102367,102397,102407,102409,102433,102437,102451,102461,102481,102497,102499,102503,102523,102533,102539,102547,102551,102559,102563,102587,102593,102607,102611,102643,102647,102653,102667,102673,102677,102679,102701,102761,102763,102769,102793,102797,102811,102829,102841,102859,102871,102877,102881,102911,102913,102929,102931,102953,102967,102983,103001,103007,103043,103049,103067,103069,103079,103087,103091,103093,103099,103123,103141,103171,103177,103183,103217,103231,103237,103289,103291,103307,103319,103333,103349,103357,103387,103391,103393,103399,103409,103421,103423,103451,103457,103471,103483,103511,103529,103549,103553,103561,103567,103573,103577,103583,103591,103613,103619,103643,103651,103657,103669,103681,103687,103699,103703,103723,103769,103787,103801,103811,103813,103837,103841,103843,103867,103889,103903,103913,103919,103951,103963,103967,103969,103979,103981,103991,103993,103997,104003,104009,104021,104033,104047,104053,104059,104087,104089,104107,104113,104119,104123,104147,104149,104161,104173,104179,104183,104207,104231,104233,104239,104243,104281,104287,104297,104309,104311,104323,104327,104347,104369,104381,104383,104393,104399,104417,104459,104471,104473,104479,104491,104513,104527,104537,104543,104549,104551,104561,104579,104593,104597,104623,104639,104651,104659,104677,104681,104683,104693,104701,104707,104711,104717,104723,104729]}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y;y=r(792),p=y.trim,y.strip,c=y.katch,y.bufeq_fast,d=y.uint_to_buffer,l=function(t){return null==t&&(t=""),t+"\n"},e.Encoder=n=function(){function t(t){this.C=t}return t.prototype.frame=function(t){var e;return e=function(){var t,e;for(e=[],t=0;t<5;++t)e.push("-");return e}().join(""),{begin:l(e+"BEGIN PGP "+t+e),end:l(e+"END PGP "+t+e)}},t.prototype.b64e=function(t){var e,r,n,i;return i=t.toString("base64"),64,n=function(){var t,n,o;for(o=[],r=t=0,n=i.length;t<n;r=t+=64)e=Math.min(r+64,i.length),o.push(i.slice(r,e));return o}(),l(n.join("\n"))},t.prototype.header=function(){var t;return function(){var e,r,n,i;for(i=[],e=0,r=(n=["Version: "+this.C.header.version,"Comment: "+this.C.header.comment]).length;e<r;e++)t=n[e],i.push(l(t));return i}.call(this).join("")},t.prototype.encode=function(t,e){var r;return(r=this.frame(t)).begin.concat(this.header(),l(),this.b64e(e),f(e),r.end)},t}(),e.clearsign_header=function(t,e,r){return new n(t).frame("SIGNED MESSAGE").begin.concat(l("Hash: "+r),l(),e)},e.encode=function(t,e,r){return new n(t).encode(e,r)},u=[0,8801531,25875725,17603062,60024545,51751450,35206124,44007191,128024889,120049090,103502900,112007375,70412248,78916387,95990485,88014382,264588937,256049778,240098180,248108927,207005800,215016595,232553829,224014750,140824496,149062475,166599357,157832774,200747345,191980970,176028764,184266919,520933865,529177874,512099556,503334943,480196360,471432179,487973381,496217854,414011600,405478443,422020573,430033190,457094705,465107658,448029500,439496647,281648992,273666971,289622637,298124950,324696449,333198714,315665548,307683447,392699481,401494690,383961940,375687087,352057528,343782467,359738805,368533838,1041867730,1050668841,1066628831,1058355748,1032471859,1024199112,1006669886,1015471301,968368875,960392720,942864358,951368477,975946762,984451313,1000411399,992435708,836562267,828023200,810956886,818967725,844041146,852051777,868605623,860066380,914189410,922427545,938981743,930215316,904825475,896059e3,878993294,887231349,555053627,563297984,547333942,538569677,579245274,570480673,588005847,596249900,649392898,640860153,658384399,666397428,623318499,631331096,615366894,606833685,785398962,777416777,794487231,802989380,759421523,767923880,751374174,743392165,695319947,704115056,687564934,679289981,719477610,711202705,728272487,737067676,2083735460,2092239711,2109313705,2101337682,2141233477,2133257662,2116711496,2125215923,2073216669,2064943718,2048398224,2057199467,2013339772,2022141063,2039215473,2030942602,1945504045,1936737750,1920785440,1929023707,1885728716,1893966647,1911503553,1902736954,1951893524,1959904495,1977441561,1968902626,2009362165,2000822798,1984871416,1992881923,1665111629,1673124534,1656046400,1647513531,1621913772,1613380695,1629922721,1637935450,1688082292,1679317903,1695859321,1704103554,1728967061,1737211246,1720132760,1711368291,1828378820,1820103743,1836060105,1844855090,1869168165,1877963486,1860430632,1852155859,1801148925,1809650950,1792118e3,1784135691,1757986588,1750004711,1765960209,1774462698,1110107254,1118611597,1134571899,1126595968,1102643863,1094667884,1077139354,1085643617,1166763343,1158490548,1140961346,1149762745,1176011694,1184812885,1200772771,1192499800,1307552511,1298785796,1281720306,1289958153,1316768798,1325007077,1341561107,1332794856,1246636998,1254647613,1271201483,1262662192,1239272743,1230733788,1213667370,1221678289,1562785183,1570797924,1554833554,1546300521,1588974462,1580441477,1597965939,1605978760,1518843046,1510078557,1527603627,1535847760,1494504007,1502748348,1486784330,1478020017,1390639894,1382365165,1399434779,1408230112,1366334967,1375129868,1358579962,1350304769,1430452783,1438955220,1422405410,1414423513,1456544974,1448562741,1465633219,1474135352],s=function(t,e){var r,n,i,o;for(null==e&&(e=11994318),r=e,n=0;t.length-n>16;)r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r<<8^u[255&(r>>16^t.readUInt8(n+0))])<<8^u[255&(r>>16^t.readUInt8(n+1))])<<8^u[255&(r>>16^t.readUInt8(n+2))])<<8^u[255&(r>>16^t.readUInt8(n+3))])<<8^u[255&(r>>16^t.readUInt8(n+4))])<<8^u[255&(r>>16^t.readUInt8(n+5))])<<8^u[255&(r>>16^t.readUInt8(n+6))])<<8^u[255&(r>>16^t.readUInt8(n+7))])<<8^u[255&(r>>16^t.readUInt8(n+8))])<<8^u[255&(r>>16^t.readUInt8(n+9))])<<8^u[255&(r>>16^t.readUInt8(n+10))])<<8^u[255&(r>>16^t.readUInt8(n+11))])<<8^u[255&(r>>16^t.readUInt8(n+12))])<<8^u[255&(r>>16^t.readUInt8(n+13))])<<8^u[255&(r>>16^t.readUInt8(n+14))])<<8^u[255&(r>>16^t.readUInt8(n+15))],n+=16;for(i=n,o=t.length;n<=o?i<o:i>o;n<=o?++i:--i)r=r<<8^u[255&(r>>16^t.readUInt8(n++))];return 16777215&r},h=function(t,e){return a(s(t),e)},e.crc24_to_base64=a=function(t,e){return null==e&&(e=!0),(e?"=":"")+d(32,t).slice(1,4).toString("base64")},f=function(t){return l(h(t,!0))},m=function(t,e){return h(t,!1)===e},e.Message=i=function(){function t(t){this.body=t.body,this.type=t.type,this.comment=t.comment,this.version=t.version,this.pre=t.pre,this.post=t.post,this.lines=[],this.fields={},this.payload=null}return t.prototype.unsplit=function(t){return t.join("\n")},t.prototype.raw=function(){return this.unsplit(this.lines)},t.prototype.finish_unframe=function(t){var e,r;if(r=t.pre,e=t.post,this.pre=this.unsplit(r),this.post=this.unsplit(e),null!=this.clearsign)return this.clearsign.body=this.unsplit(this.clearsign.lines)},t.prototype.make_clearsign=function(){return this.clearsign={headers:{},lines:[],body:null}},t}(),e.Parser=o=function(){function e(t,e){this.strict=(null!=e?e:{}).strict,this.init(t)}return e.prototype.init=function(e){return this.data=t.isBuffer(e)?e.toString("utf8"):e,this.lines=this.data.split(/\r?\n/),this.checksum=null,this.body=null,this.type=null,this.ret=null,this.last_type=null},e.prototype.parse=function(){return this.ret=new i({}),this.unframe(),this.check_charset(),this.pop_headers(),this.parse_type(),this.strip_empties_in_footer(),this.strict&&this.verify_base64_lines(),this.trim_lines(),this.find_checksum(),this.read_body(),this.check_checksum(),this.ret},e.prototype.parse_type=function(){return this.ret.type=this.ret.fields.type=this.type},e.prototype.last_line=function(){return this.payload.slice(-1)[0]},e.prototype.mparse=function(){var t,e,r;for(r=[],t=!0;t;)this.skip(),this.lines.length?(e=this.parse(),r.push(e),this.init(e.post)):t=!1;return r},e.prototype.skip=function(){var t;for(t=[];this.lines.length&&!this.lines[0].match(/\S+/);)t.push(this.lines.shift());return t},e.prototype.read_body=function(){var e;return this.ret.payload=this.payload.join("\n"),e=this.payload.join(""),this.ret.body=t.from(e,"base64")},e.prototype.check_checksum=function(){if(this.ret.fields.checksum=this.checksum,null!=this.checksum&&!m(this.ret.body,this.checksum))throw new Error("checksum mismatch")},e.prototype.pop_headers=function(){var t,e,r;for(r=[];this.payload.length;)if(e=(t=this.payload.shift()).match(/^Version: (.*)/))r.push(this.ret.version=e[1]);else if(null!=(e=t.match(/^Comment: (.*)/)))r.push(this.ret.comment=e[1]);else{if(null==t||0===t.length||t.match(/^\s+$/))break;if(!t.match(/^\S+: .+$/))throw new Error("bad PGP armor found; expected a newline")}return r},e.prototype.strip_empties_in_footer=function(){var t,e;for(e=[];null!=(t=this.last_line())?t.match(/^\s*$/):void 0;)e.push(this.payload.pop());return e},e.prototype.verify_base64_lines=function(){var t,e,r,n,i,o;for(e=/^[a-zA-Z0-9\/+=]+$/,80,o=[],r=0,n=(i=this.payload).length;r<n;r++){if(!(t=i[r]).match(e))throw new Error('line "'+t+'" has characters that are not part of base64');if(t.length>80)throw new Error("armor line longer than 80 characters");o.push(void 0)}return o},e.prototype.trim_lines=function(){var t;return this.payload=function(){var e,r,n,i;for(i=[],e=0,r=(n=this.payload).length;e<r;e++)t=n[e],i.push(p(t));return i}.call(this)},e.prototype.find_checksum=function(){var t;if(null!=(t=this.last_line())&&"="===t[0])return this.checksum=this.payload.pop().slice(1)},e.prototype.v_unframe=function(t){return!0},e.prototype.unframe=function(){var t,e,r,n,i,o,s,a,u,f,h,c;for(f=/^(-{5}END PGP (.*?)-{5})(.*)$/m,u=/^(-{5}BEGIN PGP (.*?)-{5}\s*$)/,o=[],h=0,null,null,r=!0,a=[],s=[],c=this,e=function(t,e){return c.ret.clearsign.lines.push(t)},t=function(t,e){return a.push(t)};this.lines.length&&r;)switch(n=this.lines.shift(),h){case-1:if(i=n.match(/^([^:]+): (.*)$/))this.ret.clearsign.headers[i[1].toLowerCase()]=i[2];else{if(!n.match(/^\s*$/))throw new Error("Bad line in clearsign header");h++,t=e}this.ret.lines.push(n);break;case 0:null!=(i=n.match(u))?(t("",!0),this.ret.lines.push(this.ret.clearsign?n:i[1]),null==this.type&&(this.type=i[2]),this.last_type=i[2],"SIGNED MESSAGE"===i[2]?(h--,this.ret.make_clearsign()):h++):(this.ret.clearsign&&this.ret.lines.push(n),t(n,!1));break;case 1:if(i=n.match(f)){if(this.ret.lines.push(i[1]),i[2]!==this.last_type)throw new Error("type mismatch -- begin "+this.last_type+" w/ end "+i[1]);h++,s=[i[3]].concat(this.lines),this.lines=[],r=!1}else this.ret.lines.push(n),o.push(n)}if(0===h)throw new Error("no header found");if(1===h)throw new Error("no tailer found");return this.payload=o,this.ret.finish_unframe({pre:a,post:s})},e.prototype.check_charset=function(){if(null==this.ret.clearsign&&!/^[\n\r\t\x20-\x7e]*$/.test(this.data))throw new Error("invalid character in armor")},e}(),e.decode=function(t){return c((function(){return new o(t).parse()}))},e.mdecode=function(t){return c((function(){return new o(t).mparse()}))},e.compute_crc24=s}).call(this)}).call(this,r(12).Buffer)},function(t,e){(function(){e.parse=function(t){var e,r,n;return e=null,n=/^([^(<]*?)(?:\s*\((.*?)\))?(?:\s*<(.*?)>)?$/,null!=(r=t.match(n))&&(e={username:r[1],comment:r[2],email:r[3]}),e},e.format=function(t){var e,r,n,i;return e=[],(null!=(r=t.username)?r.length:void 0)&&e.push(t.username),(null!=(n=t.comment)?n.length:void 0)&&e.push("("+t.comment+")"),(null!=(i=t.email)?i.length:void 0)&&e.push("<"+t.email+">"),e.join(" ")}}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o;o=r(36),n=r(112).SRF,e.bufxor=i=function(e,r){var n,i,o;return n=function(){var t,n,s;for(s=[],o=t=0,n=e.length;t<n;o=++t)i=e[o],s.push(i^r[o]);return s}(),t.from(n)},e.genseed=function(t,e){var r,s,a,u,f,h,c,l;c=o.findDeferral(arguments),u=t.seed,h=t.split,s=t.len,f=t.server_half,r=a=null,null==f&&(f=null),function(t){if(!(null==u||h&&null==f))return t();!function(t){l=new o.Deferrals(t,{parent:c,filename:"/Users/max/src/keybase/kbpgp/src/keybase/util.iced"}),n().random_bytes(s,l.defer({assign_fn:function(){return a=arguments[0]},lineno:16})),l._fulfill()}(t)}((function(){return null!=u&&u.length!==s?r=new Error("Wrong seed length; need "+s+" bytes; got "+u.length):null!=u&&null!=a?(f=a,u=i(u,a)):null!=u&&null!=f?u=i(u,f):null==u&&(u=a),e(r,{seed:u,server_half:f})}))},e.prefix_signature_payload=function(e,r){var n;return n=[],(null!=e?e.length:void 0)&&(n.push(e),n.push(t.from([0]))),null!=r&&n.push(r),n.length?t.concat(n):null}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){var n=r(795),i=r(796),o=r(1335);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){var n=r(348).BigInteger,i=r(1336),o=r(796);t.exports=function(t){var e=i[t];if(!e)return null;var r=new n(e.p,16),s=new n(e.a,16),a=new n(e.b,16),u=new n(e.n,16),f=new n(e.h,16),h=new n(e.Gx,16),c=new n(e.Gy,16);return new o(r,s,a,h,c,u,f)}},function(t){t.exports=JSON.parse('{"secp128r1":{"p":"fffffffdffffffffffffffffffffffff","a":"fffffffdfffffffffffffffffffffffc","b":"e87579c11079f43dd824993c2cee5ed3","n":"fffffffe0000000075a30d1b9038a115","h":"01","Gx":"161ff7528b899b2d0c28607ca52c5b86","Gy":"cf5ac8395bafeb13c02da292dded7a83"},"secp160k1":{"p":"fffffffffffffffffffffffffffffffeffffac73","a":"00","b":"07","n":"0100000000000000000001b8fa16dfab9aca16b6b3","h":"01","Gx":"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb","Gy":"938cf935318fdced6bc28286531733c3f03c4fee"},"secp160r1":{"p":"ffffffffffffffffffffffffffffffff7fffffff","a":"ffffffffffffffffffffffffffffffff7ffffffc","b":"1c97befc54bd7a8b65acf89f81d4d4adc565fa45","n":"0100000000000000000001f4c8f927aed3ca752257","h":"01","Gx":"4a96b5688ef573284664698968c38bb913cbfc82","Gy":"23a628553168947d59dcc912042351377ac5fb32"},"secp192k1":{"p":"fffffffffffffffffffffffffffffffffffffffeffffee37","a":"00","b":"03","n":"fffffffffffffffffffffffe26f2fc170f69466a74defd8d","h":"01","Gx":"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d","Gy":"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},"secp192r1":{"p":"fffffffffffffffffffffffffffffffeffffffffffffffff","a":"fffffffffffffffffffffffffffffffefffffffffffffffc","b":"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1","n":"ffffffffffffffffffffffff99def836146bc9b1b4d22831","h":"01","Gx":"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012","Gy":"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},"secp256k1":{"p":"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","a":"00","b":"07","n":"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","h":"01","Gx":"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","Gy":"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},"secp256r1":{"p":"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff","a":"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc","b":"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b","n":"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551","h":"01","Gx":"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296","Gy":"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}')},function(t,e){},function(t,e,r){(function(t){(function(){var n,i,o={}.hasOwnProperty;i=r(798).bufeq_secure,n=r(799).Base,e.Sodium=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)o.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype._detach=function(t){var e;return e=this.lib.c.crypto_sign_BYTES,{sig:t.slice(0,e),payload:t.slice(e)}},r.prototype._pad=function(e){return t.concat([t.alloc(16),e])},r.prototype._unpad=function(t){return t.slice(16)},r.prototype.verify=function(e){var r,n,o,s,a,u;return s=e.payload,u=e.sig,(r=e.detached)&&null==s?[n=new Error("in detached mode, you must supply a payload"),null]:(o=r?t.concat([u,s]):u,null==(a=this.lib.c.crypto_sign_open(o,this.publicKey))?n=new Error("Signature failed to verify"):r||(null==s?s=a:i(a,s)||(n=new Error("got unexpected payload"))),null!=n&&(s=null),[n,s])},r.prototype.sign=function(t){var e,r,n;return e=t.detached,r=t.payload,n=this.lib.c.crypto_sign(r,this.secretKey),e?this._detach(n).sig:n},r.prototype.encrypt=function(t){var e,r,n;return r=t.plaintext,e=t.nonce,n=t.pubkey,this._unpad(this.lib.c.crypto_box(r,e,n,this.secretKey))},r.prototype.secretbox=function(t){var e,r;return r=t.plaintext,e=t.nonce,this._unpad(this.lib.c.crypto_secretbox(r,e,this.secretKey))},r.prototype.decrypt=function(t){var e,r,n,i;if(e=t.ciphertext,r=t.nonce,i=t.pubkey,n=this.lib.c.crypto_box_open(this._pad(e),r,i,this.secretKey))return n;throw new Error("Sodium decrypt failed!")},r.prototype.secretbox_open=function(t){var e,r,n;if(e=t.ciphertext,r=t.nonce,n=this.lib.c.crypto_secretbox_open(this._pad(e),r,this.secretKey))return n;throw new Error("Sodium secretbox_open failed!")},r.prototype.box_beforenm=function(t){var e,r;return e=t.pubkey,r=t.seckey,this.lib.c.crypto_box_beforenm(e,r)},r.prototype.box_open_afternm=function(t){var e,r,n,i;if(e=t.ciphertext,r=t.nonce,i=t.secret,n=this.lib.c.crypto_box_open_afternm(this._pad(e),r,i))return n;throw new Error("Sodium box_open_afternm failed!")},r.prototype.scalarmult_base=function(e){return t.from(this.lib.c.crypto_scalarmult_base(e))},r.prototype.scalarmult=function(e,r){return t.from(this.lib.c.crypto_scalarmult(e,r))},r}(n)}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u={}.hasOwnProperty;o=r(798).bufeq_secure,a=r(799),i=a.b2u,s=a.u2b,n=a.Base,e.TweetNaCl=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return function(t,e){for(var r in e)u.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.verify=function(e){var r,n,a,u;return n=e.payload,u=e.sig,r=null,e.detached?(null==n&&(n=t.alloc(0)),this.lib.js.sign.detached.verify(i(n),i(u),i(this.publicKey))||(r=new Error("Signature failed to verify"))):null==(a=this.lib.js.sign.open(i(u),i(this.publicKey)))?r=new Error("signature didn't verify"):null==(a=s(a))?r=new Error("failed to convert from a Uint8Array to a buffer"):null==n||o(a,n)?n=a:r=new Error("got unexpected payload"),null!=r&&(n=null),[r,n]},r.prototype.sign=function(t){var e,r;return r=t.payload,e=t.detached?this.lib.js.sign.detached:this.lib.js.sign,s(e(i(r),i(this.secretKey)))},r.prototype.encrypt=function(t){var e,r,n;return r=t.plaintext,e=t.nonce,n=t.pubkey,s(this.lib.js.box(r,e,n,this.secretKey))},r.prototype.secretbox=function(t){var e,r;return r=t.plaintext,e=t.nonce,s(this.lib.js.secretbox(r,e,this.secretKey))},r.prototype.decrypt=function(t){var e,r,n,o;if(e=t.ciphertext,r=t.nonce,o=t.pubkey,n=this.lib.js.box.open(i(e),r,o,this.secretKey))return s(n);throw new Error("TweetNaCl box_open failed!")},r.prototype.secretbox_open=function(t){var e,r,n;if(e=t.ciphertext,r=t.nonce,n=this.lib.js.secretbox.open(i(e),r,this.secretKey))return s(n);throw new Error("TweetNaCl secretbox_open failed!")},r.prototype.box_beforenm=function(t){var e,r;return e=t.pubkey,r=t.seckey,s(this.lib.js.box.before(e,r))},r.prototype.box_open_afternm=function(t){var e,r,n,o;if(e=t.ciphertext,r=t.nonce,o=t.secret,n=this.lib.js.box.open.after(i(e),r,o))return s(n);throw new Error("TweetNaCl box_open_afternm failed!")},r.prototype.scalarmult_base=function(e){return t.from(this.lib.js.scalarMult.base(e))},r.prototype.scalarmult=function(e,r){return t.from(this.lib.js.scalarMult(e,r))},r}(n)}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o,s,a;r(101).WordArray,a=r(56),s=a.ui8a_to_ui32a,o=a.ui32a_to_ui8a,i=function(){function t(){this.init_schedule(),this.init_sbox()}return t.prototype.init_schedule=function(){var t,e;return(t=new Array(4))[0]=new Array(4),t[0][0]=new Uint8Array([4,0,13,15,12,14,8]),t[0][1]=new Uint8Array([5,2,16,18,17,19,10]),t[0][2]=new Uint8Array([6,3,23,22,21,20,9]),t[0][3]=new Uint8Array([7,1,26,25,27,24,11]),t[1]=new Array(4),t[1][0]=new Uint8Array([0,6,21,23,20,22,16]),t[1][1]=new Uint8Array([1,4,0,2,1,3,18]),t[1][2]=new Uint8Array([2,5,7,6,5,4,17]),t[1][3]=new Uint8Array([3,7,10,9,11,8,19]),t[2]=new Array(4),t[2][0]=new Uint8Array([4,0,13,15,12,14,8]),t[2][1]=new Uint8Array([5,2,16,18,17,19,10]),t[2][2]=new Uint8Array([6,3,23,22,21,20,9]),t[2][3]=new Uint8Array([7,1,26,25,27,24,11]),t[3]=new Array(4),t[3][0]=new Uint8Array([0,6,21,23,20,22,16]),t[3][1]=new Uint8Array([1,4,0,2,1,3,18]),t[3][2]=new Uint8Array([2,5,7,6,5,4,17]),t[3][3]=new Uint8Array([3,7,10,9,11,8,19]),(e=new Array(4))[0]=new Array(4),e[0][0]=new Uint8Array([24,25,23,22,18]),e[0][1]=new Uint8Array([26,27,21,20,22]),e[0][2]=new Uint8Array([28,29,19,18,25]),e[0][3]=new Uint8Array([30,31,17,16,28]),e[1]=new Array(4),e[1][0]=new Uint8Array([3,2,12,13,8]),e[1][1]=new Uint8Array([1,0,14,15,13]),e[1][2]=new Uint8Array([7,6,8,9,3]),e[1][3]=new Uint8Array([5,4,10,11,7]),e[2]=new Array(4),e[2][0]=new Uint8Array([19,18,28,29,25]),e[2][1]=new Uint8Array([17,16,30,31,28]),e[2][2]=new Uint8Array([23,22,24,25,18]),e[2][3]=new Uint8Array([21,20,26,27,22]),e[3]=new Array(4),e[3][0]=new Uint8Array([8,9,7,6,3]),e[3][1]=new Uint8Array([10,11,5,4,7]),e[3][2]=new Uint8Array([12,13,3,2,8]),e[3][3]=new Uint8Array([14,15,1,0,13]),this.scheduleA=t,this.scheduleB=e},t.prototype.init_sbox=function(){var t;return(t=new Array(8))[0]=new Uint32Array([821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063]),t[1]=new Uint32Array([522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321]),t[2]=new Uint32Array([2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027]),t[3]=new Uint32Array([2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730]),t[4]=new Uint32Array([2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860]),t[5]=new Uint32Array([4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975]),t[6]=new Uint32Array([2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875]),t[7]=new Uint32Array([3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]),this.sBox=t},t}(),n=new i,t=function(){function t(t){var e;if(this.masking=new Array(16),this.rotate=new Array(16),this.reset(),t.sigBytes!==(e=this.keySize))throw new Error("key must be "+e+" bytes");this.keySchedule(t)}return t.blockSize=8,t.prototype.blockSize=t.blockSize,t.keySize=16,t.prototype.keySize=t.keySize,t.prototype.reset=function(){var t,e,r;for(r=[],t=e=0;e<16;t=++e)this.masking[t]=0,r.push(this.rotate[t]=0);return r},t.prototype.encryptBlock=function(t,e){var r,n;return null==e&&(e=0),r=o(t),n=this._encrypt_ui8a(r),s(n,t)},t.prototype.decryptBlock=function(t,e){var r,n;return null==e&&(e=0),r=o(t),n=this._decrypt_ui8a(r),s(n,t)},t.prototype._encrypt_ui8a=function(t){var e,r,n,i,o,s,a;for(i=t.length,e=new Uint8Array(i),r=a=0;a<i;r=a+=8)n=t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3],s=o=t[r+4]<<24|t[r+5]<<16|t[r+6]<<8|t[r+7],o=n^this.f1(o,this.masking[0],this.rotate[0]),n=s,s=o,o=n^this.f2(o,this.masking[1],this.rotate[1]),n=s,s=o,o=n^this.f3(o,this.masking[2],this.rotate[2]),n=s,s=o,o=n^this.f1(o,this.masking[3],this.rotate[3]),n=s,s=o,o=n^this.f2(o,this.masking[4],this.rotate[4]),n=s,s=o,o=n^this.f3(o,this.masking[5],this.rotate[5]),n=s,s=o,o=n^this.f1(o,this.masking[6],this.rotate[6]),n=s,s=o,o=n^this.f2(o,this.masking[7],this.rotate[7]),n=s,s=o,o=n^this.f3(o,this.masking[8],this.rotate[8]),n=s,s=o,o=n^this.f1(o,this.masking[9],this.rotate[9]),n=s,s=o,o=n^this.f2(o,this.masking[10],this.rotate[10]),n=s,s=o,o=n^this.f3(o,this.masking[11],this.rotate[11]),n=s,s=o,o=n^this.f1(o,this.masking[12],this.rotate[12]),n=s,s=o,o=n^this.f2(o,this.masking[13],this.rotate[13]),n=s,s=o,o=n^this.f3(o,this.masking[14],this.rotate[14]),n=s,s=o,o=n^this.f1(o,this.masking[15],this.rotate[15]),n=s,e[r]=o>>>24&255,e[r+1]=o>>>16&255,e[r+2]=o>>>8&255,e[r+3]=255&o,e[r+4]=n>>>24&255,e[r+5]=n>>>16&255,e[r+6]=n>>>8&255,e[r+7]=255&n;return e},t.prototype._decrypt_ui8a=function(t){var e,r,n,i,o,s,a;for(i=t.length,e=new Uint8Array(i),r=a=0;a<i;r=a+=8)n=t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3],s=o=t[r+4]<<24|t[r+5]<<16|t[r+6]<<8|t[r+7],o=n^this.f1(o,this.masking[15],this.rotate[15]),n=s,s=o,o=n^this.f3(o,this.masking[14],this.rotate[14]),n=s,s=o,o=n^this.f2(o,this.masking[13],this.rotate[13]),n=s,s=o,o=n^this.f1(o,this.masking[12],this.rotate[12]),n=s,s=o,o=n^this.f3(o,this.masking[11],this.rotate[11]),n=s,s=o,o=n^this.f2(o,this.masking[10],this.rotate[10]),n=s,s=o,o=n^this.f1(o,this.masking[9],this.rotate[9]),n=s,s=o,o=n^this.f3(o,this.masking[8],this.rotate[8]),n=s,s=o,o=n^this.f2(o,this.masking[7],this.rotate[7]),n=s,s=o,o=n^this.f1(o,this.masking[6],this.rotate[6]),n=s,s=o,o=n^this.f3(o,this.masking[5],this.rotate[5]),n=s,s=o,o=n^this.f2(o,this.masking[4],this.rotate[4]),n=s,s=o,o=n^this.f1(o,this.masking[3],this.rotate[3]),n=s,s=o,o=n^this.f3(o,this.masking[2],this.rotate[2]),n=s,s=o,o=n^this.f2(o,this.masking[1],this.rotate[1]),n=s,s=o,o=n^this.f1(o,this.masking[0],this.rotate[0]),n=s,e[r]=o>>>24&255,e[r+1]=o>>>16&255,e[r+2]=o>>>8&255,e[r+3]=255&o,e[r+4]=n>>>24&255,e[r+5]=n>>16&255,e[r+6]=n>>8&255,e[r+7]=255&n;return e},t.prototype.keySchedule=function(t){var e,r,i,o,s,a,u,f,h,c,l,p,d,m,y,_,g;for(h=function(){var e,r,n,i;for(i=[],e=0,r=(n=t.words).length;e<r;e++)u=n[e],i.push(u);return i}(),s=new Array(32),l=[6,7,4,5],a=0,p=0;p<2;++p)for(f=d=0;d<4;f=++d){for(o=m=0;m<4;o=++m)c=h[(e=n.scheduleA[f][o])[1]],c^=n.sBox[4][h[e[2]>>>2]>>>24-8*(3&e[2])&255],c^=n.sBox[5][h[e[3]>>>2]>>>24-8*(3&e[3])&255],c^=n.sBox[6][h[e[4]>>>2]>>>24-8*(3&e[4])&255],c^=n.sBox[7][h[e[5]>>>2]>>>24-8*(3&e[5])&255],c^=n.sBox[l[o]][h[e[6]>>>2]>>>24-8*(3&e[6])&255],h[e[0]]=c;for(o=y=0;y<4;o=++y)r=n.scheduleB[f][o],c=n.sBox[4][h[r[0]>>>2]>>>24-8*(3&r[0])&255],c^=n.sBox[5][h[r[1]>>>2]>>>24-8*(3&r[1])&255],c^=n.sBox[6][h[r[2]>>>2]>>>24-8*(3&r[2])&255],c^=n.sBox[7][h[r[3]>>>2]>>>24-8*(3&r[3])&255],c^=n.sBox[4+o][h[r[4]>>>2]>>>24-8*(3&r[4])&255],s[a]=c,a++}for(g=[],i=_=0;_<16;i=++_)this.masking[i]=s[i],g.push(this.rotate[i]=31&s[16+i]);return g},t.prototype.f1=function(t,e,r){var i,o;return i=(o=e+t)<<r|o>>>32-r,(n.sBox[0][i>>>24]^n.sBox[1][i>>>16&255])-n.sBox[2][i>>>8&255]+n.sBox[3][255&i]},t.prototype.f2=function(t,e,r){var i,o;return i=(o=e^t)<<r|o>>>32-r,n.sBox[0][i>>>24]-n.sBox[1][i>>>16&255]+n.sBox[2][i>>>8&255]^n.sBox[3][255&i]},t.prototype.f3=function(t,e,r){var i,o;return i=(o=e-t)<<r|o>>>32-r,(n.sBox[0][i>>>24]+n.sBox[1][i>>>16&255]^n.sBox[2][i>>>8&255])-n.sBox[3][255&i]},t}(),e.CAST5=t}).call(this)},function(t,e,r){(function(){var t,n,i,o;n=r(101).WordArray,r(56).bufeq_secure,t=n.from_hex("A6A6A6A6A6A6A6A6"),o=function(t){return t.split(t.words.length>>1)},e.wrap=function(e){var r,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w,k;if(d=e.plaintext,p=e.key,h=e.cipher,c=(k=i({input:d,key:p,cipher:h}))[0],u=k[1],o=k[2],null!=c)throw c;for(r=t,f=u,y=new n([0,0]),_=0;_<6;++_)for(l=g=0,v=f.length;g<v;l=++g)m=f[l],y.words[1]++,s=r.clone().concat(m),o.encryptBlock(s.words),r=s.slice(0,2),f[l]=s.slice(2,4),r.xor(y,{});for(a=r,b=0,w=f.length;b<w;b++)m=f[b],a.concat(m);return a.to_buffer()},i=function(t){var e,r,i,s,a,u,f,h,c;return h=t.input,c=t.key,u=t.cipher,i=o(n.from_buffer(h)),r=n.from_buffer(c),e=new(0,u.klass)(r),f=null,(s=u.key_size)!==(a=c.length)&&(f=new Error("Bad key, needed "+s+" bytes, but got "+a)),[f,i,e]},e.unwrap=function(e){var r,o,s,a,u,f,h,c,l,p,d,m,y,_,g,b,v,w;if(c=e.ciphertext,d=e.key,h=e.cipher,l=(w=i({input:c,key:d,cipher:h}))[0],a=w[1],o=w[2],w[3],null!=l)return[l,null];for(r=a[0],f=a.slice(1),y=new n([0,6*f.length]),_=0;_<6;++_)for(p=g=f.length-1;g>=0;p=g+=-1)m=f[p],r.xor(y,{}),s=r.clone().concat(m),o.decryptBlock(s.words),r=s.slice(0,2),f[p]=s.slice(2,4),y.words[1]--;if(r.equal(t)){for(u=new n([]),b=0,v=f.length;b<v;b++)m=f[b],u.concat(m);return[null,u.to_buffer()]}return[new Error("integrity check failure; got bad IV in decryption"),null]}}).call(this)},function(t,e,r){(function(){var t,n,i,o,s,a={}.hasOwnProperty,u=function(t,e){for(var r in e)a.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};t=r(41),i=function(){function e(e){this.generated=e.generated,this.expire_in=e.expire_in,void 0===this.expire_in&&(this.expire_in=t.default_key_expire_in)}return e.prototype.expires_earlier_than=function(t){return!(t.expire_in||!this.expire_in)||!(this.expire_in&&!t.expire_in)&&(!(!this.expire_in&&!t.expire_in)&&this.generated+this.expire_in<t.generated+t.expire_in)},e.prototype.copy=function(){return new e({generated:this.generated,expire_in:this.expire_in})},e}(),s=function(t){function e(t){var r,n,i,o,s;n=t.key,r=t.flags,s=t._pgp,o=t._keybase,this.desc=t.desc,i=t.lifespan,this.primary=t.primary,e.__super__.constructor.call(this,{key:n,lifespan:i,flags:r,_pgp:s,_keybase:o})}return u(e,t),e}(n=function(){function t(t){this.key=t.key,this.lifespan=t.lifespan,this._pgp=t._pgp,this._keybase=t._keybase,this.flags=t.flags}return t.prototype.ekid=function(){return this.key.ekid()},t.prototype.overwrite_with_omitting_revokes=function(t){if(!t._pgp.is_revoked())return this._pgp.is_revoked()||this.lifespan.expires_earlier_than(t.lifespan)?(this.key=t.key,this.lifespan=t.lifespan,this._pgp=t._pgp,this._keybase=t._keybase,this.flags=t.flags,t):void 0},t}()),o=function(t){function e(t){var r,n,i,o,s;n=t.key,i=t.lifespan,r=t.flags,s=t._pgp,o=t._keybase,e.__super__.constructor.call(this,{key:n,lifespan:i,flags:r,_pgp:s,_keybase:o})}return u(e,t),e}(n),e.Lifespan=i,e.Subkey=s,e.Primary=o}).call(this)},function(t){t.exports=JSON.parse('{"_args":[["kbpgp@2.1.13","/home/travis/build/gchq/CyberChef"]],"_from":"kbpgp@2.1.13","_id":"kbpgp@2.1.13","_inBundle":false,"_integrity":"sha512-57ryh9TrOhkSqMXzaXsSJgffn11Qkkc960Wj9UzdNln6wERxesIbGoDBYCtlikvYZ/G5SscRNnXEP4Vx8lqKvQ==","_location":"/kbpgp","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"kbpgp@2.1.13","name":"kbpgp","escapedName":"kbpgp","rawSpec":"2.1.13","saveSpec":null,"fetchSpec":"2.1.13"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/kbpgp/-/kbpgp-2.1.13.tgz","_spec":"2.1.13","_where":"/home/travis/build/gchq/CyberChef","author":{"name":"Maxwell Krohn"},"bugs":{"url":"https://github.com/keybase/kbpgp/issues"},"dependencies":{"bn":"^1.0.5","bzip-deflate":"^1.0.0","deep-equal":"^1.1.0","iced-error":"0.0.13","iced-lock":"^1.0.2","iced-runtime":"^1.0.4","keybase-ecurve":"^1.0.1","keybase-nacl":"^1.1.2","minimist":"^1.2.0","pgp-utils":"0.0.35","purepack":"^1.0.5","triplesec":"^4.0.3","tweetnacl":"^0.13.1"},"description":"Keybase\'s PGP Implementation","devDependencies":{"browserify":"^16.5.0","colors":"0.6.2","iced-coffee-script":"108.0.11","iced-test":"0.0.30","icsify":"^0.8.0","uglify-js":"^2.8.29"},"directories":{"lib":"lib/"},"homepage":"http://github.com/keybase/kbpgp","keywords":["crypto","pgp","keybase"],"license":"BSD-3-Clause","main":"./lib/main.js","name":"kbpgp","repository":{"type":"git","url":"git://github.com/keybase/kbpgp.git"},"scripts":{"test":"make test"},"types":"./index.d.ts","version":"2.1.13"}')},function(t,e,r){(function(){var t,n,i,o,s,a,u,f,h,c,l,p={}.hasOwnProperty,d=function(t,e){for(var r in e)p.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r(140),(f=r(56)).bufeq_secure,f.ASP,r(73).make_esc,u=r(41),i=u.openpgp,u.kb,h=r(207),n=h.BaseKeyPair,t=h.BaseKey,(c=r(112)).SRF,c.MRF,(l=r(418)).eme_pkcs1_encode,l.eme_pkcs1_decode,a=function(e){function r(t){this.raw=t}return d(r,e),r.type=i.public_key_algorithms.ELGAMAL_SIGN_AND_ENCRYPT,r.prototype.type=r.type,r.ORDER=[],r.prototype.ORDER=r.ORDER,r.alloc=function(e){return t.alloc(r,e)},r.prototype.encrypt=function(t,e){return e(null)},r}(t),s=function(e){function r(t){this.raw=t}return d(r,e),r.ORDER=[],r.prototype.ORDER=r.ORDER,r.prototype.serialize=function(){return null},r.alloc=function(e,n){return t.alloc(r,e,{pub:n})},r.prototype.decrypt=function(t,e){return e(null)},r}(t),o=function(t){function e(t){var r,n;n=t.pub,r=t.priv,e.__super__.constructor.call(this,{pub:n,priv:r})}return d(e,t),e.Pub=a,e.prototype.Pub=a,e.Priv=s,e.prototype.Priv=s,e.type=i.public_key_algorithms.ELGAMAL_SIGN_AND_ENCRYPT,e.prototype.type=e.type,e.prototype.fulfills_flags=function(t){return!1},e.prototype.is_toxic=function(){return!0},e.prototype.can_sign=function(){return!1},e.prototype.can_decrypt=function(){return!1},e.prototype.err=function(){return new Error("refusing to use ElGamal Sign+Encrypt")},e.parse=function(t){return n.parse(e,t)},e.prototype.pad_and_encrypt=function(t,e){return e(this.err(),null)},e.prototype.decrypt_and_unpad=function(t,e,r){return r(this.err(),null)},e.parse_output=function(t){return null},e.prototype.export_output=function(t){return null},e}(n),e.ElGamalSignEncrypt=e.Pair=o}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c;r(101),n=r(41).openpgp,c=r(113),a=c.alloc,o=c.SHA256,f=c.streamers,i=function(){function e(){this.hash=o,this.streamer=f.SHA256()}return e.prototype._count=function(t,e){return 16+(15&t)<<(t>>4)+e},e.prototype.set_hash_algorithm=function(t){return null!=(this.hash=a(t))?this.streamer=f[this.hash.algname]():(console.warn("No such hash: "+t+"; defaulting to SHA-256"),this.hash=o,this.streamer=f.SHA256())},e.prototype.read=function(t){var e;switch(this.type=t.read_uint8(),this.type){case n.s2k.plain:this.set_hash_algorithm(t.read_uint8());break;case n.s2k.salt:this.set_hash_algorithm(t.read_uint8()),this.salt=t.read_buffer(8);break;case n.s2k.salt_iter:this.set_hash_algorithm(t.read_uint8()),this.salt=t.read_buffer(8),this.EXPBIAS=6,e=t.read_uint8(),this.count=this._count(e,this.EXPBIAS);break;case n.s2k.gnu:this.read_gnu_extensions(t);break;default:throw new Error("unknown s2k type! "+this.type)}return this},e.prototype.read_gnu_extensions=function(t){var e;if(t.read_uint8(),"GNU"!==t.read_buffer(3).toString("utf8"))throw new Error("Malformed GNU-extension: "+ext);switch(e=t.read_uint8()+1e3){case 1001:return this.type=n.s2k.gnu_dummy;default:throw new Error("unknown s2k gnu protection mode: "+e)}},e.prototype.write=function(t,e,r,n){return this.type=3,this.salt=e,this.count=this._count(r,6),this.s2kLength=10,this.produce_key(t,n)},e.prototype.is_dummy=function(){return this.type===n.s2k.gnu_dummy},e.prototype.produce_key=function(e,r){var i,o,s,a;return null==r&&(r=16),function(){switch(this.type){case n.s2k.plain:return this.hash(e);case n.s2k.salt:return this.hash(t.concat([this.salt,e]));case n.s2k.salt_iter:return a=t.concat([this.salt,e]),i=u({alg:this.hash.algname,seed:a,count:this.count}),null==r||24!==r&&32!==r?i:(s=t.from([0]),o=u({alg:this.hash.algname,seed:a,count:this.count,prefix:s}),t.concat([i,o]));default:return null}}.call(this).slice(0,r)},e}(),h={},u=function(e){var r,n,i,o,s,a,u,c,l,p,d,m;if(r=e.alg,l=e.seed,i=e.count,a=e.prefix,o=r+"-"+l.toString("base64")+"-"+i,null!=a&&(o+="-"+a.toString("base64")),null!=(m=h[o]))return m;for(p=f[r](),null!=a&&p.update(a),n=t.concat(function(){var t,e;for(e=[],t=0;t<4096;++t)e.push(l);return e}()),d=0;d+n.length<=i;)p.update(n),d+=n.length;return u=i-d,s=Math.ceil(u/l.length),c=p(t.concat(function(){var t,e;for(e=[],t=0;0<=s?t<s:t>s;0<=s?++t:--t)e.push(l);return e}()).slice(0,u)),h[o]=c,c},s=function(){function t(){this.s2k_convention=null,this.s2k=null,this.iv=null,this.cipher=null,this.payload=null}return t.prototype.is_dummy=function(){return null!=this.s2k&&this.s2k.is_dummy()},t.prototype.has_private=function(){return!this.is_dummy()},t.prototype.is_locked=function(){return this.s2k_convention!==n.s2k_convention.none&&!this.is_dummy()},t}(),e.S2K=i,e.SecretKeyMaterial=s}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h,c,l,p,d,m,y,_={}.hasOwnProperty,g=function(t,e){for(var r in e)_.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};l=r(36),f=r(101).WordArray,u=r(235).SlicerBuffer,y=r(101),n=y.ciphers.AES,i=r(217).util.ASP,p=r(73).make_esc,d=function(e,r){return t.concat([e,e.slice(e.length-r)])},o=function(){function e(t){var e,r;this.block_cipher_class=t.block_cipher_class,r=t.key,this.cipher=t.cipher,this.resync=t.resync,e=t.asp,this.block_cipher_class||(this.block_cipher_class=n),this.cipher||(this.cipher=new this.block_cipher_class(f.from_buffer(r))),this.block_size=this.cipher.blockSize,this.out_bufs=[],this.asp=i.make(e)}return e.prototype.compact=function(){var e;return e=t.concat(this.out_bufs),this.out_bufs=[e],e},e}(),a=function(e){function r(t){var e,n,i,o,s,a;n=t.block_cipher_class,o=t.key,i=t.cipher,s=t.prefixrandom,a=t.resync,e=t.asp,r.__super__.constructor.call(this,{block_cipher_class:n,key:o,cipher:i,resync:a,asp:e}),this._init(s)}return g(r,e),r.prototype._enc=function(){return this.FRE=f.from_buffer(this.FR),this.cipher.encryptBlock(this.FRE.words,0)},r.prototype._emit_sb=function(e){var r,n,i;return r=(n=this.block_size-e.rem())>0?(i=t.from(function(){var t,e;for(e=[],t=0;0<=n?t<n:t>n;0<=n?++t:--t)e.push(0);return e}()),t.concat([e.consume_rest_to_buffer(),i])):e.read_buffer(this.block_size),this._emit_buf(r)},r.prototype._emit_buf=function(e){var r;return(r=f.from_buffer(e.slice(0,this.block_size))).xor(this.FRE,{n_words:Math.min(r.words.length,this.FRE.words.length)}),e=r.to_buffer(),this.out_bufs.push(e),this.FR=t.from(e)},r.prototype._init=function(e){var r,n,i,o;return this.FR=t.from(function(){var t,e,r;for(r=[],i=t=0,e=this.block_size;0<=e?t<e:t>e;i=0<=e?++t:--t)r.push(0);return r}.call(this)),e=d(e,2),this._enc(),this._emit_buf(e),this._enc(),r=this.FRE.to_buffer(),n=t.from(function(){var t,n;for(n=[],i=t=0;t<2;i=++t)n.push(r.readUInt8(i)^e.readUInt8(this.block_size+i));return n}.call(this)),this.out_bufs.push(n),o=this.resync?2:0,this.compact().copy(this.FR,0,o,o+this.block_size),this._enc()},r.prototype.enc=function(e,r){var n,i,o,s,a,h,c,d,m,y,_,g;y=l.findDeferral(arguments),c=new u(e),o=p(r,"Encryptor::enc"),this.resync?this._emit_sb(c):(n=t.concat([t.from([0,0]),c.read_buffer(this.block_size-2)]),(m=f.from_buffer(n)).xor(this.FRE,{}),n=m.to_buffer().slice(2),this.out_bufs.push(n),(i=this.compact()).copy(this.FR,0,i.length-this.block_size,i.length)),d=c.rem(),(g=this,function(t){_=new l.Deferrals(t,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Encryptor.enc"}),g.asp.progress({what:"ofcb encryption",i:0,total:d},o(_.defer({lineno:168}))),_._fulfill()})(function(t){return function(){var n;(n=function(e){var r,i,a;if(r=e,a=function(){return l.trampoline((function(){return n(e)}))},!(s=c.rem()))return r();for(i=0;i<4096&&(t._enc(),t._emit_sb(c),s=c.rem());i++);!function(e){_=new l.Deferrals(e,{parent:y,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Encryptor.enc"}),t.asp.progress({what:"ofcb encryption",i:d-s,total:d},o(_.defer({lineno:177}))),_._fulfill()}(a)})((function(){return h=t.compact(),a=e.length+t.block_size+2,h=h.slice(0,a),r(null,h)}))}}(this))},r}(o),s=function(t){function e(t){var r,n,i,o,s;n=t.block_cipher_class,o=t.key,i=t.cipher,t.prefixrandom,s=t.resync,this.ciphertext=t.ciphertext,r=t.asp,e.__super__.constructor.call(this,{block_cipher_class:n,key:o,cipher:i,resync:s,asp:r}),this._init()}return g(e,t),e.prototype._init=function(){return this.reset()},e.prototype.reset=function(){return this.sb=new u(this.ciphertext)},e.prototype.next_block=function(){return f.from_buffer(this.sb.read_buffer_at_most(this.block_size))},e.prototype.get_prefix=function(){return this._prefix},e.prototype.check=function(t){var e,r,n,i;return this.reset(),r=new f(function(){var t,e,r;for(r=[],t=0,e=this.block_size/4;0<=e?t<e:t>e;0<=e?++t:--t)r.push(0);return r}.call(this)),this.cipher.encryptBlock(r.words,0),e=this.next_block(),r.xor(e,{}),this._prefix=r.to_buffer(),this.cipher.encryptBlock(e.words,0),t((n=65535&r.words.slice(-1)[0])===(i=e.words[0]>>>16^this.sb.peek_uint16())?null:new Error("Canary block mismatch: "+n+" != "+i))},e.prototype.dec=function(t){var e,r,n,i,o,s,a,u,f;a=l.findDeferral(arguments),this.reset(),this.resync&&this.sb.advance(2),n=this.next_block(),r=p(t,"Decryption::dec"),s=this.sb.rem(),(f=this,function(t){u=new l.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Decryptor.dec"}),f.asp.progress({what:"ofcb decrypt",i:0,total:s},r(u.defer({lineno:239}))),u._fulfill()})(function(f){return function(){var h;(h=function(t){var o,c,p;if(o=t,p=function(){return l.trampoline((function(){return h(t)}))},!(i=f.sb.rem()))return o();for(c=0;c<4096&&(e=n,f.cipher.encryptBlock(e.words,0),n=f.next_block(),e.xor(n,{}),f.out_bufs.push(e.to_buffer().slice(0,n.sigBytes)),i=f.sb.rem());c++);!function(t){u=new l.Deferrals(t,{parent:a,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced",funcname:"Decryptor.dec"}),f.asp.progress({what:"ofcb decrypt",i:s-i,total:s},r(u.defer({lineno:251}))),u._fulfill()}(p)})((function(){return o=f.compact(),f.resync||(o=o.slice(2)),t(null,o)}))}}(this))},e}(o),c=function(t,e){var r,n,i,o,s,u,f;return n=t.block_cipher_class,o=t.key,i=t.cipher,u=t.prefixrandom,f=t.resync,s=t.plaintext,r=t.asp,new a({block_cipher_class:n,key:o,cipher:i,prefixrandom:u,resync:f,asp:r}).enc(s,e)},h=function(t,e){var r,n,i,o,a,u,f,h,c,p,d;p=l.findDeferral(arguments),n=t.block_cipher_class,f=t.key,i=t.cipher,c=t.resync,o=t.ciphertext,r=t.asp,a=new s({block_cipher_class:n,key:f,cipher:i,resync:c,ciphertext:o,asp:r}),function(t){d=new l.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced"}),a.check(d.defer({assign_fn:function(){return u=arguments[0]},lineno:267})),d._fulfill()}((function(){!function(t){if(null!=u)return t();!function(t){d=new l.Deferrals(t,{parent:p,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/ocfb.iced"}),a.dec(d.defer({assign_fn:function(){return u=arguments[0],h=arguments[1]},lineno:268})),d._fulfill()}(t)}((function(){return e(u,h)}))}))},e.encrypt=c,e.decrypt=h,e.Decryptor=s,m=r(74).rng}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(t){(function(){var n,i,o,s,a,u,f,h={}.hasOwnProperty;n=r(41).openpgp,(u=(s=r(101)).hash).SHA1,u.SHA256,s.ciphers.AES,s.prng.native_rng,(f=r(56)).bufferify,a=f.uint_to_buffer,r(533).encrypt,i=r(218).Packet,r(217).userid.parse,o=function(e){function r(t){this.data=t,r.__super__.constructor.call(this)}return function(t,e){for(var r in e)h.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(r,e),r.prototype.write=function(){return this.frame_packet(n.packet_tags.user_attribute,this.data)},r.parse=function(t){return new r(t.consume_rest_to_buffer())},r.prototype.to_user_attribute=function(){return this},r.prototype.to_signature_payload=function(){return t.concat([t.from([n.signatures.user_attribute]),a(32,this.data.length),this.data])},r}(i),e.UserAttribute=o}).call(this)}).call(this,r(12).Buffer)},function(t,e,n){(function(e){
/**
 *	this is a port of pyflate
 *	@url http://www.paul.sladen.org/projects/pyflate/
 *	@author kirilloid
 * @license CC-SA 3.0
 * @usage ArchUtils.bz2.decode(str)
 * @example ArchUtils.bz2.decode(
 * 		"BZh91AY&SYN\xEC\xE86\0\0\2Q\x80\0\x10@\0\6D\x90\x80 " +
 * 		"\x001\6LA\1\xA7\xA9\xA5\x80\xBB\x941\xF8\xBB\x92)\xC2\x84\x82wgA\xB0"
 * ) == "hello world\n";
 */
var n=function(){"use strict";
/**
	 * bwt_reverse code from wikipedia (slightly modified)
	 * @url http://en.wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transform
	 * @license: CC-SA 3.0
	 */function t(t,e){var r=t.length;if(e>=r)throw RangeError("Out of bound");if(e<0)throw RangeError("Out of bound");var n=t;t=t.join(""),n.sort();for(var i={},o=r-1;o>=0;o--)i[n[o]]=o;var s=[];for(o=0;o<r;o++)s.push(i[t[o]]++);for(var a=n[o=e],u=[],f=1;f<r;f++)u.push(n[o=s[o]]);return a+u.reverse().join("")}function e(t,e,r){for(var n=t[e],i=e;i>0;t[i]=t[--i]);r.push(t[0]=n)}var r=function(){this.init=function(t){this.masks=[];for(var e=0;e<31;e++)this.masks[e]=(1<<e)-1;this.masks[31]=-2147483648,this.f=t,this.bits=0,this.bitfield=0,this.count=0},this.readbits2=function(t){var e=t>>1;return this.readbits(e)*(1<<e)+this.readbits(t-e)},this.readbits=function(t){for(;this.bits<t;)this.bitfield=(this.bitfield<<8)+this.f.charCodeAt(this.count++),this.bits+=8;var e=this.masks[t],r=this.bitfield>>this.bits-t&e;return this.bits-=t,this.bitfield&=~(e<<this.bits),r}},n=function(t,e){this.code=t,this.bits=e,this.symbol=void 0},i=function(){this.process=function(t){for(var e=t.length,r=[],i=0;i<e;i++)r.push([i,t[i]]);r.push([e,-1]);for(var o=[],s=r[0],a=s[0],u=s[1],f=1;f<r.length;f++){var h=r[f][0],c=r[f][1];if(u)for(var l=a;l<h;l++)o.push(new n(l,u));if(a=h,u=c,-1==c)break}o.sort((function(t,e){return t.bits-e.bits||t.code-e.code})),this.table=o;var p=0,d=-1;this.faht=[];var m=null;for(i=0;i<this.table.length;i++){var y=this.table[i];d+=1,y.bits!=p&&(d<<=y.bits-p,m=this.faht[p=y.bits]={}),m[y.symbol=d]=y}this.min_bits=16,this.max_bits=-1,this.table.forEach((function(t){t.bits<this.min_bits&&(this.min_bits=t.bits),t.bits>this.max_bits&&(this.max_bits=t.bits)}),this)}};return{bz2:{decode:function(n){var o=new r;if(o.init(n),o.readbits(16),104!=o.readbits(8))throw"Unknown (not type 'h'uffman Bzip2) compression method";var s=o.readbits(8);if(!(49<=s&&s<=57))throw"Unknown (not size '1'-'9') Bzip2 blocksize";function a(t){for(var e=[],r=t.readbits(16),n=32768;n>0;n>>=1)if(r&n)for(var i=t.readbits(16),o=32768;o>0;o>>=1)e.push(Boolean(i&o));else for(var s=0;s<16;s++)e.push(!1);return e}s-=48;var u=[];return function(){for(;;){var r=o.readbits2(48);o.readbits2(32);if(54156738319193!=r){if(25779555029136==r){o.readbits(7&o.bits);break}throw"Illegal Bzip2 blocktype = 0x"+r.toString(16)}if(o.readbits(1))throw"Bzip2 randomised support not implemented";var n=o.readbits(24),s=a(o),f=o.readbits(3);if(2>f||f>6)throw RangeError("Bzip2: Number of Huffman groups not in range 2..6");for(var h=[0,1,2,3,4,5,6].slice(0,f),c=[],l=0,p=o.readbits(15);l<p;l++){for(var d=0;o.readbits(1);)if(d++>=f)throw RangeError("More than max ("+f+") groups");e(h,d,c)}for(var m=[],y=s.reduce((function(t,e){return t+e}),0)+2,_=0;_<f;_++){var g=o.readbits(5),b=[];for(l=0;l<y;l++){if(g<0||g>20)throw RangeError("Bzip2 Huffman length code outside range 0..20");for(;o.readbits(1);)g-=2*o.readbits(1)-1;b.push(g)}m.push(b)}for(var v=[],w=0;w<m.length;w++){var k=new i;k.process(m[w]),v.push(k)}var M=[];for(d=s.length-1;d>=0;d--)s[d]&&M.push(String.fromCharCode(d));M.reverse();for(var x,S,E=0,A=0,B=0,D=0,R=[];;){for(var P in--A<=0&&(A=50,E<=c.length&&(x=v[c[E++]])),x.faht)if(o.bits<P&&(o.bitfield=(o.bitfield<<8)+o.f.charCodeAt(o.count++),o.bits+=8),S=x.faht[P][o.bitfield>>o.bits-P]){o.bitfield&=o.masks[o.bits-=P],S=S.code;break}if(0<=S&&S<=1)0==B&&(D=1),B+=D<<S,D<<=1;else{for(var I=M[0];B>0;B--)R.push(I);if(S==y-1)break;e(M,S-1,R)}}for(var T=t(R,n),U=[],F=(l=0,T.length);l<F;){d=T.charCodeAt(l);if(l<F-4&&T.charCodeAt(l+1)==d&&T.charCodeAt(l+2)==d&&T.charCodeAt(l+3)==d){d=T.charAt(l);for(var O=T.charCodeAt(l+4)+4;O>0;O--)U.push(d);l+=5}else U.push(T[l++])}u.push(U.join(""))}}(),u.join("")}}}}();t.exports=function(t){return s=t.toString("binary"),r=n.bz2.decode(s),new e(r,"binary")}}).call(this,n(12).Buffer)},function(t,e,r){(function(){var t,n={}.hasOwnProperty;t=function(t){function e(t,e){this.type=t,this.body=e}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,t),e}(r(218).Packet),e.Generic=t}).call(this)},function(t,e,r){(function(){e.KeyMaterial=r(800).KeyMaterial,e.Signature=r(368).Signature,e.UserID=r(804).UserID}).call(this)},function(t,e,r){(function(){e.pack=r(534).pack,e.unpack=r(810).unpack,e.Buffer=r(536).PpBuffer,e.frame=r(1352)}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s;o=r(534).pack,s=r(810).unpack,n=r(535).C,e.pack=function(e,r){var n,i;return null==r&&(r={}),i=o(e,r),n=o(i.length),t.concat([n,i])},e.frame_len=i=function(t){return t<=n.positive_fix_max?1:t===n.uint8?2:t===n.uint16?3:t===n.uint32?5:0},e.unpack=function(t,e){var r,n,o,a,u;if(null==e&&(e={}),t.length<1)throw new Error("need a buffer > 1 bytes");if(n=t.readUInt8(0),0===(o=i(n)))throw new Error("no data frame found");if(t.length<o)throw new Error("not enough bytes to read frame: "+t.length+" < "+o);if(r=t.slice(0,o),a=s(r),(t=t.slice(o)).length<a)throw new Error("not enough bytes to unframe: "+t.length+" < "+a);return u=t.slice(a),t=t.slice(0,a),[s(t),u]}}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i,o=[].slice;n=r(36),i=r(73).make_esc,t=r(217).util.ASP,e.BaseBurner=function(){function e(e){this.sign_with=e.sign_with,this.encrypt_for=e.encrypt_for,this.signing_key=e.signing_key,this.encryption_key=e.encryption_key,this.asp=e.asp,this.asp=t.make(this.asp)}return e.prototype._find_keys=function(t){var e,r,o,s;r=n.findDeferral(arguments),e=i(t,"find_keys"),(s=this,function(t){o=new n.Deferrals(t,{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/baseburner.iced",funcname:"BaseBurner._find_keys"}),s._find_signing_key(e(o.defer({lineno:17}))),o._fulfill()})(function(i){return function(){o=new n.Deferrals((function(){o=new n.Deferrals((function(){return t(null)}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/baseburner.iced",funcname:"BaseBurner._find_keys"}),i._assert_one(e(o.defer({lineno:19}))),o._fulfill()}),{parent:r,filename:"/Users/max/src/keybase/kbpgp/src/openpgp/baseburner.iced",funcname:"BaseBurner._find_keys"}),i._find_encryption_key(e(o.defer({lineno:18}))),o._fulfill()}}(this))},e.prototype._assert_one=function(t){var e;return e=null,null==this.signing_key&&null==this.encryption_keys&&(e=new Error("need either an encryption or signing key, or both")),t(e)},e.prototype._find_signing_key=function(t){var e;return e=null,null!=this.sign_with&&null!=this.signing_key?e=new Error("specify either `sign_with` or `signing_key` but not both"):null!=this.sign_with&&null==(this.signing_key=this.sign_with.find_signing_pgp_key())&&(e=new Error("cannot sign with the given KeyManager")),t(e)},e.prototype._find_encryption_key=function(t){var e,r,n,i,s,a,u;if(r=null,e=function(t){return null==t?[]:"object"==typeof t&&Array.isArray(t)?t:[t]},function(){var t,e,r,n;for(t=0,r=0,n=(e=1<=arguments.length?o.call(arguments,0):[]).length;r<n;r++)e[r]&&t++;return t}(null!=this.encrypt_for,null!=this.encryption_key,null!=this.encryption_keys)>1)r=new Error("specify only one of `encrypt_for`, `encryption_keys` and `encryption_key`");else if(null!=this.encrypt_for)for(this.encryption_keys=[],n=s=0,a=(u=this.encrypt_for=e(this.encrypt_for)).length;s<a;n=++s){if(null==(i=u[n].find_crypt_pgp_key())){r=new Error("cannot encrypt with the given KeyManager (i="+n+")");break}this.encryption_keys.push(i)}else null!=this.encryption_key?this.encryption_keys=[this.encryption_key]:null!=this.encryption_keys&&(this.encryption_keys=e(this.encryption_keys));return t(r)},e}()}).call(this)},function(t,e,r){(function(t){(function(){var n,i,o,s,a;a=r(348),s=a.nbv,o=a.nbi,i=a.BigInteger,r(140).nbs,r(56).buffer_to_ui8a,n=function(){function e(t){var e,r,n,i,o;for(this.alphabet=t,this.base=this.alphabet.length,this.basebn=s(this.base),this.lookup={},r=n=0,i=(o=this.alphabet).length;n<i;r=++n)e=o[r],this.lookup[e]=r}return e.prototype.encode=function(t){var e,r,n,s,a,u,f,h;for(n=o().fromBuffer(t),(r=function(){var t,r;for(r=[];n.compareTo(i.ZERO)>0;)t=n.divideAndRemainder(this.basebn),a=t[0],u=t[1],e=this.alphabet[u.intValue()],n=a,r.push(e);return r}.call(this)).reverse(),s=[],f=0,h=t.length;f<h&&0===(e=t[f]);f++)s.push(this.alphabet[0]);return s.concat(r).join("")},e.prototype.decode=function(e){var r,n,o,a,u,f,h,c,l,p,d;for(u=i.ZERO,r=i.ONE,a=0,a=c=0,p=e.length;c<p&&(n=e[a])===this.alphabet[0];a=++c);for(h=a,f=t.from(function(){var t,e;for(e=[],a=t=0;0<=h?t<h:t>h;a=0<=h?++t:--t)e.push(0);return e}()),d=e.slice(h),a=l=d.length-1;l>=0;a=l+=-1){if(n=d[a],null==(o=this.lookup[n]))throw new Error("Value passed is not a valid BaseX string.");u=u.add(r.multiply(s(o))),r=r.multiply(this.basebn)}return t.concat([f,t.from(u.toByteArray())])},e}(),e.base58=new n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),e.base32=new n("abcdefghijkmnpqrstuvwxyz23456789"),e.base91=new n("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-_=+{}[]|;:,<>./?")}).call(this)}).call(this,r(12).Buffer)},function(t,e,r){(function(){var t,n,i;n=r(544).burn,i=r(452),t=r(543).SignatureEngine,e.box=n,e.unbox=i.do_message,e.SignatureEngine=t}).call(this)},function(t,e,r){(function(){e.curves=r(794),e.ECDSA=r(447).ECDSA,e.ECDH=r(448).ECDH,e.EDDSA=r(532).EDDSA}).call(this)},function(t,e,r){(function(){var t,n,i,o,s;n=r(41).kb,i=r(538).P3SKB,o=r(540).Signature,t=r(814).Encryption,s=function(t){try{return[null,t()]}catch(t){return[t,null]}},e.alloc=function(e){var r,a,u,f,h;return f=e.tag,r=e.body,h=function(){switch(f){case n.packet_tags.p3skb:return s((function(){return i.alloc({tag:f,body:r})}));case n.packet_tags.signature:return s((function(){return o.alloc({tag:f,body:r})}));case n.packet_tags.encryption:return s((function(){return t.alloc({tag:f,body:r})}));default:return[a=new Error("unknown packet tag: "+f),null]}}(),a=h[0],u=h[1],[a,u]}}).call(this)},function(t,e,r){(function(){var t,n,i,o,s;n=r(36),s=r(815),o=r(73).make_esc,e.GenericKey=t=function(){function t(t){this.km=t.km}return t.prototype.kid=function(){return this.km.get_ekid().toString("hex")},t.prototype.isPGP=function(){return!!this.km.get_pgp_fingerprint()},t.prototype._verify_cb=function(t,e,r){var i,s,a,u,f,h;f=n.findDeferral(arguments),s=o(r),u=this.km.make_sig_eng(),function(r){h=new n.Deferrals(r,{parent:f,filename:"/Users/max/src/keybase/kbpgp/src/verify.iced",funcname:"GenericKey._verify_cb"}),u.unbox(t,s(h.defer({assign_fn:function(){return a=arguments[0],i=arguments[1]},lineno:11})),e),h._fulfill()}((function(){return r(null,[a,i])}))},t.prototype.verify=function(t,e){return new Promise((r=this,function(n,i){return r._verify_cb(t,e,(function(t,e){return null!=t?i(t):n(e)}))}));var r},t}(),i=function(e,r,i){var a,u,f,h,c;h=n.findDeferral(arguments),a=o(i),function(t){c=new n.Deferrals(t,{parent:h,filename:"/Users/max/src/keybase/kbpgp/src/verify.iced"}),s.import_armored_public({armored:e,opts:r},a(c.defer({assign_fn:function(){return u=arguments[0]},lineno:23}))),c._fulfill()}((function(){return f=new t({km:u}),i(null,f)}))},e.importKey=function(t,e){return new Promise((function(r,n){return i(t,e,(function(t,e){return null!=t?n(t):r(e)}))}))}}).call(this)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";r.r(e);var n=r(8),i=r.n(n),o=r(14),s=r.n(o),a=r(11),u=r.n(a),f=r(2),h=r.n(f),c=r(3),l=r.n(c),p=r(4),d=r.n(p),m=r(5),y=r.n(m),_=r(0),g=r.n(_),b=r(9),v=r(75),w=r.n(v),k=r(7),M=r(1),x=r(65),S=r.n(x),E=S.a?S.a.promisify:x.promisify,A=w.a.ASP({progress_hook:function(t){var e="";switch(t.what){case"guess":e="Guessing a prime";break;case"fermat":e="Factoring prime using Fermat's factorization method";break;case"mr":e="Performing Miller-Rabin primality test";break;case"passed_mr":e="Passed Miller-Rabin primality test";break;case"failed_mr":e="Failed Miller-Rabin primality test";break;case"found":e="Prime found";break;default:e="Stage: "+t.what}Object(M.d)()&&self.sendStatusMessage(e)}});function B(t){return{1024:1024,2048:1024,4096:2048,256:256,384:256}[t]}function D(t,e){return R.apply(this,arguments)}function R(){return(R=u()(i.a.mark((function t(e,r){var n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,E(w.a.KeyManager.import_from_armored_pgp)({armored:e,opts:{no_check_keys:!0}});case 3:if(!(n=t.sent).is_pgp_locked()){t.next=11;break}if(!r){t.next=10;break}return t.next=8,E(n.unlock_pgp.bind(n))({passphrase:r});case 8:t.next=11;break;case 10:throw new k.a("Did not provide passphrase with locked private key.");case 11:return t.abrupt("return",n);case 14:throw t.prev=14,t.t0=t.catch(0),new k.a("Could not import private key: "+t.t0);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})))).apply(this,arguments)}function P(t){return I.apply(this,arguments)}function I(){return(I=u()(i.a.mark((function t(e){var r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,E(w.a.KeyManager.import_from_armored_pgp)({armored:e,opts:{no_check_keys:!0}});case 3:return r=t.sent,t.abrupt("return",r);case 7:throw t.prev=7,t.t0=t.catch(0),new k.a("Could not import public key: "+t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}function T(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author tlwr [toby@toby.codes]
 * @author Matt C [matt@artemisbot.uk]
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2017
 * @license Apache-2.0
 */();return function(){var r,n=g()(t);if(e){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y()(this,r)}}var U=S.a?S.a.promisify:x.promisify,F=function(t){d()(n,t);var e,r=T(n);function n(){var t;return h()(this,n),(t=r.call(this)).name="Generate PGP Key Pair",t.module="PGP",t.description="Generates a new public/private PGP key pair. Supports RSA and Eliptic Curve (EC) keys.",t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Key type",type:"option",value:["RSA-1024","RSA-2048","RSA-4096","ECC-256","ECC-384"]},{name:"Password (optional)",type:"string",value:""},{name:"Name (optional)",type:"string",value:""},{name:"Email (optional)",type:"string",value:""}],t}return l()(n,[{key:"run",value:(e=u()(i.a.mark((function t(e,r){var n,o,a,f,h,c,l,p,d,m;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r[0].split("-"),o=s()(n,2),a=o[0],f=o[1],h=r[1],c=r[2],l=r[3],p="",c&&(p+=c),l&&(p+=` <${l}>`),d=w.a.const.openpgp.certify_keys,d|=w.a.const.openpgp.sign_data,d|=w.a.const.openpgp.auth,d|=w.a.const.openpgp.encrypt_comm,d|=w.a.const.openpgp.encrypt_storage,m={userid:p,ecc:"ecc"===a,primary:{nbits:f,flags:d,expire_in:0},subkeys:[{nbits:B(f),flags:w.a.const.openpgp.sign_data,expire_in:252288e3},{nbits:B(f),flags:w.a.const.openpgp.encrypt_comm|w.a.const.openpgp.encrypt_storage,expire_in:63072e3}],asp:A},t.abrupt("return",new Promise(function(){var t=u()(i.a.mark((function t(e,r){var n,o,s,a,u;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,U(w.a.KeyManager.generate)(m);case 3:return n=t.sent,t.next=6,U(n.sign.bind(n))({});case 6:return o=n,s={},h&&(s.passphrase=h),t.next=10,U(o.export_pgp_private.bind(o))(s);case 10:return a=t.sent,t.next=13,U(o.export_pgp_public.bind(o))({});case 13:u=t.sent,e(a+"\n"+u.trim()),t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),r("Error whilst generating key pair: "+t.t0);case 20:case"end":return t.stop()}}),t,null,[[0,17]])})));return function(e,r){return t.apply(this,arguments)}}()));case 11:case"end":return t.stop()}}),t)}))),function(t,r){return e.apply(this,arguments)})}]),n}(b.a);function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author tlwr [toby@toby.codes]
 * @copyright Crown Copyright 2017
 * @license Apache-2.0
 */();return function(){var r,n=g()(t);if(e){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y()(this,r)}}var C=S.a?S.a.promisify:x.promisify,L=function(t){d()(n,t);var e,r=O(n);function n(){var t;return h()(this,n),(t=r.call(this)).name="PGP Decrypt",t.module="PGP",t.description=["Input: the ASCII-armoured PGP message you want to decrypt.","<br><br>","Arguments: the ASCII-armoured PGP private key of the recipient, ","(and the private key password if necessary).","<br><br>","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","<br><br>","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Private key of recipient",type:"text",value:""},{name:"Private key passphrase",type:"string",value:""}],t}return l()(n,[{key:"run",value:(e=u()(i.a.mark((function t(e,r){var n,o,a,u,f,h,c;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,o=s()(r,2),a=o[0],u=o[1],f=new w.a.keyring.KeyRing,a){t.next=3;break}throw new k.a("Enter the private key of the recipient.");case 3:return t.next=5,D(a,u);case 5:return c=t.sent,f.add_key_manager(c),t.prev=7,t.next=10,C(w.a.unbox)({armored:n,keyfetch:f,asp:A});case 10:h=t.sent,t.next=16;break;case 13:throw t.prev=13,t.t0=t.catch(7),new k.a("Couldn't decrypt message with provided private key: "+t.t0);case 16:return t.abrupt("return",h.toString());case 17:case"end":return t.stop()}}),t,null,[[7,13]])}))),function(t,r){return e.apply(this,arguments)})}]),n}(b.a);function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author tlwr [toby@toby.codes]
 * @copyright Crown Copyright 2017
 * @license Apache-2.0
 */();return function(){var r,n=g()(t);if(e){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y()(this,r)}}var z=S.a?S.a.promisify:x.promisify,j=function(t){d()(n,t);var e,r=N(n);function n(){var t;return h()(this,n),(t=r.call(this)).name="PGP Decrypt and Verify",t.module="PGP",t.description=["Input: the ASCII-armoured encrypted PGP message you want to verify.","<br><br>","Arguments: the ASCII-armoured PGP public key of the signer, ","the ASCII-armoured private key of the recipient (and the private key password if necessary).","<br><br>","This operation uses PGP to decrypt and verify an encrypted digital signature.","<br><br>","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","<br><br>","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Public key of signer",type:"text",value:""},{name:"Private key of recipient",type:"text",value:""},{name:"Private key password",type:"string",value:""}],t}return l()(n,[{key:"run",value:(e=u()(i.a.mark((function t(e,r){var n,o,a,u,f,h,c,l,p,d,m,y,_;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,o=s()(r,3),a=o[0],u=o[1],f=o[2],h=new w.a.keyring.KeyRing,a){t.next=3;break}throw new k.a("Enter the public key of the signer.");case 3:if(u){t.next=5;break}throw new k.a("Enter the private key of the recipient.");case 5:return t.next=7,D(u,f);case 7:return l=t.sent,t.next=10,P(a);case 10:return p=t.sent,h.add_key_manager(l),h.add_key_manager(p),t.prev=13,t.next=16,z(w.a.unbox)({armored:n,keyfetch:h,asp:A});case 16:if(c=t.sent,!(d=c[0].get_data_signer())){t.next=32;break}if(!(m=d.get_key_manager())){t.next=29;break}return y=m.get_userids_mark_primary()[0].components,_="Signed by ",(y.email||y.username||y.comment)&&(y.username&&(_+=y.username+" "),y.comment&&(_+=`(${y.comment}) `),y.email&&(_+=`<${y.email}>`),_+="\n"),_+=["PGP key ID: "+m.get_pgp_short_key_id(),"PGP fingerprint: "+m.get_pgp_fingerprint().toString("hex"),"Signed on "+new Date(1e3*d.sig.when_generated()).toUTCString(),"----------------------------------\n"].join("\n"),_+=c.toString(),t.abrupt("return",_.trim());case 29:throw new k.a("Could not identify a key manager.");case 30:t.next=33;break;case 32:throw new k.a("The data does not appear to be signed.");case 33:t.next=38;break;case 35:throw t.prev=35,t.t0=t.catch(13),new k.a("Couldn't verify message: "+t.t0);case 38:case"end":return t.stop()}}),t,null,[[13,35]])}))),function(t,r){return e.apply(this,arguments)})}]),n}(b.a);function q(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author tlwr [toby@toby.codes]
 * @copyright Crown Copyright 2017
 * @license Apache-2.0
 */();return function(){var r,n=g()(t);if(e){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y()(this,r)}}var K=S.a?S.a.promisify:x.promisify,H=function(t){d()(n,t);var e,r=q(n);function n(){var t;return h()(this,n),(t=r.call(this)).name="PGP Encrypt",t.module="PGP",t.description=["Input: the message you want to encrypt.","<br><br>","Arguments: the ASCII-armoured PGP public key of the recipient.","<br><br>","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","<br><br>","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Public key of recipient",type:"text",value:""}],t}return l()(n,[{key:"run",value:(e=u()(i.a.mark((function t(e,r){var n,o,s,a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,o=r[0]){t.next=3;break}throw new k.a("Enter the public key of the recipient.");case 3:return t.next=5,P(o);case 5:return a=t.sent,t.prev=6,t.next=9,K(w.a.box)({msg:n,encrypt_for:a,asp:A});case 9:s=t.sent,t.next=15;break;case 12:throw t.prev=12,t.t0=t.catch(6),new k.a("Couldn't encrypt message with provided public key: "+t.t0);case 15:return t.abrupt("return",s.toString());case 16:case"end":return t.stop()}}),t,null,[[6,12]])}))),function(t,r){return e.apply(this,arguments)})}]),n}(b.a);function Z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author tlwr [toby@toby.codes]
 * @copyright Crown Copyright 2017
 * @license Apache-2.0
 */();return function(){var r,n=g()(t);if(e){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y()(this,r)}}var G=S.a?S.a.promisify:x.promisify,W=function(t){d()(n,t);var e,r=Z(n);function n(){var t;return h()(this,n),(t=r.call(this)).name="PGP Encrypt and Sign",t.module="PGP",t.description=["Input: the cleartext you want to sign.","<br><br>","Arguments: the ASCII-armoured private key of the signer (plus the private key password if necessary)","and the ASCII-armoured PGP public key of the recipient.","<br><br>","This operation uses PGP to produce an encrypted digital signature.","<br><br>","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","<br><br>","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Private key of signer",type:"text",value:""},{name:"Private key passphrase",type:"string",value:""},{name:"Public key of recipient",type:"text",value:""}],t}return l()(n,[{key:"run",value:(e=u()(i.a.mark((function t(e,r){var n,o,a,u,f,h,c,l;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,o=s()(r,3),a=o[0],u=o[1],f=o[2],a){t.next=3;break}throw new k.a("Enter the private key of the signer.");case 3:if(f){t.next=5;break}throw new k.a("Enter the public key of the recipient.");case 5:return t.next=7,D(a,u);case 7:return c=t.sent,t.next=10,P(f);case 10:return l=t.sent,t.prev=11,t.next=14,G(w.a.box)({msg:n,encrypt_for:l,sign_with:c,asp:A});case 14:h=t.sent,t.next=20;break;case 17:throw t.prev=17,t.t0=t.catch(11),new k.a("Couldn't sign message: "+t.t0);case 20:return t.abrupt("return",h);case 21:case"end":return t.stop()}}),t,null,[[11,17]])}))),function(t,r){return e.apply(this,arguments)})}]),n}(b.a);function V(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}
/**
 * @author Matt C [me@mitt.dev]
 * @copyright Crown Copyright 2019
 * @license Apache-2.0
 */();return function(){var r,n=g()(t);if(e){var i=g()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y()(this,r)}}var Y=S.a?S.a.promisify:x.promisify,X=function(t){d()(n,t);var e,r=V(n);function n(){var t;return h()(this,n),(t=r.call(this)).name="PGP Verify",t.module="PGP",t.description=["Input: the ASCII-armoured encrypted PGP message you want to verify.","<br><br>","Argument: the ASCII-armoured PGP public key of the signer","<br><br>","This operation uses PGP to decrypt a clearsigned message.","<br><br>","Pretty Good Privacy is an encryption standard (OpenPGP) used for encrypting, decrypting, and signing messages.","<br><br>","This function uses the Keybase implementation of PGP."].join("\n"),t.infoURL="https://wikipedia.org/wiki/Pretty_Good_Privacy",t.inputType="string",t.outputType="string",t.args=[{name:"Public key of signer",type:"text",value:""}],t}return l()(n,[{key:"run",value:(e=u()(i.a.mark((function t(e,r){var n,o,a,u,f,h,c,l,p,d;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e,o=s()(r,1),a=o[0],u=new w.a.keyring.KeyRing,a){t.next=3;break}throw new k.a("Enter the public key of the signer.");case 3:return t.next=5,P(a);case 5:return h=t.sent,u.add_key_manager(h),t.prev=7,t.next=10,Y(w.a.unbox)({armored:n,keyfetch:u,asp:A});case 10:if(f=t.sent,!(c=f[0].get_data_signer())){t.next=26;break}if(!(l=c.get_key_manager())){t.next=23;break}return p=l.get_userids_mark_primary()[0].components,d="Signed by ",(p.email||p.username||p.comment)&&(p.username&&(d+=p.username+" "),p.comment&&(d+=`(${p.comment}) `),p.email&&(d+=`<${p.email}>`),d+="\n"),d+=["PGP key ID: "+l.get_pgp_short_key_id(),"PGP fingerprint: "+l.get_pgp_fingerprint().toString("hex"),"Signed on "+new Date(1e3*c.sig.when_generated()).toUTCString(),"----------------------------------\n"].join("\n"),d+=f.toString(),t.abrupt("return",d.trim());case 23:throw new k.a("Could not identify a key manager.");case 24:t.next=27;break;case 26:throw new k.a("The data does not appear to be signed.");case 27:t.next=32;break;case 29:throw t.prev=29,t.t0=t.catch(7),new k.a("Couldn't verify message: "+t.t0);case 32:case"end":return t.stop()}}),t,null,[[7,29]])}))),function(t,r){return e.apply(this,arguments)})}]),n}(b.a),$="undefined"==typeof self?{}:self.OpModules||{};$.PGP={"Generate PGP Key Pair":F,"PGP Decrypt":L,"PGP Decrypt and Verify":j,"PGP Encrypt":H,"PGP Encrypt and Sign":W,"PGP Verify":X};e.default=$}]);