diff --git a/dist/java-class-tools.js b/dist/java-class-tools.js index c908f75..7257f58 100644 --- a/dist/java-class-tools.js +++ b/dist/java-class-tools.js @@ -43,7 +43,7 @@ var JavaClassTools = /************************************************************************/ /******/ ([ /* 0 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -71,23 +71,12 @@ var JavaClassTools = function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /* - * Copyright (C) 2017 leonardosnt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + /*! + * https://github.com/leonardosnt/java-class-tools + * + * Copyright (C) 2017 leonardosnt + * Licensed under the MIT License. See LICENSE file in the project root for full license information. + */ module.exports = { JavaClassFileReader: _javaClassReader2.default, @@ -99,31 +88,20 @@ var JavaClassTools = InstructionParser: _instructionParser.InstructionParser }; -/***/ }, +/***/ }), /* 1 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* - * Copyright (C) 2017 leonardosnt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*! + * https://github.com/leonardosnt/java-class-tools + * + * Copyright (C) 2017 leonardosnt + * Licensed under the MIT License. See LICENSE file in the project root for full license information. + */ var _bytebuffer = __webpack_require__(3); @@ -167,9 +145,10 @@ var JavaClassTools = * @see {@link https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1} */ value: function read(source) { - if (typeof source === 'undefined') { - throw TypeError('source cannot be undefined'); - } else if (typeof source === 'string') { + if (source == undefined) { + throw TypeError('source cannot be null or undefined'); + } + if (typeof source === 'string') { return this.readFromFile(source); } @@ -985,9 +964,9 @@ var JavaClassTools = module.exports = JavaClassFileReader; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) -/***/ }, +/***/ }), /* 2 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; @@ -1171,9 +1150,9 @@ var JavaClassTools = process.umask = function() { return 0; }; -/***/ }, +/***/ }), /* 3 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module) {/* Copyright 2013-2014 Daniel Wirtz @@ -4924,9 +4903,9 @@ var JavaClassTools = /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)(module))) -/***/ }, +/***/ }), /* 4 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { @@ -4940,16 +4919,16 @@ var JavaClassTools = } -/***/ }, +/***/ }), /* 5 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { module.exports = function() { throw new Error("define cannot be used indirect"); }; -/***/ }, +/***/ }), /* 6 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(module) {/* Copyright 2013 Daniel Wirtz @@ -6163,29 +6142,18 @@ var JavaClassTools = /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)(module))) -/***/ }, +/***/ }), /* 7 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { "use strict"; - /* - * Copyright (C) 2017 leonardosnt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + /*! + * https://github.com/leonardosnt/java-class-tools + * + * Copyright (C) 2017 leonardosnt + * Licensed under the MIT License. See LICENSE file in the project root for full license information. + */ var ConstantType = { UTF8: 1, @@ -6206,29 +6174,18 @@ var JavaClassTools = module.exports = ConstantType; -/***/ }, +/***/ }), /* 8 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { "use strict"; - /* - * Copyright (C) 2017 leonardosnt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + /*! + * https://github.com/leonardosnt/java-class-tools + * + * Copyright (C) 2017 leonardosnt + * Licensed under the MIT License. See LICENSE file in the project root for full license information. + */ var Opcode = { NOP: 0x0, @@ -6440,29 +6397,18 @@ var JavaClassTools = module.exports = Opcode; -/***/ }, +/***/ }), /* 9 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { "use strict"; - /* - * Copyright (C) 2017 leonardosnt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + /*! + * https://github.com/leonardosnt/java-class-tools + * + * Copyright (C) 2017 leonardosnt + * Licensed under the MIT License. See LICENSE file in the project root for full license information. + */ var Modifier = { PUBLIC: 0x0001, @@ -6485,35 +6431,24 @@ var JavaClassTools = module.exports = Modifier; -/***/ }, +/***/ }), /* 10 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { -/***/ }, +/***/ }), /* 11 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* - * Copyright (C) 2017 leonardosnt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*! + * https://github.com/leonardosnt/java-class-tools + * + * Copyright (C) 2017 leonardosnt + * Licensed under the MIT License. See LICENSE file in the project root for full license information. + */ var _bytebuffer = __webpack_require__(3); @@ -7091,29 +7026,18 @@ var JavaClassTools = module.exports = JavaClassFileWriter; -/***/ }, +/***/ }), /* 12 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* - * Copyright (C) 2017 leonardosnt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*! + * https://github.com/leonardosnt/java-class-tools + * + * Copyright (C) 2017 leonardosnt + * Licensed under the MIT License. See LICENSE file in the project root for full license information. + */ var _opcode = __webpack_require__(8); @@ -7182,11 +7106,11 @@ var JavaClassTools = _createClass(InstructionParser, null, [{ key: 'toBytecode', - /** - * Converts Instruction objects into raw bytecode. - * - * @param {Instruction[]} instruction - Instructions to convert. - * @see {@link https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5} + /** + * Converts Instruction objects into raw bytecode. + * + * @param {Instruction[]} instruction - Instructions to convert. + * @see {@link https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5} */ value: function toBytecode(instructions) { if (!Array.isArray(instructions)) { @@ -7309,11 +7233,11 @@ var JavaClassTools = return bytecode; } - /** - * Converts raw bytecode into Instruction objects. - * - * @param {number[]} bytecode - An array of bytes containing the jvm bytecode. - * @see {@link https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5} + /** + * Converts raw bytecode into Instruction objects. + * + * @param {number[]} bytecode - An array of bytes containing the jvm bytecode. + * @see {@link https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5} */ }, { @@ -7471,5 +7395,5 @@ var JavaClassTools = InstructionParser: InstructionParser }; -/***/ } +/***/ }) /******/ ]); \ No newline at end of file diff --git a/dist/java-class-tools.min.js b/dist/java-class-tools.min.js index 4174d3e..a11d0e7 100644 --- a/dist/java-class-tools.min.js +++ b/dist/java-class-tools.min.js @@ -1,3 +1,3 @@ -var JavaClassTools=function(t){function e(r){if(i[r])return i[r].exports;var n=i[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var n=i(1),s=r(n),a=i(11),f=r(a),o=i(7),h=r(o),u=i(8),l=r(u),d=i(9),b=r(d),c=i(12);t.exports={JavaClassFileReader:s.default,JavaClassFileWriter:f.default,Opcode:l.default,ConstantType:h.default,Modifier:b.default,Instruction:c.Instruction,InstructionParser:c.InstructionParser}},function(t,e,i){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=function(){function t(t,e){for(var i=0;i=64&&L<=127)A.stack=[this._readVerificationTypeInfo()];else if(247==A.frame_type)A.offset_delta=this.buf.readUint16(),A.stack=[this._readVerificationTypeInfo()];else if(L>=248&&L<=251)A.offset_delta=this.buf.readUint16();else if(L>=252&&L<=254){A.offset_delta=this.buf.readUint16(),A.locals=[];for(var O=L-251;O--;)A.locals.push(this._readVerificationTypeInfo())}else if(255==L){A.offset_delta=this.buf.readUint16(),A.number_of_locals=this.buf.readUint16(),A.locals=[];for(var R=A.number_of_locals;R--;)A.locals.push(this._readVerificationTypeInfo());A.number_of_stack_items=this.buf.readUint16(),A.stack=[];for(var k=A.number_of_stack_items;k--;)A.stack.push(this._readVerificationTypeInfo())}t.entries.push(A)}break;case"Code":t.max_stack=this.buf.readUint16(),t.max_locals=this.buf.readUint16(),t.code_length=this.buf.readUint32(),t.code=[];for(var F=t.code_length;F--;)t.code.push(this.buf.readUint8());t.exception_table_length=this.buf.readUint16(),t.exception_table=[];for(var S=t.exception_table_length;S--;){var N={start_pc:this.buf.readUint16(),end_pc:this.buf.readUint16(),handler_pc:this.buf.readUint16(),catch_type:this.buf.readUint16()};t.exception_table.push(N)}t.attributes_count=this.buf.readUint16(),t.attributes=this._readAttributeInfoArray(t.attributes_count);break;case"LineNumberTable":t.line_number_table_length=this.buf.readUint16(),t.line_number_table=[];for(var x=t.line_number_table_length;x--;){var D={start_pc:this.buf.readUint16(),line_number:this.buf.readUint16()};t.line_number_table.push(D)}break;default:throw Error("Unexpected attributeName: "+i)}return t}},{key:"_readAttributeAnnotation",value:function(){for(var t={type_index:this.buf.readUint16(),num_element_value_pairs:this.buf.readUint16(),element_value_pairs:[]},e=t.num_element_value_pairs;e--;){var i={element_name_index:this.buf.readUint16(),element_value:this._readElementValue()};t.element_value_pairs.push(i)}return t}},{key:"_readElementValue",value:function(){var t={tag:this.buf.readUint8(),value:{}};switch(t.tag){case 101:t.value.enum_const_value={type_name_index:this.buf.readUint16(),const_name_index:this.buf.readUint16()};break;case 99:t.value.class_info_index=this.buf.readUint16();break;case 91:for(var e={num_values:this.buf.readUInt16(),values:[]},i=e.num_values;i--;)e.values.push(this._readElementValue());t.value.array_value=e;break;case 64:t.value.annotation=this._readAttributeAnnotation();break;case 66:case 67:case 68:case 70:case 73:case 74:case 83:case 90:case 115:t.value.const_value_index=this.buf.readUint16();break;default:throw Error("Unexpected tag: "+t.tag)}return t}},{key:"_readInterfaces",value:function(t){for(var e=[];t--;)e.push(this.buf.readUint16());return e}},{key:"_readConstantPool",value:function(t){for(var e=[void 0];t--;){var i=this._readConstantPoolEntry();e.push(i),i.tag!=u.default.LONG&&i.tag!=u.default.DOUBLE||(e.push(void 0),t--)}return e}},{key:"_readConstantPoolEntry",value:function(){var t={tag:this.buf.readUInt8()};switch(t.tag){case u.default.UTF8:var e=this.buf.readUint16();for(t.length=e,t.bytes=[];e--;)t.bytes.push(this.buf.readUInt8());break;case u.default.INTEGER:case u.default.FLOAT:t.bytes=this.buf.readUint32();break;case u.default.LONG:case u.default.DOUBLE:t.high_bytes=this.buf.readUint32(),t.low_bytes=this.buf.readUint32();break;case u.default.CLASS:t.name_index=this.buf.readUInt16();break;case u.default.STRING:t.string_index=this.buf.readUInt16();break;case u.default.FIELDREF:case u.default.METHODREF:case u.default.INTERFACE_METHODREF:t.class_index=this.buf.readUint16(),t.name_and_type_index=this.buf.readUint16();break;case u.default.NAME_AND_TYPE:t.name_index=this.buf.readUint16(),t.descriptor_index=this.buf.readUint16();break;case u.default.METHOD_HANDLE:t.reference_kind=this.buf.readUint8(),t.reference_index=this.buf.readUint16();break;case u.default.METHOD_TYPE:t.descriptor_index=this.buf.readUInt16();break;case u.default.INVOKE_DYNAMIC:t.bootstrap_method_attr_index=this.buf.readUint16(),t.name_and_type_index=this.buf.readUint16();break;default:throw Error("Unexpected tag: "+t.tag)}return t}}]),t}());t.exports=b}).call(e,i(2))},function(t,e){function i(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function n(t){if(u===setTimeout)return setTimeout(t,0);if((u===i||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function s(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function a(){g&&b&&(g=!1,b.length?c=b.concat(c):p=-1,c.length&&f())}function f(){if(!g){var t=n(a);g=!0;for(var e=c.length;e;){for(b=c,c=[];++p1)for(var i=1;i1024&&(e.push(o.apply(String,t)),t.length=0),void Array.prototype.push.apply(t,arguments))}}function r(t,e,i,r,n){var s,a,f=8*n-r-1,o=(1<>1,u=-7,l=i?n-1:0,d=i?-1:1,b=t[e+l];for(l+=d,s=b&(1<<-u)-1,b>>=-u,u+=f;u>0;s=256*s+t[e+l],l+=d,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=r;u>0;a=256*a+t[e+l],l+=d,u-=8);if(0===s)s=1-h;else{if(s===o)return a?NaN:(b?-1:1)*(1/0);a+=Math.pow(2,r),s-=h}return(b?-1:1)*a*Math.pow(2,s-r)}function n(t,e,i,r,n,s){var a,f,o,h=8*s-n-1,u=(1<>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,b=r?0:s-1,c=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(o=Math.pow(2,-a))<1&&(a--,o*=2),e+=a+l>=1?d/o:d*Math.pow(2,1-l),e*o>=2&&(a++,o/=2),a+l>=u?(f=0,a=u):a+l>=1?(f=(e*o-1)*Math.pow(2,n),a+=l):(f=e*Math.pow(2,l-1)*Math.pow(2,n),a=0));n>=8;t[i+b]=255&f,b+=c,f/=256,n-=8);for(a=a<0;t[i+b]=255&a,b+=c,a/=256,h-=8);t[i+b-c]|=128*g}var s=function(t,e,i){if("undefined"==typeof t&&(t=s.DEFAULT_CAPACITY),"undefined"==typeof e&&(e=s.DEFAULT_ENDIAN),"undefined"==typeof i&&(i=s.DEFAULT_NOASSERT),!i){if(t|=0,t<0)throw RangeError("Illegal capacity");e=!!e,i=!!i}this.buffer=0===t?f:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=e,this.noAssert=i};s.VERSION="5.0.1",s.LITTLE_ENDIAN=!0,s.BIG_ENDIAN=!1,s.DEFAULT_CAPACITY=16,s.DEFAULT_ENDIAN=s.BIG_ENDIAN,s.DEFAULT_NOASSERT=!1,s.Long=t||null;var a=s.prototype;a.__isByteBuffer__,Object.defineProperty(a,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var f=new ArrayBuffer(0),o=String.fromCharCode;s.accessor=function(){return Uint8Array},s.allocate=function(t,e,i){return new s(t,e,i)},s.concat=function(t,e,i,r){"boolean"!=typeof e&&"string"==typeof e||(r=i,i=e,e=void 0);for(var n,a=0,f=0,o=t.length;f0&&(a+=n);if(0===a)return new s(0,i,r);var h,u=new s(a,i,r);for(f=0;f0&&(n.buffer=t.buffer,n.offset=t.byteOffset,n.limit=t.byteOffset+t.byteLength,n.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)n=new s(0,i,r),t.byteLength>0&&(n.buffer=t,n.offset=0,n.limit=t.byteLength,n.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");n=new s(t.length,i,r),n.limit=t.length;for(var f=0;f>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,n=e,s=t.length,a=s>>3,f=0;for(e+=this.writeVarint32(s,e);a--;)r=1&!!t[f++]|(1&!!t[f++])<<1|(1&!!t[f++])<<2|(1&!!t[f++])<<3|(1&!!t[f++])<<4|(1&!!t[f++])<<5|(1&!!t[f++])<<6|(1&!!t[f++])<<7,this.writeByte(r,e++);if(f>3,a=0,f=[];for(t+=r.length;s--;)i=this.readByte(t++),f[a++]=!!(1&i),f[a++]=!!(2&i),f[a++]=!!(4&i),f[a++]=!!(8&i),f[a++]=!!(16&i),f[a++]=!!(32&i),f[a++]=!!(64&i),f[a++]=!!(128&i);if(a>o++&1)}return e&&(this.offset=t),f},a.readBytes=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var r=this.slice(e,e+t);return i&&(this.offset+=t),r},a.writeBytes=a.append,a.writeInt8=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,i&&(this.offset+=1),this},a.writeByte=a.writeInt8,a.readInt8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=this.view[t];return 128===(128&i)&&(i=-(255-i+1)),e&&(this.offset+=1),i},a.readByte=a.readInt8,a.writeUint8=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,i&&(this.offset+=1),this},a.writeUInt8=a.writeUint8,a.readUint8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=this.view[t];return e&&(this.offset+=1),i},a.readUInt8=a.readUint8,a.writeInt16=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),i&&(this.offset+=2),this},a.writeShort=a.writeInt16,a.readInt16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t],i|=this.view[t+1]<<8):(i=this.view[t]<<8,i|=this.view[t+1]),32768===(32768&i)&&(i=-(65535-i+1)),e&&(this.offset+=2),i},a.readShort=a.readInt16,a.writeUint16=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),i&&(this.offset+=2),this},a.writeUInt16=a.writeUint16,a.readUint16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t],i|=this.view[t+1]<<8):(i=this.view[t]<<8,i|=this.view[t+1]),e&&(this.offset+=2),i},a.readUInt16=a.readUint16,a.writeInt32=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),i&&(this.offset+=4),this},a.writeInt=a.writeInt32,a.readInt32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),i|=0,e&&(this.offset+=4),i},a.readInt=a.readInt32,a.writeUint32=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),i&&(this.offset+=4),this},a.writeUInt32=a.writeUint32,a.readUint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),e&&(this.offset+=4),i},a.readUInt32=a.readUint32,t&&(a.writeInt64=function(e,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=e.low,a=e.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=a>>>24&255,this.view[i+2]=a>>>16&255,this.view[i+1]=a>>>8&255,this.view[i]=255&a):(this.view[i]=a>>>24&255,this.view[i+1]=a>>>16&255,this.view[i+2]=a>>>8&255,this.view[i+3]=255&a,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},a.writeLong=a.writeInt64,a.readInt64=function(e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var s=new t(r,n,!1);return i&&(this.offset+=8),s},a.readLong=a.readInt64,a.writeUint64=function(e,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=e.low,a=e.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=a>>>24&255,this.view[i+2]=a>>>16&255,this.view[i+1]=a>>>8&255,this.view[i]=255&a):(this.view[i]=a>>>24&255,this.view[i+1]=a>>>16&255,this.view[i+2]=a>>>8&255,this.view[i+3]=255&a,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},a.writeUInt64=a.writeUint64,a.readUint64=function(e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var s=new t(r,n,!0);return i&&(this.offset+=8),s},a.readUInt64=a.readUint64),a.writeFloat32=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,n(this.view,t,e,this.littleEndian,23,4),i&&(this.offset+=4),this},a.writeFloat=a.writeFloat32,a.readFloat32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=r(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),i},a.readFloat=a.readFloat32,a.writeFloat64=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e), -e-=8,n(this.view,t,e,this.littleEndian,52,8),i&&(this.offset+=8),this},a.writeDouble=a.writeFloat64,a.readFloat64=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var i=r(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),i},a.readDouble=a.readFloat64,s.MAX_VARINT32_BYTES=5,s.calculateVarint32=function(t){return t>>>=0,t<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},s.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},s.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},a.writeVarint32=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,n=s.calculateVarint32(t);e+=n;var a=this.buffer.byteLength;for(e>a&&this.resize((a*=2)>e?a:e),e-=n,t>>>=0;t>=128;)r=127&t|128,this.view[e++]=r,t>>>=7;return this.view[e++]=t,i?(this.offset=e,this):n},a.writeVarint32ZigZag=function(t,e){return this.writeVarint32(s.zigZagEncode32(t),e)},a.readVarint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i,r=0,n=0;do{if(!this.noAssert&&t>this.limit){var s=Error("Truncated");throw s.truncated=!0,s}i=this.view[t++],r<5&&(n|=(127&i)<<7*r),++r}while(0!==(128&i));return n|=0,e?(this.offset=t,n):{value:n,length:r}},a.readVarint32ZigZag=function(t){var e=this.readVarint32(t);return"object"==typeof e?e.value=s.zigZagDecode32(e.value):e=s.zigZagDecode32(e),e},t&&(s.MAX_VARINT64_BYTES=10,s.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var i=e.toInt()>>>0,r=e.shiftRightUnsigned(28).toInt()>>>0,n=e.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==r?i<16384?i<128?1:2:i<1<<21?3:4:r<16384?r<128?5:6:r<1<<21?7:8:n<128?9:10},s.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},s.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},a.writeVarint64=function(e,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned());var n=s.calculateVarint64(e),a=e.toInt()>>>0,f=e.shiftRightUnsigned(28).toInt()>>>0,o=e.shiftRightUnsigned(56).toInt()>>>0;i+=n;var h=this.buffer.byteLength;switch(i>h&&this.resize((h*=2)>i?h:i),i-=n,n){case 10:this.view[i+9]=o>>>7&1;case 9:this.view[i+8]=9!==n?128|o:127&o;case 8:this.view[i+7]=8!==n?f>>>21|128:f>>>21&127;case 7:this.view[i+6]=7!==n?f>>>14|128:f>>>14&127;case 6:this.view[i+5]=6!==n?f>>>7|128:f>>>7&127;case 5:this.view[i+4]=5!==n?128|f:127&f;case 4:this.view[i+3]=4!==n?a>>>21|128:a>>>21&127;case 3:this.view[i+2]=3!==n?a>>>14|128:a>>>14&127;case 2:this.view[i+1]=2!==n?a>>>7|128:a>>>7&127;case 1:this.view[i]=1!==n?128|a:127&a}return r?(this.offset+=n,this):n},a.writeVarint64ZigZag=function(t,e){return this.writeVarint64(s.zigZagEncode64(t),e)},a.readVarint64=function(e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=e,n=0,s=0,a=0,f=0;if(f=this.view[e++],n=127&f,128&f&&(f=this.view[e++],n|=(127&f)<<7,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],n|=(127&f)<<14,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],n|=(127&f)<<21,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],s=127&f,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],s|=(127&f)<<7,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],s|=(127&f)<<14,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],s|=(127&f)<<21,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],a=127&f,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],a|=(127&f)<<7,128&f||this.noAssert&&"undefined"==typeof f))))))))))throw Error("Buffer overrun");var o=t.fromBits(n|s<<28,s>>>4|a<<24,!1);return i?(this.offset=e,o):{value:o,length:e-r}},a.readVarint64ZigZag=function(e){var i=this.readVarint64(e);return i&&i.value instanceof t?i.value=s.zigZagDecode64(i.value):i=s.zigZagDecode64(i),i}),a.writeCString=function(t,i){var r="undefined"==typeof i;r&&(i=this.offset);var n,s=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}s=u.calculateUTF16asUTF8(e(t))[1],i+=s+1;var a=this.buffer.byteLength;return i>a&&this.resize((a*=2)>i?a:i),i-=s+1,u.encodeUTF16toUTF8(e(t),function(t){this.view[i++]=t}.bind(this)),this.view[i++]=0,r?(this.offset=i,this):s},a.readCString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,s=-1;return u.decodeUTF8toUTF16(function(){if(0===s)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return s=this.view[t++],0===s?null:s}.bind(this),r=i(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},a.writeIString=function(t,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,s=i;n=u.calculateUTF16asUTF8(e(t),this.noAssert)[1],i+=4+n;var a=this.buffer.byteLength;if(i>a&&this.resize((a*=2)>i?a:i),i-=4+n,this.littleEndian?(this.view[i+3]=n>>>24&255,this.view[i+2]=n>>>16&255,this.view[i+1]=n>>>8&255,this.view[i]=255&n):(this.view[i]=n>>>24&255,this.view[i+1]=n>>>16&255,this.view[i+2]=n>>>8&255,this.view[i+3]=255&n),i+=4,u.encodeUTF16toUTF8(e(t),function(t){this.view[i++]=t}.bind(this)),i!==s+4+n)throw RangeError("Illegal range: Truncated data, "+i+" == "+(i+4+n));return r?(this.offset=i,this):i-s},a.readIString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=t,r=this.readUint32(t),n=this.readUTF8String(r,s.METRICS_BYTES,t+=4);return t+=n.length,e?(this.offset=t,n.string):{string:n.string,length:t-i}},s.METRICS_CHARS="c",s.METRICS_BYTES="b",a.writeUTF8String=function(t,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,s=i;n=u.calculateUTF16asUTF8(e(t))[1],i+=n;var a=this.buffer.byteLength;return i>a&&this.resize((a*=2)>i?a:i),i-=n,u.encodeUTF16toUTF8(e(t),function(t){this.view[i++]=t}.bind(this)),r?(this.offset=i,this):i-s},a.writeString=a.writeUTF8String,s.calculateUTF8Chars=function(t){return u.calculateUTF16asUTF8(e(t))[0]},s.calculateUTF8Bytes=function(t){return u.calculateUTF16asUTF8(e(t))[1]},s.calculateString=s.calculateUTF8Bytes,a.readUTF8String=function(t,e,r){"number"==typeof e&&(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),"undefined"==typeof e&&(e=s.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var a,f=0,o=r;if(e===s.METRICS_CHARS){if(a=i(),u.decodeUTF8(function(){return f>>=0,r<0||r+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+"+t+") <= "+this.buffer.byteLength)}var h=r+t;if(u.decodeUTF8toUTF16(function(){return r>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,a,f=i;n=u.calculateUTF16asUTF8(e(t),this.noAssert)[1],a=s.calculateVarint32(n),i+=a+n;var o=this.buffer.byteLength;if(i>o&&this.resize((o*=2)>i?o:i),i-=a+n,i+=this.writeVarint32(n,i),u.encodeUTF16toUTF8(e(t),function(t){this.view[i++]=t}.bind(this)),i!==f+n+a)throw RangeError("Illegal range: Truncated data, "+i+" == "+(i+n+a));return r?(this.offset=i,this):i-f},a.readVString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=t,r=this.readVarint32(t),n=this.readUTF8String(r.value,s.METRICS_BYTES,t+=r.length);return t+=n.length,e?(this.offset=t,n.string):{string:n.string,length:t-i}},a.append=function(t,e,i){"number"!=typeof e&&"string"==typeof e||(i=e,e=void 0);var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}t instanceof s||(t=s.wrap(t,e));var n=t.limit-t.offset;if(n<=0)return this;i+=n;var a=this.buffer.byteLength;return i>a&&this.resize((a*=2)>i?a:i),i-=n,this.view.set(t.view.subarray(t.offset,t.limit),i),t.offset+=n,r&&(this.offset+=n),this},a.appendTo=function(t,e){return t.append(this,e),this},a.assert=function(t){return this.noAssert=!t,this},a.capacity=function(){return this.buffer.byteLength},a.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},a.clone=function(t){var e=new s(0,this.littleEndian,this.noAssert);return t?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},a.compact=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var i=e-t;if(0===i)return this.buffer=f,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var r=new ArrayBuffer(i),n=new Uint8Array(r);return n.set(this.view.subarray(t,e)),this.buffer=r,this.view=n,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=i,this},a.copy=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(t===e)return new s(0,this.littleEndian,this.noAssert);var i=e-t,r=new s(i,this.littleEndian,this.noAssert);return r.offset=0,r.limit=i,r.markedOffset>=0&&(r.markedOffset-=t),this.copyTo(r,0,t,e),r},a.copyTo=function(t,e,i,r){var n,a;if(!this.noAssert&&!s.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(a="undefined"==typeof e)?t.offset:0|e,i=(n="undefined"==typeof i)?this.offset:0|i,r="undefined"==typeof r?this.limit:0|r,e<0||e>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+t.buffer.byteLength);if(i<0||r>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+i+" <= "+this.buffer.byteLength);var f=r-i;return 0===f?t:(t.ensureCapacity(e+f),t.view.set(this.view.subarray(i,r),e),n&&(this.offset+=f),a&&(t.offset+=f),this)},a.ensureCapacity=function(t){var e=this.buffer.byteLength;return et?e:t):this},a.fill=function(t,e,i){var r="undefined"==typeof e;if(r&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),"undefined"==typeof e&&(e=this.offset),"undefined"==typeof i&&(i=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof i||i%1!==0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,e<0||e>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+i+" <= "+this.buffer.byteLength)}if(e>=i)return this;for(;e>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},a.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},a.LE=function(t){return this.littleEndian="undefined"==typeof t||!!t,this},a.BE=function(t){return this.littleEndian="undefined"!=typeof t&&!t,this},a.prepend=function(t,e,i){"number"!=typeof e&&"string"==typeof e||(i=e,e=void 0);var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}t instanceof s||(t=s.wrap(t,e));var n=t.limit-t.offset;if(n<=0)return this;var a=n-i;if(a>0){var f=new ArrayBuffer(this.buffer.byteLength+a),o=new Uint8Array(f);o.set(this.view.subarray(i,this.buffer.byteLength),n),this.buffer=f,this.view=o,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,i+=a}else{new Uint8Array(this.buffer)}return this.view.set(t.view.subarray(t.offset,t.limit),i-n),t.offset=t.limit,r&&(this.offset-=n),this},a.prependTo=function(t,e){return t.prepend(this,e),this},a.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},a.remaining=function(){return this.limit-this.offset},a.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},a.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if(t|=0,t<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},a.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},a.slice=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=t,i.limit=e,i},a.toBuffer=function(t){var e=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof i||i%1!==0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,e<0||e>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+i+" <= "+this.buffer.byteLength)}if(!t&&0===e&&i===this.buffer.byteLength)return this.buffer;if(e===i)return f;var r=new ArrayBuffer(i-e);return new Uint8Array(r).set(new Uint8Array(this.buffer).subarray(e,i),0),r},a.toArrayBuffer=a.toBuffer,a.toString=function(t,e,i){if("undefined"==typeof t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(t="utf8",e=t,i=e),t){case"utf8":return this.toUTF8(e,i);case"base64":return this.toBase64(e,i);case"hex":return this.toHex(e,i);case"binary":return this.toBinary(e,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var h=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],r=0,n=e.length;r>2&63]),n=(3&r)<<4,null!==(r=t())?(n|=r>>4&15,i(e[63&(n|r>>4&15)]),n=(15&r)<<2,null!==(r=t())?(i(e[63&(n|r>>6&3)]),i(e[63&r])):(i(e[63&n]),i(61))):(i(e[63&n]),i(61),i(61))},t.decode=function(t,e){function r(t){throw Error("Illegal character code: "+t)}for(var n,s,a;null!==(n=t());)if(s=i[n],"undefined"==typeof s&&r(n),null!==(n=t())&&(a=i[n],"undefined"==typeof a&&r(n),e(s<<2>>>0|(48&a)>>4),null!==(n=t()))){if(s=i[n],"undefined"==typeof s){if(61===n)break;r(n)}if(e((15&a)<<4>>>0|(60&s)>>2),null!==(n=t())){if(a=i[n],"undefined"==typeof a){if(61===n)break;r(n)}e((3&s)<<6>>>0|a)}}},t.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)},t}();a.toBase64=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return h.encode(function(){return tthis.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var i=[],r=[];t=1024&&(r.push(String.fromCharCode.apply(String,i)),i=[]);return r.join("")+String.fromCharCode.apply(String,i)},s.fromBinary=function(t,e){if("string"!=typeof t)throw TypeError("str");for(var i,r=0,n=t.length,a=new s(n,e);r255)throw RangeError("illegal char code: "+i);a.view[r++]=i}return a.limit=n,a},a.toDebug=function(t){for(var e,i=-1,r=this.buffer.byteLength,n="",s="",a="";i32&&e<127?String.fromCharCode(e):".")),++i,t&&i>0&&i%16===0&&i!==r){for(;n.length<51;)n+=" ";a+=n+s+"\n",n=s=""}n+=i===this.offset&&i===this.limit?i===this.markedOffset?"!":"|":i===this.offset?i===this.markedOffset?"[":"<":i===this.limit?i===this.markedOffset?"]":">":i===this.markedOffset?"'":t||0!==i&&i!==r?" ":""}if(t&&" "!==n){for(;n.length<51;)n+=" ";a+=n+s+"\n"}return t?a:n},s.fromDebug=function(t,e,i){for(var r,n,a=t.length,f=new s((a+1)/3|0,e,i),o=0,h=0,u=!1,l=!1,d=!1,b=!1,c=!1;o":if(!i){if(b){c=!0;break}b=!0}f.limit=h,u=!1;break;case"'":if(!i){if(d){c=!0;break}d=!0}f.markedOffset=h,u=!1;break;case" ":u=!1;break;default:if(!i&&u){c=!0;break}if(n=parseInt(r+t.charAt(o++),16),!i&&(isNaN(n)||n<0||n>255))throw TypeError("Illegal str: Not a debug encoded string");f.view[h++]=n,u=!0}if(c)throw TypeError("Illegal str: Invalid symbol at "+o)}if(!i){if(!l||!b)throw TypeError("Illegal str: Missing offset or limit");if(h>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var i,r=new Array(e-t);t255))throw TypeError("Illegal str: Contains non-hex characters");a.view[o++]=r}return a.limit=o,a};var u=function(){var t={};return t.MAX_CODEPOINT=1114111,t.encodeUTF8=function(t,e){var i=null;for("number"==typeof t&&(i=t,t=function(){return null});null!==i||null!==(i=t());)i<128?e(127&i):i<2048?(e(i>>6&31|192),e(63&i|128)):i<65536?(e(i>>12&15|224),e(i>>6&63|128),e(63&i|128)):(e(i>>18&7|240),e(i>>12&63|128),e(i>>6&63|128),e(63&i|128)),i=null},t.decodeUTF8=function(t,e){for(var i,r,n,s,a=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(i=t());)if(0===(128&i))e(i);else if(192===(224&i))null===(r=t())&&a([i,r]),e((31&i)<<6|63&r);else if(224===(240&i))(null===(r=t())||null===(n=t()))&&a([i,r,n]),e((15&i)<<12|(63&r)<<6|63&n);else{if(240!==(248&i))throw RangeError("Illegal starting byte: "+i);(null===(r=t())||null===(n=t())||null===(s=t()))&&a([i,r,n,s]),e((7&i)<<18|(63&r)<<12|(63&n)<<6|63&s)}},t.UTF16toUTF8=function(t,e){for(var i,r=null;;){if(null===(i=null!==r?r:t()))break;i>=55296&&i<=57343&&null!==(r=t())&&r>=56320&&r<=57343?(e(1024*(i-55296)+r-56320+65536),r=null):e(i)}null!==r&&e(r)},t.UTF8toUTF16=function(t,e){var i=null;for("number"==typeof t&&(i=t,t=function(){return null});null!==i||null!==(i=t());)i<=65535?e(i):(i-=65536,e((i>>10)+55296),e(i%1024+56320)),i=null},t.encodeUTF16toUTF8=function(e,i){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,i)})},t.decodeUTF8toUTF16=function(e,i){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,i)})},t.calculateCodePoint=function(t){return t<128?1:t<2048?2:t<65536?3:4},t.calculateUTF8=function(t){for(var e,i=0;null!==(e=t());)i+=e<128?1:e<2048?2:e<65536?3:4;return i},t.calculateUTF16asUTF8=function(e){var i=0,r=0;return t.UTF16toUTF8(e,function(t){++i,r+=t<128?1:t<2048?2:t<65536?3:4}),[i,r]},t}();return a.toUTF8=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r;try{u.decodeUTF8toUTF16(function(){return t>>=0,(s=0<=t&&t<256)&&(r=o[t])?r:(i=n(t,(0|t)<0?-1:0,!0),s&&(o[t]=i),i)):(t|=0,(s=-128<=t&&t<128)&&(r=f[t])?r:(i=n(t,t<0?-1:0,!1),s&&(f[t]=i),i))}function r(t,e){if(isNaN(t)||!isFinite(t))return e?p:g;if(e){if(t<0)return p;if(t>=d)return m}else{if(t<=-b)return E;if(t+1>=b)return v}return t<0?r(-t,e).neg():n(t%l|0,t/l|0,e)}function n(e,i,r){return new t(e,i,r)}function s(t,e,i){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return g;if("number"==typeof e?(i=e,e=!1):e=!!e,i=i||10,i<2||360)throw Error("interior hyphen");if(0===n)return s(t.substring(1),e,i).neg();for(var a=r(h(i,8)),f=g,o=0;o>>0:this.low},U.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},U.toString=function(t){if(t=t||10,t<2||36>>0,l=u.toString(t);if(a=o,a.isZero())return l+f;for(;l.length<6;)l="0"+l;f=""+l+f}},U.getHighBits=function(){return this.high},U.getHighBitsUnsigned=function(){return this.high>>>0},U.getLowBits=function(){return this.low},U.getLowBitsUnsigned=function(){return this.low>>>0},U.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<=0},U.isOdd=function(){return 1===(1&this.low)},U.isEven=function(){return 0===(1&this.low)},U.equals=function(t){return e(t)||(t=a(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},U.eq=U.equals,U.notEquals=function(t){return!this.eq(t)},U.neq=U.notEquals,U.lessThan=function(t){return this.comp(t)<0},U.lt=U.lessThan,U.lessThanOrEqual=function(t){return this.comp(t)<=0},U.lte=U.lessThanOrEqual,U.greaterThan=function(t){return this.comp(t)>0},U.gt=U.greaterThan,U.greaterThanOrEqual=function(t){return this.comp(t)>=0},U.gte=U.greaterThanOrEqual,U.compare=function(t){if(e(t)||(t=a(t)),this.eq(t))return 0;var i=this.isNegative(),r=t.isNegative();return i&&!r?-1:!i&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},U.comp=U.compare,U.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(_)},U.neg=U.negate,U.add=function(t){e(t)||(t=a(t));var i=this.high>>>16,r=65535&this.high,s=this.low>>>16,f=65535&this.low,o=t.high>>>16,h=65535&t.high,u=t.low>>>16,l=65535&t.low,d=0,b=0,c=0,g=0;return g+=f+l,c+=g>>>16,g&=65535,c+=s+u,b+=c>>>16,c&=65535,b+=r+h,d+=b>>>16,b&=65535,d+=i+o,d&=65535,n(c<<16|g,d<<16|b,this.unsigned)},U.subtract=function(t){return e(t)||(t=a(t)),this.add(t.neg())},U.sub=U.subtract,U.multiply=function(t){if(this.isZero())return g; +var JavaClassTools=function(t){function e(r){if(i[r])return i[r].exports;var n=i[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var n=i(1),s=r(n),a=i(11),f=r(a),o=i(7),h=r(o),u=i(8),l=r(u),d=i(9),b=r(d),c=i(12);t.exports={JavaClassFileReader:s.default,JavaClassFileWriter:f.default,Opcode:l.default,ConstantType:h.default,Modifier:b.default,Instruction:c.Instruction,InstructionParser:c.InstructionParser}},function(t,e,i){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=function(){function t(t,e){for(var i=0;i=64&&L<=127)A.stack=[this._readVerificationTypeInfo()];else if(247==A.frame_type)A.offset_delta=this.buf.readUint16(),A.stack=[this._readVerificationTypeInfo()];else if(L>=248&&L<=251)A.offset_delta=this.buf.readUint16();else if(L>=252&&L<=254){A.offset_delta=this.buf.readUint16(),A.locals=[];for(var O=L-251;O--;)A.locals.push(this._readVerificationTypeInfo())}else if(255==L){A.offset_delta=this.buf.readUint16(),A.number_of_locals=this.buf.readUint16(),A.locals=[];for(var R=A.number_of_locals;R--;)A.locals.push(this._readVerificationTypeInfo());A.number_of_stack_items=this.buf.readUint16(),A.stack=[];for(var k=A.number_of_stack_items;k--;)A.stack.push(this._readVerificationTypeInfo())}t.entries.push(A)}break;case"Code":t.max_stack=this.buf.readUint16(),t.max_locals=this.buf.readUint16(),t.code_length=this.buf.readUint32(),t.code=[];for(var F=t.code_length;F--;)t.code.push(this.buf.readUint8());t.exception_table_length=this.buf.readUint16(),t.exception_table=[];for(var S=t.exception_table_length;S--;){var N={start_pc:this.buf.readUint16(),end_pc:this.buf.readUint16(),handler_pc:this.buf.readUint16(),catch_type:this.buf.readUint16()};t.exception_table.push(N)}t.attributes_count=this.buf.readUint16(),t.attributes=this._readAttributeInfoArray(t.attributes_count);break;case"LineNumberTable":t.line_number_table_length=this.buf.readUint16(),t.line_number_table=[];for(var x=t.line_number_table_length;x--;){var D={start_pc:this.buf.readUint16(),line_number:this.buf.readUint16()};t.line_number_table.push(D)}break;default:throw Error("Unexpected attributeName: "+i)}return t}},{key:"_readAttributeAnnotation",value:function(){for(var t={type_index:this.buf.readUint16(),num_element_value_pairs:this.buf.readUint16(),element_value_pairs:[]},e=t.num_element_value_pairs;e--;){var i={element_name_index:this.buf.readUint16(),element_value:this._readElementValue()};t.element_value_pairs.push(i)}return t}},{key:"_readElementValue",value:function(){var t={tag:this.buf.readUint8(),value:{}};switch(t.tag){case 101:t.value.enum_const_value={type_name_index:this.buf.readUint16(),const_name_index:this.buf.readUint16()};break;case 99:t.value.class_info_index=this.buf.readUint16();break;case 91:for(var e={num_values:this.buf.readUInt16(),values:[]},i=e.num_values;i--;)e.values.push(this._readElementValue());t.value.array_value=e;break;case 64:t.value.annotation=this._readAttributeAnnotation();break;case 66:case 67:case 68:case 70:case 73:case 74:case 83:case 90:case 115:t.value.const_value_index=this.buf.readUint16();break;default:throw Error("Unexpected tag: "+t.tag)}return t}},{key:"_readInterfaces",value:function(t){for(var e=[];t--;)e.push(this.buf.readUint16());return e}},{key:"_readConstantPool",value:function(t){for(var e=[void 0];t--;){var i=this._readConstantPoolEntry();e.push(i),i.tag!=u.default.LONG&&i.tag!=u.default.DOUBLE||(e.push(void 0),t--)}return e}},{key:"_readConstantPoolEntry",value:function(){var t={tag:this.buf.readUInt8()};switch(t.tag){case u.default.UTF8:var e=this.buf.readUint16();for(t.length=e,t.bytes=[];e--;)t.bytes.push(this.buf.readUInt8());break;case u.default.INTEGER:case u.default.FLOAT:t.bytes=this.buf.readUint32();break;case u.default.LONG:case u.default.DOUBLE:t.high_bytes=this.buf.readUint32(),t.low_bytes=this.buf.readUint32();break;case u.default.CLASS:t.name_index=this.buf.readUInt16();break;case u.default.STRING:t.string_index=this.buf.readUInt16();break;case u.default.FIELDREF:case u.default.METHODREF:case u.default.INTERFACE_METHODREF:t.class_index=this.buf.readUint16(),t.name_and_type_index=this.buf.readUint16();break;case u.default.NAME_AND_TYPE:t.name_index=this.buf.readUint16(),t.descriptor_index=this.buf.readUint16();break;case u.default.METHOD_HANDLE:t.reference_kind=this.buf.readUint8(),t.reference_index=this.buf.readUint16();break;case u.default.METHOD_TYPE:t.descriptor_index=this.buf.readUInt16();break;case u.default.INVOKE_DYNAMIC:t.bootstrap_method_attr_index=this.buf.readUint16(),t.name_and_type_index=this.buf.readUint16();break;default:throw Error("Unexpected tag: "+t.tag)}return t}}]),t}());t.exports=b}).call(e,i(2))},function(t,e){function i(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function n(t){if(u===setTimeout)return setTimeout(t,0);if((u===i||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function s(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function a(){g&&b&&(g=!1,b.length?c=b.concat(c):p=-1,c.length&&f())}function f(){if(!g){var t=n(a);g=!0;for(var e=c.length;e;){for(b=c,c=[];++p1)for(var i=1;i1024&&(e.push(o.apply(String,t)),t.length=0),void Array.prototype.push.apply(t,arguments))}}function r(t,e,i,r,n){var s,a,f=8*n-r-1,o=(1<>1,u=-7,l=i?n-1:0,d=i?-1:1,b=t[e+l];for(l+=d,s=b&(1<<-u)-1,b>>=-u,u+=f;u>0;s=256*s+t[e+l],l+=d,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=r;u>0;a=256*a+t[e+l],l+=d,u-=8);if(0===s)s=1-h;else{if(s===o)return a?NaN:(b?-1:1)*(1/0);a+=Math.pow(2,r),s-=h}return(b?-1:1)*a*Math.pow(2,s-r)}function n(t,e,i,r,n,s){var a,f,o,h=8*s-n-1,u=(1<>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,b=r?0:s-1,c=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(o=Math.pow(2,-a))<1&&(a--,o*=2),e+=a+l>=1?d/o:d*Math.pow(2,1-l),e*o>=2&&(a++,o/=2),a+l>=u?(f=0,a=u):a+l>=1?(f=(e*o-1)*Math.pow(2,n),a+=l):(f=e*Math.pow(2,l-1)*Math.pow(2,n),a=0));n>=8;t[i+b]=255&f,b+=c,f/=256,n-=8);for(a=a<0;t[i+b]=255&a,b+=c,a/=256,h-=8);t[i+b-c]|=128*g}var s=function(t,e,i){if("undefined"==typeof t&&(t=s.DEFAULT_CAPACITY),"undefined"==typeof e&&(e=s.DEFAULT_ENDIAN),"undefined"==typeof i&&(i=s.DEFAULT_NOASSERT),!i){if(t|=0,t<0)throw RangeError("Illegal capacity");e=!!e,i=!!i}this.buffer=0===t?f:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=e,this.noAssert=i};s.VERSION="5.0.1",s.LITTLE_ENDIAN=!0,s.BIG_ENDIAN=!1,s.DEFAULT_CAPACITY=16,s.DEFAULT_ENDIAN=s.BIG_ENDIAN,s.DEFAULT_NOASSERT=!1,s.Long=t||null;var a=s.prototype;a.__isByteBuffer__,Object.defineProperty(a,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var f=new ArrayBuffer(0),o=String.fromCharCode;s.accessor=function(){return Uint8Array},s.allocate=function(t,e,i){return new s(t,e,i)},s.concat=function(t,e,i,r){"boolean"!=typeof e&&"string"==typeof e||(r=i,i=e,e=void 0);for(var n,a=0,f=0,o=t.length;f0&&(a+=n);if(0===a)return new s(0,i,r);var h,u=new s(a,i,r);for(f=0;f0&&(n.buffer=t.buffer,n.offset=t.byteOffset,n.limit=t.byteOffset+t.byteLength,n.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)n=new s(0,i,r),t.byteLength>0&&(n.buffer=t,n.offset=0,n.limit=t.byteLength,n.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");n=new s(t.length,i,r),n.limit=t.length;for(var f=0;f>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,n=e,s=t.length,a=s>>3,f=0;for(e+=this.writeVarint32(s,e);a--;)r=1&!!t[f++]|(1&!!t[f++])<<1|(1&!!t[f++])<<2|(1&!!t[f++])<<3|(1&!!t[f++])<<4|(1&!!t[f++])<<5|(1&!!t[f++])<<6|(1&!!t[f++])<<7,this.writeByte(r,e++);if(f>3,a=0,f=[];for(t+=r.length;s--;)i=this.readByte(t++),f[a++]=!!(1&i),f[a++]=!!(2&i),f[a++]=!!(4&i),f[a++]=!!(8&i),f[a++]=!!(16&i),f[a++]=!!(32&i),f[a++]=!!(64&i),f[a++]=!!(128&i);if(a>o++&1)}return e&&(this.offset=t),f},a.readBytes=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var r=this.slice(e,e+t);return i&&(this.offset+=t),r},a.writeBytes=a.append,a.writeInt8=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,i&&(this.offset+=1),this},a.writeByte=a.writeInt8,a.readInt8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=this.view[t];return 128===(128&i)&&(i=-(255-i+1)),e&&(this.offset+=1),i},a.readByte=a.readInt8,a.writeUint8=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,i&&(this.offset+=1),this},a.writeUInt8=a.writeUint8,a.readUint8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=this.view[t];return e&&(this.offset+=1),i},a.readUInt8=a.readUint8,a.writeInt16=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),i&&(this.offset+=2),this},a.writeShort=a.writeInt16,a.readInt16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t],i|=this.view[t+1]<<8):(i=this.view[t]<<8,i|=this.view[t+1]),32768===(32768&i)&&(i=-(65535-i+1)),e&&(this.offset+=2),i},a.readShort=a.readInt16,a.writeUint16=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),i&&(this.offset+=2),this},a.writeUInt16=a.writeUint16,a.readUint16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t],i|=this.view[t+1]<<8):(i=this.view[t]<<8,i|=this.view[t+1]),e&&(this.offset+=2),i},a.readUInt16=a.readUint16,a.writeInt32=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),i&&(this.offset+=4),this},a.writeInt=a.writeInt32,a.readInt32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),i|=0,e&&(this.offset+=4),i},a.readInt=a.readInt32,a.writeUint32=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),i&&(this.offset+=4),this},a.writeUInt32=a.writeUint32,a.readUint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),e&&(this.offset+=4),i},a.readUInt32=a.readUint32,t&&(a.writeInt64=function(e,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=e.low,a=e.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=a>>>24&255,this.view[i+2]=a>>>16&255,this.view[i+1]=a>>>8&255,this.view[i]=255&a):(this.view[i]=a>>>24&255,this.view[i+1]=a>>>16&255,this.view[i+2]=a>>>8&255,this.view[i+3]=255&a,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},a.writeLong=a.writeInt64,a.readInt64=function(e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var s=new t(r,n,!1);return i&&(this.offset+=8),s},a.readLong=a.readInt64,a.writeUint64=function(e,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=e.low,a=e.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=a>>>24&255,this.view[i+2]=a>>>16&255,this.view[i+1]=a>>>8&255,this.view[i]=255&a):(this.view[i]=a>>>24&255,this.view[i+1]=a>>>16&255,this.view[i+2]=a>>>8&255,this.view[i+3]=255&a,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},a.writeUInt64=a.writeUint64,a.readUint64=function(e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var s=new t(r,n,!0);return i&&(this.offset+=8),s},a.readUInt64=a.readUint64),a.writeFloat32=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,n(this.view,t,e,this.littleEndian,23,4),i&&(this.offset+=4),this},a.writeFloat=a.writeFloat32,a.readFloat32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=r(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),i},a.readFloat=a.readFloat32,a.writeFloat64=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=8, +n(this.view,t,e,this.littleEndian,52,8),i&&(this.offset+=8),this},a.writeDouble=a.writeFloat64,a.readFloat64=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var i=r(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),i},a.readDouble=a.readFloat64,s.MAX_VARINT32_BYTES=5,s.calculateVarint32=function(t){return t>>>=0,t<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},s.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},s.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},a.writeVarint32=function(t,e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,n=s.calculateVarint32(t);e+=n;var a=this.buffer.byteLength;for(e>a&&this.resize((a*=2)>e?a:e),e-=n,t>>>=0;t>=128;)r=127&t|128,this.view[e++]=r,t>>>=7;return this.view[e++]=t,i?(this.offset=e,this):n},a.writeVarint32ZigZag=function(t,e){return this.writeVarint32(s.zigZagEncode32(t),e)},a.readVarint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i,r=0,n=0;do{if(!this.noAssert&&t>this.limit){var s=Error("Truncated");throw s.truncated=!0,s}i=this.view[t++],r<5&&(n|=(127&i)<<7*r),++r}while(0!==(128&i));return n|=0,e?(this.offset=t,n):{value:n,length:r}},a.readVarint32ZigZag=function(t){var e=this.readVarint32(t);return"object"==typeof e?e.value=s.zigZagDecode32(e.value):e=s.zigZagDecode32(e),e},t&&(s.MAX_VARINT64_BYTES=10,s.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var i=e.toInt()>>>0,r=e.shiftRightUnsigned(28).toInt()>>>0,n=e.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==r?i<16384?i<128?1:2:i<1<<21?3:4:r<16384?r<128?5:6:r<1<<21?7:8:n<128?9:10},s.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},s.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},a.writeVarint64=function(e,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned());var n=s.calculateVarint64(e),a=e.toInt()>>>0,f=e.shiftRightUnsigned(28).toInt()>>>0,o=e.shiftRightUnsigned(56).toInt()>>>0;i+=n;var h=this.buffer.byteLength;switch(i>h&&this.resize((h*=2)>i?h:i),i-=n,n){case 10:this.view[i+9]=o>>>7&1;case 9:this.view[i+8]=9!==n?128|o:127&o;case 8:this.view[i+7]=8!==n?f>>>21|128:f>>>21&127;case 7:this.view[i+6]=7!==n?f>>>14|128:f>>>14&127;case 6:this.view[i+5]=6!==n?f>>>7|128:f>>>7&127;case 5:this.view[i+4]=5!==n?128|f:127&f;case 4:this.view[i+3]=4!==n?a>>>21|128:a>>>21&127;case 3:this.view[i+2]=3!==n?a>>>14|128:a>>>14&127;case 2:this.view[i+1]=2!==n?a>>>7|128:a>>>7&127;case 1:this.view[i]=1!==n?128|a:127&a}return r?(this.offset+=n,this):n},a.writeVarint64ZigZag=function(t,e){return this.writeVarint64(s.zigZagEncode64(t),e)},a.readVarint64=function(e){var i="undefined"==typeof e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=e,n=0,s=0,a=0,f=0;if(f=this.view[e++],n=127&f,128&f&&(f=this.view[e++],n|=(127&f)<<7,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],n|=(127&f)<<14,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],n|=(127&f)<<21,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],s=127&f,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],s|=(127&f)<<7,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],s|=(127&f)<<14,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],s|=(127&f)<<21,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],a=127&f,(128&f||this.noAssert&&"undefined"==typeof f)&&(f=this.view[e++],a|=(127&f)<<7,128&f||this.noAssert&&"undefined"==typeof f))))))))))throw Error("Buffer overrun");var o=t.fromBits(n|s<<28,s>>>4|a<<24,!1);return i?(this.offset=e,o):{value:o,length:e-r}},a.readVarint64ZigZag=function(e){var i=this.readVarint64(e);return i&&i.value instanceof t?i.value=s.zigZagDecode64(i.value):i=s.zigZagDecode64(i),i}),a.writeCString=function(t,i){var r="undefined"==typeof i;r&&(i=this.offset);var n,s=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}s=u.calculateUTF16asUTF8(e(t))[1],i+=s+1;var a=this.buffer.byteLength;return i>a&&this.resize((a*=2)>i?a:i),i-=s+1,u.encodeUTF16toUTF8(e(t),function(t){this.view[i++]=t}.bind(this)),this.view[i++]=0,r?(this.offset=i,this):s},a.readCString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,s=-1;return u.decodeUTF8toUTF16(function(){if(0===s)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return s=this.view[t++],0===s?null:s}.bind(this),r=i(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},a.writeIString=function(t,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,s=i;n=u.calculateUTF16asUTF8(e(t),this.noAssert)[1],i+=4+n;var a=this.buffer.byteLength;if(i>a&&this.resize((a*=2)>i?a:i),i-=4+n,this.littleEndian?(this.view[i+3]=n>>>24&255,this.view[i+2]=n>>>16&255,this.view[i+1]=n>>>8&255,this.view[i]=255&n):(this.view[i]=n>>>24&255,this.view[i+1]=n>>>16&255,this.view[i+2]=n>>>8&255,this.view[i+3]=255&n),i+=4,u.encodeUTF16toUTF8(e(t),function(t){this.view[i++]=t}.bind(this)),i!==s+4+n)throw RangeError("Illegal range: Truncated data, "+i+" == "+(i+4+n));return r?(this.offset=i,this):i-s},a.readIString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=t,r=this.readUint32(t),n=this.readUTF8String(r,s.METRICS_BYTES,t+=4);return t+=n.length,e?(this.offset=t,n.string):{string:n.string,length:t-i}},s.METRICS_CHARS="c",s.METRICS_BYTES="b",a.writeUTF8String=function(t,i){var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,s=i;n=u.calculateUTF16asUTF8(e(t))[1],i+=n;var a=this.buffer.byteLength;return i>a&&this.resize((a*=2)>i?a:i),i-=n,u.encodeUTF16toUTF8(e(t),function(t){this.view[i++]=t}.bind(this)),r?(this.offset=i,this):i-s},a.writeString=a.writeUTF8String,s.calculateUTF8Chars=function(t){return u.calculateUTF16asUTF8(e(t))[0]},s.calculateUTF8Bytes=function(t){return u.calculateUTF16asUTF8(e(t))[1]},s.calculateString=s.calculateUTF8Bytes,a.readUTF8String=function(t,e,r){"number"==typeof e&&(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),"undefined"==typeof e&&(e=s.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var a,f=0,o=r;if(e===s.METRICS_CHARS){if(a=i(),u.decodeUTF8(function(){return f>>=0,r<0||r+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+"+t+") <= "+this.buffer.byteLength)}var h=r+t;if(u.decodeUTF8toUTF16(function(){return r>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,a,f=i;n=u.calculateUTF16asUTF8(e(t),this.noAssert)[1],a=s.calculateVarint32(n),i+=a+n;var o=this.buffer.byteLength;if(i>o&&this.resize((o*=2)>i?o:i),i-=a+n,i+=this.writeVarint32(n,i),u.encodeUTF16toUTF8(e(t),function(t){this.view[i++]=t}.bind(this)),i!==f+n+a)throw RangeError("Illegal range: Truncated data, "+i+" == "+(i+n+a));return r?(this.offset=i,this):i-f},a.readVString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=t,r=this.readVarint32(t),n=this.readUTF8String(r.value,s.METRICS_BYTES,t+=r.length);return t+=n.length,e?(this.offset=t,n.string):{string:n.string,length:t-i}},a.append=function(t,e,i){"number"!=typeof e&&"string"==typeof e||(i=e,e=void 0);var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}t instanceof s||(t=s.wrap(t,e));var n=t.limit-t.offset;if(n<=0)return this;i+=n;var a=this.buffer.byteLength;return i>a&&this.resize((a*=2)>i?a:i),i-=n,this.view.set(t.view.subarray(t.offset,t.limit),i),t.offset+=n,r&&(this.offset+=n),this},a.appendTo=function(t,e){return t.append(this,e),this},a.assert=function(t){return this.noAssert=!t,this},a.capacity=function(){return this.buffer.byteLength},a.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},a.clone=function(t){var e=new s(0,this.littleEndian,this.noAssert);return t?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},a.compact=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var i=e-t;if(0===i)return this.buffer=f,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var r=new ArrayBuffer(i),n=new Uint8Array(r);return n.set(this.view.subarray(t,e)),this.buffer=r,this.view=n,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=i,this},a.copy=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(t===e)return new s(0,this.littleEndian,this.noAssert);var i=e-t,r=new s(i,this.littleEndian,this.noAssert);return r.offset=0,r.limit=i,r.markedOffset>=0&&(r.markedOffset-=t),this.copyTo(r,0,t,e),r},a.copyTo=function(t,e,i,r){var n,a;if(!this.noAssert&&!s.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(a="undefined"==typeof e)?t.offset:0|e,i=(n="undefined"==typeof i)?this.offset:0|i,r="undefined"==typeof r?this.limit:0|r,e<0||e>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+t.buffer.byteLength);if(i<0||r>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+i+" <= "+this.buffer.byteLength);var f=r-i;return 0===f?t:(t.ensureCapacity(e+f),t.view.set(this.view.subarray(i,r),e),n&&(this.offset+=f),a&&(t.offset+=f),this)},a.ensureCapacity=function(t){var e=this.buffer.byteLength;return et?e:t):this},a.fill=function(t,e,i){var r="undefined"==typeof e;if(r&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),"undefined"==typeof e&&(e=this.offset),"undefined"==typeof i&&(i=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof i||i%1!==0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,e<0||e>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+i+" <= "+this.buffer.byteLength)}if(e>=i)return this;for(;e>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},a.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},a.LE=function(t){return this.littleEndian="undefined"==typeof t||!!t,this},a.BE=function(t){return this.littleEndian="undefined"!=typeof t&&!t,this},a.prepend=function(t,e,i){"number"!=typeof e&&"string"==typeof e||(i=e,e=void 0);var r="undefined"==typeof i;if(r&&(i=this.offset),!this.noAssert){if("number"!=typeof i||i%1!==0)throw TypeError("Illegal offset: "+i+" (not an integer)");if(i>>>=0,i<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}t instanceof s||(t=s.wrap(t,e));var n=t.limit-t.offset;if(n<=0)return this;var a=n-i;if(a>0){var f=new ArrayBuffer(this.buffer.byteLength+a),o=new Uint8Array(f);o.set(this.view.subarray(i,this.buffer.byteLength),n),this.buffer=f,this.view=o,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,i+=a}else{new Uint8Array(this.buffer)}return this.view.set(t.view.subarray(t.offset,t.limit),i-n),t.offset=t.limit,r&&(this.offset-=n),this},a.prependTo=function(t,e){return t.prepend(this,e),this},a.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},a.remaining=function(){return this.limit-this.offset},a.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},a.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if(t|=0,t<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},a.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},a.slice=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=t,i.limit=e,i},a.toBuffer=function(t){var e=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof i||i%1!==0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,e<0||e>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+i+" <= "+this.buffer.byteLength)}if(!t&&0===e&&i===this.buffer.byteLength)return this.buffer;if(e===i)return f;var r=new ArrayBuffer(i-e);return new Uint8Array(r).set(new Uint8Array(this.buffer).subarray(e,i),0),r},a.toArrayBuffer=a.toBuffer,a.toString=function(t,e,i){if("undefined"==typeof t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(t="utf8",e=t,i=e),t){case"utf8":return this.toUTF8(e,i);case"base64":return this.toBase64(e,i);case"hex":return this.toHex(e,i);case"binary":return this.toBinary(e,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var h=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],r=0,n=e.length;r>2&63]),n=(3&r)<<4,null!==(r=t())?(n|=r>>4&15,i(e[63&(n|r>>4&15)]),n=(15&r)<<2,null!==(r=t())?(i(e[63&(n|r>>6&3)]),i(e[63&r])):(i(e[63&n]),i(61))):(i(e[63&n]),i(61),i(61))},t.decode=function(t,e){function r(t){throw Error("Illegal character code: "+t)}for(var n,s,a;null!==(n=t());)if(s=i[n],"undefined"==typeof s&&r(n),null!==(n=t())&&(a=i[n],"undefined"==typeof a&&r(n),e(s<<2>>>0|(48&a)>>4),null!==(n=t()))){if(s=i[n],"undefined"==typeof s){if(61===n)break;r(n)}if(e((15&a)<<4>>>0|(60&s)>>2),null!==(n=t())){if(a=i[n],"undefined"==typeof a){if(61===n)break;r(n)}e((3&s)<<6>>>0|a)}}},t.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)},t}();a.toBase64=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return h.encode(function(){return tthis.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var i=[],r=[];t=1024&&(r.push(String.fromCharCode.apply(String,i)),i=[]);return r.join("")+String.fromCharCode.apply(String,i)},s.fromBinary=function(t,e){if("string"!=typeof t)throw TypeError("str");for(var i,r=0,n=t.length,a=new s(n,e);r255)throw RangeError("illegal char code: "+i);a.view[r++]=i}return a.limit=n,a},a.toDebug=function(t){for(var e,i=-1,r=this.buffer.byteLength,n="",s="",a="";i32&&e<127?String.fromCharCode(e):".")),++i,t&&i>0&&i%16===0&&i!==r){for(;n.length<51;)n+=" ";a+=n+s+"\n",n=s=""}n+=i===this.offset&&i===this.limit?i===this.markedOffset?"!":"|":i===this.offset?i===this.markedOffset?"[":"<":i===this.limit?i===this.markedOffset?"]":">":i===this.markedOffset?"'":t||0!==i&&i!==r?" ":""}if(t&&" "!==n){for(;n.length<51;)n+=" ";a+=n+s+"\n"}return t?a:n},s.fromDebug=function(t,e,i){for(var r,n,a=t.length,f=new s((a+1)/3|0,e,i),o=0,h=0,u=!1,l=!1,d=!1,b=!1,c=!1;o":if(!i){if(b){c=!0;break}b=!0}f.limit=h,u=!1;break;case"'":if(!i){if(d){c=!0;break}d=!0}f.markedOffset=h,u=!1;break;case" ":u=!1;break;default:if(!i&&u){c=!0;break}if(n=parseInt(r+t.charAt(o++),16),!i&&(isNaN(n)||n<0||n>255))throw TypeError("Illegal str: Not a debug encoded string");f.view[h++]=n,u=!0}if(c)throw TypeError("Illegal str: Invalid symbol at "+o)}if(!i){if(!l||!b)throw TypeError("Illegal str: Missing offset or limit");if(h>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var i,r=new Array(e-t);t255))throw TypeError("Illegal str: Contains non-hex characters");a.view[o++]=r}return a.limit=o,a};var u=function(){var t={};return t.MAX_CODEPOINT=1114111,t.encodeUTF8=function(t,e){var i=null;for("number"==typeof t&&(i=t,t=function(){return null});null!==i||null!==(i=t());)i<128?e(127&i):i<2048?(e(i>>6&31|192),e(63&i|128)):i<65536?(e(i>>12&15|224),e(i>>6&63|128),e(63&i|128)):(e(i>>18&7|240),e(i>>12&63|128),e(i>>6&63|128),e(63&i|128)),i=null},t.decodeUTF8=function(t,e){for(var i,r,n,s,a=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(i=t());)if(0===(128&i))e(i);else if(192===(224&i))null===(r=t())&&a([i,r]),e((31&i)<<6|63&r);else if(224===(240&i))(null===(r=t())||null===(n=t()))&&a([i,r,n]),e((15&i)<<12|(63&r)<<6|63&n);else{if(240!==(248&i))throw RangeError("Illegal starting byte: "+i);(null===(r=t())||null===(n=t())||null===(s=t()))&&a([i,r,n,s]),e((7&i)<<18|(63&r)<<12|(63&n)<<6|63&s)}},t.UTF16toUTF8=function(t,e){for(var i,r=null;;){if(null===(i=null!==r?r:t()))break;i>=55296&&i<=57343&&null!==(r=t())&&r>=56320&&r<=57343?(e(1024*(i-55296)+r-56320+65536),r=null):e(i)}null!==r&&e(r)},t.UTF8toUTF16=function(t,e){var i=null;for("number"==typeof t&&(i=t,t=function(){return null});null!==i||null!==(i=t());)i<=65535?e(i):(i-=65536,e((i>>10)+55296),e(i%1024+56320)),i=null},t.encodeUTF16toUTF8=function(e,i){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,i)})},t.decodeUTF8toUTF16=function(e,i){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,i)})},t.calculateCodePoint=function(t){return t<128?1:t<2048?2:t<65536?3:4},t.calculateUTF8=function(t){for(var e,i=0;null!==(e=t());)i+=e<128?1:e<2048?2:e<65536?3:4;return i},t.calculateUTF16asUTF8=function(e){var i=0,r=0;return t.UTF16toUTF8(e,function(t){++i,r+=t<128?1:t<2048?2:t<65536?3:4}),[i,r]},t}();return a.toUTF8=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r;try{u.decodeUTF8toUTF16(function(){return t>>=0,(s=0<=t&&t<256)&&(r=o[t])?r:(i=n(t,(0|t)<0?-1:0,!0),s&&(o[t]=i),i)):(t|=0,(s=-128<=t&&t<128)&&(r=f[t])?r:(i=n(t,t<0?-1:0,!1),s&&(f[t]=i),i))}function r(t,e){if(isNaN(t)||!isFinite(t))return e?p:g;if(e){if(t<0)return p;if(t>=d)return m}else{if(t<=-b)return E;if(t+1>=b)return v}return t<0?r(-t,e).neg():n(t%l|0,t/l|0,e)}function n(e,i,r){return new t(e,i,r)}function s(t,e,i){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return g;if("number"==typeof e?(i=e,e=!1):e=!!e,i=i||10,i<2||360)throw Error("interior hyphen");if(0===n)return s(t.substring(1),e,i).neg();for(var a=r(h(i,8)),f=g,o=0;o>>0:this.low},U.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},U.toString=function(t){if(t=t||10,t<2||36>>0,l=u.toString(t);if(a=o,a.isZero())return l+f;for(;l.length<6;)l="0"+l;f=""+l+f}},U.getHighBits=function(){return this.high},U.getHighBitsUnsigned=function(){return this.high>>>0},U.getLowBits=function(){return this.low},U.getLowBitsUnsigned=function(){return this.low>>>0},U.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<=0},U.isOdd=function(){return 1===(1&this.low)},U.isEven=function(){return 0===(1&this.low)},U.equals=function(t){return e(t)||(t=a(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},U.eq=U.equals,U.notEquals=function(t){return!this.eq(t)},U.neq=U.notEquals,U.lessThan=function(t){return this.comp(t)<0},U.lt=U.lessThan,U.lessThanOrEqual=function(t){return this.comp(t)<=0},U.lte=U.lessThanOrEqual,U.greaterThan=function(t){return this.comp(t)>0},U.gt=U.greaterThan,U.greaterThanOrEqual=function(t){return this.comp(t)>=0},U.gte=U.greaterThanOrEqual,U.compare=function(t){if(e(t)||(t=a(t)),this.eq(t))return 0;var i=this.isNegative(),r=t.isNegative();return i&&!r?-1:!i&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},U.comp=U.compare,U.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(_)},U.neg=U.negate,U.add=function(t){e(t)||(t=a(t));var i=this.high>>>16,r=65535&this.high,s=this.low>>>16,f=65535&this.low,o=t.high>>>16,h=65535&t.high,u=t.low>>>16,l=65535&t.low,d=0,b=0,c=0,g=0;return g+=f+l,c+=g>>>16,g&=65535,c+=s+u,b+=c>>>16,c&=65535,b+=r+h,d+=b>>>16,b&=65535,d+=i+o,d&=65535,n(c<<16|g,d<<16|b,this.unsigned)},U.subtract=function(t){return e(t)||(t=a(t)),this.add(t.neg())},U.sub=U.subtract,U.multiply=function(t){if(this.isZero())return g; if(e(t)||(t=a(t)),t.isZero())return g;if(this.eq(E))return t.isOdd()?E:g;if(t.eq(E))return this.isOdd()?E:g;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(c)&&t.lt(c))return r(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,s=65535&this.high,f=this.low>>>16,o=65535&this.low,h=t.high>>>16,u=65535&t.high,l=t.low>>>16,d=65535&t.low,b=0,p=0,_=0,w=0;return w+=o*d,_+=w>>>16,w&=65535,_+=f*d,p+=_>>>16,_&=65535,_+=o*l,p+=_>>>16,_&=65535,p+=s*d,b+=p>>>16,p&=65535,p+=f*l,b+=p>>>16,p&=65535,p+=o*u,b+=p>>>16,p&=65535,b+=i*d+s*l+f*u+o*h,b&=65535,n(_<<16|w,b<<16|p,this.unsigned)},U.mul=U.multiply,U.divide=function(t){if(e(t)||(t=a(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?p:g;var i,n,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return p;if(t.gt(this.shru(1)))return w;s=p}else{if(this.eq(E)){if(t.eq(_)||t.eq(y))return E;if(t.eq(E))return _;var f=this.shr(1);return i=f.div(t).shl(1),i.eq(g)?t.isNegative()?_:y:(n=this.sub(t.mul(i)),s=i.add(n.div(t)))}if(t.eq(E))return this.unsigned?p:g;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=g}for(n=this;n.gte(t);){i=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(i)/Math.LN2),u=o<=48?1:h(2,o-48),l=r(i),d=l.mul(t);d.isNegative()||d.gt(n);)i-=u,l=r(i,this.unsigned),d=l.mul(t);l.isZero()&&(l=_),s=s.add(l),n=n.sub(d)}return s},U.div=U.divide,U.modulo=function(t){return e(t)||(t=a(t)),this.sub(this.div(t).mul(t))},U.mod=U.modulo,U.not=function(){return n(~this.low,~this.high,this.unsigned)},U.and=function(t){return e(t)||(t=a(t)),n(this.low&t.low,this.high&t.high,this.unsigned)},U.or=function(t){return e(t)||(t=a(t)),n(this.low|t.low,this.high|t.high,this.unsigned)},U.xor=function(t){return e(t)||(t=a(t)),n(this.low^t.low,this.high^t.high,this.unsigned)},U.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?n(this.low<>>32-t,this.unsigned):n(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):n(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},U.shr=U.shiftRight,U.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),t&=63,0===t)return this;var i=this.high;if(t<32){var r=this.low;return n(r>>>t|i<<32-t,i>>>t,this.unsigned)}return 32===t?n(i,0,this.unsigned):n(i>>>t-32,0,this.unsigned)},U.shru=U.shiftRightUnsigned,U.toSigned=function(){return this.unsigned?n(this.low,this.high,!1):this},U.toUnsigned=function(){return this.unsigned?this:n(this.low,this.high,!0)},U.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},U.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},U.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})}).call(e,i(4)(t))},function(t,e){"use strict";var i={UTF8:1,INTEGER:3,FLOAT:4,LONG:5,DOUBLE:6,CLASS:7,STRING:8,FIELDREF:9,METHODREF:10,INTERFACE_METHODREF:11,NAME_AND_TYPE:12,METHOD_HANDLE:15,METHOD_TYPE:16,INVOKE_DYNAMIC:18};t.exports=i},function(t,e){"use strict";var i={NOP:0,ACONST_NULL:1,ICONST_M1:2,ICONST_0:3,ICONST_1:4,ICONST_2:5,ICONST_3:6,ICONST_4:7,ICONST_5:8,LCONST_0:9,LCONST_1:10,FCONST_0:11,FCONST_1:12,FCONST_2:13,DCONST_0:14,DCONST_1:15,BIPUSH:16,SIPUSH:17,LDC:18,LDC_W:19,LDC2_W:20,ILOAD:21,LLOAD:22,FLOAD:23,DLOAD:24,ALOAD:25,ILOAD_0:26,ILOAD_1:27,ILOAD_2:28,ILOAD_3:29,LLOAD_0:30,LLOAD_1:31,LLOAD_2:32,LLOAD_3:33,FLOAD_0:34,FLOAD_1:35,FLOAD_2:36,FLOAD_3:37,DLOAD_0:38,DLOAD_1:39,DLOAD_2:40,DLOAD_3:41,ALOAD_0:42,ALOAD_1:43,ALOAD_2:44,ALOAD_3:45,IALOAD:46,LALOAD:47,FALOAD:48,DALOAD:49,AALOAD:50,BALOAD:51,CALOAD:52,SALOAD:53,ISTORE:54,LSTORE:55,FSTORE:56,DSTORE:57,ASTORE:58,ISTORE_0:59,ISTORE_1:60,ISTORE_2:61,ISTORE_3:62,LSTORE_0:63,LSTORE_1:64,LSTORE_2:65,LSTORE_3:66,FSTORE_0:67,FSTORE_1:68,FSTORE_2:69,FSTORE_3:70,DSTORE_0:71,DSTORE_1:72,DSTORE_2:73,DSTORE_3:74,ASTORE_0:75,ASTORE_1:76,ASTORE_2:77,ASTORE_3:78,IASTORE:79,LASTORE:80,FASTORE:81,DASTORE:82,AASTORE:83,BASTORE:84,CASTORE:85,SASTORE:86,POP:87,POP2:88,DUP:89,DUP_X1:90,DUP_X2:91,DUP2:92,DUP2_X1:93,DUP2_X2:94,SWAP:95,IADD:96,LADD:97,FADD:98,DADD:99,ISUB:100,LSUB:101,FSUB:102,DSUB:103,IMUL:104,LMUL:105,FMUL:106,DMUL:107,IDIV:108,LDIV:109,FDIV:110,DDIV:111,IREM:112,LREM:113,FREM:114,DREM:115,INEG:116,LNEG:117,FNEG:118,DNEG:119,ISHL:120,LSHL:121,ISHR:122,LSHR:123,IUSHR:124,LUSHR:125,IAND:126,LAND:127,IOR:128,LOR:129,IXOR:130,LXOR:131,IINC:132,I2L:133,I2F:134,I2D:135,L2I:136,L2F:137,L2D:138,F2I:139,F2L:140,F2D:141,D2I:142,D2L:143,D2F:144,I2B:145,I2C:146,I2S:147,LCMP:148,FCMPL:149,FCMPG:150,DCMPL:151,DCMPG:152,IFEQ:153,IFNE:154,IFLT:155,IFGE:156,IFGT:157,IFLE:158,IF_ICMPEQ:159,IF_ICMPNE:160,IF_ICMPLT:161,IF_ICMPGE:162,IF_ICMPGT:163,IF_ICMPLE:164,IF_ACMPEQ:165,IF_ACMPNE:166,GOTO:167,JSR:168,RET:169,TABLESWITCH:170,LOOKUPSWITCH:171,IRETURN:172,LRETURN:173,FRETURN:174,DRETURN:175,ARETURN:176,RETURN:177,GETSTATIC:178,PUTSTATIC:179,GETFIELD:180,PUTFIELD:181,INVOKEVIRTUAL:182,INVOKESPECIAL:183,INVOKESTATIC:184,INVOKEINTERFACE:185,INVOKEDYNAMIC:186,NEW:187,NEWARRAY:188,ANEWARRAY:189,ARRAYLENGTH:190,ATHROW:191,CHECKCAST:192,INSTANCEOF:193,MONITORENTER:194,MONITOREXIT:195,WIDE:196,MULTIANEWARRAY:197,IFNULL:198,IFNONNULL:199,GOTO_W:200,JSR_W:201,BREAKPOINT:202,IMPDEP1:254,IMPDEP2:255};t.exports=i},function(t,e){"use strict";var i={PUBLIC:1,PRIVATE:2,PROTECTED:4,STATIC:8,FINAL:16,SUPER:32,VOLATILE:64,BRIDGE:64,TRANSIENT:128,VARARGS:128,NATIVE:256,INTERFACE:512,ABSTRACT:1024,SYNTHETIC:4096,ANNOTATION:8192,ENUM:16384};t.exports=i},function(t,e){},function(t,e,i){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s=function(){function t(t,e){for(var i=0;i=64&&d<=127)this._writeVerificationTypeInfo(l.stack[0]);else if(247==l.frame_type)this.buf.writeUint16(l.offset_delta),this._writeVerificationTypeInfo(l.stack[0]);else if(d>=248&&d<=251)this.buf.writeUint16(l.offset_delta);else if(d>=252&&d<=254){this.buf.writeUint16(l.offset_delta);for(var b=d-251,o=0;o>24&255,a>>16&255,a>>8&255,255&a);var h=r.operands[s++];for(e.push(h>>24&255,h>>16&255,h>>8&255,255&h);h--;){var u=r.operands[s++],l=r.operands[s++]-1;e.push(u>>24&255,u>>16&255,u>>8&255,255&u),e.push(l>>24&255,l>>16&255,l>>8&255,255&l)}break;case f.default.TABLESWITCH:for(var d=e.length%4?4-e.length%4:0,b=0;d--;)e.push(0);var c=r.operands[b++]-1;e.push(c>>24&255,c>>16&255,c>>8&255,255&c);var g=r.operands[b++],p=r.operands[b++];e.push(g>>24&255,g>>16&255,g>>8&255,255&g),e.push(p>>24&255,p>>16&255,p>>8&255,255&p);for(var _=p-g+1;_--;){var w=r.operands[b++]-1;e.push(w>>24&255,w>>16&255,w>>8&255,255&w)}break;case f.default.WIDE:var y=r.operands[0];switch(y){case f.default.ILOAD:case f.default.FLOAD:case f.default.ALOAD:case f.default.LLOAD:case f.default.DLOAD:case f.default.ISTORE:case f.default.FSTORE:case f.default.ASTORE:case f.default.LSTORE:case f.default.DSTORE:case f.default.RET:e.push(y,r.operands[1],r.operands[2]);break;case f.default.IINC:e.push(y,r.operands[1],r.operands[2],r.operands[3],r.operands[4]);break;default:throw"Unexpected wide opcode: "+y}break;default:var v=o[r.opcode];if(void 0===v)throw Error("Unexpected opcode: "+r);if(r.operands.length>v)throw Error("The number of operands in instruction: "+r+" is greater than the allowed.");for(var m=0;m