diff --git a/packages/connect-examples/electron-example/package.json b/packages/connect-examples/electron-example/package.json index f4c0de6df..669bdcf19 100644 --- a/packages/connect-examples/electron-example/package.json +++ b/packages/connect-examples/electron-example/package.json @@ -2,7 +2,7 @@ "name": "hardware-example", "productName": "HardwareExample", "executableName": "onekey-hardware-example", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "author": "OneKey", "description": "End-to-end encrypted workspaces for teams", "main": "dist/index.js", @@ -22,7 +22,7 @@ "ts:check": "yarn tsc --noEmit" }, "dependencies": { - "@onekeyfe/hd-transport-electron": "1.1.20", + "@onekeyfe/hd-transport-electron": "1.1.21-alpha.1", "@stoprocent/noble": "2.3.4", "debug": "4.3.4", "electron-is-dev": "^3.0.1", diff --git a/packages/connect-examples/expo-example/package.json b/packages/connect-examples/expo-example/package.json index 5bc747ea3..12688962a 100644 --- a/packages/connect-examples/expo-example/package.json +++ b/packages/connect-examples/expo-example/package.json @@ -1,6 +1,6 @@ { "name": "expo-example", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "scripts": { "start": "cross-env CONNECT_SRC=https://localhost:8087/ yarn expo start --dev-client", "android": "yarn expo run:android", @@ -19,10 +19,10 @@ "@noble/ed25519": "^2.1.0", "@noble/hashes": "^1.3.3", "@noble/secp256k1": "^1.7.1", - "@onekeyfe/hd-ble-sdk": "1.1.20", - "@onekeyfe/hd-common-connect-sdk": "1.1.20", - "@onekeyfe/hd-core": "1.1.20", - "@onekeyfe/hd-web-sdk": "1.1.20", + "@onekeyfe/hd-ble-sdk": "1.1.21-alpha.1", + "@onekeyfe/hd-common-connect-sdk": "1.1.21-alpha.1", + "@onekeyfe/hd-core": "1.1.21-alpha.1", + "@onekeyfe/hd-web-sdk": "1.1.21-alpha.1", "@onekeyfe/react-native-ble-utils": "^0.1.3", "@polkadot/util-crypto": "13.1.1", "@react-native-async-storage/async-storage": "1.21.0", diff --git a/packages/connect-examples/expo-playground/package.json b/packages/connect-examples/expo-playground/package.json index 227e0e450..84820e84d 100644 --- a/packages/connect-examples/expo-playground/package.json +++ b/packages/connect-examples/expo-playground/package.json @@ -1,6 +1,6 @@ { "name": "onekey-hardware-playground", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "private": true, "sideEffects": [ "app/utils/shim.js", @@ -17,9 +17,9 @@ }, "dependencies": { "@noble/hashes": "^1.8.0", - "@onekeyfe/hd-common-connect-sdk": "1.1.20", - "@onekeyfe/hd-core": "1.1.20", - "@onekeyfe/hd-shared": "1.1.20", + "@onekeyfe/hd-common-connect-sdk": "1.1.21-alpha.1", + "@onekeyfe/hd-core": "1.1.21-alpha.1", + "@onekeyfe/hd-shared": "1.1.21-alpha.1", "@radix-ui/react-checkbox": "^1.3.2", "@radix-ui/react-dialog": "^1.1.14", "@radix-ui/react-dropdown-menu": "^2.1.15", diff --git a/packages/connect-examples/native-android-example/app/src/main/assets/index.e70e0048.js b/packages/connect-examples/native-android-example/app/src/main/assets/index.e70e0048.js index 157e282b4..52d71d4a8 100644 --- a/packages/connect-examples/native-android-example/app/src/main/assets/index.e70e0048.js +++ b/packages/connect-examples/native-android-example/app/src/main/assets/index.e70e0048.js @@ -2432,19 +2432,19 @@ var HardwareSdk__default = /*#__PURE__*/ _interopDefaultLegacy(HardwareSdk); var HttpTransport__default = /*#__PURE__*/ _interopDefaultLegacy(HttpTransport); var WebusbTransport__default = /*#__PURE__*/ _interopDefaultLegacy(WebusbTransport); var LowlevelTransport__default = /*#__PURE__*/ _interopDefaultLegacy(LowlevelTransport); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var __assign = function() { __assign = Object.assign || function __assign(t) { for(var s, i = 1, n = arguments.length; i < n; i++){ @@ -2998,7 +2998,7 @@ function postMessage(message, usePromise) { case 2: _core.handleMessage(message); return [ - 2 /*return*/ + 2 /*return*/ ]; } }); @@ -3057,7 +3057,7 @@ var init = function(settings, _, plugin) { ]; case 4: return [ - 2 /*return*/ + 2 /*return*/ ]; } }); @@ -3108,7 +3108,7 @@ var call = function(params) { ]; case 4: return [ - 2 /*return*/ + 2 /*return*/ ]; } }); @@ -3167,19 +3167,19 @@ var axios__default = /*#__PURE__*/ _interopDefaultLegacy(axios); var ByteBuffer__default = /*#__PURE__*/ _interopDefaultLegacy(ByteBuffer); var BigNumber__default = /*#__PURE__*/ _interopDefaultLegacy(BigNumber); var JSZip__default = /*#__PURE__*/ _interopDefaultLegacy(JSZip); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __rest(s, e) { var t = {}; for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; @@ -28645,16 +28645,16 @@ const getFirmwareUpdateField = ({ features, updateType, targetVersion })=>{ const deviceType = getDeviceType(features); const deviceFirmwareVersion = getDeviceFirmwareVersion(features); if (updateType === "ble") return "ble"; - if (DeviceModelToTypes.model_mini.includes(deviceType)) return "firmware-v7"; + if (DeviceModelToTypes.model_mini.includes(deviceType)) return "firmware-v8"; if (deviceType === hdShared.EDeviceType.Touch) { if (targetVersion) { if (semver__default["default"].eq(targetVersion, "4.0.0")) return "firmware-v2"; - if (semver__default["default"].gt(targetVersion, "4.0.0")) return "firmware-v7"; + if (semver__default["default"].gt(targetVersion, "4.0.0")) return "firmware-v8"; } if (semver__default["default"].lt(deviceFirmwareVersion.join("."), "3.4.0")) return "firmware"; - return "firmware-v7"; + return "firmware-v8"; } - if (deviceType === hdShared.EDeviceType.Pro) return "firmware-v7"; + if (deviceType === hdShared.EDeviceType.Pro) return "firmware-v8"; return "firmware"; }; const getFirmwareUpdateFieldArray = (features, updateType)=>{ @@ -28663,12 +28663,12 @@ const getFirmwareUpdateFieldArray = (features, updateType)=>{ "ble" ]; if (deviceType === "classic" || deviceType === "classic1s" || deviceType === "mini" || deviceType === "classicpure") return [ - "firmware-v7" + "firmware-v8" ]; if (deviceType === "touch") { const currentVersion = getDeviceFirmwareVersion(features).join("."); if (semver__default["default"].gt(currentVersion, "4.0.0")) return [ - "firmware-v7", + "firmware-v8", "firmware" ]; if (semver__default["default"].gte(currentVersion, "4.0.0")) return [ @@ -28676,7 +28676,7 @@ const getFirmwareUpdateFieldArray = (features, updateType)=>{ "firmware" ]; if (!currentVersion || semver__default["default"].lt(currentVersion, "3.0.0")) return [ - "firmware-v7", + "firmware-v8", "firmware-v2", "firmware" ]; @@ -28685,7 +28685,7 @@ const getFirmwareUpdateFieldArray = (features, updateType)=>{ ]; } if (deviceType === "pro") return [ - "firmware-v7" + "firmware-v8" ]; return [ "firmware" @@ -46782,19 +46782,19 @@ const isOnekeyDevice = (name, id)=>{ if (name && re.exec(name)) return true; return false; }; -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -64792,19 +64792,19 @@ function _interopNamespace(e) { var protobuf__namespace = /*#__PURE__*/ _interopNamespace(protobuf); var Long__namespace = /*#__PURE__*/ _interopNamespace(Long); var ByteBuffer__default = /*#__PURE__*/ _interopDefaultLegacy(ByteBuffer); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __rest(s, e) { var t = {}; for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; @@ -66514,20 +66514,20 @@ util._configure = function() { },{"217e30ba36d0c075":"ihGsB","140216d783bbc015":"2nsq5","78776c045df9e77b":"2My7D","392006759dba32fb":"jra39","ac14d008f0aa6436":"86QKD","298ebb5f36c5d25a":"PxlFH","dc7a35661f9f9275":"3yUvf","94b513d9f4cac968":"anW8P"}],"ihGsB":[function(require,module,exports) { "use strict"; module.exports = asPromise; -/** - * Callback as used by {@link util.asPromise}. - * @typedef asPromiseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {...*} params Additional arguments - * @returns {undefined} - */ /** - * Returns a promise from a node-style callback function. - * @memberof util - * @param {asPromiseCallback} fn Function to call - * @param {*} ctx Function context - * @param {...*} params Function arguments - * @returns {Promise<*>} Promisified function +/** + * Callback as used by {@link util.asPromise}. + * @typedef asPromiseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {...*} params Additional arguments + * @returns {undefined} + */ /** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function */ function asPromise(fn, ctx /*, varargs */ ) { var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true; while(index < arguments.length)params[offset++] = arguments[index++]; @@ -66556,15 +66556,15 @@ module.exports = asPromise; },{}],"2nsq5":[function(require,module,exports) { "use strict"; -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace */ var base64 = exports; -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length */ base64.length = function length(string) { var p = string.length; if (!p) return 0; @@ -66578,12 +66578,12 @@ var b64 = new Array(64); var s64 = new Array(123); // 65..90, 97..122, 48..57, 43, 47 for(var i = 0; i < 64;)s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string */ base64.encode = function encode(buffer, start, end) { var parts = null, chunk = []; var i = 0, j = 0, t; // temporary @@ -66623,13 +66623,13 @@ for(var i = 0; i < 64;)s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? return String.fromCharCode.apply(String, chunk.slice(0, i)); }; var invalidEncoding = "invalid encoding"; -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid */ base64.decode = function decode(string, buffer, offset) { var start = offset; var j = 0, t; // temporary @@ -66661,10 +66661,10 @@ var invalidEncoding = "invalid encoding"; if (j === 1) throw Error(invalidEncoding); return offset - start; }; -/** - * Tests if the specified string appears to be base64 encoded. - * @param {string} string String to test - * @returns {boolean} `true` if probably base64 encoded, otherwise false +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false */ base64.test = function test(string) { return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); }; @@ -66672,24 +66672,24 @@ var invalidEncoding = "invalid encoding"; },{}],"2My7D":[function(require,module,exports) { "use strict"; module.exports = EventEmitter; -/** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor */ function EventEmitter() { - /** - * Registered listeners. - * @type {Object.} - * @private + /** + * Registered listeners. + * @type {Object.} + * @private */ this._listeners = {}; } -/** - * Registers an event listener. - * @param {string} evt Event name - * @param {function} fn Listener - * @param {*} [ctx] Listener context - * @returns {util.EventEmitter} `this` +/** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` */ EventEmitter.prototype.on = function on(evt, fn, ctx) { (this._listeners[evt] || (this._listeners[evt] = [])).push({ fn: fn, @@ -66697,11 +66697,11 @@ module.exports = EventEmitter; }); return this; }; -/** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param {string} [evt] Event name. Removes all listeners if omitted. - * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns {util.EventEmitter} `this` +/** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` */ EventEmitter.prototype.off = function off(evt, fn) { if (evt === undefined) this._listeners = {}; else if (fn === undefined) this._listeners[evt] = []; @@ -66712,11 +66712,11 @@ module.exports = EventEmitter; } return this; }; -/** - * Emits an event by calling its listeners with the specified arguments. - * @param {string} evt Event name - * @param {...*} args Arguments - * @returns {util.EventEmitter} `this` +/** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` */ EventEmitter.prototype.emit = function emit(evt) { var listeners = this._listeners[evt]; if (listeners) { @@ -66730,70 +66730,70 @@ module.exports = EventEmitter; },{}],"jra39":[function(require,module,exports) { "use strict"; module.exports = factory(factory); -/** - * Reads / writes floats / doubles from / to buffers. - * @name util.float - * @namespace - */ /** - * Writes a 32 bit float to a buffer using little endian byte order. - * @name util.float.writeFloatLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ /** - * Writes a 32 bit float to a buffer using big endian byte order. - * @name util.float.writeFloatBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ /** - * Reads a 32 bit float from a buffer using little endian byte order. - * @name util.float.readFloatLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ /** - * Reads a 32 bit float from a buffer using big endian byte order. - * @name util.float.readFloatBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ /** - * Writes a 64 bit double to a buffer using little endian byte order. - * @name util.float.writeDoubleLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ /** - * Writes a 64 bit double to a buffer using big endian byte order. - * @name util.float.writeDoubleBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ /** - * Reads a 64 bit double from a buffer using little endian byte order. - * @name util.float.readDoubleLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ /** - * Reads a 64 bit double from a buffer using big endian byte order. - * @name util.float.readDoubleBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read +/** + * Reads / writes floats / doubles from / to buffers. + * @name util.float + * @namespace + */ /** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name util.float.writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ /** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name util.float.writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ /** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name util.float.readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ /** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name util.float.readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ /** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name util.float.writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ /** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name util.float.writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ /** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name util.float.readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ /** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name util.float.readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read */ // Factory function for the purpose of node-based testing in modified global environments function factory(exports) { // float: typed array @@ -66977,11 +66977,11 @@ function readUintBE(buf, pos) { },{}],"86QKD":[function(require,module,exports) { "use strict"; module.exports = inquire; -/** - * Requires a module only if available. - * @memberof util - * @param {string} moduleName Module to require - * @returns {?Object} Required module if available and not empty, otherwise `null` +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` */ function inquire(moduleName) { try { var mod = eval("quire".replace(/^/, "re"))(moduleName); // eslint-disable-line no-eval @@ -66992,15 +66992,15 @@ module.exports = inquire; },{}],"PxlFH":[function(require,module,exports) { "use strict"; -/** - * A minimal UTF8 implementation for number arrays. - * @memberof util - * @namespace +/** + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace */ var utf8 = exports; -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length */ utf8.length = function utf8_length(string) { var len = 0, c = 0; for(var i = 0; i < string.length; ++i){ @@ -67014,12 +67014,12 @@ module.exports = inquire; } return len; }; -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read */ utf8.read = function utf8_read(buffer, start, end) { var len = end - start; if (len < 1) return ""; @@ -67044,12 +67044,12 @@ module.exports = inquire; } return String.fromCharCode.apply(String, chunk.slice(0, i)); }; -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written */ utf8.write = function utf8_write(string, buffer, offset) { var start = offset, c1, c2; // character 2 for(var i = 0; i < string.length; ++i){ @@ -67077,28 +67077,28 @@ module.exports = inquire; },{}],"3yUvf":[function(require,module,exports) { "use strict"; module.exports = pool; -/** - * An allocator as used by {@link util.pool}. - * @typedef PoolAllocator - * @type {function} - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ /** - * A slicer as used by {@link util.pool}. - * @typedef PoolSlicer - * @type {function} - * @param {number} start Start offset - * @param {number} end End offset - * @returns {Uint8Array} Buffer slice - * @this {Uint8Array} - */ /** - * A general purpose buffer pool. - * @memberof util - * @function - * @param {PoolAllocator} alloc Allocator - * @param {PoolSlicer} slice Slicer - * @param {number} [size=8192] Slab size - * @returns {PoolAllocator} Pooled allocator +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ /** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ /** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator */ function pool(alloc, slice, size) { var SIZE = size || 8192; var MAX = SIZE >>> 1; @@ -67784,7 +67784,7 @@ module.exports = {}; /** * * // in any subsequent module: * var root = protobuf.roots["myroot"]; - */ + */ },{}],"14FRe":[function(require,module,exports) { "use strict"; @@ -68326,26 +68326,26 @@ var decorateEnumIndex = 0; },{"d625e6ce5bbdc11f":"k72f7","c15440adb779afca":"8v4Te","d73a73fb03f0fac1":"cqpPo","aac844e7d23ccc04":"jjh6B","187b53cc127fbbd9":"cZV5i","745a8def28374fa4":"9Fupb","82074a4051f1e565":"9srcK","bbfb7b48a94ffbf2":"heZNO"}],"cqpPo":[function(require,module,exports) { "use strict"; module.exports = codegen; -/** - * Begins generating a function. - * @memberof util - * @param {string[]} functionParams Function parameter names - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body +/** + * Begins generating a function. + * @memberof util + * @param {string[]} functionParams Function parameter names + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body */ function codegen(functionParams, functionName) { /* istanbul ignore if */ if (typeof functionParams === "string") { functionName = functionParams; functionParams = undefined; } var body = []; - /** - * Appends code to the function's body or finishes generation. - * @typedef Codegen - * @type {function} - * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any - * @param {...*} [formatParams] Format parameters - * @returns {Codegen|Function} Itself or the generated function if finished - * @throws {Error} If format parameter counts do not match + /** + * Appends code to the function's body or finishes generation. + * @typedef Codegen + * @type {function} + * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any + * @param {...*} [formatParams] Format parameters + * @returns {Codegen|Function} Itself or the generated function if finished + * @throws {Error} If format parameter counts do not match */ function Codegen(formatStringOrScope) { // note that explicit array handling below makes this ~50% faster // finish the function @@ -68393,17 +68393,17 @@ module.exports = codegen; Codegen.toString = toString; return Codegen; } -/** - * Begins generating a function. - * @memberof util - * @function codegen - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body - * @variation 2 - */ /** - * When set to `true`, codegen will log generated code to console. Useful for debugging. - * @name util.codegen.verbose - * @type {boolean} +/** + * Begins generating a function. + * @memberof util + * @function codegen + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + * @variation 2 + */ /** + * When set to `true`, codegen will log generated code to console. Useful for debugging. + * @name util.codegen.verbose + * @type {boolean} */ codegen.verbose = false; },{}],"jjh6B":[function(require,module,exports) { @@ -68411,26 +68411,26 @@ module.exports = codegen; module.exports = fetch; var asPromise = require("9c66e50465984bbe"), inquire = require("c3a4c338701eb665"); var fs = inquire("fs"); -/** - * Node-style callback as used by {@link util.fetch}. - * @typedef FetchCallback - * @type {function} - * @param {?Error} error Error, if any, otherwise `null` - * @param {string} [contents] File contents, if there hasn't been an error - * @returns {undefined} - */ /** - * Options as used by {@link util.fetch}. - * @typedef FetchOptions - * @type {Object} - * @property {boolean} [binary=false] Whether expecting a binary response - * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest - */ /** - * Fetches the contents of a file. - * @memberof util - * @param {string} filename File path or url - * @param {FetchOptions} options Fetch options - * @param {FetchCallback} callback Callback function - * @returns {undefined} +/** + * Node-style callback as used by {@link util.fetch}. + * @typedef FetchCallback + * @type {function} + * @param {?Error} error Error, if any, otherwise `null` + * @param {string} [contents] File contents, if there hasn't been an error + * @returns {undefined} + */ /** + * Options as used by {@link util.fetch}. + * @typedef FetchOptions + * @type {Object} + * @property {boolean} [binary=false] Whether expecting a binary response + * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest + */ /** + * Fetches the contents of a file. + * @memberof util + * @param {string} filename File path or url + * @param {FetchOptions} options Fetch options + * @param {FetchCallback} callback Callback function + * @returns {undefined} */ function fetch(filename, options, callback) { if (typeof options === "function") { callback = options; @@ -68444,22 +68444,22 @@ var fs = inquire("fs"); // use the XHR version otherwise. return fetch.xhr(filename, options, callback); } -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ /** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {FetchOptions} [options] Fetch options - * @returns {Promise} Promise - * @variation 3 +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ /** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchOptions} [options] Fetch options + * @returns {Promise} Promise + * @variation 3 */ /**/ fetch.xhr = function fetch_xhr(filename, options, callback) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() { @@ -68491,22 +68491,22 @@ var fs = inquire("fs"); },{"9c66e50465984bbe":"ihGsB","c3a4c338701eb665":"86QKD"}],"cZV5i":[function(require,module,exports) { "use strict"; -/** - * A minimal path module to resolve Unix, Windows and URL paths alike. - * @memberof util - * @namespace +/** + * A minimal path module to resolve Unix, Windows and URL paths alike. + * @memberof util + * @namespace */ var path = exports; -var isAbsolute = /** - * Tests if the specified path is absolute. - * @param {string} path Path to test - * @returns {boolean} `true` if path is absolute +var isAbsolute = /** + * Tests if the specified path is absolute. + * @param {string} path Path to test + * @returns {boolean} `true` if path is absolute */ path.isAbsolute = function isAbsolute(path) { return /^(?:\/|\w+:)/.test(path); }; -var normalize = /** - * Normalizes the specified path. - * @param {string} path Path to normalize - * @returns {string} Normalized path +var normalize = /** + * Normalizes the specified path. + * @param {string} path Path to normalize + * @returns {string} Normalized path */ path.normalize = function normalize(path) { path = path.replace(/\\/g, "/").replace(/\/{2,}/g, "/"); var parts = path.split("/"), absolute = isAbsolute(path), prefix = ""; @@ -68521,12 +68521,12 @@ var normalize = /** } return prefix + parts.join("/"); }; -/** - * Resolves the specified include path against the specified origin path. - * @param {string} originPath Path to the origin file - * @param {string} includePath Include path relative to origin path - * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized - * @returns {string} Path to the include file +/** + * Resolves the specified include path against the specified origin path. + * @param {string} originPath Path to the origin file + * @param {string} includePath Include path relative to origin path + * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized + * @returns {string} Path to the include file */ path.resolve = function resolve(originPath, includePath, alreadyNormalized) { if (!alreadyNormalized) includePath = normalize(includePath); if (isAbsolute(includePath)) return includePath; @@ -70360,7 +70360,7 @@ var util = require("265369b258276eba"); * @returns {Object.} JSON object */ Message.prototype.toJSON = function toJSON() { return this.$type.toObject(this, util.toJSONOptions); -}; /*eslint-enable valid-jsdoc*/ +}; /*eslint-enable valid-jsdoc*/ },{"265369b258276eba":"k72f7"}],"5dWn6":[function(require,module,exports) { "use strict"; @@ -71077,8 +71077,8 @@ Root._configure = function(Type_, parse_, common_) { },{"19f025d92e764083":"4idoA","e8ac8603d5e26cc0":"12Nu0","93a82a214a2b2853":"9srcK","bab7b74b9c10d745":"9U2iM","190170fae0946a3e":"9qDrQ"}],"djJSk":[function(require,module,exports) { module.exports = Long; -/** - * wasm optimizations, to do native i64 multiplication and divide +/** + * wasm optimizations, to do native i64 multiplication and divide */ var wasm = null; try { wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([ @@ -71372,27 +71372,27 @@ try { } catch (e) { // no wasm support :( } -/** - * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. - * See the from* functions below for more convenient ways of constructing Longs. - * @exports Long - * @class A Long class for representing a 64 bit two's-complement integer value. - * @param {number} low The low (signed) 32 bits of the long - * @param {number} high The high (signed) 32 bits of the long - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @constructor +/** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @constructor */ function Long(low, high, unsigned) { - /** - * The low 32 bits as a signed value. - * @type {number} + /** + * The low 32 bits as a signed value. + * @type {number} */ this.low = low | 0; - /** - * The high 32 bits as a signed value. - * @type {number} + /** + * The high 32 bits as a signed value. + * @type {number} */ this.high = high | 0; - /** - * Whether unsigned or not. - * @type {boolean} + /** + * Whether unsigned or not. + * @type {boolean} */ this.unsigned = !!unsigned; } // The internal representation of a long is the two given signed, 32-bit values. @@ -71411,44 +71411,44 @@ try { // // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* // methods on which they depend. -/** - * An indicator used to reliably determine if an object is a Long or not. - * @type {boolean} - * @const - * @private +/** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private */ Long.prototype.__isLong__; Object.defineProperty(Long.prototype, "__isLong__", { value: true }); -/** - * @function - * @param {*} obj Object - * @returns {boolean} - * @inner +/** + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner */ function isLong(obj) { return (obj && obj["__isLong__"]) === true; } -/** - * Tests if the specified object is a Long. - * @function - * @param {*} obj Object - * @returns {boolean} +/** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} */ Long.isLong = isLong; -/** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @inner +/** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner */ var INT_CACHE = {}; -/** - * A cache of the Long representations of small unsigned integer values. - * @type {!Object} - * @inner +/** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner */ var UINT_CACHE = {}; -/** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner +/** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromInt(value, unsigned) { var obj, cachedObj, cache; if (unsigned) { @@ -71471,18 +71471,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { return obj; } } -/** - * Returns a Long representing the given 32 bit integer value. - * @function - * @param {number} value The 32 bit integer in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} The corresponding Long value +/** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} The corresponding Long value */ Long.fromInt = fromInt; -/** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner +/** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromNumber(value, unsigned) { if (isNaN(value)) return unsigned ? UZERO : ZERO; if (unsigned) { @@ -71495,44 +71495,44 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (value < 0) return fromNumber(-value, unsigned).neg(); return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned); } -/** - * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. - * @function - * @param {number} value The number in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} The corresponding Long value +/** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} The corresponding Long value */ Long.fromNumber = fromNumber; -/** - * @param {number} lowBits - * @param {number} highBits - * @param {boolean=} unsigned - * @returns {!Long} - * @inner +/** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromBits(lowBits, highBits, unsigned) { return new Long(lowBits, highBits, unsigned); } -/** - * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is - * assumed to use 32 bits. - * @function - * @param {number} lowBits The low 32 bits - * @param {number} highBits The high 32 bits - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} The corresponding Long value +/** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} The corresponding Long value */ Long.fromBits = fromBits; -/** - * @function - * @param {number} base - * @param {number} exponent - * @returns {number} - * @inner +/** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner */ var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) -/** - * @param {string} str - * @param {(boolean|number)=} unsigned - * @param {number=} radix - * @returns {!Long} - * @inner +/** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner */ function fromString(str, unsigned, radix) { if (str.length === 0) throw Error("empty string"); if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") return ZERO; @@ -71561,152 +71561,152 @@ Object.defineProperty(Long.prototype, "__isLong__", { result.unsigned = unsigned; return result; } -/** - * Returns a Long representation of the given string, written using the specified radix. - * @function - * @param {string} str The textual representation of the Long - * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed - * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 - * @returns {!Long} The corresponding Long value +/** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value */ Long.fromString = fromString; -/** - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val - * @param {boolean=} unsigned - * @returns {!Long} - * @inner +/** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromValue(val, unsigned) { if (typeof val === "number") return fromNumber(val, unsigned); if (typeof val === "string") return fromString(val, unsigned); // Throws for non-objects, converts non-instanceof Long: return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned); } -/** - * Converts the specified value to a Long using the appropriate from* function for its type. - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} +/** + * Converts the specified value to a Long using the appropriate from* function for its type. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} */ Long.fromValue = fromValue; // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be // no runtime penalty for these. -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_16_DBL = 65536; -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_24_DBL = 16777216; -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; -/** - * @type {!Long} - * @const - * @inner +/** + * @type {!Long} + * @const + * @inner */ var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var ZERO = fromInt(0); -/** - * Signed zero. - * @type {!Long} +/** + * Signed zero. + * @type {!Long} */ Long.ZERO = ZERO; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var UZERO = fromInt(0, true); -/** - * Unsigned zero. - * @type {!Long} +/** + * Unsigned zero. + * @type {!Long} */ Long.UZERO = UZERO; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var ONE = fromInt(1); -/** - * Signed one. - * @type {!Long} +/** + * Signed one. + * @type {!Long} */ Long.ONE = ONE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var UONE = fromInt(1, true); -/** - * Unsigned one. - * @type {!Long} +/** + * Unsigned one. + * @type {!Long} */ Long.UONE = UONE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var NEG_ONE = fromInt(-1); -/** - * Signed negative one. - * @type {!Long} +/** + * Signed negative one. + * @type {!Long} */ Long.NEG_ONE = NEG_ONE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var MAX_VALUE = fromBits(-1, 2147483647, false); -/** - * Maximum signed value. - * @type {!Long} +/** + * Maximum signed value. + * @type {!Long} */ Long.MAX_VALUE = MAX_VALUE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var MAX_UNSIGNED_VALUE = fromBits(-1, -1, true); -/** - * Maximum unsigned value. - * @type {!Long} +/** + * Maximum unsigned value. + * @type {!Long} */ Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var MIN_VALUE = fromBits(0, -2147483648, false); -/** - * Minimum signed value. - * @type {!Long} +/** + * Minimum signed value. + * @type {!Long} */ Long.MIN_VALUE = MIN_VALUE; -/** - * @alias Long.prototype - * @inner +/** + * @alias Long.prototype + * @inner */ var LongPrototype = Long.prototype; -/** - * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. - * @returns {number} +/** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} */ LongPrototype.toInt = function toInt() { return this.unsigned ? this.low >>> 0 : this.low; }; -/** - * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). - * @returns {number} +/** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} */ LongPrototype.toNumber = function toNumber() { if (this.unsigned) return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0); return this.high * TWO_PWR_32_DBL + (this.low >>> 0); }; -/** - * Converts the Long to a string written in the specified radix. - * @param {number=} radix Radix (2-36), defaults to 10 - * @returns {string} - * @override - * @throws {RangeError} If `radix` is out of range +/** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range */ LongPrototype.toString = function toString(radix) { radix = radix || 10; if (radix < 2 || 36 < radix) throw RangeError("radix"); @@ -71733,176 +71733,176 @@ Object.defineProperty(Long.prototype, "__isLong__", { } } }; -/** - * Gets the high 32 bits as a signed integer. - * @returns {number} Signed high bits +/** + * Gets the high 32 bits as a signed integer. + * @returns {number} Signed high bits */ LongPrototype.getHighBits = function getHighBits() { return this.high; }; -/** - * Gets the high 32 bits as an unsigned integer. - * @returns {number} Unsigned high bits +/** + * Gets the high 32 bits as an unsigned integer. + * @returns {number} Unsigned high bits */ LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { return this.high >>> 0; }; -/** - * Gets the low 32 bits as a signed integer. - * @returns {number} Signed low bits +/** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits */ LongPrototype.getLowBits = function getLowBits() { return this.low; }; -/** - * Gets the low 32 bits as an unsigned integer. - * @returns {number} Unsigned low bits +/** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits */ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { return this.low >>> 0; }; -/** - * Gets the number of bits needed to represent the absolute value of this Long. - * @returns {number} +/** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} */ LongPrototype.getNumBitsAbs = function getNumBitsAbs() { if (this.isNegative()) return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); var val = this.high != 0 ? this.high : this.low; for(var bit = 31; bit > 0; bit--)if ((val & 1 << bit) != 0) break; return this.high != 0 ? bit + 33 : bit + 1; }; -/** - * Tests if this Long's value equals zero. - * @returns {boolean} +/** + * Tests if this Long's value equals zero. + * @returns {boolean} */ LongPrototype.isZero = function isZero() { return this.high === 0 && this.low === 0; }; -/** - * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}. - * @returns {boolean} +/** + * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}. + * @returns {boolean} */ LongPrototype.eqz = LongPrototype.isZero; -/** - * Tests if this Long's value is negative. - * @returns {boolean} +/** + * Tests if this Long's value is negative. + * @returns {boolean} */ LongPrototype.isNegative = function isNegative() { return !this.unsigned && this.high < 0; }; -/** - * Tests if this Long's value is positive. - * @returns {boolean} +/** + * Tests if this Long's value is positive. + * @returns {boolean} */ LongPrototype.isPositive = function isPositive() { return this.unsigned || this.high >= 0; }; -/** - * Tests if this Long's value is odd. - * @returns {boolean} +/** + * Tests if this Long's value is odd. + * @returns {boolean} */ LongPrototype.isOdd = function isOdd() { return (this.low & 1) === 1; }; -/** - * Tests if this Long's value is even. - * @returns {boolean} +/** + * Tests if this Long's value is even. + * @returns {boolean} */ LongPrototype.isEven = function isEven() { return (this.low & 1) === 0; }; -/** - * Tests if this Long's value equals the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.equals = function equals(other) { if (!isLong(other)) other = fromValue(other); if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1) return false; return this.high === other.high && this.low === other.low; }; -/** - * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.eq = LongPrototype.equals; -/** - * Tests if this Long's value differs from the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.notEquals = function notEquals(other) { return !this.eq(/* validates */ other); }; -/** - * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.neq = LongPrototype.notEquals; -/** - * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.ne = LongPrototype.notEquals; -/** - * Tests if this Long's value is less than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lessThan = function lessThan(other) { return this.comp(/* validates */ other) < 0; }; -/** - * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lt = LongPrototype.lessThan; -/** - * Tests if this Long's value is less than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { return this.comp(/* validates */ other) <= 0; }; -/** - * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lte = LongPrototype.lessThanOrEqual; -/** - * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.le = LongPrototype.lessThanOrEqual; -/** - * Tests if this Long's value is greater than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.greaterThan = function greaterThan(other) { return this.comp(/* validates */ other) > 0; }; -/** - * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.gt = LongPrototype.greaterThan; -/** - * Tests if this Long's value is greater than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { return this.comp(/* validates */ other) >= 0; }; -/** - * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.gte = LongPrototype.greaterThanOrEqual; -/** - * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.ge = LongPrototype.greaterThanOrEqual; -/** - * Compares this Long's value with the specified's. - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater +/** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater */ LongPrototype.compare = function compare(other) { if (!isLong(other)) other = fromValue(other); if (this.eq(other)) return 0; @@ -71914,29 +71914,29 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Both are positive if at least one is unsigned return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1; }; -/** - * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. - * @function - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater +/** + * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. + * @function + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater */ LongPrototype.comp = LongPrototype.compare; -/** - * Negates this Long's value. - * @returns {!Long} Negated Long +/** + * Negates this Long's value. + * @returns {!Long} Negated Long */ LongPrototype.negate = function negate() { if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE; return this.not().add(ONE); }; -/** - * Negates this Long's value. This is an alias of {@link Long#negate}. - * @function - * @returns {!Long} Negated Long +/** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long */ LongPrototype.neg = LongPrototype.negate; -/** - * Returns the sum of this and the specified Long. - * @param {!Long|number|string} addend Addend - * @returns {!Long} Sum +/** + * Returns the sum of this and the specified Long. + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum */ LongPrototype.add = function add(addend) { if (!isLong(addend)) addend = fromValue(addend); // Divide each number into 4 chunks of 16 bits, and then sum the chunks. @@ -71962,24 +71962,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { c48 &= 0xFFFF; return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned); }; -/** - * Returns the difference of this and the specified Long. - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference +/** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference */ LongPrototype.subtract = function subtract(subtrahend) { if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend); return this.add(subtrahend.neg()); }; -/** - * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. - * @function - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference +/** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference */ LongPrototype.sub = LongPrototype.subtract; -/** - * Returns the product of this and the specified Long. - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product +/** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product */ LongPrototype.multiply = function multiply(multiplier) { if (this.isZero()) return ZERO; if (!isLong(multiplier)) multiplier = fromValue(multiplier); @@ -72030,17 +72030,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { c48 &= 0xFFFF; return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned); }; -/** - * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. - * @function - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product +/** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product */ LongPrototype.mul = LongPrototype.multiply; -/** - * Returns this Long divided by the specified. The result is signed if this Long is signed or - * unsigned if this Long is unsigned. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient +/** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient */ LongPrototype.divide = function divide(divisor) { if (!isLong(divisor)) divisor = fromValue(divisor); if (divisor.isZero()) throw Error("division by zero"); @@ -72115,16 +72115,16 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return res; }; -/** - * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient +/** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient */ LongPrototype.div = LongPrototype.divide; -/** - * Returns this Long modulo the specified. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder +/** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.modulo = function modulo(divisor) { if (!isLong(divisor)) divisor = fromValue(divisor); // use wasm support if present @@ -72134,84 +72134,84 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return this.sub(this.div(divisor).mul(divisor)); }; -/** - * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder +/** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.mod = LongPrototype.modulo; -/** - * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder +/** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.rem = LongPrototype.modulo; -/** - * Returns the bitwise NOT of this Long. - * @returns {!Long} +/** + * Returns the bitwise NOT of this Long. + * @returns {!Long} */ LongPrototype.not = function not() { return fromBits(~this.low, ~this.high, this.unsigned); }; -/** - * Returns the bitwise AND of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} +/** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.and = function and(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low & other.low, this.high & other.high, this.unsigned); }; -/** - * Returns the bitwise OR of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} +/** + * Returns the bitwise OR of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.or = function or(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low | other.low, this.high | other.high, this.unsigned); }; -/** - * Returns the bitwise XOR of this Long and the given one. - * @param {!Long|number|string} other Other Long - * @returns {!Long} +/** + * Returns the bitwise XOR of this Long and the given one. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.xor = function xor(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); }; -/** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits shifted to the left by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftLeft = function shiftLeft(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); if ((numBits &= 63) === 0) return this; else if (numBits < 32) return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned); else return fromBits(0, this.low << numBits - 32, this.unsigned); }; -/** - * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shl = LongPrototype.shiftLeft; -/** - * Returns this Long with bits arithmetically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftRight = function shiftRight(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); if ((numBits &= 63) === 0) return this; else if (numBits < 32) return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned); else return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned); }; -/** - * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shr = LongPrototype.shiftRight; -/** - * Returns this Long with bits logically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); numBits &= 63; @@ -72225,42 +72225,42 @@ Object.defineProperty(Long.prototype, "__isLong__", { else return fromBits(high >>> numBits - 32, 0, this.unsigned); } }; -/** - * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shru = LongPrototype.shiftRightUnsigned; -/** - * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shr_u = LongPrototype.shiftRightUnsigned; -/** - * Converts this Long to signed. - * @returns {!Long} Signed long +/** + * Converts this Long to signed. + * @returns {!Long} Signed long */ LongPrototype.toSigned = function toSigned() { if (!this.unsigned) return this; return fromBits(this.low, this.high, false); }; -/** - * Converts this Long to unsigned. - * @returns {!Long} Unsigned long +/** + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long */ LongPrototype.toUnsigned = function toUnsigned() { if (this.unsigned) return this; return fromBits(this.low, this.high, true); }; -/** - * Converts this Long to its byte representation. - * @param {boolean=} le Whether little or big endian, defaults to big endian - * @returns {!Array.} Byte representation +/** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation */ LongPrototype.toBytes = function toBytes(le) { return le ? this.toBytesLE() : this.toBytesBE(); }; -/** - * Converts this Long to its little endian byte representation. - * @returns {!Array.} Little endian byte representation +/** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation */ LongPrototype.toBytesLE = function toBytesLE() { var hi = this.high, lo = this.low; return [ @@ -72274,9 +72274,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { hi >>> 24 ]; }; -/** - * Converts this Long to its big endian byte representation. - * @returns {!Array.} Big endian byte representation +/** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation */ LongPrototype.toBytesBE = function toBytesBE() { var hi = this.high, lo = this.low; return [ @@ -72290,52 +72290,52 @@ Object.defineProperty(Long.prototype, "__isLong__", { lo & 0xff ]; }; -/** - * Creates a Long from its byte representation. - * @param {!Array.} bytes Byte representation - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @param {boolean=} le Whether little or big endian, defaults to big endian - * @returns {Long} The corresponding Long value +/** + * Creates a Long from its byte representation. + * @param {!Array.} bytes Byte representation + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {Long} The corresponding Long value */ Long.fromBytes = function fromBytes(bytes, unsigned, le) { return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned); }; -/** - * Creates a Long from its little endian byte representation. - * @param {!Array.} bytes Little endian byte representation - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {Long} The corresponding Long value +/** + * Creates a Long from its little endian byte representation. + * @param {!Array.} bytes Little endian byte representation + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {Long} The corresponding Long value */ Long.fromBytesLE = function fromBytesLE(bytes, unsigned) { return new Long(bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24, bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24, unsigned); }; -/** - * Creates a Long from its big endian byte representation. - * @param {!Array.} bytes Big endian byte representation - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {Long} The corresponding Long value +/** + * Creates a Long from its big endian byte representation. + * @param {!Array.} bytes Big endian byte representation + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {Long} The corresponding Long value */ Long.fromBytesBE = function fromBytesBE(bytes, unsigned) { return new Long(bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7], bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], unsigned); }; },{}],"j5ACk":[function(require,module,exports) { -/* - Copyright 2013-2014 Daniel Wirtz - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ /** - * @license bytebuffer.js (c) 2015 Daniel Wirtz - * Backing buffer: ArrayBuffer, Accessor: Uint8Array - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/bytebuffer.js for details +/* + Copyright 2013-2014 Daniel Wirtz + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ /** + * @license bytebuffer.js (c) 2015 Daniel Wirtz + * Backing buffer: ArrayBuffer, Accessor: Uint8Array + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/bytebuffer.js for details */ (function(global, factory) { /* AMD */ if (typeof define === "function" && define["amd"]) define([ "long" @@ -72350,17 +72350,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { else (global["dcodeIO"] = global["dcodeIO"] || {})["ByteBuffer"] = factory(global["dcodeIO"]["Long"]); })(this, function(Long) { "use strict"; - /** - * Constructs a new ByteBuffer. - * @class The swiss army knife for binary data in JavaScript. - * @exports ByteBuffer - * @constructor - * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @expose + /** + * Constructs a new ByteBuffer. + * @class The swiss army knife for binary data in JavaScript. + * @exports ByteBuffer + * @constructor + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @expose */ var ByteBuffer = function(capacity, littleEndian, noAssert) { if (typeof capacity === "undefined") capacity = ByteBuffer.DEFAULT_CAPACITY; if (typeof littleEndian === "undefined") littleEndian = ByteBuffer.DEFAULT_ENDIAN; @@ -72371,99 +72371,99 @@ Object.defineProperty(Long.prototype, "__isLong__", { littleEndian = !!littleEndian; noAssert = !!noAssert; } - /** - * Backing ArrayBuffer. - * @type {!ArrayBuffer} - * @expose + /** + * Backing ArrayBuffer. + * @type {!ArrayBuffer} + * @expose */ this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity); - /** - * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. - * @type {?Uint8Array} - * @expose + /** + * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. + * @type {?Uint8Array} + * @expose */ this.view = capacity === 0 ? null : new Uint8Array(this.buffer); - /** - * Absolute read/write offset. - * @type {number} - * @expose - * @see ByteBuffer#flip - * @see ByteBuffer#clear + /** + * Absolute read/write offset. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear */ this.offset = 0; - /** - * Marked offset. - * @type {number} - * @expose - * @see ByteBuffer#mark - * @see ByteBuffer#reset + /** + * Marked offset. + * @type {number} + * @expose + * @see ByteBuffer#mark + * @see ByteBuffer#reset */ this.markedOffset = -1; - /** - * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. - * @type {number} - * @expose - * @see ByteBuffer#flip - * @see ByteBuffer#clear + /** + * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear */ this.limit = capacity; - /** - * Whether to use little endian byte order, defaults to `false` for big endian. - * @type {boolean} - * @expose + /** + * Whether to use little endian byte order, defaults to `false` for big endian. + * @type {boolean} + * @expose */ this.littleEndian = littleEndian; - /** - * Whether to skip assertions of offsets and values, defaults to `false`. - * @type {boolean} - * @expose + /** + * Whether to skip assertions of offsets and values, defaults to `false`. + * @type {boolean} + * @expose */ this.noAssert = noAssert; }; - /** - * ByteBuffer version. - * @type {string} - * @const - * @expose + /** + * ByteBuffer version. + * @type {string} + * @const + * @expose */ ByteBuffer.VERSION = "5.0.1"; - /** - * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. - * @type {boolean} - * @const - * @expose + /** + * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. + * @type {boolean} + * @const + * @expose */ ByteBuffer.LITTLE_ENDIAN = true; - /** - * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. - * @type {boolean} - * @const - * @expose + /** + * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. + * @type {boolean} + * @const + * @expose */ ByteBuffer.BIG_ENDIAN = false; - /** - * Default initial capacity of `16`. - * @type {number} - * @expose + /** + * Default initial capacity of `16`. + * @type {number} + * @expose */ ByteBuffer.DEFAULT_CAPACITY = 16; - /** - * Default endianess of `false` for big endian. - * @type {boolean} - * @expose + /** + * Default endianess of `false` for big endian. + * @type {boolean} + * @expose */ ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN; - /** - * Default no assertions flag of `false`. - * @type {boolean} - * @expose + /** + * Default no assertions flag of `false`. + * @type {boolean} + * @expose */ ByteBuffer.DEFAULT_NOASSERT = false; - /** - * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded - * and int64 support is not available. - * @type {?Long} - * @const - * @see https://github.com/dcodeIO/long.js - * @expose + /** + * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded + * and int64 support is not available. + * @type {?Long} + * @const + * @see https://github.com/dcodeIO/long.js + * @expose */ ByteBuffer.Long = Long || null; - /** - * @alias ByteBuffer.prototype - * @inner + /** + * @alias ByteBuffer.prototype + * @inner */ var ByteBufferPrototype = ByteBuffer.prototype; - /** - * An indicator used to reliably determine if an object is a ByteBuffer or not. - * @type {boolean} - * @const - * @expose - * @private + /** + * An indicator used to reliably determine if an object is a ByteBuffer or not. + * @type {boolean} + * @const + * @expose + * @private */ ByteBufferPrototype.__isByteBuffer__; Object.defineProperty(ByteBufferPrototype, "__isByteBuffer__", { value: true, @@ -72471,33 +72471,33 @@ Object.defineProperty(Long.prototype, "__isLong__", { configurable: false }); // helpers - /** - * @type {!ArrayBuffer} - * @inner + /** + * @type {!ArrayBuffer} + * @inner */ var EMPTY_BUFFER = new ArrayBuffer(0); - /** - * String.fromCharCode reference for compile-time renaming. - * @type {function(...number):string} - * @inner + /** + * String.fromCharCode reference for compile-time renaming. + * @type {function(...number):string} + * @inner */ var stringFromCharCode = String.fromCharCode; - /** - * Creates a source function for a string. - * @param {string} s String to read from - * @returns {function():number|null} Source function returning the next char code respectively `null` if there are - * no more characters left. - * @throws {TypeError} If the argument is invalid - * @inner + /** + * Creates a source function for a string. + * @param {string} s String to read from + * @returns {function():number|null} Source function returning the next char code respectively `null` if there are + * no more characters left. + * @throws {TypeError} If the argument is invalid + * @inner */ function stringSource(s) { var i = 0; return function() { return i < s.length ? s.charCodeAt(i++) : null; }; } - /** - * Creates a destination function for a string. - * @returns {function(number=):undefined|string} Destination function successively called with the next char code. - * Returns the final string when called without arguments. - * @inner + /** + * Creates a destination function for a string. + * @returns {function(number=):undefined|string} Destination function successively called with the next char code. + * Returns the final string when called without arguments. + * @inner */ function stringDestination() { var cs = [], ps = []; return function() { @@ -72506,36 +72506,36 @@ Object.defineProperty(Long.prototype, "__isLong__", { Array.prototype.push.apply(cs, arguments); }; } - /** - * Gets the accessor type. - * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes) - * @expose + /** + * Gets the accessor type. + * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes) + * @expose */ ByteBuffer.accessor = function() { return Uint8Array; }; - /** - * Allocates a new ByteBuffer backed by a buffer of the specified capacity. - * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} - * @expose + /** + * Allocates a new ByteBuffer backed by a buffer of the specified capacity. + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} + * @expose */ ByteBuffer.allocate = function(capacity, littleEndian, noAssert) { return new ByteBuffer(capacity, littleEndian, noAssert); }; - /** - * Concatenates multiple ByteBuffers into one. - * @param {!Array.} buffers Buffers to concatenate - * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", - * defaults to "utf8") - * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults - * to {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} Concatenated ByteBuffer - * @expose + /** + * Concatenates multiple ByteBuffers into one. + * @param {!Array.} buffers Buffers to concatenate + * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", + * defaults to "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults + * to {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} Concatenated ByteBuffer + * @expose */ ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) { if (typeof encoding === "boolean" || typeof encoding !== "string") { noAssert = littleEndian; @@ -72562,33 +72562,33 @@ Object.defineProperty(Long.prototype, "__isLong__", { bb.offset = 0; return bb; }; - /** - * Tests if the specified type is a ByteBuffer. - * @param {*} bb ByteBuffer to test - * @returns {boolean} `true` if it is a ByteBuffer, otherwise `false` - * @expose + /** + * Tests if the specified type is a ByteBuffer. + * @param {*} bb ByteBuffer to test + * @returns {boolean} `true` if it is a ByteBuffer, otherwise `false` + * @expose */ ByteBuffer.isByteBuffer = function(bb) { return (bb && bb["__isByteBuffer__"]) === true; }; - /** - * Gets the backing buffer type. - * @returns {Function} `Buffer` under node.js, `ArrayBuffer` in the browser (classes) - * @expose + /** + * Gets the backing buffer type. + * @returns {Function} `Buffer` under node.js, `ArrayBuffer` in the browser (classes) + * @expose */ ByteBuffer.type = function() { return ArrayBuffer; }; - /** - * Wraps a buffer or a string. Sets the allocated ByteBuffer's {@link ByteBuffer#offset} to `0` and its - * {@link ByteBuffer#limit} to the length of the wrapped data. - * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string|!Array.} buffer Anything that can be wrapped - * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to - * "utf8") - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` - * @expose + /** + * Wraps a buffer or a string. Sets the allocated ByteBuffer's {@link ByteBuffer#offset} to `0` and its + * {@link ByteBuffer#limit} to the length of the wrapped data. + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string|!Array.} buffer Anything that can be wrapped + * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to + * "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` + * @expose */ ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) { if (typeof encoding !== "string") { noAssert = littleEndian; @@ -72642,12 +72642,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { } else throw TypeError("Illegal buffer"); // Otherwise fail return bb; }; - /** - * Writes the array as a bitset. - * @param {Array} value Array of booleans to write - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. - * @returns {!ByteBuffer} - * @expose + /** + * Writes the array as a bitset. + * @param {Array} value Array of booleans to write + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose */ ByteBufferPrototype.writeBitSet = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72675,11 +72675,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return offset - start; }; - /** - * Reads a BitSet as an array of booleans. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. - * @returns {Array - * @expose + /** + * Reads a BitSet as an array of booleans. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {Array + * @expose */ ByteBufferPrototype.readBitSet = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72704,12 +72704,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset = offset; return value; }; - /** - * Reads the specified number of bytes. - * @param {number} length Number of bytes to read - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. - * @returns {!ByteBuffer} - * @expose + /** + * Reads the specified number of bytes. + * @param {number} length Number of bytes to read + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose */ ByteBufferPrototype.readBytes = function(length, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72722,24 +72722,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += length; return slice; }; - /** - * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}. - * @function - * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets - * will be modified according to the performed read operation. - * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}. + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeBytes = ByteBufferPrototype.append; // types/ints/int8 - /** - * Writes an 8bit signed integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes an 8bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeInt8 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72758,19 +72758,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 1; return this; }; - /** - * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8; - /** - * Reads an 8bit signed integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads an 8bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readInt8 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72784,19 +72784,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 1; return value; }; - /** - * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. - * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8; - /** - * Writes an 8bit unsigned integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes an 8bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeUint8 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72815,19 +72815,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 1; return this; }; - /** - * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeUInt8 = ByteBufferPrototype.writeUint8; - /** - * Reads an 8bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads an 8bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readUint8 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72840,21 +72840,21 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 1; return value; }; - /** - * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}. - * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readUInt8 = ByteBufferPrototype.readUint8; // types/ints/int16 - /** - * Writes a 16bit signed integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Writes a 16bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.writeInt16 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72879,22 +72879,22 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 2; return this; }; - /** - * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16; - /** - * Reads a 16bit signed integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Reads a 16bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.readInt16 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72915,22 +72915,22 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 2; return value; }; - /** - * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. - * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16; - /** - * Writes a 16bit unsigned integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Writes a 16bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.writeUint16 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72955,22 +72955,22 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 2; return this; }; - /** - * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.writeUInt16 = ByteBufferPrototype.writeUint16; - /** - * Reads a 16bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Reads a 16bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.readUint16 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72990,21 +72990,21 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 2; return value; }; - /** - * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}. - * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.readUInt16 = ByteBufferPrototype.readUint16; // types/ints/int32 - /** - * Writes a 32bit signed integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose + /** + * Writes a 32bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ ByteBufferPrototype.writeInt32 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73033,17 +73033,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return this; }; - /** - * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose + /** + * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32; - /** - * Reads a 32bit signed integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads a 32bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readInt32 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73068,17 +73068,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return value; }; - /** - * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32; - /** - * Writes a 32bit unsigned integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose + /** + * Writes a 32bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ ByteBufferPrototype.writeUint32 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73107,18 +73107,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return this; }; - /** - * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose + /** + * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ ByteBufferPrototype.writeUInt32 = ByteBufferPrototype.writeUint32; - /** - * Reads a 32bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads a 32bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readUint32 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73142,21 +73142,21 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return value; }; - /** - * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}. - * @function - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readUInt32 = ByteBufferPrototype.readUint32; // types/ints/int64 if (Long) { - /** - * Writes a 64bit signed integer. - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit signed integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeInt64 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73199,18 +73199,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return this; }; - /** - * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64; - /** - * Reads a 64bit signed integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} - * @expose + /** + * Reads a 64bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose */ ByteBufferPrototype.readInt64 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73245,18 +73245,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return value; }; - /** - * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} - * @expose + /** + * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose */ ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64; - /** - * Writes a 64bit unsigned integer. - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit unsigned integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeUint64 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73299,19 +73299,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return this; }; - /** - * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}. - * @function - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}. + * @function + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeUInt64 = ByteBufferPrototype.writeUint64; - /** - * Reads a 64bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} - * @expose + /** + * Reads a 64bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose */ ByteBufferPrototype.readUint64 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73346,48 +73346,48 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return value; }; - /** - * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}. - * @function - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} - * @expose + /** + * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose */ ByteBufferPrototype.readUInt64 = ByteBufferPrototype.readUint64; } // Long // types/floats/float32 - /* - ieee754 - https://github.com/feross/ieee754 - - The MIT License (MIT) - - Copyright (c) Feross Aboukhadijeh - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ /** - * Reads an IEEE754 float from a byte array. - * @param {!Array} buffer - * @param {number} offset - * @param {boolean} isLE - * @param {number} mLen - * @param {number} nBytes - * @returns {number} - * @inner + /* + ieee754 - https://github.com/feross/ieee754 + + The MIT License (MIT) + + Copyright (c) Feross Aboukhadijeh + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ /** + * Reads an IEEE754 float from a byte array. + * @param {!Array} buffer + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @returns {number} + * @inner */ function ieee754_read(buffer, offset, isLE, mLen, nBytes) { var e, m, eLen = nBytes * 8 - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, nBits = -7, i = isLE ? nBytes - 1 : 0, d = isLE ? -1 : 1, s = buffer[offset + i]; i += d; @@ -73407,15 +73407,15 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return (s ? -1 : 1) * m * Math.pow(2, e - mLen); } - /** - * Writes an IEEE754 float to a byte array. - * @param {!Array} buffer - * @param {number} value - * @param {number} offset - * @param {boolean} isLE - * @param {number} mLen - * @param {number} nBytes - * @inner + /** + * Writes an IEEE754 float to a byte array. + * @param {!Array} buffer + * @param {number} value + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @inner */ function ieee754_write(buffer, value, offset, isLE, mLen, nBytes) { var e, m, c, eLen = nBytes * 8 - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, i = isLE ? 0 : nBytes - 1, d = isLE ? 1 : -1, s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; value = Math.abs(value); @@ -73451,12 +73451,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { for(; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); buffer[offset + i - d] |= s * 128; } - /** - * Writes a 32bit float. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 32bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeFloat32 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73474,19 +73474,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return this; }; - /** - * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32; - /** - * Reads a 32bit float. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} - * @expose + /** + * Reads a 32bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose */ ByteBufferPrototype.readFloat32 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73499,20 +73499,20 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return value; }; - /** - * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}. - * @function - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} - * @expose + /** + * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose */ ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32; // types/floats/float64 - /** - * Writes a 64bit float. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeFloat64 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73530,19 +73530,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return this; }; - /** - * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64; - /** - * Reads a 64bit float. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {number} - * @expose + /** + * Reads a 64bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose */ ByteBufferPrototype.readFloat64 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73555,25 +73555,25 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return value; }; - /** - * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. - * @function - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {number} - * @expose + /** + * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose */ ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64; // types/varints/varint32 - /** - * Maximum number of bytes required to store a 32bit base 128 variable-length integer. - * @type {number} - * @const - * @expose + /** + * Maximum number of bytes required to store a 32bit base 128 variable-length integer. + * @type {number} + * @const + * @expose */ ByteBuffer.MAX_VARINT32_BYTES = 5; - /** - * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. - * @param {number} value Value to encode - * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} - * @expose + /** + * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. + * @param {number} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} + * @expose */ ByteBuffer.calculateVarint32 = function(value) { // ref: src/google/protobuf/io/coded_stream.cc value = value >>> 0; @@ -73583,29 +73583,29 @@ Object.defineProperty(Long.prototype, "__isLong__", { else if (value < 268435456) return 4; else return 5; }; - /** - * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. - * @param {number} n Signed 32bit integer - * @returns {number} Unsigned zigzag encoded 32bit integer - * @expose + /** + * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. + * @param {number} n Signed 32bit integer + * @returns {number} Unsigned zigzag encoded 32bit integer + * @expose */ ByteBuffer.zigZagEncode32 = function(n) { return ((n |= 0) << 1 ^ n >> 31) >>> 0; // ref: src/google/protobuf/wire_format_lite.h }; - /** - * Decodes a zigzag encoded signed 32bit integer. - * @param {number} n Unsigned zigzag encoded 32bit integer - * @returns {number} Signed 32bit integer - * @expose + /** + * Decodes a zigzag encoded signed 32bit integer. + * @param {number} n Unsigned zigzag encoded 32bit integer + * @returns {number} Signed 32bit integer + * @expose */ ByteBuffer.zigZagDecode32 = function(n) { return n >>> 1 ^ -(n & 1) | 0; // // ref: src/google/protobuf/wire_format_lite.h }; - /** - * Writes a 32bit base 128 variable-length integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written - * @expose + /** + * Writes a 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose */ ByteBufferPrototype.writeVarint32 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73634,25 +73634,25 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return size; }; - /** - * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written - * @expose + /** + * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose */ ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) { return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset); }; - /** - * Reads a 32bit base 128 variable-length integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read - * and the actual number of bytes read. - * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available - * to fully decode the varint. - * @expose + /** + * Reads a 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available + * to fully decode the varint. + * @expose */ ByteBufferPrototype.readVarint32 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73682,14 +73682,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { "length": c }; }; - /** - * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read - * and the actual number of bytes read. - * @throws {Error} If it's not a valid varint - * @expose + /** + * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose */ ByteBufferPrototype.readVarint32ZigZag = function(offset) { var val = this.readVarint32(offset); if (typeof val === "object") val["value"] = ByteBuffer.zigZagDecode32(val["value"]); @@ -73698,17 +73698,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; // types/varints/varint64 if (Long) { - /** - * Maximum number of bytes required to store a 64bit base 128 variable-length integer. - * @type {number} - * @const - * @expose + /** + * Maximum number of bytes required to store a 64bit base 128 variable-length integer. + * @type {number} + * @const + * @expose */ ByteBuffer.MAX_VARINT64_BYTES = 10; - /** - * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. - * @param {number|!Long} value Value to encode - * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} - * @expose + /** + * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. + * @param {number|!Long} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} + * @expose */ ByteBuffer.calculateVarint64 = function(value) { if (typeof value === "number") value = Long.fromNumber(value); else if (typeof value === "string") value = Long.fromString(value); @@ -73724,11 +73724,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { } } else return part2 < 128 ? 9 : 10; }; - /** - * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. - * @param {number|!Long} value Signed long - * @returns {!Long} Unsigned zigzag encoded long - * @expose + /** + * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. + * @param {number|!Long} value Signed long + * @returns {!Long} Unsigned zigzag encoded long + * @expose */ ByteBuffer.zigZagEncode64 = function(value) { if (typeof value === "number") value = Long.fromNumber(value, false); else if (typeof value === "string") value = Long.fromString(value, false); @@ -73736,11 +73736,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { // ref: src/google/protobuf/wire_format_lite.h return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned(); }; - /** - * Decodes a zigzag encoded signed 64bit integer. - * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number - * @returns {!Long} Signed long - * @expose + /** + * Decodes a zigzag encoded signed 64bit integer. + * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number + * @returns {!Long} Signed long + * @expose */ ByteBuffer.zigZagDecode64 = function(value) { if (typeof value === "number") value = Long.fromNumber(value, false); else if (typeof value === "string") value = Long.fromString(value, false); @@ -73748,13 +73748,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { // ref: src/google/protobuf/wire_format_lite.h return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned(); }; - /** - * Writes a 64bit base 128 variable-length integer. - * @param {number|Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. - * @expose + /** + * Writes a 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose */ ByteBufferPrototype.writeVarint64 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73801,24 +73801,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { return this; } else return size; }; - /** - * Writes a zig-zag encoded 64bit base 128 variable-length integer. - * @param {number|Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. - * @expose + /** + * Writes a zig-zag encoded 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose */ ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) { return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset); }; - /** - * Reads a 64bit base 128 variable-length integer. Requires Long.js. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and - * the actual number of bytes read. - * @throws {Error} If it's not a valid varint - * @expose + /** + * Reads a 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose */ ByteBufferPrototype.readVarint64 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73877,14 +73877,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { "length": offset - start }; }; - /** - * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and - * the actual number of bytes read. - * @throws {Error} If it's not a valid varint - * @expose + /** + * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose */ ByteBufferPrototype.readVarint64ZigZag = function(offset) { var val = this.readVarint64(offset); if (val && val["value"] instanceof Long) val["value"] = ByteBuffer.zigZagDecode64(val["value"]); @@ -73893,14 +73893,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; } // Long // types/strings/cstring - /** - * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL - * characters itself. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * contained in `str` + 1 if omitted. - * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written - * @expose + /** + * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL + * characters itself. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * contained in `str` + 1 if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written + * @expose */ ByteBufferPrototype.writeCString = function(str, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73930,14 +73930,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return k; }; - /** - * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters - * itself. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose + /** + * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters + * itself. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose */ ByteBufferPrototype.readCString = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73964,14 +73964,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; }; // types/strings/istring - /** - * Writes a length as uint32 prefixed UTF8 encoded string. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written - * @expose - * @see ByteBuffer#writeVarint32 + /** + * Writes a length as uint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 */ ByteBufferPrototype.writeIString = function(str, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -74009,14 +74009,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return offset - start; }; - /** - * Reads a length as uint32 prefixed UTF8 encoded string. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose - * @see ByteBuffer#readVarint32 + /** + * Reads a length as uint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 */ ByteBufferPrototype.readIString = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -74038,24 +74038,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; }; // types/strings/utf8string - /** - * Metrics representing number of UTF8 characters. Evaluates to `c`. - * @type {string} - * @const - * @expose + /** + * Metrics representing number of UTF8 characters. Evaluates to `c`. + * @type {string} + * @const + * @expose */ ByteBuffer.METRICS_CHARS = "c"; - /** - * Metrics representing number of bytes. Evaluates to `b`. - * @type {string} - * @const - * @expose + /** + * Metrics representing number of bytes. Evaluates to `b`. + * @type {string} + * @const + * @expose */ ByteBuffer.METRICS_BYTES = "b"; - /** - * Writes an UTF8 encoded string. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. - * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. - * @expose + /** + * Writes an UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose */ ByteBufferPrototype.writeUTF8String = function(str, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -74080,48 +74080,48 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return offset - start; }; - /** - * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}. - * @function - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. - * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. - * @expose + /** + * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}. + * @function + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose */ ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String; - /** - * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's - * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. - * @param {string} str String to calculate - * @returns {number} Number of UTF8 characters - * @expose + /** + * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's + * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 characters + * @expose */ ByteBuffer.calculateUTF8Chars = function(str) { return utfx.calculateUTF16asUTF8(stringSource(str))[0]; }; - /** - * Calculates the number of UTF8 bytes of a string. - * @param {string} str String to calculate - * @returns {number} Number of UTF8 bytes - * @expose + /** + * Calculates the number of UTF8 bytes of a string. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose */ ByteBuffer.calculateUTF8Bytes = function(str) { return utfx.calculateUTF16asUTF8(stringSource(str))[1]; }; - /** - * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}. - * @function - * @param {string} str String to calculate - * @returns {number} Number of UTF8 bytes - * @expose + /** + * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}. + * @function + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose */ ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes; - /** - * Reads an UTF8 encoded string. - * @param {number} length Number of characters or bytes to read. - * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to - * {@link ByteBuffer.METRICS_CHARS}. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose + /** + * Reads an UTF8 encoded string. + * @param {number} length Number of characters or bytes to read. + * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose */ ByteBufferPrototype.readUTF8String = function(length, metrics, offset) { if (typeof metrics === "number") { offset = metrics; @@ -74174,27 +74174,27 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; } else throw TypeError("Unsupported metrics: " + metrics); }; - /** - * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. - * @function - * @param {number} length Number of characters or bytes to read - * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to - * {@link ByteBuffer.METRICS_CHARS}. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose + /** + * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. + * @function + * @param {number} length Number of characters or bytes to read + * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose */ ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String; // types/strings/vstring - /** - * Writes a length as varint32 prefixed UTF8 encoded string. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written - * @expose - * @see ByteBuffer#writeVarint32 + /** + * Writes a length as varint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 */ ByteBufferPrototype.writeVString = function(str, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -74222,14 +74222,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return offset - start; }; - /** - * Reads a length as varint32 prefixed UTF8 encoded string. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose - * @see ByteBuffer#readVarint32 + /** + * Reads a length as varint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 */ ByteBufferPrototype.readVString = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -74250,18 +74250,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { "length": offset - start }; }; - /** - * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended - * data's length. - * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets - * will be modified according to the performed read operation. - * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") - * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer} this - * @expose - * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` - * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` + /** + * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended + * data's length. + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` + * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` */ ByteBufferPrototype.append = function(source, encoding, offset) { if (typeof encoding === "number" || typeof encoding !== "string") { offset = encoding; @@ -74286,53 +74286,53 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += length; return this; }; - /** - * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the - specified offset up to the length of this ByteBuffer's data. - * @param {!ByteBuffer} target Target ByteBuffer - * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!ByteBuffer} this - * @expose - * @see ByteBuffer#append + /** + * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the + specified offset up to the length of this ByteBuffer's data. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#append */ ByteBufferPrototype.appendTo = function(target, offset) { target.append(this, offset); return this; }; - /** - * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to - * disable them if your code already makes sure that everything is valid. - * @param {boolean} assert `true` to enable assertions, otherwise `false` - * @returns {!ByteBuffer} this - * @expose + /** + * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to + * disable them if your code already makes sure that everything is valid. + * @param {boolean} assert `true` to enable assertions, otherwise `false` + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.assert = function(assert) { this.noAssert = !assert; return this; }; - /** - * Gets the capacity of this ByteBuffer's backing buffer. - * @returns {number} Capacity of the backing buffer - * @expose + /** + * Gets the capacity of this ByteBuffer's backing buffer. + * @returns {number} Capacity of the backing buffer + * @expose */ ByteBufferPrototype.capacity = function() { return this.buffer.byteLength; }; - /** - * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the - * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. - * @returns {!ByteBuffer} this - * @expose + /** + * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the + * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.clear = function() { this.offset = 0; this.limit = this.buffer.byteLength; this.markedOffset = -1; return this; }; - /** - * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset}, - * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}. - * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false` - * @returns {!ByteBuffer} Cloned instance - * @expose + /** + * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset}, + * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}. + * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false` + * @returns {!ByteBuffer} Cloned instance + * @expose */ ByteBufferPrototype.clone = function(copy) { var bb = new ByteBuffer(0, this.littleEndian, this.noAssert); if (copy) { @@ -74347,14 +74347,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { bb.limit = this.limit; return bb; }; - /** - * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes - * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and - * adapt {@link ByteBuffer#markedOffset} to the same relative position if set. - * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} - * @returns {!ByteBuffer} this - * @expose + /** + * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes + * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and + * adapt {@link ByteBuffer#markedOffset} to the same relative position if set. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.compact = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74385,13 +74385,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.limit = len; return this; }; - /** - * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and - * {@link ByteBuffer#limit}. - * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. - * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. - * @returns {!ByteBuffer} Copy - * @expose + /** + * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Copy + * @expose */ ByteBufferPrototype.copy = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74410,17 +74410,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.copyTo(bb, 0, begin, end); return bb; }; - /** - * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and - * {@link ByteBuffer#limit}. - * @param {!ByteBuffer} target Target ByteBuffer - * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} - * by the number of bytes copied if omitted. - * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the - * number of bytes copied if omitted. - * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} - * @returns {!ByteBuffer} this - * @expose + /** + * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} + * by the number of bytes copied if omitted. + * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the + * number of bytes copied if omitted. + * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) { var relative, targetRelative; if (!this.noAssert) { @@ -74439,28 +74439,28 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (targetRelative) target.offset += len; return this; }; - /** - * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the - * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, - * the required capacity will be used instead. - * @param {number} capacity Required capacity - * @returns {!ByteBuffer} this - * @expose + /** + * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the + * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, + * the required capacity will be used instead. + * @param {number} capacity Required capacity + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.ensureCapacity = function(capacity) { var current = this.buffer.byteLength; if (current < capacity) return this.resize((current *= 2) > capacity ? current : capacity); return this; }; - /** - * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between - * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. - * @param {number|string} value Byte value to fill with. If given as a string, the first character is used. - * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. defaults to {@link ByteBuffer#offset}. - * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. - * @returns {!ByteBuffer} this - * @expose - * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes + /** + * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {number|string} value Byte value to fill with. If given as a string, the first character is used. + * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} this + * @expose + * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes */ ByteBufferPrototype.fill = function(value, begin, end) { var relative = typeof begin === "undefined"; if (relative) begin = this.offset; @@ -74481,24 +74481,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset = begin; return this; }; - /** - * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and - * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. - * @returns {!ByteBuffer} this - * @expose + /** + * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and + * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.flip = function() { this.limit = this.offset; this.offset = 0; return this; }; - /** - * Marks an offset on this ByteBuffer to be used later. - * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}. - * @returns {!ByteBuffer} this - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @see ByteBuffer#reset - * @expose + /** + * Marks an offset on this ByteBuffer to be used later. + * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}. + * @returns {!ByteBuffer} this + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @see ByteBuffer#reset + * @expose */ ByteBufferPrototype.mark = function(offset) { offset = typeof offset === "undefined" ? this.offset : offset; if (!this.noAssert) { @@ -74509,11 +74509,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.markedOffset = offset; return this; }; - /** - * Sets the byte order. - * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian - * @returns {!ByteBuffer} this - * @expose + /** + * Sets the byte order. + * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.order = function(littleEndian) { if (!this.noAssert) { if (typeof littleEndian !== "boolean") throw TypeError("Illegal littleEndian: Not a boolean"); @@ -74521,37 +74521,37 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.littleEndian = !!littleEndian; return this; }; - /** - * Switches (to) little endian byte order. - * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian - * @returns {!ByteBuffer} this - * @expose + /** + * Switches (to) little endian byte order. + * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.LE = function(littleEndian) { this.littleEndian = typeof littleEndian !== "undefined" ? !!littleEndian : true; return this; }; - /** - * Switches (to) big endian byte order. - * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian - * @returns {!ByteBuffer} this - * @expose + /** + * Switches (to) big endian byte order. + * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.BE = function(bigEndian) { this.littleEndian = typeof bigEndian !== "undefined" ? !bigEndian : false; return this; }; - /** - * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the - * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer - * will be resized and its contents moved accordingly. - * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be - * modified according to the performed read operation. - * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") - * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes - * prepended if omitted. - * @returns {!ByteBuffer} this - * @expose - * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` - * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` + /** + * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be + * modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` + * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` */ ByteBufferPrototype.prepend = function(source, encoding, offset) { if (typeof encoding === "number" || typeof encoding !== "string") { offset = encoding; @@ -74584,43 +74584,43 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset -= len; return this; }; - /** - * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the - * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer - * will be resized and its contents moved accordingly. - * @param {!ByteBuffer} target Target ByteBuffer - * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes - * prepended if omitted. - * @returns {!ByteBuffer} this - * @expose - * @see ByteBuffer#prepend + /** + * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#prepend */ ByteBufferPrototype.prependTo = function(target, offset) { target.prepend(this, offset); return this; }; - /** - * Prints debug information about this ByteBuffer's contents. - * @param {function(string)=} out Output function to call, defaults to console.log - * @expose + /** + * Prints debug information about this ByteBuffer's contents. + * @param {function(string)=} out Output function to call, defaults to console.log + * @expose */ ByteBufferPrototype.printDebug = function(out) { if (typeof out !== "function") out = console.log.bind(console); out(this.toString() + "\n" + "-------------------------------------------------------------------\n" + this.toDebug(/* columns */ true)); }; - /** - * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and - * {@link ByteBuffer#limit}, so this returns `limit - offset`. - * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. - * @expose + /** + * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}, so this returns `limit - offset`. + * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. + * @expose */ ByteBufferPrototype.remaining = function() { return this.limit - this.offset; }; - /** - * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} - * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been - * marked, sets `offset = 0`. - * @returns {!ByteBuffer} this - * @see ByteBuffer#mark - * @expose + /** + * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} + * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been + * marked, sets `offset = 0`. + * @returns {!ByteBuffer} this + * @see ByteBuffer#mark + * @expose */ ByteBufferPrototype.reset = function() { if (this.markedOffset >= 0) { this.offset = this.markedOffset; @@ -74628,14 +74628,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } else this.offset = 0; return this; }; - /** - * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that - * large or larger. - * @param {number} capacity Capacity required - * @returns {!ByteBuffer} this - * @throws {TypeError} If `capacity` is not a number - * @throws {RangeError} If `capacity < 0` - * @expose + /** + * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that + * large or larger. + * @param {number} capacity Capacity required + * @returns {!ByteBuffer} this + * @throws {TypeError} If `capacity` is not a number + * @throws {RangeError} If `capacity < 0` + * @expose */ ByteBufferPrototype.resize = function(capacity) { if (!this.noAssert) { if (typeof capacity !== "number" || capacity % 1 !== 0) throw TypeError("Illegal capacity: " + capacity + " (not an integer)"); @@ -74651,12 +74651,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return this; }; - /** - * Reverses this ByteBuffer's contents. - * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} - * @returns {!ByteBuffer} this - * @expose + /** + * Reverses this ByteBuffer's contents. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.reverse = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74671,11 +74671,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { Array.prototype.reverse.call(this.view.subarray(begin, end)); return this; }; - /** - * Skips the next `length` bytes. This will just advance - * @param {number} length Number of bytes to skip. May also be negative to move the offset back. - * @returns {!ByteBuffer} this - * @expose + /** + * Skips the next `length` bytes. This will just advance + * @param {number} length Number of bytes to skip. May also be negative to move the offset back. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.skip = function(length) { if (!this.noAssert) { if (typeof length !== "number" || length % 1 !== 0) throw TypeError("Illegal length: " + length + " (not an integer)"); @@ -74688,12 +74688,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.offset = offset; return this; }; - /** - * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. - * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. - * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. - * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} - * @expose + /** + * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} + * @expose */ ByteBufferPrototype.slice = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74709,13 +74709,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { bb.limit = end; return bb; }; - /** - * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between - * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. - * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if - * possible. Defaults to `false` - * @returns {!ArrayBuffer} Contents as an ArrayBuffer - * @expose + /** + * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if + * possible. Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose */ ByteBufferPrototype.toBuffer = function(forceCopy) { var offset = this.offset, limit = this.limit; if (!this.noAssert) { @@ -74733,25 +74733,25 @@ Object.defineProperty(Long.prototype, "__isLong__", { new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0); return buffer; }; - /** - * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between - * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}. - * @function - * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. - * Defaults to `false` - * @returns {!ArrayBuffer} Contents as an ArrayBuffer - * @expose + /** + * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}. + * @function + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. + * Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose */ ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer; - /** - * Converts the ByteBuffer's contents to a string. - * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows - * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with - * highlighted offsets. - * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} - * @returns {string} String representation - * @throws {Error} If `encoding` is invalid - * @expose + /** + * Converts the ByteBuffer's contents to a string. + * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows + * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with + * highlighted offsets. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {string} String representation + * @throws {Error} If `encoding` is invalid + * @expose */ ByteBufferPrototype.toString = function(encoding, begin, end) { if (typeof encoding === "undefined") return "ByteBufferAB(offset=" + this.offset + ",markedOffset=" + this.markedOffset + ",limit=" + this.limit + ",capacity=" + this.capacity() + ")"; if (typeof encoding === "number") encoding = "utf8", begin = encoding, end = begin; @@ -74773,21 +74773,21 @@ Object.defineProperty(Long.prototype, "__isLong__", { } }; // lxiv-embeddable - /** - * lxiv-embeddable (c) 2014 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/lxiv for details + /** + * lxiv-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/lxiv for details */ var lxiv = function() { "use strict"; - /** - * lxiv namespace. - * @type {!Object.} - * @exports lxiv + /** + * lxiv namespace. + * @type {!Object.} + * @exports lxiv */ var lxiv = {}; - /** - * Character codes for output. - * @type {!Array.} - * @inner + /** + * Character codes for output. + * @type {!Array.} + * @inner */ var aout = [ 65, 66, @@ -74854,18 +74854,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { 43, 47 ]; - /** - * Character codes for input. - * @type {!Array.} - * @inner + /** + * Character codes for input. + * @type {!Array.} + * @inner */ var ain = []; for(var i = 0, k = aout.length; i < k; ++i)ain[aout[i]] = i; - /** - * Encodes bytes to base64 char codes. - * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if - * there are no more bytes left. - * @param {!function(number)} dst Characters destination as a function successively called with each encoded char - * code. + /** + * Encodes bytes to base64 char codes. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if + * there are no more bytes left. + * @param {!function(number)} dst Characters destination as a function successively called with each encoded char + * code. */ lxiv.encode = function(src, dst) { var b, t; while((b = src()) !== null){ @@ -74880,12 +74880,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { } else dst(aout[t & 0x3f]), dst(61), dst(61); } }; - /** - * Decodes base64 char codes to bytes. - * @param {!function():number|null} src Characters source as a function returning the next char code respectively - * `null` if there are no more characters left. - * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. - * @throws {Error} If a character code is invalid + /** + * Decodes base64 char codes to bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + * @throws {Error} If a character code is invalid */ lxiv.decode = function(src, dst) { var c, t1, t2; function fail(c) { @@ -74917,23 +74917,23 @@ Object.defineProperty(Long.prototype, "__isLong__", { } } }; - /** - * Tests if a string is valid base64. - * @param {string} str String to test - * @returns {boolean} `true` if valid, otherwise `false` + /** + * Tests if a string is valid base64. + * @param {string} str String to test + * @returns {boolean} `true` if valid, otherwise `false` */ lxiv.test = function(str) { return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str); }; return lxiv; }(); // encodings/base64 - /** - * Encodes this ByteBuffer's contents to a base64 encoded string. - * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. - * @returns {string} Base64 encoded string - * @throws {RangeError} If `begin` or `end` is out of bounds - * @expose + /** + * Encodes this ByteBuffer's contents to a base64 encoded string. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. + * @returns {string} Base64 encoded string + * @throws {RangeError} If `begin` or `end` is out of bounds + * @expose */ ByteBufferPrototype.toBase64 = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74946,13 +74946,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { }).bind(this), sd = stringDestination()); return sd(); }; - /** - * Decodes a base64 encoded string to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + /** + * Decodes a base64 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose */ ByteBuffer.fromBase64 = function(str, littleEndian) { if (typeof str !== "string") throw TypeError("str"); var bb = new ByteBuffer(str.length / 4 * 3, littleEndian), i = 0; @@ -74962,32 +74962,32 @@ Object.defineProperty(Long.prototype, "__isLong__", { bb.limit = i; return bb; }; - /** - * Encodes a binary string to base64 like `window.btoa` does. - * @param {string} str Binary string - * @returns {string} Base64 encoded string - * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa - * @expose + /** + * Encodes a binary string to base64 like `window.btoa` does. + * @param {string} str Binary string + * @returns {string} Base64 encoded string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa + * @expose */ ByteBuffer.btoa = function(str) { return ByteBuffer.fromBinary(str).toBase64(); }; - /** - * Decodes a base64 encoded string to binary like `window.atob` does. - * @param {string} b64 Base64 encoded string - * @returns {string} Binary string - * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob - * @expose + /** + * Decodes a base64 encoded string to binary like `window.atob` does. + * @param {string} b64 Base64 encoded string + * @returns {string} Binary string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob + * @expose */ ByteBuffer.atob = function(b64) { return ByteBuffer.fromBase64(b64).toBinary(); }; // encodings/binary - /** - * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. - * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. - * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. - * @returns {string} Binary encoded string - * @throws {RangeError} If `offset > limit` - * @expose + /** + * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Binary encoded string + * @throws {RangeError} If `offset > limit` + * @expose */ ByteBufferPrototype.toBinary = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -75002,13 +75002,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return parts.join("") + String.fromCharCode.apply(String, chars); }; - /** - * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + /** + * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose */ ByteBuffer.fromBinary = function(str, littleEndian) { if (typeof str !== "string") throw TypeError("str"); var i = 0, k = str.length, charCode, bb = new ByteBuffer(k, littleEndian); @@ -75021,22 +75021,22 @@ Object.defineProperty(Long.prototype, "__isLong__", { return bb; }; // encodings/debug - /** - * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: - * * `<` : offset, - * * `'` : markedOffset, - * * `>` : limit, - * * `|` : offset and limit, - * * `[` : offset and markedOffset, - * * `]` : markedOffset and limit, - * * `!` : offset, markedOffset and limit - * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` - * @returns {string|!Array.} Debug string or array of lines if `asArray = true` - * @expose - * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` - * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` - * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` - * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` + /** + * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: + * * `<` : offset, + * * `'` : markedOffset, + * * `>` : limit, + * * `|` : offset and limit, + * * `[` : offset and markedOffset, + * * `]` : markedOffset and limit, + * * `!` : offset, markedOffset and limit + * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` + * @returns {string|!Array.} Debug string or array of lines if `asArray = true` + * @expose + * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` + * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` + * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` + * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` */ ByteBufferPrototype.toDebug = function(columns) { var i = -1, k = this.buffer.byteLength, b, hex = "", asc = "", out = ""; while(i < k){ @@ -75065,16 +75065,16 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return columns ? out : hex; }; - /** - * Decodes a hex encoded string with marked offsets to a ByteBuffer. - * @param {string} str Debug string to decode (not be generated with `columns = true`) - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer - * @expose - * @see ByteBuffer#toDebug + /** + * Decodes a hex encoded string with marked offsets to a ByteBuffer. + * @param {string} str Debug string to decode (not be generated with `columns = true`) + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + * @see ByteBuffer#toDebug */ ByteBuffer.fromDebug = function(str, littleEndian, noAssert) { var k = str.length, bb = new ByteBuffer((k + 1) / 3 | 0, littleEndian, noAssert); var i = 0, j = 0, ch, b, rs = false, ho = false, hm = false, hl = false, fail = false; @@ -75183,12 +75183,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { return bb; }; // encodings/hex - /** - * Encodes this ByteBuffer's contents to a hex encoded string. - * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. - * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. - * @returns {string} Hex encoded string - * @expose + /** + * Encodes this ByteBuffer's contents to a hex encoded string. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Hex encoded string + * @expose */ ByteBufferPrototype.toHex = function(begin, end) { begin = typeof begin === "undefined" ? this.offset : begin; end = typeof end === "undefined" ? this.limit : end; @@ -75207,15 +75207,15 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return out.join(""); }; - /** - * Decodes a hex encoded string to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + /** + * Decodes a hex encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose */ ByteBuffer.fromHex = function(str, littleEndian, noAssert) { if (!noAssert) { if (typeof str !== "string") throw TypeError("Illegal str: Not a string"); @@ -75233,27 +75233,27 @@ Object.defineProperty(Long.prototype, "__isLong__", { return bb; }; // utfx-embeddable - /** - * utfx-embeddable (c) 2014 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/utfx for details + /** + * utfx-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/utfx for details */ var utfx = function() { "use strict"; - /** - * utfx namespace. - * @inner - * @type {!Object.} + /** + * utfx namespace. + * @inner + * @type {!Object.} */ var utfx = {}; - /** - * Maximum valid code point. - * @type {number} - * @const + /** + * Maximum valid code point. + * @type {number} + * @const */ utfx.MAX_CODEPOINT = 0x10FFFF; - /** - * Encodes UTF8 code points to UTF8 bytes. - * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point - * respectively `null` if there are no more code points left or a single numeric code point. - * @param {!function(number)} dst Bytes destination as a function successively called with the next byte + /** + * Encodes UTF8 code points to UTF8 bytes. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte */ utfx.encodeUTF8 = function(src, dst) { var cp = null; if (typeof src === "number") cp = src, src = function() { @@ -75267,14 +75267,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { cp = null; } }; - /** - * Decodes UTF8 bytes to UTF8 code points. - * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there - * are no more bytes left. - * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. - * @throws {RangeError} If a starting byte is invalid in UTF8 - * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the - * remaining bytes. + /** + * Decodes UTF8 bytes to UTF8 code points. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the + * remaining bytes. */ utfx.decodeUTF8 = function(src, dst) { var a, b, c, d, fail = function(b) { b = b.slice(0, b.indexOf(null)); @@ -75303,12 +75303,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { else throw RangeError("Illegal starting byte: " + a); } }; - /** - * Converts UTF16 characters to UTF8 code points. - * @param {!function():number|null} src Characters source as a function returning the next char code respectively - * `null` if there are no more characters left. - * @param {!function(number)} dst Code points destination as a function successively called with each converted code - * point. + /** + * Converts UTF16 characters to UTF8 code points. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Code points destination as a function successively called with each converted code + * point. */ utfx.UTF16toUTF8 = function(src, dst) { var c1, c2 = null; while(true){ @@ -75326,12 +75326,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { } if (c2 !== null) dst(c2); }; - /** - * Converts UTF8 code points to UTF16 characters. - * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point - * respectively `null` if there are no more code points left or a single numeric code point. - * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. - * @throws {RangeError} If a code point is out of range + /** + * Converts UTF8 code points to UTF16 characters. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a code point is out of range */ utfx.UTF8toUTF16 = function(src, dst) { var cp = null; if (typeof src === "number") cp = src, src = function() { @@ -75343,50 +75343,50 @@ Object.defineProperty(Long.prototype, "__isLong__", { cp = null; } }; - /** - * Converts and encodes UTF16 characters to UTF8 bytes. - * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` - * if there are no more characters left. - * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + /** + * Converts and encodes UTF16 characters to UTF8 bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` + * if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. */ utfx.encodeUTF16toUTF8 = function(src, dst) { utfx.UTF16toUTF8(src, function(cp) { utfx.encodeUTF8(cp, dst); }); }; - /** - * Decodes and converts UTF8 bytes to UTF16 characters. - * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there - * are no more bytes left. - * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. - * @throws {RangeError} If a starting byte is invalid in UTF8 - * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. + /** + * Decodes and converts UTF8 bytes to UTF16 characters. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. */ utfx.decodeUTF8toUTF16 = function(src, dst) { utfx.decodeUTF8(src, function(cp) { utfx.UTF8toUTF16(cp, dst); }); }; - /** - * Calculates the byte length of an UTF8 code point. - * @param {number} cp UTF8 code point - * @returns {number} Byte length + /** + * Calculates the byte length of an UTF8 code point. + * @param {number} cp UTF8 code point + * @returns {number} Byte length */ utfx.calculateCodePoint = function(cp) { return cp < 0x80 ? 1 : cp < 0x800 ? 2 : cp < 0x10000 ? 3 : 4; }; - /** - * Calculates the number of UTF8 bytes required to store UTF8 code points. - * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively - * `null` if there are no more code points left. - * @returns {number} The number of UTF8 bytes required + /** + * Calculates the number of UTF8 bytes required to store UTF8 code points. + * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively + * `null` if there are no more code points left. + * @returns {number} The number of UTF8 bytes required */ utfx.calculateUTF8 = function(src) { var cp, l = 0; while((cp = src()) !== null)l += cp < 0x80 ? 1 : cp < 0x800 ? 2 : cp < 0x10000 ? 3 : 4; return l; }; - /** - * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. - * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively - * `null` if there are no more characters left. - * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. + /** + * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. + * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. */ utfx.calculateUTF16asUTF8 = function(src) { var n = 0, l = 0; utfx.UTF16toUTF8(src, function(cp) { @@ -75401,12 +75401,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { return utfx; }(); // encodings/utf8 - /** - * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded - * string. - * @returns {string} Hex encoded string - * @throws {RangeError} If `offset > limit` - * @expose + /** + * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded + * string. + * @returns {string} Hex encoded string + * @throws {RangeError} If `offset > limit` + * @expose */ ByteBufferPrototype.toUTF8 = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -75427,15 +75427,15 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return sd(); }; - /** - * Decodes an UTF8 encoded string to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + /** + * Decodes an UTF8 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose */ ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) { if (!noAssert) { if (typeof str !== "string") throw TypeError("Illegal str: Not a string"); @@ -75451,52 +75451,52 @@ Object.defineProperty(Long.prototype, "__isLong__", { }); },{"704c3fe1485416e9":"bf0yc"}],"bf0yc":[function(require,module,exports) { -/* - Copyright 2013 Daniel Wirtz - Copyright 2009 The Closure Library Authors. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS-IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ /** - * @license long.js (c) 2013 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/long.js for details +/* + Copyright 2013 Daniel Wirtz + Copyright 2009 The Closure Library Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS-IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ /** + * @license long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/long.js for details */ (function(global, factory) { /* AMD */ if (typeof define === "function" && define["amd"]) define([], factory); else if (module && module["exports"]) module["exports"] = factory(); else (global["dcodeIO"] = global["dcodeIO"] || {})["Long"] = factory(); })(this, function() { "use strict"; - /** - * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. - * See the from* functions below for more convenient ways of constructing Longs. - * @exports Long - * @class A Long class for representing a 64 bit two's-complement integer value. - * @param {number} low The low (signed) 32 bits of the long - * @param {number} high The high (signed) 32 bits of the long - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @constructor + /** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @constructor */ function Long(low, high, unsigned) { - /** - * The low 32 bits as a signed value. - * @type {number} + /** + * The low 32 bits as a signed value. + * @type {number} */ this.low = low | 0; - /** - * The high 32 bits as a signed value. - * @type {number} + /** + * The high 32 bits as a signed value. + * @type {number} */ this.high = high | 0; - /** - * Whether unsigned or not. - * @type {boolean} + /** + * Whether unsigned or not. + * @type {boolean} */ this.unsigned = !!unsigned; } // The internal representation of a long is the two given signed, 32-bit values. @@ -75515,46 +75515,46 @@ Object.defineProperty(Long.prototype, "__isLong__", { // // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* // methods on which they depend. - /** - * An indicator used to reliably determine if an object is a Long or not. - * @type {boolean} - * @const - * @private + /** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private */ Long.prototype.__isLong__; Object.defineProperty(Long.prototype, "__isLong__", { value: true, enumerable: false, configurable: false }); - /** - * @function - * @param {*} obj Object - * @returns {boolean} - * @inner + /** + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner */ function isLong(obj) { return (obj && obj["__isLong__"]) === true; } - /** - * Tests if the specified object is a Long. - * @function - * @param {*} obj Object - * @returns {boolean} + /** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} */ Long.isLong = isLong; - /** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @inner + /** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner */ var INT_CACHE = {}; - /** - * A cache of the Long representations of small unsigned integer values. - * @type {!Object} - * @inner + /** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner */ var UINT_CACHE = {}; - /** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromInt(value, unsigned) { var obj, cachedObj, cache; if (unsigned) { @@ -75577,18 +75577,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { return obj; } } - /** - * Returns a Long representing the given 32 bit integer value. - * @function - * @param {number} value The 32 bit integer in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @returns {!Long} The corresponding Long value + /** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value */ Long.fromInt = fromInt; - /** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromNumber(value, unsigned) { if (isNaN(value) || !isFinite(value)) return unsigned ? UZERO : ZERO; if (unsigned) { @@ -75601,44 +75601,44 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (value < 0) return fromNumber(-value, unsigned).neg(); return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned); } - /** - * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. - * @function - * @param {number} value The number in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @returns {!Long} The corresponding Long value + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value */ Long.fromNumber = fromNumber; - /** - * @param {number} lowBits - * @param {number} highBits - * @param {boolean=} unsigned - * @returns {!Long} - * @inner + /** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromBits(lowBits, highBits, unsigned) { return new Long(lowBits, highBits, unsigned); } - /** - * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is - * assumed to use 32 bits. - * @function - * @param {number} lowBits The low 32 bits - * @param {number} highBits The high 32 bits - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @returns {!Long} The corresponding Long value + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value */ Long.fromBits = fromBits; - /** - * @function - * @param {number} base - * @param {number} exponent - * @returns {number} - * @inner + /** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner */ var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) - /** - * @param {string} str - * @param {(boolean|number)=} unsigned - * @param {number=} radix - * @returns {!Long} - * @inner + /** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner */ function fromString(str, unsigned, radix) { if (str.length === 0) throw Error("empty string"); if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") return ZERO; @@ -75667,19 +75667,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { result.unsigned = unsigned; return result; } - /** - * Returns a Long representation of the given string, written using the specified radix. - * @function - * @param {string} str The textual representation of the Long - * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed - * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 - * @returns {!Long} The corresponding Long value + /** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value */ Long.fromString = fromString; - /** - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val - * @returns {!Long} - * @inner + /** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @returns {!Long} + * @inner */ function fromValue(val) { if (val /* is compatible */ instanceof Long) return val; if (typeof val === "number") return fromNumber(val); @@ -75687,131 +75687,131 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Throws for non-objects, converts non-instanceof Long: return fromBits(val.low, val.high, val.unsigned); } - /** - * Converts the specified value to a Long. - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value - * @returns {!Long} + /** + * Converts the specified value to a Long. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @returns {!Long} */ Long.fromValue = fromValue; // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be // no runtime penalty for these. - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_16_DBL = 65536; - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_24_DBL = 16777216; - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; - /** - * @type {!Long} - * @const - * @inner + /** + * @type {!Long} + * @const + * @inner */ var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var ZERO = fromInt(0); - /** - * Signed zero. - * @type {!Long} + /** + * Signed zero. + * @type {!Long} */ Long.ZERO = ZERO; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var UZERO = fromInt(0, true); - /** - * Unsigned zero. - * @type {!Long} + /** + * Unsigned zero. + * @type {!Long} */ Long.UZERO = UZERO; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var ONE = fromInt(1); - /** - * Signed one. - * @type {!Long} + /** + * Signed one. + * @type {!Long} */ Long.ONE = ONE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var UONE = fromInt(1, true); - /** - * Unsigned one. - * @type {!Long} + /** + * Unsigned one. + * @type {!Long} */ Long.UONE = UONE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var NEG_ONE = fromInt(-1); - /** - * Signed negative one. - * @type {!Long} + /** + * Signed negative one. + * @type {!Long} */ Long.NEG_ONE = NEG_ONE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var MAX_VALUE = fromBits(-1, 2147483647, false); - /** - * Maximum signed value. - * @type {!Long} + /** + * Maximum signed value. + * @type {!Long} */ Long.MAX_VALUE = MAX_VALUE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var MAX_UNSIGNED_VALUE = fromBits(-1, -1, true); - /** - * Maximum unsigned value. - * @type {!Long} + /** + * Maximum unsigned value. + * @type {!Long} */ Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var MIN_VALUE = fromBits(0, -2147483648, false); - /** - * Minimum signed value. - * @type {!Long} + /** + * Minimum signed value. + * @type {!Long} */ Long.MIN_VALUE = MIN_VALUE; - /** - * @alias Long.prototype - * @inner + /** + * @alias Long.prototype + * @inner */ var LongPrototype = Long.prototype; - /** - * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. - * @returns {number} + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} */ LongPrototype.toInt = function toInt() { return this.unsigned ? this.low >>> 0 : this.low; }; - /** - * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). - * @returns {number} + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} */ LongPrototype.toNumber = function toNumber() { if (this.unsigned) return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0); return this.high * TWO_PWR_32_DBL + (this.low >>> 0); }; - /** - * Converts the Long to a string written in the specified radix. - * @param {number=} radix Radix (2-36), defaults to 10 - * @returns {string} - * @override - * @throws {RangeError} If `radix` is out of range + /** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range */ LongPrototype.toString = function toString(radix) { radix = radix || 10; if (radix < 2 || 36 < radix) throw RangeError("radix"); @@ -75838,154 +75838,154 @@ Object.defineProperty(Long.prototype, "__isLong__", { } } }; - /** - * Gets the high 32 bits as a signed integer. - * @returns {number} Signed high bits + /** + * Gets the high 32 bits as a signed integer. + * @returns {number} Signed high bits */ LongPrototype.getHighBits = function getHighBits() { return this.high; }; - /** - * Gets the high 32 bits as an unsigned integer. - * @returns {number} Unsigned high bits + /** + * Gets the high 32 bits as an unsigned integer. + * @returns {number} Unsigned high bits */ LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { return this.high >>> 0; }; - /** - * Gets the low 32 bits as a signed integer. - * @returns {number} Signed low bits + /** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits */ LongPrototype.getLowBits = function getLowBits() { return this.low; }; - /** - * Gets the low 32 bits as an unsigned integer. - * @returns {number} Unsigned low bits + /** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits */ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { return this.low >>> 0; }; - /** - * Gets the number of bits needed to represent the absolute value of this Long. - * @returns {number} + /** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} */ LongPrototype.getNumBitsAbs = function getNumBitsAbs() { if (this.isNegative()) return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); var val = this.high != 0 ? this.high : this.low; for(var bit = 31; bit > 0; bit--)if ((val & 1 << bit) != 0) break; return this.high != 0 ? bit + 33 : bit + 1; }; - /** - * Tests if this Long's value equals zero. - * @returns {boolean} + /** + * Tests if this Long's value equals zero. + * @returns {boolean} */ LongPrototype.isZero = function isZero() { return this.high === 0 && this.low === 0; }; - /** - * Tests if this Long's value is negative. - * @returns {boolean} + /** + * Tests if this Long's value is negative. + * @returns {boolean} */ LongPrototype.isNegative = function isNegative() { return !this.unsigned && this.high < 0; }; - /** - * Tests if this Long's value is positive. - * @returns {boolean} + /** + * Tests if this Long's value is positive. + * @returns {boolean} */ LongPrototype.isPositive = function isPositive() { return this.unsigned || this.high >= 0; }; - /** - * Tests if this Long's value is odd. - * @returns {boolean} + /** + * Tests if this Long's value is odd. + * @returns {boolean} */ LongPrototype.isOdd = function isOdd() { return (this.low & 1) === 1; }; - /** - * Tests if this Long's value is even. - * @returns {boolean} + /** + * Tests if this Long's value is even. + * @returns {boolean} */ LongPrototype.isEven = function isEven() { return (this.low & 1) === 0; }; - /** - * Tests if this Long's value equals the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.equals = function equals(other) { if (!isLong(other)) other = fromValue(other); if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1) return false; return this.high === other.high && this.low === other.low; }; - /** - * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.eq = LongPrototype.equals; - /** - * Tests if this Long's value differs from the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.notEquals = function notEquals(other) { return !this.eq(/* validates */ other); }; - /** - * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.neq = LongPrototype.notEquals; - /** - * Tests if this Long's value is less than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lessThan = function lessThan(other) { return this.comp(/* validates */ other) < 0; }; - /** - * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lt = LongPrototype.lessThan; - /** - * Tests if this Long's value is less than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { return this.comp(/* validates */ other) <= 0; }; - /** - * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lte = LongPrototype.lessThanOrEqual; - /** - * Tests if this Long's value is greater than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.greaterThan = function greaterThan(other) { return this.comp(/* validates */ other) > 0; }; - /** - * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.gt = LongPrototype.greaterThan; - /** - * Tests if this Long's value is greater than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { return this.comp(/* validates */ other) >= 0; }; - /** - * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.gte = LongPrototype.greaterThanOrEqual; - /** - * Compares this Long's value with the specified's. - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater + /** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater */ LongPrototype.compare = function compare(other) { if (!isLong(other)) other = fromValue(other); if (this.eq(other)) return 0; @@ -75997,29 +75997,29 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Both are positive if at least one is unsigned return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1; }; - /** - * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. - * @function - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater + /** + * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. + * @function + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater */ LongPrototype.comp = LongPrototype.compare; - /** - * Negates this Long's value. - * @returns {!Long} Negated Long + /** + * Negates this Long's value. + * @returns {!Long} Negated Long */ LongPrototype.negate = function negate() { if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE; return this.not().add(ONE); }; - /** - * Negates this Long's value. This is an alias of {@link Long#negate}. - * @function - * @returns {!Long} Negated Long + /** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long */ LongPrototype.neg = LongPrototype.negate; - /** - * Returns the sum of this and the specified Long. - * @param {!Long|number|string} addend Addend - * @returns {!Long} Sum + /** + * Returns the sum of this and the specified Long. + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum */ LongPrototype.add = function add(addend) { if (!isLong(addend)) addend = fromValue(addend); // Divide each number into 4 chunks of 16 bits, and then sum the chunks. @@ -76045,24 +76045,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { c48 &= 0xFFFF; return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned); }; - /** - * Returns the difference of this and the specified Long. - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference + /** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference */ LongPrototype.subtract = function subtract(subtrahend) { if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend); return this.add(subtrahend.neg()); }; - /** - * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. - * @function - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference + /** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference */ LongPrototype.sub = LongPrototype.subtract; - /** - * Returns the product of this and the specified Long. - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product + /** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product */ LongPrototype.multiply = function multiply(multiplier) { if (this.isZero()) return ZERO; if (!isLong(multiplier)) multiplier = fromValue(multiplier); @@ -76108,17 +76108,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { c48 &= 0xFFFF; return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned); }; - /** - * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. - * @function - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product + /** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product */ LongPrototype.mul = LongPrototype.multiply; - /** - * Returns this Long divided by the specified. The result is signed if this Long is signed or - * unsigned if this Long is unsigned. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient + /** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient */ LongPrototype.divide = function divide(divisor) { if (!isLong(divisor)) divisor = fromValue(divisor); if (divisor.isZero()) throw Error("division by zero"); @@ -76183,92 +76183,92 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return res; }; - /** - * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient + /** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient */ LongPrototype.div = LongPrototype.divide; - /** - * Returns this Long modulo the specified. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder + /** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.modulo = function modulo(divisor) { if (!isLong(divisor)) divisor = fromValue(divisor); return this.sub(this.div(divisor).mul(divisor)); }; - /** - * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder + /** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.mod = LongPrototype.modulo; - /** - * Returns the bitwise NOT of this Long. - * @returns {!Long} + /** + * Returns the bitwise NOT of this Long. + * @returns {!Long} */ LongPrototype.not = function not() { return fromBits(~this.low, ~this.high, this.unsigned); }; - /** - * Returns the bitwise AND of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} + /** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.and = function and(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low & other.low, this.high & other.high, this.unsigned); }; - /** - * Returns the bitwise OR of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} + /** + * Returns the bitwise OR of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.or = function or(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low | other.low, this.high | other.high, this.unsigned); }; - /** - * Returns the bitwise XOR of this Long and the given one. - * @param {!Long|number|string} other Other Long - * @returns {!Long} + /** + * Returns the bitwise XOR of this Long and the given one. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.xor = function xor(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); }; - /** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits shifted to the left by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftLeft = function shiftLeft(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); if ((numBits &= 63) === 0) return this; else if (numBits < 32) return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned); else return fromBits(0, this.low << numBits - 32, this.unsigned); }; - /** - * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shl = LongPrototype.shiftLeft; - /** - * Returns this Long with bits arithmetically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftRight = function shiftRight(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); if ((numBits &= 63) === 0) return this; else if (numBits < 32) return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned); else return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned); }; - /** - * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shr = LongPrototype.shiftRight; - /** - * Returns this Long with bits logically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); numBits &= 63; @@ -76282,36 +76282,36 @@ Object.defineProperty(Long.prototype, "__isLong__", { else return fromBits(high >>> numBits - 32, 0, this.unsigned); } }; - /** - * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shru = LongPrototype.shiftRightUnsigned; - /** - * Converts this Long to signed. - * @returns {!Long} Signed long + /** + * Converts this Long to signed. + * @returns {!Long} Signed long */ LongPrototype.toSigned = function toSigned() { if (!this.unsigned) return this; return fromBits(this.low, this.high, false); }; - /** - * Converts this Long to unsigned. - * @returns {!Long} Unsigned long + /** + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long */ LongPrototype.toUnsigned = function toUnsigned() { if (this.unsigned) return this; return fromBits(this.low, this.high, true); }; - /** - * Converts this Long to its byte representation. - * @param {boolean=} le Whether little or big endian, defaults to big endian - * @returns {!Array.} Byte representation + /** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation */ LongPrototype.toBytes = function(le) { return le ? this.toBytesLE() : this.toBytesBE(); }; - /** - * Converts this Long to its little endian byte representation. - * @returns {!Array.} Little endian byte representation + /** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation */ LongPrototype.toBytesLE = function() { var hi = this.high, lo = this.low; return [ @@ -76325,9 +76325,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { hi >>> 24 & 0xff ]; }; - /** - * Converts this Long to its big endian byte representation. - * @returns {!Array.} Big endian byte representation + /** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation */ LongPrototype.toBytesBE = function() { var hi = this.high, lo = this.low; return [ @@ -76347,51 +76347,51 @@ Object.defineProperty(Long.prototype, "__isLong__", { },{}],"5WdJJ":[function(require,module,exports) { (function(globalObject) { "use strict"; - /* - * bignumber.js v9.1.1 - * A JavaScript library for arbitrary-precision arithmetic. - * https://github.com/MikeMcl/bignumber.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licensed. - * - * BigNumber.prototype methods | BigNumber methods - * | - * absoluteValue abs | clone - * comparedTo | config set - * decimalPlaces dp | DECIMAL_PLACES - * dividedBy div | ROUNDING_MODE - * dividedToIntegerBy idiv | EXPONENTIAL_AT - * exponentiatedBy pow | RANGE - * integerValue | CRYPTO - * isEqualTo eq | MODULO_MODE - * isFinite | POW_PRECISION - * isGreaterThan gt | FORMAT - * isGreaterThanOrEqualTo gte | ALPHABET - * isInteger | isBigNumber - * isLessThan lt | maximum max - * isLessThanOrEqualTo lte | minimum min - * isNaN | random - * isNegative | sum - * isPositive | - * isZero | - * minus | - * modulo mod | - * multipliedBy times | - * negated | - * plus | - * precision sd | - * shiftedBy | - * squareRoot sqrt | - * toExponential | - * toFixed | - * toFormat | - * toFraction | - * toJSON | - * toNumber | - * toPrecision | - * toString | - * valueOf | - * + /* + * bignumber.js v9.1.1 + * A JavaScript library for arbitrary-precision arithmetic. + * https://github.com/MikeMcl/bignumber.js + * Copyright (c) 2022 Michael Mclaughlin + * MIT Licensed. + * + * BigNumber.prototype methods | BigNumber methods + * | + * absoluteValue abs | clone + * comparedTo | config set + * decimalPlaces dp | DECIMAL_PLACES + * dividedBy div | ROUNDING_MODE + * dividedToIntegerBy idiv | EXPONENTIAL_AT + * exponentiatedBy pow | RANGE + * integerValue | CRYPTO + * isEqualTo eq | MODULO_MODE + * isFinite | POW_PRECISION + * isGreaterThan gt | FORMAT + * isGreaterThanOrEqualTo gte | ALPHABET + * isInteger | isBigNumber + * isLessThan lt | maximum max + * isLessThanOrEqualTo lte | minimum min + * isNaN | random + * isNegative | sum + * isPositive | + * isZero | + * minus | + * modulo mod | + * multipliedBy times | + * negated | + * plus | + * precision sd | + * shiftedBy | + * squareRoot sqrt | + * toExponential | + * toFixed | + * toFormat | + * toFraction | + * toJSON | + * toNumber | + * toPrecision | + * toString | + * valueOf | + * */ var BigNumber, isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 0x1fffffffffffff, // MAX_INT32 = 0x7fffffff, // 2^31 - 1 POWS_TEN = [ 1, @@ -76412,8 +76412,8 @@ Object.defineProperty(Long.prototype, "__isLong__", { // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and // the arguments to toExponential, toFixed, toFormat, and toPrecision. MAX = 1E9; // 0 to MAX_INT32 - /* - * Create and return a BigNumber constructor. + /* + * Create and return a BigNumber constructor. */ function clone(configObject) { var div, convertBase, parseNumeric, P = BigNumber.prototype = { constructor: BigNumber, @@ -76480,12 +76480,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true; //------------------------------------------------------------------------------------------ // CONSTRUCTOR - /* - * The BigNumber constructor and exported function. - * Create and return a new instance of a BigNumber object. - * - * v {number|string|BigNumber} A numeric value. - * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive. + /* + * The BigNumber constructor and exported function. + * Create and return a new instance of a BigNumber object. + * + * v {number|string|BigNumber} A numeric value. + * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive. */ function BigNumber(v, b) { var alphabet, c, caseChanged, e, i, isNum, len, str, x = this; // Enable constructor call without `new`. @@ -76627,39 +76627,39 @@ Object.defineProperty(Long.prototype, "__isLong__", { BigNumber.ROUND_HALF_CEIL = 7; BigNumber.ROUND_HALF_FLOOR = 8; BigNumber.EUCLID = 9; - /* - * Configure infrequently-changing library-wide settings. - * - * Accept an object with the following optional properties (if the value of a property is - * a number, it must be an integer within the inclusive range stated): - * - * DECIMAL_PLACES {number} 0 to MAX - * ROUNDING_MODE {number} 0 to 8 - * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX] - * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX] - * CRYPTO {boolean} true or false - * MODULO_MODE {number} 0 to 9 - * POW_PRECISION {number} 0 to MAX - * ALPHABET {string} A string of two or more unique characters which does - * not contain '.'. - * FORMAT {object} An object with some of the following properties: - * prefix {string} - * groupSize {number} - * secondaryGroupSize {number} - * groupSeparator {string} - * decimalSeparator {string} - * fractionGroupSize {number} - * fractionGroupSeparator {string} - * suffix {string} - * - * (The values assigned to the above FORMAT object properties are not checked for validity.) - * - * E.g. - * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) - * - * Ignore properties/parameters set to null or undefined, except for ALPHABET. - * - * Return an object with the properties current values. + /* + * Configure infrequently-changing library-wide settings. + * + * Accept an object with the following optional properties (if the value of a property is + * a number, it must be an integer within the inclusive range stated): + * + * DECIMAL_PLACES {number} 0 to MAX + * ROUNDING_MODE {number} 0 to 8 + * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX] + * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX] + * CRYPTO {boolean} true or false + * MODULO_MODE {number} 0 to 9 + * POW_PRECISION {number} 0 to MAX + * ALPHABET {string} A string of two or more unique characters which does + * not contain '.'. + * FORMAT {object} An object with some of the following properties: + * prefix {string} + * groupSize {number} + * secondaryGroupSize {number} + * groupSeparator {string} + * decimalSeparator {string} + * fractionGroupSize {number} + * fractionGroupSeparator {string} + * suffix {string} + * + * (The values assigned to the above FORMAT object properties are not checked for validity.) + * + * E.g. + * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) + * + * Ignore properties/parameters set to null or undefined, except for ALPHABET. + * + * Return an object with the properties current values. */ BigNumber.config = BigNumber.set = function(obj) { var p, v; if (obj != null) { @@ -76778,14 +76778,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { ALPHABET: ALPHABET }; }; - /* - * Return true if v is a BigNumber instance, otherwise return false. - * - * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed. - * - * v {any} - * - * '[BigNumber Error] Invalid BigNumber: {v}' + /* + * Return true if v is a BigNumber instance, otherwise return false. + * + * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed. + * + * v {any} + * + * '[BigNumber Error] Invalid BigNumber: {v}' */ BigNumber.isBigNumber = function(v) { if (!v || v._isBigNumber !== true) return false; if (!BigNumber.DEBUG) return true; @@ -76814,29 +76814,29 @@ Object.defineProperty(Long.prototype, "__isLong__", { } else if (c === null && e === null && (s === null || s === 1 || s === -1)) return true; throw Error(bignumberError + "Invalid BigNumber: " + v); }; - /* - * Return a new BigNumber whose value is the maximum of the arguments. - * - * arguments {number|string|BigNumber} + /* + * Return a new BigNumber whose value is the maximum of the arguments. + * + * arguments {number|string|BigNumber} */ BigNumber.maximum = BigNumber.max = function() { return maxOrMin(arguments, P.lt); }; - /* - * Return a new BigNumber whose value is the minimum of the arguments. - * - * arguments {number|string|BigNumber} + /* + * Return a new BigNumber whose value is the minimum of the arguments. + * + * arguments {number|string|BigNumber} */ BigNumber.minimum = BigNumber.min = function() { return maxOrMin(arguments, P.gt); }; - /* - * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, - * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing - * zeros are produced). - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}' - * '[BigNumber Error] crypto unavailable' + /* + * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, + * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing + * zeros are produced). + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}' + * '[BigNumber Error] crypto unavailable' */ BigNumber.random = function() { var pow2_53 = 0x20000000000000; // Return a 53 bit integer n, where 0 <= n < 9007199254740992. @@ -76935,10 +76935,10 @@ Object.defineProperty(Long.prototype, "__isLong__", { return rand; }; }(); - /* - * Return a BigNumber whose value is the sum of the arguments. - * - * arguments {number|string|BigNumber} + /* + * Return a BigNumber whose value is the sum of the arguments. + * + * arguments {number|string|BigNumber} */ BigNumber.sum = function() { var i = 1, args = arguments, sum = new BigNumber(args[0]); for(; i < args.length;)sum = sum.plus(args[i++]); @@ -76948,10 +76948,10 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Called by BigNumber and BigNumber.prototype.toString. convertBase = function() { var decimal = "0123456789"; - /* - * Convert string of baseIn to an array of numbers of baseOut. - * Eg. toBaseOut('255', 10, 16) returns [15, 15]. - * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5]. + /* + * Convert string of baseIn to an array of numbers of baseOut. + * Eg. toBaseOut('255', 10, 16) returns [15, 15]. + * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5]. */ function toBaseOut(str, baseIn, baseOut, alphabet) { var j, arr = [ 0 @@ -77236,14 +77236,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { return q; }; }(); - /* - * Return a string representing the value of BigNumber n in fixed-point or exponential - * notation rounded to the specified decimal places or significant digits. - * - * n: a BigNumber. - * i: the index of the last digit required (i.e. the digit that may be rounded up). - * rm: the rounding mode. - * id: 1 (toExponential) or 2 (toPrecision). + /* + * Return a string representing the value of BigNumber n in fixed-point or exponential + * notation rounded to the specified decimal places or significant digits. + * + * n: a BigNumber. + * i: the index of the last digit required (i.e. the digit that may be rounded up). + * rm: the rounding mode. + * id: 1 (toExponential) or 2 (toPrecision). */ function format(n, i, rm, id) { var c0, e, ne, len, str; if (rm == null) rm = ROUNDING_MODE; @@ -77299,9 +77299,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return m; } - /* - * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. - * Called by minus, plus and times. + /* + * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. + * Called by minus, plus and times. */ function normalise(n, c, e) { var i = 1, j = c.length; // Remove trailing zeros. @@ -77351,9 +77351,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { x.c = x.e = null; }; }(); - /* - * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. - * If r is truthy, it is known that there are more digits after the rounding digit. + /* + * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. + * If r is truthy, it is known that there are more digits after the rounding digit. */ function round(x, sd, rm, r) { var d, i, j, k, n, ni, rd, xc = x.c, pows10 = POWS_TEN; // if x is not Infinity or NaN... @@ -77468,34 +77468,34 @@ Object.defineProperty(Long.prototype, "__isLong__", { return n.s < 0 ? "-" + str : str; } // PROTOTYPE/INSTANCE METHODS - /* - * Return a new BigNumber whose value is the absolute value of this BigNumber. + /* + * Return a new BigNumber whose value is the absolute value of this BigNumber. */ P.absoluteValue = P.abs = function() { var x = new BigNumber(this); if (x.s < 0) x.s = 1; return x; }; - /* - * Return - * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), - * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), - * 0 if they have the same value, - * or null if the value of either is NaN. + /* + * Return + * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), + * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), + * 0 if they have the same value, + * or null if the value of either is NaN. */ P.comparedTo = function(y, b) { return compare(this, new BigNumber(y, b)); }; - /* - * If dp is undefined or null or true or false, return the number of decimal places of the - * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. - * - * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this - * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or - * ROUNDING_MODE if rm is omitted. - * - * [dp] {number} Decimal places: integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + /* + * If dp is undefined or null or true or false, return the number of decimal places of the + * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. + * + * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * [dp] {number} Decimal places: integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' */ P.decimalPlaces = P.dp = function(dp, rm) { var c, n, v, x = this; if (dp != null) { @@ -77511,48 +77511,48 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (n < 0) n = 0; return n; }; - /* - * n / 0 = I - * n / N = N - * n / I = 0 - * 0 / n = 0 - * 0 / 0 = N - * 0 / N = N - * 0 / I = 0 - * N / n = N - * N / 0 = N - * N / N = N - * N / I = N - * I / n = I - * I / 0 = I - * I / N = N - * I / I = N - * - * Return a new BigNumber whose value is the value of this BigNumber divided by the value of - * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. + /* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N + * + * Return a new BigNumber whose value is the value of this BigNumber divided by the value of + * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. */ P.dividedBy = P.div = function(y, b) { return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE); }; - /* - * Return a new BigNumber whose value is the integer part of dividing the value of this - * BigNumber by the value of BigNumber(y, b). + /* + * Return a new BigNumber whose value is the integer part of dividing the value of this + * BigNumber by the value of BigNumber(y, b). */ P.dividedToIntegerBy = P.idiv = function(y, b) { return div(this, new BigNumber(y, b), 0, 1); }; - /* - * Return a BigNumber whose value is the value of this BigNumber exponentiated by n. - * - * If m is present, return the result modulo m. - * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. - * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE. - * - * The modular power operation works efficiently when x, n, and m are integers, otherwise it - * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0. - * - * n {number|string|BigNumber} The exponent. An integer. - * [m] {number|string|BigNumber} The modulus. - * - * '[BigNumber Error] Exponent not an integer: {n}' + /* + * Return a BigNumber whose value is the value of this BigNumber exponentiated by n. + * + * If m is present, return the result modulo m. + * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. + * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE. + * + * The modular power operation works efficiently when x, n, and m are integers, otherwise it + * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0. + * + * n {number|string|BigNumber} The exponent. An integer. + * [m] {number|string|BigNumber} The modulus. + * + * '[BigNumber Error] Exponent not an integer: {n}' */ P.exponentiatedBy = P.pow = function(n, m) { var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this; n = new BigNumber(n); @@ -77628,98 +77628,98 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (nIsNeg) y = ONE.div(y); return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y; }; - /* - * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer - * using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}' + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer + * using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}' */ P.integerValue = function(rm) { var n = new BigNumber(this); if (rm == null) rm = ROUNDING_MODE; else intCheck(rm, 0, 8); return round(n, n.e + 1, rm); }; - /* - * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), - * otherwise return false. + /* + * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), + * otherwise return false. */ P.isEqualTo = P.eq = function(y, b) { return compare(this, new BigNumber(y, b)) === 0; }; - /* - * Return true if the value of this BigNumber is a finite number, otherwise return false. + /* + * Return true if the value of this BigNumber is a finite number, otherwise return false. */ P.isFinite = function() { return !!this.c; }; - /* - * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), - * otherwise return false. + /* + * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), + * otherwise return false. */ P.isGreaterThan = P.gt = function(y, b) { return compare(this, new BigNumber(y, b)) > 0; }; - /* - * Return true if the value of this BigNumber is greater than or equal to the value of - * BigNumber(y, b), otherwise return false. + /* + * Return true if the value of this BigNumber is greater than or equal to the value of + * BigNumber(y, b), otherwise return false. */ P.isGreaterThanOrEqualTo = P.gte = function(y, b) { return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0; }; - /* - * Return true if the value of this BigNumber is an integer, otherwise return false. + /* + * Return true if the value of this BigNumber is an integer, otherwise return false. */ P.isInteger = function() { return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2; }; - /* - * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), - * otherwise return false. + /* + * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), + * otherwise return false. */ P.isLessThan = P.lt = function(y, b) { return compare(this, new BigNumber(y, b)) < 0; }; - /* - * Return true if the value of this BigNumber is less than or equal to the value of - * BigNumber(y, b), otherwise return false. + /* + * Return true if the value of this BigNumber is less than or equal to the value of + * BigNumber(y, b), otherwise return false. */ P.isLessThanOrEqualTo = P.lte = function(y, b) { return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0; }; - /* - * Return true if the value of this BigNumber is NaN, otherwise return false. + /* + * Return true if the value of this BigNumber is NaN, otherwise return false. */ P.isNaN = function() { return !this.s; }; - /* - * Return true if the value of this BigNumber is negative, otherwise return false. + /* + * Return true if the value of this BigNumber is negative, otherwise return false. */ P.isNegative = function() { return this.s < 0; }; - /* - * Return true if the value of this BigNumber is positive, otherwise return false. + /* + * Return true if the value of this BigNumber is positive, otherwise return false. */ P.isPositive = function() { return this.s > 0; }; - /* - * Return true if the value of this BigNumber is 0 or -0, otherwise return false. + /* + * Return true if the value of this BigNumber is 0 or -0, otherwise return false. */ P.isZero = function() { return !!this.c && this.c[0] == 0; }; - /* - * n - 0 = n - * n - N = N - * n - I = -I - * 0 - n = -n - * 0 - 0 = 0 - * 0 - N = N - * 0 - I = -I - * N - n = N - * N - 0 = N - * N - N = N - * N - I = N - * I - n = I - * I - 0 = I - * I - N = N - * I - I = N - * - * Return a new BigNumber whose value is the value of this BigNumber minus the value of - * BigNumber(y, b). + /* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N + * + * Return a new BigNumber whose value is the value of this BigNumber minus the value of + * BigNumber(y, b). */ P.minus = function(y, b) { var i, j, t, xLTy, x = this, a = x.s; y = new BigNumber(y, b); @@ -77801,26 +77801,26 @@ Object.defineProperty(Long.prototype, "__isLong__", { // for finite x and y. return normalise(y, xc, ye); }; - /* - * n % 0 = N - * n % N = N - * n % I = n - * 0 % n = 0 - * -0 % n = -0 - * 0 % 0 = N - * 0 % N = N - * 0 % I = 0 - * N % n = N - * N % 0 = N - * N % N = N - * N % I = N - * I % n = N - * I % 0 = N - * I % N = N - * I % I = N - * - * Return a new BigNumber whose value is the value of this BigNumber modulo the value of - * BigNumber(y, b). The result depends on the value of MODULO_MODE. + /* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N + * + * Return a new BigNumber whose value is the value of this BigNumber modulo the value of + * BigNumber(y, b). The result depends on the value of MODULO_MODE. */ P.modulo = P.mod = function(y, b) { var q, s, x = this; y = new BigNumber(y, b); @@ -77841,25 +77841,25 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (!y.c[0] && MODULO_MODE == 1) y.s = x.s; return y; }; - /* - * n * 0 = 0 - * n * N = N - * n * I = I - * 0 * n = 0 - * 0 * 0 = 0 - * 0 * N = N - * 0 * I = N - * N * n = N - * N * 0 = N - * N * N = N - * N * I = N - * I * n = I - * I * 0 = N - * I * N = N - * I * I = I - * - * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value - * of BigNumber(y, b). + /* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I + * + * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value + * of BigNumber(y, b). */ P.multipliedBy = P.times = function(y, b) { var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber(y, b)).c; // Either NaN, ±Infinity or ±0? @@ -77914,33 +77914,33 @@ Object.defineProperty(Long.prototype, "__isLong__", { else zc.splice(0, 1); return normalise(y, zc, e); }; - /* - * Return a new BigNumber whose value is the value of this BigNumber negated, - * i.e. multiplied by -1. + /* + * Return a new BigNumber whose value is the value of this BigNumber negated, + * i.e. multiplied by -1. */ P.negated = function() { var x = new BigNumber(this); x.s = -x.s || null; return x; }; - /* - * n + 0 = n - * n + N = N - * n + I = I - * 0 + n = n - * 0 + 0 = 0 - * 0 + N = N - * 0 + I = I - * N + n = N - * N + 0 = N - * N + N = N - * N + I = N - * I + n = I - * I + 0 = I - * I + N = N - * I + I = I - * - * Return a new BigNumber whose value is the value of this BigNumber plus the value of - * BigNumber(y, b). + /* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I + * + * Return a new BigNumber whose value is the value of this BigNumber plus the value of + * BigNumber(y, b). */ P.plus = function(y, b) { var t, x = this, a = x.s; y = new BigNumber(y, b); @@ -78000,20 +78000,20 @@ Object.defineProperty(Long.prototype, "__isLong__", { // ye = MAX_EXP + 1 possible return normalise(y, xc, ye); }; - /* - * If sd is undefined or null or true or false, return the number of significant digits of - * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. - * If sd is true include integer-part trailing zeros in the count. - * - * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this - * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or - * ROUNDING_MODE if rm is omitted. - * - * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive. - * boolean: whether to count integer-part trailing zeros: true or false. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + /* + * If sd is undefined or null or true or false, return the number of significant digits of + * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. + * If sd is true include integer-part trailing zeros in the count. + * + * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive. + * boolean: whether to count integer-part trailing zeros: true or false. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' */ P.precision = P.sd = function(sd, rm) { var c, n, v, x = this; if (sd != null && sd !== !!sd) { @@ -78034,27 +78034,27 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (sd && x.e + 1 > n) n = x.e + 1; return n; }; - /* - * Return a new BigNumber whose value is the value of this BigNumber shifted by k places - * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. - * - * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}' + /* + * Return a new BigNumber whose value is the value of this BigNumber shifted by k places + * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. + * + * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}' */ P.shiftedBy = function(k) { intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER); return this.times("1e" + k); }; - /* - * sqrt(-n) = N - * sqrt(N) = N - * sqrt(-I) = N - * sqrt(I) = I - * sqrt(0) = 0 - * sqrt(-0) = -0 - * - * Return a new BigNumber whose value is the square root of the value of this BigNumber, - * rounded according to DECIMAL_PLACES and ROUNDING_MODE. + /* + * sqrt(-n) = N + * sqrt(N) = N + * sqrt(-I) = N + * sqrt(I) = I + * sqrt(0) = 0 + * sqrt(-0) = -0 + * + * Return a new BigNumber whose value is the square root of the value of this BigNumber, + * rounded according to DECIMAL_PLACES and ROUNDING_MODE. */ P.squareRoot = P.sqrt = function() { var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber("0.5"); // Negative/NaN/Infinity/zero? @@ -78124,14 +78124,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m); }; - /* - * Return a string representing the value of this BigNumber in exponential notation and - * rounded using ROUNDING_MODE to dp fixed decimal places. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + /* + * Return a string representing the value of this BigNumber in exponential notation and + * rounded using ROUNDING_MODE to dp fixed decimal places. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' */ P.toExponential = function(dp, rm) { if (dp != null) { intCheck(dp, 0, MAX); @@ -78139,17 +78139,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return format(this, dp, rm, 1); }; - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounding - * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', - * but e.g. (-0.00001).toFixed(0) is '-0'. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounding + * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', + * but e.g. (-0.00001).toFixed(0) is '-0'. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' */ P.toFixed = function(dp, rm) { if (dp != null) { intCheck(dp, 0, MAX); @@ -78157,30 +78157,30 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return format(this, dp, rm); }; - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounded - * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties - * of the format or FORMAT object (see BigNumber.set). - * - * The formatting object may contain some or all of the properties shown below. - * - * FORMAT = { - * prefix: '', - * groupSize: 3, - * secondaryGroupSize: 0, - * groupSeparator: ',', - * decimalSeparator: '.', - * fractionGroupSize: 0, - * fractionGroupSeparator: '\xA0', // non-breaking space - * suffix: '' - * }; - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * [format] {object} Formatting options. See FORMAT pbject above. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' - * '[BigNumber Error] Argument not an object: {format}' + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounded + * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties + * of the format or FORMAT object (see BigNumber.set). + * + * The formatting object may contain some or all of the properties shown below. + * + * FORMAT = { + * prefix: '', + * groupSize: 3, + * secondaryGroupSize: 0, + * groupSeparator: ',', + * decimalSeparator: '.', + * fractionGroupSize: 0, + * fractionGroupSeparator: '\xA0', // non-breaking space + * suffix: '' + * }; + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * [format] {object} Formatting options. See FORMAT pbject above. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + * '[BigNumber Error] Argument not an object: {format}' */ P.toFormat = function(dp, rm, format) { var str, x = this; if (format == null) { @@ -78212,16 +78212,16 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return (format.prefix || "") + str + (format.suffix || ""); }; - /* - * Return an array of two BigNumbers representing the value of this BigNumber as a simple - * fraction with an integer numerator and an integer denominator. - * The denominator will be a positive non-zero value less than or equal to the specified - * maximum denominator. If a maximum denominator is not specified, the denominator will be - * the lowest value necessary to represent the number exactly. - * - * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator. - * - * '[BigNumber Error] Argument {not an integer|out of range} : {md}' + /* + * Return an array of two BigNumbers representing the value of this BigNumber as a simple + * fraction with an integer numerator and an integer denominator. + * The denominator will be a positive non-zero value less than or equal to the specified + * maximum denominator. If a maximum denominator is not specified, the denominator will be + * the lowest value necessary to represent the number exactly. + * + * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator. + * + * '[BigNumber Error] Argument {not an integer|out of range} : {md}' */ P.toFraction = function(md) { var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, x = this, xc = x.c; if (md != null) { @@ -78271,35 +78271,35 @@ Object.defineProperty(Long.prototype, "__isLong__", { MAX_EXP = exp; return r; }; - /* - * Return the value of this BigNumber converted to a number primitive. + /* + * Return the value of this BigNumber converted to a number primitive. */ P.toNumber = function() { return +valueOf(this); }; - /* - * Return a string representing the value of this BigNumber rounded to sd significant digits - * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits - * necessary to represent the integer part of the value in fixed-point notation, then use - * exponential notation. - * - * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + /* + * Return a string representing the value of this BigNumber rounded to sd significant digits + * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits + * necessary to represent the integer part of the value in fixed-point notation, then use + * exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' */ P.toPrecision = function(sd, rm) { if (sd != null) intCheck(sd, 1, MAX); return format(this, sd, rm, 2); }; - /* - * Return a string representing the value of this BigNumber in base b, or base 10 if b is - * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and - * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent - * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than - * TO_EXP_NEG, return exponential notation. - * - * [b] {number} Integer, 2 to ALPHABET.length inclusive. - * - * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' + /* + * Return a string representing the value of this BigNumber in base b, or base 10 if b is + * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and + * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent + * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than + * TO_EXP_NEG, return exponential notation. + * + * [b] {number} Integer, 2 to ALPHABET.length inclusive. + * + * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' */ P.toString = function(b) { var str, n = this, s = n.s, e = n.e; // Infinity or NaN? @@ -78321,9 +78321,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return str; }; - /* - * Return as toString, but do not accept a base argument, and include the minus sign for - * negative zero. + /* + * Return as toString, but do not accept a base argument, and include the minus sign for + * negative zero. */ P.valueOf = P.toJSON = function() { return valueOf(this); }; @@ -78374,8 +78374,8 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Compare lengths. return k == l ? 0 : k > l ^ a ? 1 : -1; } - /* - * Check that n is a primitive number, an integer, and in range, otherwise throw. + /* + * Check that n is a primitive number, an integer, and in range, otherwise throw. */ function intCheck(n, min, max, name) { if (n < min || n > max || n !== mathfloor(n)) throw Error(bignumberError + (name || "Argument") + (typeof n == "number" ? n < min || n > max ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(n)); } @@ -85075,7 +85075,7 @@ var $replace = bind.call(Function.call, String.prototype.replace); var $strSlice = bind.call(Function.call, String.prototype.slice); var $exec = bind.call(Function.call, RegExp.prototype.exec); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ var stringToPath = function stringToPath(string) { var first = $strSlice(string, 0, 1); var last = $strSlice(string, -1); @@ -85445,7 +85445,7 @@ var ddaClass2 = "[object HTML document.all class]"; var ddaClass3 = "[object HTMLCollection]"; // IE 9-10 var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag; // better: use `has-tostringtag` var isIE68 = !(0 in [ - , + , ]); // eslint-disable-line no-sparse-arrays, comma-spacing var isDDA = function isDocumentDotAll() { return false; @@ -103241,19 +103241,19 @@ function _interopDefaultLegacy(e) { var transport__default = /*#__PURE__*/ _interopDefaultLegacy(transport); var axios__default = /*#__PURE__*/ _interopDefaultLegacy(axios); var secureJSON__default = /*#__PURE__*/ _interopDefaultLegacy(secureJSON); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -103590,19 +103590,19 @@ function _interopDefaultLegacy(e) { } var transport__default = /*#__PURE__*/ _interopDefaultLegacy(transport); var ByteBuffer__default = /*#__PURE__*/ _interopDefaultLegacy(ByteBuffer); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -103818,19 +103818,19 @@ function _interopDefaultLegacy(e) { }; } var transport__default = /*#__PURE__*/ _interopDefaultLegacy(transport); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { diff --git a/packages/connect-examples/native-ios-example/web/web_dist/index.e70e0048.js b/packages/connect-examples/native-ios-example/web/web_dist/index.e70e0048.js index a138b81a5..627c86d5f 100644 --- a/packages/connect-examples/native-ios-example/web/web_dist/index.e70e0048.js +++ b/packages/connect-examples/native-ios-example/web/web_dist/index.e70e0048.js @@ -2409,19 +2409,19 @@ var HardwareSdk__default = /*#__PURE__*/ _interopDefaultLegacy(HardwareSdk); var HttpTransport__default = /*#__PURE__*/ _interopDefaultLegacy(HttpTransport); var LowlevelTransport__default = /*#__PURE__*/ _interopDefaultLegacy(LowlevelTransport); var EmulatorTransport__default = /*#__PURE__*/ _interopDefaultLegacy(EmulatorTransport); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var __assign = function() { __assign = Object.assign || function __assign(t) { for(var s, i = 1, n = arguments.length; i < n; i++){ @@ -2986,7 +2986,7 @@ function postMessage(message, usePromise) { case 2: _core.handleMessage(message); return [ - 2 /*return*/ + 2 /*return*/ ]; } }); @@ -3034,7 +3034,7 @@ var init = function(settings, _, plugin) { ]; case 4: return [ - 2 /*return*/ + 2 /*return*/ ]; } }); @@ -3092,7 +3092,7 @@ var call = function(params) { ]; case 4: return [ - 2 /*return*/ + 2 /*return*/ ]; } }); @@ -3151,19 +3151,19 @@ var axios__default = /*#__PURE__*/ _interopDefaultLegacy(axios); var ByteBuffer__default = /*#__PURE__*/ _interopDefaultLegacy(ByteBuffer); var BigNumber__default = /*#__PURE__*/ _interopDefaultLegacy(BigNumber); var JSZip__default = /*#__PURE__*/ _interopDefaultLegacy(JSZip); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __rest(s, e) { var t = {}; for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; @@ -28629,16 +28629,16 @@ const getFirmwareUpdateField = ({ features, updateType, targetVersion })=>{ const deviceType = getDeviceType(features); const deviceFirmwareVersion = getDeviceFirmwareVersion(features); if (updateType === "ble") return "ble"; - if (DeviceModelToTypes.model_mini.includes(deviceType)) return "firmware-v7"; + if (DeviceModelToTypes.model_mini.includes(deviceType)) return "firmware-v8"; if (deviceType === hdShared.EDeviceType.Touch) { if (targetVersion) { if (semver__default["default"].eq(targetVersion, "4.0.0")) return "firmware-v2"; - if (semver__default["default"].gt(targetVersion, "4.0.0")) return "firmware-v7"; + if (semver__default["default"].gt(targetVersion, "4.0.0")) return "firmware-v8"; } if (semver__default["default"].lt(deviceFirmwareVersion.join("."), "3.4.0")) return "firmware"; - return "firmware-v7"; + return "firmware-v8"; } - if (deviceType === hdShared.EDeviceType.Pro) return "firmware-v7"; + if (deviceType === hdShared.EDeviceType.Pro) return "firmware-v8"; return "firmware"; }; const getFirmwareUpdateFieldArray = (features, updateType)=>{ @@ -28647,12 +28647,12 @@ const getFirmwareUpdateFieldArray = (features, updateType)=>{ "ble" ]; if (deviceType === "classic" || deviceType === "classic1s" || deviceType === "mini" || deviceType === "classicpure") return [ - "firmware-v7" + "firmware-v8" ]; if (deviceType === "touch") { const currentVersion = getDeviceFirmwareVersion(features).join("."); if (semver__default["default"].gt(currentVersion, "4.0.0")) return [ - "firmware-v7", + "firmware-v8", "firmware" ]; if (semver__default["default"].gte(currentVersion, "4.0.0")) return [ @@ -28660,7 +28660,7 @@ const getFirmwareUpdateFieldArray = (features, updateType)=>{ "firmware" ]; if (!currentVersion || semver__default["default"].lt(currentVersion, "3.0.0")) return [ - "firmware-v7", + "firmware-v8", "firmware-v2", "firmware" ]; @@ -28669,7 +28669,7 @@ const getFirmwareUpdateFieldArray = (features, updateType)=>{ ]; } if (deviceType === "pro") return [ - "firmware-v7" + "firmware-v8" ]; return [ "firmware" @@ -46766,19 +46766,19 @@ const isOnekeyDevice = (name, id)=>{ if (name && re.exec(name)) return true; return false; }; -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -64776,19 +64776,19 @@ function _interopNamespace(e) { var protobuf__namespace = /*#__PURE__*/ _interopNamespace(protobuf); var Long__namespace = /*#__PURE__*/ _interopNamespace(Long); var ByteBuffer__default = /*#__PURE__*/ _interopDefaultLegacy(ByteBuffer); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __rest(s, e) { var t = {}; for(var p in s)if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; @@ -66498,20 +66498,20 @@ util._configure = function() { },{"217e30ba36d0c075":"ihGsB","140216d783bbc015":"2nsq5","78776c045df9e77b":"2My7D","392006759dba32fb":"jra39","ac14d008f0aa6436":"86QKD","298ebb5f36c5d25a":"PxlFH","dc7a35661f9f9275":"3yUvf","94b513d9f4cac968":"anW8P"}],"ihGsB":[function(require,module,exports) { "use strict"; module.exports = asPromise; -/** - * Callback as used by {@link util.asPromise}. - * @typedef asPromiseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {...*} params Additional arguments - * @returns {undefined} - */ /** - * Returns a promise from a node-style callback function. - * @memberof util - * @param {asPromiseCallback} fn Function to call - * @param {*} ctx Function context - * @param {...*} params Function arguments - * @returns {Promise<*>} Promisified function +/** + * Callback as used by {@link util.asPromise}. + * @typedef asPromiseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {...*} params Additional arguments + * @returns {undefined} + */ /** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function */ function asPromise(fn, ctx /*, varargs */ ) { var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true; while(index < arguments.length)params[offset++] = arguments[index++]; @@ -66540,15 +66540,15 @@ module.exports = asPromise; },{}],"2nsq5":[function(require,module,exports) { "use strict"; -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace */ var base64 = exports; -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length */ base64.length = function length(string) { var p = string.length; if (!p) return 0; @@ -66562,12 +66562,12 @@ var b64 = new Array(64); var s64 = new Array(123); // 65..90, 97..122, 48..57, 43, 47 for(var i = 0; i < 64;)s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string */ base64.encode = function encode(buffer, start, end) { var parts = null, chunk = []; var i = 0, j = 0, t; // temporary @@ -66607,13 +66607,13 @@ for(var i = 0; i < 64;)s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? return String.fromCharCode.apply(String, chunk.slice(0, i)); }; var invalidEncoding = "invalid encoding"; -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid */ base64.decode = function decode(string, buffer, offset) { var start = offset; var j = 0, t; // temporary @@ -66645,10 +66645,10 @@ var invalidEncoding = "invalid encoding"; if (j === 1) throw Error(invalidEncoding); return offset - start; }; -/** - * Tests if the specified string appears to be base64 encoded. - * @param {string} string String to test - * @returns {boolean} `true` if probably base64 encoded, otherwise false +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false */ base64.test = function test(string) { return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); }; @@ -66656,24 +66656,24 @@ var invalidEncoding = "invalid encoding"; },{}],"2My7D":[function(require,module,exports) { "use strict"; module.exports = EventEmitter; -/** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor */ function EventEmitter() { - /** - * Registered listeners. - * @type {Object.} - * @private + /** + * Registered listeners. + * @type {Object.} + * @private */ this._listeners = {}; } -/** - * Registers an event listener. - * @param {string} evt Event name - * @param {function} fn Listener - * @param {*} [ctx] Listener context - * @returns {util.EventEmitter} `this` +/** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` */ EventEmitter.prototype.on = function on(evt, fn, ctx) { (this._listeners[evt] || (this._listeners[evt] = [])).push({ fn: fn, @@ -66681,11 +66681,11 @@ module.exports = EventEmitter; }); return this; }; -/** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param {string} [evt] Event name. Removes all listeners if omitted. - * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns {util.EventEmitter} `this` +/** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` */ EventEmitter.prototype.off = function off(evt, fn) { if (evt === undefined) this._listeners = {}; else if (fn === undefined) this._listeners[evt] = []; @@ -66696,11 +66696,11 @@ module.exports = EventEmitter; } return this; }; -/** - * Emits an event by calling its listeners with the specified arguments. - * @param {string} evt Event name - * @param {...*} args Arguments - * @returns {util.EventEmitter} `this` +/** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` */ EventEmitter.prototype.emit = function emit(evt) { var listeners = this._listeners[evt]; if (listeners) { @@ -66714,70 +66714,70 @@ module.exports = EventEmitter; },{}],"jra39":[function(require,module,exports) { "use strict"; module.exports = factory(factory); -/** - * Reads / writes floats / doubles from / to buffers. - * @name util.float - * @namespace - */ /** - * Writes a 32 bit float to a buffer using little endian byte order. - * @name util.float.writeFloatLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ /** - * Writes a 32 bit float to a buffer using big endian byte order. - * @name util.float.writeFloatBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ /** - * Reads a 32 bit float from a buffer using little endian byte order. - * @name util.float.readFloatLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ /** - * Reads a 32 bit float from a buffer using big endian byte order. - * @name util.float.readFloatBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ /** - * Writes a 64 bit double to a buffer using little endian byte order. - * @name util.float.writeDoubleLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ /** - * Writes a 64 bit double to a buffer using big endian byte order. - * @name util.float.writeDoubleBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ /** - * Reads a 64 bit double from a buffer using little endian byte order. - * @name util.float.readDoubleLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ /** - * Reads a 64 bit double from a buffer using big endian byte order. - * @name util.float.readDoubleBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read +/** + * Reads / writes floats / doubles from / to buffers. + * @name util.float + * @namespace + */ /** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name util.float.writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ /** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name util.float.writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ /** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name util.float.readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ /** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name util.float.readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ /** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name util.float.writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ /** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name util.float.writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ /** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name util.float.readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ /** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name util.float.readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read */ // Factory function for the purpose of node-based testing in modified global environments function factory(exports) { // float: typed array @@ -66961,11 +66961,11 @@ function readUintBE(buf, pos) { },{}],"86QKD":[function(require,module,exports) { "use strict"; module.exports = inquire; -/** - * Requires a module only if available. - * @memberof util - * @param {string} moduleName Module to require - * @returns {?Object} Required module if available and not empty, otherwise `null` +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` */ function inquire(moduleName) { try { var mod = eval("quire".replace(/^/, "re"))(moduleName); // eslint-disable-line no-eval @@ -66976,15 +66976,15 @@ module.exports = inquire; },{}],"PxlFH":[function(require,module,exports) { "use strict"; -/** - * A minimal UTF8 implementation for number arrays. - * @memberof util - * @namespace +/** + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace */ var utf8 = exports; -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length */ utf8.length = function utf8_length(string) { var len = 0, c = 0; for(var i = 0; i < string.length; ++i){ @@ -66998,12 +66998,12 @@ module.exports = inquire; } return len; }; -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read */ utf8.read = function utf8_read(buffer, start, end) { var len = end - start; if (len < 1) return ""; @@ -67028,12 +67028,12 @@ module.exports = inquire; } return String.fromCharCode.apply(String, chunk.slice(0, i)); }; -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written */ utf8.write = function utf8_write(string, buffer, offset) { var start = offset, c1, c2; // character 2 for(var i = 0; i < string.length; ++i){ @@ -67061,28 +67061,28 @@ module.exports = inquire; },{}],"3yUvf":[function(require,module,exports) { "use strict"; module.exports = pool; -/** - * An allocator as used by {@link util.pool}. - * @typedef PoolAllocator - * @type {function} - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ /** - * A slicer as used by {@link util.pool}. - * @typedef PoolSlicer - * @type {function} - * @param {number} start Start offset - * @param {number} end End offset - * @returns {Uint8Array} Buffer slice - * @this {Uint8Array} - */ /** - * A general purpose buffer pool. - * @memberof util - * @function - * @param {PoolAllocator} alloc Allocator - * @param {PoolSlicer} slice Slicer - * @param {number} [size=8192] Slab size - * @returns {PoolAllocator} Pooled allocator +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ /** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ /** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator */ function pool(alloc, slice, size) { var SIZE = size || 8192; var MAX = SIZE >>> 1; @@ -67768,7 +67768,7 @@ module.exports = {}; /** * * // in any subsequent module: * var root = protobuf.roots["myroot"]; - */ + */ },{}],"14FRe":[function(require,module,exports) { "use strict"; @@ -68310,26 +68310,26 @@ var decorateEnumIndex = 0; },{"d625e6ce5bbdc11f":"k72f7","c15440adb779afca":"8v4Te","d73a73fb03f0fac1":"cqpPo","aac844e7d23ccc04":"jjh6B","187b53cc127fbbd9":"cZV5i","745a8def28374fa4":"9Fupb","82074a4051f1e565":"9srcK","bbfb7b48a94ffbf2":"heZNO"}],"cqpPo":[function(require,module,exports) { "use strict"; module.exports = codegen; -/** - * Begins generating a function. - * @memberof util - * @param {string[]} functionParams Function parameter names - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body +/** + * Begins generating a function. + * @memberof util + * @param {string[]} functionParams Function parameter names + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body */ function codegen(functionParams, functionName) { /* istanbul ignore if */ if (typeof functionParams === "string") { functionName = functionParams; functionParams = undefined; } var body = []; - /** - * Appends code to the function's body or finishes generation. - * @typedef Codegen - * @type {function} - * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any - * @param {...*} [formatParams] Format parameters - * @returns {Codegen|Function} Itself or the generated function if finished - * @throws {Error} If format parameter counts do not match + /** + * Appends code to the function's body or finishes generation. + * @typedef Codegen + * @type {function} + * @param {string|Object.} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any + * @param {...*} [formatParams] Format parameters + * @returns {Codegen|Function} Itself or the generated function if finished + * @throws {Error} If format parameter counts do not match */ function Codegen(formatStringOrScope) { // note that explicit array handling below makes this ~50% faster // finish the function @@ -68377,17 +68377,17 @@ module.exports = codegen; Codegen.toString = toString; return Codegen; } -/** - * Begins generating a function. - * @memberof util - * @function codegen - * @param {string} [functionName] Function name if not anonymous - * @returns {Codegen} Appender that appends code to the function's body - * @variation 2 - */ /** - * When set to `true`, codegen will log generated code to console. Useful for debugging. - * @name util.codegen.verbose - * @type {boolean} +/** + * Begins generating a function. + * @memberof util + * @function codegen + * @param {string} [functionName] Function name if not anonymous + * @returns {Codegen} Appender that appends code to the function's body + * @variation 2 + */ /** + * When set to `true`, codegen will log generated code to console. Useful for debugging. + * @name util.codegen.verbose + * @type {boolean} */ codegen.verbose = false; },{}],"jjh6B":[function(require,module,exports) { @@ -68395,26 +68395,26 @@ module.exports = codegen; module.exports = fetch; var asPromise = require("9c66e50465984bbe"), inquire = require("c3a4c338701eb665"); var fs = inquire("fs"); -/** - * Node-style callback as used by {@link util.fetch}. - * @typedef FetchCallback - * @type {function} - * @param {?Error} error Error, if any, otherwise `null` - * @param {string} [contents] File contents, if there hasn't been an error - * @returns {undefined} - */ /** - * Options as used by {@link util.fetch}. - * @typedef FetchOptions - * @type {Object} - * @property {boolean} [binary=false] Whether expecting a binary response - * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest - */ /** - * Fetches the contents of a file. - * @memberof util - * @param {string} filename File path or url - * @param {FetchOptions} options Fetch options - * @param {FetchCallback} callback Callback function - * @returns {undefined} +/** + * Node-style callback as used by {@link util.fetch}. + * @typedef FetchCallback + * @type {function} + * @param {?Error} error Error, if any, otherwise `null` + * @param {string} [contents] File contents, if there hasn't been an error + * @returns {undefined} + */ /** + * Options as used by {@link util.fetch}. + * @typedef FetchOptions + * @type {Object} + * @property {boolean} [binary=false] Whether expecting a binary response + * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest + */ /** + * Fetches the contents of a file. + * @memberof util + * @param {string} filename File path or url + * @param {FetchOptions} options Fetch options + * @param {FetchCallback} callback Callback function + * @returns {undefined} */ function fetch(filename, options, callback) { if (typeof options === "function") { callback = options; @@ -68428,22 +68428,22 @@ var fs = inquire("fs"); // use the XHR version otherwise. return fetch.xhr(filename, options, callback); } -/** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {FetchCallback} callback Callback function - * @returns {undefined} - * @variation 2 - */ /** - * Fetches the contents of a file. - * @name util.fetch - * @function - * @param {string} path File path or url - * @param {FetchOptions} [options] Fetch options - * @returns {Promise} Promise - * @variation 3 +/** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchCallback} callback Callback function + * @returns {undefined} + * @variation 2 + */ /** + * Fetches the contents of a file. + * @name util.fetch + * @function + * @param {string} path File path or url + * @param {FetchOptions} [options] Fetch options + * @returns {Promise} Promise + * @variation 3 */ /**/ fetch.xhr = function fetch_xhr(filename, options, callback) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() { @@ -68475,22 +68475,22 @@ var fs = inquire("fs"); },{"9c66e50465984bbe":"ihGsB","c3a4c338701eb665":"86QKD"}],"cZV5i":[function(require,module,exports) { "use strict"; -/** - * A minimal path module to resolve Unix, Windows and URL paths alike. - * @memberof util - * @namespace +/** + * A minimal path module to resolve Unix, Windows and URL paths alike. + * @memberof util + * @namespace */ var path = exports; -var isAbsolute = /** - * Tests if the specified path is absolute. - * @param {string} path Path to test - * @returns {boolean} `true` if path is absolute +var isAbsolute = /** + * Tests if the specified path is absolute. + * @param {string} path Path to test + * @returns {boolean} `true` if path is absolute */ path.isAbsolute = function isAbsolute(path) { return /^(?:\/|\w+:)/.test(path); }; -var normalize = /** - * Normalizes the specified path. - * @param {string} path Path to normalize - * @returns {string} Normalized path +var normalize = /** + * Normalizes the specified path. + * @param {string} path Path to normalize + * @returns {string} Normalized path */ path.normalize = function normalize(path) { path = path.replace(/\\/g, "/").replace(/\/{2,}/g, "/"); var parts = path.split("/"), absolute = isAbsolute(path), prefix = ""; @@ -68505,12 +68505,12 @@ var normalize = /** } return prefix + parts.join("/"); }; -/** - * Resolves the specified include path against the specified origin path. - * @param {string} originPath Path to the origin file - * @param {string} includePath Include path relative to origin path - * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized - * @returns {string} Path to the include file +/** + * Resolves the specified include path against the specified origin path. + * @param {string} originPath Path to the origin file + * @param {string} includePath Include path relative to origin path + * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized + * @returns {string} Path to the include file */ path.resolve = function resolve(originPath, includePath, alreadyNormalized) { if (!alreadyNormalized) includePath = normalize(includePath); if (isAbsolute(includePath)) return includePath; @@ -70344,7 +70344,7 @@ var util = require("265369b258276eba"); * @returns {Object.} JSON object */ Message.prototype.toJSON = function toJSON() { return this.$type.toObject(this, util.toJSONOptions); -}; /*eslint-enable valid-jsdoc*/ +}; /*eslint-enable valid-jsdoc*/ },{"265369b258276eba":"k72f7"}],"5dWn6":[function(require,module,exports) { "use strict"; @@ -71061,8 +71061,8 @@ Root._configure = function(Type_, parse_, common_) { },{"19f025d92e764083":"4idoA","e8ac8603d5e26cc0":"12Nu0","93a82a214a2b2853":"9srcK","bab7b74b9c10d745":"9U2iM","190170fae0946a3e":"9qDrQ"}],"djJSk":[function(require,module,exports) { module.exports = Long; -/** - * wasm optimizations, to do native i64 multiplication and divide +/** + * wasm optimizations, to do native i64 multiplication and divide */ var wasm = null; try { wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([ @@ -71356,27 +71356,27 @@ try { } catch (e) { // no wasm support :( } -/** - * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. - * See the from* functions below for more convenient ways of constructing Longs. - * @exports Long - * @class A Long class for representing a 64 bit two's-complement integer value. - * @param {number} low The low (signed) 32 bits of the long - * @param {number} high The high (signed) 32 bits of the long - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @constructor +/** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @constructor */ function Long(low, high, unsigned) { - /** - * The low 32 bits as a signed value. - * @type {number} + /** + * The low 32 bits as a signed value. + * @type {number} */ this.low = low | 0; - /** - * The high 32 bits as a signed value. - * @type {number} + /** + * The high 32 bits as a signed value. + * @type {number} */ this.high = high | 0; - /** - * Whether unsigned or not. - * @type {boolean} + /** + * Whether unsigned or not. + * @type {boolean} */ this.unsigned = !!unsigned; } // The internal representation of a long is the two given signed, 32-bit values. @@ -71395,44 +71395,44 @@ try { // // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* // methods on which they depend. -/** - * An indicator used to reliably determine if an object is a Long or not. - * @type {boolean} - * @const - * @private +/** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private */ Long.prototype.__isLong__; Object.defineProperty(Long.prototype, "__isLong__", { value: true }); -/** - * @function - * @param {*} obj Object - * @returns {boolean} - * @inner +/** + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner */ function isLong(obj) { return (obj && obj["__isLong__"]) === true; } -/** - * Tests if the specified object is a Long. - * @function - * @param {*} obj Object - * @returns {boolean} +/** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} */ Long.isLong = isLong; -/** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @inner +/** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner */ var INT_CACHE = {}; -/** - * A cache of the Long representations of small unsigned integer values. - * @type {!Object} - * @inner +/** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner */ var UINT_CACHE = {}; -/** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner +/** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromInt(value, unsigned) { var obj, cachedObj, cache; if (unsigned) { @@ -71455,18 +71455,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { return obj; } } -/** - * Returns a Long representing the given 32 bit integer value. - * @function - * @param {number} value The 32 bit integer in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} The corresponding Long value +/** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} The corresponding Long value */ Long.fromInt = fromInt; -/** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner +/** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromNumber(value, unsigned) { if (isNaN(value)) return unsigned ? UZERO : ZERO; if (unsigned) { @@ -71479,44 +71479,44 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (value < 0) return fromNumber(-value, unsigned).neg(); return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned); } -/** - * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. - * @function - * @param {number} value The number in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} The corresponding Long value +/** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} The corresponding Long value */ Long.fromNumber = fromNumber; -/** - * @param {number} lowBits - * @param {number} highBits - * @param {boolean=} unsigned - * @returns {!Long} - * @inner +/** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromBits(lowBits, highBits, unsigned) { return new Long(lowBits, highBits, unsigned); } -/** - * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is - * assumed to use 32 bits. - * @function - * @param {number} lowBits The low 32 bits - * @param {number} highBits The high 32 bits - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} The corresponding Long value +/** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} The corresponding Long value */ Long.fromBits = fromBits; -/** - * @function - * @param {number} base - * @param {number} exponent - * @returns {number} - * @inner +/** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner */ var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) -/** - * @param {string} str - * @param {(boolean|number)=} unsigned - * @param {number=} radix - * @returns {!Long} - * @inner +/** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner */ function fromString(str, unsigned, radix) { if (str.length === 0) throw Error("empty string"); if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") return ZERO; @@ -71545,152 +71545,152 @@ Object.defineProperty(Long.prototype, "__isLong__", { result.unsigned = unsigned; return result; } -/** - * Returns a Long representation of the given string, written using the specified radix. - * @function - * @param {string} str The textual representation of the Long - * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed - * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 - * @returns {!Long} The corresponding Long value +/** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value */ Long.fromString = fromString; -/** - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val - * @param {boolean=} unsigned - * @returns {!Long} - * @inner +/** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromValue(val, unsigned) { if (typeof val === "number") return fromNumber(val, unsigned); if (typeof val === "string") return fromString(val, unsigned); // Throws for non-objects, converts non-instanceof Long: return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned); } -/** - * Converts the specified value to a Long using the appropriate from* function for its type. - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {!Long} +/** + * Converts the specified value to a Long using the appropriate from* function for its type. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {!Long} */ Long.fromValue = fromValue; // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be // no runtime penalty for these. -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_16_DBL = 65536; -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_24_DBL = 16777216; -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; -/** - * @type {number} - * @const - * @inner +/** + * @type {number} + * @const + * @inner */ var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; -/** - * @type {!Long} - * @const - * @inner +/** + * @type {!Long} + * @const + * @inner */ var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var ZERO = fromInt(0); -/** - * Signed zero. - * @type {!Long} +/** + * Signed zero. + * @type {!Long} */ Long.ZERO = ZERO; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var UZERO = fromInt(0, true); -/** - * Unsigned zero. - * @type {!Long} +/** + * Unsigned zero. + * @type {!Long} */ Long.UZERO = UZERO; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var ONE = fromInt(1); -/** - * Signed one. - * @type {!Long} +/** + * Signed one. + * @type {!Long} */ Long.ONE = ONE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var UONE = fromInt(1, true); -/** - * Unsigned one. - * @type {!Long} +/** + * Unsigned one. + * @type {!Long} */ Long.UONE = UONE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var NEG_ONE = fromInt(-1); -/** - * Signed negative one. - * @type {!Long} +/** + * Signed negative one. + * @type {!Long} */ Long.NEG_ONE = NEG_ONE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var MAX_VALUE = fromBits(-1, 2147483647, false); -/** - * Maximum signed value. - * @type {!Long} +/** + * Maximum signed value. + * @type {!Long} */ Long.MAX_VALUE = MAX_VALUE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var MAX_UNSIGNED_VALUE = fromBits(-1, -1, true); -/** - * Maximum unsigned value. - * @type {!Long} +/** + * Maximum unsigned value. + * @type {!Long} */ Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; -/** - * @type {!Long} - * @inner +/** + * @type {!Long} + * @inner */ var MIN_VALUE = fromBits(0, -2147483648, false); -/** - * Minimum signed value. - * @type {!Long} +/** + * Minimum signed value. + * @type {!Long} */ Long.MIN_VALUE = MIN_VALUE; -/** - * @alias Long.prototype - * @inner +/** + * @alias Long.prototype + * @inner */ var LongPrototype = Long.prototype; -/** - * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. - * @returns {number} +/** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} */ LongPrototype.toInt = function toInt() { return this.unsigned ? this.low >>> 0 : this.low; }; -/** - * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). - * @returns {number} +/** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} */ LongPrototype.toNumber = function toNumber() { if (this.unsigned) return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0); return this.high * TWO_PWR_32_DBL + (this.low >>> 0); }; -/** - * Converts the Long to a string written in the specified radix. - * @param {number=} radix Radix (2-36), defaults to 10 - * @returns {string} - * @override - * @throws {RangeError} If `radix` is out of range +/** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range */ LongPrototype.toString = function toString(radix) { radix = radix || 10; if (radix < 2 || 36 < radix) throw RangeError("radix"); @@ -71717,176 +71717,176 @@ Object.defineProperty(Long.prototype, "__isLong__", { } } }; -/** - * Gets the high 32 bits as a signed integer. - * @returns {number} Signed high bits +/** + * Gets the high 32 bits as a signed integer. + * @returns {number} Signed high bits */ LongPrototype.getHighBits = function getHighBits() { return this.high; }; -/** - * Gets the high 32 bits as an unsigned integer. - * @returns {number} Unsigned high bits +/** + * Gets the high 32 bits as an unsigned integer. + * @returns {number} Unsigned high bits */ LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { return this.high >>> 0; }; -/** - * Gets the low 32 bits as a signed integer. - * @returns {number} Signed low bits +/** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits */ LongPrototype.getLowBits = function getLowBits() { return this.low; }; -/** - * Gets the low 32 bits as an unsigned integer. - * @returns {number} Unsigned low bits +/** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits */ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { return this.low >>> 0; }; -/** - * Gets the number of bits needed to represent the absolute value of this Long. - * @returns {number} +/** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} */ LongPrototype.getNumBitsAbs = function getNumBitsAbs() { if (this.isNegative()) return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); var val = this.high != 0 ? this.high : this.low; for(var bit = 31; bit > 0; bit--)if ((val & 1 << bit) != 0) break; return this.high != 0 ? bit + 33 : bit + 1; }; -/** - * Tests if this Long's value equals zero. - * @returns {boolean} +/** + * Tests if this Long's value equals zero. + * @returns {boolean} */ LongPrototype.isZero = function isZero() { return this.high === 0 && this.low === 0; }; -/** - * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}. - * @returns {boolean} +/** + * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}. + * @returns {boolean} */ LongPrototype.eqz = LongPrototype.isZero; -/** - * Tests if this Long's value is negative. - * @returns {boolean} +/** + * Tests if this Long's value is negative. + * @returns {boolean} */ LongPrototype.isNegative = function isNegative() { return !this.unsigned && this.high < 0; }; -/** - * Tests if this Long's value is positive. - * @returns {boolean} +/** + * Tests if this Long's value is positive. + * @returns {boolean} */ LongPrototype.isPositive = function isPositive() { return this.unsigned || this.high >= 0; }; -/** - * Tests if this Long's value is odd. - * @returns {boolean} +/** + * Tests if this Long's value is odd. + * @returns {boolean} */ LongPrototype.isOdd = function isOdd() { return (this.low & 1) === 1; }; -/** - * Tests if this Long's value is even. - * @returns {boolean} +/** + * Tests if this Long's value is even. + * @returns {boolean} */ LongPrototype.isEven = function isEven() { return (this.low & 1) === 0; }; -/** - * Tests if this Long's value equals the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.equals = function equals(other) { if (!isLong(other)) other = fromValue(other); if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1) return false; return this.high === other.high && this.low === other.low; }; -/** - * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.eq = LongPrototype.equals; -/** - * Tests if this Long's value differs from the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.notEquals = function notEquals(other) { return !this.eq(/* validates */ other); }; -/** - * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.neq = LongPrototype.notEquals; -/** - * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.ne = LongPrototype.notEquals; -/** - * Tests if this Long's value is less than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lessThan = function lessThan(other) { return this.comp(/* validates */ other) < 0; }; -/** - * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lt = LongPrototype.lessThan; -/** - * Tests if this Long's value is less than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { return this.comp(/* validates */ other) <= 0; }; -/** - * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lte = LongPrototype.lessThanOrEqual; -/** - * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.le = LongPrototype.lessThanOrEqual; -/** - * Tests if this Long's value is greater than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.greaterThan = function greaterThan(other) { return this.comp(/* validates */ other) > 0; }; -/** - * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.gt = LongPrototype.greaterThan; -/** - * Tests if this Long's value is greater than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { return this.comp(/* validates */ other) >= 0; }; -/** - * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.gte = LongPrototype.greaterThanOrEqual; -/** - * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} +/** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.ge = LongPrototype.greaterThanOrEqual; -/** - * Compares this Long's value with the specified's. - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater +/** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater */ LongPrototype.compare = function compare(other) { if (!isLong(other)) other = fromValue(other); if (this.eq(other)) return 0; @@ -71898,29 +71898,29 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Both are positive if at least one is unsigned return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1; }; -/** - * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. - * @function - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater +/** + * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. + * @function + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater */ LongPrototype.comp = LongPrototype.compare; -/** - * Negates this Long's value. - * @returns {!Long} Negated Long +/** + * Negates this Long's value. + * @returns {!Long} Negated Long */ LongPrototype.negate = function negate() { if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE; return this.not().add(ONE); }; -/** - * Negates this Long's value. This is an alias of {@link Long#negate}. - * @function - * @returns {!Long} Negated Long +/** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long */ LongPrototype.neg = LongPrototype.negate; -/** - * Returns the sum of this and the specified Long. - * @param {!Long|number|string} addend Addend - * @returns {!Long} Sum +/** + * Returns the sum of this and the specified Long. + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum */ LongPrototype.add = function add(addend) { if (!isLong(addend)) addend = fromValue(addend); // Divide each number into 4 chunks of 16 bits, and then sum the chunks. @@ -71946,24 +71946,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { c48 &= 0xFFFF; return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned); }; -/** - * Returns the difference of this and the specified Long. - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference +/** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference */ LongPrototype.subtract = function subtract(subtrahend) { if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend); return this.add(subtrahend.neg()); }; -/** - * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. - * @function - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference +/** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference */ LongPrototype.sub = LongPrototype.subtract; -/** - * Returns the product of this and the specified Long. - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product +/** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product */ LongPrototype.multiply = function multiply(multiplier) { if (this.isZero()) return ZERO; if (!isLong(multiplier)) multiplier = fromValue(multiplier); @@ -72014,17 +72014,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { c48 &= 0xFFFF; return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned); }; -/** - * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. - * @function - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product +/** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product */ LongPrototype.mul = LongPrototype.multiply; -/** - * Returns this Long divided by the specified. The result is signed if this Long is signed or - * unsigned if this Long is unsigned. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient +/** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient */ LongPrototype.divide = function divide(divisor) { if (!isLong(divisor)) divisor = fromValue(divisor); if (divisor.isZero()) throw Error("division by zero"); @@ -72099,16 +72099,16 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return res; }; -/** - * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient +/** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient */ LongPrototype.div = LongPrototype.divide; -/** - * Returns this Long modulo the specified. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder +/** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.modulo = function modulo(divisor) { if (!isLong(divisor)) divisor = fromValue(divisor); // use wasm support if present @@ -72118,84 +72118,84 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return this.sub(this.div(divisor).mul(divisor)); }; -/** - * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder +/** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.mod = LongPrototype.modulo; -/** - * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder +/** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.rem = LongPrototype.modulo; -/** - * Returns the bitwise NOT of this Long. - * @returns {!Long} +/** + * Returns the bitwise NOT of this Long. + * @returns {!Long} */ LongPrototype.not = function not() { return fromBits(~this.low, ~this.high, this.unsigned); }; -/** - * Returns the bitwise AND of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} +/** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.and = function and(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low & other.low, this.high & other.high, this.unsigned); }; -/** - * Returns the bitwise OR of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} +/** + * Returns the bitwise OR of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.or = function or(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low | other.low, this.high | other.high, this.unsigned); }; -/** - * Returns the bitwise XOR of this Long and the given one. - * @param {!Long|number|string} other Other Long - * @returns {!Long} +/** + * Returns the bitwise XOR of this Long and the given one. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.xor = function xor(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); }; -/** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits shifted to the left by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftLeft = function shiftLeft(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); if ((numBits &= 63) === 0) return this; else if (numBits < 32) return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned); else return fromBits(0, this.low << numBits - 32, this.unsigned); }; -/** - * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shl = LongPrototype.shiftLeft; -/** - * Returns this Long with bits arithmetically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftRight = function shiftRight(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); if ((numBits &= 63) === 0) return this; else if (numBits < 32) return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned); else return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned); }; -/** - * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shr = LongPrototype.shiftRight; -/** - * Returns this Long with bits logically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); numBits &= 63; @@ -72209,42 +72209,42 @@ Object.defineProperty(Long.prototype, "__isLong__", { else return fromBits(high >>> numBits - 32, 0, this.unsigned); } }; -/** - * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shru = LongPrototype.shiftRightUnsigned; -/** - * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long +/** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shr_u = LongPrototype.shiftRightUnsigned; -/** - * Converts this Long to signed. - * @returns {!Long} Signed long +/** + * Converts this Long to signed. + * @returns {!Long} Signed long */ LongPrototype.toSigned = function toSigned() { if (!this.unsigned) return this; return fromBits(this.low, this.high, false); }; -/** - * Converts this Long to unsigned. - * @returns {!Long} Unsigned long +/** + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long */ LongPrototype.toUnsigned = function toUnsigned() { if (this.unsigned) return this; return fromBits(this.low, this.high, true); }; -/** - * Converts this Long to its byte representation. - * @param {boolean=} le Whether little or big endian, defaults to big endian - * @returns {!Array.} Byte representation +/** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation */ LongPrototype.toBytes = function toBytes(le) { return le ? this.toBytesLE() : this.toBytesBE(); }; -/** - * Converts this Long to its little endian byte representation. - * @returns {!Array.} Little endian byte representation +/** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation */ LongPrototype.toBytesLE = function toBytesLE() { var hi = this.high, lo = this.low; return [ @@ -72258,9 +72258,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { hi >>> 24 ]; }; -/** - * Converts this Long to its big endian byte representation. - * @returns {!Array.} Big endian byte representation +/** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation */ LongPrototype.toBytesBE = function toBytesBE() { var hi = this.high, lo = this.low; return [ @@ -72274,52 +72274,52 @@ Object.defineProperty(Long.prototype, "__isLong__", { lo & 0xff ]; }; -/** - * Creates a Long from its byte representation. - * @param {!Array.} bytes Byte representation - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @param {boolean=} le Whether little or big endian, defaults to big endian - * @returns {Long} The corresponding Long value +/** + * Creates a Long from its byte representation. + * @param {!Array.} bytes Byte representation + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {Long} The corresponding Long value */ Long.fromBytes = function fromBytes(bytes, unsigned, le) { return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned); }; -/** - * Creates a Long from its little endian byte representation. - * @param {!Array.} bytes Little endian byte representation - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {Long} The corresponding Long value +/** + * Creates a Long from its little endian byte representation. + * @param {!Array.} bytes Little endian byte representation + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {Long} The corresponding Long value */ Long.fromBytesLE = function fromBytesLE(bytes, unsigned) { return new Long(bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24, bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24, unsigned); }; -/** - * Creates a Long from its big endian byte representation. - * @param {!Array.} bytes Big endian byte representation - * @param {boolean=} unsigned Whether unsigned or not, defaults to signed - * @returns {Long} The corresponding Long value +/** + * Creates a Long from its big endian byte representation. + * @param {!Array.} bytes Big endian byte representation + * @param {boolean=} unsigned Whether unsigned or not, defaults to signed + * @returns {Long} The corresponding Long value */ Long.fromBytesBE = function fromBytesBE(bytes, unsigned) { return new Long(bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7], bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], unsigned); }; },{}],"j5ACk":[function(require,module,exports) { -/* - Copyright 2013-2014 Daniel Wirtz - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ /** - * @license bytebuffer.js (c) 2015 Daniel Wirtz - * Backing buffer: ArrayBuffer, Accessor: Uint8Array - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/bytebuffer.js for details +/* + Copyright 2013-2014 Daniel Wirtz + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ /** + * @license bytebuffer.js (c) 2015 Daniel Wirtz + * Backing buffer: ArrayBuffer, Accessor: Uint8Array + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/bytebuffer.js for details */ (function(global, factory) { /* AMD */ if (typeof define === "function" && define["amd"]) define([ "long" @@ -72334,17 +72334,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { else (global["dcodeIO"] = global["dcodeIO"] || {})["ByteBuffer"] = factory(global["dcodeIO"]["Long"]); })(this, function(Long) { "use strict"; - /** - * Constructs a new ByteBuffer. - * @class The swiss army knife for binary data in JavaScript. - * @exports ByteBuffer - * @constructor - * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @expose + /** + * Constructs a new ByteBuffer. + * @class The swiss army knife for binary data in JavaScript. + * @exports ByteBuffer + * @constructor + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @expose */ var ByteBuffer = function(capacity, littleEndian, noAssert) { if (typeof capacity === "undefined") capacity = ByteBuffer.DEFAULT_CAPACITY; if (typeof littleEndian === "undefined") littleEndian = ByteBuffer.DEFAULT_ENDIAN; @@ -72355,99 +72355,99 @@ Object.defineProperty(Long.prototype, "__isLong__", { littleEndian = !!littleEndian; noAssert = !!noAssert; } - /** - * Backing ArrayBuffer. - * @type {!ArrayBuffer} - * @expose + /** + * Backing ArrayBuffer. + * @type {!ArrayBuffer} + * @expose */ this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity); - /** - * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. - * @type {?Uint8Array} - * @expose + /** + * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`. + * @type {?Uint8Array} + * @expose */ this.view = capacity === 0 ? null : new Uint8Array(this.buffer); - /** - * Absolute read/write offset. - * @type {number} - * @expose - * @see ByteBuffer#flip - * @see ByteBuffer#clear + /** + * Absolute read/write offset. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear */ this.offset = 0; - /** - * Marked offset. - * @type {number} - * @expose - * @see ByteBuffer#mark - * @see ByteBuffer#reset + /** + * Marked offset. + * @type {number} + * @expose + * @see ByteBuffer#mark + * @see ByteBuffer#reset */ this.markedOffset = -1; - /** - * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. - * @type {number} - * @expose - * @see ByteBuffer#flip - * @see ByteBuffer#clear + /** + * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation. + * @type {number} + * @expose + * @see ByteBuffer#flip + * @see ByteBuffer#clear */ this.limit = capacity; - /** - * Whether to use little endian byte order, defaults to `false` for big endian. - * @type {boolean} - * @expose + /** + * Whether to use little endian byte order, defaults to `false` for big endian. + * @type {boolean} + * @expose */ this.littleEndian = littleEndian; - /** - * Whether to skip assertions of offsets and values, defaults to `false`. - * @type {boolean} - * @expose + /** + * Whether to skip assertions of offsets and values, defaults to `false`. + * @type {boolean} + * @expose */ this.noAssert = noAssert; }; - /** - * ByteBuffer version. - * @type {string} - * @const - * @expose + /** + * ByteBuffer version. + * @type {string} + * @const + * @expose */ ByteBuffer.VERSION = "5.0.1"; - /** - * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. - * @type {boolean} - * @const - * @expose + /** + * Little endian constant that can be used instead of its boolean value. Evaluates to `true`. + * @type {boolean} + * @const + * @expose */ ByteBuffer.LITTLE_ENDIAN = true; - /** - * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. - * @type {boolean} - * @const - * @expose + /** + * Big endian constant that can be used instead of its boolean value. Evaluates to `false`. + * @type {boolean} + * @const + * @expose */ ByteBuffer.BIG_ENDIAN = false; - /** - * Default initial capacity of `16`. - * @type {number} - * @expose + /** + * Default initial capacity of `16`. + * @type {number} + * @expose */ ByteBuffer.DEFAULT_CAPACITY = 16; - /** - * Default endianess of `false` for big endian. - * @type {boolean} - * @expose + /** + * Default endianess of `false` for big endian. + * @type {boolean} + * @expose */ ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN; - /** - * Default no assertions flag of `false`. - * @type {boolean} - * @expose + /** + * Default no assertions flag of `false`. + * @type {boolean} + * @expose */ ByteBuffer.DEFAULT_NOASSERT = false; - /** - * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded - * and int64 support is not available. - * @type {?Long} - * @const - * @see https://github.com/dcodeIO/long.js - * @expose + /** + * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded + * and int64 support is not available. + * @type {?Long} + * @const + * @see https://github.com/dcodeIO/long.js + * @expose */ ByteBuffer.Long = Long || null; - /** - * @alias ByteBuffer.prototype - * @inner + /** + * @alias ByteBuffer.prototype + * @inner */ var ByteBufferPrototype = ByteBuffer.prototype; - /** - * An indicator used to reliably determine if an object is a ByteBuffer or not. - * @type {boolean} - * @const - * @expose - * @private + /** + * An indicator used to reliably determine if an object is a ByteBuffer or not. + * @type {boolean} + * @const + * @expose + * @private */ ByteBufferPrototype.__isByteBuffer__; Object.defineProperty(ByteBufferPrototype, "__isByteBuffer__", { value: true, @@ -72455,33 +72455,33 @@ Object.defineProperty(Long.prototype, "__isLong__", { configurable: false }); // helpers - /** - * @type {!ArrayBuffer} - * @inner + /** + * @type {!ArrayBuffer} + * @inner */ var EMPTY_BUFFER = new ArrayBuffer(0); - /** - * String.fromCharCode reference for compile-time renaming. - * @type {function(...number):string} - * @inner + /** + * String.fromCharCode reference for compile-time renaming. + * @type {function(...number):string} + * @inner */ var stringFromCharCode = String.fromCharCode; - /** - * Creates a source function for a string. - * @param {string} s String to read from - * @returns {function():number|null} Source function returning the next char code respectively `null` if there are - * no more characters left. - * @throws {TypeError} If the argument is invalid - * @inner + /** + * Creates a source function for a string. + * @param {string} s String to read from + * @returns {function():number|null} Source function returning the next char code respectively `null` if there are + * no more characters left. + * @throws {TypeError} If the argument is invalid + * @inner */ function stringSource(s) { var i = 0; return function() { return i < s.length ? s.charCodeAt(i++) : null; }; } - /** - * Creates a destination function for a string. - * @returns {function(number=):undefined|string} Destination function successively called with the next char code. - * Returns the final string when called without arguments. - * @inner + /** + * Creates a destination function for a string. + * @returns {function(number=):undefined|string} Destination function successively called with the next char code. + * Returns the final string when called without arguments. + * @inner */ function stringDestination() { var cs = [], ps = []; return function() { @@ -72490,36 +72490,36 @@ Object.defineProperty(Long.prototype, "__isLong__", { Array.prototype.push.apply(cs, arguments); }; } - /** - * Gets the accessor type. - * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes) - * @expose + /** + * Gets the accessor type. + * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes) + * @expose */ ByteBuffer.accessor = function() { return Uint8Array; }; - /** - * Allocates a new ByteBuffer backed by a buffer of the specified capacity. - * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} - * @expose + /** + * Allocates a new ByteBuffer backed by a buffer of the specified capacity. + * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}. + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} + * @expose */ ByteBuffer.allocate = function(capacity, littleEndian, noAssert) { return new ByteBuffer(capacity, littleEndian, noAssert); }; - /** - * Concatenates multiple ByteBuffers into one. - * @param {!Array.} buffers Buffers to concatenate - * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", - * defaults to "utf8") - * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults - * to {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} Concatenated ByteBuffer - * @expose + /** + * Concatenates multiple ByteBuffers into one. + * @param {!Array.} buffers Buffers to concatenate + * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string ("base64", "hex", "binary", + * defaults to "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults + * to {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} Concatenated ByteBuffer + * @expose */ ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) { if (typeof encoding === "boolean" || typeof encoding !== "string") { noAssert = littleEndian; @@ -72546,33 +72546,33 @@ Object.defineProperty(Long.prototype, "__isLong__", { bb.offset = 0; return bb; }; - /** - * Tests if the specified type is a ByteBuffer. - * @param {*} bb ByteBuffer to test - * @returns {boolean} `true` if it is a ByteBuffer, otherwise `false` - * @expose + /** + * Tests if the specified type is a ByteBuffer. + * @param {*} bb ByteBuffer to test + * @returns {boolean} `true` if it is a ByteBuffer, otherwise `false` + * @expose */ ByteBuffer.isByteBuffer = function(bb) { return (bb && bb["__isByteBuffer__"]) === true; }; - /** - * Gets the backing buffer type. - * @returns {Function} `Buffer` under node.js, `ArrayBuffer` in the browser (classes) - * @expose + /** + * Gets the backing buffer type. + * @returns {Function} `Buffer` under node.js, `ArrayBuffer` in the browser (classes) + * @expose */ ByteBuffer.type = function() { return ArrayBuffer; }; - /** - * Wraps a buffer or a string. Sets the allocated ByteBuffer's {@link ByteBuffer#offset} to `0` and its - * {@link ByteBuffer#limit} to the length of the wrapped data. - * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string|!Array.} buffer Anything that can be wrapped - * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to - * "utf8") - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` - * @expose + /** + * Wraps a buffer or a string. Sets the allocated ByteBuffer's {@link ByteBuffer#offset} to `0` and its + * {@link ByteBuffer#limit} to the length of the wrapped data. + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string|!Array.} buffer Anything that can be wrapped + * @param {(string|boolean)=} encoding String encoding if `buffer` is a string ("base64", "hex", "binary", defaults to + * "utf8") + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer` + * @expose */ ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) { if (typeof encoding !== "string") { noAssert = littleEndian; @@ -72626,12 +72626,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { } else throw TypeError("Illegal buffer"); // Otherwise fail return bb; }; - /** - * Writes the array as a bitset. - * @param {Array} value Array of booleans to write - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. - * @returns {!ByteBuffer} - * @expose + /** + * Writes the array as a bitset. + * @param {Array} value Array of booleans to write + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose */ ByteBufferPrototype.writeBitSet = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72659,11 +72659,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return offset - start; }; - /** - * Reads a BitSet as an array of booleans. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. - * @returns {Array - * @expose + /** + * Reads a BitSet as an array of booleans. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {Array + * @expose */ ByteBufferPrototype.readBitSet = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72688,12 +72688,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset = offset; return value; }; - /** - * Reads the specified number of bytes. - * @param {number} length Number of bytes to read - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. - * @returns {!ByteBuffer} - * @expose + /** + * Reads the specified number of bytes. + * @param {number} length Number of bytes to read + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted. + * @returns {!ByteBuffer} + * @expose */ ByteBufferPrototype.readBytes = function(length, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72706,24 +72706,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += length; return slice; }; - /** - * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}. - * @function - * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets - * will be modified according to the performed read operation. - * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}. + * @function + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeBytes = ByteBufferPrototype.append; // types/ints/int8 - /** - * Writes an 8bit signed integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes an 8bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeInt8 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72742,19 +72742,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 1; return this; }; - /** - * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8; - /** - * Reads an 8bit signed integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads an 8bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readInt8 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72768,19 +72768,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 1; return value; }; - /** - * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. - * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8; - /** - * Writes an 8bit unsigned integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes an 8bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeUint8 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72799,19 +72799,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 1; return this; }; - /** - * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeUInt8 = ByteBufferPrototype.writeUint8; - /** - * Reads an 8bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads an 8bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readUint8 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72824,21 +72824,21 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 1; return value; }; - /** - * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}. - * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readUInt8 = ByteBufferPrototype.readUint8; // types/ints/int16 - /** - * Writes a 16bit signed integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Writes a 16bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.writeInt16 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72863,22 +72863,22 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 2; return this; }; - /** - * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16; - /** - * Reads a 16bit signed integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Reads a 16bit signed integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.readInt16 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72899,22 +72899,22 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 2; return value; }; - /** - * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. - * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16; - /** - * Writes a 16bit unsigned integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Writes a 16bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.writeUint16 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72939,22 +72939,22 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 2; return this; }; - /** - * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @throws {TypeError} If `offset` or `value` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @throws {TypeError} If `offset` or `value` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.writeUInt16 = ByteBufferPrototype.writeUint16; - /** - * Reads a 16bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Reads a 16bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.readUint16 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -72974,21 +72974,21 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 2; return value; }; - /** - * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}. - * @function - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. - * @returns {number} Value read - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @expose + /** + * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}. + * @function + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted. + * @returns {number} Value read + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @expose */ ByteBufferPrototype.readUInt16 = ByteBufferPrototype.readUint16; // types/ints/int32 - /** - * Writes a 32bit signed integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose + /** + * Writes a 32bit signed integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ ByteBufferPrototype.writeInt32 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73017,17 +73017,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return this; }; - /** - * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose + /** + * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32; - /** - * Reads a 32bit signed integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads a 32bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readInt32 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73052,17 +73052,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return value; }; - /** - * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. - * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}. + * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32; - /** - * Writes a 32bit unsigned integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose + /** + * Writes a 32bit unsigned integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ ByteBufferPrototype.writeUint32 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73091,18 +73091,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return this; }; - /** - * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @expose + /** + * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @expose */ ByteBufferPrototype.writeUInt32 = ByteBufferPrototype.writeUint32; - /** - * Reads a 32bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads a 32bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readUint32 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73126,21 +73126,21 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return value; }; - /** - * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}. - * @function - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} Value read - * @expose + /** + * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} Value read + * @expose */ ByteBufferPrototype.readUInt32 = ByteBufferPrototype.readUint32; // types/ints/int64 if (Long) { - /** - * Writes a 64bit signed integer. - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit signed integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeInt64 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73183,18 +73183,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return this; }; - /** - * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64; - /** - * Reads a 64bit signed integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} - * @expose + /** + * Reads a 64bit signed integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose */ ByteBufferPrototype.readInt64 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73229,18 +73229,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return value; }; - /** - * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} - * @expose + /** + * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose */ ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64; - /** - * Writes a 64bit unsigned integer. - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit unsigned integer. + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeUint64 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73283,19 +73283,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return this; }; - /** - * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}. - * @function - * @param {number|!Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}. + * @function + * @param {number|!Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeUInt64 = ByteBufferPrototype.writeUint64; - /** - * Reads a 64bit unsigned integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} - * @expose + /** + * Reads a 64bit unsigned integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose */ ByteBufferPrototype.readUint64 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73330,48 +73330,48 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return value; }; - /** - * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}. - * @function - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!Long} - * @expose + /** + * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!Long} + * @expose */ ByteBufferPrototype.readUInt64 = ByteBufferPrototype.readUint64; } // Long // types/floats/float32 - /* - ieee754 - https://github.com/feross/ieee754 - - The MIT License (MIT) - - Copyright (c) Feross Aboukhadijeh - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ /** - * Reads an IEEE754 float from a byte array. - * @param {!Array} buffer - * @param {number} offset - * @param {boolean} isLE - * @param {number} mLen - * @param {number} nBytes - * @returns {number} - * @inner + /* + ieee754 - https://github.com/feross/ieee754 + + The MIT License (MIT) + + Copyright (c) Feross Aboukhadijeh + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ /** + * Reads an IEEE754 float from a byte array. + * @param {!Array} buffer + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @returns {number} + * @inner */ function ieee754_read(buffer, offset, isLE, mLen, nBytes) { var e, m, eLen = nBytes * 8 - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, nBits = -7, i = isLE ? nBytes - 1 : 0, d = isLE ? -1 : 1, s = buffer[offset + i]; i += d; @@ -73391,15 +73391,15 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return (s ? -1 : 1) * m * Math.pow(2, e - mLen); } - /** - * Writes an IEEE754 float to a byte array. - * @param {!Array} buffer - * @param {number} value - * @param {number} offset - * @param {boolean} isLE - * @param {number} mLen - * @param {number} nBytes - * @inner + /** + * Writes an IEEE754 float to a byte array. + * @param {!Array} buffer + * @param {number} value + * @param {number} offset + * @param {boolean} isLE + * @param {number} mLen + * @param {number} nBytes + * @inner */ function ieee754_write(buffer, value, offset, isLE, mLen, nBytes) { var e, m, c, eLen = nBytes * 8 - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, i = isLE ? 0 : nBytes - 1, d = isLE ? 1 : -1, s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; value = Math.abs(value); @@ -73435,12 +73435,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { for(; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); buffer[offset + i - d] |= s * 128; } - /** - * Writes a 32bit float. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 32bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeFloat32 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73458,19 +73458,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return this; }; - /** - * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32; - /** - * Reads a 32bit float. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} - * @expose + /** + * Reads a 32bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose */ ByteBufferPrototype.readFloat32 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73483,20 +73483,20 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 4; return value; }; - /** - * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}. - * @function - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. - * @returns {number} - * @expose + /** + * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted. + * @returns {number} + * @expose */ ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32; // types/floats/float64 - /** - * Writes a 64bit float. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit float. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeFloat64 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73514,19 +73514,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return this; }; - /** - * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. - * @function - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {!ByteBuffer} this - * @expose + /** + * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}. + * @function + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64; - /** - * Reads a 64bit float. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {number} - * @expose + /** + * Reads a 64bit float. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose */ ByteBufferPrototype.readFloat64 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73539,25 +73539,25 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += 8; return value; }; - /** - * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. - * @function - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. - * @returns {number} - * @expose + /** + * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}. + * @function + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted. + * @returns {number} + * @expose */ ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64; // types/varints/varint32 - /** - * Maximum number of bytes required to store a 32bit base 128 variable-length integer. - * @type {number} - * @const - * @expose + /** + * Maximum number of bytes required to store a 32bit base 128 variable-length integer. + * @type {number} + * @const + * @expose */ ByteBuffer.MAX_VARINT32_BYTES = 5; - /** - * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. - * @param {number} value Value to encode - * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} - * @expose + /** + * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer. + * @param {number} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES} + * @expose */ ByteBuffer.calculateVarint32 = function(value) { // ref: src/google/protobuf/io/coded_stream.cc value = value >>> 0; @@ -73567,29 +73567,29 @@ Object.defineProperty(Long.prototype, "__isLong__", { else if (value < 268435456) return 4; else return 5; }; - /** - * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. - * @param {number} n Signed 32bit integer - * @returns {number} Unsigned zigzag encoded 32bit integer - * @expose + /** + * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding. + * @param {number} n Signed 32bit integer + * @returns {number} Unsigned zigzag encoded 32bit integer + * @expose */ ByteBuffer.zigZagEncode32 = function(n) { return ((n |= 0) << 1 ^ n >> 31) >>> 0; // ref: src/google/protobuf/wire_format_lite.h }; - /** - * Decodes a zigzag encoded signed 32bit integer. - * @param {number} n Unsigned zigzag encoded 32bit integer - * @returns {number} Signed 32bit integer - * @expose + /** + * Decodes a zigzag encoded signed 32bit integer. + * @param {number} n Unsigned zigzag encoded 32bit integer + * @returns {number} Signed 32bit integer + * @expose */ ByteBuffer.zigZagDecode32 = function(n) { return n >>> 1 ^ -(n & 1) | 0; // // ref: src/google/protobuf/wire_format_lite.h }; - /** - * Writes a 32bit base 128 variable-length integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written - * @expose + /** + * Writes a 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose */ ByteBufferPrototype.writeVarint32 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73618,25 +73618,25 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return size; }; - /** - * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer. - * @param {number} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written - * @expose + /** + * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written + * @expose */ ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) { return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset); }; - /** - * Reads a 32bit base 128 variable-length integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read - * and the actual number of bytes read. - * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available - * to fully decode the varint. - * @expose + /** + * Reads a 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available + * to fully decode the varint. + * @expose */ ByteBufferPrototype.readVarint32 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73666,14 +73666,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { "length": c }; }; - /** - * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read - * and the actual number of bytes read. - * @throws {Error} If it's not a valid varint - * @expose + /** + * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read + * and the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose */ ByteBufferPrototype.readVarint32ZigZag = function(offset) { var val = this.readVarint32(offset); if (typeof val === "object") val["value"] = ByteBuffer.zigZagDecode32(val["value"]); @@ -73682,17 +73682,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; // types/varints/varint64 if (Long) { - /** - * Maximum number of bytes required to store a 64bit base 128 variable-length integer. - * @type {number} - * @const - * @expose + /** + * Maximum number of bytes required to store a 64bit base 128 variable-length integer. + * @type {number} + * @const + * @expose */ ByteBuffer.MAX_VARINT64_BYTES = 10; - /** - * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. - * @param {number|!Long} value Value to encode - * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} - * @expose + /** + * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer. + * @param {number|!Long} value Value to encode + * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES} + * @expose */ ByteBuffer.calculateVarint64 = function(value) { if (typeof value === "number") value = Long.fromNumber(value); else if (typeof value === "string") value = Long.fromString(value); @@ -73708,11 +73708,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { } } else return part2 < 128 ? 9 : 10; }; - /** - * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. - * @param {number|!Long} value Signed long - * @returns {!Long} Unsigned zigzag encoded long - * @expose + /** + * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding. + * @param {number|!Long} value Signed long + * @returns {!Long} Unsigned zigzag encoded long + * @expose */ ByteBuffer.zigZagEncode64 = function(value) { if (typeof value === "number") value = Long.fromNumber(value, false); else if (typeof value === "string") value = Long.fromString(value, false); @@ -73720,11 +73720,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { // ref: src/google/protobuf/wire_format_lite.h return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned(); }; - /** - * Decodes a zigzag encoded signed 64bit integer. - * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number - * @returns {!Long} Signed long - * @expose + /** + * Decodes a zigzag encoded signed 64bit integer. + * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number + * @returns {!Long} Signed long + * @expose */ ByteBuffer.zigZagDecode64 = function(value) { if (typeof value === "number") value = Long.fromNumber(value, false); else if (typeof value === "string") value = Long.fromString(value, false); @@ -73732,13 +73732,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { // ref: src/google/protobuf/wire_format_lite.h return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned(); }; - /** - * Writes a 64bit base 128 variable-length integer. - * @param {number|Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. - * @expose + /** + * Writes a 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose */ ByteBufferPrototype.writeVarint64 = function(value, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73785,24 +73785,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { return this; } else return size; }; - /** - * Writes a zig-zag encoded 64bit base 128 variable-length integer. - * @param {number|Long} value Value to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. - * @expose + /** + * Writes a zig-zag encoded 64bit base 128 variable-length integer. + * @param {number|Long} value Value to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written. + * @expose */ ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) { return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset); }; - /** - * Reads a 64bit base 128 variable-length integer. Requires Long.js. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and - * the actual number of bytes read. - * @throws {Error} If it's not a valid varint - * @expose + /** + * Reads a 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose */ ByteBufferPrototype.readVarint64 = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73861,14 +73861,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { "length": offset - start }; }; - /** - * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and - * the actual number of bytes read. - * @throws {Error} If it's not a valid varint - * @expose + /** + * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and + * the actual number of bytes read. + * @throws {Error} If it's not a valid varint + * @expose */ ByteBufferPrototype.readVarint64ZigZag = function(offset) { var val = this.readVarint64(offset); if (val && val["value"] instanceof Long) val["value"] = ByteBuffer.zigZagDecode64(val["value"]); @@ -73877,14 +73877,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; } // Long // types/strings/cstring - /** - * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL - * characters itself. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * contained in `str` + 1 if omitted. - * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written - * @expose + /** + * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL + * characters itself. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * contained in `str` + 1 if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written + * @expose */ ByteBufferPrototype.writeCString = function(str, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73914,14 +73914,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return k; }; - /** - * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters - * itself. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose + /** + * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters + * itself. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose */ ByteBufferPrototype.readCString = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73948,14 +73948,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; }; // types/strings/istring - /** - * Writes a length as uint32 prefixed UTF8 encoded string. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written - * @expose - * @see ByteBuffer#writeVarint32 + /** + * Writes a length as uint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 */ ByteBufferPrototype.writeIString = function(str, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -73993,14 +73993,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return offset - start; }; - /** - * Reads a length as uint32 prefixed UTF8 encoded string. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose - * @see ByteBuffer#readVarint32 + /** + * Reads a length as uint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 */ ByteBufferPrototype.readIString = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -74022,24 +74022,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; }; // types/strings/utf8string - /** - * Metrics representing number of UTF8 characters. Evaluates to `c`. - * @type {string} - * @const - * @expose + /** + * Metrics representing number of UTF8 characters. Evaluates to `c`. + * @type {string} + * @const + * @expose */ ByteBuffer.METRICS_CHARS = "c"; - /** - * Metrics representing number of bytes. Evaluates to `b`. - * @type {string} - * @const - * @expose + /** + * Metrics representing number of bytes. Evaluates to `b`. + * @type {string} + * @const + * @expose */ ByteBuffer.METRICS_BYTES = "b"; - /** - * Writes an UTF8 encoded string. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. - * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. - * @expose + /** + * Writes an UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose */ ByteBufferPrototype.writeUTF8String = function(str, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -74064,48 +74064,48 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return offset - start; }; - /** - * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}. - * @function - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. - * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. - * @expose + /** + * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}. + * @function + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted. + * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written. + * @expose */ ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String; - /** - * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's - * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. - * @param {string} str String to calculate - * @returns {number} Number of UTF8 characters - * @expose + /** + * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's + * `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 characters + * @expose */ ByteBuffer.calculateUTF8Chars = function(str) { return utfx.calculateUTF16asUTF8(stringSource(str))[0]; }; - /** - * Calculates the number of UTF8 bytes of a string. - * @param {string} str String to calculate - * @returns {number} Number of UTF8 bytes - * @expose + /** + * Calculates the number of UTF8 bytes of a string. + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose */ ByteBuffer.calculateUTF8Bytes = function(str) { return utfx.calculateUTF16asUTF8(stringSource(str))[1]; }; - /** - * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}. - * @function - * @param {string} str String to calculate - * @returns {number} Number of UTF8 bytes - * @expose + /** + * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}. + * @function + * @param {string} str String to calculate + * @returns {number} Number of UTF8 bytes + * @expose */ ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes; - /** - * Reads an UTF8 encoded string. - * @param {number} length Number of characters or bytes to read. - * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to - * {@link ByteBuffer.METRICS_CHARS}. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose + /** + * Reads an UTF8 encoded string. + * @param {number} length Number of characters or bytes to read. + * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose */ ByteBufferPrototype.readUTF8String = function(length, metrics, offset) { if (typeof metrics === "number") { offset = metrics; @@ -74158,27 +74158,27 @@ Object.defineProperty(Long.prototype, "__isLong__", { }; } else throw TypeError("Unsupported metrics: " + metrics); }; - /** - * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. - * @function - * @param {number} length Number of characters or bytes to read - * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to - * {@link ByteBuffer.METRICS_CHARS}. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose + /** + * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}. + * @function + * @param {number} length Number of characters or bytes to read + * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to + * {@link ByteBuffer.METRICS_CHARS}. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose */ ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String; // types/strings/vstring - /** - * Writes a length as varint32 prefixed UTF8 encoded string. - * @param {string} str String to write - * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written - * @expose - * @see ByteBuffer#writeVarint32 + /** + * Writes a length as varint32 prefixed UTF8 encoded string. + * @param {string} str String to write + * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written + * @expose + * @see ByteBuffer#writeVarint32 */ ByteBufferPrototype.writeVString = function(str, offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -74206,14 +74206,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return offset - start; }; - /** - * Reads a length as varint32 prefixed UTF8 encoded string. - * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string - * read and the actual number of bytes read. - * @expose - * @see ByteBuffer#readVarint32 + /** + * Reads a length as varint32 prefixed UTF8 encoded string. + * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string + * read and the actual number of bytes read. + * @expose + * @see ByteBuffer#readVarint32 */ ByteBufferPrototype.readVString = function(offset) { var relative = typeof offset === "undefined"; if (relative) offset = this.offset; @@ -74234,18 +74234,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { "length": offset - start }; }; - /** - * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended - * data's length. - * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets - * will be modified according to the performed read operation. - * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") - * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. - * @returns {!ByteBuffer} this - * @expose - * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` - * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` + /** + * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended + * data's length. + * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets + * will be modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|` + * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|` */ ByteBufferPrototype.append = function(source, encoding, offset) { if (typeof encoding === "number" || typeof encoding !== "string") { offset = encoding; @@ -74270,53 +74270,53 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset += length; return this; }; - /** - * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the - specified offset up to the length of this ByteBuffer's data. - * @param {!ByteBuffer} target Target ByteBuffer - * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * read if omitted. - * @returns {!ByteBuffer} this - * @expose - * @see ByteBuffer#append + /** + * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the + specified offset up to the length of this ByteBuffer's data. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * read if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#append */ ByteBufferPrototype.appendTo = function(target, offset) { target.append(this, offset); return this; }; - /** - * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to - * disable them if your code already makes sure that everything is valid. - * @param {boolean} assert `true` to enable assertions, otherwise `false` - * @returns {!ByteBuffer} this - * @expose + /** + * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to + * disable them if your code already makes sure that everything is valid. + * @param {boolean} assert `true` to enable assertions, otherwise `false` + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.assert = function(assert) { this.noAssert = !assert; return this; }; - /** - * Gets the capacity of this ByteBuffer's backing buffer. - * @returns {number} Capacity of the backing buffer - * @expose + /** + * Gets the capacity of this ByteBuffer's backing buffer. + * @returns {number} Capacity of the backing buffer + * @expose */ ByteBufferPrototype.capacity = function() { return this.buffer.byteLength; }; - /** - * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the - * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. - * @returns {!ByteBuffer} this - * @expose + /** + * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the + * backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.clear = function() { this.offset = 0; this.limit = this.buffer.byteLength; this.markedOffset = -1; return this; }; - /** - * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset}, - * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}. - * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false` - * @returns {!ByteBuffer} Cloned instance - * @expose + /** + * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset}, + * {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}. + * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false` + * @returns {!ByteBuffer} Cloned instance + * @expose */ ByteBufferPrototype.clone = function(copy) { var bb = new ByteBuffer(0, this.littleEndian, this.noAssert); if (copy) { @@ -74331,14 +74331,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { bb.limit = this.limit; return bb; }; - /** - * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes - * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and - * adapt {@link ByteBuffer#markedOffset} to the same relative position if set. - * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} - * @returns {!ByteBuffer} this - * @expose + /** + * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes + * between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and + * adapt {@link ByteBuffer#markedOffset} to the same relative position if set. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.compact = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74369,13 +74369,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.limit = len; return this; }; - /** - * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and - * {@link ByteBuffer#limit}. - * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. - * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. - * @returns {!ByteBuffer} Copy - * @expose + /** + * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Copy + * @expose */ ByteBufferPrototype.copy = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74394,17 +74394,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.copyTo(bb, 0, begin, end); return bb; }; - /** - * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and - * {@link ByteBuffer#limit}. - * @param {!ByteBuffer} target Target ByteBuffer - * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} - * by the number of bytes copied if omitted. - * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the - * number of bytes copied if omitted. - * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} - * @returns {!ByteBuffer} this - * @expose + /** + * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset} + * by the number of bytes copied if omitted. + * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the + * number of bytes copied if omitted. + * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) { var relative, targetRelative; if (!this.noAssert) { @@ -74423,28 +74423,28 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (targetRelative) target.offset += len; return this; }; - /** - * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the - * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, - * the required capacity will be used instead. - * @param {number} capacity Required capacity - * @returns {!ByteBuffer} this - * @expose + /** + * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the + * current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity, + * the required capacity will be used instead. + * @param {number} capacity Required capacity + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.ensureCapacity = function(capacity) { var current = this.buffer.byteLength; if (current < capacity) return this.resize((current *= 2) > capacity ? current : capacity); return this; }; - /** - * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between - * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. - * @param {number|string} value Byte value to fill with. If given as a string, the first character is used. - * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes - * written if omitted. defaults to {@link ByteBuffer#offset}. - * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. - * @returns {!ByteBuffer} this - * @expose - * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes + /** + * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {number|string} value Byte value to fill with. If given as a string, the first character is used. + * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes + * written if omitted. defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} this + * @expose + * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes */ ByteBufferPrototype.fill = function(value, begin, end) { var relative = typeof begin === "undefined"; if (relative) begin = this.offset; @@ -74465,24 +74465,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset = begin; return this; }; - /** - * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and - * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. - * @returns {!ByteBuffer} this - * @expose + /** + * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and + * `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.flip = function() { this.limit = this.offset; this.offset = 0; return this; }; - /** - * Marks an offset on this ByteBuffer to be used later. - * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}. - * @returns {!ByteBuffer} this - * @throws {TypeError} If `offset` is not a valid number - * @throws {RangeError} If `offset` is out of bounds - * @see ByteBuffer#reset - * @expose + /** + * Marks an offset on this ByteBuffer to be used later. + * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}. + * @returns {!ByteBuffer} this + * @throws {TypeError} If `offset` is not a valid number + * @throws {RangeError} If `offset` is out of bounds + * @see ByteBuffer#reset + * @expose */ ByteBufferPrototype.mark = function(offset) { offset = typeof offset === "undefined" ? this.offset : offset; if (!this.noAssert) { @@ -74493,11 +74493,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.markedOffset = offset; return this; }; - /** - * Sets the byte order. - * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian - * @returns {!ByteBuffer} this - * @expose + /** + * Sets the byte order. + * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.order = function(littleEndian) { if (!this.noAssert) { if (typeof littleEndian !== "boolean") throw TypeError("Illegal littleEndian: Not a boolean"); @@ -74505,37 +74505,37 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.littleEndian = !!littleEndian; return this; }; - /** - * Switches (to) little endian byte order. - * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian - * @returns {!ByteBuffer} this - * @expose + /** + * Switches (to) little endian byte order. + * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.LE = function(littleEndian) { this.littleEndian = typeof littleEndian !== "undefined" ? !!littleEndian : true; return this; }; - /** - * Switches (to) big endian byte order. - * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian - * @returns {!ByteBuffer} this - * @expose + /** + * Switches (to) big endian byte order. + * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.BE = function(bigEndian) { this.littleEndian = typeof bigEndian !== "undefined" ? !bigEndian : false; return this; }; - /** - * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the - * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer - * will be resized and its contents moved accordingly. - * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be - * modified according to the performed read operation. - * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") - * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes - * prepended if omitted. - * @returns {!ByteBuffer} this - * @expose - * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` - * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` + /** + * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be + * modified according to the performed read operation. + * @param {(string|number)=} encoding Encoding if `data` is a string ("base64", "hex", "binary", defaults to "utf8") + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|` + * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|` */ ByteBufferPrototype.prepend = function(source, encoding, offset) { if (typeof encoding === "number" || typeof encoding !== "string") { offset = encoding; @@ -74568,43 +74568,43 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (relative) this.offset -= len; return this; }; - /** - * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the - * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer - * will be resized and its contents moved accordingly. - * @param {!ByteBuffer} target Target ByteBuffer - * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes - * prepended if omitted. - * @returns {!ByteBuffer} this - * @expose - * @see ByteBuffer#prepend + /** + * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the + * prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer + * will be resized and its contents moved accordingly. + * @param {!ByteBuffer} target Target ByteBuffer + * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes + * prepended if omitted. + * @returns {!ByteBuffer} this + * @expose + * @see ByteBuffer#prepend */ ByteBufferPrototype.prependTo = function(target, offset) { target.prepend(this, offset); return this; }; - /** - * Prints debug information about this ByteBuffer's contents. - * @param {function(string)=} out Output function to call, defaults to console.log - * @expose + /** + * Prints debug information about this ByteBuffer's contents. + * @param {function(string)=} out Output function to call, defaults to console.log + * @expose */ ByteBufferPrototype.printDebug = function(out) { if (typeof out !== "function") out = console.log.bind(console); out(this.toString() + "\n" + "-------------------------------------------------------------------\n" + this.toDebug(/* columns */ true)); }; - /** - * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and - * {@link ByteBuffer#limit}, so this returns `limit - offset`. - * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. - * @expose + /** + * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and + * {@link ByteBuffer#limit}, so this returns `limit - offset`. + * @returns {number} Remaining readable bytes. May be negative if `offset > limit`. + * @expose */ ByteBufferPrototype.remaining = function() { return this.limit - this.offset; }; - /** - * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} - * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been - * marked, sets `offset = 0`. - * @returns {!ByteBuffer} this - * @see ByteBuffer#mark - * @expose + /** + * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark} + * before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been + * marked, sets `offset = 0`. + * @returns {!ByteBuffer} this + * @see ByteBuffer#mark + * @expose */ ByteBufferPrototype.reset = function() { if (this.markedOffset >= 0) { this.offset = this.markedOffset; @@ -74612,14 +74612,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } else this.offset = 0; return this; }; - /** - * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that - * large or larger. - * @param {number} capacity Capacity required - * @returns {!ByteBuffer} this - * @throws {TypeError} If `capacity` is not a number - * @throws {RangeError} If `capacity < 0` - * @expose + /** + * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that + * large or larger. + * @param {number} capacity Capacity required + * @returns {!ByteBuffer} this + * @throws {TypeError} If `capacity` is not a number + * @throws {RangeError} If `capacity < 0` + * @expose */ ByteBufferPrototype.resize = function(capacity) { if (!this.noAssert) { if (typeof capacity !== "number" || capacity % 1 !== 0) throw TypeError("Illegal capacity: " + capacity + " (not an integer)"); @@ -74635,12 +74635,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return this; }; - /** - * Reverses this ByteBuffer's contents. - * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} - * @returns {!ByteBuffer} this - * @expose + /** + * Reverses this ByteBuffer's contents. + * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.reverse = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74655,11 +74655,11 @@ Object.defineProperty(Long.prototype, "__isLong__", { Array.prototype.reverse.call(this.view.subarray(begin, end)); return this; }; - /** - * Skips the next `length` bytes. This will just advance - * @param {number} length Number of bytes to skip. May also be negative to move the offset back. - * @returns {!ByteBuffer} this - * @expose + /** + * Skips the next `length` bytes. This will just advance + * @param {number} length Number of bytes to skip. May also be negative to move the offset back. + * @returns {!ByteBuffer} this + * @expose */ ByteBufferPrototype.skip = function(length) { if (!this.noAssert) { if (typeof length !== "number" || length % 1 !== 0) throw TypeError("Illegal length: " + length + " (not an integer)"); @@ -74672,12 +74672,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { this.offset = offset; return this; }; - /** - * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. - * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. - * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. - * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} - * @expose + /** + * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`. + * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}. + * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}. + * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer} + * @expose */ ByteBufferPrototype.slice = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74693,13 +74693,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { bb.limit = end; return bb; }; - /** - * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between - * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. - * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if - * possible. Defaults to `false` - * @returns {!ArrayBuffer} Contents as an ArrayBuffer - * @expose + /** + * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if + * possible. Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose */ ByteBufferPrototype.toBuffer = function(forceCopy) { var offset = this.offset, limit = this.limit; if (!this.noAssert) { @@ -74717,25 +74717,25 @@ Object.defineProperty(Long.prototype, "__isLong__", { new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0); return buffer; }; - /** - * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between - * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}. - * @function - * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. - * Defaults to `false` - * @returns {!ArrayBuffer} Contents as an ArrayBuffer - * @expose + /** + * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between + * {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}. + * @function + * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory. + * Defaults to `false` + * @returns {!ArrayBuffer} Contents as an ArrayBuffer + * @expose */ ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer; - /** - * Converts the ByteBuffer's contents to a string. - * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows - * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with - * highlighted offsets. - * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} - * @returns {string} String representation - * @throws {Error} If `encoding` is invalid - * @expose + /** + * Converts the ByteBuffer's contents to a string. + * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows + * direct conversion to "utf8", "hex", "base64" and "binary" encoding. "debug" returns a hex representation with + * highlighted offsets. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset} + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit} + * @returns {string} String representation + * @throws {Error} If `encoding` is invalid + * @expose */ ByteBufferPrototype.toString = function(encoding, begin, end) { if (typeof encoding === "undefined") return "ByteBufferAB(offset=" + this.offset + ",markedOffset=" + this.markedOffset + ",limit=" + this.limit + ",capacity=" + this.capacity() + ")"; if (typeof encoding === "number") encoding = "utf8", begin = encoding, end = begin; @@ -74757,21 +74757,21 @@ Object.defineProperty(Long.prototype, "__isLong__", { } }; // lxiv-embeddable - /** - * lxiv-embeddable (c) 2014 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/lxiv for details + /** + * lxiv-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/lxiv for details */ var lxiv = function() { "use strict"; - /** - * lxiv namespace. - * @type {!Object.} - * @exports lxiv + /** + * lxiv namespace. + * @type {!Object.} + * @exports lxiv */ var lxiv = {}; - /** - * Character codes for output. - * @type {!Array.} - * @inner + /** + * Character codes for output. + * @type {!Array.} + * @inner */ var aout = [ 65, 66, @@ -74838,18 +74838,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { 43, 47 ]; - /** - * Character codes for input. - * @type {!Array.} - * @inner + /** + * Character codes for input. + * @type {!Array.} + * @inner */ var ain = []; for(var i = 0, k = aout.length; i < k; ++i)ain[aout[i]] = i; - /** - * Encodes bytes to base64 char codes. - * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if - * there are no more bytes left. - * @param {!function(number)} dst Characters destination as a function successively called with each encoded char - * code. + /** + * Encodes bytes to base64 char codes. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if + * there are no more bytes left. + * @param {!function(number)} dst Characters destination as a function successively called with each encoded char + * code. */ lxiv.encode = function(src, dst) { var b, t; while((b = src()) !== null){ @@ -74864,12 +74864,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { } else dst(aout[t & 0x3f]), dst(61), dst(61); } }; - /** - * Decodes base64 char codes to bytes. - * @param {!function():number|null} src Characters source as a function returning the next char code respectively - * `null` if there are no more characters left. - * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. - * @throws {Error} If a character code is invalid + /** + * Decodes base64 char codes to bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + * @throws {Error} If a character code is invalid */ lxiv.decode = function(src, dst) { var c, t1, t2; function fail(c) { @@ -74901,23 +74901,23 @@ Object.defineProperty(Long.prototype, "__isLong__", { } } }; - /** - * Tests if a string is valid base64. - * @param {string} str String to test - * @returns {boolean} `true` if valid, otherwise `false` + /** + * Tests if a string is valid base64. + * @param {string} str String to test + * @returns {boolean} `true` if valid, otherwise `false` */ lxiv.test = function(str) { return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str); }; return lxiv; }(); // encodings/base64 - /** - * Encodes this ByteBuffer's contents to a base64 encoded string. - * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. - * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. - * @returns {string} Base64 encoded string - * @throws {RangeError} If `begin` or `end` is out of bounds - * @expose + /** + * Encodes this ByteBuffer's contents to a base64 encoded string. + * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}. + * @returns {string} Base64 encoded string + * @throws {RangeError} If `begin` or `end` is out of bounds + * @expose */ ByteBufferPrototype.toBase64 = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74930,13 +74930,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { }).bind(this), sd = stringDestination()); return sd(); }; - /** - * Decodes a base64 encoded string to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + /** + * Decodes a base64 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose */ ByteBuffer.fromBase64 = function(str, littleEndian) { if (typeof str !== "string") throw TypeError("str"); var bb = new ByteBuffer(str.length / 4 * 3, littleEndian), i = 0; @@ -74946,32 +74946,32 @@ Object.defineProperty(Long.prototype, "__isLong__", { bb.limit = i; return bb; }; - /** - * Encodes a binary string to base64 like `window.btoa` does. - * @param {string} str Binary string - * @returns {string} Base64 encoded string - * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa - * @expose + /** + * Encodes a binary string to base64 like `window.btoa` does. + * @param {string} str Binary string + * @returns {string} Base64 encoded string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa + * @expose */ ByteBuffer.btoa = function(str) { return ByteBuffer.fromBinary(str).toBase64(); }; - /** - * Decodes a base64 encoded string to binary like `window.atob` does. - * @param {string} b64 Base64 encoded string - * @returns {string} Binary string - * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob - * @expose + /** + * Decodes a base64 encoded string to binary like `window.atob` does. + * @param {string} b64 Base64 encoded string + * @returns {string} Binary string + * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob + * @expose */ ByteBuffer.atob = function(b64) { return ByteBuffer.fromBase64(b64).toBinary(); }; // encodings/binary - /** - * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. - * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. - * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. - * @returns {string} Binary encoded string - * @throws {RangeError} If `offset > limit` - * @expose + /** + * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Binary encoded string + * @throws {RangeError} If `offset > limit` + * @expose */ ByteBufferPrototype.toBinary = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -74986,13 +74986,13 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return parts.join("") + String.fromCharCode.apply(String, chars); }; - /** - * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + /** + * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @returns {!ByteBuffer} ByteBuffer + * @expose */ ByteBuffer.fromBinary = function(str, littleEndian) { if (typeof str !== "string") throw TypeError("str"); var i = 0, k = str.length, charCode, bb = new ByteBuffer(k, littleEndian); @@ -75005,22 +75005,22 @@ Object.defineProperty(Long.prototype, "__isLong__", { return bb; }; // encodings/debug - /** - * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: - * * `<` : offset, - * * `'` : markedOffset, - * * `>` : limit, - * * `|` : offset and limit, - * * `[` : offset and markedOffset, - * * `]` : markedOffset and limit, - * * `!` : offset, markedOffset and limit - * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` - * @returns {string|!Array.} Debug string or array of lines if `asArray = true` - * @expose - * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` - * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` - * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` - * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` + /** + * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are: + * * `<` : offset, + * * `'` : markedOffset, + * * `>` : limit, + * * `|` : offset and limit, + * * `[` : offset and markedOffset, + * * `]` : markedOffset and limit, + * * `!` : offset, markedOffset and limit + * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false` + * @returns {string|!Array.} Debug string or array of lines if `asArray = true` + * @expose + * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3` + * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4` + * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1` + * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1` */ ByteBufferPrototype.toDebug = function(columns) { var i = -1, k = this.buffer.byteLength, b, hex = "", asc = "", out = ""; while(i < k){ @@ -75049,16 +75049,16 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return columns ? out : hex; }; - /** - * Decodes a hex encoded string with marked offsets to a ByteBuffer. - * @param {string} str Debug string to decode (not be generated with `columns = true`) - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer - * @expose - * @see ByteBuffer#toDebug + /** + * Decodes a hex encoded string with marked offsets to a ByteBuffer. + * @param {string} str Debug string to decode (not be generated with `columns = true`) + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose + * @see ByteBuffer#toDebug */ ByteBuffer.fromDebug = function(str, littleEndian, noAssert) { var k = str.length, bb = new ByteBuffer((k + 1) / 3 | 0, littleEndian, noAssert); var i = 0, j = 0, ch, b, rs = false, ho = false, hm = false, hl = false, fail = false; @@ -75167,12 +75167,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { return bb; }; // encodings/hex - /** - * Encodes this ByteBuffer's contents to a hex encoded string. - * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. - * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. - * @returns {string} Hex encoded string - * @expose + /** + * Encodes this ByteBuffer's contents to a hex encoded string. + * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}. + * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}. + * @returns {string} Hex encoded string + * @expose */ ByteBufferPrototype.toHex = function(begin, end) { begin = typeof begin === "undefined" ? this.offset : begin; end = typeof end === "undefined" ? this.limit : end; @@ -75191,15 +75191,15 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return out.join(""); }; - /** - * Decodes a hex encoded string to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + /** + * Decodes a hex encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose */ ByteBuffer.fromHex = function(str, littleEndian, noAssert) { if (!noAssert) { if (typeof str !== "string") throw TypeError("Illegal str: Not a string"); @@ -75217,27 +75217,27 @@ Object.defineProperty(Long.prototype, "__isLong__", { return bb; }; // utfx-embeddable - /** - * utfx-embeddable (c) 2014 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/utfx for details + /** + * utfx-embeddable (c) 2014 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/utfx for details */ var utfx = function() { "use strict"; - /** - * utfx namespace. - * @inner - * @type {!Object.} + /** + * utfx namespace. + * @inner + * @type {!Object.} */ var utfx = {}; - /** - * Maximum valid code point. - * @type {number} - * @const + /** + * Maximum valid code point. + * @type {number} + * @const */ utfx.MAX_CODEPOINT = 0x10FFFF; - /** - * Encodes UTF8 code points to UTF8 bytes. - * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point - * respectively `null` if there are no more code points left or a single numeric code point. - * @param {!function(number)} dst Bytes destination as a function successively called with the next byte + /** + * Encodes UTF8 code points to UTF8 bytes. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte */ utfx.encodeUTF8 = function(src, dst) { var cp = null; if (typeof src === "number") cp = src, src = function() { @@ -75251,14 +75251,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { cp = null; } }; - /** - * Decodes UTF8 bytes to UTF8 code points. - * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there - * are no more bytes left. - * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. - * @throws {RangeError} If a starting byte is invalid in UTF8 - * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the - * remaining bytes. + /** + * Decodes UTF8 bytes to UTF8 code points. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the + * remaining bytes. */ utfx.decodeUTF8 = function(src, dst) { var a, b, c, d, fail = function(b) { b = b.slice(0, b.indexOf(null)); @@ -75287,12 +75287,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { else throw RangeError("Illegal starting byte: " + a); } }; - /** - * Converts UTF16 characters to UTF8 code points. - * @param {!function():number|null} src Characters source as a function returning the next char code respectively - * `null` if there are no more characters left. - * @param {!function(number)} dst Code points destination as a function successively called with each converted code - * point. + /** + * Converts UTF16 characters to UTF8 code points. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @param {!function(number)} dst Code points destination as a function successively called with each converted code + * point. */ utfx.UTF16toUTF8 = function(src, dst) { var c1, c2 = null; while(true){ @@ -75310,12 +75310,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { } if (c2 !== null) dst(c2); }; - /** - * Converts UTF8 code points to UTF16 characters. - * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point - * respectively `null` if there are no more code points left or a single numeric code point. - * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. - * @throws {RangeError} If a code point is out of range + /** + * Converts UTF8 code points to UTF16 characters. + * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point + * respectively `null` if there are no more code points left or a single numeric code point. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a code point is out of range */ utfx.UTF8toUTF16 = function(src, dst) { var cp = null; if (typeof src === "number") cp = src, src = function() { @@ -75327,50 +75327,50 @@ Object.defineProperty(Long.prototype, "__isLong__", { cp = null; } }; - /** - * Converts and encodes UTF16 characters to UTF8 bytes. - * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` - * if there are no more characters left. - * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. + /** + * Converts and encodes UTF16 characters to UTF8 bytes. + * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null` + * if there are no more characters left. + * @param {!function(number)} dst Bytes destination as a function successively called with the next byte. */ utfx.encodeUTF16toUTF8 = function(src, dst) { utfx.UTF16toUTF8(src, function(cp) { utfx.encodeUTF8(cp, dst); }); }; - /** - * Decodes and converts UTF8 bytes to UTF16 characters. - * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there - * are no more bytes left. - * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. - * @throws {RangeError} If a starting byte is invalid in UTF8 - * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. + /** + * Decodes and converts UTF8 bytes to UTF16 characters. + * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there + * are no more bytes left. + * @param {!function(number)} dst Characters destination as a function successively called with each converted char code. + * @throws {RangeError} If a starting byte is invalid in UTF8 + * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes. */ utfx.decodeUTF8toUTF16 = function(src, dst) { utfx.decodeUTF8(src, function(cp) { utfx.UTF8toUTF16(cp, dst); }); }; - /** - * Calculates the byte length of an UTF8 code point. - * @param {number} cp UTF8 code point - * @returns {number} Byte length + /** + * Calculates the byte length of an UTF8 code point. + * @param {number} cp UTF8 code point + * @returns {number} Byte length */ utfx.calculateCodePoint = function(cp) { return cp < 0x80 ? 1 : cp < 0x800 ? 2 : cp < 0x10000 ? 3 : 4; }; - /** - * Calculates the number of UTF8 bytes required to store UTF8 code points. - * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively - * `null` if there are no more code points left. - * @returns {number} The number of UTF8 bytes required + /** + * Calculates the number of UTF8 bytes required to store UTF8 code points. + * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively + * `null` if there are no more code points left. + * @returns {number} The number of UTF8 bytes required */ utfx.calculateUTF8 = function(src) { var cp, l = 0; while((cp = src()) !== null)l += cp < 0x80 ? 1 : cp < 0x800 ? 2 : cp < 0x10000 ? 3 : 4; return l; }; - /** - * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. - * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively - * `null` if there are no more characters left. - * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. + /** + * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes. + * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively + * `null` if there are no more characters left. + * @returns {!Array.} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1. */ utfx.calculateUTF16asUTF8 = function(src) { var n = 0, l = 0; utfx.UTF16toUTF8(src, function(cp) { @@ -75385,12 +75385,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { return utfx; }(); // encodings/utf8 - /** - * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded - * string. - * @returns {string} Hex encoded string - * @throws {RangeError} If `offset > limit` - * @expose + /** + * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded + * string. + * @returns {string} Hex encoded string + * @throws {RangeError} If `offset > limit` + * @expose */ ByteBufferPrototype.toUTF8 = function(begin, end) { if (typeof begin === "undefined") begin = this.offset; if (typeof end === "undefined") end = this.limit; @@ -75411,15 +75411,15 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return sd(); }; - /** - * Decodes an UTF8 encoded string to a ByteBuffer. - * @param {string} str String to decode - * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to - * {@link ByteBuffer.DEFAULT_ENDIAN}. - * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to - * {@link ByteBuffer.DEFAULT_NOASSERT}. - * @returns {!ByteBuffer} ByteBuffer - * @expose + /** + * Decodes an UTF8 encoded string to a ByteBuffer. + * @param {string} str String to decode + * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to + * {@link ByteBuffer.DEFAULT_ENDIAN}. + * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to + * {@link ByteBuffer.DEFAULT_NOASSERT}. + * @returns {!ByteBuffer} ByteBuffer + * @expose */ ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) { if (!noAssert) { if (typeof str !== "string") throw TypeError("Illegal str: Not a string"); @@ -75435,52 +75435,52 @@ Object.defineProperty(Long.prototype, "__isLong__", { }); },{"704c3fe1485416e9":"bf0yc"}],"bf0yc":[function(require,module,exports) { -/* - Copyright 2013 Daniel Wirtz - Copyright 2009 The Closure Library Authors. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS-IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ /** - * @license long.js (c) 2013 Daniel Wirtz - * Released under the Apache License, Version 2.0 - * see: https://github.com/dcodeIO/long.js for details +/* + Copyright 2013 Daniel Wirtz + Copyright 2009 The Closure Library Authors. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS-IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ /** + * @license long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/long.js for details */ (function(global, factory) { /* AMD */ if (typeof define === "function" && define["amd"]) define([], factory); else if (module && module["exports"]) module["exports"] = factory(); else (global["dcodeIO"] = global["dcodeIO"] || {})["Long"] = factory(); })(this, function() { "use strict"; - /** - * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. - * See the from* functions below for more convenient ways of constructing Longs. - * @exports Long - * @class A Long class for representing a 64 bit two's-complement integer value. - * @param {number} low The low (signed) 32 bits of the long - * @param {number} high The high (signed) 32 bits of the long - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @constructor + /** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * @exports Long + * @class A Long class for representing a 64 bit two's-complement integer value. + * @param {number} low The low (signed) 32 bits of the long + * @param {number} high The high (signed) 32 bits of the long + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @constructor */ function Long(low, high, unsigned) { - /** - * The low 32 bits as a signed value. - * @type {number} + /** + * The low 32 bits as a signed value. + * @type {number} */ this.low = low | 0; - /** - * The high 32 bits as a signed value. - * @type {number} + /** + * The high 32 bits as a signed value. + * @type {number} */ this.high = high | 0; - /** - * Whether unsigned or not. - * @type {boolean} + /** + * Whether unsigned or not. + * @type {boolean} */ this.unsigned = !!unsigned; } // The internal representation of a long is the two given signed, 32-bit values. @@ -75499,46 +75499,46 @@ Object.defineProperty(Long.prototype, "__isLong__", { // // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from* // methods on which they depend. - /** - * An indicator used to reliably determine if an object is a Long or not. - * @type {boolean} - * @const - * @private + /** + * An indicator used to reliably determine if an object is a Long or not. + * @type {boolean} + * @const + * @private */ Long.prototype.__isLong__; Object.defineProperty(Long.prototype, "__isLong__", { value: true, enumerable: false, configurable: false }); - /** - * @function - * @param {*} obj Object - * @returns {boolean} - * @inner + /** + * @function + * @param {*} obj Object + * @returns {boolean} + * @inner */ function isLong(obj) { return (obj && obj["__isLong__"]) === true; } - /** - * Tests if the specified object is a Long. - * @function - * @param {*} obj Object - * @returns {boolean} + /** + * Tests if the specified object is a Long. + * @function + * @param {*} obj Object + * @returns {boolean} */ Long.isLong = isLong; - /** - * A cache of the Long representations of small integer values. - * @type {!Object} - * @inner + /** + * A cache of the Long representations of small integer values. + * @type {!Object} + * @inner */ var INT_CACHE = {}; - /** - * A cache of the Long representations of small unsigned integer values. - * @type {!Object} - * @inner + /** + * A cache of the Long representations of small unsigned integer values. + * @type {!Object} + * @inner */ var UINT_CACHE = {}; - /** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromInt(value, unsigned) { var obj, cachedObj, cache; if (unsigned) { @@ -75561,18 +75561,18 @@ Object.defineProperty(Long.prototype, "__isLong__", { return obj; } } - /** - * Returns a Long representing the given 32 bit integer value. - * @function - * @param {number} value The 32 bit integer in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @returns {!Long} The corresponding Long value + /** + * Returns a Long representing the given 32 bit integer value. + * @function + * @param {number} value The 32 bit integer in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value */ Long.fromInt = fromInt; - /** - * @param {number} value - * @param {boolean=} unsigned - * @returns {!Long} - * @inner + /** + * @param {number} value + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromNumber(value, unsigned) { if (isNaN(value) || !isFinite(value)) return unsigned ? UZERO : ZERO; if (unsigned) { @@ -75585,44 +75585,44 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (value < 0) return fromNumber(-value, unsigned).neg(); return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned); } - /** - * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. - * @function - * @param {number} value The number in question - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @returns {!Long} The corresponding Long value + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @function + * @param {number} value The number in question + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value */ Long.fromNumber = fromNumber; - /** - * @param {number} lowBits - * @param {number} highBits - * @param {boolean=} unsigned - * @returns {!Long} - * @inner + /** + * @param {number} lowBits + * @param {number} highBits + * @param {boolean=} unsigned + * @returns {!Long} + * @inner */ function fromBits(lowBits, highBits, unsigned) { return new Long(lowBits, highBits, unsigned); } - /** - * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is - * assumed to use 32 bits. - * @function - * @param {number} lowBits The low 32 bits - * @param {number} highBits The high 32 bits - * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed - * @returns {!Long} The corresponding Long value + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is + * assumed to use 32 bits. + * @function + * @param {number} lowBits The low 32 bits + * @param {number} highBits The high 32 bits + * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed + * @returns {!Long} The corresponding Long value */ Long.fromBits = fromBits; - /** - * @function - * @param {number} base - * @param {number} exponent - * @returns {number} - * @inner + /** + * @function + * @param {number} base + * @param {number} exponent + * @returns {number} + * @inner */ var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4) - /** - * @param {string} str - * @param {(boolean|number)=} unsigned - * @param {number=} radix - * @returns {!Long} - * @inner + /** + * @param {string} str + * @param {(boolean|number)=} unsigned + * @param {number=} radix + * @returns {!Long} + * @inner */ function fromString(str, unsigned, radix) { if (str.length === 0) throw Error("empty string"); if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity") return ZERO; @@ -75651,19 +75651,19 @@ Object.defineProperty(Long.prototype, "__isLong__", { result.unsigned = unsigned; return result; } - /** - * Returns a Long representation of the given string, written using the specified radix. - * @function - * @param {string} str The textual representation of the Long - * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed - * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 - * @returns {!Long} The corresponding Long value + /** + * Returns a Long representation of the given string, written using the specified radix. + * @function + * @param {string} str The textual representation of the Long + * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed + * @param {number=} radix The radix in which the text is written (2-36), defaults to 10 + * @returns {!Long} The corresponding Long value */ Long.fromString = fromString; - /** - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val - * @returns {!Long} - * @inner + /** + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val + * @returns {!Long} + * @inner */ function fromValue(val) { if (val /* is compatible */ instanceof Long) return val; if (typeof val === "number") return fromNumber(val); @@ -75671,131 +75671,131 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Throws for non-objects, converts non-instanceof Long: return fromBits(val.low, val.high, val.unsigned); } - /** - * Converts the specified value to a Long. - * @function - * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value - * @returns {!Long} + /** + * Converts the specified value to a Long. + * @function + * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value + * @returns {!Long} */ Long.fromValue = fromValue; // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be // no runtime penalty for these. - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_16_DBL = 65536; - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_24_DBL = 16777216; - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL; - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL; - /** - * @type {number} - * @const - * @inner + /** + * @type {number} + * @const + * @inner */ var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2; - /** - * @type {!Long} - * @const - * @inner + /** + * @type {!Long} + * @const + * @inner */ var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL); - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var ZERO = fromInt(0); - /** - * Signed zero. - * @type {!Long} + /** + * Signed zero. + * @type {!Long} */ Long.ZERO = ZERO; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var UZERO = fromInt(0, true); - /** - * Unsigned zero. - * @type {!Long} + /** + * Unsigned zero. + * @type {!Long} */ Long.UZERO = UZERO; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var ONE = fromInt(1); - /** - * Signed one. - * @type {!Long} + /** + * Signed one. + * @type {!Long} */ Long.ONE = ONE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var UONE = fromInt(1, true); - /** - * Unsigned one. - * @type {!Long} + /** + * Unsigned one. + * @type {!Long} */ Long.UONE = UONE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var NEG_ONE = fromInt(-1); - /** - * Signed negative one. - * @type {!Long} + /** + * Signed negative one. + * @type {!Long} */ Long.NEG_ONE = NEG_ONE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var MAX_VALUE = fromBits(-1, 2147483647, false); - /** - * Maximum signed value. - * @type {!Long} + /** + * Maximum signed value. + * @type {!Long} */ Long.MAX_VALUE = MAX_VALUE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var MAX_UNSIGNED_VALUE = fromBits(-1, -1, true); - /** - * Maximum unsigned value. - * @type {!Long} + /** + * Maximum unsigned value. + * @type {!Long} */ Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE; - /** - * @type {!Long} - * @inner + /** + * @type {!Long} + * @inner */ var MIN_VALUE = fromBits(0, -2147483648, false); - /** - * Minimum signed value. - * @type {!Long} + /** + * Minimum signed value. + * @type {!Long} */ Long.MIN_VALUE = MIN_VALUE; - /** - * @alias Long.prototype - * @inner + /** + * @alias Long.prototype + * @inner */ var LongPrototype = Long.prototype; - /** - * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. - * @returns {number} + /** + * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. + * @returns {number} */ LongPrototype.toInt = function toInt() { return this.unsigned ? this.low >>> 0 : this.low; }; - /** - * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). - * @returns {number} + /** + * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). + * @returns {number} */ LongPrototype.toNumber = function toNumber() { if (this.unsigned) return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0); return this.high * TWO_PWR_32_DBL + (this.low >>> 0); }; - /** - * Converts the Long to a string written in the specified radix. - * @param {number=} radix Radix (2-36), defaults to 10 - * @returns {string} - * @override - * @throws {RangeError} If `radix` is out of range + /** + * Converts the Long to a string written in the specified radix. + * @param {number=} radix Radix (2-36), defaults to 10 + * @returns {string} + * @override + * @throws {RangeError} If `radix` is out of range */ LongPrototype.toString = function toString(radix) { radix = radix || 10; if (radix < 2 || 36 < radix) throw RangeError("radix"); @@ -75822,154 +75822,154 @@ Object.defineProperty(Long.prototype, "__isLong__", { } } }; - /** - * Gets the high 32 bits as a signed integer. - * @returns {number} Signed high bits + /** + * Gets the high 32 bits as a signed integer. + * @returns {number} Signed high bits */ LongPrototype.getHighBits = function getHighBits() { return this.high; }; - /** - * Gets the high 32 bits as an unsigned integer. - * @returns {number} Unsigned high bits + /** + * Gets the high 32 bits as an unsigned integer. + * @returns {number} Unsigned high bits */ LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() { return this.high >>> 0; }; - /** - * Gets the low 32 bits as a signed integer. - * @returns {number} Signed low bits + /** + * Gets the low 32 bits as a signed integer. + * @returns {number} Signed low bits */ LongPrototype.getLowBits = function getLowBits() { return this.low; }; - /** - * Gets the low 32 bits as an unsigned integer. - * @returns {number} Unsigned low bits + /** + * Gets the low 32 bits as an unsigned integer. + * @returns {number} Unsigned low bits */ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { return this.low >>> 0; }; - /** - * Gets the number of bits needed to represent the absolute value of this Long. - * @returns {number} + /** + * Gets the number of bits needed to represent the absolute value of this Long. + * @returns {number} */ LongPrototype.getNumBitsAbs = function getNumBitsAbs() { if (this.isNegative()) return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); var val = this.high != 0 ? this.high : this.low; for(var bit = 31; bit > 0; bit--)if ((val & 1 << bit) != 0) break; return this.high != 0 ? bit + 33 : bit + 1; }; - /** - * Tests if this Long's value equals zero. - * @returns {boolean} + /** + * Tests if this Long's value equals zero. + * @returns {boolean} */ LongPrototype.isZero = function isZero() { return this.high === 0 && this.low === 0; }; - /** - * Tests if this Long's value is negative. - * @returns {boolean} + /** + * Tests if this Long's value is negative. + * @returns {boolean} */ LongPrototype.isNegative = function isNegative() { return !this.unsigned && this.high < 0; }; - /** - * Tests if this Long's value is positive. - * @returns {boolean} + /** + * Tests if this Long's value is positive. + * @returns {boolean} */ LongPrototype.isPositive = function isPositive() { return this.unsigned || this.high >= 0; }; - /** - * Tests if this Long's value is odd. - * @returns {boolean} + /** + * Tests if this Long's value is odd. + * @returns {boolean} */ LongPrototype.isOdd = function isOdd() { return (this.low & 1) === 1; }; - /** - * Tests if this Long's value is even. - * @returns {boolean} + /** + * Tests if this Long's value is even. + * @returns {boolean} */ LongPrototype.isEven = function isEven() { return (this.low & 1) === 0; }; - /** - * Tests if this Long's value equals the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value equals the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.equals = function equals(other) { if (!isLong(other)) other = fromValue(other); if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1) return false; return this.high === other.high && this.low === other.low; }; - /** - * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.eq = LongPrototype.equals; - /** - * Tests if this Long's value differs from the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value differs from the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.notEquals = function notEquals(other) { return !this.eq(/* validates */ other); }; - /** - * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.neq = LongPrototype.notEquals; - /** - * Tests if this Long's value is less than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is less than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lessThan = function lessThan(other) { return this.comp(/* validates */ other) < 0; }; - /** - * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lt = LongPrototype.lessThan; - /** - * Tests if this Long's value is less than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is less than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) { return this.comp(/* validates */ other) <= 0; }; - /** - * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.lte = LongPrototype.lessThanOrEqual; - /** - * Tests if this Long's value is greater than the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is greater than the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.greaterThan = function greaterThan(other) { return this.comp(/* validates */ other) > 0; }; - /** - * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.gt = LongPrototype.greaterThan; - /** - * Tests if this Long's value is greater than or equal the specified's. - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is greater than or equal the specified's. + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) { return this.comp(/* validates */ other) >= 0; }; - /** - * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. - * @function - * @param {!Long|number|string} other Other value - * @returns {boolean} + /** + * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}. + * @function + * @param {!Long|number|string} other Other value + * @returns {boolean} */ LongPrototype.gte = LongPrototype.greaterThanOrEqual; - /** - * Compares this Long's value with the specified's. - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater + /** + * Compares this Long's value with the specified's. + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater */ LongPrototype.compare = function compare(other) { if (!isLong(other)) other = fromValue(other); if (this.eq(other)) return 0; @@ -75981,29 +75981,29 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Both are positive if at least one is unsigned return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1; }; - /** - * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. - * @function - * @param {!Long|number|string} other Other value - * @returns {number} 0 if they are the same, 1 if the this is greater and -1 - * if the given one is greater + /** + * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}. + * @function + * @param {!Long|number|string} other Other value + * @returns {number} 0 if they are the same, 1 if the this is greater and -1 + * if the given one is greater */ LongPrototype.comp = LongPrototype.compare; - /** - * Negates this Long's value. - * @returns {!Long} Negated Long + /** + * Negates this Long's value. + * @returns {!Long} Negated Long */ LongPrototype.negate = function negate() { if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE; return this.not().add(ONE); }; - /** - * Negates this Long's value. This is an alias of {@link Long#negate}. - * @function - * @returns {!Long} Negated Long + /** + * Negates this Long's value. This is an alias of {@link Long#negate}. + * @function + * @returns {!Long} Negated Long */ LongPrototype.neg = LongPrototype.negate; - /** - * Returns the sum of this and the specified Long. - * @param {!Long|number|string} addend Addend - * @returns {!Long} Sum + /** + * Returns the sum of this and the specified Long. + * @param {!Long|number|string} addend Addend + * @returns {!Long} Sum */ LongPrototype.add = function add(addend) { if (!isLong(addend)) addend = fromValue(addend); // Divide each number into 4 chunks of 16 bits, and then sum the chunks. @@ -76029,24 +76029,24 @@ Object.defineProperty(Long.prototype, "__isLong__", { c48 &= 0xFFFF; return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned); }; - /** - * Returns the difference of this and the specified Long. - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference + /** + * Returns the difference of this and the specified Long. + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference */ LongPrototype.subtract = function subtract(subtrahend) { if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend); return this.add(subtrahend.neg()); }; - /** - * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. - * @function - * @param {!Long|number|string} subtrahend Subtrahend - * @returns {!Long} Difference + /** + * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}. + * @function + * @param {!Long|number|string} subtrahend Subtrahend + * @returns {!Long} Difference */ LongPrototype.sub = LongPrototype.subtract; - /** - * Returns the product of this and the specified Long. - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product + /** + * Returns the product of this and the specified Long. + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product */ LongPrototype.multiply = function multiply(multiplier) { if (this.isZero()) return ZERO; if (!isLong(multiplier)) multiplier = fromValue(multiplier); @@ -76092,17 +76092,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { c48 &= 0xFFFF; return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned); }; - /** - * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. - * @function - * @param {!Long|number|string} multiplier Multiplier - * @returns {!Long} Product + /** + * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}. + * @function + * @param {!Long|number|string} multiplier Multiplier + * @returns {!Long} Product */ LongPrototype.mul = LongPrototype.multiply; - /** - * Returns this Long divided by the specified. The result is signed if this Long is signed or - * unsigned if this Long is unsigned. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient + /** + * Returns this Long divided by the specified. The result is signed if this Long is signed or + * unsigned if this Long is unsigned. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient */ LongPrototype.divide = function divide(divisor) { if (!isLong(divisor)) divisor = fromValue(divisor); if (divisor.isZero()) throw Error("division by zero"); @@ -76167,92 +76167,92 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return res; }; - /** - * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Quotient + /** + * Returns this Long divided by the specified. This is an alias of {@link Long#divide}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Quotient */ LongPrototype.div = LongPrototype.divide; - /** - * Returns this Long modulo the specified. - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder + /** + * Returns this Long modulo the specified. + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.modulo = function modulo(divisor) { if (!isLong(divisor)) divisor = fromValue(divisor); return this.sub(this.div(divisor).mul(divisor)); }; - /** - * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. - * @function - * @param {!Long|number|string} divisor Divisor - * @returns {!Long} Remainder + /** + * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}. + * @function + * @param {!Long|number|string} divisor Divisor + * @returns {!Long} Remainder */ LongPrototype.mod = LongPrototype.modulo; - /** - * Returns the bitwise NOT of this Long. - * @returns {!Long} + /** + * Returns the bitwise NOT of this Long. + * @returns {!Long} */ LongPrototype.not = function not() { return fromBits(~this.low, ~this.high, this.unsigned); }; - /** - * Returns the bitwise AND of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} + /** + * Returns the bitwise AND of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.and = function and(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low & other.low, this.high & other.high, this.unsigned); }; - /** - * Returns the bitwise OR of this Long and the specified. - * @param {!Long|number|string} other Other Long - * @returns {!Long} + /** + * Returns the bitwise OR of this Long and the specified. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.or = function or(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low | other.low, this.high | other.high, this.unsigned); }; - /** - * Returns the bitwise XOR of this Long and the given one. - * @param {!Long|number|string} other Other Long - * @returns {!Long} + /** + * Returns the bitwise XOR of this Long and the given one. + * @param {!Long|number|string} other Other Long + * @returns {!Long} */ LongPrototype.xor = function xor(other) { if (!isLong(other)) other = fromValue(other); return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned); }; - /** - * Returns this Long with bits shifted to the left by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits shifted to the left by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftLeft = function shiftLeft(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); if ((numBits &= 63) === 0) return this; else if (numBits < 32) return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned); else return fromBits(0, this.low << numBits - 32, this.unsigned); }; - /** - * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shl = LongPrototype.shiftLeft; - /** - * Returns this Long with bits arithmetically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftRight = function shiftRight(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); if ((numBits &= 63) === 0) return this; else if (numBits < 32) return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned); else return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned); }; - /** - * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shr = LongPrototype.shiftRight; - /** - * Returns this Long with bits logically shifted to the right by the given amount. - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) { if (isLong(numBits)) numBits = numBits.toInt(); numBits &= 63; @@ -76266,36 +76266,36 @@ Object.defineProperty(Long.prototype, "__isLong__", { else return fromBits(high >>> numBits - 32, 0, this.unsigned); } }; - /** - * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. - * @function - * @param {number|!Long} numBits Number of bits - * @returns {!Long} Shifted Long + /** + * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}. + * @function + * @param {number|!Long} numBits Number of bits + * @returns {!Long} Shifted Long */ LongPrototype.shru = LongPrototype.shiftRightUnsigned; - /** - * Converts this Long to signed. - * @returns {!Long} Signed long + /** + * Converts this Long to signed. + * @returns {!Long} Signed long */ LongPrototype.toSigned = function toSigned() { if (!this.unsigned) return this; return fromBits(this.low, this.high, false); }; - /** - * Converts this Long to unsigned. - * @returns {!Long} Unsigned long + /** + * Converts this Long to unsigned. + * @returns {!Long} Unsigned long */ LongPrototype.toUnsigned = function toUnsigned() { if (this.unsigned) return this; return fromBits(this.low, this.high, true); }; - /** - * Converts this Long to its byte representation. - * @param {boolean=} le Whether little or big endian, defaults to big endian - * @returns {!Array.} Byte representation + /** + * Converts this Long to its byte representation. + * @param {boolean=} le Whether little or big endian, defaults to big endian + * @returns {!Array.} Byte representation */ LongPrototype.toBytes = function(le) { return le ? this.toBytesLE() : this.toBytesBE(); }; - /** - * Converts this Long to its little endian byte representation. - * @returns {!Array.} Little endian byte representation + /** + * Converts this Long to its little endian byte representation. + * @returns {!Array.} Little endian byte representation */ LongPrototype.toBytesLE = function() { var hi = this.high, lo = this.low; return [ @@ -76309,9 +76309,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { hi >>> 24 & 0xff ]; }; - /** - * Converts this Long to its big endian byte representation. - * @returns {!Array.} Big endian byte representation + /** + * Converts this Long to its big endian byte representation. + * @returns {!Array.} Big endian byte representation */ LongPrototype.toBytesBE = function() { var hi = this.high, lo = this.low; return [ @@ -76331,51 +76331,51 @@ Object.defineProperty(Long.prototype, "__isLong__", { },{}],"5WdJJ":[function(require,module,exports) { (function(globalObject) { "use strict"; - /* - * bignumber.js v9.1.1 - * A JavaScript library for arbitrary-precision arithmetic. - * https://github.com/MikeMcl/bignumber.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licensed. - * - * BigNumber.prototype methods | BigNumber methods - * | - * absoluteValue abs | clone - * comparedTo | config set - * decimalPlaces dp | DECIMAL_PLACES - * dividedBy div | ROUNDING_MODE - * dividedToIntegerBy idiv | EXPONENTIAL_AT - * exponentiatedBy pow | RANGE - * integerValue | CRYPTO - * isEqualTo eq | MODULO_MODE - * isFinite | POW_PRECISION - * isGreaterThan gt | FORMAT - * isGreaterThanOrEqualTo gte | ALPHABET - * isInteger | isBigNumber - * isLessThan lt | maximum max - * isLessThanOrEqualTo lte | minimum min - * isNaN | random - * isNegative | sum - * isPositive | - * isZero | - * minus | - * modulo mod | - * multipliedBy times | - * negated | - * plus | - * precision sd | - * shiftedBy | - * squareRoot sqrt | - * toExponential | - * toFixed | - * toFormat | - * toFraction | - * toJSON | - * toNumber | - * toPrecision | - * toString | - * valueOf | - * + /* + * bignumber.js v9.1.1 + * A JavaScript library for arbitrary-precision arithmetic. + * https://github.com/MikeMcl/bignumber.js + * Copyright (c) 2022 Michael Mclaughlin + * MIT Licensed. + * + * BigNumber.prototype methods | BigNumber methods + * | + * absoluteValue abs | clone + * comparedTo | config set + * decimalPlaces dp | DECIMAL_PLACES + * dividedBy div | ROUNDING_MODE + * dividedToIntegerBy idiv | EXPONENTIAL_AT + * exponentiatedBy pow | RANGE + * integerValue | CRYPTO + * isEqualTo eq | MODULO_MODE + * isFinite | POW_PRECISION + * isGreaterThan gt | FORMAT + * isGreaterThanOrEqualTo gte | ALPHABET + * isInteger | isBigNumber + * isLessThan lt | maximum max + * isLessThanOrEqualTo lte | minimum min + * isNaN | random + * isNegative | sum + * isPositive | + * isZero | + * minus | + * modulo mod | + * multipliedBy times | + * negated | + * plus | + * precision sd | + * shiftedBy | + * squareRoot sqrt | + * toExponential | + * toFixed | + * toFormat | + * toFraction | + * toJSON | + * toNumber | + * toPrecision | + * toString | + * valueOf | + * */ var BigNumber, isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 0x1fffffffffffff, // MAX_INT32 = 0x7fffffff, // 2^31 - 1 POWS_TEN = [ 1, @@ -76396,8 +76396,8 @@ Object.defineProperty(Long.prototype, "__isLong__", { // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and // the arguments to toExponential, toFixed, toFormat, and toPrecision. MAX = 1E9; // 0 to MAX_INT32 - /* - * Create and return a BigNumber constructor. + /* + * Create and return a BigNumber constructor. */ function clone(configObject) { var div, convertBase, parseNumeric, P = BigNumber.prototype = { constructor: BigNumber, @@ -76464,12 +76464,12 @@ Object.defineProperty(Long.prototype, "__isLong__", { ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true; //------------------------------------------------------------------------------------------ // CONSTRUCTOR - /* - * The BigNumber constructor and exported function. - * Create and return a new instance of a BigNumber object. - * - * v {number|string|BigNumber} A numeric value. - * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive. + /* + * The BigNumber constructor and exported function. + * Create and return a new instance of a BigNumber object. + * + * v {number|string|BigNumber} A numeric value. + * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive. */ function BigNumber(v, b) { var alphabet, c, caseChanged, e, i, isNum, len, str, x = this; // Enable constructor call without `new`. @@ -76611,39 +76611,39 @@ Object.defineProperty(Long.prototype, "__isLong__", { BigNumber.ROUND_HALF_CEIL = 7; BigNumber.ROUND_HALF_FLOOR = 8; BigNumber.EUCLID = 9; - /* - * Configure infrequently-changing library-wide settings. - * - * Accept an object with the following optional properties (if the value of a property is - * a number, it must be an integer within the inclusive range stated): - * - * DECIMAL_PLACES {number} 0 to MAX - * ROUNDING_MODE {number} 0 to 8 - * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX] - * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX] - * CRYPTO {boolean} true or false - * MODULO_MODE {number} 0 to 9 - * POW_PRECISION {number} 0 to MAX - * ALPHABET {string} A string of two or more unique characters which does - * not contain '.'. - * FORMAT {object} An object with some of the following properties: - * prefix {string} - * groupSize {number} - * secondaryGroupSize {number} - * groupSeparator {string} - * decimalSeparator {string} - * fractionGroupSize {number} - * fractionGroupSeparator {string} - * suffix {string} - * - * (The values assigned to the above FORMAT object properties are not checked for validity.) - * - * E.g. - * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) - * - * Ignore properties/parameters set to null or undefined, except for ALPHABET. - * - * Return an object with the properties current values. + /* + * Configure infrequently-changing library-wide settings. + * + * Accept an object with the following optional properties (if the value of a property is + * a number, it must be an integer within the inclusive range stated): + * + * DECIMAL_PLACES {number} 0 to MAX + * ROUNDING_MODE {number} 0 to 8 + * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX] + * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX] + * CRYPTO {boolean} true or false + * MODULO_MODE {number} 0 to 9 + * POW_PRECISION {number} 0 to MAX + * ALPHABET {string} A string of two or more unique characters which does + * not contain '.'. + * FORMAT {object} An object with some of the following properties: + * prefix {string} + * groupSize {number} + * secondaryGroupSize {number} + * groupSeparator {string} + * decimalSeparator {string} + * fractionGroupSize {number} + * fractionGroupSeparator {string} + * suffix {string} + * + * (The values assigned to the above FORMAT object properties are not checked for validity.) + * + * E.g. + * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) + * + * Ignore properties/parameters set to null or undefined, except for ALPHABET. + * + * Return an object with the properties current values. */ BigNumber.config = BigNumber.set = function(obj) { var p, v; if (obj != null) { @@ -76762,14 +76762,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { ALPHABET: ALPHABET }; }; - /* - * Return true if v is a BigNumber instance, otherwise return false. - * - * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed. - * - * v {any} - * - * '[BigNumber Error] Invalid BigNumber: {v}' + /* + * Return true if v is a BigNumber instance, otherwise return false. + * + * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed. + * + * v {any} + * + * '[BigNumber Error] Invalid BigNumber: {v}' */ BigNumber.isBigNumber = function(v) { if (!v || v._isBigNumber !== true) return false; if (!BigNumber.DEBUG) return true; @@ -76798,29 +76798,29 @@ Object.defineProperty(Long.prototype, "__isLong__", { } else if (c === null && e === null && (s === null || s === 1 || s === -1)) return true; throw Error(bignumberError + "Invalid BigNumber: " + v); }; - /* - * Return a new BigNumber whose value is the maximum of the arguments. - * - * arguments {number|string|BigNumber} + /* + * Return a new BigNumber whose value is the maximum of the arguments. + * + * arguments {number|string|BigNumber} */ BigNumber.maximum = BigNumber.max = function() { return maxOrMin(arguments, P.lt); }; - /* - * Return a new BigNumber whose value is the minimum of the arguments. - * - * arguments {number|string|BigNumber} + /* + * Return a new BigNumber whose value is the minimum of the arguments. + * + * arguments {number|string|BigNumber} */ BigNumber.minimum = BigNumber.min = function() { return maxOrMin(arguments, P.gt); }; - /* - * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, - * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing - * zeros are produced). - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}' - * '[BigNumber Error] crypto unavailable' + /* + * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, + * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing + * zeros are produced). + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}' + * '[BigNumber Error] crypto unavailable' */ BigNumber.random = function() { var pow2_53 = 0x20000000000000; // Return a 53 bit integer n, where 0 <= n < 9007199254740992. @@ -76919,10 +76919,10 @@ Object.defineProperty(Long.prototype, "__isLong__", { return rand; }; }(); - /* - * Return a BigNumber whose value is the sum of the arguments. - * - * arguments {number|string|BigNumber} + /* + * Return a BigNumber whose value is the sum of the arguments. + * + * arguments {number|string|BigNumber} */ BigNumber.sum = function() { var i = 1, args = arguments, sum = new BigNumber(args[0]); for(; i < args.length;)sum = sum.plus(args[i++]); @@ -76932,10 +76932,10 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Called by BigNumber and BigNumber.prototype.toString. convertBase = function() { var decimal = "0123456789"; - /* - * Convert string of baseIn to an array of numbers of baseOut. - * Eg. toBaseOut('255', 10, 16) returns [15, 15]. - * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5]. + /* + * Convert string of baseIn to an array of numbers of baseOut. + * Eg. toBaseOut('255', 10, 16) returns [15, 15]. + * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5]. */ function toBaseOut(str, baseIn, baseOut, alphabet) { var j, arr = [ 0 @@ -77220,14 +77220,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { return q; }; }(); - /* - * Return a string representing the value of BigNumber n in fixed-point or exponential - * notation rounded to the specified decimal places or significant digits. - * - * n: a BigNumber. - * i: the index of the last digit required (i.e. the digit that may be rounded up). - * rm: the rounding mode. - * id: 1 (toExponential) or 2 (toPrecision). + /* + * Return a string representing the value of BigNumber n in fixed-point or exponential + * notation rounded to the specified decimal places or significant digits. + * + * n: a BigNumber. + * i: the index of the last digit required (i.e. the digit that may be rounded up). + * rm: the rounding mode. + * id: 1 (toExponential) or 2 (toPrecision). */ function format(n, i, rm, id) { var c0, e, ne, len, str; if (rm == null) rm = ROUNDING_MODE; @@ -77283,9 +77283,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return m; } - /* - * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. - * Called by minus, plus and times. + /* + * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. + * Called by minus, plus and times. */ function normalise(n, c, e) { var i = 1, j = c.length; // Remove trailing zeros. @@ -77335,9 +77335,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { x.c = x.e = null; }; }(); - /* - * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. - * If r is truthy, it is known that there are more digits after the rounding digit. + /* + * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. + * If r is truthy, it is known that there are more digits after the rounding digit. */ function round(x, sd, rm, r) { var d, i, j, k, n, ni, rd, xc = x.c, pows10 = POWS_TEN; // if x is not Infinity or NaN... @@ -77452,34 +77452,34 @@ Object.defineProperty(Long.prototype, "__isLong__", { return n.s < 0 ? "-" + str : str; } // PROTOTYPE/INSTANCE METHODS - /* - * Return a new BigNumber whose value is the absolute value of this BigNumber. + /* + * Return a new BigNumber whose value is the absolute value of this BigNumber. */ P.absoluteValue = P.abs = function() { var x = new BigNumber(this); if (x.s < 0) x.s = 1; return x; }; - /* - * Return - * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), - * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), - * 0 if they have the same value, - * or null if the value of either is NaN. + /* + * Return + * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), + * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), + * 0 if they have the same value, + * or null if the value of either is NaN. */ P.comparedTo = function(y, b) { return compare(this, new BigNumber(y, b)); }; - /* - * If dp is undefined or null or true or false, return the number of decimal places of the - * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. - * - * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this - * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or - * ROUNDING_MODE if rm is omitted. - * - * [dp] {number} Decimal places: integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + /* + * If dp is undefined or null or true or false, return the number of decimal places of the + * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. + * + * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * [dp] {number} Decimal places: integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' */ P.decimalPlaces = P.dp = function(dp, rm) { var c, n, v, x = this; if (dp != null) { @@ -77495,48 +77495,48 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (n < 0) n = 0; return n; }; - /* - * n / 0 = I - * n / N = N - * n / I = 0 - * 0 / n = 0 - * 0 / 0 = N - * 0 / N = N - * 0 / I = 0 - * N / n = N - * N / 0 = N - * N / N = N - * N / I = N - * I / n = I - * I / 0 = I - * I / N = N - * I / I = N - * - * Return a new BigNumber whose value is the value of this BigNumber divided by the value of - * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. + /* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N + * + * Return a new BigNumber whose value is the value of this BigNumber divided by the value of + * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. */ P.dividedBy = P.div = function(y, b) { return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE); }; - /* - * Return a new BigNumber whose value is the integer part of dividing the value of this - * BigNumber by the value of BigNumber(y, b). + /* + * Return a new BigNumber whose value is the integer part of dividing the value of this + * BigNumber by the value of BigNumber(y, b). */ P.dividedToIntegerBy = P.idiv = function(y, b) { return div(this, new BigNumber(y, b), 0, 1); }; - /* - * Return a BigNumber whose value is the value of this BigNumber exponentiated by n. - * - * If m is present, return the result modulo m. - * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. - * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE. - * - * The modular power operation works efficiently when x, n, and m are integers, otherwise it - * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0. - * - * n {number|string|BigNumber} The exponent. An integer. - * [m] {number|string|BigNumber} The modulus. - * - * '[BigNumber Error] Exponent not an integer: {n}' + /* + * Return a BigNumber whose value is the value of this BigNumber exponentiated by n. + * + * If m is present, return the result modulo m. + * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. + * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE. + * + * The modular power operation works efficiently when x, n, and m are integers, otherwise it + * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0. + * + * n {number|string|BigNumber} The exponent. An integer. + * [m] {number|string|BigNumber} The modulus. + * + * '[BigNumber Error] Exponent not an integer: {n}' */ P.exponentiatedBy = P.pow = function(n, m) { var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this; n = new BigNumber(n); @@ -77612,98 +77612,98 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (nIsNeg) y = ONE.div(y); return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y; }; - /* - * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer - * using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}' + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer + * using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}' */ P.integerValue = function(rm) { var n = new BigNumber(this); if (rm == null) rm = ROUNDING_MODE; else intCheck(rm, 0, 8); return round(n, n.e + 1, rm); }; - /* - * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), - * otherwise return false. + /* + * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), + * otherwise return false. */ P.isEqualTo = P.eq = function(y, b) { return compare(this, new BigNumber(y, b)) === 0; }; - /* - * Return true if the value of this BigNumber is a finite number, otherwise return false. + /* + * Return true if the value of this BigNumber is a finite number, otherwise return false. */ P.isFinite = function() { return !!this.c; }; - /* - * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), - * otherwise return false. + /* + * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), + * otherwise return false. */ P.isGreaterThan = P.gt = function(y, b) { return compare(this, new BigNumber(y, b)) > 0; }; - /* - * Return true if the value of this BigNumber is greater than or equal to the value of - * BigNumber(y, b), otherwise return false. + /* + * Return true if the value of this BigNumber is greater than or equal to the value of + * BigNumber(y, b), otherwise return false. */ P.isGreaterThanOrEqualTo = P.gte = function(y, b) { return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0; }; - /* - * Return true if the value of this BigNumber is an integer, otherwise return false. + /* + * Return true if the value of this BigNumber is an integer, otherwise return false. */ P.isInteger = function() { return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2; }; - /* - * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), - * otherwise return false. + /* + * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), + * otherwise return false. */ P.isLessThan = P.lt = function(y, b) { return compare(this, new BigNumber(y, b)) < 0; }; - /* - * Return true if the value of this BigNumber is less than or equal to the value of - * BigNumber(y, b), otherwise return false. + /* + * Return true if the value of this BigNumber is less than or equal to the value of + * BigNumber(y, b), otherwise return false. */ P.isLessThanOrEqualTo = P.lte = function(y, b) { return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0; }; - /* - * Return true if the value of this BigNumber is NaN, otherwise return false. + /* + * Return true if the value of this BigNumber is NaN, otherwise return false. */ P.isNaN = function() { return !this.s; }; - /* - * Return true if the value of this BigNumber is negative, otherwise return false. + /* + * Return true if the value of this BigNumber is negative, otherwise return false. */ P.isNegative = function() { return this.s < 0; }; - /* - * Return true if the value of this BigNumber is positive, otherwise return false. + /* + * Return true if the value of this BigNumber is positive, otherwise return false. */ P.isPositive = function() { return this.s > 0; }; - /* - * Return true if the value of this BigNumber is 0 or -0, otherwise return false. + /* + * Return true if the value of this BigNumber is 0 or -0, otherwise return false. */ P.isZero = function() { return !!this.c && this.c[0] == 0; }; - /* - * n - 0 = n - * n - N = N - * n - I = -I - * 0 - n = -n - * 0 - 0 = 0 - * 0 - N = N - * 0 - I = -I - * N - n = N - * N - 0 = N - * N - N = N - * N - I = N - * I - n = I - * I - 0 = I - * I - N = N - * I - I = N - * - * Return a new BigNumber whose value is the value of this BigNumber minus the value of - * BigNumber(y, b). + /* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N + * + * Return a new BigNumber whose value is the value of this BigNumber minus the value of + * BigNumber(y, b). */ P.minus = function(y, b) { var i, j, t, xLTy, x = this, a = x.s; y = new BigNumber(y, b); @@ -77785,26 +77785,26 @@ Object.defineProperty(Long.prototype, "__isLong__", { // for finite x and y. return normalise(y, xc, ye); }; - /* - * n % 0 = N - * n % N = N - * n % I = n - * 0 % n = 0 - * -0 % n = -0 - * 0 % 0 = N - * 0 % N = N - * 0 % I = 0 - * N % n = N - * N % 0 = N - * N % N = N - * N % I = N - * I % n = N - * I % 0 = N - * I % N = N - * I % I = N - * - * Return a new BigNumber whose value is the value of this BigNumber modulo the value of - * BigNumber(y, b). The result depends on the value of MODULO_MODE. + /* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N + * + * Return a new BigNumber whose value is the value of this BigNumber modulo the value of + * BigNumber(y, b). The result depends on the value of MODULO_MODE. */ P.modulo = P.mod = function(y, b) { var q, s, x = this; y = new BigNumber(y, b); @@ -77825,25 +77825,25 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (!y.c[0] && MODULO_MODE == 1) y.s = x.s; return y; }; - /* - * n * 0 = 0 - * n * N = N - * n * I = I - * 0 * n = 0 - * 0 * 0 = 0 - * 0 * N = N - * 0 * I = N - * N * n = N - * N * 0 = N - * N * N = N - * N * I = N - * I * n = I - * I * 0 = N - * I * N = N - * I * I = I - * - * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value - * of BigNumber(y, b). + /* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I + * + * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value + * of BigNumber(y, b). */ P.multipliedBy = P.times = function(y, b) { var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber(y, b)).c; // Either NaN, ±Infinity or ±0? @@ -77898,33 +77898,33 @@ Object.defineProperty(Long.prototype, "__isLong__", { else zc.splice(0, 1); return normalise(y, zc, e); }; - /* - * Return a new BigNumber whose value is the value of this BigNumber negated, - * i.e. multiplied by -1. + /* + * Return a new BigNumber whose value is the value of this BigNumber negated, + * i.e. multiplied by -1. */ P.negated = function() { var x = new BigNumber(this); x.s = -x.s || null; return x; }; - /* - * n + 0 = n - * n + N = N - * n + I = I - * 0 + n = n - * 0 + 0 = 0 - * 0 + N = N - * 0 + I = I - * N + n = N - * N + 0 = N - * N + N = N - * N + I = N - * I + n = I - * I + 0 = I - * I + N = N - * I + I = I - * - * Return a new BigNumber whose value is the value of this BigNumber plus the value of - * BigNumber(y, b). + /* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I + * + * Return a new BigNumber whose value is the value of this BigNumber plus the value of + * BigNumber(y, b). */ P.plus = function(y, b) { var t, x = this, a = x.s; y = new BigNumber(y, b); @@ -77984,20 +77984,20 @@ Object.defineProperty(Long.prototype, "__isLong__", { // ye = MAX_EXP + 1 possible return normalise(y, xc, ye); }; - /* - * If sd is undefined or null or true or false, return the number of significant digits of - * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. - * If sd is true include integer-part trailing zeros in the count. - * - * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this - * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or - * ROUNDING_MODE if rm is omitted. - * - * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive. - * boolean: whether to count integer-part trailing zeros: true or false. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + /* + * If sd is undefined or null or true or false, return the number of significant digits of + * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. + * If sd is true include integer-part trailing zeros in the count. + * + * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive. + * boolean: whether to count integer-part trailing zeros: true or false. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' */ P.precision = P.sd = function(sd, rm) { var c, n, v, x = this; if (sd != null && sd !== !!sd) { @@ -78018,27 +78018,27 @@ Object.defineProperty(Long.prototype, "__isLong__", { if (sd && x.e + 1 > n) n = x.e + 1; return n; }; - /* - * Return a new BigNumber whose value is the value of this BigNumber shifted by k places - * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. - * - * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}' + /* + * Return a new BigNumber whose value is the value of this BigNumber shifted by k places + * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. + * + * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}' */ P.shiftedBy = function(k) { intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER); return this.times("1e" + k); }; - /* - * sqrt(-n) = N - * sqrt(N) = N - * sqrt(-I) = N - * sqrt(I) = I - * sqrt(0) = 0 - * sqrt(-0) = -0 - * - * Return a new BigNumber whose value is the square root of the value of this BigNumber, - * rounded according to DECIMAL_PLACES and ROUNDING_MODE. + /* + * sqrt(-n) = N + * sqrt(N) = N + * sqrt(-I) = N + * sqrt(I) = I + * sqrt(0) = 0 + * sqrt(-0) = -0 + * + * Return a new BigNumber whose value is the square root of the value of this BigNumber, + * rounded according to DECIMAL_PLACES and ROUNDING_MODE. */ P.squareRoot = P.sqrt = function() { var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber("0.5"); // Negative/NaN/Infinity/zero? @@ -78108,14 +78108,14 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m); }; - /* - * Return a string representing the value of this BigNumber in exponential notation and - * rounded using ROUNDING_MODE to dp fixed decimal places. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + /* + * Return a string representing the value of this BigNumber in exponential notation and + * rounded using ROUNDING_MODE to dp fixed decimal places. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' */ P.toExponential = function(dp, rm) { if (dp != null) { intCheck(dp, 0, MAX); @@ -78123,17 +78123,17 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return format(this, dp, rm, 1); }; - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounding - * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', - * but e.g. (-0.00001).toFixed(0) is '-0'. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounding + * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', + * but e.g. (-0.00001).toFixed(0) is '-0'. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' */ P.toFixed = function(dp, rm) { if (dp != null) { intCheck(dp, 0, MAX); @@ -78141,30 +78141,30 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return format(this, dp, rm); }; - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounded - * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties - * of the format or FORMAT object (see BigNumber.set). - * - * The formatting object may contain some or all of the properties shown below. - * - * FORMAT = { - * prefix: '', - * groupSize: 3, - * secondaryGroupSize: 0, - * groupSeparator: ',', - * decimalSeparator: '.', - * fractionGroupSize: 0, - * fractionGroupSeparator: '\xA0', // non-breaking space - * suffix: '' - * }; - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * [format] {object} Formatting options. See FORMAT pbject above. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' - * '[BigNumber Error] Argument not an object: {format}' + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounded + * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties + * of the format or FORMAT object (see BigNumber.set). + * + * The formatting object may contain some or all of the properties shown below. + * + * FORMAT = { + * prefix: '', + * groupSize: 3, + * secondaryGroupSize: 0, + * groupSeparator: ',', + * decimalSeparator: '.', + * fractionGroupSize: 0, + * fractionGroupSeparator: '\xA0', // non-breaking space + * suffix: '' + * }; + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * [format] {object} Formatting options. See FORMAT pbject above. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + * '[BigNumber Error] Argument not an object: {format}' */ P.toFormat = function(dp, rm, format) { var str, x = this; if (format == null) { @@ -78196,16 +78196,16 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return (format.prefix || "") + str + (format.suffix || ""); }; - /* - * Return an array of two BigNumbers representing the value of this BigNumber as a simple - * fraction with an integer numerator and an integer denominator. - * The denominator will be a positive non-zero value less than or equal to the specified - * maximum denominator. If a maximum denominator is not specified, the denominator will be - * the lowest value necessary to represent the number exactly. - * - * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator. - * - * '[BigNumber Error] Argument {not an integer|out of range} : {md}' + /* + * Return an array of two BigNumbers representing the value of this BigNumber as a simple + * fraction with an integer numerator and an integer denominator. + * The denominator will be a positive non-zero value less than or equal to the specified + * maximum denominator. If a maximum denominator is not specified, the denominator will be + * the lowest value necessary to represent the number exactly. + * + * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator. + * + * '[BigNumber Error] Argument {not an integer|out of range} : {md}' */ P.toFraction = function(md) { var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, x = this, xc = x.c; if (md != null) { @@ -78255,35 +78255,35 @@ Object.defineProperty(Long.prototype, "__isLong__", { MAX_EXP = exp; return r; }; - /* - * Return the value of this BigNumber converted to a number primitive. + /* + * Return the value of this BigNumber converted to a number primitive. */ P.toNumber = function() { return +valueOf(this); }; - /* - * Return a string representing the value of this BigNumber rounded to sd significant digits - * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits - * necessary to represent the integer part of the value in fixed-point notation, then use - * exponential notation. - * - * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + /* + * Return a string representing the value of this BigNumber rounded to sd significant digits + * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits + * necessary to represent the integer part of the value in fixed-point notation, then use + * exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' */ P.toPrecision = function(sd, rm) { if (sd != null) intCheck(sd, 1, MAX); return format(this, sd, rm, 2); }; - /* - * Return a string representing the value of this BigNumber in base b, or base 10 if b is - * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and - * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent - * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than - * TO_EXP_NEG, return exponential notation. - * - * [b] {number} Integer, 2 to ALPHABET.length inclusive. - * - * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' + /* + * Return a string representing the value of this BigNumber in base b, or base 10 if b is + * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and + * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent + * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than + * TO_EXP_NEG, return exponential notation. + * + * [b] {number} Integer, 2 to ALPHABET.length inclusive. + * + * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' */ P.toString = function(b) { var str, n = this, s = n.s, e = n.e; // Infinity or NaN? @@ -78305,9 +78305,9 @@ Object.defineProperty(Long.prototype, "__isLong__", { } return str; }; - /* - * Return as toString, but do not accept a base argument, and include the minus sign for - * negative zero. + /* + * Return as toString, but do not accept a base argument, and include the minus sign for + * negative zero. */ P.valueOf = P.toJSON = function() { return valueOf(this); }; @@ -78358,8 +78358,8 @@ Object.defineProperty(Long.prototype, "__isLong__", { // Compare lengths. return k == l ? 0 : k > l ^ a ? 1 : -1; } - /* - * Check that n is a primitive number, an integer, and in range, otherwise throw. + /* + * Check that n is a primitive number, an integer, and in range, otherwise throw. */ function intCheck(n, min, max, name) { if (n < min || n > max || n !== mathfloor(n)) throw Error(bignumberError + (name || "Argument") + (typeof n == "number" ? n < min || n > max ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(n)); } @@ -85059,7 +85059,7 @@ var $replace = bind.call(Function.call, String.prototype.replace); var $strSlice = bind.call(Function.call, String.prototype.slice); var $exec = bind.call(Function.call, RegExp.prototype.exec); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ var stringToPath = function stringToPath(string) { var first = $strSlice(string, 0, 1); var last = $strSlice(string, -1); @@ -85429,7 +85429,7 @@ var ddaClass2 = "[object HTML document.all class]"; var ddaClass3 = "[object HTMLCollection]"; // IE 9-10 var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag; // better: use `has-tostringtag` var isIE68 = !(0 in [ - , + , ]); // eslint-disable-line no-sparse-arrays, comma-spacing var isDDA = function isDocumentDotAll() { return false; @@ -103225,19 +103225,19 @@ function _interopDefaultLegacy(e) { var transport__default = /*#__PURE__*/ _interopDefaultLegacy(transport); var axios__default = /*#__PURE__*/ _interopDefaultLegacy(axios); var secureJSON__default = /*#__PURE__*/ _interopDefaultLegacy(secureJSON); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -103577,19 +103577,19 @@ function _interopDefaultLegacy(e) { } var transport__default = /*#__PURE__*/ _interopDefaultLegacy(transport); var ByteBuffer__default = /*#__PURE__*/ _interopDefaultLegacy(ByteBuffer); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -104054,19 +104054,19 @@ function _interopDefaultLegacy(e) { }; } var transport__default = /*#__PURE__*/ _interopDefaultLegacy(transport); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { @@ -104190,19 +104190,19 @@ function _interopDefaultLegacy(e) { var transport__default = /*#__PURE__*/ _interopDefaultLegacy(transport); var axios__default = /*#__PURE__*/ _interopDefaultLegacy(axios); var secureJSON__default = /*#__PURE__*/ _interopDefaultLegacy(secureJSON); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve) { diff --git a/packages/core/package.json b/packages/core/package.json index bd658dc57..1dc64dce8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-core", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "description": "Core processes and APIs for communicating with OneKey hardware devices.", "author": "OneKey", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", @@ -25,8 +25,8 @@ "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues" }, "dependencies": { - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport": "1.1.20", + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport": "1.1.21-alpha.1", "axios": "1.12.2", "bignumber.js": "^9.0.2", "bytebuffer": "^5.0.1", diff --git a/packages/core/src/api/FirmwareUpdateV3.ts b/packages/core/src/api/FirmwareUpdateV3.ts index 2cf39b94e..06da22862 100644 --- a/packages/core/src/api/FirmwareUpdateV3.ts +++ b/packages/core/src/api/FirmwareUpdateV3.ts @@ -247,7 +247,7 @@ export default class FirmwareUpdateV3 extends FirmwareUpdateBaseMethod { export class FirmwareUpdateBaseMethod extends BaseMethod { checkPromise: Deferred | null = null; + protected hasPromptedWebUsbBootloaderReauth = false; + init(): void {} run(): Promise { @@ -153,7 +155,7 @@ export class FirmwareUpdateBaseMethod extends BaseMethod { } } catch (e) { Log.log( - 'FirmwareUpdateBaseMethod [checkDeviceToBootloader] promptDeviceInBootloaderForWebDevice failed: ', + 'FirmwareUpdateBaseMethod [checkDeviceToBootloader] _promptDeviceInBootloaderForWebDevice failed: ', e ); this.checkPromise?.reject(e); @@ -193,6 +195,29 @@ export class FirmwareUpdateBaseMethod extends BaseMethod { }, 30000); } + /** + * Only prompt WebUSB in bootloader scenarios that require re-authorization + * (e.g., switching between BTC-only and general firmware is treated as a new device). + */ + protected async ensureWebUsbBootloaderReauthPrompt() { + if ( + this.hasPromptedWebUsbBootloaderReauth || + !DataManager.isBrowserWebUsb(DataManager.getSettings('env')) || + this.device.listenerCount(DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE) === 0 + ) { + return; + } + + this.hasPromptedWebUsbBootloaderReauth = true; + this.postTipMessage(FirmwareUpdateTipMessage.SelectDeviceInBootloaderForWebDevice); + + try { + await this._promptDeviceInBootloaderForWebDevice(); + } catch (error) { + Log.log('WebUSB re-authorization failed: ', error); + } + } + private async _checkDeviceInBootloaderMode( connectId: string | undefined, intervalTimer?: ReturnType, @@ -430,8 +455,8 @@ export class FirmwareUpdateBaseMethod extends BaseMethod { } /** - * @description 设备重启(Bootloader 侧可用) - * @param rebootType 重启类型,参考 RebootType 枚举 + * @description Device reboot (available in bootloader mode) + * @param rebootType Reboot type, see the RebootType enum */ async reboot(rebootType: RebootType) { const typedCall = this.device.getCommands().typedCall.bind(this.device.getCommands()); diff --git a/packages/core/src/data-manager/DataManager.ts b/packages/core/src/data-manager/DataManager.ts index bfcaa74b2..534cf1c2c 100644 --- a/packages/core/src/data-manager/DataManager.ts +++ b/packages/core/src/data-manager/DataManager.ts @@ -34,8 +34,8 @@ const Log = getLogger(LoggerNames.Core); export const FIRMWARE_FIELDS = [ 'firmware', 'firmware-v2', - 'firmware-v7', - 'firmware-btc-v7', + 'firmware-v8', + 'firmware-btc-v8', ] as const; export type IFirmwareField = (typeof FIRMWARE_FIELDS)[number]; @@ -45,8 +45,8 @@ export type MessageVersion = 'latest' | 'v1'; const FIRMWARE_FIELD_TYPE_MAP: Readonly> = { firmware: EFirmwareType.Universal, 'firmware-v2': EFirmwareType.Universal, - 'firmware-v7': EFirmwareType.Universal, - 'firmware-btc-v7': EFirmwareType.BitcoinOnly, + 'firmware-v8': EFirmwareType.Universal, + 'firmware-btc-v8': EFirmwareType.BitcoinOnly, } as const; function getFirmwareTypeFromField(firmwareField: IFirmwareField): EFirmwareType { diff --git a/packages/core/src/types/settings.ts b/packages/core/src/types/settings.ts index 9862148d6..54aa2dee8 100644 --- a/packages/core/src/types/settings.ts +++ b/packages/core/src/types/settings.ts @@ -98,9 +98,9 @@ type IKnownDevice = Exclude; * // { * // firmware: IFirmwareReleaseInfo[]; * // 'firmware-v2'?: IFirmwareReleaseInfo[]; - * // 'firmware-v7'?: IFirmwareReleaseInfo[]; + * // 'firmware-v8'?: IFirmwareReleaseInfo[]; * // 'firmware-v8'?: IFirmwareReleaseInfo[]; // New - * // 'firmware-btc-v7'?: IFirmwareReleaseInfo[]; + * // 'firmware-btc-v8'?: IFirmwareReleaseInfo[]; * // 'firmware-btc-v8'?: IFirmwareReleaseInfo[]; // New * // ble: IBLEFirmwareReleaseInfo[]; * // } @@ -112,9 +112,9 @@ export type DeviceTypeMap = { /** Firmware v2 (Touch/Pro specific) */ 'firmware-v2'?: IFirmwareReleaseInfo[]; /** Universal firmware v7 */ - 'firmware-v7'?: IFirmwareReleaseInfo[]; + 'firmware-v8'?: IFirmwareReleaseInfo[]; /** Bitcoin-only firmware v7 */ - 'firmware-btc-v7'?: IFirmwareReleaseInfo[]; + 'firmware-btc-v8'?: IFirmwareReleaseInfo[]; // Future firmware versions should be added here as optional fields: // 'firmware-v8'?: IFirmwareReleaseInfo[]; // 'firmware-btc-v8'?: IFirmwareReleaseInfo[]; diff --git a/packages/core/src/utils/deviceFeaturesUtils.ts b/packages/core/src/utils/deviceFeaturesUtils.ts index 4a45bb48e..595365bdb 100644 --- a/packages/core/src/utils/deviceFeaturesUtils.ts +++ b/packages/core/src/utils/deviceFeaturesUtils.ts @@ -235,9 +235,9 @@ export const supportModifyHomescreen = (features?: Features): SupportFeatureType export const getLatestFirmwareField = (firmwareType?: EFirmwareType): IFirmwareField => { if (firmwareType === 'bitcoinonly') { - return `firmware-btc-v7`; + return `firmware-btc-v8`; } - return `firmware-v7`; + return `firmware-v8`; }; /** @@ -300,25 +300,25 @@ export const getFirmwareUpdateFieldArray = ( deviceType === 'mini' || deviceType === 'classicpure' ) { - return ['firmware-v7']; + return ['firmware-v8']; } if (deviceType === 'touch') { const currentVersion = getDeviceFirmwareVersion(features).join('.'); if (semver.gt(currentVersion, '4.0.0')) { - return ['firmware-v7', 'firmware']; + return ['firmware-v8', 'firmware']; } if (semver.gte(currentVersion, '4.0.0')) { return ['firmware-v2', 'firmware']; } if (!currentVersion || semver.lt(currentVersion, '3.0.0')) { - return ['firmware-v7', 'firmware-v2', 'firmware']; + return ['firmware-v8', 'firmware-v2', 'firmware']; } return ['firmware']; } if (deviceType === 'pro') { - return ['firmware-v7']; + return ['firmware-v8']; } return ['firmware']; diff --git a/packages/hd-ble-sdk/package.json b/packages/hd-ble-sdk/package.json index c06757584..5cf7bd50a 100644 --- a/packages/hd-ble-sdk/package.json +++ b/packages/hd-ble-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-ble-sdk", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "author": "OneKey", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", "license": "ISC", @@ -20,8 +20,8 @@ "lint:fix": "eslint . --fix" }, "dependencies": { - "@onekeyfe/hd-core": "1.1.20", - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport-react-native": "1.1.20" + "@onekeyfe/hd-core": "1.1.21-alpha.1", + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport-react-native": "1.1.21-alpha.1" } } diff --git a/packages/hd-common-connect-sdk/package.json b/packages/hd-common-connect-sdk/package.json index 31006b625..8f741388e 100644 --- a/packages/hd-common-connect-sdk/package.json +++ b/packages/hd-common-connect-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-common-connect-sdk", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "author": "OneKey", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", "license": "ISC", @@ -20,11 +20,11 @@ "lint:fix": "eslint . --fix" }, "dependencies": { - "@onekeyfe/hd-core": "1.1.20", - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport-emulator": "1.1.20", - "@onekeyfe/hd-transport-http": "1.1.20", - "@onekeyfe/hd-transport-lowlevel": "1.1.20", - "@onekeyfe/hd-transport-web-device": "1.1.20" + "@onekeyfe/hd-core": "1.1.21-alpha.1", + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport-emulator": "1.1.21-alpha.1", + "@onekeyfe/hd-transport-http": "1.1.21-alpha.1", + "@onekeyfe/hd-transport-lowlevel": "1.1.21-alpha.1", + "@onekeyfe/hd-transport-web-device": "1.1.21-alpha.1" } } diff --git a/packages/hd-transport-electron/package.json b/packages/hd-transport-electron/package.json index 65eaf1d9e..776ebffb5 100644 --- a/packages/hd-transport-electron/package.json +++ b/packages/hd-transport-electron/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-transport-electron", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "author": "OneKey", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", "license": "MIT", @@ -25,9 +25,9 @@ "electron-log": ">=4.0.0" }, "dependencies": { - "@onekeyfe/hd-core": "1.1.20", - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport": "1.1.20", + "@onekeyfe/hd-core": "1.1.21-alpha.1", + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport": "1.1.21-alpha.1", "@stoprocent/noble": "2.3.4", "p-retry": "^4.6.2" }, diff --git a/packages/hd-transport-emulator/package.json b/packages/hd-transport-emulator/package.json index fde4a779e..c404f1bb5 100644 --- a/packages/hd-transport-emulator/package.json +++ b/packages/hd-transport-emulator/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-transport-emulator", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "description": "hardware emulator transport", "author": "OneKey", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", @@ -24,8 +24,8 @@ "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues" }, "dependencies": { - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport": "1.1.20", + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport": "1.1.21-alpha.1", "axios": "1.12.2", "secure-json-parse": "^4.0.0" } diff --git a/packages/hd-transport-http/package.json b/packages/hd-transport-http/package.json index 67cb6e2f2..0029c4d60 100644 --- a/packages/hd-transport-http/package.json +++ b/packages/hd-transport-http/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-transport-http", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "description": "hardware http transport", "author": "OneKey", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", @@ -24,8 +24,8 @@ "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues" }, "dependencies": { - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport": "1.1.20", + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport": "1.1.21-alpha.1", "axios": "1.12.2", "secure-json-parse": "^4.0.0" } diff --git a/packages/hd-transport-lowlevel/package.json b/packages/hd-transport-lowlevel/package.json index ace39f23f..e0f3fdbc6 100644 --- a/packages/hd-transport-lowlevel/package.json +++ b/packages/hd-transport-lowlevel/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-transport-lowlevel", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", "license": "MIT", "main": "dist/index.js", @@ -19,7 +19,7 @@ "lint:fix": "eslint . --fix" }, "dependencies": { - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport": "1.1.20" + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport": "1.1.21-alpha.1" } } diff --git a/packages/hd-transport-react-native/package.json b/packages/hd-transport-react-native/package.json index 39bf37066..15da4494d 100644 --- a/packages/hd-transport-react-native/package.json +++ b/packages/hd-transport-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-transport-react-native", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", "license": "MIT", "main": "dist/index.js", @@ -19,8 +19,8 @@ "lint:fix": "eslint . --fix" }, "dependencies": { - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport": "1.1.20", + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport": "1.1.21-alpha.1", "@onekeyfe/react-native-ble-utils": "^0.1.4", "react-native-ble-plx": "3.5.0" } diff --git a/packages/hd-transport-web-device/package.json b/packages/hd-transport-web-device/package.json index 306b24c79..0f7052197 100644 --- a/packages/hd-transport-web-device/package.json +++ b/packages/hd-transport-web-device/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-transport-web-device", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "author": "OneKey", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", "license": "MIT", @@ -20,11 +20,11 @@ "lint:fix": "eslint . --fix" }, "dependencies": { - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport": "1.1.20" + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport": "1.1.21-alpha.1" }, "devDependencies": { - "@onekeyfe/hd-transport-electron": "1.1.20", + "@onekeyfe/hd-transport-electron": "1.1.21-alpha.1", "@types/w3c-web-usb": "^1.0.6", "@types/web-bluetooth": "^0.0.17" } diff --git a/packages/hd-transport/package.json b/packages/hd-transport/package.json index 9f5c19115..f247f1cf9 100644 --- a/packages/hd-transport/package.json +++ b/packages/hd-transport/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-transport", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "description": "Transport layer abstractions and utilities for OneKey hardware SDK.", "author": "OneKey", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", diff --git a/packages/hd-web-sdk/package.json b/packages/hd-web-sdk/package.json index 946998497..c4d6c16c9 100644 --- a/packages/hd-web-sdk/package.json +++ b/packages/hd-web-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-web-sdk", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "author": "OneKey", "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", "license": "ISC", @@ -21,10 +21,10 @@ }, "dependencies": { "@onekeyfe/cross-inpage-provider-core": "^0.0.17", - "@onekeyfe/hd-core": "1.1.20", - "@onekeyfe/hd-shared": "1.1.20", - "@onekeyfe/hd-transport-http": "1.1.20", - "@onekeyfe/hd-transport-web-device": "1.1.20" + "@onekeyfe/hd-core": "1.1.21-alpha.1", + "@onekeyfe/hd-shared": "1.1.21-alpha.1", + "@onekeyfe/hd-transport-http": "1.1.21-alpha.1", + "@onekeyfe/hd-transport-web-device": "1.1.21-alpha.1" }, "devDependencies": { "@babel/plugin-proposal-optional-chaining": "^7.17.12", diff --git a/packages/shared/package.json b/packages/shared/package.json index ff6553399..24f937cc3 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/hd-shared", - "version": "1.1.20", + "version": "1.1.21-alpha.1", "description": "Hardware SDK's shared tool library", "keywords": [ "Hardware-SDK",